@synergy-design-system/mcp 2.7.0 → 2.8.1
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.
- package/CHANGELOG.md +21 -0
- package/metadata/checksum.txt +1 -1
- package/metadata/packages/components/components/syn-alert/component.styles.ts +126 -26
- package/metadata/packages/components/components/syn-alert/component.ts +1 -2
- package/metadata/packages/components/components/syn-dropdown/component.styles.ts +3 -5
- package/metadata/packages/components/components/syn-dropdown/component.ts +1 -2
- package/metadata/packages/components/components/syn-menu/component.styles.ts +23 -6
- package/metadata/packages/components/components/syn-menu/component.ts +1 -2
- package/metadata/packages/components/components/syn-menu-item/component.styles.ts +171 -43
- package/metadata/packages/components/components/syn-menu-item/component.ts +1 -2
- package/metadata/packages/components/components/syn-menu-label/component.styles.ts +17 -7
- package/metadata/packages/components/components/syn-menu-label/component.ts +1 -2
- package/metadata/packages/components/components/syn-popup/component.styles.ts +24 -17
- package/metadata/packages/components/components/syn-popup/component.ts +1 -2
- package/metadata/packages/components/components/syn-tooltip/component.styles.ts +15 -10
- package/metadata/packages/components/components/syn-tooltip/component.ts +13 -5
- package/metadata/packages/components/components/syn-validate/component.angular.ts +9 -0
- package/metadata/packages/components/components/syn-validate/component.react.ts +8 -0
- package/metadata/packages/components/components/syn-validate/component.ts +106 -8
- package/metadata/packages/components/components/syn-validate/component.vue +9 -0
- package/metadata/packages/components/static/CHANGELOG.md +29 -0
- package/metadata/packages/tokens/CHANGELOG.md +13 -0
- package/metadata/packages/tokens/dark.css +1 -1
- package/metadata/packages/tokens/index.js +1 -1
- package/metadata/packages/tokens/light.css +1 -1
- package/metadata/packages/tokens/sick2018_dark.css +1 -1
- package/metadata/packages/tokens/sick2018_light.css +1 -1
- package/metadata/packages/tokens/sick2025_dark.css +1 -1
- package/metadata/packages/tokens/sick2025_light.css +1 -1
- package/metadata/static/components/syn-validate/docs.md +33 -6
- package/package.json +3 -3
- package/metadata/packages/components/components/syn-alert/component.custom.styles.ts +0 -136
- package/metadata/packages/components/components/syn-dropdown/component.custom.styles.ts +0 -5
- package/metadata/packages/components/components/syn-menu/component.custom.styles.ts +0 -29
- package/metadata/packages/components/components/syn-menu-item/component.custom.styles.ts +0 -192
- package/metadata/packages/components/components/syn-menu-label/component.custom.styles.ts +0 -24
- package/metadata/packages/components/components/syn-popup/component.custom.styles.ts +0 -18
- package/metadata/packages/components/components/syn-tooltip/component.custom.styles.ts +0 -13
|
@@ -25,6 +25,33 @@ Validate offers options for convenient error handling in form elements.
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
## Tooltip Variant
|
|
29
|
+
|
|
30
|
+
When the tooltip variant is chosen, validation errors are displayed in a <syn-tooltip> component that has its center at the invalid element. The native tooltip is suppressed.
|
|
31
|
+
|
|
32
|
+
```html
|
|
33
|
+
<form id="components-syn-validate--tooltip-variant-validate-demo-form">
|
|
34
|
+
<syn-validate class="validation-tooltip" variant="tooltip" on="live">
|
|
35
|
+
<syn-input
|
|
36
|
+
label="Invalid input"
|
|
37
|
+
type="email"
|
|
38
|
+
value="team(at)synergy.com"
|
|
39
|
+
required=""
|
|
40
|
+
title=""
|
|
41
|
+
size="medium"
|
|
42
|
+
form=""
|
|
43
|
+
></syn-input>
|
|
44
|
+
</syn-validate>
|
|
45
|
+
<p>
|
|
46
|
+
<syn-button type="submit" title="" variant="outline" size="medium"
|
|
47
|
+
>Submit</syn-button
|
|
48
|
+
>
|
|
49
|
+
</p>
|
|
50
|
+
</form>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
28
55
|
## Inline Variant
|
|
29
56
|
|
|
30
57
|
Set the variant attribute to inline to show the invalid message below the selected element.👨💻 Additional developer Information:Per default, syn-validate uses the browser’s built-in validation. This shows only one error at a time and is optimized for accessbility.When using the inline variant, you have to ensure accessibility on your side and have to have in mind it most likely will lead to layout shifts.
|
|
@@ -33,7 +60,7 @@ Set the variant attribute to inline to show the invalid message below the select
|
|
|
33
60
|
<form id="components-syn-validate--inline-variant-validate-demo-form">
|
|
34
61
|
<syn-validate class="validation-inline" variant="inline" on="">
|
|
35
62
|
<syn-input
|
|
36
|
-
label="Inline
|
|
63
|
+
label="Inline validation"
|
|
37
64
|
type="email"
|
|
38
65
|
value="team(at)synergy.com"
|
|
39
66
|
title=""
|
|
@@ -65,7 +92,7 @@ Use hide-icon to hide the icon in inline style. This is especially useful when s
|
|
|
65
92
|
on=""
|
|
66
93
|
>
|
|
67
94
|
<syn-input
|
|
68
|
-
label="
|
|
95
|
+
label="Hide icon"
|
|
69
96
|
type="email"
|
|
70
97
|
value="team(at)synergy.com"
|
|
71
98
|
title=""
|
|
@@ -95,9 +122,9 @@ In development use the size attribute of the form element e.g. syn-input to set
|
|
|
95
122
|
>
|
|
96
123
|
<syn-validate eager="" variant="inline" on="">
|
|
97
124
|
<syn-input
|
|
98
|
-
label="Inline Validation"
|
|
99
125
|
type="email"
|
|
100
126
|
value="team(at)synergy.com"
|
|
127
|
+
label="Size small"
|
|
101
128
|
size="small"
|
|
102
129
|
title=""
|
|
103
130
|
form=""
|
|
@@ -106,9 +133,9 @@ In development use the size attribute of the form element e.g. syn-input to set
|
|
|
106
133
|
|
|
107
134
|
<syn-validate eager="" variant="inline" on="">
|
|
108
135
|
<syn-input
|
|
109
|
-
label="Inline Validation"
|
|
110
136
|
type="email"
|
|
111
137
|
value="team(at)synergy.com"
|
|
138
|
+
label="Size medium"
|
|
112
139
|
size="medium"
|
|
113
140
|
title=""
|
|
114
141
|
form=""
|
|
@@ -117,9 +144,9 @@ In development use the size attribute of the form element e.g. syn-input to set
|
|
|
117
144
|
|
|
118
145
|
<syn-validate eager="" variant="inline" on="">
|
|
119
146
|
<syn-input
|
|
120
|
-
label="Inline Validation"
|
|
121
147
|
type="email"
|
|
122
148
|
value="team(at)synergy.com"
|
|
149
|
+
label="Size large"
|
|
123
150
|
size="large"
|
|
124
151
|
title=""
|
|
125
152
|
form=""
|
|
@@ -206,7 +233,7 @@ Wrap the element around any other form field, that follows browser standards to
|
|
|
206
233
|
<form id="components-syn-validate--custom-form-field-validate-demo-form">
|
|
207
234
|
<h3 style="margin: 0; padding: 0">Choose SICK´s brand color</h3>
|
|
208
235
|
<syn-validate class="validation-custom-form-field" on="live" variant="inline">
|
|
209
|
-
<validate-demo-radio name="color"></validate-demo-radio>
|
|
236
|
+
<validate-demo-radio name="color" required=""></validate-demo-radio>
|
|
210
237
|
</syn-validate>
|
|
211
238
|
|
|
212
239
|
<p>
|
package/package.json
CHANGED
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"typescript": "^5.9.3",
|
|
31
31
|
"@synergy-design-system/docs": "0.1.0",
|
|
32
32
|
"@synergy-design-system/eslint-config-syn": "^0.1.0",
|
|
33
|
+
"@synergy-design-system/components": "3.6.1",
|
|
33
34
|
"@synergy-design-system/fonts": "1.0.3",
|
|
34
35
|
"@synergy-design-system/styles": "2.0.1",
|
|
35
|
-
"@synergy-design-system/tokens": "^3.
|
|
36
|
-
"@synergy-design-system/components": "3.5.0"
|
|
36
|
+
"@synergy-design-system/tokens": "^3.6.1"
|
|
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.
|
|
70
|
+
"version": "2.8.1",
|
|
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,136 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
.alert {
|
|
5
|
-
/* Defines the used border and icon color for variants */
|
|
6
|
-
--variant-color-border: var(--syn-alert-informative-color-border);
|
|
7
|
-
--variant-color-background: var(--syn-alert-informative-color-background);
|
|
8
|
-
--variant-color-icon: var(--syn-alert-informative-color-icon);
|
|
9
|
-
--variant-color-indicator: var(--syn-alert-informative-color-indicator);
|
|
10
|
-
|
|
11
|
-
/* Defines special settings for sizes */
|
|
12
|
-
--size-font-size: var(--syn-font-size-medium);
|
|
13
|
-
--size-icon-size: var(--syn-font-size-x-large);
|
|
14
|
-
--size-min-height: 54px;
|
|
15
|
-
--size-message-padding: var(--syn-spacing-medium) var(--syn-spacing-large) var(--syn-spacing-medium) var(--syn-spacing-medium);
|
|
16
|
-
--size-icon-padding-block: var(--syn-spacing-medium);
|
|
17
|
-
--size-icon-padding-inline: var(--syn-spacing-medium);
|
|
18
|
-
|
|
19
|
-
background-color: var(--variant-color-background);
|
|
20
|
-
border: var(--syn-panel-border-width) solid var(--variant-color-border);
|
|
21
|
-
border-left: 0;
|
|
22
|
-
border-radius: var(--syn-border-radius-none);
|
|
23
|
-
box-sizing: content-box;
|
|
24
|
-
color: var(--syn-typography-color-text);
|
|
25
|
-
font-size: var(--size-font-size);
|
|
26
|
-
line-height: var(--syn-line-height-normal);
|
|
27
|
-
min-height: var(--size-min-height);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Add back the items left borders
|
|
32
|
-
* This is done to prevent border clipping with the large border-left needed on .alert
|
|
33
|
-
* Note we also need to adjust our paddings to add the border width here
|
|
34
|
-
*/
|
|
35
|
-
.alert::before {
|
|
36
|
-
background: var(--variant-color-indicator);
|
|
37
|
-
bottom: -1px;
|
|
38
|
-
content: "";
|
|
39
|
-
left: 0;
|
|
40
|
-
position: absolute;
|
|
41
|
-
top: -1px;
|
|
42
|
-
width: var(--syn-spacing-2x-small);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.alert :first-child {
|
|
46
|
-
margin-inline-start: var(--syn-spacing-2x-small);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Make sure everything is aligned to top
|
|
51
|
-
*/
|
|
52
|
-
.alert__icon,
|
|
53
|
-
.alert__close-button {
|
|
54
|
-
align-items: flex-start;
|
|
55
|
-
font-size: var(--size-icon-size);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.alert__message {
|
|
59
|
-
align-self: center;
|
|
60
|
-
padding: var(--size-message-padding);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Alert Icon
|
|
65
|
-
*/
|
|
66
|
-
.alert__icon {
|
|
67
|
-
color: var(--variant-color-icon);
|
|
68
|
-
padding-block-start: var(--size-icon-padding-block);
|
|
69
|
-
padding-inline-start: var(--size-icon-padding-inline);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Close Icon
|
|
74
|
-
*/
|
|
75
|
-
.alert__close-button {
|
|
76
|
-
align-self: start; /* #1135: Fix alignment for the close icon */
|
|
77
|
-
color: var(--syn-typography-color-text);
|
|
78
|
-
margin-block: calc(var(--syn-spacing-x-small) - var(--syn-panel-border-width));
|
|
79
|
-
margin-inline-end: var(--syn-spacing-x-small);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Variant colors
|
|
84
|
-
*/
|
|
85
|
-
.alert--success {
|
|
86
|
-
--variant-color-border: var(--syn-alert-success-color-border);
|
|
87
|
-
--variant-color-background: var(--syn-alert-success-color-background);
|
|
88
|
-
--variant-color-icon: var(--syn-alert-success-color-icon);
|
|
89
|
-
--variant-color-indicator: var(--syn-alert-success-color-indicator);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.alert--neutral {
|
|
93
|
-
--variant-color-border: var(--syn-alert-neutral-color-border);
|
|
94
|
-
--variant-color-background: var(--syn-alert-neutral-color-background);
|
|
95
|
-
--variant-color-icon: var(--syn-alert-neutral-color-icon);
|
|
96
|
-
--variant-color-indicator: var(--syn-alert-neutral-color-indicator);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.alert--warning {
|
|
100
|
-
--variant-color-border: var(--syn-alert-warning-color-border);
|
|
101
|
-
--variant-color-background: var(--syn-alert-warning-color-background);
|
|
102
|
-
--variant-color-icon: var(--syn-alert-warning-color-icon);
|
|
103
|
-
--variant-color-indicator: var(--syn-alert-warning-color-indicator);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.alert--danger {
|
|
107
|
-
--variant-color-border: var(--syn-alert-error-color-border);
|
|
108
|
-
--variant-color-background: var(--syn-alert-error-color-background);
|
|
109
|
-
--variant-color-icon: var(--syn-alert-error-color-icon);
|
|
110
|
-
--variant-color-indicator: var(--syn-alert-error-color-indicator);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/* #1119: Alert Sizes */
|
|
114
|
-
.alert--small {
|
|
115
|
-
--size-font-size: var(--syn-font-size-small);
|
|
116
|
-
--size-icon-size: var(--syn-font-size-large);
|
|
117
|
-
--size-min-height: 44px;
|
|
118
|
-
--size-message-padding: var(--syn-spacing-small) var(--syn-spacing-large) var(--syn-spacing-small) var(--syn-spacing-small);
|
|
119
|
-
--size-icon-padding-block: var(--syn-spacing-small);
|
|
120
|
-
--size-icon-padding-inline: var(--syn-spacing-small);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/* Adjust close button size for small alerts */
|
|
124
|
-
.alert--small .alert__close-button {
|
|
125
|
-
font-size: var(--syn-font-size-medium);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.alert--large {
|
|
129
|
-
--size-font-size: var(--syn-font-size-large);
|
|
130
|
-
--size-icon-size: var(--syn-font-size-2x-large);
|
|
131
|
-
--size-min-height: 68px;
|
|
132
|
-
--size-message-padding: var(--syn-spacing-medium-large) var(--syn-spacing-large) var(--syn-spacing-medium-large) var(--syn-spacing-medium-large);
|
|
133
|
-
--size-icon-padding-block: var(--syn-spacing-medium-large);
|
|
134
|
-
--size-icon-padding-inline: var(--syn-spacing-medium-large);
|
|
135
|
-
}
|
|
136
|
-
`;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
:host {
|
|
5
|
-
border-radius: var(--syn-input-border-radius-medium);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/*
|
|
9
|
-
* #368: Hide the checkmarks for menu items
|
|
10
|
-
* when no syn-menu-item[checkbox] or loading is present
|
|
11
|
-
*/
|
|
12
|
-
.menu--no-checkmarks::slotted(syn-menu-item) {
|
|
13
|
-
--display-checkmark: none;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Make sure to hide the syn-divider for the first syn-optgroup
|
|
18
|
-
* Note! ::slotted does currently not work with ::part, so we
|
|
19
|
-
* opted for using a css variable here.
|
|
20
|
-
*/
|
|
21
|
-
::slotted(syn-menu-label:first-of-type) {
|
|
22
|
-
--display-divider: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
::slotted(syn-divider) {
|
|
26
|
-
/* #369: Slotted syn-dividers should use a lighter color so they do not crash with the border visually */
|
|
27
|
-
--color: var(--syn-panel-border-color);
|
|
28
|
-
}
|
|
29
|
-
`;
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
:host {
|
|
5
|
-
/* Custom override for hiding the checkmark in menus it is not needed */
|
|
6
|
-
--display-checkmark: flex;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Default size settings for menu-item
|
|
10
|
-
* This prepares the custom sizes that we will add later on
|
|
11
|
-
* @see https://github.com/synergy-design-system/design/issues/277
|
|
12
|
-
*/
|
|
13
|
-
--menuitem-inset-border-horizontal: var(--syn-spacing-2x-small);
|
|
14
|
-
--menuitem-inset-border-vertical: calc(var(--syn-spacing-x-small) - 1px);
|
|
15
|
-
--menuitem-min-height: var(--syn-input-height-medium);
|
|
16
|
-
--menuitem-padding: var(--syn-input-spacing-medium);
|
|
17
|
-
--menuitem-font-size: var(--syn-input-font-size-medium);
|
|
18
|
-
--menuitem-icon-size: var(--syn-spacing-large);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.menu-item {
|
|
22
|
-
align-items: center;
|
|
23
|
-
|
|
24
|
-
/*
|
|
25
|
-
* #1127: Brand2025 defines a small gap between options
|
|
26
|
-
* and rounded corners. We achieve that using an border
|
|
27
|
-
* that simulates the gap using the menu background color.
|
|
28
|
-
*/
|
|
29
|
-
border: solid var(--syn-panel-background-color);
|
|
30
|
-
|
|
31
|
-
/* Border Radius needs to be increased to cover the outline */
|
|
32
|
-
border-radius: calc(var(--syn-focus-ring-border-radius) + var(--menuitem-inset-border-vertical));
|
|
33
|
-
border-width: var(--menuitem-inset-border-horizontal) var(--menuitem-inset-border-vertical);
|
|
34
|
-
color: var(--syn-option-color);
|
|
35
|
-
font-size: var(--menuitem-font-size);
|
|
36
|
-
|
|
37
|
-
/* Height is dependent on line-height of .option__label, which does not fit completely to layout */
|
|
38
|
-
min-height: var(--menuitem-min-height, var(--syn-input-height-medium));
|
|
39
|
-
padding: 0 calc(var(--menuitem-padding) - var(--menuitem-inset-border-vertical));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
:host(:focus-visible) .menu-item {
|
|
43
|
-
background-color: var(--syn-option-background-color-active);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** #429: Use token for opacity */
|
|
47
|
-
.menu-item.menu-item--disabled {
|
|
48
|
-
opacity: var(--syn-opacity-50);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Handling for slotted prefix and suffix
|
|
53
|
-
*/
|
|
54
|
-
.menu-item .menu-item__prefix::slotted(*) {
|
|
55
|
-
margin-inline-end: var(--syn-spacing-small);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.menu-item .menu-item__suffix::slotted(*) {
|
|
59
|
-
margin-inline-start: var(--syn-spacing-small);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Set the default font size to make icons appear correct
|
|
64
|
-
*/
|
|
65
|
-
.menu-item .menu-item__prefix::slotted(syn-icon),
|
|
66
|
-
.menu-item .menu-item__suffix::slotted(syn-icon) {
|
|
67
|
-
color: var(--syn-option-icon-color);
|
|
68
|
-
font-size: var(--syn-font-size-x-large);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
:host(:hover) .menu-item .menu-item__prefix::slotted(syn-icon),
|
|
72
|
-
:host(:hover) .menu-item__suffix::slotted(syn-icon) {
|
|
73
|
-
color: var(--syn-option-icon-color-hover);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
:host(:focus-visible) .menu-item .menu-item__prefix::slotted(syn-icon),
|
|
77
|
-
:host(:focus-visible) .menu-item .menu-item__suffix::slotted(syn-icon) {
|
|
78
|
-
color: var(--syn-option-icon-color-active);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/* Adjust background and text color for focused elements */
|
|
82
|
-
/* stylelint-disable selector-not-notation, plugin/no-unsupported-browser-features */
|
|
83
|
-
:host(:hover:not([aria-disabled='true'], :focus-visible)) .menu-item,
|
|
84
|
-
.menu-item--submenu-expanded {
|
|
85
|
-
background-color: var(--syn-option-background-color-hover);
|
|
86
|
-
color: var(--syn-option-color-hover);
|
|
87
|
-
}
|
|
88
|
-
/* stylelint-enable selector-not-notation, plugin/no-unsupported-browser-features */
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Adjust the size of icons
|
|
92
|
-
*/
|
|
93
|
-
.menu-item .menu-item__chevron,
|
|
94
|
-
.menu-item .menu-item__check {
|
|
95
|
-
display: var(--display-checkmark);
|
|
96
|
-
font-size: var(--syn-font-size-x-large);
|
|
97
|
-
width: var(--syn-font-size-x-large);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* This makes sure the chevron does not take any space if we do not have children
|
|
102
|
-
*/
|
|
103
|
-
.menu-item .menu-item__chevron {
|
|
104
|
-
display: none;
|
|
105
|
-
margin-inline-start: var(--syn-spacing-small);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.menu-item .menu-item__check {
|
|
109
|
-
color: var(--syn-option-check-color);
|
|
110
|
-
margin-inline-end: var(--syn-spacing-small);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* When in loading state, do not show the checkmark as it would bleed through
|
|
115
|
-
*/
|
|
116
|
-
.menu-item--loading .menu-item__check {
|
|
117
|
-
visibility: hidden;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Make sure the checkbox is also visible when the item is active
|
|
122
|
-
*/
|
|
123
|
-
:host(:focus-visible) .menu-item--checked .menu-item__check {
|
|
124
|
-
color: var(--syn-option-check-color-active);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
:host(:hover) .menu-item--checked .menu-item__check {
|
|
128
|
-
color: var(--syn-option-check-color-hover);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Special handling for the submenu chevron:
|
|
133
|
-
* We are using the "chevron-down" icon per default as
|
|
134
|
-
* we do not want all chevrons to be part of the bundle
|
|
135
|
-
* Therefore, we have to transform it into the right direction
|
|
136
|
-
*/
|
|
137
|
-
.menu-item .menu-item__chevron syn-icon {
|
|
138
|
-
transform: rotate(-90deg);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.menu-item--rtl .menu-item__chevron syn-icon {
|
|
142
|
-
transform: rotate(90deg);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
.menu-item.menu-item--loading *:not(syn-spinner) {
|
|
146
|
-
opacity: var(--syn-opacity-50);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Make sure to show the chevron if there are children
|
|
151
|
-
*/
|
|
152
|
-
.menu-item--has-submenu .menu-item__chevron {
|
|
153
|
-
display: flex;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Adjustments for the spinner in loading state
|
|
158
|
-
*/
|
|
159
|
-
.menu-item--loading syn-spinner {
|
|
160
|
-
--track-width: 2px;
|
|
161
|
-
|
|
162
|
-
color: var(--syn-interactive-emphasis-color);
|
|
163
|
-
font-size: var(--syn-font-size-medium);
|
|
164
|
-
left: calc(var(--menuitem-padding) - var(--menuitem-inset-border-vertical));
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* Highlight checked items
|
|
169
|
-
*/
|
|
170
|
-
.menu-item--checked .menu-item__label {
|
|
171
|
-
font-weight: var(--syn-font-weight-semibold);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/* Needed if we do not show the checkmark */
|
|
175
|
-
:host(:not([type="checkmark"]):not([loading])) .menu-item__label {
|
|
176
|
-
min-height: var(--syn-font-size-x-large);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/* #1131: Make sure that slotted menus do show the correct border radius */
|
|
180
|
-
syn-popup::part(popup) {
|
|
181
|
-
border-radius: var(--syn-input-border-radius-medium);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* #1009: Adjust the position for submenus when they are opened to the left, too.
|
|
186
|
-
* This works because the data-current-placement attribute is set on the popup accordingly.
|
|
187
|
-
* We do not use the actual placement attribute, because it does not update when the placement changes
|
|
188
|
-
*/
|
|
189
|
-
syn-popup[data-current-placement^="left"]::part(popup) {
|
|
190
|
-
margin-left: calc(-1 * var(--submenu-offset));
|
|
191
|
-
}
|
|
192
|
-
`;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
:host {
|
|
5
|
-
--display-divider: block;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.menu-label__divider {
|
|
9
|
-
--spacing: 0;
|
|
10
|
-
|
|
11
|
-
display: var(--display-divider);
|
|
12
|
-
margin-bottom: var(--syn-spacing-x-small);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.menu-label {
|
|
16
|
-
color: var(--syn-input-color);
|
|
17
|
-
font-family: var(--syn-font-sans);
|
|
18
|
-
font-size: var(--syn-font-size-medium);
|
|
19
|
-
font-weight: var(--syn-font-weight-semibold);
|
|
20
|
-
letter-spacing: var(--syn-letter-spacing-normal);
|
|
21
|
-
line-height: var(--syn-line-height-normal);
|
|
22
|
-
padding: var(--syn-spacing-small) var(--syn-spacing-medium);
|
|
23
|
-
}
|
|
24
|
-
`;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
.popup {
|
|
5
|
-
/* Clear UA styles for [popover] */
|
|
6
|
-
:where(&) {
|
|
7
|
-
background: unset;
|
|
8
|
-
border: unset;
|
|
9
|
-
color: unset;
|
|
10
|
-
height: unset;
|
|
11
|
-
inset: unset;
|
|
12
|
-
margin: unset;
|
|
13
|
-
overflow: unset;
|
|
14
|
-
padding: unset;
|
|
15
|
-
width: unset;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
`;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
export default css`
|
|
4
|
-
/* Write custom CSS here */
|
|
5
|
-
.tooltip__body {
|
|
6
|
-
box-shadow: var(--syn-shadow-large);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/** #640: Adjust the zIndex of the arrow to make sure the box-shadow above does not bleed out */
|
|
10
|
-
:host ::part(arrow) {
|
|
11
|
-
z-index: 0 !important;
|
|
12
|
-
}
|
|
13
|
-
`;
|