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
|
@@ -1,174 +1,165 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const closeModal = () => {
|
|
15
|
-
modalIdStore.update((value) => {
|
|
16
|
-
value = null;
|
|
17
|
-
});
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export let showModalId;
|
|
21
|
-
modalIdStore.subscribe((value) => {
|
|
1
|
+
<script >import { modalIdStore } from './modalStores';
|
|
2
|
+
export let id = 'signin-modal';
|
|
3
|
+
export let btnSignInColor = 'blue';
|
|
4
|
+
export let titleSignIn = 'Sign in to our platform';
|
|
5
|
+
export let lostPasswordLink;
|
|
6
|
+
export let rememberMe = false;
|
|
7
|
+
export let signUp;
|
|
8
|
+
export let action;
|
|
9
|
+
const closeModal = () => {
|
|
10
|
+
modalIdStore.update((value) => (value = null));
|
|
11
|
+
};
|
|
12
|
+
export let showModalId;
|
|
13
|
+
modalIdStore.subscribe((value) => {
|
|
22
14
|
showModalId = value;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
if (btnSignInColor === "blue") {
|
|
15
|
+
});
|
|
16
|
+
let submitClass;
|
|
17
|
+
if (btnSignInColor === 'blue') {
|
|
28
18
|
submitClass =
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
'w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
20
|
+
}
|
|
21
|
+
else if (btnSignInColor === 'gray') {
|
|
31
22
|
submitClass =
|
|
32
|
-
|
|
33
|
-
|
|
23
|
+
'w-full text-white bg-gray-700 hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
|
|
24
|
+
}
|
|
25
|
+
else if (btnSignInColor === 'red') {
|
|
34
26
|
submitClass =
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
'w-full text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
|
|
28
|
+
}
|
|
29
|
+
else if (btnSignInColor === 'yellow') {
|
|
37
30
|
submitClass =
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
'w-full text-white bg-yellow-700 hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
|
|
32
|
+
}
|
|
33
|
+
else if (btnSignInColor === 'green') {
|
|
40
34
|
submitClass =
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
'w-full text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
|
|
36
|
+
}
|
|
37
|
+
else if (btnSignInColor === 'indigo') {
|
|
43
38
|
submitClass =
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
'w-full text-white bg-indigo-700 hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
|
|
40
|
+
}
|
|
41
|
+
else if (btnSignInColor === 'purple') {
|
|
46
42
|
submitClass =
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
'w-full text-white bg-purple-700 hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
|
|
44
|
+
}
|
|
45
|
+
else if (btnSignInColor === 'pink') {
|
|
49
46
|
submitClass =
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
'w-full text-white bg-pink-700 hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
52
50
|
submitClass =
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
'w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
|
|
52
|
+
}
|
|
55
53
|
</script>
|
|
56
54
|
|
|
57
55
|
{#if showModalId === id}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
</div>
|
|
168
|
-
</div>
|
|
169
|
-
</div>
|
|
170
|
-
<div
|
|
171
|
-
on:click={closeModal}
|
|
172
|
-
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full"
|
|
173
|
-
/>
|
|
56
|
+
<div
|
|
57
|
+
{id}
|
|
58
|
+
role="dialog"
|
|
59
|
+
aria-modal="true"
|
|
60
|
+
class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center"
|
|
61
|
+
>
|
|
62
|
+
<div class="relative px-4 w-full max-w-md h-full md:h-auto">
|
|
63
|
+
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
|
64
|
+
<div class="flex justify-end p-2">
|
|
65
|
+
<button
|
|
66
|
+
type="button"
|
|
67
|
+
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"
|
|
68
|
+
on:click={closeModal}
|
|
69
|
+
>
|
|
70
|
+
<svg
|
|
71
|
+
class="w-5 h-5"
|
|
72
|
+
fill="currentColor"
|
|
73
|
+
viewBox="0 0 20 20"
|
|
74
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
75
|
+
><path
|
|
76
|
+
fill-rule="evenodd"
|
|
77
|
+
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
|
|
78
|
+
clip-rule="evenodd"
|
|
79
|
+
/></svg
|
|
80
|
+
>
|
|
81
|
+
</button>
|
|
82
|
+
</div>
|
|
83
|
+
<form class="px-6 pb-4 space-y-6 lg:px-8 sm:pb-6 xl:pb-8" {action}>
|
|
84
|
+
<h3 class="text-xl font-medium text-gray-900 dark:text-white">
|
|
85
|
+
{titleSignIn}
|
|
86
|
+
</h3>
|
|
87
|
+
<div>
|
|
88
|
+
<label
|
|
89
|
+
for="email-{id}"
|
|
90
|
+
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
91
|
+
>Your email</label
|
|
92
|
+
>
|
|
93
|
+
<input
|
|
94
|
+
type="email"
|
|
95
|
+
name="email"
|
|
96
|
+
id="email-{id}"
|
|
97
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
|
|
98
|
+
placeholder="name@company.com"
|
|
99
|
+
required
|
|
100
|
+
/>
|
|
101
|
+
</div>
|
|
102
|
+
<div>
|
|
103
|
+
<label
|
|
104
|
+
for="password-{id}"
|
|
105
|
+
class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
|
|
106
|
+
>Your password</label
|
|
107
|
+
>
|
|
108
|
+
<input
|
|
109
|
+
type="password"
|
|
110
|
+
name="password"
|
|
111
|
+
id="password-{id}"
|
|
112
|
+
placeholder="••••••••"
|
|
113
|
+
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
|
|
114
|
+
required
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="flex justify-between">
|
|
118
|
+
{#if rememberMe}
|
|
119
|
+
<div class="flex items-start">
|
|
120
|
+
<div class="flex items-center h-5">
|
|
121
|
+
<input
|
|
122
|
+
id="remember-{id}"
|
|
123
|
+
aria-describedby="remember"
|
|
124
|
+
type="checkbox"
|
|
125
|
+
class="w-4 h-4 bg-gray-50 rounded border border-gray-300 focus:ring-3 focus:ring-blue-300 dark:bg-gray-700 dark:border-gray-600 dark:focus:ring-blue-600 dark:ring-offset-gray-800"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<div class="ml-3 text-sm">
|
|
129
|
+
<label for="remember" class="font-medium text-gray-900 dark:text-gray-300"
|
|
130
|
+
>Remember me</label
|
|
131
|
+
>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
{/if}
|
|
135
|
+
{#if lostPasswordLink}
|
|
136
|
+
<a
|
|
137
|
+
href={lostPasswordLink}
|
|
138
|
+
rel="external"
|
|
139
|
+
class="text-sm text-blue-700 hover:underline dark:text-blue-500"
|
|
140
|
+
><button type="button" on:click={closeModal}>Lost Password?</button></a
|
|
141
|
+
>
|
|
142
|
+
{/if}
|
|
143
|
+
</div>
|
|
144
|
+
<button type="submit" class={submitClass} on:click={closeModal}
|
|
145
|
+
>Login to your account</button
|
|
146
|
+
>
|
|
147
|
+
{#if signUp}
|
|
148
|
+
<div class="text-sm font-medium text-gray-500 dark:text-gray-300">
|
|
149
|
+
Not registered? <a
|
|
150
|
+
href={signUp}
|
|
151
|
+
rel="external"
|
|
152
|
+
class="text-blue-700 hover:underline dark:text-blue-500"
|
|
153
|
+
><button type="button" on:click={closeModal}>Create account</button></a
|
|
154
|
+
>
|
|
155
|
+
</div>
|
|
156
|
+
{/if}
|
|
157
|
+
</form>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
<div
|
|
162
|
+
on:click={closeModal}
|
|
163
|
+
class="bg-gray-900 bg-opacity-50 dark:bg-opacity-80 fixed inset-0 z-40 w-full h-full"
|
|
164
|
+
/>
|
|
174
165
|
{/if}
|
|
@@ -1,37 +1,23 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} SignInModalProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} SignInModalEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} SignInModalSlots */
|
|
4
|
-
export default class SignInModal extends SvelteComponentTyped<{
|
|
5
|
-
action: any;
|
|
6
|
-
lostPasswordLink: any;
|
|
7
|
-
showModalId: any;
|
|
8
|
-
signUp: any;
|
|
9
|
-
id?: string;
|
|
10
|
-
btnSignInColor?: string;
|
|
11
|
-
rememberMe?: boolean;
|
|
12
|
-
titleSignIn?: string;
|
|
13
|
-
}, {
|
|
14
|
-
[evt: string]: CustomEvent<any>;
|
|
15
|
-
}, {}> {
|
|
16
|
-
}
|
|
17
|
-
export type SignInModalProps = typeof __propDef.props;
|
|
18
|
-
export type SignInModalEvents = typeof __propDef.events;
|
|
19
|
-
export type SignInModalSlots = typeof __propDef.slots;
|
|
20
1
|
import { SvelteComponentTyped } from "svelte";
|
|
21
2
|
declare const __propDef: {
|
|
22
3
|
props: {
|
|
23
|
-
action: any;
|
|
24
|
-
lostPasswordLink: any;
|
|
25
|
-
showModalId: any;
|
|
26
|
-
signUp: any;
|
|
27
4
|
id?: string;
|
|
28
5
|
btnSignInColor?: string;
|
|
29
|
-
rememberMe?: boolean;
|
|
30
6
|
titleSignIn?: string;
|
|
7
|
+
lostPasswordLink: string;
|
|
8
|
+
rememberMe?: boolean;
|
|
9
|
+
signUp: string;
|
|
10
|
+
action: string;
|
|
11
|
+
showModalId: string;
|
|
31
12
|
};
|
|
32
13
|
events: {
|
|
33
14
|
[evt: string]: CustomEvent<any>;
|
|
34
15
|
};
|
|
35
16
|
slots: {};
|
|
36
17
|
};
|
|
18
|
+
export declare type SignInModalProps = typeof __propDef.props;
|
|
19
|
+
export declare type SignInModalEvents = typeof __propDef.events;
|
|
20
|
+
export declare type SignInModalSlots = typeof __propDef.slots;
|
|
21
|
+
export default class SignInModal extends SvelteComponentTyped<SignInModalProps, SignInModalEvents, SignInModalSlots> {
|
|
22
|
+
}
|
|
37
23
|
export {};
|