flowbite-svelte 0.8.7 → 0.9.1
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/README.md +9 -1
- package/accordions/AccordionDefault.svelte +20 -21
- package/accordions/AccordionDefault.svelte.d.ts +6 -19
- package/alerts/Alert.svelte +90 -97
- package/alerts/Alert.svelte.d.ts +7 -17
- package/alerts/BorderAlert.svelte +90 -104
- package/alerts/BorderAlert.svelte.d.ts +7 -17
- package/alerts/InfoAlert.svelte +106 -111
- package/alerts/InfoAlert.svelte.d.ts +8 -20
- package/badges/Badge.svelte +22 -16
- package/badges/Badge.svelte.d.ts +8 -16
- package/badges/BadgeIcon.svelte +24 -18
- package/badges/BadgeIcon.svelte.d.ts +8 -18
- package/badges/BadgeLink.svelte +23 -17
- package/badges/BadgeLink.svelte.d.ts +9 -18
- package/buttongroups/ButtonGroup.svelte +49 -59
- package/buttongroups/ButtonGroup.svelte.d.ts +7 -23
- package/buttongroups/ButtonGroupOutline.svelte +49 -61
- package/buttongroups/ButtonGroupOutline.svelte.d.ts +7 -23
- package/buttons/Button.svelte +48 -35
- package/buttons/Button.svelte.d.ts +8 -19
- package/buttons/ColorShadowButton.svelte +22 -16
- package/buttons/ColorShadowButton.svelte.d.ts +8 -18
- package/buttons/GradientDuotoneButton.svelte +20 -15
- package/buttons/GradientDuotoneButton.svelte.d.ts +8 -18
- package/buttons/GradientMonochromeButton.svelte +22 -16
- package/buttons/GradientMonochromeButton.svelte.d.ts +8 -18
- package/buttons/GradientOutlineButton.svelte +30 -25
- package/buttons/GradientOutlineButton.svelte.d.ts +8 -18
- package/cards/Card.svelte +73 -71
- package/cards/Card.svelte.d.ts +12 -26
- package/cards/CtaCard.svelte +56 -55
- package/cards/CtaCard.svelte.d.ts +8 -32
- package/cards/EcommerceCard.svelte +77 -77
- package/cards/EcommerceCard.svelte.d.ts +10 -28
- package/dropdowns/DropdownDefault.svelte.d.ts +2 -2
- package/footer/LogoFooter.svelte +4 -2
- package/footer/LogoFooter.svelte.d.ts +4 -0
- package/footer/SimpleFooter.svelte +5 -3
- package/footer/SimpleFooter.svelte.d.ts +4 -0
- package/footer/SitemapFooter.svelte +3 -1
- package/footer/SitemapFooter.svelte.d.ts +4 -0
- package/footer/SocialMediaFooter.svelte +4 -2
- package/footer/SocialMediaFooter.svelte.d.ts +4 -0
- package/modals/ExtraLargeModal.svelte.d.ts +2 -2
- package/modals/LargeModal.svelte.d.ts +2 -2
- package/modals/MediumModal.svelte.d.ts +2 -2
- package/modals/SmallModal.svelte.d.ts +2 -2
- package/package.json +34 -10
- package/types.d.ts +23 -0
- package/types.js +1 -0
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (color === "blue") {
|
|
1
|
+
<script >export let textSize = 'text-sm';
|
|
2
|
+
export let color = 'blue';
|
|
3
|
+
export let name = 'Read more';
|
|
4
|
+
let btnClass;
|
|
5
|
+
if (color === 'blue') {
|
|
8
6
|
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`;
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
else if (color === 'green') {
|
|
10
9
|
btnClass = `text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-green-300 dark:focus:ring-green-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
11
|
-
|
|
10
|
+
}
|
|
11
|
+
else if (color === 'cyan') {
|
|
12
12
|
btnClass = `text-white bg-gradient-to-r from-cyan-400 via-cyan-500 to-cyan-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
13
|
-
|
|
13
|
+
}
|
|
14
|
+
else if (color === 'teal') {
|
|
14
15
|
btnClass = `text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-teal-300 dark:focus:ring-teal-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
15
|
-
|
|
16
|
+
}
|
|
17
|
+
else if (color === 'lime') {
|
|
16
18
|
btnClass = `text-gray-900 bg-gradient-to-r from-lime-200 via-lime-400 to-lime-500 hover:bg-gradient-to-br focus:ring-4 focus:ring-lime-300 dark:focus:ring-lime-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
17
|
-
|
|
19
|
+
}
|
|
20
|
+
else if (color === 'red') {
|
|
18
21
|
btnClass = `text-white bg-gradient-to-r from-red-400 via-red-500 to-red-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
19
|
-
|
|
22
|
+
}
|
|
23
|
+
else if (color === 'pink') {
|
|
20
24
|
btnClass = `text-white bg-gradient-to-r from-pink-400 via-pink-500 to-pink-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-pink-300 dark:focus:ring-pink-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
21
|
-
|
|
25
|
+
}
|
|
26
|
+
else if (color === 'purple') {
|
|
22
27
|
btnClass = `text-white bg-gradient-to-r from-purple-500 via-purple-600 to-purple-700 hover:bg-gradient-to-br focus:ring-4 focus:ring-purple-300 dark:focus:ring-purple-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
23
|
-
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
24
30
|
btnClass = `text-white bg-gradient-to-r from-green-400 via-green-500 to-green-600 hover:bg-gradient-to-br focus:ring-4 focus:ring-green-300 dark:focus:ring-green-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
25
|
-
|
|
31
|
+
}
|
|
26
32
|
</script>
|
|
27
33
|
|
|
28
34
|
<button type="button" class={btnClass} on:click>{name}</button>
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} GradientMonochromeButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} GradientMonochromeButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} GradientMonochromeButtonSlots */
|
|
4
|
-
export default class GradientMonochromeButton extends SvelteComponentTyped<{
|
|
5
|
-
textSize?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
}, {
|
|
9
|
-
click: MouseEvent;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
}, {}> {
|
|
13
|
-
}
|
|
14
|
-
export type GradientMonochromeButtonProps = typeof __propDef.props;
|
|
15
|
-
export type GradientMonochromeButtonEvents = typeof __propDef.events;
|
|
16
|
-
export type GradientMonochromeButtonSlots = typeof __propDef.slots;
|
|
17
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Buttonshadows, Textsize } from '../types';
|
|
18
3
|
declare const __propDef: {
|
|
19
4
|
props: {
|
|
20
|
-
textSize?:
|
|
5
|
+
textSize?: Textsize;
|
|
6
|
+
color?: Buttonshadows;
|
|
21
7
|
name?: string;
|
|
22
|
-
color?: string;
|
|
23
8
|
};
|
|
24
9
|
events: {
|
|
25
10
|
click: MouseEvent;
|
|
@@ -28,4 +13,9 @@ declare const __propDef: {
|
|
|
28
13
|
};
|
|
29
14
|
slots: {};
|
|
30
15
|
};
|
|
16
|
+
export declare type GradientMonochromeButtonProps = typeof __propDef.props;
|
|
17
|
+
export declare type GradientMonochromeButtonEvents = typeof __propDef.events;
|
|
18
|
+
export declare type GradientMonochromeButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class GradientMonochromeButton extends SvelteComponentTyped<GradientMonochromeButtonProps, GradientMonochromeButtonEvents, GradientMonochromeButtonSlots> {
|
|
20
|
+
}
|
|
31
21
|
export {};
|
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (color === "purple2blue") {
|
|
1
|
+
<script >export let textSize = 'text-sm';
|
|
2
|
+
export let color = 'purple2blue';
|
|
3
|
+
export let name = 'Read more';
|
|
4
|
+
let btnClass;
|
|
5
|
+
let spanClass;
|
|
6
|
+
if (color === 'purple2blue') {
|
|
9
7
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800`;
|
|
10
8
|
spanClass =
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
10
|
+
}
|
|
11
|
+
else if (color === 'cyan2blue') {
|
|
13
12
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-cyan-500 to-blue-500 group-hover:from-cyan-500 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:ring-cyan-200 dark:focus:ring-cyan-800`;
|
|
14
13
|
spanClass =
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
15
|
+
}
|
|
16
|
+
else if (color === 'green2blue') {
|
|
17
17
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-green-400 to-blue-600 group-hover:from-green-400 group-hover:to-blue-600 hover:text-white dark:text-white focus:ring-4 focus:ring-green-200 dark:focus:ring-green-800`;
|
|
18
18
|
spanClass =
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
20
|
+
}
|
|
21
|
+
else if (color === 'purple2pink') {
|
|
21
22
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-500 to-pink-500 group-hover:from-purple-500 group-hover:to-pink-500 hover:text-white dark:text-white focus:ring-4 focus:ring-purple-200 dark:focus:ring-purple-800`;
|
|
22
23
|
spanClass =
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
25
|
+
}
|
|
26
|
+
else if (color === 'pink2orange') {
|
|
25
27
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-pink-500 to-orange-400 group-hover:from-pink-500 group-hover:to-orange-400 hover:text-white dark:text-white focus:ring-4 focus:ring-pink-200 dark:focus:ring-pink-800`;
|
|
26
28
|
spanClass =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
30
|
+
}
|
|
31
|
+
else if (color === 'teal2lime') {
|
|
29
32
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-teal-300 to-lime-300 group-hover:from-teal-300 group-hover:to-lime-300 dark:text-white dark:hover:text-gray-900 focus:ring-4 focus:ring-lime-200 dark:focus:ring-lime-800`;
|
|
30
33
|
spanClass =
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
35
|
+
}
|
|
36
|
+
else if (color === 'red2yellow') {
|
|
33
37
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-red-200 via-red-300 to-yellow-200 group-hover:from-red-200 group-hover:via-red-300 group-hover:to-yellow-200 dark:text-white dark:hover:text-gray-900 focus:ring-4 focus:ring-red-100 dark:focus:ring-red-400`;
|
|
34
38
|
spanClass =
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
37
42
|
btnClass = `relative inline-flex items-center justify-center p-0.5 mb-2 mr-2 overflow-hidden ${textSize} font-medium text-gray-900 rounded-lg group bg-gradient-to-br from-purple-600 to-blue-500 group-hover:from-purple-600 group-hover:to-blue-500 hover:text-white dark:text-white focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800`;
|
|
38
43
|
spanClass =
|
|
39
|
-
|
|
40
|
-
|
|
44
|
+
'relative px-5 py-2.5 transition-all ease-in duration-75 bg-white dark:bg-gray-900 rounded-md group-hover:bg-opacity-0';
|
|
45
|
+
}
|
|
41
46
|
</script>
|
|
42
47
|
|
|
43
48
|
<button class={btnClass}>
|
|
44
|
-
|
|
49
|
+
<span class={spanClass} on:click>{name}</span>
|
|
45
50
|
</button>
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} GradientOutlineButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} GradientOutlineButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} GradientOutlineButtonSlots */
|
|
4
|
-
export default class GradientOutlineButton extends SvelteComponentTyped<{
|
|
5
|
-
textSize?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
}, {
|
|
9
|
-
click: MouseEvent;
|
|
10
|
-
} & {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
}, {}> {
|
|
13
|
-
}
|
|
14
|
-
export type GradientOutlineButtonProps = typeof __propDef.props;
|
|
15
|
-
export type GradientOutlineButtonEvents = typeof __propDef.events;
|
|
16
|
-
export type GradientOutlineButtonSlots = typeof __propDef.slots;
|
|
17
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Gradientduotones, Textsize } from '../types';
|
|
18
3
|
declare const __propDef: {
|
|
19
4
|
props: {
|
|
20
|
-
textSize?:
|
|
5
|
+
textSize?: Textsize;
|
|
6
|
+
color?: Gradientduotones;
|
|
21
7
|
name?: string;
|
|
22
|
-
color?: string;
|
|
23
8
|
};
|
|
24
9
|
events: {
|
|
25
10
|
click: MouseEvent;
|
|
@@ -28,4 +13,9 @@ declare const __propDef: {
|
|
|
28
13
|
};
|
|
29
14
|
slots: {};
|
|
30
15
|
};
|
|
16
|
+
export declare type GradientOutlineButtonProps = typeof __propDef.props;
|
|
17
|
+
export declare type GradientOutlineButtonEvents = typeof __propDef.events;
|
|
18
|
+
export declare type GradientOutlineButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class GradientOutlineButton extends SvelteComponentTyped<GradientOutlineButtonProps, GradientOutlineButtonEvents, GradientOutlineButtonSlots> {
|
|
20
|
+
}
|
|
31
21
|
export {};
|
package/cards/Card.svelte
CHANGED
|
@@ -1,86 +1,88 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let buttonClass;
|
|
11
|
-
if (btnColor === "blue") {
|
|
1
|
+
<script >export let link;
|
|
2
|
+
export let rel;
|
|
3
|
+
export let alt;
|
|
4
|
+
export let img;
|
|
5
|
+
export let btnLabel = 'Read more';
|
|
6
|
+
export let btnColor = 'blue';
|
|
7
|
+
export let header = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.';
|
|
8
|
+
let buttonClass;
|
|
9
|
+
if (btnColor === 'blue') {
|
|
12
10
|
buttonClass =
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
12
|
+
}
|
|
13
|
+
else if (btnColor === 'gray') {
|
|
15
14
|
buttonClass =
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-gray-700 rounded-lg hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
16
|
+
}
|
|
17
|
+
else if (btnColor === 'red') {
|
|
18
18
|
buttonClass =
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-red-700 rounded-lg hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
20
|
+
}
|
|
21
|
+
else if (btnColor === 'yellow') {
|
|
21
22
|
buttonClass =
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-yellow-700 rounded-lg hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
24
|
+
}
|
|
25
|
+
else if (btnColor === 'green') {
|
|
24
26
|
buttonClass =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-green-700 rounded-lg hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
28
|
+
}
|
|
29
|
+
else if (btnColor === 'indigo') {
|
|
27
30
|
buttonClass =
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-indigo-700 rounded-lg hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
32
|
+
}
|
|
33
|
+
else if (btnColor === 'purple') {
|
|
30
34
|
buttonClass =
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-purple-700 rounded-lg hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
36
|
+
}
|
|
37
|
+
else if (btnColor === 'pink') {
|
|
33
38
|
buttonClass =
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-pink-700 rounded-lg hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
36
42
|
buttonClass =
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
'inline-flex items-center py-2 px-3 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
44
|
+
}
|
|
39
45
|
</script>
|
|
40
46
|
|
|
41
47
|
<div
|
|
42
|
-
|
|
48
|
+
class="max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700"
|
|
43
49
|
>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
>
|
|
62
|
-
{header}
|
|
63
|
-
</h5>
|
|
64
|
-
{/if}
|
|
50
|
+
{#if img}
|
|
51
|
+
<a href={link} {rel}>
|
|
52
|
+
<img class="rounded-t-lg" src={img} {alt} />
|
|
53
|
+
</a>
|
|
54
|
+
{/if}
|
|
55
|
+
<div class="p-5">
|
|
56
|
+
{#if link}
|
|
57
|
+
<a href={link} {rel}>
|
|
58
|
+
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
|
|
59
|
+
{header}
|
|
60
|
+
</h5>
|
|
61
|
+
</a>
|
|
62
|
+
{:else}
|
|
63
|
+
<h5 class="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
|
|
64
|
+
{header}
|
|
65
|
+
</h5>
|
|
66
|
+
{/if}
|
|
65
67
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
68
|
+
<p class="mb-3 font-normal text-gray-700 dark:text-gray-400">
|
|
69
|
+
<slot />
|
|
70
|
+
</p>
|
|
71
|
+
{#if link}
|
|
72
|
+
<a href={link} {rel} class={buttonClass}>
|
|
73
|
+
{btnLabel}
|
|
74
|
+
<svg
|
|
75
|
+
class="ml-2 -mr-1 w-4 h-4"
|
|
76
|
+
fill="currentColor"
|
|
77
|
+
viewBox="0 0 20 20"
|
|
78
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
79
|
+
><path
|
|
80
|
+
fill-rule="evenodd"
|
|
81
|
+
d="M10.293 3.293a1 1 0 011.414 0l6 6a1 1 0 010 1.414l-6 6a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-4.293-4.293a1 1 0 010-1.414z"
|
|
82
|
+
clip-rule="evenodd"
|
|
83
|
+
/></svg
|
|
84
|
+
>
|
|
85
|
+
</a>
|
|
86
|
+
{/if}
|
|
87
|
+
</div>
|
|
86
88
|
</div>
|
package/cards/Card.svelte.d.ts
CHANGED
|
@@ -1,33 +1,14 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CardProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CardEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CardSlots */
|
|
4
|
-
export default class Card extends SvelteComponentTyped<{
|
|
5
|
-
link: any;
|
|
6
|
-
rel: any;
|
|
7
|
-
alt: any;
|
|
8
|
-
img: any;
|
|
9
|
-
header?: string;
|
|
10
|
-
btnLabel?: string;
|
|
11
|
-
btnColor?: string;
|
|
12
|
-
}, {
|
|
13
|
-
[evt: string]: CustomEvent<any>;
|
|
14
|
-
}, {
|
|
15
|
-
default: {};
|
|
16
|
-
}> {
|
|
17
|
-
}
|
|
18
|
-
export type CardProps = typeof __propDef.props;
|
|
19
|
-
export type CardEvents = typeof __propDef.events;
|
|
20
|
-
export type CardSlots = typeof __propDef.slots;
|
|
21
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Colors } from '../types';
|
|
22
3
|
declare const __propDef: {
|
|
23
4
|
props: {
|
|
24
|
-
link:
|
|
25
|
-
rel:
|
|
26
|
-
alt:
|
|
27
|
-
img:
|
|
28
|
-
header?: string;
|
|
5
|
+
link: string;
|
|
6
|
+
rel: string;
|
|
7
|
+
alt: string;
|
|
8
|
+
img: string;
|
|
29
9
|
btnLabel?: string;
|
|
30
|
-
btnColor?:
|
|
10
|
+
btnColor?: Colors;
|
|
11
|
+
header?: string;
|
|
31
12
|
};
|
|
32
13
|
events: {
|
|
33
14
|
[evt: string]: CustomEvent<any>;
|
|
@@ -36,4 +17,9 @@ declare const __propDef: {
|
|
|
36
17
|
default: {};
|
|
37
18
|
};
|
|
38
19
|
};
|
|
20
|
+
export declare type CardProps = typeof __propDef.props;
|
|
21
|
+
export declare type CardEvents = typeof __propDef.events;
|
|
22
|
+
export declare type CardSlots = typeof __propDef.slots;
|
|
23
|
+
export default class Card extends SvelteComponentTyped<CardProps, CardEvents, CardSlots> {
|
|
24
|
+
}
|
|
39
25
|
export {};
|
package/cards/CtaCard.svelte
CHANGED
|
@@ -1,63 +1,64 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export let btns = [
|
|
1
|
+
<script >import Button from '../buttons/Button.svelte';
|
|
2
|
+
export let title = 'Work fast from anywhere';
|
|
3
|
+
export let headColor = 'gray';
|
|
4
|
+
export let btns = [
|
|
6
5
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
rel: undefined,
|
|
12
|
-
rounded: null,
|
|
6
|
+
textSize: 'text-base',
|
|
7
|
+
name: 'Download it',
|
|
8
|
+
type: 'blue',
|
|
9
|
+
link: '/about'
|
|
13
10
|
},
|
|
14
11
|
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
headClass =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
headClass =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
headClass =
|
|
42
|
-
|
|
12
|
+
textSize: 'text-base',
|
|
13
|
+
name: 'Get in on',
|
|
14
|
+
type: 'red-outline',
|
|
15
|
+
link: '/'
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
let headClass;
|
|
19
|
+
if (headColor === 'blue') {
|
|
20
|
+
headClass = 'mb-2 text-3xl font-bold text-blue-900 dark:text-white';
|
|
21
|
+
}
|
|
22
|
+
else if (headColor === 'gray') {
|
|
23
|
+
headClass = 'mb-2 text-3xl font-bold text-gray-900 dark:text-white';
|
|
24
|
+
}
|
|
25
|
+
else if (headColor === 'red') {
|
|
26
|
+
headClass = 'mb-2 text-3xl font-bold text-red-900 dark:text-white';
|
|
27
|
+
}
|
|
28
|
+
else if (headColor === 'yellow') {
|
|
29
|
+
headClass = 'mb-2 text-3xl font-bold text-yellow-900 dark:text-white';
|
|
30
|
+
}
|
|
31
|
+
else if (headColor === 'green') {
|
|
32
|
+
headClass = 'mb-2 text-3xl font-bold text-green-900 dark:text-white';
|
|
33
|
+
}
|
|
34
|
+
else if (headColor === 'indigo') {
|
|
35
|
+
headClass = 'mb-2 text-3xl font-bold text-indigo-900 dark:text-white';
|
|
36
|
+
}
|
|
37
|
+
else if (headColor === 'purple') {
|
|
38
|
+
headClass = 'mb-2 text-3xl font-bold text-purple-900 dark:text-white';
|
|
39
|
+
}
|
|
40
|
+
else if (headColor === 'pink') {
|
|
41
|
+
headClass = 'mb-2 text-3xl font-bold text-pink-900 dark:text-white';
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
headClass = 'mb-2 text-3xl font-bold text-blue-900 dark:text-white';
|
|
45
|
+
}
|
|
43
46
|
</script>
|
|
44
47
|
|
|
45
48
|
<div
|
|
46
|
-
|
|
49
|
+
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"
|
|
47
50
|
>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
{/each}
|
|
62
|
-
</div>
|
|
51
|
+
<h3 class={headClass}>
|
|
52
|
+
{title}
|
|
53
|
+
</h3>
|
|
54
|
+
<p class="mb-5 text-base text-gray-500 sm:text-lg dark:text-gray-400">
|
|
55
|
+
<slot />
|
|
56
|
+
</p>
|
|
57
|
+
<div class="justify-center items-center space-y-4 sm:flex sm:space-y-0 sm:space-x-4">
|
|
58
|
+
{#each btns as { name, textSize, type, link, rel, rounded }}
|
|
59
|
+
<a href={link} {rel}>
|
|
60
|
+
<Button {name} {rounded} {type} {textSize} />
|
|
61
|
+
</a>
|
|
62
|
+
{/each}
|
|
63
|
+
</div>
|
|
63
64
|
</div>
|
|
@@ -1,39 +1,10 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} CtaCardProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} CtaCardEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} CtaCardSlots */
|
|
4
|
-
export default class CtaCard extends SvelteComponentTyped<{
|
|
5
|
-
title?: string;
|
|
6
|
-
headColor?: string;
|
|
7
|
-
btns?: {
|
|
8
|
-
size: string;
|
|
9
|
-
name: string;
|
|
10
|
-
type: string;
|
|
11
|
-
link: string;
|
|
12
|
-
rel: any;
|
|
13
|
-
rounded: any;
|
|
14
|
-
}[];
|
|
15
|
-
}, {
|
|
16
|
-
[evt: string]: CustomEvent<any>;
|
|
17
|
-
}, {
|
|
18
|
-
default: {};
|
|
19
|
-
}> {
|
|
20
|
-
}
|
|
21
|
-
export type CtaCardProps = typeof __propDef.props;
|
|
22
|
-
export type CtaCardEvents = typeof __propDef.events;
|
|
23
|
-
export type CtaCardSlots = typeof __propDef.slots;
|
|
24
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { CardButton, Colors } from '../types';
|
|
25
3
|
declare const __propDef: {
|
|
26
4
|
props: {
|
|
27
5
|
title?: string;
|
|
28
|
-
headColor?:
|
|
29
|
-
btns?:
|
|
30
|
-
size: string;
|
|
31
|
-
name: string;
|
|
32
|
-
type: string;
|
|
33
|
-
link: string;
|
|
34
|
-
rel: any;
|
|
35
|
-
rounded: any;
|
|
36
|
-
}[];
|
|
6
|
+
headColor?: Colors;
|
|
7
|
+
btns?: CardButton[];
|
|
37
8
|
};
|
|
38
9
|
events: {
|
|
39
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -42,4 +13,9 @@ declare const __propDef: {
|
|
|
42
13
|
default: {};
|
|
43
14
|
};
|
|
44
15
|
};
|
|
16
|
+
export declare type CtaCardProps = typeof __propDef.props;
|
|
17
|
+
export declare type CtaCardEvents = typeof __propDef.events;
|
|
18
|
+
export declare type CtaCardSlots = typeof __propDef.slots;
|
|
19
|
+
export default class CtaCard extends SvelteComponentTyped<CtaCardProps, CtaCardEvents, CtaCardSlots> {
|
|
20
|
+
}
|
|
45
21
|
export {};
|