@iroco/ui 1.1.4 → 1.1.5

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.
@@ -15,6 +15,7 @@
15
15
  },
16
16
  args: {
17
17
  type: 'topbar',
18
+ currentRoute:"/foo",
18
19
  navigationItems: [
19
20
  new NavigationItem('About', `/about`),
20
21
  new NavigationItem('Foo', `/foo`),
@@ -5,27 +5,27 @@
5
5
 
6
6
  interface Props {
7
7
  baseUrl?: string;
8
- href?: string;
9
8
  navigationItems: Array<NavigationItem>;
10
9
  type?: 'sidebar' | 'topbar';
11
10
  title?: string | null;
12
11
  version?: string | null;
13
12
  color?: Color | string;
14
- currentRoute?:string | null;
13
+ currentRoute?: string | null;
15
14
  }
16
15
 
17
- let showMenu = $state(false);
18
16
 
19
17
  let {
20
18
  baseUrl = '',
21
- href = `${baseUrl}/`,
22
19
  navigationItems,
23
20
  type = 'topbar',
24
- title = null,
25
- version = null,
21
+ title = '',
22
+ version = '',
26
23
  color = Color.green,
27
- currentRoute
24
+ currentRoute = '/foo'
28
25
  }: Props = $props();
26
+
27
+ let showMenu = $state(false);
28
+ let href = $derived(`${baseUrl}/`);
29
29
  </script>
30
30
 
31
31
  <div class="navigation--mobile">
@@ -44,12 +44,12 @@
44
44
 
45
45
  {#if showMenu}
46
46
  <NavBar
47
- on:click_link={() => (showMenu = false)}
48
- on:click={() => (showMenu = false)}
49
- {type}
50
47
  {navigationItems}
51
48
  {currentRoute}
49
+ {type}
52
50
  {version}
51
+ on:click_link={() => (showMenu = false)}
52
+ on:click={() => (showMenu = false)}
53
53
  />
54
54
  {/if}
55
55
  </div>
@@ -63,7 +63,12 @@
63
63
  <h1><a class="navigation__title-link" {href}>{title}</a></h1>
64
64
  {/if}
65
65
  </div>
66
- <NavBar {navigationItems} {type} {version} />
66
+ <NavBar
67
+ {navigationItems}
68
+ {currentRoute}
69
+ {type}
70
+ {version}
71
+ />
67
72
  </div>
68
73
 
69
74
  <style>.container-wide {
@@ -2,7 +2,6 @@ import type { NavigationItem } from './definition';
2
2
  import { Color } from './definition';
3
3
  interface Props {
4
4
  baseUrl?: string;
5
- href?: string;
6
5
  navigationItems: Array<NavigationItem>;
7
6
  type?: 'sidebar' | 'topbar';
8
7
  title?: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iroco/ui",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Iroco design system based on Svelte",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {