@iroco/ui 1.1.0 → 1.1.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.
@@ -9,7 +9,7 @@
9
9
 
10
10
  const { Story } = defineMeta({
11
11
 
12
- title: 'ImageArticle',
12
+ title: 'Iroco-UI/Components/ImageArticle',
13
13
  component: ImageArticle,
14
14
  argTypes: {
15
15
  reversed: {
@@ -4,7 +4,7 @@
4
4
  import { defineMeta, setTemplate } from '@storybook/addon-svelte-csf';
5
5
 
6
6
  const { Story } = defineMeta({
7
- title: 'NavBar',
7
+ title: 'Iroco-UI/Components/NavBar',
8
8
  component: NavBar,
9
9
  argTypes: {
10
10
  type: {
@@ -1,14 +1,20 @@
1
1
  <script lang="ts">
2
2
  import { IconClose } from './index';
3
3
  import { createEventDispatcher } from 'svelte';
4
- import { NavigationItemType, NavigationItem } from './definition.js';
4
+ import { NavigationItem, NavigationItemType } from './definition.js';
5
5
  import type { MouseEventHandler } from 'svelte/elements';
6
6
 
7
7
  interface Props {
8
8
  navigationItems: Array<NavigationItem>;
9
9
  type: 'sidebar' | 'topbar';
10
10
  version?: string | null;
11
- navigating?: { to: { url: { pathname: string } } } | null;
11
+ navigating?: {
12
+ to: {
13
+ params: Record<string, string> | null
14
+ route: { id: string | null }
15
+ url: URL
16
+ } | null
17
+ } | null;
12
18
  onclick?: MouseEventHandler<HTMLButtonElement>;
13
19
  }
14
20
 
@@ -31,7 +37,7 @@
31
37
  return false;
32
38
  }
33
39
 
34
- let active = $derived(navigating?.to.url.pathname ?? '');
40
+ let active = $derived(navigating?.to?.url.pathname ?? '');
35
41
  </script>
36
42
 
37
43
  <nav data-testid={type} class="nav__{type}">
@@ -41,7 +47,7 @@
41
47
 
42
48
  <ul class="nav__{type}__item-container">
43
49
  {#each navigationItems as item}
44
- <li class="nav__{type}__item" class:active={isActive(active, item)}>
50
+ <li class="nav__{type}__item" class:active={isActive(active, item)} aria-current={isActive(active, item)}>
45
51
  {#if item.type === NavigationItemType.FORM}
46
52
  <form method="POST" action={item.hrefOrCallback}>
47
53
  <button class="iroco-ui-link" type="submit">{item.name}</button>
@@ -6,10 +6,12 @@ interface Props {
6
6
  version?: string | null;
7
7
  navigating?: {
8
8
  to: {
9
- url: {
10
- pathname: string;
9
+ params: Record<string, string> | null;
10
+ route: {
11
+ id: string | null;
11
12
  };
12
- };
13
+ url: URL;
14
+ } | null;
13
15
  } | null;
14
16
  onclick?: MouseEventHandler<HTMLButtonElement>;
15
17
  }
@@ -6,7 +6,7 @@
6
6
  const { Story } = defineMeta({
7
7
 
8
8
 
9
- title: 'Navigation',
9
+ title: 'Iroco-UI/Components/Navigation',
10
10
  component: Navigation,
11
11
  argTypes: {
12
12
  color: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iroco/ui",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Iroco design system based on Svelte",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  "format": "prettier --plugin-search-dir . --write .",
17
17
  "clean": "rm -rf dist && npm cache clean --force",
18
18
  "release": "npm run format && npm run build && release-it --only-version",
19
- "build-storybook": "storybook build"
19
+ "build-storybook": "storybook build --output-dir docs"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@ljcl/storybook-addon-cssprops": "^4.0.0",