flowbite-svelte 0.9.0 → 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/accordions/AccordionDefault.svelte +20 -21
- package/accordions/AccordionDefault.svelte.d.ts +6 -19
- package/alerts/Alert.svelte +1 -2
- package/alerts/Alert.svelte.d.ts +2 -1
- package/alerts/BorderAlert.svelte +1 -2
- package/alerts/BorderAlert.svelte.d.ts +2 -1
- package/alerts/InfoAlert.svelte +1 -2
- package/alerts/InfoAlert.svelte.d.ts +2 -1
- 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 +9 -20
- 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 +4 -4
- 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 +9 -2
- package/types.d.ts +23 -0
- package/types.js +1 -0
|
@@ -1,70 +1,58 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export let buttons = [
|
|
1
|
+
<script >export let buttons = [
|
|
3
2
|
{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
rel: "",
|
|
7
|
-
icon: "",
|
|
3
|
+
name: 'Profile',
|
|
4
|
+
link: '/'
|
|
8
5
|
},
|
|
9
6
|
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
rel: "",
|
|
13
|
-
icon: "",
|
|
7
|
+
name: 'Settings',
|
|
8
|
+
link: '/'
|
|
14
9
|
},
|
|
15
10
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let classFirst =
|
|
26
|
-
"inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent rounded-l-lg border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700";
|
|
27
|
-
let classMiddle =
|
|
28
|
-
"inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent border-t border-b border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700";
|
|
29
|
-
let classLast =
|
|
30
|
-
"inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent rounded-r-md border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700";
|
|
11
|
+
name: 'Messages',
|
|
12
|
+
link: '/'
|
|
13
|
+
}
|
|
14
|
+
];
|
|
15
|
+
let btnLength = buttons.length;
|
|
16
|
+
let classFirst = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent rounded-l-lg border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
|
17
|
+
let classMiddle = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent border-t border-b border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
|
18
|
+
let classLast = 'inline-flex items-center py-2 px-4 text-sm font-medium text-gray-900 bg-transparent rounded-r-md border border-gray-900 hover:bg-gray-900 hover:text-white focus:z-10 focus:ring-2 focus:ring-gray-500 focus:bg-gray-900 focus:text-white dark:border-white dark:text-white dark:hover:text-white dark:hover:bg-gray-700 dark:focus:bg-gray-700';
|
|
31
19
|
</script>
|
|
32
20
|
|
|
33
21
|
<div class="inline-flex rounded-md shadow-sm">
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
22
|
+
{#each buttons as { link, name, rel, icon }, i}
|
|
23
|
+
{#if i === 0}
|
|
24
|
+
<button type="button" class={classFirst}>
|
|
25
|
+
{#if icon}
|
|
26
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
27
|
+
{/if}
|
|
28
|
+
{#if link}
|
|
29
|
+
<a href={link} {rel}>{name}</a>
|
|
30
|
+
{:else}
|
|
31
|
+
{name}
|
|
32
|
+
{/if}
|
|
33
|
+
</button>
|
|
34
|
+
{:else if i === btnLength - 1}
|
|
35
|
+
<button type="button" class={classLast}>
|
|
36
|
+
{#if icon}
|
|
37
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
38
|
+
{/if}
|
|
39
|
+
{#if link}
|
|
40
|
+
<a href={link} {rel}>{name}</a>
|
|
41
|
+
{:else}
|
|
42
|
+
{name}
|
|
43
|
+
{/if}
|
|
44
|
+
</button>
|
|
45
|
+
{:else}
|
|
46
|
+
<button type="button" class={classMiddle}>
|
|
47
|
+
{#if icon}
|
|
48
|
+
<svelte:component this={icon} className="h-4 w-4 mr-2" />
|
|
49
|
+
{/if}
|
|
50
|
+
{#if link}
|
|
51
|
+
<a href={link} {rel}>{name}</a>
|
|
52
|
+
{:else}
|
|
53
|
+
{name}
|
|
54
|
+
{/if}
|
|
55
|
+
</button>
|
|
56
|
+
{/if}
|
|
57
|
+
{/each}
|
|
70
58
|
</div>
|
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ButtonGroupOutlineProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ButtonGroupOutlineEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ButtonGroupOutlineSlots */
|
|
4
|
-
export default class ButtonGroupOutline extends SvelteComponentTyped<{
|
|
5
|
-
buttons?: {
|
|
6
|
-
name: string;
|
|
7
|
-
link: string;
|
|
8
|
-
rel: string;
|
|
9
|
-
icon: string;
|
|
10
|
-
}[];
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}> {
|
|
14
|
-
}
|
|
15
|
-
export type ButtonGroupOutlineProps = typeof __propDef.props;
|
|
16
|
-
export type ButtonGroupOutlineEvents = typeof __propDef.events;
|
|
17
|
-
export type ButtonGroupOutlineSlots = typeof __propDef.slots;
|
|
18
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { ButtonGroupType } from '../types';
|
|
19
3
|
declare const __propDef: {
|
|
20
4
|
props: {
|
|
21
|
-
buttons?:
|
|
22
|
-
name: string;
|
|
23
|
-
link: string;
|
|
24
|
-
rel: string;
|
|
25
|
-
icon: string;
|
|
26
|
-
}[];
|
|
5
|
+
buttons?: ButtonGroupType[];
|
|
27
6
|
};
|
|
28
7
|
events: {
|
|
29
8
|
[evt: string]: CustomEvent<any>;
|
|
30
9
|
};
|
|
31
10
|
slots: {};
|
|
32
11
|
};
|
|
12
|
+
export declare type ButtonGroupOutlineProps = typeof __propDef.props;
|
|
13
|
+
export declare type ButtonGroupOutlineEvents = typeof __propDef.events;
|
|
14
|
+
export declare type ButtonGroupOutlineSlots = typeof __propDef.slots;
|
|
15
|
+
export default class ButtonGroupOutline extends SvelteComponentTyped<ButtonGroupOutlineProps, ButtonGroupOutlineEvents, ButtonGroupOutlineSlots> {
|
|
16
|
+
}
|
|
33
17
|
export {};
|
package/buttons/Button.svelte
CHANGED
|
@@ -1,53 +1,66 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
paddings =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
<script >export let rounded = false;
|
|
2
|
+
export let textSize = 'text-sm';
|
|
3
|
+
export let name = 'Read more';
|
|
4
|
+
export let type = 'blue';
|
|
5
|
+
let paddings;
|
|
6
|
+
if (textSize === 'text-xs') {
|
|
7
|
+
paddings = 'py-2 px-3';
|
|
8
|
+
}
|
|
9
|
+
else if (textSize === 'text-sm') {
|
|
10
|
+
paddings = 'py-2.5 px-5';
|
|
11
|
+
}
|
|
12
|
+
else if (textSize === 'text-base') {
|
|
13
|
+
paddings = 'py-3 px-6';
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
paddings = 'py-2.5 px-5';
|
|
17
|
+
}
|
|
18
|
+
let buttonClass;
|
|
19
|
+
let round = rounded ? 'rounded-full' : 'rounded-lg';
|
|
20
|
+
if (type === 'blue') {
|
|
21
21
|
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
|
-
|
|
22
|
+
}
|
|
23
|
+
else if (type === 'blue-outline') {
|
|
23
24
|
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`;
|
|
24
|
-
|
|
25
|
+
}
|
|
26
|
+
else if (type === 'dark') {
|
|
25
27
|
buttonClass =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
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
|
+
else if (type === 'dark-outline') {
|
|
28
31
|
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`;
|
|
29
|
-
|
|
32
|
+
}
|
|
33
|
+
else if (type === 'light') {
|
|
30
34
|
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`;
|
|
31
|
-
|
|
35
|
+
}
|
|
36
|
+
else if (type === 'green') {
|
|
32
37
|
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`;
|
|
33
|
-
|
|
38
|
+
}
|
|
39
|
+
else if (type === 'green-outline') {
|
|
34
40
|
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`;
|
|
35
|
-
|
|
41
|
+
}
|
|
42
|
+
else if (type === 'red') {
|
|
36
43
|
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`;
|
|
37
|
-
|
|
44
|
+
}
|
|
45
|
+
else if (type === 'red-outline') {
|
|
38
46
|
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`;
|
|
39
|
-
|
|
47
|
+
}
|
|
48
|
+
else if (type === 'yellow') {
|
|
40
49
|
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`;
|
|
41
|
-
|
|
50
|
+
}
|
|
51
|
+
else if (type === 'yellow-outline') {
|
|
42
52
|
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`;
|
|
43
|
-
|
|
53
|
+
}
|
|
54
|
+
else if (type === 'purple') {
|
|
44
55
|
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`;
|
|
45
|
-
|
|
56
|
+
}
|
|
57
|
+
else if (type === 'purple-outline') {
|
|
46
58
|
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`;
|
|
47
|
-
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
48
61
|
// blue
|
|
49
62
|
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`;
|
|
50
|
-
|
|
63
|
+
}
|
|
51
64
|
</script>
|
|
52
65
|
|
|
53
66
|
<button type="button" class={buttonClass} on:click>{name}</button>
|
|
@@ -1,27 +1,11 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} ButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ButtonSlots */
|
|
4
|
-
export default class Button extends SvelteComponentTyped<{
|
|
5
|
-
textSize?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
rounded?: boolean;
|
|
8
|
-
type?: string;
|
|
9
|
-
}, {
|
|
10
|
-
click: MouseEvent;
|
|
11
|
-
} & {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}> {
|
|
14
|
-
}
|
|
15
|
-
export type ButtonProps = typeof __propDef.props;
|
|
16
|
-
export type ButtonEvents = typeof __propDef.events;
|
|
17
|
-
export type ButtonSlots = typeof __propDef.slots;
|
|
18
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { Buttontypes, Textsize } from '../types';
|
|
19
3
|
declare const __propDef: {
|
|
20
4
|
props: {
|
|
21
|
-
textSize?: string;
|
|
22
|
-
name?: string;
|
|
23
5
|
rounded?: boolean;
|
|
24
|
-
|
|
6
|
+
textSize?: Textsize;
|
|
7
|
+
name?: string;
|
|
8
|
+
type?: Buttontypes;
|
|
25
9
|
};
|
|
26
10
|
events: {
|
|
27
11
|
click: MouseEvent;
|
|
@@ -30,4 +14,9 @@ declare const __propDef: {
|
|
|
30
14
|
};
|
|
31
15
|
slots: {};
|
|
32
16
|
};
|
|
17
|
+
export declare type ButtonProps = typeof __propDef.props;
|
|
18
|
+
export declare type ButtonEvents = typeof __propDef.events;
|
|
19
|
+
export declare type ButtonSlots = typeof __propDef.slots;
|
|
20
|
+
export default class Button extends SvelteComponentTyped<ButtonProps, ButtonEvents, ButtonSlots> {
|
|
21
|
+
}
|
|
33
22
|
export {};
|
|
@@ -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 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`;
|
|
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 shadow-lg shadow-green-500/50 dark:shadow-lg dark:shadow-green-800/80 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 shadow-lg shadow-cyan-500/50 dark:shadow-lg dark:shadow-cyan-800/80 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 shadow-lg shadow-teal-500/50 dark:shadow-lg dark:shadow-teal-800/80 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 shadow-lg shadow-lime-500/50 dark:shadow-lg dark:shadow-lime-800/80 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 shadow-lg shadow-red-500/50 dark:shadow-lg dark:shadow-red-800/80 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 shadow-lg shadow-pink-500/50 dark:shadow-lg dark:shadow-pink-800/80 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 shadow-lg shadow-purple-500/50 dark:shadow-lg dark:shadow-purple-800/80 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-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`;
|
|
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} ColorShadowButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} ColorShadowButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} ColorShadowButtonSlots */
|
|
4
|
-
export default class ColorShadowButton 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 ColorShadowButtonProps = typeof __propDef.props;
|
|
15
|
-
export type ColorShadowButtonEvents = typeof __propDef.events;
|
|
16
|
-
export type ColorShadowButtonSlots = 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 ColorShadowButtonProps = typeof __propDef.props;
|
|
17
|
+
export declare type ColorShadowButtonEvents = typeof __propDef.events;
|
|
18
|
+
export declare type ColorShadowButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class ColorShadowButton extends SvelteComponentTyped<ColorShadowButtonProps, ColorShadowButtonEvents, ColorShadowButtonSlots> {
|
|
20
|
+
}
|
|
31
21
|
export {};
|
|
@@ -1,26 +1,31 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
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
|
+
if (color === 'purple2blue') {
|
|
8
6
|
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`;
|
|
9
|
-
|
|
7
|
+
}
|
|
8
|
+
else if (color === 'cyan2blue') {
|
|
10
9
|
btnClass = `text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl 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`;
|
|
11
|
-
|
|
10
|
+
}
|
|
11
|
+
else if (color === 'green2blue') {
|
|
12
12
|
btnClass = `text-white bg-gradient-to-br from-green-400 to-blue-600 hover:bg-gradient-to-bl focus:ring-4 focus:ring-green-200 dark:focus:ring-green-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
13
|
-
|
|
13
|
+
}
|
|
14
|
+
else if (color === 'purple2pink') {
|
|
14
15
|
btnClass = `text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:ring-purple-200 dark:focus:ring-purple-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
15
|
-
|
|
16
|
+
}
|
|
17
|
+
else if (color === 'pink2orange') {
|
|
16
18
|
btnClass = `text-white bg-gradient-to-br from-pink-500 to-orange-400 hover:bg-gradient-to-bl focus:ring-4 focus:ring-pink-200 dark:focus:ring-pink-800 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
17
|
-
|
|
19
|
+
}
|
|
20
|
+
else if (color === 'teal2lime') {
|
|
18
21
|
btnClass = `text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:ring-lime-200 dark:focus:ring-teal-700 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2`;
|
|
19
|
-
|
|
22
|
+
}
|
|
23
|
+
else if (color === 'red2yellow') {
|
|
20
24
|
btnClass = `text-gray-900 bg-gradient-to-r from-red-200 via-red-300 to-yellow-200 hover:bg-gradient-to-bl focus:ring-4 focus:ring-red-100 dark:focus:ring-red-400 font-medium rounded-lg ${textSize} px-5 py-2.5 text-center mr-2 mb-2`;
|
|
21
|
-
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
22
27
|
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`;
|
|
23
|
-
|
|
28
|
+
}
|
|
24
29
|
</script>
|
|
25
30
|
|
|
26
31
|
<button type="button" class={btnClass} on:click>{name}</button>
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} GradientDuotoneButtonProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} GradientDuotoneButtonEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} GradientDuotoneButtonSlots */
|
|
4
|
-
export default class GradientDuotoneButton 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 GradientDuotoneButtonProps = typeof __propDef.props;
|
|
15
|
-
export type GradientDuotoneButtonEvents = typeof __propDef.events;
|
|
16
|
-
export type GradientDuotoneButtonSlots = 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 GradientDuotoneButtonProps = typeof __propDef.props;
|
|
17
|
+
export declare type GradientDuotoneButtonEvents = typeof __propDef.events;
|
|
18
|
+
export declare type GradientDuotoneButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class GradientDuotoneButton extends SvelteComponentTyped<GradientDuotoneButtonProps, GradientDuotoneButtonEvents, GradientDuotoneButtonSlots> {
|
|
20
|
+
}
|
|
31
21
|
export {};
|
|
@@ -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 {};
|