flowbite-svelte 0.9.2 → 0.9.5
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 +2 -2
- package/cards/EcommerceCard.svelte +1 -1
- package/cards/EcommerceCard.svelte.d.ts +1 -1
- package/cards/HorizontalCard.svelte +3 -3
- package/cards/HorizontalCard.svelte.d.ts +3 -3
- package/cards/InteractiveCard.svelte +6 -6
- package/cards/InteractiveCard.svelte.d.ts +2 -2
- package/cards/ListCard.svelte +42 -77
- package/cards/ListCard.svelte.d.ts +8 -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/modals/ExtraLargeModal.svelte +187 -191
- package/modals/ExtraLargeModal.svelte.d.ts +9 -27
- package/modals/LargeModal.svelte +188 -191
- package/modals/LargeModal.svelte.d.ts +9 -27
- package/modals/MediumModal.svelte +191 -200
- package/modals/MediumModal.svelte.d.ts +9 -27
- package/modals/ModalButton.svelte +40 -35
- package/modals/ModalButton.svelte.d.ts +7 -17
- package/modals/SignInModal.svelte +151 -160
- package/modals/SignInModal.svelte.d.ts +10 -24
- package/modals/SmallModal.svelte +188 -191
- package/modals/SmallModal.svelte.d.ts +9 -27
- package/modals/modalStores.d.ts +2 -1
- package/modals/modalStores.js +1 -2
- package/navbar/DropdownNavbar.svelte +21 -24
- 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/tabs/DefaultTabs.svelte +2 -2
- package/tabs/InteractiveTabs.svelte +6 -6
- package/tabs/PillTabs.svelte +2 -2
- package/types.d.ts +25 -12
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
|
@@ -43,8 +43,8 @@ else {
|
|
|
43
43
|
</p>
|
|
44
44
|
<div class="justify-center items-center space-y-4 sm:flex sm:space-y-0 sm:space-x-4">
|
|
45
45
|
{#if btns}
|
|
46
|
-
{#each btns as { name, textSize, type,
|
|
47
|
-
<a href
|
|
46
|
+
{#each btns as { name, textSize, type, href, rel, rounded }}
|
|
47
|
+
<a {href} {rel}>
|
|
48
48
|
<Button {name} {rounded} {type} {textSize} />
|
|
49
49
|
</a>
|
|
50
50
|
{/each}
|
|
@@ -76,13 +76,13 @@ else {
|
|
|
76
76
|
class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute"
|
|
77
77
|
>
|
|
78
78
|
<ul class="py-1" aria-labelledby="dropdownButton">
|
|
79
|
-
{#each dropdownLinks as { href,
|
|
79
|
+
{#each dropdownLinks as { href, name, rel }}
|
|
80
80
|
<li>
|
|
81
81
|
<a
|
|
82
82
|
{href}
|
|
83
83
|
{rel}
|
|
84
84
|
class="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"
|
|
85
|
-
>{
|
|
85
|
+
>{name}</a
|
|
86
86
|
>
|
|
87
87
|
</li>
|
|
88
88
|
{/each}
|
|
@@ -97,12 +97,12 @@ else {
|
|
|
97
97
|
</h3>
|
|
98
98
|
<span class="text-sm text-gray-500 dark:text-gray-400">{content}</span>
|
|
99
99
|
<div class="flex mt-4 space-x-3 lg:mt-6">
|
|
100
|
-
{#if link1.
|
|
101
|
-
<a href={link1.
|
|
100
|
+
{#if link1.href}
|
|
101
|
+
<a href={link1.href} rel={link1.rel} class={linkClass}>{link1.name}</a>
|
|
102
102
|
{/if}
|
|
103
|
-
{#if link2.
|
|
103
|
+
{#if link2.href}
|
|
104
104
|
<a
|
|
105
|
-
href={link2.
|
|
105
|
+
href={link2.href}
|
|
106
106
|
rel={link2.rel}
|
|
107
107
|
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
108
|
>{link2.name}</a
|
|
@@ -1,8 +1,8 @@
|
|
|
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;
|
package/cards/ListCard.svelte
CHANGED
|
@@ -1,82 +1,47 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
img: {
|
|
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;
|
|
37
4
|
</script>
|
|
38
5
|
|
|
39
6
|
<div
|
|
40
|
-
|
|
7
|
+
class="p-4 max-w-md bg-white rounded-lg border shadow-md sm:p-8 dark:bg-gray-800 dark:border-gray-700"
|
|
41
8
|
>
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
</ul>
|
|
81
|
-
</div>
|
|
9
|
+
<div class="flex justify-between items-center mb-4">
|
|
10
|
+
<h3 class="text-xl font-bold leading-none text-gray-900 dark:text-white">
|
|
11
|
+
{title}
|
|
12
|
+
</h3>
|
|
13
|
+
<a
|
|
14
|
+
href={action.href}
|
|
15
|
+
rel={action.rel}
|
|
16
|
+
class="text-sm font-medium text-blue-600 hover:underline dark:text-blue-500"
|
|
17
|
+
>
|
|
18
|
+
{action.name}
|
|
19
|
+
</a>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="flow-root">
|
|
22
|
+
<ul class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
23
|
+
{#each lists as { img, field1, field2, field3 }}
|
|
24
|
+
<li class="py-3 sm:py-4">
|
|
25
|
+
<div class="flex items-center space-x-4">
|
|
26
|
+
<div class="flex-shrink-0">
|
|
27
|
+
<img class="w-8 h-8 rounded-full" src={img.src} alt={img.alt} />
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex-1 min-w-0">
|
|
30
|
+
<p class="text-sm font-medium text-gray-900 truncate dark:text-white">
|
|
31
|
+
{field1}
|
|
32
|
+
</p>
|
|
33
|
+
<p class="text-sm text-gray-500 truncate dark:text-gray-400">
|
|
34
|
+
{field2}
|
|
35
|
+
</p>
|
|
36
|
+
</div>
|
|
37
|
+
<div
|
|
38
|
+
class="inline-flex items-center text-base font-semibold text-gray-900 dark:text-white"
|
|
39
|
+
>
|
|
40
|
+
{field3}
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</li>
|
|
44
|
+
{/each}
|
|
45
|
+
</ul>
|
|
46
|
+
</div>
|
|
82
47
|
</div>
|
|
@@ -1,51 +1,19 @@
|
|
|
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
|
-
link: string;
|
|
42
|
-
title: string;
|
|
43
|
-
rel: string;
|
|
44
|
-
};
|
|
7
|
+
action: LinkType;
|
|
45
8
|
};
|
|
46
9
|
events: {
|
|
47
10
|
[evt: string]: CustomEvent<any>;
|
|
48
11
|
};
|
|
49
12
|
slots: {};
|
|
50
13
|
};
|
|
14
|
+
export declare type ListCardProps = typeof __propDef.props;
|
|
15
|
+
export declare type ListCardEvents = typeof __propDef.events;
|
|
16
|
+
export declare type ListCardSlots = typeof __propDef.slots;
|
|
17
|
+
export default class ListCard extends SvelteComponentTyped<ListCardProps, ListCardEvents, ListCardSlots> {
|
|
18
|
+
}
|
|
51
19
|
export {};
|