@lumen-design/breadcrumb 0.0.2

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.
@@ -0,0 +1,36 @@
1
+ <script lang="ts">
2
+ import Icon from '@lumen-design/icon'
3
+ import type { BreadcrumbProps } from './types'
4
+
5
+ interface Props extends BreadcrumbProps {}
6
+
7
+ let { items, separator = '/' }: Props = $props()
8
+ </script>
9
+
10
+ <ul class="lm-breadcrumb">
11
+ {#each items as item, index}
12
+ <li class="lm-breadcrumb__item">
13
+ {#if item.href}
14
+ <a href={item.href} class="lm-breadcrumb__link">
15
+ {#if item.icon}
16
+ <Icon icon={item.icon} class="lm-breadcrumb__icon" />
17
+ {/if}
18
+ {item.label}
19
+ </a>
20
+ {:else}
21
+ <span class="lm-breadcrumb__text">
22
+ {#if item.icon}
23
+ <Icon icon={item.icon} class="lm-breadcrumb__icon" />
24
+ {/if}
25
+ {item.label}
26
+ </span>
27
+ {/if}
28
+ </li>
29
+ {#if index < items.length - 1}
30
+ <li class="lm-breadcrumb__separator">{separator}</li>
31
+ {/if}
32
+ {/each}
33
+ </ul>
34
+
35
+ <style lang="scss">
36
+ </style>
@@ -0,0 +1,6 @@
1
+ import type { BreadcrumbProps } from './types';
2
+ interface Props extends BreadcrumbProps {
3
+ }
4
+ declare const Breadcrumb: import("svelte").Component<Props, {}, "">;
5
+ type Breadcrumb = ReturnType<typeof Breadcrumb>;
6
+ export default Breadcrumb;
@@ -0,0 +1,4 @@
1
+ import Breadcrumb from './Breadcrumb.svelte';
2
+ export { Breadcrumb };
3
+ export type { BreadcrumbItem, BreadcrumbProps } from './types';
4
+ export default Breadcrumb;
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import Breadcrumb from './Breadcrumb.svelte';
2
+ export { Breadcrumb };
3
+ export default Breadcrumb;
@@ -0,0 +1,10 @@
1
+ import type { IconNode } from 'lucide';
2
+ export interface BreadcrumbItem {
3
+ label: string;
4
+ href?: string;
5
+ icon?: IconNode;
6
+ }
7
+ export interface BreadcrumbProps {
8
+ items: BreadcrumbItem[];
9
+ separator?: string;
10
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@lumen-design/breadcrumb",
3
+ "version": "0.0.2",
4
+ "description": "Breadcrumb component for Lumen UI",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.js",
8
+ "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "svelte": "./dist/index.js",
13
+ "import": "./dist/index.js"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "svelte-package -i src -o dist --types",
21
+ "build:watch": "svelte-package -i src -o dist --types -w"
22
+ },
23
+ "devDependencies": {
24
+ "@sveltejs/package": "^2.5.7",
25
+ "svelte": "5.48.2"
26
+ },
27
+ "peerDependencies": {
28
+ "svelte": "^5.0.0"
29
+ },
30
+ "dependencies": {
31
+ "@lumen-design/icon": "0.0.2",
32
+ "lucide": "^0.563.0"
33
+ }
34
+ }