@synergy-design-system/mcp 2.6.0 → 2.7.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 (65) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/utilities/storybook/scraper.js +14 -3
  3. package/metadata/checksum.txt +1 -1
  4. package/metadata/packages/components/components/syn-checkbox/component.angular.ts +13 -0
  5. package/metadata/packages/components/components/syn-checkbox/component.styles.ts +99 -39
  6. package/metadata/packages/components/components/syn-checkbox/component.ts +13 -10
  7. package/metadata/packages/components/components/syn-checkbox/component.vue +5 -0
  8. package/metadata/packages/components/components/syn-combobox/component.angular.ts +13 -0
  9. package/metadata/packages/components/components/syn-combobox/component.styles.ts +216 -193
  10. package/metadata/packages/components/components/syn-combobox/component.ts +68 -39
  11. package/metadata/packages/components/components/syn-combobox/component.vue +5 -0
  12. package/metadata/packages/components/components/syn-file/component.angular.ts +13 -0
  13. package/metadata/packages/components/components/syn-file/component.styles.ts +20 -3
  14. package/metadata/packages/components/components/syn-file/component.ts +19 -5
  15. package/metadata/packages/components/components/syn-file/component.vue +5 -0
  16. package/metadata/packages/components/components/syn-input/component.ts +1 -2
  17. package/metadata/packages/components/components/syn-prio-nav/component.ts +2 -1
  18. package/metadata/packages/components/components/syn-radio/component.angular.ts +13 -0
  19. package/metadata/packages/components/components/syn-radio/component.styles.ts +91 -29
  20. package/metadata/packages/components/components/syn-radio/component.ts +19 -10
  21. package/metadata/packages/components/components/syn-radio/component.vue +5 -0
  22. package/metadata/packages/components/components/syn-radio-group/component.styles.ts +30 -9
  23. package/metadata/packages/components/components/syn-radio-group/component.ts +61 -32
  24. package/metadata/packages/components/components/syn-range/component.angular.ts +13 -0
  25. package/metadata/packages/components/components/syn-range/component.styles.ts +27 -3
  26. package/metadata/packages/components/components/syn-range/component.ts +17 -5
  27. package/metadata/packages/components/components/syn-range/component.vue +5 -0
  28. package/metadata/packages/components/components/syn-select/component.angular.ts +13 -0
  29. package/metadata/packages/components/components/syn-select/component.styles.ts +222 -151
  30. package/metadata/packages/components/components/syn-select/component.ts +30 -15
  31. package/metadata/packages/components/components/syn-select/component.vue +5 -0
  32. package/metadata/packages/components/components/syn-switch/component.angular.ts +13 -0
  33. package/metadata/packages/components/components/syn-switch/component.styles.ts +145 -63
  34. package/metadata/packages/components/components/syn-switch/component.ts +16 -4
  35. package/metadata/packages/components/components/syn-switch/component.vue +5 -0
  36. package/metadata/packages/components/components/syn-textarea/component.styles.ts +55 -27
  37. package/metadata/packages/components/components/syn-textarea/component.ts +1 -3
  38. package/metadata/packages/components/static/CHANGELOG.md +38 -0
  39. package/metadata/packages/tokens/CHANGELOG.md +24 -0
  40. package/metadata/packages/tokens/dark.css +7 -1
  41. package/metadata/packages/tokens/index.js +31 -1
  42. package/metadata/packages/tokens/light.css +7 -1
  43. package/metadata/packages/tokens/sick2018_dark.css +7 -1
  44. package/metadata/packages/tokens/sick2018_light.css +7 -1
  45. package/metadata/packages/tokens/sick2025_dark.css +7 -1
  46. package/metadata/packages/tokens/sick2025_light.css +7 -1
  47. package/metadata/static/components/syn-checkbox/docs.md +36 -0
  48. package/metadata/static/components/syn-combobox/docs.md +138 -0
  49. package/metadata/static/components/syn-file/docs.md +24 -0
  50. package/metadata/static/components/syn-input/docs.md +1 -1
  51. package/metadata/static/components/syn-radio/docs.md +21 -0
  52. package/metadata/static/components/syn-radio-group/docs.md +46 -0
  53. package/metadata/static/components/syn-range/docs.md +19 -0
  54. package/metadata/static/components/syn-select/docs.md +81 -0
  55. package/metadata/static/components/syn-switch/docs.md +22 -0
  56. package/metadata/static/components/syn-textarea/docs.md +1 -1
  57. package/metadata/static/components/syn-tooltip/docs.md +73 -0
  58. package/package.json +4 -4
  59. package/metadata/packages/components/components/syn-checkbox/component.custom.styles.ts +0 -86
  60. package/metadata/packages/components/components/syn-combobox/component.custom.styles.ts +0 -122
  61. package/metadata/packages/components/components/syn-radio/component.custom.styles.ts +0 -86
  62. package/metadata/packages/components/components/syn-radio-group/component.custom.styles.ts +0 -25
  63. package/metadata/packages/components/components/syn-select/component.custom.styles.ts +0 -175
  64. package/metadata/packages/components/components/syn-switch/component.custom.styles.ts +0 -141
  65. package/metadata/packages/components/components/syn-textarea/component.custom.styles.ts +0 -48
