@entur-partner/common 11.0.0-alpha.0 → 11.0.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/ErrorBoundary.d.ts +1 -1
- package/dist/RouteLeavingGuard.d.ts +1 -1
- package/dist/common.cjs.development.js +88 -117
- package/dist/common.cjs.development.js.map +1 -1
- package/dist/common.cjs.production.min.js +1 -1
- package/dist/common.cjs.production.min.js.map +1 -1
- package/dist/common.esm.js +89 -118
- package/dist/common.esm.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/styles.css +66 -137
- package/dist/{UserMenu/index.d.ts → user-menu/UserMenu.d.ts} +4 -11
- package/dist/user-menu/components/CookieSettingsMenuItem.d.ts +7 -0
- package/dist/{UserMenu → user-menu}/components/CustomOverflowMenu.d.ts +0 -1
- package/dist/{UserMenu → user-menu}/components/CustomOverflowMenuItem.d.ts +0 -1
- package/dist/user-menu/components/LocaleSwitchMenuItem.d.ts +7 -0
- package/dist/user-menu/components/LogOutMenuItem.d.ts +7 -0
- package/dist/user-menu/components/UserMenuItem.d.ts +7 -0
- package/dist/{UserMenu → user-menu}/components/VersionMenuItem.d.ts +2 -2
- package/dist/user-menu/components/useOutsideClick.d.ts +2 -0
- package/package.json +11 -8
- package/dist/BetaTopNavigation.d.ts +0 -9
- package/dist/UserMenu/components/CookieSettingsMenuItem.d.ts +0 -9
- package/dist/UserMenu/components/LanguageSwitchMenuItem.d.ts +0 -10
- package/dist/UserMenu/components/LogOutMenuItem.d.ts +0 -9
- package/dist/UserMenu/components/UserMenuItem.d.ts +0 -9
- package/dist/UserMenu/useOutsideClick.d.ts +0 -2
package/dist/styles.css
CHANGED
|
@@ -1,67 +1,5 @@
|
|
|
1
|
-
@import '@entur/loader/dist/styles.css';
|
|
2
1
|
/* DO NOT CHANGE!*/
|
|
3
2
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
4
|
-
.top-navigation {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
position: fixed;
|
|
8
|
-
top: 0;
|
|
9
|
-
left: 0;
|
|
10
|
-
padding-inline: 2.5rem;
|
|
11
|
-
justify-content: flex-start;
|
|
12
|
-
border-bottom: 0.125rem solid var(--designentur-header-default-divider);
|
|
13
|
-
background: #292b6a;
|
|
14
|
-
width: 100%;
|
|
15
|
-
height: 5rem;
|
|
16
|
-
z-index: 20;
|
|
17
|
-
transition: margin-left 0.1s ease-out;
|
|
18
|
-
gap: 1.5rem;
|
|
19
|
-
}
|
|
20
|
-
.top-navigation .eds-top-navigation-item {
|
|
21
|
-
color: white;
|
|
22
|
-
}
|
|
23
|
-
.top-navigation .eds-top-navigation-item:hover {
|
|
24
|
-
color: white;
|
|
25
|
-
}
|
|
26
|
-
.top-navigation .eds-top-navigation-item--active {
|
|
27
|
-
color: white;
|
|
28
|
-
font-weight: bold;
|
|
29
|
-
}
|
|
30
|
-
.top-navigation--frontpage {
|
|
31
|
-
border-bottom: none;
|
|
32
|
-
}
|
|
33
|
-
.top-navigation__logo {
|
|
34
|
-
margin-right: 1.5rem;
|
|
35
|
-
}
|
|
36
|
-
.top-navigation__logo:focus-visible {
|
|
37
|
-
outline: none;
|
|
38
|
-
box-shadow: 0 0 0 0.125rem #ffffff, 0 0 0 0.25rem #181c56;
|
|
39
|
-
outline-offset: 0.125rem;
|
|
40
|
-
}
|
|
41
|
-
.top-navigation__actions {
|
|
42
|
-
margin-left: auto;
|
|
43
|
-
display: flex;
|
|
44
|
-
align-items: center;
|
|
45
|
-
}
|
|
46
|
-
.top-navigation__button {
|
|
47
|
-
color: #ffffff;
|
|
48
|
-
}
|
|
49
|
-
.top-navigation__button:hover {
|
|
50
|
-
color: #292b6a;
|
|
51
|
-
}
|
|
52
|
-
@media screen and (max-width: 1108px) {
|
|
53
|
-
.top-navigation {
|
|
54
|
-
padding-inline: 1.5rem;
|
|
55
|
-
}
|
|
56
|
-
.top-navigation .eds-top-navigation-item {
|
|
57
|
-
font-size: 14px;
|
|
58
|
-
padding: 0.75rem;
|
|
59
|
-
}
|
|
60
|
-
.top-navigation__logo {
|
|
61
|
-
margin-right: 1.5rem;
|
|
62
|
-
}
|
|
63
|
-
}/* DO NOT CHANGE!*/
|
|
64
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
65
3
|
/* DO NOT CHANGE!*/
|
|
66
4
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
67
5
|
.eps-action-bar {
|
|
@@ -96,19 +34,8 @@
|
|
|
96
34
|
height: 100px;
|
|
97
35
|
}/* DO NOT CHANGE!*/
|
|
98
36
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
99
|
-
.
|
|
100
|
-
|
|
101
|
-
margin-top: 1rem;
|
|
102
|
-
font-size: 0.875rem;
|
|
103
|
-
}
|
|
104
|
-
.ep-audit-info > div {
|
|
105
|
-
display: flex;
|
|
106
|
-
justify-content: space-between;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.ep-audit-info-label {
|
|
110
|
-
margin-right: 3rem;
|
|
111
|
-
font-weight: 600;
|
|
37
|
+
.eps-confirm-modal-content {
|
|
38
|
+
margin-bottom: 1rem;
|
|
112
39
|
}/* DO NOT CHANGE!*/
|
|
113
40
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
114
41
|
/* DO NOT CHANGE!*/
|
|
@@ -2355,12 +2282,21 @@
|
|
|
2355
2282
|
|
|
2356
2283
|
.eps-bg-lavender {
|
|
2357
2284
|
background-color: #aeb7e2;
|
|
2358
|
-
}ol.eds-breadcrumbs {
|
|
2359
|
-
padding: 0;
|
|
2360
2285
|
}/* DO NOT CHANGE!*/
|
|
2361
2286
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2362
|
-
.
|
|
2363
|
-
|
|
2287
|
+
.ep-audit-info {
|
|
2288
|
+
float: right;
|
|
2289
|
+
margin-top: 1rem;
|
|
2290
|
+
font-size: 0.875rem;
|
|
2291
|
+
}
|
|
2292
|
+
.ep-audit-info > div {
|
|
2293
|
+
display: flex;
|
|
2294
|
+
justify-content: space-between;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
.ep-audit-info-label {
|
|
2298
|
+
margin-right: 3rem;
|
|
2299
|
+
font-weight: 600;
|
|
2364
2300
|
}/* DO NOT CHANGE!*/
|
|
2365
2301
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2366
2302
|
/* DO NOT CHANGE!*/
|
|
@@ -2372,15 +2308,6 @@
|
|
|
2372
2308
|
.eps-content {
|
|
2373
2309
|
margin: 1.5rem 1.5rem 1.5rem 22rem;
|
|
2374
2310
|
}
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
.eps-public-content {
|
|
2378
|
-
padding-top: 5rem;
|
|
2379
|
-
}
|
|
2380
|
-
@media screen and (min-width: 50rem) {
|
|
2381
|
-
.eps-public-content {
|
|
2382
|
-
margin-left: 12rem;
|
|
2383
|
-
}
|
|
2384
2311
|
}/* DO NOT CHANGE!*/
|
|
2385
2312
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2386
2313
|
.eps-logo-wrapper {
|
|
@@ -2389,6 +2316,8 @@
|
|
|
2389
2316
|
.eps-logo-wrapper .logo {
|
|
2390
2317
|
height: auto;
|
|
2391
2318
|
width: 170px;
|
|
2319
|
+
}ol.eds-breadcrumbs {
|
|
2320
|
+
padding: 0;
|
|
2392
2321
|
}/* DO NOT CHANGE!*/
|
|
2393
2322
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2394
2323
|
.eps-language-select {
|
|
@@ -2401,17 +2330,22 @@
|
|
|
2401
2330
|
margin-left: 0.125rem;
|
|
2402
2331
|
}/* DO NOT CHANGE!*/
|
|
2403
2332
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
border: none;
|
|
2411
|
-
padding: 0;
|
|
2333
|
+
/* DO NOT CHANGE!*/
|
|
2334
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2335
|
+
.eps-menu {
|
|
2336
|
+
position: relative;
|
|
2337
|
+
width: 100%;
|
|
2338
|
+
z-index: 30;
|
|
2412
2339
|
}
|
|
2413
|
-
|
|
2414
|
-
|
|
2340
|
+
@media screen and (min-width: 50rem) {
|
|
2341
|
+
.eps-menu {
|
|
2342
|
+
left: 0;
|
|
2343
|
+
top: 0;
|
|
2344
|
+
position: fixed;
|
|
2345
|
+
height: 100vh;
|
|
2346
|
+
width: 20rem;
|
|
2347
|
+
overflow-y: scroll;
|
|
2348
|
+
}
|
|
2415
2349
|
}.multi-language-input:focus {
|
|
2416
2350
|
outline: none;
|
|
2417
2351
|
}/* DO NOT CHANGE!*/
|
|
@@ -2437,6 +2371,29 @@ button.eps-link-button:hover {
|
|
|
2437
2371
|
background: #1a8e60;
|
|
2438
2372
|
}/* DO NOT CHANGE!*/
|
|
2439
2373
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2374
|
+
button.eps-link-button {
|
|
2375
|
+
cursor: pointer;
|
|
2376
|
+
}
|
|
2377
|
+
button.eps-link-button, button.eps-link-button:hover, button.eps-link-button:focus, button.eps-link-button:active:focus, button.eps-link-button:active:hover, button.eps-link-button:active {
|
|
2378
|
+
background: none;
|
|
2379
|
+
background-color: inherit;
|
|
2380
|
+
border: none;
|
|
2381
|
+
padding: 0;
|
|
2382
|
+
}
|
|
2383
|
+
button.eps-link-button:hover {
|
|
2384
|
+
color: #aeb7e2;
|
|
2385
|
+
}.eps-unbutton, .eps-unbutton:hover, .eps-unbutton:focus, .eps-unbutton:active:focus, .eps-unbutton:active:hover, .eps-unbutton:active {
|
|
2386
|
+
background: none;
|
|
2387
|
+
background-color: inherit;
|
|
2388
|
+
color: inherit;
|
|
2389
|
+
border: none;
|
|
2390
|
+
padding: 0;
|
|
2391
|
+
font: inherit;
|
|
2392
|
+
outline: inherit;
|
|
2393
|
+
height: inherit;
|
|
2394
|
+
min-width: inherit;
|
|
2395
|
+
}/* DO NOT CHANGE!*/
|
|
2396
|
+
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2440
2397
|
/* DO NOT CHANGE!*/
|
|
2441
2398
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2442
2399
|
.eps-font-size-extraSmall {
|
|
@@ -2711,16 +2668,17 @@ button.eps-link-button:hover {
|
|
|
2711
2668
|
|
|
2712
2669
|
.eps-font-weight-heading {
|
|
2713
2670
|
font-weight: 1rem;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2671
|
+
}:root {
|
|
2672
|
+
--eps-common: 1;
|
|
2673
|
+
}
|
|
2674
|
+
|
|
2675
|
+
main .eds-table--sticky-header--active .eds-table__head,
|
|
2676
|
+
.app-shell-content .eds-table--sticky-header--active .eds-table__head {
|
|
2677
|
+
z-index: 1;
|
|
2678
|
+
}
|
|
2679
|
+
.epp-environment-banner ~ main .eds-table--sticky-header--active .eds-table__head,
|
|
2680
|
+
.epp-environment-banner ~ .app-shell-content .eds-table--sticky-header--active .eds-table__head {
|
|
2681
|
+
top: 1rem;
|
|
2724
2682
|
}/* DO NOT CHANGE!*/
|
|
2725
2683
|
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2726
2684
|
/**
|
|
@@ -2813,33 +2771,4 @@ button.eps-link-button:hover {
|
|
|
2813
2771
|
#eps-overflow-menu .eps-overflow-menu__item {
|
|
2814
2772
|
border-radius: 0.25rem;
|
|
2815
2773
|
border: solid 0.0625rem #54568c;
|
|
2816
|
-
}/* DO NOT CHANGE!*/
|
|
2817
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2818
|
-
/* DO NOT CHANGE!*/
|
|
2819
|
-
/* This file is automatically generated from @entur/tokens! Changes will be overwritten. */
|
|
2820
|
-
.eps-menu {
|
|
2821
|
-
position: relative;
|
|
2822
|
-
width: 100%;
|
|
2823
|
-
z-index: 30;
|
|
2824
|
-
}
|
|
2825
|
-
@media screen and (min-width: 50rem) {
|
|
2826
|
-
.eps-menu {
|
|
2827
|
-
left: 0;
|
|
2828
|
-
top: 0;
|
|
2829
|
-
position: fixed;
|
|
2830
|
-
height: 100vh;
|
|
2831
|
-
width: 20rem;
|
|
2832
|
-
overflow-y: scroll;
|
|
2833
|
-
}
|
|
2834
|
-
}:root {
|
|
2835
|
-
--eps-common: 1;
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
main .eds-table--sticky-header--active .eds-table__head,
|
|
2839
|
-
.app-shell-content .eds-table--sticky-header--active .eds-table__head {
|
|
2840
|
-
z-index: 1;
|
|
2841
|
-
}
|
|
2842
|
-
.epp-environment-banner ~ main .eds-table--sticky-header--active .eds-table__head,
|
|
2843
|
-
.epp-environment-banner ~ .app-shell-content .eds-table--sticky-header--active .eds-table__head {
|
|
2844
|
-
top: 1rem;
|
|
2845
2774
|
}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import "./index.scss";
|
|
1
|
+
import "./UserMenu.scss";
|
|
3
2
|
import { type FC } from "react";
|
|
4
3
|
import type { Environment } from "../environment";
|
|
5
4
|
interface UserMenuProps {
|
|
6
5
|
userName: string;
|
|
7
|
-
messages: {
|
|
8
|
-
logout: string;
|
|
9
|
-
switchLanguage: string;
|
|
10
|
-
appVersion?: string;
|
|
11
|
-
myProfile?: string;
|
|
12
|
-
cookieSettings?: string;
|
|
13
|
-
};
|
|
14
6
|
onLogout: () => void;
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
onLocaleChange: (locale: "nb-NO" | "en-GB") => void;
|
|
8
|
+
locale: "nb-NO" | "en-GB";
|
|
17
9
|
className?: string;
|
|
18
10
|
environment?: Environment;
|
|
19
11
|
showVersionItem?: boolean;
|
|
@@ -21,6 +13,7 @@ interface UserMenuProps {
|
|
|
21
13
|
showCookieSettingsItem?: boolean;
|
|
22
14
|
onNavigateToMyProfile: () => void;
|
|
23
15
|
onCookieSettingsOpen?: () => void;
|
|
16
|
+
onVersionItemClick?: () => void;
|
|
24
17
|
}
|
|
25
18
|
export declare const UserMenu: FC<UserMenuProps>;
|
|
26
19
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entur-partner/common",
|
|
3
|
-
"version": "11.0.0
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/common.esm.js",
|
|
@@ -33,19 +33,22 @@
|
|
|
33
33
|
"@entur/tooltip": ">=2.4.7 <6.0.0",
|
|
34
34
|
"react": ">=18.0.0",
|
|
35
35
|
"react-dom": ">=18.0.0",
|
|
36
|
-
"react-router-dom": "
|
|
36
|
+
"react-router-dom": ">=6.30.1"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@entur-partner/util": "^1.3.
|
|
40
|
-
"classnames": "^2.
|
|
39
|
+
"@entur-partner/util": "^1.3.6",
|
|
40
|
+
"classnames": "^2.5.1"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@entur-partner/permission-client-node": "3.
|
|
44
|
-
"@entur/tokens": "3.
|
|
43
|
+
"@entur-partner/permission-client-node": "3.6.1",
|
|
44
|
+
"@entur/tokens": "3.22.1",
|
|
45
45
|
"identity-obj-proxy": "3.0.0",
|
|
46
|
-
"react-router-dom": "
|
|
46
|
+
"react-router-dom": "7.13.0"
|
|
47
47
|
},
|
|
48
48
|
"jest": {
|
|
49
|
+
"setupFilesAfterEnv": [
|
|
50
|
+
"./jest-setup.js"
|
|
51
|
+
],
|
|
49
52
|
"moduleNameMapper": {
|
|
50
53
|
"\\.(css|less|sass|scss)$": "identity-obj-proxy"
|
|
51
54
|
},
|
|
@@ -58,5 +61,5 @@
|
|
|
58
61
|
"reportFile": "jest-sonar-report.xml",
|
|
59
62
|
"indent": 4
|
|
60
63
|
},
|
|
61
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b167f46c19c7ae5949e8df86b375eb56067dbbc8"
|
|
62
65
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "./BetaTopNavigation.scss";
|
|
2
|
-
import React, { FC, ReactNode } from "react";
|
|
3
|
-
interface BetaTopNavigationProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
as?: "nav" | React.ElementType;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const BetaTopNavigation: FC<BetaTopNavigationProps>;
|
|
9
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "../index.scss";
|
|
2
|
-
import React from "react";
|
|
3
|
-
type Props = {
|
|
4
|
-
name: string;
|
|
5
|
-
setOpen: (open: boolean) => void;
|
|
6
|
-
onCookieSettingsOpen: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const CookieSettingsMenuItem: ({ name, setOpen, onCookieSettingsOpen, }: Props) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "../index.scss";
|
|
2
|
-
import React from "react";
|
|
3
|
-
type Props = {
|
|
4
|
-
language: string;
|
|
5
|
-
onLanguageChange: (language: string) => void;
|
|
6
|
-
setOpen: (open: boolean) => void;
|
|
7
|
-
name: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const LanguageSwitchMenuItem: ({ language, onLanguageChange, setOpen, name, }: Props) => React.JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import "../index.scss";
|
|
2
|
-
import React from "react";
|
|
3
|
-
type Props = {
|
|
4
|
-
name: string;
|
|
5
|
-
setOpen: (open: boolean) => void;
|
|
6
|
-
onNavigateToMyProfile: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const UserMenuItem: ({ name, setOpen, onNavigateToMyProfile, }: Props) => React.JSX.Element;
|
|
9
|
-
export {};
|