@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.
- package/dist/Breadcrumb.svelte +36 -0
- package/dist/Breadcrumb.svelte.d.ts +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/types.d.ts +10 -0
- package/dist/types.js +1 -0
- package/package.json +34 -0
|
@@ -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>
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
package/dist/types.d.ts
ADDED
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
|
+
}
|