flowbite-svelte 0.9.3 → 0.9.6
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/accordions/AccordionItem.svelte +1 -1
- package/accordions/AccordionItem.svelte.d.ts +1 -1
- package/auth/Confirm.svelte +23 -0
- package/auth/Confirm.svelte.d.ts +19 -0
- package/auth/ForgotPassword.svelte +57 -0
- package/auth/ForgotPassword.svelte.d.ts +21 -0
- package/auth/Login.svelte +128 -0
- package/auth/Login.svelte.d.ts +25 -0
- package/auth/Register.svelte +116 -0
- package/auth/Register.svelte.d.ts +25 -0
- package/auth/Reset.svelte +57 -0
- package/auth/Reset.svelte.d.ts +22 -0
- package/buttongroups/ButtonGroup.svelte +7 -7
- package/buttongroups/ButtonGroupOutline.svelte +7 -7
- package/buttons/Button.svelte +16 -15
- package/buttons/Button.svelte.d.ts +3 -2
- package/buttons/ColorShadowButton.svelte +2 -1
- package/buttons/ColorShadowButton.svelte.d.ts +2 -1
- package/buttons/GradientDuotoneButton.svelte +2 -1
- package/buttons/GradientDuotoneButton.svelte.d.ts +2 -1
- package/buttons/GradientMonochromeButton.svelte +2 -1
- package/buttons/GradientMonochromeButton.svelte.d.ts +2 -1
- package/buttons/GradientOutlineButton.svelte +2 -1
- package/buttons/GradientOutlineButton.svelte.d.ts +2 -1
- package/cards/Card.svelte +6 -7
- package/cards/Card.svelte.d.ts +5 -4
- package/cards/CtaCard.svelte +4 -5
- package/cards/CtaCard.svelte.d.ts +1 -0
- package/cards/EcommerceCard.svelte +3 -2
- package/cards/EcommerceCard.svelte.d.ts +2 -1
- package/cards/HorizontalCard.svelte +14 -17
- package/cards/HorizontalCard.svelte.d.ts +8 -3
- package/cards/InteractiveCard.svelte +6 -7
- package/cards/InteractiveCard.svelte.d.ts +3 -2
- package/cards/ListCard.svelte +43 -79
- package/cards/ListCard.svelte.d.ts +9 -40
- package/cards/SignInCard.svelte +114 -111
- package/cards/SignInCard.svelte.d.ts +9 -32
- package/dropdowns/DropdownDefault.svelte +84 -93
- package/dropdowns/DropdownDefault.svelte.d.ts +7 -35
- package/footer/LogoFooter.svelte +4 -4
- package/footer/SimpleFooter.svelte +3 -3
- package/footer/SitemapFooter.svelte +5 -5
- package/footer/SitemapFooter.svelte.d.ts +2 -2
- package/footer/SocialMediaFooter.svelte +59 -106
- package/footer/SocialMediaFooter.svelte.d.ts +9 -61
- package/index.d.ts +6 -1
- package/index.js +14 -0
- package/list-group/List.svelte +42 -74
- package/list-group/List.svelte.d.ts +7 -23
- package/navbar/DropdownNavbar.svelte +16 -19
- package/navbar/DropdownNavbar.svelte.d.ts +7 -0
- package/navbar/Navbar.svelte +11 -14
- package/navbar/Navbar.svelte.d.ts +4 -0
- package/package.json +7 -3
- package/spinners/Spinner.svelte +1 -1
- package/spinners/Spinner.svelte.d.ts +1 -1
- package/spinners/SpinnerButton.svelte +1 -1
- package/types.d.ts +20 -7
package/buttons/Button.svelte
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script >export let rounded = false;
|
|
2
2
|
export let textSize = 'text-sm';
|
|
3
3
|
export let name = 'Read more';
|
|
4
|
-
export let
|
|
4
|
+
export let buttonType = 'blue';
|
|
5
|
+
export let type = 'button';
|
|
5
6
|
let paddings;
|
|
6
7
|
if (textSize === 'text-xs') {
|
|
7
8
|
paddings = 'py-2 px-3';
|
|
@@ -17,44 +18,44 @@ else {
|
|
|
17
18
|
}
|
|
18
19
|
let buttonClass;
|
|
19
20
|
let round = rounded ? 'rounded-full' : 'rounded-lg';
|
|
20
|
-
if (
|
|
21
|
+
if (buttonType === 'blue') {
|
|
21
22
|
buttonClass = `text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium ${round} ${textSize} ${paddings} text-center mr-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800`;
|
|
22
23
|
}
|
|
23
|
-
else if (
|
|
24
|
+
else if (buttonType === 'blue-outline') {
|
|
24
25
|
buttonClass = `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 mr-2 mb-2 dark:border-blue-500 dark:text-blue-500 dark:hover:text-white dark:hover:bg-blue-600 dark:focus:ring-blue-800`;
|
|
25
26
|
}
|
|
26
|
-
else if (
|
|
27
|
+
else if (buttonType === 'dark') {
|
|
27
28
|
buttonClass =
|
|
28
29
|
buttonClass = `text-white bg-gray-800 hover:bg-gray-900 focus:ring-4 focus:ring-gray-300 font-medium ${round} ${textSize} ${paddings} text-center mr-2 mb-2 dark:bg-gray-800 dark:hover:bg-gray-700 dark:focus:ring-gray-800 dark:border-gray-700`;
|
|
29
30
|
}
|
|
30
|
-
else if (
|
|
31
|
+
else if (buttonType === 'dark-outline') {
|
|
31
32
|
buttonClass = `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 mr-2 mb-2 dark:border-gray-600 dark:text-gray-400 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-800`;
|
|
32
33
|
}
|
|
33
|
-
else if (
|
|
34
|
+
else if (buttonType === 'light') {
|
|
34
35
|
buttonClass = `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 mr-2 mb-2 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`;
|
|
35
36
|
}
|
|
36
|
-
else if (
|
|
37
|
+
else if (buttonType === 'green') {
|
|
37
38
|
buttonClass = `text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium ${round} ${textSize} ${paddings} text-center mr-2 mb-2 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800`;
|
|
38
39
|
}
|
|
39
|
-
else if (
|
|
40
|
+
else if (buttonType === 'green-outline') {
|
|
40
41
|
buttonClass = `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 mr-2 mb-2 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800`;
|
|
41
42
|
}
|
|
42
|
-
else if (
|
|
43
|
+
else if (buttonType === 'red') {
|
|
43
44
|
buttonClass = `text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium ${round} ${textSize} ${paddings} text-center mr-2 mb-2 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-900`;
|
|
44
45
|
}
|
|
45
|
-
else if (
|
|
46
|
+
else if (buttonType === 'red-outline') {
|
|
46
47
|
buttonClass = `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 mr-2 mb-2 dark:border-red-500 dark:text-red-500 dark:hover:text-white dark:hover:bg-red-600 dark:focus:ring-red-900`;
|
|
47
48
|
}
|
|
48
|
-
else if (
|
|
49
|
+
else if (buttonType === 'yellow') {
|
|
49
50
|
buttonClass = `text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium ${round} ${textSize} ${paddings} text-center mr-2 mb-2 dark:focus:ring-yellow-900`;
|
|
50
51
|
}
|
|
51
|
-
else if (
|
|
52
|
+
else if (buttonType === 'yellow-outline') {
|
|
52
53
|
buttonClass = `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 mr-2 mb-2 dark:border-yellow-300 dark:text-yellow-300 dark:hover:text-white dark:hover:bg-yellow-400 dark:focus:ring-yellow-900`;
|
|
53
54
|
}
|
|
54
|
-
else if (
|
|
55
|
+
else if (buttonType === 'purple') {
|
|
55
56
|
buttonClass = `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`;
|
|
56
57
|
}
|
|
57
|
-
else if (
|
|
58
|
+
else if (buttonType === 'purple-outline') {
|
|
58
59
|
buttonClass = `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 mr-2 mb-2 dark:border-purple-400 dark:text-purple-400 dark:hover:text-white dark:hover:bg-purple-500 dark:focus:ring-purple-900`;
|
|
59
60
|
}
|
|
60
61
|
else {
|
|
@@ -63,4 +64,4 @@ else {
|
|
|
63
64
|
}
|
|
64
65
|
</script>
|
|
65
66
|
|
|
66
|
-
<button type
|
|
67
|
+
<button {type} class={buttonClass} on:click>{name}</button>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Buttontypes, Textsize } from '../types';
|
|
2
|
+
import type { Buttontypes, ButtonType, Textsize } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
rounded?: boolean;
|
|
6
6
|
textSize?: Textsize;
|
|
7
7
|
name?: string;
|
|
8
|
-
|
|
8
|
+
buttonType?: Buttontypes;
|
|
9
|
+
type?: ButtonType;
|
|
9
10
|
};
|
|
10
11
|
events: {
|
|
11
12
|
click: MouseEvent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export let color = 'blue';
|
|
3
3
|
export let name = 'Read more';
|
|
4
4
|
let btnClass;
|
|
5
|
+
export let type = 'button';
|
|
5
6
|
if (color === 'blue') {
|
|
6
7
|
btnClass = `text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 shadow-lg shadow-blue-500/50 dark:shadow-lg dark:shadow-blue-800/80 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
7
8
|
}
|
|
@@ -31,4 +32,4 @@ else {
|
|
|
31
32
|
}
|
|
32
33
|
</script>
|
|
33
34
|
|
|
34
|
-
<button type
|
|
35
|
+
<button {type} class={btnClass} on:click>{name}</button>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Buttonshadows, Textsize } from '../types';
|
|
2
|
+
import type { Buttonshadows, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
textSize?: Textsize;
|
|
6
6
|
color?: Buttonshadows;
|
|
7
7
|
name?: string;
|
|
8
|
+
type?: ButtonType;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
click: MouseEvent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export let color = 'purple2blue';
|
|
3
3
|
export let name = 'Read more';
|
|
4
4
|
let btnClass;
|
|
5
|
+
export let type = 'button';
|
|
5
6
|
if (color === 'purple2blue') {
|
|
6
7
|
btnClass = `text-white bg-gradient-to-br from-purple-600 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
7
8
|
}
|
|
@@ -28,4 +29,4 @@ else {
|
|
|
28
29
|
}
|
|
29
30
|
</script>
|
|
30
31
|
|
|
31
|
-
<button type
|
|
32
|
+
<button {type} class={btnClass} on:click>{name}</button>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Gradientduotones, Textsize } from '../types';
|
|
2
|
+
import type { Gradientduotones, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
textSize?: Textsize;
|
|
6
6
|
color?: Gradientduotones;
|
|
7
7
|
name?: string;
|
|
8
|
+
type?: ButtonType;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
click: MouseEvent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export let color = 'blue';
|
|
3
3
|
export let name = 'Read more';
|
|
4
4
|
let btnClass;
|
|
5
|
+
export let type = 'button';
|
|
5
6
|
if (color === 'blue') {
|
|
6
7
|
btnClass = `text-white bg-gradient-to-r from-blue-500 via-blue-600 to-blue-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
7
8
|
}
|
|
@@ -31,4 +32,4 @@ else {
|
|
|
31
32
|
}
|
|
32
33
|
</script>
|
|
33
34
|
|
|
34
|
-
<button type
|
|
35
|
+
<button {type} class={btnClass} on:click>{name}</button>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Buttonshadows, Textsize } from '../types';
|
|
2
|
+
import type { Buttonshadows, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
textSize?: Textsize;
|
|
6
6
|
color?: Buttonshadows;
|
|
7
7
|
name?: string;
|
|
8
|
+
type?: ButtonType;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
click: MouseEvent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script >export let textSize = 'text-sm';
|
|
2
2
|
export let color = 'purple2blue';
|
|
3
3
|
export let name = 'Read more';
|
|
4
|
+
export let type = 'button';
|
|
4
5
|
let btnClass;
|
|
5
6
|
let spanClass;
|
|
6
7
|
if (color === 'purple2blue') {
|
|
@@ -45,6 +46,6 @@ else {
|
|
|
45
46
|
}
|
|
46
47
|
</script>
|
|
47
48
|
|
|
48
|
-
<button class={btnClass}>
|
|
49
|
+
<button class={btnClass} {type}>
|
|
49
50
|
<span class={spanClass} on:click>{name}</span>
|
|
50
51
|
</button>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Gradientduotones, Textsize } from '../types';
|
|
2
|
+
import type { Gradientduotones, Textsize, ButtonType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
textSize?: Textsize;
|
|
6
6
|
color?: Gradientduotones;
|
|
7
7
|
name?: string;
|
|
8
|
+
type?: ButtonType;
|
|
8
9
|
};
|
|
9
10
|
events: {
|
|
10
11
|
click: MouseEvent;
|
package/cards/Card.svelte
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
<script >export let link;
|
|
2
|
-
export let rel;
|
|
3
|
-
export let alt;
|
|
4
|
-
export let img;
|
|
1
|
+
<script >export let link = '';
|
|
2
|
+
export let rel = '';
|
|
3
|
+
export let alt = '';
|
|
4
|
+
export let img = '';
|
|
5
5
|
export let btnLabel = 'Read more';
|
|
6
6
|
export let btnColor = 'blue';
|
|
7
7
|
export let header = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
|
8
|
+
export let divClass = 'max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700';
|
|
8
9
|
let buttonClass;
|
|
9
10
|
if (btnColor === 'blue') {
|
|
10
11
|
buttonClass =
|
|
@@ -44,9 +45,7 @@ else {
|
|
|
44
45
|
}
|
|
45
46
|
</script>
|
|
46
47
|
|
|
47
|
-
<div
|
|
48
|
-
class="max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700"
|
|
49
|
-
>
|
|
48
|
+
<div class={divClass}>
|
|
50
49
|
{#if img}
|
|
51
50
|
<a href={link} {rel}>
|
|
52
51
|
<img class="rounded-t-lg" src={img} {alt} />
|
package/cards/Card.svelte.d.ts
CHANGED
|
@@ -2,13 +2,14 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Colors } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
link
|
|
6
|
-
rel
|
|
7
|
-
alt
|
|
8
|
-
img
|
|
5
|
+
link?: string;
|
|
6
|
+
rel?: string;
|
|
7
|
+
alt?: string;
|
|
8
|
+
img?: string;
|
|
9
9
|
btnLabel?: string;
|
|
10
10
|
btnColor?: Colors;
|
|
11
11
|
header?: string;
|
|
12
|
+
divClass?: string;
|
|
12
13
|
};
|
|
13
14
|
events: {
|
|
14
15
|
[evt: string]: CustomEvent<any>;
|
package/cards/CtaCard.svelte
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export let title = 'Work fast from anywhere';
|
|
3
3
|
export let headColor = 'gray';
|
|
4
4
|
export let btns;
|
|
5
|
+
export let divClass = 'p-4 w-full text-center bg-white rounded-lg border shadow-md sm:p-8 dark:bg-gray-800 dark:border-gray-700';
|
|
5
6
|
let headClass;
|
|
6
7
|
if (headColor === 'blue') {
|
|
7
8
|
headClass = 'mb-2 text-3xl font-bold text-blue-900 dark:text-white';
|
|
@@ -32,9 +33,7 @@ else {
|
|
|
32
33
|
}
|
|
33
34
|
</script>
|
|
34
35
|
|
|
35
|
-
<div
|
|
36
|
-
class="p-4 w-full text-center bg-white rounded-lg border shadow-md sm:p-8 dark:bg-gray-800 dark:border-gray-700"
|
|
37
|
-
>
|
|
36
|
+
<div class={divClass}>
|
|
38
37
|
<h3 class={headClass}>
|
|
39
38
|
{title}
|
|
40
39
|
</h3>
|
|
@@ -43,8 +42,8 @@ else {
|
|
|
43
42
|
</p>
|
|
44
43
|
<div class="justify-center items-center space-y-4 sm:flex sm:space-y-0 sm:space-x-4">
|
|
45
44
|
{#if btns}
|
|
46
|
-
{#each btns as { name, textSize, type,
|
|
47
|
-
<a href
|
|
45
|
+
{#each btns as { name, textSize, type, href, rel, rounded }}
|
|
46
|
+
<a {href} {rel}>
|
|
48
47
|
<Button {name} {rounded} {type} {textSize} />
|
|
49
48
|
</a>
|
|
50
49
|
{/each}
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
};
|
|
5
5
|
export let link = '/';
|
|
6
6
|
export let btnColor = 'blue';
|
|
7
|
-
export let rel;
|
|
7
|
+
export let rel = '';
|
|
8
8
|
export let title = 'Apple Watch Series 7 GPS, Aluminium Case, Starlight Sport';
|
|
9
9
|
export let stars = 5;
|
|
10
10
|
export let price = '$555';
|
|
11
|
+
export let divClass = 'max-w-sm bg-white rounded-lg shadow-md dark:bg-gray-800 dark:border-gray-700';
|
|
11
12
|
let spanClass;
|
|
12
13
|
let linkClass;
|
|
13
14
|
if (btnColor === 'blue') {
|
|
@@ -66,7 +67,7 @@ else {
|
|
|
66
67
|
}
|
|
67
68
|
</script>
|
|
68
69
|
|
|
69
|
-
<div class=
|
|
70
|
+
<div class={divClass}>
|
|
70
71
|
<a href={link} {rel}>
|
|
71
72
|
<img class="p-8 rounded-t-lg" src={img.src} alt={img.alt} />
|
|
72
73
|
</a>
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
<script >export let link;
|
|
2
|
-
export let rel;
|
|
1
|
+
<script >export let link = '';
|
|
2
|
+
export let rel = '';
|
|
3
3
|
export let img = '/images/image-4.jpeg';
|
|
4
|
-
export let alt;
|
|
4
|
+
export let alt = '';
|
|
5
5
|
export let header = 'Lorem ipsum dolor sit ametit.';
|
|
6
|
+
export let linkClass = 'flex flex-col items-center bg-white rounded-lg border shadow-md md:flex-row md:max-w-xl hover:bg-gray-100 dark:border-gray-700 dark:bg-gray-800 dark:hover:bg-gray-700';
|
|
7
|
+
export let imgClass = 'object-cover w-full h-96 rounded-t-lg md:h-auto md:w-48 md:rounded-none md:rounded-l-lg';
|
|
8
|
+
export let textClass = 'flex flex-col justify-between p-4 leading-normal';
|
|
9
|
+
export let h3Class = 'mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white';
|
|
10
|
+
export let pClass = 'mb-3 font-normal text-gray-700 dark:text-gray-400';
|
|
6
11
|
</script>
|
|
7
12
|
|
|
8
|
-
<a
|
|
9
|
-
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
>
|
|
13
|
-
<img
|
|
14
|
-
class="object-cover w-full h-96 rounded-t-lg md:h-auto md:w-48 md:rounded-none md:rounded-l-lg"
|
|
15
|
-
src={img}
|
|
16
|
-
{alt}
|
|
17
|
-
/>
|
|
18
|
-
<div class="flex flex-col justify-between p-4 leading-normal">
|
|
19
|
-
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
|
|
13
|
+
<a href={link} {rel} class={linkClass}>
|
|
14
|
+
<img class={imgClass} src={img} {alt} />
|
|
15
|
+
<div class={textClass}>
|
|
16
|
+
<h3 class={h3Class}>
|
|
20
17
|
{header}
|
|
21
|
-
</
|
|
22
|
-
<p class=
|
|
18
|
+
</h3>
|
|
19
|
+
<p class={pClass}>
|
|
23
20
|
<slot />
|
|
24
21
|
</p>
|
|
25
22
|
</div>
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
|
-
link
|
|
5
|
-
rel
|
|
4
|
+
link?: string;
|
|
5
|
+
rel?: string;
|
|
6
6
|
img?: string;
|
|
7
|
-
alt
|
|
7
|
+
alt?: string;
|
|
8
8
|
header?: string;
|
|
9
|
+
linkClass?: string;
|
|
10
|
+
imgClass?: string;
|
|
11
|
+
textClass?: string;
|
|
12
|
+
h3Class?: string;
|
|
13
|
+
pClass?: string;
|
|
9
14
|
};
|
|
10
15
|
events: {
|
|
11
16
|
[evt: string]: CustomEvent<any>;
|
|
@@ -9,6 +9,7 @@ export let content = 'Proin efficitur purus felis.';
|
|
|
9
9
|
export let buttonColor = 'blue';
|
|
10
10
|
export let link1;
|
|
11
11
|
export let link2;
|
|
12
|
+
export let divClass = 'max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700';
|
|
12
13
|
let linkClass;
|
|
13
14
|
if (buttonColor === 'blue') {
|
|
14
15
|
linkClass =
|
|
@@ -48,9 +49,7 @@ else {
|
|
|
48
49
|
}
|
|
49
50
|
</script>
|
|
50
51
|
|
|
51
|
-
<div
|
|
52
|
-
class="max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700"
|
|
53
|
-
>
|
|
52
|
+
<div class={divClass}>
|
|
54
53
|
<div class="flex justify-end px-4 pt-4">
|
|
55
54
|
<button
|
|
56
55
|
id="dropdownButton"
|
|
@@ -97,12 +96,12 @@ else {
|
|
|
97
96
|
</h3>
|
|
98
97
|
<span class="text-sm text-gray-500 dark:text-gray-400">{content}</span>
|
|
99
98
|
<div class="flex mt-4 space-x-3 lg:mt-6">
|
|
100
|
-
{#if link1.
|
|
101
|
-
<a href={link1.
|
|
99
|
+
{#if link1.href}
|
|
100
|
+
<a href={link1.href} rel={link1.rel} class={linkClass}>{link1.name}</a>
|
|
102
101
|
{/if}
|
|
103
|
-
{#if link2.
|
|
102
|
+
{#if link2.href}
|
|
104
103
|
<a
|
|
105
|
-
href={link2.
|
|
104
|
+
href={link2.href}
|
|
106
105
|
rel={link2.rel}
|
|
107
106
|
class="inline-flex items-center py-2 px-4 text-sm font-medium text-center text-gray-900 bg-white rounded-lg border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-800"
|
|
108
107
|
>{link2.name}</a
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { LinkType, ImgType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
dropdownLinks:
|
|
5
|
+
dropdownLinks: LinkType[];
|
|
6
6
|
img: ImgType;
|
|
7
7
|
header?: string;
|
|
8
8
|
content?: string;
|
|
9
9
|
buttonColor?: string;
|
|
10
10
|
link1: LinkType;
|
|
11
11
|
link2: LinkType;
|
|
12
|
+
divClass?: string;
|
|
12
13
|
};
|
|
13
14
|
events: {
|
|
14
15
|
[evt: string]: CustomEvent<any>;
|
package/cards/ListCard.svelte
CHANGED
|
@@ -1,82 +1,46 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
src: "/images/profile-picture-1.jpeg",
|
|
6
|
-
alt: "Neil Sims",
|
|
7
|
-
},
|
|
8
|
-
field1: "Neil Sims",
|
|
9
|
-
field2: "email@windster.com",
|
|
10
|
-
field3: "Advisor",
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
img: {
|
|
14
|
-
src: "/images/profile-picture-2.jpeg",
|
|
15
|
-
alt: "Bonnie Green",
|
|
16
|
-
},
|
|
17
|
-
field1: "Bonnie Green",
|
|
18
|
-
field2: "email@windster.com",
|
|
19
|
-
field3: "Developer",
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
img: {
|
|
23
|
-
src: "/images/profile-picture-3.jpeg",
|
|
24
|
-
alt: "Michael Gough",
|
|
25
|
-
},
|
|
26
|
-
field1: "Michael Gough",
|
|
27
|
-
field2: "email@windster.com",
|
|
28
|
-
field3: "Marketing",
|
|
29
|
-
},
|
|
30
|
-
];
|
|
31
|
-
export let title = "Latest Customers";
|
|
32
|
-
export let action = {
|
|
33
|
-
link: "/#",
|
|
34
|
-
title: "View all",
|
|
35
|
-
rel: "",
|
|
36
|
-
};
|
|
1
|
+
<script >export let lists;
|
|
2
|
+
export let title = 'Latest Customers';
|
|
3
|
+
export let action;
|
|
4
|
+
export let divClass = 'p-4 max-w-md bg-white rounded-lg border shadow-md sm:p-8 dark:bg-gray-800 dark:border-gray-700';
|
|
37
5
|
</script>
|
|
38
6
|
|
|
39
|
-
<div
|
|
40
|
-
|
|
41
|
-
>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</li>
|
|
79
|
-
{/each}
|
|
80
|
-
</ul>
|
|
81
|
-
</div>
|
|
7
|
+
<div class={divClass}>
|
|
8
|
+
<div class="flex justify-between items-center mb-4">
|
|
9
|
+
<h3 class="text-xl font-bold leading-none text-gray-900 dark:text-white">
|
|
10
|
+
{title}
|
|
11
|
+
</h3>
|
|
12
|
+
<a
|
|
13
|
+
href={action.href}
|
|
14
|
+
rel={action.rel}
|
|
15
|
+
class="text-sm font-medium text-blue-600 hover:underline dark:text-blue-500"
|
|
16
|
+
>
|
|
17
|
+
{action.name}
|
|
18
|
+
</a>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="flow-root">
|
|
21
|
+
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
22
|
+
{#each lists as { img, field1, field2, field3 }}
|
|
23
|
+
<li class="py-3 sm:py-4">
|
|
24
|
+
<div class="flex items-center space-x-4">
|
|
25
|
+
<div class="flex-shrink-0">
|
|
26
|
+
<img class="w-8 h-8 rounded-full" src={img.src} alt={img.alt} />
|
|
27
|
+
</div>
|
|
28
|
+
<div class="flex-1 min-w-0">
|
|
29
|
+
<p class="text-sm font-medium text-gray-900 truncate dark:text-white">
|
|
30
|
+
{field1}
|
|
31
|
+
</p>
|
|
32
|
+
<p class="text-sm text-gray-500 truncate dark:text-gray-400">
|
|
33
|
+
{field2}
|
|
34
|
+
</p>
|
|
35
|
+
</div>
|
|
36
|
+
<div
|
|
37
|
+
class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white"
|
|
38
|
+
>
|
|
39
|
+
{field3}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</li>
|
|
43
|
+
{/each}
|
|
44
|
+
</ul>
|
|
45
|
+
</div>
|
|
82
46
|
</div>
|
|
@@ -1,51 +1,20 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ListCardProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ListCardEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ListCardSlots */
|
|
4
|
-
export default class ListCard extends SvelteComponentTyped<{
|
|
5
|
-
lists?: {
|
|
6
|
-
img: {
|
|
7
|
-
src: string;
|
|
8
|
-
alt: string;
|
|
9
|
-
};
|
|
10
|
-
field1: string;
|
|
11
|
-
field2: string;
|
|
12
|
-
field3: string;
|
|
13
|
-
}[];
|
|
14
|
-
title?: string;
|
|
15
|
-
action?: {
|
|
16
|
-
link: string;
|
|
17
|
-
title: string;
|
|
18
|
-
rel: string;
|
|
19
|
-
};
|
|
20
|
-
}, {
|
|
21
|
-
[evt: string]: CustomEvent<any>;
|
|
22
|
-
}, {}> {
|
|
23
|
-
}
|
|
24
|
-
export type ListCardProps = typeof __propDef.props;
|
|
25
|
-
export type ListCardEvents = typeof __propDef.events;
|
|
26
|
-
export type ListCardSlots = typeof __propDef.slots;
|
|
27
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { LinkType, ListCardType } from '../types';
|
|
28
3
|
declare const __propDef: {
|
|
29
4
|
props: {
|
|
30
|
-
lists
|
|
31
|
-
img: {
|
|
32
|
-
src: string;
|
|
33
|
-
alt: string;
|
|
34
|
-
};
|
|
35
|
-
field1: string;
|
|
36
|
-
field2: string;
|
|
37
|
-
field3: string;
|
|
38
|
-
}[];
|
|
5
|
+
lists: ListCardType[];
|
|
39
6
|
title?: string;
|
|
40
|
-
action
|
|
41
|
-
|
|
42
|
-
title: string;
|
|
43
|
-
rel: string;
|
|
44
|
-
};
|
|
7
|
+
action: LinkType;
|
|
8
|
+
divClass?: string;
|
|
45
9
|
};
|
|
46
10
|
events: {
|
|
47
11
|
[evt: string]: CustomEvent<any>;
|
|
48
12
|
};
|
|
49
13
|
slots: {};
|
|
50
14
|
};
|
|
15
|
+
export declare type ListCardProps = typeof __propDef.props;
|
|
16
|
+
export declare type ListCardEvents = typeof __propDef.events;
|
|
17
|
+
export declare type ListCardSlots = typeof __propDef.slots;
|
|
18
|
+
export default class ListCard extends SvelteComponentTyped<ListCardProps, ListCardEvents, ListCardSlots> {
|
|
19
|
+
}
|
|
51
20
|
export {};
|