flowbite-svelte 0.9.1 → 0.9.4

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.
Files changed (58) hide show
  1. package/accordions/AccordionItem.svelte +31 -34
  2. package/accordions/AccordionItem.svelte.d.ts +6 -16
  3. package/buttongroups/ButtonGroup.svelte +8 -21
  4. package/buttongroups/ButtonGroup.svelte.d.ts +1 -1
  5. package/buttongroups/ButtonGroupOutline.svelte +8 -21
  6. package/buttongroups/ButtonGroupOutline.svelte.d.ts +1 -1
  7. package/cards/CtaCard.svelte +8 -19
  8. package/cards/CtaCard.svelte.d.ts +2 -2
  9. package/cards/EcommerceCard.svelte +1 -1
  10. package/cards/EcommerceCard.svelte.d.ts +2 -2
  11. package/cards/HorizontalCard.svelte +21 -24
  12. package/cards/HorizontalCard.svelte.d.ts +9 -22
  13. package/cards/InteractiveCard.svelte +96 -110
  14. package/cards/InteractiveCard.svelte.d.ts +10 -50
  15. package/darkmode/DarkMode.svelte +60 -69
  16. package/darkmode/DarkMode.svelte.d.ts +5 -12
  17. package/footer/LogoFooter.svelte +32 -48
  18. package/footer/LogoFooter.svelte.d.ts +11 -46
  19. package/footer/SimpleFooter.svelte +20 -33
  20. package/footer/SimpleFooter.svelte.d.ts +8 -36
  21. package/footer/SitemapFooter.svelte +43 -112
  22. package/footer/SitemapFooter.svelte.d.ts +13 -59
  23. package/footer/SocialMediaFooter.svelte +59 -106
  24. package/footer/SocialMediaFooter.svelte.d.ts +14 -66
  25. package/modals/ExtraLargeModal.svelte +187 -191
  26. package/modals/ExtraLargeModal.svelte.d.ts +9 -27
  27. package/modals/LargeModal.svelte +188 -191
  28. package/modals/LargeModal.svelte.d.ts +9 -27
  29. package/modals/MediumModal.svelte +191 -200
  30. package/modals/MediumModal.svelte.d.ts +9 -27
  31. package/modals/ModalButton.svelte +40 -35
  32. package/modals/ModalButton.svelte.d.ts +7 -17
  33. package/modals/SignInModal.svelte +151 -160
  34. package/modals/SignInModal.svelte.d.ts +10 -24
  35. package/modals/SmallModal.svelte +188 -191
  36. package/modals/SmallModal.svelte.d.ts +9 -27
  37. package/modals/modalStores.d.ts +2 -1
  38. package/modals/modalStores.js +1 -2
  39. package/navbar/DropdownNavbar.svelte +117 -202
  40. package/navbar/DropdownNavbar.svelte.d.ts +8 -52
  41. package/navbar/Navbar.svelte +68 -99
  42. package/navbar/Navbar.svelte.d.ts +8 -26
  43. package/package.json +1 -2
  44. package/spinners/Spinner.svelte +63 -57
  45. package/spinners/Spinner.svelte.d.ts +8 -17
  46. package/spinners/SpinnerButton.svelte +31 -31
  47. package/spinners/SpinnerButton.svelte.d.ts +6 -15
  48. package/tabs/DefaultTabs.svelte +13 -39
  49. package/tabs/DefaultTabs.svelte.d.ts +7 -23
  50. package/tabs/InteractiveTabs.svelte +33 -63
  51. package/tabs/InteractiveTabs.svelte.d.ts +7 -35
  52. package/tabs/PillTabs.svelte +12 -34
  53. package/tabs/PillTabs.svelte.d.ts +7 -21
  54. package/tooltips/LightTooltip.svelte +112 -114
  55. package/tooltips/LightTooltip.svelte.d.ts +6 -21
  56. package/tooltips/Tooltip.svelte +113 -114
  57. package/tooltips/Tooltip.svelte.d.ts +6 -21
  58. package/types.d.ts +55 -7