@@ -105,6 +105,30 @@ Use the disabled attribute to disable a file input.
105
105
 
106
106
  ---
107
107
 
108
+ ## Readonly
109
+
110
+ Use the readonly attribute to set a file input to a readonly state.
111
+
112
+ ```html
113
+ <div style="display: flex; flex-direction: column; gap: 1rem">
114
+ <syn-file
115
+ readonly=""
116
+ label="This is a label"
117
+ size="medium"
118
+ form=""
119
+ ></syn-file>
120
+ <syn-file
121
+ readonly=""
122
+ droparea=""
123
+ label="This is a label"
124
+ size="medium"
125
+ form=""
126
+ ></syn-file>
127
+ </div>
128
+ ```
129
+
130
+ ---
131
+
108
132
  ## Sizes
109
133
 
110
134
  Use the size attribute to change the component's size.
@@ -94,7 +94,7 @@ Add the password-toggle attribute to add a toggle button that will show the pass
94
94
 
95
95
  ## Readonly Inputs
96
96
 
97
- Add the read-only attribute to draw a read-only input.
97
+ Add the readonly attribute to draw a read-only input.
98
98
 
99
99
  ```html
100
100
  <syn-input
@@ -74,6 +74,27 @@ Use the disabled attribute to disable a radio.
74
74
 
75
75
  ---
76
76
 
77
+ ## Readonly
78
+
79
+ Add the readonly attribute to draw a read-only radio.
80
+
81
+ ```html
82
+ <syn-radio-group value="1" size="medium" form="">
83
+ <syn-radio
84
+ value="1"
85
+ readonly=""
86
+ role="radio"
87
+ tabindex="0"
88
+ aria-disabled="true"
89
+ aria-checked="true"
90
+ size="medium"
91
+ >Read-only content</syn-radio
92
+ >
93
+ </syn-radio-group>
94
+ ```
95
+
96
+ ---
97
+
77
98
  ## Sizes
78
99
 
79
100
  Add the size attribute to the Radio Group to change the radios’ size.
@@ -255,6 +255,52 @@ Radios and radio buttons can be disabled by adding the disabled attribute to the
255
255
 
256
256
  ---
257
257
 
258
+ ## Readonly
259
+
260
+ Add the readonly attribute to a radio to draw it in a readonly state.
261
+
262
+ ```html
263
+ <syn-radio-group
264
+ label="This is a label"
265
+ help-text="This is readonly"
266
+ name="a"
267
+ value="2"
268
+ size="medium"
269
+ form=""
270
+ >
271
+ <syn-radio
272
+ value="1"
273
+ role="radio"
274
+ tabindex="-1"
275
+ aria-disabled="false"
276
+ aria-checked="false"
277
+ size="medium"
278
+ >Option</syn-radio
279
+ >
280
+ <syn-radio
281
+ value="2"
282
+ readonly=""
283
+ role="radio"
284
+ tabindex="0"
285
+ aria-disabled="true"
286
+ aria-checked="true"
287
+ size="medium"
288
+ >Option</syn-radio
289
+ >
290
+ <syn-radio
291
+ value="3"
292
+ role="radio"
293
+ tabindex="-1"
294
+ aria-disabled="false"
295
+ aria-checked="false"
296
+ size="medium"
297
+ >Option</syn-radio
298
+ >
299
+ </syn-radio-group>
300
+ ```
301
+
302
+ ---
303
+
258
304
  ## Sizes
259
305
 
260
306
  The size of Radios and Radio Buttons will be determined by the Radio Group’s size attribute.
@@ -107,6 +107,25 @@ The focus event gives the user feedback that the Range has been focused by the k
107
107
 
108
108
  ---
109
109
 
110
+ ## Readonly
111
+
112
+ Add the readonly attribute to a range to draw it in a readonly state.
113
+
114
+ ```html
115
+ <form>
116
+ <syn-range
117
+ max="100"
118
+ min="0"
119
+ value="50"
120
+ readonly=""
121
+ size="medium"
122
+ form=""
123
+ ></syn-range>
124
+ </form>
125
+ ```
126
+
127
+ ---
128
+
110
129
  ## Sizes
111
130
 
112
131
  Use the size attribute to change a range’s size.
@@ -242,6 +242,87 @@ Use the disabled attribute to disable a select.
242
242
 
243
243
  ---
244
244
 
245
+ ## Readonly
246
+
247
+ Add the readonly attribute to a select to draw it in a readonly state.
248
+
249
+ ```html
250
+ <div
251
+ style="display: flex; flex-direction: column; gap: var(--syn-spacing-large)"
252
+ >
253
+ <syn-select
254
+ placeholder="Readonly"
255
+ value="option-1"
256
+ readonly=""
257
+ size="medium"
258
+ placement="bottom"
259
+ form=""
260
+ >
261
+ <syn-icon
262
+ name="wallpaper"
263
+ slot="prefix"
264
+ aria-hidden="true"
265
+ library="default"
266
+ ></syn-icon>
267
+ <syn-option
268
+ value="option-1"
269
+ role="option"
270
+ aria-selected="true"
271
+ aria-disabled="false"
272
+ >Option 1</syn-option
273
+ >
274
+ <syn-option
275
+ value="option-2"
276
+ role="option"
277
+ aria-selected="false"
278
+ aria-disabled="false"
279
+ >Option 2</syn-option
280
+ >
281
+ <syn-option
282
+ value="option-3"
283
+ role="option"
284
+ aria-selected="false"
285
+ aria-disabled="false"
286
+ >Option 3</syn-option
287
+ >
288
+ </syn-select>
289
+ <syn-select
290
+ max-options-visible="2"
291
+ multiple=""
292
+ placeholder="Readonly"
293
+ value="option-1 option-2 option-3"
294
+ readonly=""
295
+ size="medium"
296
+ placement="bottom"
297
+ form=""
298
+ >
299
+ <syn-option
300
+ value="option-1"
301
+ role="option"
302
+ aria-selected="true"
303
+ aria-disabled="false"
304
+ >Option 1</syn-option
305
+ >
306
+ <syn-option
307
+ value="option-2"
308
+ role="option"
309
+ aria-selected="true"
310
+ aria-disabled="false"
311
+ >Option 2</syn-option
312
+ >
313
+ <syn-option
314
+ value="option-3"
315
+ role="option"
316
+ aria-selected="true"
317
+ aria-disabled="false"
318
+ >Option 3</syn-option
319
+ >
320
+ </syn-select>
321
+ </div>
322
+ ```
323
+
324
+ ---
325
+
245
326
  ## Multiple
246
327
 
247
328
  To allow multiple options to be selected, use the multiple attribute. It’s a good practice to use clearable when this option is enabled. To set multiple values at once, set value to a space-delimited list of values.
@@ -38,6 +38,28 @@ Use the disabled attribute to disable the switch.
38
38
 
39
39
  ---
40
40
 
41
+ ## Readonly
42
+
43
+ Add the readonly attribute to draw a read-only switch.
44
+
45
+ ```html
46
+ <div
47
+ style="
48
+ display: flex;
49
+ gap: var(--syn-spacing-large);
50
+ flex-direction: column;
51
+ align-items: flex-start;
52
+ "
53
+ >
54
+ <syn-switch readonly="" title="" size="medium" form="">Unchecked</syn-switch>
55
+ <syn-switch checked="" readonly="" title="" size="medium" form=""
56
+ >Checked</syn-switch
57
+ >
58
+ </div>
59
+ ```
60
+
61
+ ---
62
+
41
63
  ## Sizes
42
64
 
43
65
  Use the size attribute to change a switch’s size.
@@ -93,7 +93,7 @@ Use the placeholder attribute to add a placeholder.
93
93
 
94
94
  ## Readonly Textareas
95
95
 
96
- Add the read-only attribute to draw a read-only textarea.
96
+ Add the readonly attribute to draw a read-only textarea.
97
97
 
98
98
  ```html
