flowbite-svelte 0.14.0 → 0.14.3
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 +16 -0
- package/README.md +16 -2
- package/breadcrumbs/Breadcrumb.svelte.d.ts +2 -4
- package/buttons/Button.svelte +1 -1
- package/buttons/Button.svelte.d.ts +1 -0
- package/buttons/ColorShadowButton.svelte +4 -1
- package/buttons/ColorShadowButton.svelte.d.ts +4 -1
- package/buttons/GradientDuotoneButton.svelte +4 -1
- package/buttons/GradientDuotoneButton.svelte.d.ts +4 -1
- package/buttons/GradientMonochromeButton.svelte +4 -1
- package/buttons/GradientMonochromeButton.svelte.d.ts +4 -1
- package/buttons/GradientOutlineButton.svelte +2 -1
- package/buttons/GradientOutlineButton.svelte.d.ts +4 -1
- package/cards/Card.svelte +1 -1
- package/dropdowns/DropdownDefault.svelte +33 -28
- package/dropdowns/DropdownDefault.svelte.d.ts +3 -0
- package/dropdowns/ImgDropdown.svelte +31 -0
- package/dropdowns/ImgDropdown.svelte.d.ts +24 -0
- package/footer/SitemapFooter.svelte +29 -26
- package/footer/SitemapFooter.svelte.d.ts +1 -0
- package/footer/SocialMediaFooter.svelte +2 -1
- package/footer/SocialMediaFooter.svelte.d.ts +1 -0
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/package.json +6 -3
- package/types.d.ts +99 -95
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
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.14.3](https://github.com/shinokada/flowbite-svelte/compare/v0.14.2...v0.14.3) (2022-04-18)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add slot and {...70121restProps} to all button components ([c98057c](https://github.com/shinokada/flowbite-svelte/commit/c98057cd6ee39053660378dad2b0bdb6970e18da))
|
|
11
|
+
|
|
12
|
+
### [0.14.2](https://github.com/shinokada/flowbite-svelte/compare/v0.14.1...v0.14.2) (2022-04-18)
|
|
13
|
+
|
|
14
|
+
### [0.14.1](https://github.com/shinokada/flowbite-svelte/compare/v0.13.10...v0.14.1) (2022-04-18)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add ImgDropdown ([30e9d01](https://github.com/shinokada/flowbite-svelte/commit/30e9d01dcd51559f6771ebaeef57100cf198c452))
|
|
20
|
+
|
|
5
21
|
### [0.13.10](https://github.com/shinokada/flowbite-svelte/compare/v0.13.9...v0.13.10) (2022-04-16)
|
|
6
22
|
|
|
7
23
|
|
package/README.md
CHANGED
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
- [Icon badge](https://flowbite-svelte.vercel.app/badges/badge-icon)
|
|
32
32
|
- [Link badge](https://flowbite-svelte.vercel.app/badges/badge-link)
|
|
33
33
|
|
|
34
|
+
## Breadcrumb components
|
|
35
|
+
|
|
36
|
+
- [Breadcrumb](https://flowbite-svelte.vercel.app/breadcrumbs)
|
|
37
|
+
|
|
34
38
|
## Button group compnents
|
|
35
39
|
|
|
36
40
|
- [Default button group](https://flowbite-svelte.vercel.app/button-groups/default)
|
|
@@ -67,7 +71,8 @@
|
|
|
67
71
|
|
|
68
72
|
## Dropdown components
|
|
69
73
|
|
|
70
|
-
- [
|
|
74
|
+
- [Dropdown](https://flowbite-svelte.vercel.app/dropdowns/default)
|
|
75
|
+
- [Dropdown with Image](https://flowbite-svelte.vercel.app/dropdowns/image)
|
|
71
76
|
|
|
72
77
|
## Form components
|
|
73
78
|
|
|
@@ -154,4 +159,13 @@ Run:
|
|
|
154
159
|
|
|
155
160
|
```sh
|
|
156
161
|
npm run test
|
|
157
|
-
```
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Create props
|
|
165
|
+
|
|
166
|
+
```sh
|
|
167
|
+
cd scripts
|
|
168
|
+
node createProps.js
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
This will pull all props from components and replace files in `/src/routes/props` directory.
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { CrumbType } from '../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
|
-
crumbs?:
|
|
5
|
-
label: string;
|
|
6
|
-
href: string;
|
|
7
|
-
}[];
|
|
5
|
+
crumbs?: CrumbType[];
|
|
8
6
|
homeClass?: string;
|
|
9
7
|
crumbClass?: string;
|
|
10
8
|
solid?: boolean;
|
package/buttons/Button.svelte
CHANGED
|
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Buttonshadows, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
textSize?: Textsize;
|
|
6
7
|
color?: Buttonshadows;
|
|
7
8
|
name?: string;
|
|
@@ -12,7 +13,9 @@ declare const __propDef: {
|
|
|
12
13
|
} & {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
14
15
|
};
|
|
15
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
export declare type ColorShadowButtonProps = typeof __propDef.props;
|
|
18
21
|
export declare type ColorShadowButtonEvents = typeof __propDef.events;
|
|
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Gradientduotones, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
textSize?: Textsize;
|
|
6
7
|
color?: Gradientduotones;
|
|
7
8
|
name?: string;
|
|
@@ -12,7 +13,9 @@ declare const __propDef: {
|
|
|
12
13
|
} & {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
14
15
|
};
|
|
15
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
export declare type GradientDuotoneButtonProps = typeof __propDef.props;
|
|
18
21
|
export declare type GradientDuotoneButtonEvents = typeof __propDef.events;
|
|
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Buttonshadows, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
textSize?: Textsize;
|
|
6
7
|
color?: Buttonshadows;
|
|
7
8
|
name?: string;
|
|
@@ -12,7 +13,9 @@ declare const __propDef: {
|
|
|
12
13
|
} & {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
14
15
|
};
|
|
15
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
export declare type GradientMonochromeButtonProps = typeof __propDef.props;
|
|
18
21
|
export declare type GradientMonochromeButtonEvents = typeof __propDef.events;
|
|
@@ -2,6 +2,7 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Gradientduotones, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
textSize?: Textsize;
|
|
6
7
|
color?: Gradientduotones;
|
|
7
8
|
name?: string;
|
|
@@ -12,7 +13,9 @@ declare const __propDef: {
|
|
|
12
13
|
} & {
|
|
13
14
|
[evt: string]: CustomEvent<any>;
|
|
14
15
|
};
|
|
15
|
-
slots: {
|
|
16
|
+
slots: {
|
|
17
|
+
default: {};
|
|
18
|
+
};
|
|
16
19
|
};
|
|
17
20
|
export declare type GradientOutlineButtonProps = typeof __propDef.props;
|
|
18
21
|
export declare type GradientOutlineButtonEvents = typeof __propDef.events;
|
package/cards/Card.svelte
CHANGED
|
@@ -17,54 +17,57 @@ else {
|
|
|
17
17
|
}
|
|
18
18
|
let buttonClass;
|
|
19
19
|
let round = rounded ? 'rounded-full' : 'rounded-lg';
|
|
20
|
-
let
|
|
20
|
+
let dropdownToggleHidden = true;
|
|
21
21
|
const handleToggle = () => {
|
|
22
22
|
console.log('toggle clicked.');
|
|
23
|
-
|
|
23
|
+
dropdownToggleHidden = !dropdownToggleHidden;
|
|
24
24
|
};
|
|
25
25
|
export let items;
|
|
26
|
+
export let dropdownClass = 'hidden absolute -left-44 top-12 z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700';
|
|
27
|
+
export let headerClass = 'py-3 px-4 text-gray-900 dark:text-white';
|
|
28
|
+
export let linkClass = 'block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white';
|
|
26
29
|
if (color === 'blue') {
|
|
27
|
-
buttonClass = `inline-flex items-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
30
|
+
buttonClass = `inline-flex items-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800`;
|
|
28
31
|
}
|
|
29
32
|
else if (color === 'blue-outline') {
|
|
30
|
-
buttonClass = `inline-flex items-center text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
33
|
+
buttonClass = `inline-flex items-center text-blue-700 hover:text-white border border-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600 dark:focus:ring-blue-800`;
|
|
31
34
|
}
|
|
32
35
|
else if (color === 'dark') {
|
|
33
|
-
buttonClass = buttonClass = `inline-flex items-center text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
36
|
+
buttonClass = buttonClass = `inline-flex items-center text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700`;
|
|
34
37
|
}
|
|
35
38
|
else if (color === 'dark-outline') {
|
|
36
|
-
buttonClass = `inline-flex items-center text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
39
|
+
buttonClass = `inline-flex items-center text-gray-900 hover:text-white border border-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-gray-600 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800`;
|
|
37
40
|
}
|
|
38
41
|
else if (color === 'light') {
|
|
39
|
-
buttonClass = `inline-flex items-center text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
42
|
+
buttonClass = `inline-flex items-center text-gray-900 bg-white border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-gray-600 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-800`;
|
|
40
43
|
}
|
|
41
44
|
else if (color === 'green') {
|
|
42
|
-
buttonClass = `inline-flex items-center text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
45
|
+
buttonClass = `inline-flex items-center text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800`;
|
|
43
46
|
}
|
|
44
47
|
else if (color === 'green-outline') {
|
|
45
|
-
buttonClass = `inline-flex items-center text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
48
|
+
buttonClass = `inline-flex items-center text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800`;
|
|
46
49
|
}
|
|
47
50
|
else if (color === 'red') {
|
|
48
|
-
buttonClass = `inline-flex items-center text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
51
|
+
buttonClass = `inline-flex items-center text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900`;
|
|
49
52
|
}
|
|
50
53
|
else if (color === 'red-outline') {
|
|
51
|
-
buttonClass = `inline-flex items-center text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
54
|
+
buttonClass = `inline-flex items-center text-red-700 hover:text-white border border-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900`;
|
|
52
55
|
}
|
|
53
56
|
else if (color === 'yellow') {
|
|
54
|
-
buttonClass = `inline-flex items-center text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
57
|
+
buttonClass = `inline-flex items-center text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium ${round} ${textSize} ${paddings} text-center dark:focus:ring-yellow-900`;
|
|
55
58
|
}
|
|
56
59
|
else if (color === 'yellow-outline') {
|
|
57
|
-
buttonClass = `inline-flex items-center text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
60
|
+
buttonClass = `inline-flex items-center text-yellow-400 hover:text-white border border-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900`;
|
|
58
61
|
}
|
|
59
62
|
else if (color === 'purple') {
|
|
60
63
|
buttonClass = `inline-flex items-center text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium ${round} ${textSize} ${paddings} text-center mb-2 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-900`;
|
|
61
64
|
}
|
|
62
65
|
else if (color === 'purple-outline') {
|
|
63
|
-
buttonClass = `inline-flex items-center text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg ${textSize} ${paddings} text-center
|
|
66
|
+
buttonClass = `inline-flex items-center text-purple-700 hover:text-white border border-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg ${textSize} ${paddings} text-center dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500 dark:focus:ring-purple-900`;
|
|
64
67
|
}
|
|
65
68
|
else {
|
|
66
69
|
// blue
|
|
67
|
-
buttonClass = `inline-flex items-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center
|
|
70
|
+
buttonClass = `inline-flex items-center text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800`;
|
|
68
71
|
}
|
|
69
72
|
</script>
|
|
70
73
|
|
|
@@ -73,17 +76,19 @@ else {
|
|
|
73
76
|
<svg class="ml-2 w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg>
|
|
74
77
|
</button>
|
|
75
78
|
|
|
76
|
-
<div class
|
|
77
|
-
{
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
<div class="relative">
|
|
80
|
+
<div class:hidden={dropdownToggleHidden} class={dropdownClass}>
|
|
81
|
+
{#if $$slots.header}
|
|
82
|
+
<div class={headerClass}>
|
|
83
|
+
<slot name="header" />
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
86
|
+
<ul class="py-1" aria-labelledby="dropdownButton">
|
|
87
|
+
{#each items as { href, name, divider }}
|
|
88
|
+
<li class:border-b={divider} class:border-gray-100={divider} class:dark:border-gray-500={divider}>
|
|
89
|
+
<a {href} class={linkClass}>{name}</a>
|
|
90
|
+
</li>
|
|
91
|
+
{/each}
|
|
92
|
+
</ul>
|
|
93
|
+
</div>
|
|
89
94
|
</div>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script >let imgDropdownToggle = true;
|
|
2
|
+
const handleToggle = () => {
|
|
3
|
+
console.log('toggle clicked.');
|
|
4
|
+
imgDropdownToggle = !imgDropdownToggle;
|
|
5
|
+
};
|
|
6
|
+
export let items;
|
|
7
|
+
export let divClass = 'relative';
|
|
8
|
+
export let dropdownClass = 'hidden absolute -left-16 top-14 z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700';
|
|
9
|
+
export let headerClass = 'py-3 px-4 text-gray-900 dark:text-white';
|
|
10
|
+
export let linkClass = 'block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class={divClass}>
|
|
14
|
+
<div on:click={handleToggle}>
|
|
15
|
+
<slot />
|
|
16
|
+
</div>
|
|
17
|
+
<div class:hidden={imgDropdownToggle} class={dropdownClass}>
|
|
18
|
+
{#if $$slots.header}
|
|
19
|
+
<div class={headerClass}>
|
|
20
|
+
<slot name="header" />
|
|
21
|
+
</div>
|
|
22
|
+
{/if}
|
|
23
|
+
<ul class="py-1" aria-labelledby="dropdownButton">
|
|
24
|
+
{#each items as { href, name, divider }}
|
|
25
|
+
<li class:border-b={divider} class:border-gray-100={divider} class:dark:border-gray-500={divider}>
|
|
26
|
+
<a {href} class={linkClass}>{name}</a>
|
|
27
|
+
</li>
|
|
28
|
+
{/each}
|
|
29
|
+
</ul>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { DropdownType } from '../types';
|
|
3
|
+
declare const __propDef: {
|
|
4
|
+
props: {
|
|
5
|
+
items: DropdownType[];
|
|
6
|
+
divClass?: string;
|
|
7
|
+
dropdownClass?: string;
|
|
8
|
+
headerClass?: string;
|
|
9
|
+
linkClass?: string;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
};
|
|
14
|
+
slots: {
|
|
15
|
+
default: {};
|
|
16
|
+
header: {};
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare type ImgDropdownProps = typeof __propDef.props;
|
|
20
|
+
export declare type ImgDropdownEvents = typeof __propDef.events;
|
|
21
|
+
export declare type ImgDropdownSlots = typeof __propDef.slots;
|
|
22
|
+
export default class ImgDropdown extends SvelteComponentTyped<ImgDropdownProps, ImgDropdownEvents, ImgDropdownSlots> {
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -5,6 +5,7 @@ export let footerClass = 'bg-white dark:bg-gray-800';
|
|
|
5
5
|
export let linksClass = 'grid grid-cols-2 gap-8 py-8 px-6 md:grid-cols-4';
|
|
6
6
|
export let parentClass = 'mb-6 text-sm font-semibold dark:text-gray-400 uppercase';
|
|
7
7
|
export let ulClass = 'text-gray-900 dark:text-gray-300';
|
|
8
|
+
export let liClass = 'mb-4';
|
|
8
9
|
export let linkClass = 'hover:underline';
|
|
9
10
|
export let copyrightDivClass = 'py-6 px-4 text-gray-900 dark:bg-gray-700 md:flex md:items-center md:justify-between';
|
|
10
11
|
export let copyrightClass = 'text-sm text-gray-900 dark:text-gray-300 sm:text-center';
|
|
@@ -16,30 +17,32 @@ export let allRightsReserved = 'All Rights Reserved.';
|
|
|
16
17
|
</script>
|
|
17
18
|
|
|
18
19
|
<footer class="{footerClass} {$$props.class}">
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
<div class={linksClass}>
|
|
21
|
+
{#each links as { parent, children }}
|
|
22
|
+
<div>
|
|
23
|
+
<h2 class={parentClass}>
|
|
24
|
+
{parent}
|
|
25
|
+
</h2>
|
|
26
|
+
<ul class={ulClass}>
|
|
27
|
+
{#each children as { name, href }}
|
|
28
|
+
<li class={liClass}>
|
|
29
|
+
<a {href} class={linkClass}>{name}</a>
|
|
30
|
+
</li>
|
|
31
|
+
{/each}
|
|
32
|
+
</ul>
|
|
33
|
+
</div>
|
|
34
|
+
{/each}
|
|
35
|
+
</div>
|
|
36
|
+
<div class={copyrightDivClass}>
|
|
37
|
+
<span class={copyrightClass}
|
|
38
|
+
>{copyrightYear} <a href={site.href}>{site.name}</a>. {allRightsReserved}
|
|
39
|
+
</span>
|
|
40
|
+
<div class={socialMediaDivClass}>
|
|
41
|
+
{#each socialMedia as { href, icon }}
|
|
42
|
+
<a {href} class={socialMediaLinkClass}>
|
|
43
|
+
<svelte:component this={icon} className={iconClass} />
|
|
44
|
+
</a>
|
|
45
|
+
{/each}
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
45
48
|
</footer>
|
|
@@ -10,6 +10,7 @@ export let imgClass = 'mr-3 h-8';
|
|
|
10
10
|
export let linksDivClass = 'grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3';
|
|
11
11
|
export let parentClass = 'mb-6 text-sm font-semibold text-gray-900 uppercase dark:text-white';
|
|
12
12
|
export let ulClass = 'text-gray-600 dark:text-gray-400';
|
|
13
|
+
export let liClass = 'mb-4';
|
|
13
14
|
export let linkClass = 'hover:underline';
|
|
14
15
|
export let hrClass = 'my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8';
|
|
15
16
|
export let copyrightDivClass = 'sm:flex sm:items-center sm:justify-between';
|
|
@@ -37,7 +38,7 @@ export let allRightsReserved = 'All Rights Reserved.';
|
|
|
37
38
|
</h2>
|
|
38
39
|
<ul class={ulClass}>
|
|
39
40
|
{#each children as { name, href }}
|
|
40
|
-
<li class=
|
|
41
|
+
<li class={liClass}>
|
|
41
42
|
<a {href} class={linkClass}>{name}</a>
|
|
42
43
|
</li>
|
|
43
44
|
{/each}
|
package/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export { default as Carousel } from "./carousels/Carousel.svelte";
|
|
|
31
31
|
export { default as CarouselTransition } from "./carousels/CarouselTransition.svelte";
|
|
32
32
|
export { default as DarkMode } from "./darkmode/DarkMode.svelte";
|
|
33
33
|
export { default as Dropdown } from "./dropdowns/DropdownDefault.svelte";
|
|
34
|
+
export { default as ImgDropdown } from "./dropdowns/ImgDropdown.svelte";
|
|
34
35
|
export { default as SimpleFooter } from "./footer/SimpleFooter.svelte";
|
|
35
36
|
export { default as LogoFooter } from "./footer/LogoFooter.svelte";
|
|
36
37
|
export { default as SocialMediaFooter } from "./footer/SocialMediaFooter.svelte";
|
package/index.js
CHANGED
|
@@ -53,7 +53,8 @@ export { default as CarouselTransition } from './carousels/CarouselTransition.sv
|
|
|
53
53
|
export { default as DarkMode } from'./darkmode/DarkMode.svelte'
|
|
54
54
|
|
|
55
55
|
// Dropdown
|
|
56
|
-
export { default as Dropdown } from'./dropdowns/DropdownDefault.svelte'
|
|
56
|
+
export { default as Dropdown } from './dropdowns/DropdownDefault.svelte'
|
|
57
|
+
export { default as ImgDropdown } from './dropdowns/ImgDropdown.svelte'
|
|
57
58
|
|
|
58
59
|
// Footers
|
|
59
60
|
export { default as SimpleFooter } from'./footer/SimpleFooter.svelte'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.3",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"eslint": "^7.32.0",
|
|
26
26
|
"eslint-config-prettier": "^8.3.0",
|
|
27
27
|
"eslint-plugin-svelte3": "^3.2.1",
|
|
28
|
-
"flowbite": "^1.4.1",
|
|
29
28
|
"flowbite-svelte": "^0.13.8",
|
|
30
29
|
"mdsvex": "^0.10.5",
|
|
31
30
|
"postcss": "^8.4.12",
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
"prism-themes": "^1.9.0",
|
|
36
35
|
"svelte": "^3.44.0",
|
|
37
36
|
"svelte-check": "^2.2.6",
|
|
38
|
-
"svelte-collapse": "^0.0.4",
|
|
39
37
|
"svelte-preprocess": "^4.10.5",
|
|
40
38
|
"svelte2tsx": "^0.5.9",
|
|
41
39
|
"tailwindcss": "^3.0.23",
|
|
@@ -76,6 +74,10 @@
|
|
|
76
74
|
"type": "git",
|
|
77
75
|
"url": "https://github.com/shinokada/flowbite-svelte"
|
|
78
76
|
},
|
|
77
|
+
"dependencies": {
|
|
78
|
+
"flowbite": "^1.4.2",
|
|
79
|
+
"svelte-collapse": "^0.0.4"
|
|
80
|
+
},
|
|
79
81
|
"exports": {
|
|
80
82
|
"./package.json": "./package.json",
|
|
81
83
|
"./.DS_Store": "./.DS_Store",
|
|
@@ -117,6 +119,7 @@
|
|
|
117
119
|
"./carousels/Thumbnail.svelte": "./carousels/Thumbnail.svelte",
|
|
118
120
|
"./darkmode/DarkMode.svelte": "./darkmode/DarkMode.svelte",
|
|
119
121
|
"./dropdowns/DropdownDefault.svelte": "./dropdowns/DropdownDefault.svelte",
|
|
122
|
+
"./dropdowns/ImgDropdown.svelte": "./dropdowns/ImgDropdown.svelte",
|
|
120
123
|
"./footer/LogoFooter.svelte": "./footer/LogoFooter.svelte",
|
|
121
124
|
"./footer/SimpleFooter.svelte": "./footer/SimpleFooter.svelte",
|
|
122
125
|
"./footer/SitemapFooter.svelte": "./footer/SitemapFooter.svelte",
|
package/types.d.ts
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
import type { SvelteComponent } from 'svelte';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
export interface ActivityType {
|
|
3
|
+
title: HTMLElement | string;
|
|
4
|
+
date: Date | string;
|
|
5
|
+
src: string;
|
|
6
|
+
alt: string;
|
|
7
|
+
text?: HTMLElement | string;
|
|
8
|
+
}
|
|
9
|
+
export declare type AlignType = 'text-center' | 'text-left' | 'text-right';
|
|
10
|
+
export interface AuthFieldType {
|
|
11
|
+
label: string;
|
|
12
|
+
fieldtype: string;
|
|
13
|
+
required?: boolean;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare type AuthFunctionType = () => Promise<void>;
|
|
17
|
+
export interface AvatarType {
|
|
18
|
+
src?: string;
|
|
19
|
+
alt?: string;
|
|
20
|
+
size?: number;
|
|
21
|
+
border?: boolean;
|
|
22
|
+
round?: boolean;
|
|
23
|
+
header?: string;
|
|
24
|
+
text?: string;
|
|
25
|
+
}
|
|
9
26
|
export interface ButtonGroupType {
|
|
10
27
|
name: string;
|
|
11
28
|
href?: string;
|
|
12
29
|
rel?: string;
|
|
13
30
|
icon?: typeof SvelteComponent;
|
|
14
31
|
}
|
|
32
|
+
export declare type ButtonType = 'button' | 'submit' | 'reset';
|
|
33
|
+
export declare type Buttontypes = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
34
|
+
export declare type Buttonshadows = 'blue' | 'green' | 'cyan' | 'teal' | 'lime' | 'red' | 'pink' | 'purple';
|
|
15
35
|
export declare type CardButtonType = {
|
|
16
36
|
textSize?: Textsize;
|
|
17
37
|
name: string;
|
|
@@ -20,30 +40,32 @@ export declare type CardButtonType = {
|
|
|
20
40
|
rel?: string;
|
|
21
41
|
rounded?: boolean;
|
|
22
42
|
};
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
href: string;
|
|
30
|
-
rel?: string;
|
|
31
|
-
}
|
|
32
|
-
export interface SiteType {
|
|
33
|
-
name: string;
|
|
34
|
-
href: string;
|
|
35
|
-
img?: string;
|
|
43
|
+
export interface CheckboxType {
|
|
44
|
+
id: string;
|
|
45
|
+
label: string;
|
|
46
|
+
checked?: boolean;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
helper?: string;
|
|
36
49
|
}
|
|
37
|
-
export
|
|
50
|
+
export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink';
|
|
51
|
+
export declare type CrumbType = {
|
|
52
|
+
label: string;
|
|
38
53
|
href: string;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export
|
|
42
|
-
export interface TabType {
|
|
54
|
+
};
|
|
55
|
+
export declare type DropdownColorType = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
56
|
+
export interface DropdownType {
|
|
43
57
|
name: string;
|
|
44
|
-
active: boolean;
|
|
45
58
|
href: string;
|
|
46
|
-
|
|
59
|
+
divider?: boolean;
|
|
60
|
+
}
|
|
61
|
+
export declare type Gradientduotones = 'purple2blue' | 'cyan2blue' | 'green2blue' | 'purple2pink' | 'pink2orange' | 'teal2lime' | 'red2yellow';
|
|
62
|
+
export interface GroupTimelineType {
|
|
63
|
+
title: string | HTMLElement;
|
|
64
|
+
src: string;
|
|
65
|
+
alt: string;
|
|
66
|
+
href?: string;
|
|
67
|
+
isPrivate?: boolean;
|
|
68
|
+
comment?: string | HTMLElement;
|
|
47
69
|
}
|
|
48
70
|
export interface IconTabType {
|
|
49
71
|
name: string;
|
|
@@ -52,19 +74,26 @@ export interface IconTabType {
|
|
|
52
74
|
rel?: string;
|
|
53
75
|
icon?: typeof SvelteComponent;
|
|
54
76
|
}
|
|
77
|
+
export declare type ImgType = {
|
|
78
|
+
src: string;
|
|
79
|
+
alt?: string;
|
|
80
|
+
};
|
|
81
|
+
export declare type InputType = 'button' | 'checkbox' | 'color' | 'date' | 'datetime-local' | 'email' | 'file' | 'hidden' | 'image' | 'month' | 'number' | 'password' | 'radio' | 'range' | 'reset' | 'search' | 'submit' | 'tel' | 'text' | 'time' | 'url' | 'week';
|
|
55
82
|
export interface InteractiveTabType {
|
|
56
83
|
name: string;
|
|
57
84
|
id: number;
|
|
58
85
|
content: string | typeof SvelteComponent;
|
|
59
86
|
}
|
|
60
|
-
export interface
|
|
61
|
-
name: string;
|
|
62
|
-
id: number;
|
|
63
|
-
}
|
|
64
|
-
export interface PillTabType {
|
|
87
|
+
export interface LinkType {
|
|
65
88
|
name: string;
|
|
66
|
-
selected: boolean;
|
|
67
89
|
href: string;
|
|
90
|
+
rel?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface ListCardType {
|
|
93
|
+
img: ImgType;
|
|
94
|
+
field1: string;
|
|
95
|
+
field2?: string;
|
|
96
|
+
field3?: string;
|
|
68
97
|
}
|
|
69
98
|
export interface NavbarType {
|
|
70
99
|
name: string;
|
|
@@ -72,29 +101,26 @@ export interface NavbarType {
|
|
|
72
101
|
rel?: string;
|
|
73
102
|
child?: NavbarType[];
|
|
74
103
|
}
|
|
75
|
-
export interface
|
|
76
|
-
|
|
77
|
-
|
|
104
|
+
export interface PageType {
|
|
105
|
+
pageNum: number;
|
|
106
|
+
href: string;
|
|
78
107
|
}
|
|
79
|
-
export interface
|
|
108
|
+
export interface PillTabType {
|
|
80
109
|
name: string;
|
|
110
|
+
selected: boolean;
|
|
81
111
|
href: string;
|
|
82
|
-
divider: boolean;
|
|
83
|
-
}
|
|
84
|
-
export interface ListCardType {
|
|
85
|
-
img: ImgType;
|
|
86
|
-
field1: string;
|
|
87
|
-
field2?: string;
|
|
88
|
-
field3?: string;
|
|
89
112
|
}
|
|
90
|
-
export
|
|
91
|
-
|
|
92
|
-
export interface AuthFieldType {
|
|
113
|
+
export interface RadioType {
|
|
114
|
+
id: string;
|
|
93
115
|
label: string;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
116
|
+
value: string;
|
|
117
|
+
checked?: boolean;
|
|
118
|
+
disabled?: boolean;
|
|
97
119
|
}
|
|
120
|
+
export declare type SelectOptionType = {
|
|
121
|
+
name: string;
|
|
122
|
+
value: string;
|
|
123
|
+
};
|
|
98
124
|
export declare type SidebarType = {
|
|
99
125
|
id: number;
|
|
100
126
|
name: string;
|
|
@@ -108,20 +134,30 @@ export declare type SidebarCtaType = {
|
|
|
108
134
|
label: string;
|
|
109
135
|
text: HTMLElement;
|
|
110
136
|
};
|
|
111
|
-
export
|
|
137
|
+
export interface SiteType {
|
|
112
138
|
name: string;
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
export interface AvatarType {
|
|
116
|
-
src?: string;
|
|
117
|
-
alt?: string;
|
|
118
|
-
size?: 6 | 8 | 12 | 16 | 24 | 48;
|
|
119
|
-
border?: boolean;
|
|
120
|
-
round?: boolean;
|
|
121
|
-
header?: string;
|
|
122
|
-
text?: string;
|
|
139
|
+
href: string;
|
|
140
|
+
img?: string;
|
|
123
141
|
}
|
|
124
|
-
export
|
|
142
|
+
export interface SocialMediaLinkType {
|
|
143
|
+
parent: string;
|
|
144
|
+
children?: LinkType[];
|
|
145
|
+
}
|
|
146
|
+
export interface SocialMediaType {
|
|
147
|
+
href: string;
|
|
148
|
+
icon: typeof SvelteComponent;
|
|
149
|
+
}
|
|
150
|
+
export interface TabHeadType {
|
|
151
|
+
name: string;
|
|
152
|
+
id: number;
|
|
153
|
+
}
|
|
154
|
+
export interface TabType {
|
|
155
|
+
name: string;
|
|
156
|
+
active: boolean;
|
|
157
|
+
href: string;
|
|
158
|
+
rel?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare type Textsize = 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'text-2xl' | 'text-3xl' | 'text-4xl';
|
|
125
161
|
export interface TimelineItemType {
|
|
126
162
|
date: Date | string;
|
|
127
163
|
title: string;
|
|
@@ -144,25 +180,6 @@ export interface TimelineItemHorizontalType {
|
|
|
144
180
|
icon?: typeof SvelteComponent;
|
|
145
181
|
text?: HTMLElement | string;
|
|
146
182
|
}
|
|
147
|
-
export interface ActivityType {
|
|
148
|
-
title: HTMLElement | string;
|
|
149
|
-
date: Date | string;
|
|
150
|
-
src: string;
|
|
151
|
-
alt: string;
|
|
152
|
-
text?: HTMLElement | string;
|
|
153
|
-
}
|
|
154
|
-
export interface GroupTimelineType {
|
|
155
|
-
title: string | HTMLElement;
|
|
156
|
-
src: string;
|
|
157
|
-
alt: string;
|
|
158
|
-
href?: string;
|
|
159
|
-
isPrivate?: boolean;
|
|
160
|
-
comment?: string | HTMLElement;
|
|
161
|
-
}
|
|
162
|
-
export interface PageType {
|
|
163
|
-
pageNum: number;
|
|
164
|
-
href: string;
|
|
165
|
-
}
|
|
166
183
|
export interface TransitionParamTypes {
|
|
167
184
|
delay?: number;
|
|
168
185
|
duration?: number;
|
|
@@ -170,17 +187,4 @@ export interface TransitionParamTypes {
|
|
|
170
187
|
css?: (t: number, u: number) => string;
|
|
171
188
|
tick?: (t: number, u: number) => void;
|
|
172
189
|
}
|
|
173
|
-
export
|
|
174
|
-
id: string;
|
|
175
|
-
label: string;
|
|
176
|
-
checked?: boolean;
|
|
177
|
-
disabled?: boolean;
|
|
178
|
-
helper?: string;
|
|
179
|
-
}
|
|
180
|
-
export interface RadioType {
|
|
181
|
-
id: string;
|
|
182
|
-
label: string;
|
|
183
|
-
value: string;
|
|
184
|
-
checked?: boolean;
|
|
185
|
-
disabled?: boolean;
|
|
186
|
-
}
|
|
190
|
+
export declare type TransitionTypes = 'fade' | 'fly' | 'slide' | 'blur' | 'in:fly' | 'out:fly' | 'in:slide' | 'out:slide' | 'in:fade' | 'out:fade' | 'in:blur' | 'out:blur';
|