flowbite-svelte 0.15.18 → 0.15.19
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 +7 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +2 -1
- package/sidebars/Sidebar.svelte +2 -22
- package/sidebars/Sidebar.svelte.d.ts +4 -3
- package/sidebars/SidebarItem.svelte +28 -0
- package/sidebars/SidebarItem.svelte.d.ts +18 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.19](https://github.com/themesberg/flowbite-svelte/compare/v0.15.18...v0.15.19) (2022-05-10)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add SidebarItem to Sidebar component ([a3a9654](https://github.com/themesberg/flowbite-svelte/commit/a3a965498817449cc90bdb20d9babe4f000e4466))
|
|
11
|
+
|
|
5
12
|
### [0.15.18](https://github.com/themesberg/flowbite-svelte/compare/v0.15.17...v0.15.18) (2022-05-10)
|
|
6
13
|
|
|
7
14
|
### [0.15.17](https://github.com/themesberg/flowbite-svelte/compare/v0.15.16...v0.15.17) (2022-05-09)
|
package/index.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export { default as Rating } from './ratings/Rating.svelte';
|
|
|
64
64
|
export { default as AdvancedRating } from './ratings/AdvancedRating.svelte';
|
|
65
65
|
export { default as ScoreRating } from './ratings/ScoreRating.svelte';
|
|
66
66
|
export { default as Sidebar } from './sidebars/Sidebar.svelte';
|
|
67
|
+
export { default as SidebarItem } from './sidebars/SidebarItem.svelte';
|
|
67
68
|
export { default as Spinner } from './spinners/Spinner.svelte';
|
|
68
69
|
export { default as Table } from './tables/Table.svelte';
|
|
69
70
|
export { default as TableDefaultRow } from './tables/TableDefaultRow.svelte';
|
package/index.js
CHANGED
|
@@ -84,6 +84,7 @@ export { default as AdvancedRating } from './ratings/AdvancedRating.svelte';
|
|
|
84
84
|
export { default as ScoreRating } from './ratings/ScoreRating.svelte';
|
|
85
85
|
// Sidebar
|
|
86
86
|
export { default as Sidebar } from './sidebars/Sidebar.svelte';
|
|
87
|
+
export { default as SidebarItem } from './sidebars/SidebarItem.svelte';
|
|
87
88
|
// Spin
|
|
88
89
|
export { default as Spinner } from './spinners/Spinner.svelte';
|
|
89
90
|
// Tables
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.19",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
"./ratings/ScoreRating.svelte": "./ratings/ScoreRating.svelte",
|
|
157
157
|
"./sidebars/Sidebar.svelte": "./sidebars/Sidebar.svelte",
|
|
158
158
|
"./sidebars/SidebarDropdown.svelte": "./sidebars/SidebarDropdown.svelte",
|
|
159
|
+
"./sidebars/SidebarItem.svelte": "./sidebars/SidebarItem.svelte",
|
|
159
160
|
"./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
|
|
160
161
|
"./tables/Table.svelte": "./tables/Table.svelte",
|
|
161
162
|
"./tables/TableCheckbox.svelte": "./tables/TableCheckbox.svelte",
|
package/sidebars/Sidebar.svelte
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let site;
|
|
3
|
-
export let links;
|
|
1
|
+
<script>export let site;
|
|
4
2
|
export let cta;
|
|
5
3
|
</script>
|
|
6
4
|
|
|
@@ -12,25 +10,7 @@ export let cta;
|
|
|
12
10
|
<span class="self-center text-xl font-semibold whitespace-nowrap dark:text-white">{site.name}</span>
|
|
13
11
|
</a>
|
|
14
12
|
{/if}
|
|
15
|
-
<
|
|
16
|
-
{#each links as link (link.id)}
|
|
17
|
-
{#if link.children}
|
|
18
|
-
<SidebarDropdown {link} />
|
|
19
|
-
{:else}
|
|
20
|
-
<li>
|
|
21
|
-
<a href={link.href} rel={link.rel} class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
22
|
-
{#if link.icon}
|
|
23
|
-
<svelte:component this={link.icon} size={link.iconSize} color={link.iconColor} class="mr-2 {link.iconClass}" />
|
|
24
|
-
{/if}
|
|
25
|
-
<span class="ml-3">{link.name}</span>
|
|
26
|
-
{#if link.subtext}
|
|
27
|
-
{@html link.subtext}
|
|
28
|
-
{/if}
|
|
29
|
-
</a>
|
|
30
|
-
</li>
|
|
31
|
-
{/if}
|
|
32
|
-
{/each}
|
|
33
|
-
</ul>
|
|
13
|
+
<slot />
|
|
34
14
|
{#if cta}
|
|
35
15
|
<div id="dropdown-cta" class="p-4 mt-6 bg-blue-50 rounded-lg dark:bg-blue-900" role="alert">
|
|
36
16
|
<div class="flex items-center mb-3">
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { SiteType,
|
|
2
|
+
import type { SiteType, SidebarCtaType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
site: SiteType;
|
|
6
|
-
links: SidebarType[];
|
|
7
6
|
cta: SidebarCtaType;
|
|
8
7
|
};
|
|
9
8
|
events: {
|
|
10
9
|
[evt: string]: CustomEvent<any>;
|
|
11
10
|
};
|
|
12
|
-
slots: {
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
13
14
|
};
|
|
14
15
|
export declare type SidebarProps = typeof __propDef.props;
|
|
15
16
|
export declare type SidebarEvents = typeof __propDef.events;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script>import SidebarDropdown from './SidebarDropdown.svelte';
|
|
2
|
+
export let links;
|
|
3
|
+
let ulClass = 'space-y-2';
|
|
4
|
+
export let border = false;
|
|
5
|
+
if (border) {
|
|
6
|
+
ulClass = 'pt-4 mt-4 space-y-2 border-t border-gray-200 dark:border-gray-700';
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<ul class={ulClass}>
|
|
11
|
+
{#each links as link (link.id)}
|
|
12
|
+
{#if link.children}
|
|
13
|
+
<SidebarDropdown {link} />
|
|
14
|
+
{:else}
|
|
15
|
+
<li>
|
|
16
|
+
<a href={link.href} rel={link.rel} class="flex items-center p-2 text-base font-normal text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
|
|
17
|
+
{#if link.icon}
|
|
18
|
+
<svelte:component this={link.icon} size={link.iconSize} color={link.iconColor} class="mr-2 {link.iconClass}" />
|
|
19
|
+
{/if}
|
|
20
|
+
<span class="ml-3">{link.name}</span>
|
|
21
|
+
{#if link.subtext}
|
|
22
|
+
{@html link.subtext}
|
|
23
|
+
{/if}
|
|
24
|
+
</a>
|
|
25
|
+
</li>
|
|
26
|
+
{/if}
|
|
27
|
+
{/each}
|
|
28
|
+
</ul>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { SidebarType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
links: SidebarType[];
|
|
6
|
+
border?: boolean;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {};
|
|
12
|
+
};
|
|
13
|
+
export declare type SidebarItemProps = typeof __propDef.props;
|
|
14
|
+
export declare type SidebarItemEvents = typeof __propDef.events;
|
|
15
|
+
export declare type SidebarItemSlots = typeof __propDef.slots;
|
|
16
|
+
export default class SidebarItem extends SvelteComponentTyped<SidebarItemProps, SidebarItemEvents, SidebarItemSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|