99
99
  <syn-textarea
@@ -142,3 +142,76 @@ Set the trigger attribute to click to toggle the tooltip on click instead of
142
142
  >
143
143
  </syn-tooltip>
144
144
  ```
145
+
146
+ ---
147
+
148
+ ## Manual Trigger
149
+
150
+ Tooltips can be controlled programmatically by setting the trigger attribute to manual. Use the open attribute to control when the tooltip is shown.
151
+
152
+ ```html
153
+ <syn-button style="margin-right: 4rem" title="" variant="outline" size="medium"
154
+ >Toggle Manually</syn-button
155
+ >
156
+ <syn-tooltip
157
+ content="This is an avatar"
158
+ trigger="manual"
159
+ class="manual-tooltip"
160
+ open=""
161
+ >
162
+ <syn-icon-button
163
+ name="person"
164
+ label="Person"
165
+ size="medium"
166
+ color="neutral"
167
+ ></syn-icon-button>
168
+ </syn-tooltip>
169
+ ```
170
+
171
+ ---
172
+
173
+ ## Removing Arrows
174
+
175
+ You can control the size of tooltip arrows by overriding the --syn-tooltip-arrow-size design token. To remove them, set the value to 0 as shown below.
176
+
177
+ ```html
178
+ <syn-tooltip
179
+ content="This is a tooltip"
180
+ style="--syn-tooltip-arrow-size: 0"
181
+ open=""
182
+ >
183
+ <syn-button title="" variant="outline" size="medium">No Arrow</syn-button>
184
+ </syn-tooltip>
185
+ ```
186
+
187
+ ---
188
+
189
+ ## HTML In Tooltips
190
+
191
+ Use the content slot to create tooltips with HTML content. Tooltips are designed only for text and presentational elements. Avoid placing interactive content, such as buttons, links, and form controls, in a tooltip.
192
+
193
+ ```html
194
+ <syn-tooltip open="">
195
+ <div slot="content">
196
+ I'm not <strong>just</strong> a tooltip, I'm a <em>tooltip</em> with HTML!
197
+ </div>
198
+
199
+ <syn-button title="" variant="outline" size="medium">Hover me</syn-button>
200
+ </syn-tooltip>
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Setting A Maximum Width
206
+
207
+ Use the --max-width custom property to change the width the tooltip can grow to before wrapping occurs.
208
+
209
+ ```html
210
+ <syn-tooltip
211
+ style="--max-width: 80px"
212
+ content="This tooltip will wrap after only 80 pixels."
213
+ open=""
214
+ >
215
+ <syn-button title="" variant="outline" size="medium">Hover me</syn-button>
216
+ </syn-tooltip>
217
+ ```
package/package.json CHANGED
@@ -28,12 +28,12 @@
28
28
  "serve-handler": "^6.1.6",
