@entur/menu 7.1.1 → 7.2.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.
- package/dist/beta/cjs/SideNavigation/SideNavigation.cjs +13 -9
- package/dist/beta/cjs/SideNavigation/SideNavigation.cjs.map +1 -1
- package/dist/beta/cjs/SideNavigation/SideNavigationExpandableItem.cjs +27 -9
- package/dist/beta/cjs/SideNavigation/SideNavigationExpandableItem.cjs.map +1 -1
- package/dist/beta/cjs/SideNavigation/SideNavigationItem.cjs.map +1 -1
- package/dist/beta/cjs/SideNavigation/SideNavigationItemContent.cjs +9 -4
- package/dist/beta/cjs/SideNavigation/SideNavigationItemContent.cjs.map +1 -1
- package/dist/beta/cjs/SideNavigation/warnOnMixedIcons.cjs +50 -0
- package/dist/beta/cjs/SideNavigation/warnOnMixedIcons.cjs.map +1 -0
- package/dist/beta/esm/SideNavigation/SideNavigation.mjs +13 -9
- package/dist/beta/esm/SideNavigation/SideNavigation.mjs.map +1 -1
- package/dist/beta/esm/SideNavigation/SideNavigationExpandableItem.mjs +27 -9
- package/dist/beta/esm/SideNavigation/SideNavigationExpandableItem.mjs.map +1 -1
- package/dist/beta/esm/SideNavigation/SideNavigationItem.mjs.map +1 -1
- package/dist/beta/esm/SideNavigation/SideNavigationItemContent.mjs +9 -4
- package/dist/beta/esm/SideNavigation/SideNavigationItemContent.mjs.map +1 -1
- package/dist/beta/esm/SideNavigation/warnOnMixedIcons.mjs +50 -0
- package/dist/beta/esm/SideNavigation/warnOnMixedIcons.mjs.map +1 -0
- package/dist/beta/styles/index.css +148 -173
- package/dist/beta/types/SideNavigation/SideNavigationExpandableItem.d.ts +10 -2
- package/dist/beta/types/SideNavigation/SideNavigationItem.d.ts +1 -1
- package/dist/beta/types/SideNavigation/SideNavigationItemContent.d.ts +4 -0
- package/dist/beta/types/SideNavigation/warnOnMixedIcons.d.ts +6 -0
- package/dist/styles.css +49 -278
- package/package.json +9 -9
|
@@ -1,79 +1,85 @@
|
|
|
1
|
-
/* Hand-written until the "
|
|
1
|
+
/* Hand-written until the "Side Navigation beta" side navigation
|
|
2
2
|
* variables ship in @entur/tokens. When they do, delete this file and rely on
|
|
3
3
|
* the generated ../componentVariables.scss instead.
|
|
4
4
|
* Source: Entur UI Library, node 26271-19314. */
|
|
5
5
|
[data-color-mode=light],
|
|
6
6
|
:root{
|
|
7
|
-
--components-menu-
|
|
8
|
-
--components-menu-
|
|
9
|
-
--components-menu-
|
|
10
|
-
--components-menu-
|
|
11
|
-
--components-menu-
|
|
12
|
-
--components-menu-
|
|
13
|
-
--components-menu-
|
|
14
|
-
--components-menu-
|
|
15
|
-
--components-menu-
|
|
16
|
-
--components-menu-
|
|
17
|
-
--components-menu-
|
|
18
|
-
--components-menu-
|
|
19
|
-
--components-menu-
|
|
20
|
-
--components-menu-
|
|
21
|
-
--components-menu-
|
|
22
|
-
--components-menu-
|
|
23
|
-
--components-menu-
|
|
24
|
-
--components-menu-
|
|
25
|
-
--components-menu-
|
|
26
|
-
--components-menu-
|
|
27
|
-
--components-menu-
|
|
28
|
-
--components-menu-
|
|
29
|
-
--components-menu-
|
|
30
|
-
--components-menu-
|
|
31
|
-
--components-menu-
|
|
32
|
-
--components-menu-
|
|
7
|
+
--components-menu-sidenavigationbeta-standard-fill-default:rgba(255, 255, 255, 0);
|
|
8
|
+
--components-menu-sidenavigationbeta-standard-fill-hover:#d9dae8;
|
|
9
|
+
--components-menu-sidenavigationbeta-standard-fill-click:#aeb7e2;
|
|
10
|
+
--components-menu-sidenavigationbeta-standard-fill-active:#eaeaf1;
|
|
11
|
+
--components-menu-sidenavigationbeta-standard-fill-disabled:rgba(255, 255, 255, 0);
|
|
12
|
+
--components-menu-sidenavigationbeta-standard-text:#181c56;
|
|
13
|
+
--components-menu-sidenavigationbeta-standard-text-disabled:#6e6f73;
|
|
14
|
+
--components-menu-sidenavigationbeta-standard-text-group:#626493;
|
|
15
|
+
--components-menu-sidenavigationbeta-standard-icon:#181c56;
|
|
16
|
+
--components-menu-sidenavigationbeta-standard-icon-subdued:#626493;
|
|
17
|
+
--components-menu-sidenavigationbeta-standard-icon-disabled:#6e6f73;
|
|
18
|
+
--components-menu-sidenavigationbeta-standard-stroke-active:#181c56;
|
|
19
|
+
--components-menu-sidenavigationbeta-standard-stroke-submenu-indicator-default:#e5e5e9;
|
|
20
|
+
--components-menu-sidenavigationbeta-standard-alert:#d31b1b;
|
|
21
|
+
--components-menu-sidenavigationbeta-contrast-fill-default:rgba(255, 255, 255, 0);
|
|
22
|
+
--components-menu-sidenavigationbeta-contrast-fill-hover:#626493;
|
|
23
|
+
--components-menu-sidenavigationbeta-contrast-fill-click:#8794d4;
|
|
24
|
+
--components-menu-sidenavigationbeta-contrast-fill-active:#393d79;
|
|
25
|
+
--components-menu-sidenavigationbeta-contrast-fill-disabled:rgba(255, 255, 255, 0);
|
|
26
|
+
--components-menu-sidenavigationbeta-contrast-text:#ffffff;
|
|
27
|
+
--components-menu-sidenavigationbeta-contrast-text-disabled:#b6b8ba;
|
|
28
|
+
--components-menu-sidenavigationbeta-contrast-text-group:#d9dae8;
|
|
29
|
+
--components-menu-sidenavigationbeta-contrast-icon:#ffffff;
|
|
30
|
+
--components-menu-sidenavigationbeta-contrast-icon-subdued:#aeb7e2;
|
|
31
|
+
--components-menu-sidenavigationbeta-contrast-icon-disabled:#b6b8ba;
|
|
32
|
+
--components-menu-sidenavigationbeta-contrast-stroke-active:#ffffff;
|
|
33
|
+
--components-menu-sidenavigationbeta-contrast-stroke-submenu-indicator-default:#8284ab;
|
|
34
|
+
--components-menu-sidenavigationbeta-contrast-alert:#ff5959;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
[data-color-mode=dark]{
|
|
36
|
-
--components-menu-
|
|
37
|
-
--components-menu-
|
|
38
|
-
--components-menu-
|
|
39
|
-
--components-menu-
|
|
40
|
-
--components-menu-
|
|
41
|
-
--components-menu-
|
|
42
|
-
--components-menu-
|
|
43
|
-
--components-menu-
|
|
44
|
-
--components-menu-
|
|
45
|
-
--components-menu-
|
|
46
|
-
--components-menu-
|
|
47
|
-
--components-menu-
|
|
48
|
-
--components-menu-
|
|
49
|
-
--components-menu-
|
|
50
|
-
--components-menu-
|
|
51
|
-
--components-menu-
|
|
52
|
-
--components-menu-
|
|
53
|
-
--components-menu-
|
|
54
|
-
--components-menu-
|
|
55
|
-
--components-menu-
|
|
56
|
-
--components-menu-
|
|
57
|
-
--components-menu-
|
|
58
|
-
--components-menu-
|
|
59
|
-
--components-menu-
|
|
60
|
-
--components-menu-
|
|
61
|
-
--components-menu-
|
|
38
|
+
--components-menu-sidenavigationbeta-standard-fill-default:rgba(255, 255, 255, 0);
|
|
39
|
+
--components-menu-sidenavigationbeta-standard-fill-hover:rgba(229, 229, 233, 0.1490196078);
|
|
40
|
+
--components-menu-sidenavigationbeta-standard-fill-click:rgba(229, 229, 233, 0.1490196078);
|
|
41
|
+
--components-menu-sidenavigationbeta-standard-fill-active:#525360;
|
|
42
|
+
--components-menu-sidenavigationbeta-standard-fill-disabled:rgba(255, 255, 255, 0);
|
|
43
|
+
--components-menu-sidenavigationbeta-standard-text:#e5e5e9;
|
|
44
|
+
--components-menu-sidenavigationbeta-standard-text-disabled:#949699;
|
|
45
|
+
--components-menu-sidenavigationbeta-standard-text-group:#b3b4bd;
|
|
46
|
+
--components-menu-sidenavigationbeta-standard-icon:#e5e5e9;
|
|
47
|
+
--components-menu-sidenavigationbeta-standard-icon-subdued:#e5e5e9;
|
|
48
|
+
--components-menu-sidenavigationbeta-standard-icon-disabled:#949699;
|
|
49
|
+
--components-menu-sidenavigationbeta-standard-stroke-active:#e3e6e8;
|
|
50
|
+
--components-menu-sidenavigationbeta-standard-stroke-submenu-indicator-default:#81828f;
|
|
51
|
+
--components-menu-sidenavigationbeta-standard-alert:#ff9494;
|
|
52
|
+
--components-menu-sidenavigationbeta-contrast-fill-default:rgba(255, 255, 255, 0);
|
|
53
|
+
--components-menu-sidenavigationbeta-contrast-fill-hover:rgba(229, 229, 233, 0.1490196078);
|
|
54
|
+
--components-menu-sidenavigationbeta-contrast-fill-click:rgba(229, 229, 233, 0.1490196078);
|
|
55
|
+
--components-menu-sidenavigationbeta-contrast-fill-active:#525360;
|
|
56
|
+
--components-menu-sidenavigationbeta-contrast-fill-disabled:rgba(255, 255, 255, 0);
|
|
57
|
+
--components-menu-sidenavigationbeta-contrast-text:#e5e5e9;
|
|
58
|
+
--components-menu-sidenavigationbeta-contrast-text-disabled:#949699;
|
|
59
|
+
--components-menu-sidenavigationbeta-contrast-text-group:#b3b4bd;
|
|
60
|
+
--components-menu-sidenavigationbeta-contrast-icon:#e5e5e9;
|
|
61
|
+
--components-menu-sidenavigationbeta-contrast-icon-subdued:#e5e5e9;
|
|
62
|
+
--components-menu-sidenavigationbeta-contrast-icon-disabled:#949699;
|
|
63
|
+
--components-menu-sidenavigationbeta-contrast-stroke-active:#e3e6e8;
|
|
64
|
+
--components-menu-sidenavigationbeta-contrast-stroke-submenu-indicator-default:#81828f;
|
|
65
|
+
--components-menu-sidenavigationbeta-contrast-alert:#ff9494;
|
|
62
66
|
}.eds-side-navigation-beta{
|
|
63
|
-
--eds-side-navigation-beta-fill-default:var(--components-menu-
|
|
64
|
-
--eds-side-navigation-beta-fill-hover:var(--components-menu-
|
|
65
|
-
--eds-side-navigation-beta-fill-click:var(--components-menu-
|
|
66
|
-
--eds-side-navigation-beta-fill-active:var(--components-menu-
|
|
67
|
-
--eds-side-navigation-beta-fill-disabled:var(--components-menu-
|
|
68
|
-
--eds-side-navigation-beta-text:var(--components-menu-
|
|
69
|
-
--eds-side-navigation-beta-text-disabled:var(--components-menu-
|
|
70
|
-
--eds-side-navigation-beta-text-group:var(--components-menu-
|
|
71
|
-
--eds-side-navigation-beta-icon:var(--components-menu-
|
|
72
|
-
--eds-side-navigation-beta-icon-subdued:var(--components-menu-
|
|
73
|
-
--eds-side-navigation-beta-icon-disabled:var(--components-menu-
|
|
74
|
-
--eds-side-navigation-beta-stroke-active:var(--components-menu-
|
|
75
|
-
--eds-side-navigation-beta-
|
|
67
|
+
--eds-side-navigation-beta-fill-default:var(--components-menu-sidenavigationbeta-standard-fill-default);
|
|
68
|
+
--eds-side-navigation-beta-fill-hover:var(--components-menu-sidenavigationbeta-standard-fill-hover);
|
|
69
|
+
--eds-side-navigation-beta-fill-click:var(--components-menu-sidenavigationbeta-standard-fill-click);
|
|
70
|
+
--eds-side-navigation-beta-fill-active:var(--components-menu-sidenavigationbeta-standard-fill-active);
|
|
71
|
+
--eds-side-navigation-beta-fill-disabled:var(--components-menu-sidenavigationbeta-standard-fill-disabled);
|
|
72
|
+
--eds-side-navigation-beta-text:var(--components-menu-sidenavigationbeta-standard-text);
|
|
73
|
+
--eds-side-navigation-beta-text-disabled:var(--components-menu-sidenavigationbeta-standard-text-disabled);
|
|
74
|
+
--eds-side-navigation-beta-text-group:var(--components-menu-sidenavigationbeta-standard-text-group);
|
|
75
|
+
--eds-side-navigation-beta-icon:var(--components-menu-sidenavigationbeta-standard-icon);
|
|
76
|
+
--eds-side-navigation-beta-icon-subdued:var(--components-menu-sidenavigationbeta-standard-icon-subdued);
|
|
77
|
+
--eds-side-navigation-beta-icon-disabled:var(--components-menu-sidenavigationbeta-standard-icon-disabled);
|
|
78
|
+
--eds-side-navigation-beta-stroke-active:var(--components-menu-sidenavigationbeta-standard-stroke-active);
|
|
79
|
+
--eds-side-navigation-beta-stroke-submenu-indicator:var(--components-menu-sidenavigationbeta-standard-stroke-submenu-indicator-default);
|
|
80
|
+
--eds-side-navigation-beta-alert:var(--components-menu-sidenavigationbeta-standard-alert);
|
|
76
81
|
--eds-side-navigation-beta-focus:var(--basecolors-stroke-focus-standard);
|
|
82
|
+
max-width:var(--eds-side-navigation-max-width, 20rem);
|
|
77
83
|
list-style:none;
|
|
78
84
|
margin:0;
|
|
79
85
|
padding:0;
|
|
@@ -81,19 +87,20 @@
|
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
:where(.eds-contrast) .eds-side-navigation-beta{
|
|
84
|
-
--eds-side-navigation-beta-fill-default:var(--components-menu-
|
|
85
|
-
--eds-side-navigation-beta-fill-hover:var(--components-menu-
|
|
86
|
-
--eds-side-navigation-beta-fill-click:var(--components-menu-
|
|
87
|
-
--eds-side-navigation-beta-fill-active:var(--components-menu-
|
|
88
|
-
--eds-side-navigation-beta-fill-disabled:var(--components-menu-
|
|
89
|
-
--eds-side-navigation-beta-text:var(--components-menu-
|
|
90
|
-
--eds-side-navigation-beta-text-disabled:var(--components-menu-
|
|
91
|
-
--eds-side-navigation-beta-text-group:var(--components-menu-
|
|
92
|
-
--eds-side-navigation-beta-icon:var(--components-menu-
|
|
93
|
-
--eds-side-navigation-beta-icon-subdued:var(--components-menu-
|
|
94
|
-
--eds-side-navigation-beta-icon-disabled:var(--components-menu-
|
|
95
|
-
--eds-side-navigation-beta-stroke-active:var(--components-menu-
|
|
96
|
-
--eds-side-navigation-beta-
|
|
90
|
+
--eds-side-navigation-beta-fill-default:var(--components-menu-sidenavigationbeta-contrast-fill-default);
|
|
91
|
+
--eds-side-navigation-beta-fill-hover:var(--components-menu-sidenavigationbeta-contrast-fill-hover);
|
|
92
|
+
--eds-side-navigation-beta-fill-click:var(--components-menu-sidenavigationbeta-contrast-fill-click);
|
|
93
|
+
--eds-side-navigation-beta-fill-active:var(--components-menu-sidenavigationbeta-contrast-fill-active);
|
|
94
|
+
--eds-side-navigation-beta-fill-disabled:var(--components-menu-sidenavigationbeta-contrast-fill-disabled);
|
|
95
|
+
--eds-side-navigation-beta-text:var(--components-menu-sidenavigationbeta-contrast-text);
|
|
96
|
+
--eds-side-navigation-beta-text-disabled:var(--components-menu-sidenavigationbeta-contrast-text-disabled);
|
|
97
|
+
--eds-side-navigation-beta-text-group:var(--components-menu-sidenavigationbeta-contrast-text-group);
|
|
98
|
+
--eds-side-navigation-beta-icon:var(--components-menu-sidenavigationbeta-contrast-icon);
|
|
99
|
+
--eds-side-navigation-beta-icon-subdued:var(--components-menu-sidenavigationbeta-contrast-icon-subdued);
|
|
100
|
+
--eds-side-navigation-beta-icon-disabled:var(--components-menu-sidenavigationbeta-contrast-icon-disabled);
|
|
101
|
+
--eds-side-navigation-beta-stroke-active:var(--components-menu-sidenavigationbeta-contrast-stroke-active);
|
|
102
|
+
--eds-side-navigation-beta-stroke-submenu-indicator:var(--components-menu-sidenavigationbeta-contrast-stroke-submenu-indicator-default);
|
|
103
|
+
--eds-side-navigation-beta-alert:var(--components-menu-sidenavigationbeta-contrast-alert);
|
|
97
104
|
--eds-side-navigation-beta-focus:var(--basecolors-stroke-focus-contrast);
|
|
98
105
|
}
|
|
99
106
|
|
|
@@ -104,10 +111,15 @@
|
|
|
104
111
|
padding:0;
|
|
105
112
|
}
|
|
106
113
|
|
|
114
|
+
.eds-side-navigation-beta__submenu{
|
|
115
|
+
padding-inline:var(--eds-side-navigation-padding-inline-start, 1.5rem) 1.5rem;
|
|
116
|
+
-webkit-padding-after:0.75rem;
|
|
117
|
+
padding-block-end:0.75rem;
|
|
118
|
+
}
|
|
119
|
+
|
|
107
120
|
.eds-side-navigation-beta__group-title{
|
|
108
121
|
display:block;
|
|
109
|
-
padding-block:
|
|
110
|
-
padding-inline:1.5rem 1.5rem;
|
|
122
|
+
padding-block:1.5rem 0.5rem;
|
|
111
123
|
padding-inline:var(--eds-side-navigation-padding-inline-start, 1.5rem) 1.5rem;
|
|
112
124
|
color:var(--eds-side-navigation-beta-text-group);
|
|
113
125
|
font-size:0.75rem;
|
|
@@ -120,27 +132,17 @@
|
|
|
120
132
|
-webkit-appearance:none;
|
|
121
133
|
-moz-appearance:none;
|
|
122
134
|
appearance:none;
|
|
123
|
-
|
|
124
|
-
-moz-box-sizing:border-box;
|
|
125
|
-
box-sizing:border-box;
|
|
126
|
-
display:-webkit-box;
|
|
127
|
-
display:-webkit-flex;
|
|
128
|
-
display:-moz-box;
|
|
135
|
+
box-sizing:border-box;
|
|
129
136
|
display:flex;
|
|
130
|
-
-
|
|
131
|
-
-webkit-align-items:center;
|
|
132
|
-
-moz-box-align:center;
|
|
133
|
-
align-items:center;
|
|
137
|
+
align-items:center;
|
|
134
138
|
gap:1rem;
|
|
135
139
|
width:100%;
|
|
136
140
|
min-height:3rem;
|
|
137
141
|
padding-block:0.75rem;
|
|
138
|
-
padding-inline:1.5rem 1.5rem;
|
|
139
142
|
padding-inline:var(--eds-side-navigation-padding-inline-start, 1.5rem) 1.5rem;
|
|
140
143
|
border:0;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
border-radius:0;
|
|
144
|
+
border-radius:0;
|
|
145
|
+
box-shadow:inset 0.125rem 0 0 transparent;
|
|
144
146
|
background-color:var(--eds-side-navigation-beta-fill-default);
|
|
145
147
|
color:var(--eds-side-navigation-beta-text);
|
|
146
148
|
font-family:inherit;
|
|
@@ -151,45 +153,46 @@
|
|
|
151
153
|
-webkit-text-decoration:none;
|
|
152
154
|
text-decoration:none;
|
|
153
155
|
cursor:pointer;
|
|
156
|
+
transition:box-shadow 0.2s ease-out;
|
|
154
157
|
}
|
|
155
|
-
|
|
156
|
-
:where(.eds-side-navigation-beta__submenu) .eds-side-navigation-beta__click-target{
|
|
157
|
-
-webkit-padding-start:-webkit-calc(1.5rem + 1.5rem);
|
|
158
|
-
-moz-padding-start:-moz-calc(1.5rem + 1.5rem);
|
|
159
|
-
padding-inline-start:calc(1.5rem + 1.5rem);
|
|
160
|
-
-webkit-padding-start:-webkit-calc(var(--eds-side-navigation-padding-inline-start, 1.5rem) + 1.5rem);
|
|
161
|
-
-moz-padding-start:-moz-calc(var(--eds-side-navigation-padding-inline-start, 1.5rem) + 1.5rem);
|
|
162
|
-
padding-inline-start:calc(var(--eds-side-navigation-padding-inline-start, 1.5rem) + 1.5rem);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.eds-side-navigation-beta__click-target--active{
|
|
166
|
-
-webkit-box-shadow:inset 0.25rem 0 0 var(--eds-side-navigation-beta-stroke-active);
|
|
167
|
-
-moz-box-shadow:inset 0.25rem 0 0 var(--eds-side-navigation-beta-stroke-active);
|
|
168
|
-
box-shadow:inset 0.25rem 0 0 var(--eds-side-navigation-beta-stroke-active);
|
|
169
|
-
background-color:var(--eds-side-navigation-beta-fill-active);
|
|
170
|
-
font-weight:600;
|
|
171
|
-
line-height:1.25rem;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.eds-side-navigation-beta__click-target:where([disabled]){
|
|
158
|
+
.eds-side-navigation-beta__click-target[disabled]{
|
|
175
159
|
background-color:var(--eds-side-navigation-beta-fill-disabled);
|
|
176
160
|
color:var(--eds-side-navigation-beta-text-disabled);
|
|
177
161
|
cursor:not-allowed;
|
|
178
162
|
}
|
|
179
|
-
|
|
180
163
|
.eds-side-navigation-beta__click-target:not(:where([disabled])):hover{
|
|
181
164
|
background-color:var(--eds-side-navigation-beta-fill-hover);
|
|
182
165
|
}
|
|
183
|
-
|
|
184
166
|
.eds-side-navigation-beta__click-target:not(:where([disabled])):active{
|
|
185
167
|
background-color:var(--eds-side-navigation-beta-fill-click);
|
|
186
168
|
}
|
|
187
|
-
|
|
188
169
|
.eds-side-navigation-beta__click-target:not(:where([disabled])):focus-visible{
|
|
189
170
|
outline:2px solid #181c56;
|
|
190
171
|
outline-color:var(--eds-side-navigation-beta-focus);
|
|
191
172
|
outline-offset:-0.125rem;
|
|
192
173
|
}
|
|
174
|
+
@media (prefers-reduced-motion: reduce){
|
|
175
|
+
.eds-side-navigation-beta__click-target{
|
|
176
|
+
transition:none;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
:where(.eds-side-navigation-beta__submenu) .eds-side-navigation-beta__click-target{
|
|
181
|
+
box-shadow:inset 0.125rem 0 0 var(--eds-side-navigation-beta-stroke-submenu-indicator);
|
|
182
|
+
padding-inline:1.5rem 1rem;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.eds-side-navigation-beta__click-target--active{
|
|
186
|
+
box-shadow:inset 0.125rem 0 0 var(--eds-side-navigation-beta-stroke-active);
|
|
187
|
+
background-color:var(--eds-side-navigation-beta-fill-active);
|
|
188
|
+
font-weight:600;
|
|
189
|
+
line-height:1.25rem;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.eds-side-navigation-beta__click-target--active:where(.eds-side-navigation-beta__click-target--open){
|
|
193
|
+
box-shadow:inset 0.125rem 0 0 transparent;
|
|
194
|
+
background-color:var(--eds-side-navigation-beta-fill-default);
|
|
195
|
+
}
|
|
193
196
|
|
|
194
197
|
:where(.eds-side-navigation-beta__click-target[disabled]) .eds-side-navigation-beta__icon,
|
|
195
198
|
:where(.eds-side-navigation-beta__click-target[disabled]) .eds-side-navigation-beta__chevron{
|
|
@@ -197,32 +200,17 @@
|
|
|
197
200
|
}
|
|
198
201
|
|
|
199
202
|
.eds-side-navigation-beta__label{
|
|
200
|
-
display:-webkit-box;
|
|
201
|
-
display:-webkit-flex;
|
|
202
|
-
display:-moz-box;
|
|
203
203
|
display:flex;
|
|
204
|
-
|
|
205
|
-
-
|
|
206
|
-
-moz-box-flex:1;
|
|
207
|
-
flex:1 1 auto;
|
|
208
|
-
-webkit-box-align:center;
|
|
209
|
-
-webkit-align-items:center;
|
|
210
|
-
-moz-box-align:center;
|
|
211
|
-
align-items:center;
|
|
204
|
+
flex:1 1 auto;
|
|
205
|
+
align-items:center;
|
|
212
206
|
gap:0.75rem;
|
|
213
207
|
min-width:0;
|
|
214
208
|
}
|
|
215
209
|
|
|
216
210
|
.eds-side-navigation-beta__label-text{
|
|
217
|
-
display:-webkit-box;
|
|
218
|
-
display:-webkit-flex;
|
|
219
|
-
display:-moz-box;
|
|
220
211
|
display:flex;
|
|
221
|
-
-
|
|
222
|
-
|
|
223
|
-
-moz-box-align:center;
|
|
224
|
-
align-items:center;
|
|
225
|
-
gap:0.75rem;
|
|
212
|
+
align-items:center;
|
|
213
|
+
gap:0.5rem;
|
|
226
214
|
min-width:0;
|
|
227
215
|
}
|
|
228
216
|
|
|
@@ -233,70 +221,57 @@
|
|
|
233
221
|
-webkit-box-orient:vertical;
|
|
234
222
|
-webkit-line-clamp:2;
|
|
235
223
|
line-clamp:2;
|
|
236
|
-
|
|
224
|
+
overflow-wrap:break-word;
|
|
237
225
|
}
|
|
238
226
|
|
|
239
227
|
.eds-side-navigation-beta__icon{
|
|
240
|
-
display:-webkit-inline-box;
|
|
241
|
-
display:-webkit-inline-flex;
|
|
242
|
-
display:-moz-inline-box;
|
|
243
228
|
display:inline-flex;
|
|
244
|
-
|
|
245
|
-
-webkit-flex:none;
|
|
246
|
-
-moz-box-flex:0;
|
|
247
|
-
flex:none;
|
|
229
|
+
flex:none;
|
|
248
230
|
color:var(--eds-side-navigation-beta-icon);
|
|
249
231
|
}
|
|
250
|
-
|
|
251
232
|
.eds-side-navigation-beta__icon :where(svg){
|
|
252
233
|
width:1rem;
|
|
253
234
|
height:1rem;
|
|
254
235
|
}
|
|
255
236
|
|
|
256
237
|
.eds-side-navigation-beta__badge{
|
|
257
|
-
display:-webkit-inline-box;
|
|
258
|
-
display:-webkit-inline-flex;
|
|
259
|
-
display:-moz-inline-box;
|
|
260
238
|
display:inline-flex;
|
|
261
|
-
|
|
262
|
-
-webkit-flex:none;
|
|
263
|
-
-moz-box-flex:0;
|
|
264
|
-
flex:none;
|
|
239
|
+
flex:none;
|
|
265
240
|
}
|
|
266
241
|
|
|
267
242
|
.eds-side-navigation-beta__alert{
|
|
268
243
|
display:block;
|
|
269
|
-
|
|
270
|
-
-webkit-flex:none;
|
|
271
|
-
-moz-box-flex:0;
|
|
272
|
-
flex:none;
|
|
244
|
+
flex:none;
|
|
273
245
|
width:0.5rem;
|
|
274
246
|
height:0.5rem;
|
|
275
|
-
|
|
276
|
-
-moz-border-radius:50%;
|
|
277
|
-
border-radius:50%;
|
|
247
|
+
border-radius:50%;
|
|
278
248
|
background-color:var(--eds-side-navigation-beta-alert);
|
|
249
|
+
transition:opacity 0.2s ease-out, visibility 0.2s;
|
|
250
|
+
}
|
|
251
|
+
@media (prefers-reduced-motion: reduce){
|
|
252
|
+
.eds-side-navigation-beta__alert{
|
|
253
|
+
transition:none;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.eds-side-navigation-beta__alert--faded{
|
|
258
|
+
visibility:hidden;
|
|
259
|
+
opacity:0;
|
|
279
260
|
}
|
|
280
261
|
|
|
281
262
|
.eds-side-navigation-beta__chevron{
|
|
282
|
-
|
|
283
|
-
-webkit-flex:none;
|
|
284
|
-
-moz-box-flex:0;
|
|
285
|
-
flex:none;
|
|
263
|
+
flex:none;
|
|
286
264
|
width:1rem;
|
|
287
265
|
height:1rem;
|
|
288
266
|
color:var(--eds-side-navigation-beta-icon-subdued);
|
|
289
|
-
-webkit-transition:-webkit-transform 0.2s ease-out;
|
|
290
|
-
transition:-webkit-transform 0.2s ease-out;
|
|
291
|
-
-o-transition:-o-transform 0.2s ease-out;
|
|
292
|
-
-moz-transition:transform 0.2s ease-out, -moz-transform 0.2s ease-out;
|
|
293
267
|
transition:transform 0.2s ease-out;
|
|
294
|
-
|
|
268
|
+
}
|
|
269
|
+
@media (prefers-reduced-motion: reduce){
|
|
270
|
+
.eds-side-navigation-beta__chevron{
|
|
271
|
+
transition:none;
|
|
272
|
+
}
|
|
295
273
|
}
|
|
296
274
|
|
|
297
275
|
.eds-side-navigation-beta__chevron--open{
|
|
298
|
-
|
|
299
|
-
-moz-transform:rotate(-180deg);
|
|
300
|
-
-o-transform:rotate(-180deg);
|
|
301
|
-
transform:rotate(-180deg);
|
|
276
|
+
transform:rotate(-180deg);
|
|
302
277
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { SideNavigationItemContentProps } from './SideNavigationItemContent';
|
|
3
|
-
export type SideNavigationExpandableItemProps = Omit<React.ComponentPropsWithoutRef<'li'>, 'title' | 'onToggle'> & Omit<SideNavigationItemContentProps, 'children'> & {
|
|
3
|
+
export type SideNavigationExpandableItemProps = Omit<React.ComponentPropsWithoutRef<'li'>, 'title' | 'onToggle'> & Omit<SideNavigationItemContentProps, 'children' | 'alert' | 'alertFaded'> & {
|
|
4
4
|
/** Etiketten til det ekspanderbare elementet */
|
|
5
5
|
title: React.ReactNode;
|
|
6
6
|
/** Undermenyen */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/** Marker elementet som gjeldende side */
|
|
9
9
|
active?: boolean;
|
|
10
|
+
/** Vis en varselprikk selv om ingen menyelementer i undermenyen har
|
|
11
|
+
* `alert`. Prikken vises uansett bare når undermenyen er lukket – er den
|
|
12
|
+
* åpen, viser menyelementene sine egne prikker */
|
|
13
|
+
alert?: boolean;
|
|
10
14
|
/** Deaktiver elementet */
|
|
11
15
|
disabled?: boolean;
|
|
12
16
|
/** Om undermenyen er åpen. Gjør komponenten kontrollert */
|
|
@@ -21,13 +25,17 @@ export type SideNavigationExpandableItemProps = Omit<React.ComponentPropsWithout
|
|
|
21
25
|
/** Ekstra klassenavn */
|
|
22
26
|
className?: string;
|
|
23
27
|
};
|
|
24
|
-
export declare const SideNavigationExpandableItem: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "title" | "onToggle"> & Omit<SideNavigationItemContentProps, "children"> & {
|
|
28
|
+
export declare const SideNavigationExpandableItem: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "title" | "onToggle"> & Omit<SideNavigationItemContentProps, "children" | "alert" | "alertFaded"> & {
|
|
25
29
|
/** Etiketten til det ekspanderbare elementet */
|
|
26
30
|
title: React.ReactNode;
|
|
27
31
|
/** Undermenyen */
|
|
28
32
|
children: React.ReactNode;
|
|
29
33
|
/** Marker elementet som gjeldende side */
|
|
30
34
|
active?: boolean;
|
|
35
|
+
/** Vis en varselprikk selv om ingen menyelementer i undermenyen har
|
|
36
|
+
* `alert`. Prikken vises uansett bare når undermenyen er lukket – er den
|
|
37
|
+
* åpen, viser menyelementene sine egne prikker */
|
|
38
|
+
alert?: boolean;
|
|
31
39
|
/** Deaktiver elementet */
|
|
32
40
|
disabled?: boolean;
|
|
33
41
|
/** Om undermenyen er åpen. Gjør komponenten kontrollert */
|
|
@@ -2,7 +2,7 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { PolymorphicComponentProps } from '@entur/utils';
|
|
3
3
|
import { SideNavigationItemContentProps } from './SideNavigationItemContent';
|
|
4
4
|
declare const defaultElement = "a";
|
|
5
|
-
export type SideNavigationItemOwnProps = SideNavigationItemContentProps & {
|
|
5
|
+
export type SideNavigationItemOwnProps = Omit<SideNavigationItemContentProps, 'alertFaded'> & {
|
|
6
6
|
/** Marker elementet som gjeldende side */
|
|
7
7
|
active?: boolean;
|
|
8
8
|
/** Deaktiver elementet. Rendres da som en deaktivert knapp */
|
|
@@ -6,6 +6,10 @@ export type SideNavigationItemContentProps = {
|
|
|
6
6
|
badge?: React.ReactNode;
|
|
7
7
|
/** Viser en varselprikk ytterst til høyre */
|
|
8
8
|
alert?: boolean;
|
|
9
|
+
/** Behold plassen til varselprikken, men ton den ut. Brukes av
|
|
10
|
+
* ExpandableItem når undermenyen er åpen og menyelementene viser sine egne
|
|
11
|
+
* prikker */
|
|
12
|
+
alertFaded?: boolean;
|
|
9
13
|
/** Tekst som leses opp for varselprikken
|
|
10
14
|
* @default 'Varsel'
|
|
11
15
|
*/
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Warns when only some of the items on one level have an icon. `level`
|
|
3
|
+
* describes where, e.g. `the top level` or `the submenu "Sales"`. */
|
|
4
|
+
export declare const warnOnMixedIcons: (children: React.ReactNode, level: string) => void;
|
|
5
|
+
/** For tests only. */
|
|
6
|
+
export declare const resetMixedIconWarnings: () => void;
|