@buerokratt-ria/menu 0.2.9 → 0.2.11

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 CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All changes to this project will be documented in this file.
4
4
 
5
+ ## [0.2.11] - 03-03-2026
6
+
7
+ - Added path /api-registry to menu items
8
+
9
+ ## [0.2.10] - 07-01-2026
10
+
11
+ - Added current version environment variable
12
+
5
13
  ## [0.2.9] - 12-11-2025
6
14
 
7
15
  - Added path /anonymizer to menu items
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buerokratt-ria/menu",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Generic MainNavigation component that would be injected as dependency.",
5
5
  "main": "index.js",
6
6
  "scripts": {},
@@ -259,6 +259,13 @@
259
259
  },
260
260
  "path": "/newService"
261
261
  },
262
+ {
263
+ "label": {
264
+ "et": "API varamu",
265
+ "en": "API Registry"
266
+ },
267
+ "path": "/api-registry"
268
+ },
262
269
  {
263
270
  "label": {
264
271
  "et": "Automatic Teenused",
@@ -34,18 +34,23 @@ const MainNavigation: FC<MainNavigationProps> = ({countConf}) => {
34
34
  if (!menuItems) return null;
35
35
 
36
36
  return (
37
- <nav className={clsx('nav', { 'collapsed': navCollapsed })}>
38
- <button className='nav__menu-toggle close-button-item' onClick={handleCloseButtonClick}>
39
- <Icon icon={<MdClose />} />
40
- <span className='menu-item-title'>{t(navCollapsed ? 'mainMenu.openMenu' : 'mainMenu.closeMenu' )}</span>
41
- </button>
42
- <ul className='nav__menu'>
43
- <MenuTree
44
- menuItems={menuItems}
45
- serviceId={serviceId}
46
- handleNavToggle={handleNavToggle}
47
- />
48
- </ul>
37
+ <nav className={clsx("nav", { collapsed: navCollapsed })}>
38
+ <div className="nav__wrapper">
39
+ <button className="nav__menu-toggle close-button-item" onClick={handleCloseButtonClick}>
40
+ <Icon icon={<MdClose />} />
41
+ <span className="menu-item-title">{t(navCollapsed ? "mainMenu.openMenu" : "mainMenu.closeMenu")}</span>
42
+ </button>
43
+
44
+ <div className="nav__content">
45
+ <ul className="nav__menu">
46
+ <MenuTree menuItems={menuItems} serviceId={serviceId} handleNavToggle={handleNavToggle} />
47
+ </ul>
48
+ </div>
49
+
50
+ {import.meta.env.REACT_APP_CURRENT_VERSION && (
51
+ <div className="nav__version-bar">{import.meta.env.REACT_APP_CURRENT_VERSION}</div>
52
+ )}
53
+ </div>
49
54
  </nav>
50
55
  );
51
56
  };
@@ -9,11 +9,32 @@
9
9
  overflow: auto;
10
10
  scrollbar-width: none;
11
11
  transition: width .1s ease-out;
12
+ display: flex;
13
+ height: 100vh;
12
14
 
13
15
  &::-webkit-scrollbar {
14
16
  display: none;
15
17
  }
16
18
 
19
+ &__wrapper {
20
+ flex: 1;
21
+ display: flex;
22
+ flex-direction: column;
23
+ position: relative;
24
+ overflow: hidden;
25
+ }
26
+
27
+ &__content {
28
+ flex: 1;
29
+ overflow-y: auto;
30
+ scrollbar-width: none;
31
+ padding-bottom: 50px;
32
+
33
+ &::-webkit-scrollbar {
34
+ display: none;
35
+ }
36
+ }
37
+
17
38
  li, a, .nav__toggle, .nav__menu-toggle {
18
39
  font-size: 14px;
19
40
  line-height: 1.5;
@@ -113,6 +134,29 @@
113
134
  }
114
135
  }
115
136
  }
137
+
138
+ &__version-bar {
139
+ position: absolute;
140
+ bottom: 0;
141
+ left: 0;
142
+ right: 0;
143
+ height: 50px;
144
+ background-color: get-color(sapphire-blue-10);
145
+ z-index: 100;
146
+ color: white;
147
+ font-size: 14px;
148
+ font-weight: 500;
149
+ padding: 5px 20px;
150
+ overflow: hidden;
151
+ text-overflow: ellipsis;
152
+ display: -webkit-box;
153
+ line-clamp: 2;
154
+ -webkit-line-clamp: 2;
155
+ -webkit-box-orient: vertical;
156
+ word-break: break-all;
157
+ text-align: center;
158
+ border-top: 1px solid get-color(sapphire-blue-14);
159
+ }
116
160
  }
117
161
 
118
162
  .collapsed {