29
29
  "ts-jest": "^29.4.6",
30
30
  "typescript": "^5.9.3",
31
- "@synergy-design-system/components": "3.4.0",
31
+ "@synergy-design-system/docs": "0.1.0",
32
32
  "@synergy-design-system/eslint-config-syn": "^0.1.0",
33
33
  "@synergy-design-system/fonts": "1.0.3",
34
- "@synergy-design-system/docs": "0.1.0",
35
34
  "@synergy-design-system/styles": "2.0.1",
36
- "@synergy-design-system/tokens": "^3.4.0"
35
+ "@synergy-design-system/tokens": "^3.5.0",
36
+ "@synergy-design-system/components": "3.5.0"
37
37
  },
38
38
  "exports": {
39
39
  ".": {
@@ -67,7 +67,7 @@
67
67
  "directory": "packages/mcp"
68
68
  },
69
69
  "type": "module",
70
- "version": "2.6.0",
70
+ "version": "2.7.0",
71
71
  "scripts": {
72
72
  "build": "pnpm run build:ts && pnpm run build:metadata && pnpm build:hash",
73
73
  "build:all": "pnpm run build && pnpm run build:storybook",
@@ -1,86 +0,0 @@
1
- import { css } from 'lit';
2
-
3
- export default css`
4
- .checkbox {
5
- /* #1083: This adds spacing around multi-line labels */
6
- padding: var(--syn-spacing-2x-small) 0;
7
- }
8
-
9
- .checkbox--small {
10
- padding: var(--syn-spacing-3x-small) 0;
11
- }
12
-
13
- .checkbox__control {
14
- border-radius: var(--syn-checkbox-border-radius);
15
-
16
- /* #1083: This adds spacing around multi-line labels */
17
- margin: 0.1em 0;
18
- }
19
-
20
- /* Checked/indeterminate */
21
- .checkbox--checked .checkbox__control,
22
- .checkbox--indeterminate .checkbox__control {
23
- background-color: var(--syn-interactive-emphasis-color);
24
- border-color: var(--syn-interactive-emphasis-color);
25
- }
26
-
27
- :host([data-user-invalid]) .checkbox__control {
28
- background: var(--syn-input-border-color-focus-error);
29
- border-color: var(--syn-input-border-color-focus-error);
30
- }
31
-
32
- /**
33
- * #943: When invalid, use a transparent background if not checked or indeterminate
34
- */
35
- :host([data-user-invalid]:not([checked]):not([indeterminate])) .checkbox__control {
36
- background: transparent;
37
- }
38
-
39
- /** #429: Use token for opacity */
40
- .checkbox--disabled {
41
- opacity: var(--syn-input-disabled-opacity);
42
- }
43
-
44
- /**
45
- * Hover
46
- * Applies the hover state to the whole component
47
- */
48
- .checkbox:not(.checkbox--checked):not(.checkbox--disabled):hover .checkbox__control {
49
- background-color: var(--syn-input-background-color-hover);
50
- border-color: var(--syn-input-border-color-hover);
51
- }
52
-
53
- /**
54
- * Checked/indeterminate + hover
55
- * Applies the hover state to the whole component
56
- */
57
- .checkbox.checkbox--checked:not(.checkbox--disabled):hover .checkbox__control,
58
- .checkbox.checkbox--indeterminate:not(.checkbox--disabled):hover .checkbox__control {
59
- background-color: var(--syn-interactive-emphasis-color-hover);
60
- border-color: var(--syn-interactive-emphasis-color-hover);
61
- }
62
-
63
- /*
64
- * #443: Add active styles
65
- * The checked and unchecked states have different active colors
66
- * Note the fallback is defined to match the hover color.
67
- * This is done to make sure no active state is shown at all if no active color is defined.
68
- * Still better than showing one for the unchecked state but not for the checked state.
69
- */
70
- .checkbox:not(.checkbox--checked):not(.checkbox--disabled):active .checkbox__control {
71
- border-color: var(--syn-input-border-color-active);
72
- }
73
-
74
- /* Checked/indeterminate */
75
- .checkbox.checkbox--checked:not(.checkbox--disabled):active .checkbox__control,
76
- .checkbox.checkbox--indeterminate:not(.checkbox--disabled):active .checkbox__control {
77
- background: var(--syn-interactive-emphasis-color-active);
78
- border-color: var(--syn-interactive-emphasis-color-active);
79
- }
80
-
81
- .checkbox__label {
82
- align-self: center;
83
- line-height: var(--syn-line-height-normal);
84
- margin-inline-start: var(--syn-spacing-x-small);
85
- }
86
- `;
@@ -1,122 +0,0 @@
1
- import { css } from 'lit';
2
- import sharedOptionSize from '../option/option-size.styles.js';
3
-
4
- export default css`
5
-
6
- .combobox__display-input {
7
- flex: 1;
8
- min-width: var(--syn-spacing-2x-large);
9
- width: unset;
10
- }
11
-
12
- .combobox:not(.combobox--disabled) .combobox__display-input {
13
- cursor: text;
14
- }
15
-
16
- .listbox__options ::slotted(syn-option[hidden]),
17
- .listbox__options ::slotted(syn-optgroup[hidden]) {
18
- display: none;
19
- }
20
-
21
- .listbox__no-results {
22
- align-items: center;
23
- color: var(--syn-color-neutral-950);
24
- display: flex;
25
- font: var(--syn-body-medium-regular);
26
- padding: var(--syn-spacing-small) var(--syn-spacing-medium) var(--syn-spacing-small) 52px;
27
- }
28
-
29
- .combobox--small .listbox__no-results {
30
- font-size: var(--syn-input-font-size-small);
31
- min-height: var(--syn-input-height-small);
32
- padding: 0 var(--syn-spacing-small) 0 40px;
33
- }
34
-
35
- .combobox--large .listbox__no-results {
36
- font-size: var(--syn-input-font-size-large);
37
- min-height: var(--syn-input-height-large);
38
- padding: 0 var(--syn-spacing-large) 0 68px;
39
- }
40
-
41
- /* Multi Select */
42
- .combobox__tags {
43
- align-items: center;
44
- display: flex;
45
- flex-wrap: wrap;
46
- margin-inline-start: var(--syn-spacing-2x-small);
47
- }
48
-
49
- .combobox__tags::slotted(syn-tag) {
50
- cursor: pointer !important;
51
- }
52
-
53
- .combobox--disabled .combobox__tags,
54
- .combobox--disabled .combobox__tags::slotted(syn-tag) {
55
- cursor: not-allowed !important;
56
- }
57
-
58
- .combobox--small .combobox__tags {
59
- gap: var(--syn-spacing-2x-small);
60
- }
61
-
62
- .combobox--medium .combobox__tags {
63
- gap: var(--syn-spacing-x-small);
64
- }
65
-
66
- .combobox--large .combobox__tags {
67
- gap: var(--syn-spacing-small);
68
- }
69
-
70
- .combobox--tags-visible.combobox--small .combobox__tags {
71
- margin-inline-end: var(--syn-spacing-x-small);
72
- }
73
-
74
- .combobox--tags-visible.combobox--medium .combobox__tags {
75
- margin-inline-end: var(--syn-input-spacing-small);
76
- }
77
-
78
- .combobox--tags-visible.combobox--large .combobox__tags {
79
- margin-inline-end: var(--syn-input-spacing-medium);
80
- }
81
-
82
- /**
83
- * #850: Allow to measure the size of the combobox.
84
- * This is needed so we can automatically size and truncate the tags in the <syn-combobox multiple> component.
85
- * Scoped to multiple to not break the single select per accident.
86
- * Scoped to when placeholder is not visible to not break the placeholder visualization
87
- */
88
- :host([multiple]) :not(.combobox--placeholder-visible).combobox--tags-visible > .combobox__inputs > .combobox__tags {
89
- min-width: 85px;
90
- overflow: hidden;
91
- }
92
-
93
- :host([multiple]) .combobox__tags > div {
94
- display: contents;
95
- }
96
-
97
- :host([multiple]) .combobox__tags > div > syn-tag {
98
- --syn-tag-position-adjustment: var(--syn-spacing-3x-small);
99
-
100
- max-width: var(--syn-select-tag-max-width);
101
- }
102
-
103
- :host([multiple]) .combobox__tags > div > syn-tag::part(content) {
104
- display: initial;
105
- overflow: hidden;
106
- text-overflow: ellipsis;
107
- white-space: nowrap;
108
- }
109
-
110
- /*
111
- This class is needed to be able to hide the options as long as the popup close animation is running.
112
- As otherwise the listbox would flicker because the options are shown again when the value is reset to empty string.
113
- */
114
- .options__hide {
115
- /* We need to set the slot to something different than display: contents to be able to hide it. Also it should not take any space so we remove the height */
116
- display: block;
117
- height: 0;
118
- opacity: 0;
119
- }
120
-
121
- ${sharedOptionSize}
122
- `;
@@ -1,86 +0,0 @@
1
- import { css } from 'lit';
2
-
3
- export default css`
4
- :host(:focus-visible) .radio__control {
5
- outline: var(--syn-focus-ring);
6
- outline-offset: var(--syn-focus-ring-width);
7
- }
8
-
9
- .radio {
10
- align-items: flex-start;
11
- }
12
-
13
- /** #429: Use token for opacity */
14
- .radio--disabled {
15
- opacity: var(--syn-input-disabled-opacity);
16
- }
17
-
18
- /* Checked */
19
- /* stylelint-disable-next-line no-descending-specificity */
20
- .radio--checked .radio__control {
21
- background-color: var(--syn-interactive-emphasis-color);
22
- border-color: var(--syn-interactive-emphasis-color);
23
- }
24
-
25
- /* Reset original hover */
26
- .radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover {
27
- background: inherit;
28
- border-color: inherit;
29
- }
30
-
31
- /* Checked + hover */
32
- .radio.radio--checked:not(.radio--disabled):hover .radio__control {
33
- background-color: var(--syn-interactive-emphasis-color-hover);
34
- border-color: var(--syn-interactive-emphasis-color-hover);
35
- }
36
-
37
- /* Checked + active */
38
- .radio.radio--checked:not(.radio--disabled):active .radio__control {
39
- background-color: var(--syn-interactive-emphasis-color-active);
40
- border-color: var(--syn-interactive-emphasis-color-active);
41
- }
42
-
43
- /* Not-Checked + Hover */
44
- .radio:not(.radio--checked):not(.radio--disabled):hover .radio__control {
45
- border-color: var(--syn-input-border-color-hover);
46
- }
47
-
48
- /* Not-Checked + active */
49
- .radio:not(.radio--checked):not(.radio--disabled):active .radio__control {
50
- border-color: var(--syn-input-border-color-active);
51
- }
52
-
53
- /* Fix#456: Multi line radio fixes */
54
- .radio__label {
55
- align-self: center;
56
- margin-inline-start: var(--syn-spacing-x-small);
57
- margin-top: -1px;
58
- }
59
-
60
- .radio--small .radio__label {
61
- font: var(--syn-body-small-regular);
62
- }
63
-
64
- .radio--medium .radio__label {
65
- font: var(--syn-body-medium-regular);
66
- }
67
-
68
- .radio--large .radio__label {
69
- font: var(--syn-body-large-regular);
70
- }
71
-
72
- /* /Fix#456 */
73
-
74
- /**
75
- * #920: The new icons are instances in figma.
76
- * The width of the system icon is 12px x 12px, so there is no inner padding.
77
- * To accommodate for this, we need to set the width and height of the icon to 50% to get the same result as before.
78
- */
79
- .radio__checked-icon {
80
- scale: 0.5;
81
- }
82
-
83
- .radio--small .radio__label, .radio--large .radio__label {
84
- margin-inline-start: var(--syn-spacing-x-small);
85
- }
86
- `;
@@ -1,25 +0,0 @@
1
- import { css } from 'lit';
2
-
3
- export default css`
4
- :host([data-user-invalid]) {
5
- --syn-input-border-color: var(--syn-input-border-color-focus-error);
6
- --syn-input-border-color-hover: var(--syn-input-border-color-focus-error);
7
- --syn-color-primary-600: var(--syn-input-border-color-focus-error);
8
- --syn-color-primary-900: var(--syn-color-error-900);
9
- --syn-color-primary-950: var(--syn-color-error-950);
10
- --syn-color-neutral-1000: var(--syn-input-border-color-focus-error);
11
- --syn-interactive-emphasis-color: var(--syn-input-border-color-focus-error);
12
- --syn-interactive-emphasis-color-hover: var(--syn-input-border-color-focus-error);
13
- --syn-interactive-emphasis-color-active: var(--syn-input-border-color-focus-error);
14
- }
15
-
16
- .form-control--has-help-text.form-control--radio-group .form-control__help-text {
17
- margin-top: var(--syn-spacing-x-small);
18
- }
19
-
20
- .form-control-input {
21
- display: flex;
22
- flex-direction: column;
23
- gap: var(--syn-spacing-x-small);
24
- }
25
- `;