flowbite-svelte 0.15.22 → 0.15.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/alerts/Alert.svelte +72 -99
- package/alerts/Alert.svelte.d.ts +8 -4
- package/badges/Badge.svelte +10 -13
- package/badges/BadgeIcon.svelte +10 -13
- package/badges/BadgeLink.svelte +10 -13
- package/buttongroups/ButtonGroup.svelte +7 -6
- package/buttongroups/ButtonGroupOutline.svelte +7 -6
- package/buttons/ColorShadowButton.svelte +10 -13
- package/buttons/GradientDuotoneButton.svelte +9 -12
- package/buttons/GradientMonochromeButton.svelte +10 -13
- package/buttons/GradientOutlineButton.svelte +10 -21
- package/cards/Card.svelte +10 -13
- package/cards/CtaCard.svelte +9 -12
- package/cards/EcommerceCard.svelte +19 -23
- package/cards/InteractiveCard.svelte +10 -13
- package/cards/SignInCard.svelte +10 -10
- package/dropdowns/DropdownDefault.svelte +15 -19
- package/forms/Checkbox.svelte +8 -8
- package/forms/RadioItem.svelte +8 -8
- package/forms/Range.svelte +4 -4
- package/index.d.ts +0 -2
- package/index.js +0 -2
- package/package.json +1 -3
- package/alerts/BorderAlert.svelte +0 -79
- package/alerts/BorderAlert.svelte.d.ts +0 -21
- package/alerts/InfoAlert.svelte +0 -120
- package/alerts/InfoAlert.svelte.d.ts +0 -23
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Colors } from '../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
color?: Colors;
|
|
6
|
-
alertId?: string;
|
|
7
|
-
closeBtn?: boolean;
|
|
8
|
-
};
|
|
9
|
-
events: {
|
|
10
|
-
[evt: string]: CustomEvent<any>;
|
|
11
|
-
};
|
|
12
|
-
slots: {
|
|
13
|
-
default: {};
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
export declare type BorderAlertProps = typeof __propDef.props;
|
|
17
|
-
export declare type BorderAlertEvents = typeof __propDef.events;
|
|
18
|
-
export declare type BorderAlertSlots = typeof __propDef.slots;
|
|
19
|
-
export default class BorderAlert extends SvelteComponentTyped<BorderAlertProps, BorderAlertEvents, BorderAlertSlots> {
|
|
20
|
-
}
|
|
21
|
-
export {};
|
package/alerts/InfoAlert.svelte
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
<script>export let color = 'blue';
|
|
2
|
-
export let alertId = 'alert-additional-content-1';
|
|
3
|
-
export let infoLink = undefined;
|
|
4
|
-
export let closeBtn = false;
|
|
5
|
-
let hidden = false;
|
|
6
|
-
const handleHide = () => {
|
|
7
|
-
hidden = !hidden;
|
|
8
|
-
};
|
|
9
|
-
let divClass;
|
|
10
|
-
let svgClass;
|
|
11
|
-
let slotClass;
|
|
12
|
-
let buttonClass;
|
|
13
|
-
if (color === 'blue') {
|
|
14
|
-
divClass = 'p-4 mb-4 bg-blue-100 rounded-lg dark:bg-blue-200';
|
|
15
|
-
svgClass = 'mr-2 w-5 h-5 text-blue-700 dark:text-blue-800';
|
|
16
|
-
slotClass = 'mt-2 mb-4 text-sm text-blue-700 dark:text-blue-800';
|
|
17
|
-
buttonClass =
|
|
18
|
-
'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-blue-800 dark:hover:bg-blue-900';
|
|
19
|
-
}
|
|
20
|
-
else if (color === 'gray') {
|
|
21
|
-
divClass = 'p-4 mb-4 bg-gray-100 rounded-lg dark:bg-gray-200';
|
|
22
|
-
svgClass = 'mr-2 w-5 h-5 text-gray-700 dark:text-gray-800';
|
|
23
|
-
slotClass = 'mt-2 mb-4 text-sm text-gray-700 dark:text-gray-800';
|
|
24
|
-
buttonClass =
|
|
25
|
-
'text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-gray-800 dark:hover:bg-gray-900';
|
|
26
|
-
}
|
|
27
|
-
else if (color === 'red') {
|
|
28
|
-
divClass = 'p-4 mb-4 bg-red-100 rounded-lg dark:bg-red-200';
|
|
29
|
-
svgClass = 'mr-2 w-5 h-5 text-red-700 dark:text-red-800';
|
|
30
|
-
slotClass = 'mt-2 mb-4 text-sm text-red-700 dark:text-red-800';
|
|
31
|
-
buttonClass =
|
|
32
|
-
'text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-red-800 dark:hover:bg-red-900';
|
|
33
|
-
}
|
|
34
|
-
else if (color === 'yellow') {
|
|
35
|
-
divClass = 'p-4 mb-4 bg-yellow-100 rounded-lg dark:bg-yellow-200';
|
|
36
|
-
svgClass = 'mr-2 w-5 h-5 text-yellow-700 dark:text-yellow-800';
|
|
37
|
-
slotClass = 'mt-2 mb-4 text-sm text-yellow-700 dark:text-yellow-800';
|
|
38
|
-
buttonClass =
|
|
39
|
-
'text-white bg-yellow-700 hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-yellow-800 dark:hover:bg-yellow-900';
|
|
40
|
-
}
|
|
41
|
-
else if (color === 'green') {
|
|
42
|
-
divClass = 'p-4 mb-4 bg-green-100 rounded-lg dark:bg-green-200';
|
|
43
|
-
svgClass = 'mr-2 w-5 h-5 text-green-700 dark:text-green-800';
|
|
44
|
-
slotClass = 'mt-2 mb-4 text-sm text-green-700 dark:text-green-800';
|
|
45
|
-
buttonClass =
|
|
46
|
-
'text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-green-800 dark:hover:bg-green-900';
|
|
47
|
-
}
|
|
48
|
-
else if (color === 'indigo') {
|
|
49
|
-
divClass = 'p-4 mb-4 bg-indigo-100 rounded-lg dark:bg-indigo-200';
|
|
50
|
-
svgClass = 'mr-2 w-5 h-5 text-indigo-700 dark:text-indigo-800';
|
|
51
|
-
slotClass = 'mt-2 mb-4 text-sm text-indigo-700 dark:text-indigo-800';
|
|
52
|
-
buttonClass =
|
|
53
|
-
'text-white bg-indigo-700 hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-indigo-800 dark:hover:bg-indigo-900';
|
|
54
|
-
}
|
|
55
|
-
else if (color === 'purple') {
|
|
56
|
-
divClass = 'p-4 mb-4 bg-purple-100 rounded-lg dark:bg-purple-200';
|
|
57
|
-
svgClass = 'mr-2 w-5 h-5 text-purple-700 dark:text-purple-800';
|
|
58
|
-
slotClass = 'mt-2 mb-4 text-sm text-purple-700 dark:text-purple-800';
|
|
59
|
-
buttonClass =
|
|
60
|
-
'text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-purple-800 dark:hover:bg-purple-900';
|
|
61
|
-
}
|
|
62
|
-
else if (color === 'pink') {
|
|
63
|
-
divClass = 'p-4 mb-4 bg-pink-100 rounded-lg dark:bg-pink-200';
|
|
64
|
-
svgClass = 'mr-2 w-5 h-5 text-pink-700 dark:text-pink-800';
|
|
65
|
-
slotClass = 'mt-2 mb-4 text-sm text-pink-700 dark:text-pink-800';
|
|
66
|
-
buttonClass =
|
|
67
|
-
'text-white bg-pink-700 hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-pink-800 dark:hover:bg-pink-900';
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
divClass = 'p-4 mb-4 bg-blue-100 rounded-lg dark:bg-blue-200';
|
|
71
|
-
svgClass = 'mr-2 w-5 h-5 text-blue-700 dark:text-blue-800';
|
|
72
|
-
slotClass = 'mt-2 mb-4 text-sm text-blue-700 dark:text-blue-800';
|
|
73
|
-
buttonClass =
|
|
74
|
-
'text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-blue-800 dark:hover:bg-blue-900';
|
|
75
|
-
}
|
|
76
|
-
</script>
|
|
77
|
-
|
|
78
|
-
<div id={alertId} class:hidden class={divClass} role="alert">
|
|
79
|
-
<div class="flex items-center">
|
|
80
|
-
<svg class={svgClass} fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
|
81
|
-
><path
|
|
82
|
-
fill-rule="evenodd"
|
|
83
|
-
d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z"
|
|
84
|
-
clip-rule="evenodd"
|
|
85
|
-
/></svg
|
|
86
|
-
>
|
|
87
|
-
<h3 class="text-lg font-medium text-{color}-700 dark:text-{color}-800">
|
|
88
|
-
<slot name="header">No header was provided</slot>
|
|
89
|
-
</h3>
|
|
90
|
-
</div>
|
|
91
|
-
<div class={slotClass}>
|
|
92
|
-
<slot>No content was provided.</slot>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="flex">
|
|
95
|
-
{#if infoLink}
|
|
96
|
-
<button
|
|
97
|
-
type="button"
|
|
98
|
-
class="text-white bg-{color}-700 hover:bg-{color}-800 focus:ring-4 focus:ring-{color}-300 font-medium rounded-lg text-xs px-3 py-1.5 mr-2 text-center inline-flex items-center dark:bg-{color}-800 dark:hover:bg-{color}-900"
|
|
99
|
-
>
|
|
100
|
-
<svg
|
|
101
|
-
class="-ml-0.5 mr-2 h-4 w-4"
|
|
102
|
-
fill="currentColor"
|
|
103
|
-
viewBox="0 0 20 20"
|
|
104
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
105
|
-
><path d="M10 12a2 2 0 100-4 2 2 0 000 4z" /><path
|
|
106
|
-
fill-rule="evenodd"
|
|
107
|
-
d="M.458 10C1.732 5.943 5.522 3 10 3s8.268 2.943 9.542 7c-1.274 4.057-5.064 7-9.542 7S1.732 14.057.458 10zM14 10a4 4 0 11-8 0 4 4 0 018 0z"
|
|
108
|
-
clip-rule="evenodd"
|
|
109
|
-
/></svg
|
|
110
|
-
>
|
|
111
|
-
<a href={infoLink} rel="external">View more</a>
|
|
112
|
-
</button>
|
|
113
|
-
{/if}
|
|
114
|
-
{#if closeBtn}
|
|
115
|
-
<button on:click={handleHide} type="button" class={buttonClass} aria-label="Close">
|
|
116
|
-
Dismiss
|
|
117
|
-
</button>
|
|
118
|
-
{/if}
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { Colors } from '../types';
|
|
3
|
-
declare const __propDef: {
|
|
4
|
-
props: {
|
|
5
|
-
color?: Colors;
|
|
6
|
-
alertId?: string;
|
|
7
|
-
infoLink?: string;
|
|
8
|
-
closeBtn?: boolean;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {
|
|
14
|
-
header: {};
|
|
15
|
-
default: {};
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export declare type InfoAlertProps = typeof __propDef.props;
|
|
19
|
-
export declare type InfoAlertEvents = typeof __propDef.events;
|
|
20
|
-
export declare type InfoAlertSlots = typeof __propDef.slots;
|
|
21
|
-
export default class InfoAlert extends SvelteComponentTyped<InfoAlertProps, InfoAlertEvents, InfoAlertSlots> {
|
|
22
|
-
}
|
|
23
|
-
export {};
|