@@ -1,174 +1,165 @@
1
- <script>
2
- // import { createEventDispatcher } from "svelte";
3
- import { modalIdStore } from "./modalStores.js";
4
- // const dispatch = createEventDispatcher();
5
-
6
- export let id = "signin-modal";
7
- export let btnSignInColor = "blue";
8
- export let titleSignIn = "Sign in to our platform";
9
- export let lostPasswordLink;
10
- export let rememberMe = false;
11
- export let signUp;
12
- export let action;
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
- let submitClass;
26
-
27
- if (btnSignInColor === "blue") {
15
+ });
16
+ let submitClass;
17
+ if (btnSignInColor === 'blue') {
28
18
  submitClass =
29
- "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";
30
- } else if (btnSignInColor === "gray") {
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
- "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";
33
- } else if (btnSignInColor === "red") {
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
- "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";
36
- } else if (btnSignInColor === "yellow") {
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
- "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";
39
- } else if (btnSignInColor === "green") {
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
- "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";
42
- } else if (btnSignInColor === "indigo") {
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
- "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";
45
- } else if (btnSignInColor === "purple") {
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
- "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";
48
- } else if (btnSignInColor === "pink") {
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
- "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";
51
- } else {
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
- "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";
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
- <div
59
- {id}
60
- role="dialog"
61
- aria-modal="true"
62
- class="flex overflow-y-auto overflow-x-hidden fixed right-0 left-0 top-20 z-50 justify-center items-center"
63
- >
64
- <div class="relative px-4 w-full max-w-md h-full md:h-auto">
65
- <div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
66
- <div class="flex justify-end p-2">
67
- <button
68
- type="button"
69
- 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"
70
- on:click={closeModal}
71
- >
72
- <svg
73
- class="w-5 h-5"
74
- fill="currentColor"
75
- viewBox="0 0 20 20"
76
- xmlns="http://www.w3.org/2000/svg"
77
- ><path
78
- fill-rule="evenodd"
79
- 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"
80
- clip-rule="evenodd"
81
- /></svg
82
- >
83
- </button>
84
- </div>
85
- <form class="px-6 pb-4 space-y-6 lg:px-8 sm:pb-6 xl:pb-8" {action}>
86
- <h3 class="text-xl font-medium text-gray-900 dark:text-white">
87
- {titleSignIn}
88
- </h3>
89
- <div>
90
- <label
91
- for="email-{id}"
92
- class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
93
- >Your email</label
94
- >
95
- <input
96
- type="email"
97
- name="email"
98
- id="email-{id}"
99
- 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"
100
- placeholder="name@company.com"
101
- required
102
- />
103
- </div>
104
- <div>
105
- <label
106
- for="password-{id}"
107
- class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
108
- >Your password</label
109
- >
110
- <input
111
- type="password"
112
- name="password"
113
- id="password-{id}"
114
- placeholder="••••••••"
115
- 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"
116
- required
117
- />
118
- </div>
119
- <div class="flex justify-between">
120
- {#if rememberMe}
121
- <div class="flex items-start">
122
- <div class="flex items-center h-5">
123
- <input
124
- id="remember-{id}"
125
- aria-describedby="remember"
126
- type="checkbox"
127
- 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"
128
- required=""
129
- />
130
- </div>
131
- <div class="ml-3 text-sm">
132
- <label
133
- for="remember"
134
- class="font-medium text-gray-900 dark:text-gray-300"
135
- >Remember me</label
136
- >
137
- </div>
138
- </div>
139
- {/if}
140
- {#if lostPasswordLink}
141
- <a
142
- href={lostPasswordLink}
143
- rel="external"
144
- class="text-sm text-blue-700 hover:underline dark:text-blue-500"
145
- ><button type="button" on:click={closeModal}
146
- >Lost Password?</button
147
- ></a
148
- >
149
- {/if}
150
- </div>
151
- <button type="submit" class={submitClass} on:click={closeModal}
152
- >Login to your account</button
153
- >
154
- {#if signUp}
155
- <div class="text-sm font-medium text-gray-500 dark:text-gray-300">
156
- Not registered? <a
157
- href={signUp}
158
- rel="external"
159
- class="text-blue-700 hover:underline dark:text-blue-500"
160
- ><button type="button" on:click={closeModal}
161
- >Create account</button
162
- ></a
163
- >
164
- </div>
165
- {/if}
166
- </form>
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 {};