flowbite-svelte 0.9.3 → 0.9.6

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 (59) hide show
  1. package/accordions/AccordionItem.svelte +1 -1
  2. package/accordions/AccordionItem.svelte.d.ts +1 -1
  3. package/auth/Confirm.svelte +23 -0
  4. package/auth/Confirm.svelte.d.ts +19 -0
  5. package/auth/ForgotPassword.svelte +57 -0
  6. package/auth/ForgotPassword.svelte.d.ts +21 -0
  7. package/auth/Login.svelte +128 -0
  8. package/auth/Login.svelte.d.ts +25 -0
  9. package/auth/Register.svelte +116 -0
  10. package/auth/Register.svelte.d.ts +25 -0
  11. package/auth/Reset.svelte +57 -0
  12. package/auth/Reset.svelte.d.ts +22 -0
  13. package/buttongroups/ButtonGroup.svelte +7 -7
  14. package/buttongroups/ButtonGroupOutline.svelte +7 -7
  15. package/buttons/Button.svelte +16 -15
  16. package/buttons/Button.svelte.d.ts +3 -2
  17. package/buttons/ColorShadowButton.svelte +2 -1
  18. package/buttons/ColorShadowButton.svelte.d.ts +2 -1
  19. package/buttons/GradientDuotoneButton.svelte +2 -1
  20. package/buttons/GradientDuotoneButton.svelte.d.ts +2 -1
  21. package/buttons/GradientMonochromeButton.svelte +2 -1
  22. package/buttons/GradientMonochromeButton.svelte.d.ts +2 -1
  23. package/buttons/GradientOutlineButton.svelte +2 -1
  24. package/buttons/GradientOutlineButton.svelte.d.ts +2 -1
  25. package/cards/Card.svelte +6 -7
  26. package/cards/Card.svelte.d.ts +5 -4
  27. package/cards/CtaCard.svelte +4 -5
  28. package/cards/CtaCard.svelte.d.ts +1 -0
  29. package/cards/EcommerceCard.svelte +3 -2
  30. package/cards/EcommerceCard.svelte.d.ts +2 -1
  31. package/cards/HorizontalCard.svelte +14 -17
  32. package/cards/HorizontalCard.svelte.d.ts +8 -3
  33. package/cards/InteractiveCard.svelte +6 -7
  34. package/cards/InteractiveCard.svelte.d.ts +3 -2
  35. package/cards/ListCard.svelte +43 -79
  36. package/cards/ListCard.svelte.d.ts +9 -40
  37. package/cards/SignInCard.svelte +114 -111
  38. package/cards/SignInCard.svelte.d.ts +9 -32
  39. package/dropdowns/DropdownDefault.svelte +84 -93
  40. package/dropdowns/DropdownDefault.svelte.d.ts +7 -35
  41. package/footer/LogoFooter.svelte +4 -4
  42. package/footer/SimpleFooter.svelte +3 -3
  43. package/footer/SitemapFooter.svelte +5 -5
  44. package/footer/SitemapFooter.svelte.d.ts +2 -2
  45. package/footer/SocialMediaFooter.svelte +59 -106
  46. package/footer/SocialMediaFooter.svelte.d.ts +9 -61
  47. package/index.d.ts +6 -1
  48. package/index.js +14 -0
  49. package/list-group/List.svelte +42 -74
  50. package/list-group/List.svelte.d.ts +7 -23
  51. package/navbar/DropdownNavbar.svelte +16 -19
  52. package/navbar/DropdownNavbar.svelte.d.ts +7 -0
  53. package/navbar/Navbar.svelte +11 -14
  54. package/navbar/Navbar.svelte.d.ts +4 -0
  55. package/package.json +7 -3
  56. package/spinners/Spinner.svelte +1 -1
  57. package/spinners/Spinner.svelte.d.ts +1 -1
  58. package/spinners/SpinnerButton.svelte +1 -1
  59. package/types.d.ts +20 -7
@@ -1,125 +1,128 @@
1
- <script>
2
- export let title = "Sign in";
3
- export let action;
4
- export let btnSignInColor = "blue";
5
- export let rememberMe = false;
6
- export let signupLink = {
7
- href: "",
8
- rel: "",
9
- };
10
- export let lostPasswordLink = {
11
- href: "",
12
- rel: "",
13
- };
14
-
15
- let submitClass;
16
-
17
- if (btnSignInColor === "blue") {
1
+ <script >import Alert from '../alerts/Alert.svelte';
2
+ export let login;
3
+ export let title = 'Sign in';
4
+ export let btnSignInColor = 'blue';
5
+ export let rememberMe = false;
6
+ export let signup;
7
+ export let lostPassword;
8
+ let email;
9
+ let password;
10
+ let error;
11
+ let submitClass;
12
+ if (btnSignInColor === 'blue') {
18
13
  submitClass =
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
- } else if (btnSignInColor === "gray") {
14
+ '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';
15
+ }
16
+ else if (btnSignInColor === 'gray') {
21
17
  submitClass =
22
- "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";
23
- } else if (btnSignInColor === "red") {
18
+ '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';
19
+ }
20
+ else if (btnSignInColor === 'red') {
24
21
  submitClass =
25
- "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";
26
- } else if (btnSignInColor === "yellow") {
22
+ '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';
23
+ }
24
+ else if (btnSignInColor === 'yellow') {
27
25
  submitClass =
28
- "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";
29
- } else if (btnSignInColor === "green") {
26
+ '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';
27
+ }
28
+ else if (btnSignInColor === 'green') {
30
29
  submitClass =
31
- "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";
32
- } else if (btnSignInColor === "indigo") {
30
+ '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';
31
+ }
32
+ else if (btnSignInColor === 'indigo') {
33
33
  submitClass =
34
- "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";
35
- } else if (btnSignInColor === "purple") {
34
+ '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';
35
+ }
36
+ else if (btnSignInColor === 'purple') {
36
37
  submitClass =
37
- "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";
38
- } else if (btnSignInColor === "pink") {
38
+ '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';
39
+ }
40
+ else if (btnSignInColor === 'pink') {
39
41
  submitClass =
40
- "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";
41
- } else {
42
+ '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';
43
+ }
44
+ else {
42
45
  submitClass =
43
- "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";
44
- }
46
+ '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';
47
+ }
45
48
  </script>
46
49
 
47
50
  <div
48
- class="p-4 max-w-sm bg-white rounded-lg border border-gray-200 shadow-md sm:p-6 lg:p-8 dark:bg-gray-800 dark:border-gray-700"
51
+ class="p-4 max-w-sm w-full bg-white rounded-lg border border-gray-200 shadow-md sm:p-6 lg:p-8 dark:bg-gray-800 dark:border-gray-700"
49
52
  >
50
- <form class="space-y-6" {action}>
51
- <h3 class="text-xl font-medium text-gray-900 dark:text-white">{title}</h3>
52
- <div>
53
- <label
54
- for="email"
55
- class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
56
- >Email</label
57
- >
58
- <input
59
- type="email"
60
- name="email"
61
- id="email"
62
- 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"
63
- placeholder="name@company.com"
64
- required
65
- />
66
- </div>
67
- <div>
68
- <label
69
- for="password"
70
- class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
71
- >Your password</label
72
- >
73
- <input
74
- type="password"
75
- name="password"
76
- id="password"
77
- placeholder="••••••••"
78
- 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"
79
- required
80
- />
81
- </div>
82
- <div class="flex items-start">
83
- {#if rememberMe}
84
- <div class="flex items-start">
85
- <div class="flex items-center h-5">
86
- <input
87
- id="remember"
88
- aria-describedby="remember"
89
- type="checkbox"
90
- 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"
91
- required=""
92
- />
93
- </div>
94
- <div class="ml-3 text-sm">
95
- <label
96
- for="remember"
97
- class="font-medium text-gray-900 dark:text-gray-300"
98
- >Remember me</label
99
- >
100
- </div>
101
- </div>
102
- {/if}
103
- {#if lostPasswordLink}
104
- <a
105
- href={lostPasswordLink.href}
106
- rel={lostPasswordLink.rel}
107
- class="ml-auto text-sm text-blue-700 hover:underline dark:text-blue-500"
108
- >Lost Password?</a
109
- >
110
- {/if}
111
- </div>
112
- <button type="submit" class={submitClass}>Login to your account</button>
113
-
114
- {#if signupLink}
115
- <div class="text-sm font-medium text-gray-500 dark:text-gray-300">
116
- Not registered? <a
117
- href={signupLink.href}
118
- rel={signupLink.rel}
119
- class="text-blue-700 hover:underline dark:text-blue-500"
120
- >Create account</a
121
- >
122
- </div>
123
- {/if}
124
- </form>
53
+ <form class="space-y-6" on:submit|preventDefault={login}>
54
+ <h3 class="text-xl font-medium text-gray-900 dark:text-white">{title}</h3>
55
+ <div>
56
+ <label for="email" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
57
+ >Email</label
58
+ >
59
+ <input
60
+ type="email"
61
+ name="email"
62
+ id="email"
63
+ bind:value={email}
64
+ 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"
65
+ placeholder="name@company.com"
66
+ required
67
+ />
68
+ </div>
69
+ <div>
70
+ <label for="password" class="block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300"
71
+ >Your password</label
72
+ >
73
+ <input
74
+ type="password"
75
+ name="password"
76
+ id="password"
77
+ placeholder="••••••••"
78
+ bind:value={password}
79
+ 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"
80
+ required
81
+ />
82
+ </div>
83
+ <div class="flex items-start">
84
+ {#if rememberMe}
85
+ <div class="flex items-start">
86
+ <div class="flex items-center h-5">
87
+ <input
88
+ id="remember"
89
+ aria-describedby="remember"
90
+ type="checkbox"
91
+ 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"
92
+ />
93
+ </div>
94
+ <div class="ml-3 text-sm">
95
+ <label for="remember" class="font-medium text-gray-900 dark:text-gray-300"
96
+ >Remember me</label
97
+ >
98
+ </div>
99
+ </div>
100
+ {/if}
101
+ {#if lostPassword}
102
+ <a
103
+ href={lostPassword.href}
104
+ rel={lostPassword.rel}
105
+ class="ml-auto text-sm text-blue-700 hover:underline dark:text-blue-500"
106
+ >{lostPassword.name}</a
107
+ >
108
+ {/if}
109
+ </div>
110
+ {#if error}
111
+ <div class="mt-6">
112
+ <Alert alertId="alert-red" color="red" closeBtn>
113
+ {error}
114
+ </Alert>
115
+ </div>
116
+ {/if}
117
+ <button type="submit" class={submitClass}>Login to your account</button>
118
+ {#if signup}
119
+ <div class="text-sm font-medium text-gray-500 dark:text-gray-300">
120
+ Not registered? <a
121
+ href={signup.href}
122
+ rel={signup.rel}
123
+ class="text-blue-700 hover:underline dark:text-blue-500">{signup.name}</a
124
+ >
125
+ </div>
126
+ {/if}
127
+ </form>
125
128
  </div>
@@ -1,45 +1,22 @@
1
- /** @typedef {typeof __propDef.props} SignInCardProps */
2
- /** @typedef {typeof __propDef.events} SignInCardEvents */
3
- /** @typedef {typeof __propDef.slots} SignInCardSlots */
4
- export default class SignInCard extends SvelteComponentTyped<{
5
- action: any;
6
- title?: string;
7
- btnSignInColor?: string;
8
- rememberMe?: boolean;
9
- signupLink?: {
10
- href: string;
11
- rel: string;
12
- };
13
- lostPasswordLink?: {
14
- href: string;
15
- rel: string;
16
- };
17
- }, {
18
- [evt: string]: CustomEvent<any>;
19
- }, {}> {
20
- }
21
- export type SignInCardProps = typeof __propDef.props;
22
- export type SignInCardEvents = typeof __propDef.events;
23
- export type SignInCardSlots = typeof __propDef.slots;
24
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { AuthFunctionType, LinkType } from '../types';
25
3
  declare const __propDef: {
26
4
  props: {
27
- action: any;
5
+ login: AuthFunctionType;
28
6
  title?: string;
29
7
  btnSignInColor?: string;
30
8
  rememberMe?: boolean;
31
- signupLink?: {
32
- href: string;
33
- rel: string;
34
- };
35
- lostPasswordLink?: {
36
- href: string;
37
- rel: string;
38
- };
9
+ signup: LinkType;
10
+ lostPassword: LinkType;
39
11
  };
40
12
  events: {
41
13
  [evt: string]: CustomEvent<any>;
42
14
  };
43
15
  slots: {};
44
16
  };
17
+ export declare type SignInCardProps = typeof __propDef.props;
18
+ export declare type SignInCardEvents = typeof __propDef.events;
19
+ export declare type SignInCardSlots = typeof __propDef.slots;
20
+ export default class SignInCard extends SvelteComponentTyped<SignInCardProps, SignInCardEvents, SignInCardSlots> {
21
+ }
45
22
  export {};
@@ -1,117 +1,108 @@
1
- <script>
2
- export let label = "Dropdown button";
3
- export let rounded = false;
4
- export let textSize = "text-sm";
5
- export let color = "blue";
6
-
7
- let paddings;
8
- if (textSize === "text-xs") {
9
- paddings = "py-2 px-3";
10
- } else if (textSize === "text-sm") {
11
- paddings = "py-2.5 px-5";
12
- } else if (textSize === "text-base") {
13
- paddings = "py-3 px-6";
14
- } else {
15
- paddings = "py-2.5 px-5";
16
- }
17
-
18
- let buttonClass;
19
- let round = rounded ? "rounded-full" : "rounded-lg";
20
-
21
- let toggleHidden = true;
22
-
23
- const handleToggle = () => {
24
- console.log("toggle clicked.");
1
+ <script >export let label = 'Dropdown button';
2
+ export let rounded = false;
3
+ export let textSize = 'text-sm';
4
+ export let color = '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
+ let toggleHidden = true;
21
+ const handleToggle = () => {
22
+ console.log('toggle clicked.');
25
23
  toggleHidden = !toggleHidden;
26
- };
27
-
28
- export let items = [
29
- {
30
- link: "/",
31
- label: "Dashboard",
32
- },
33
- {
34
- link: "/",
35
- label: "Settings",
36
- divider: true,
37
- },
38
- {
39
- link: "/",
40
- label: "Sign out",
41
- },
42
- ];
43
- if (color === "blue") {
24
+ };
25
+ export let items;
26
+ if (color === 'blue') {
44
27
  buttonClass = `inline-flex items-center 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`;
45
- } else if (color === "blue-outline") {
28
+ }
29
+ else if (color === 'blue-outline') {
46
30
  buttonClass = `inline-flex items-center 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`;
47
- } else if (color === "dark") {
31
+ }
32
+ else if (color === 'dark') {
48
33
  buttonClass =
49
- buttonClass = `inline-flex items-center 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`;
50
- } else if (color === "dark-outline") {
34
+ buttonClass = `inline-flex items-center 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`;
35
+ }
36
+ else if (color === 'dark-outline') {
51
37
  buttonClass = `inline-flex items-center 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`;
52
- } else if (color === "light") {
38
+ }
39
+ else if (color === 'light') {
53
40
  buttonClass = `inline-flex items-center 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`;
54
- } else if (color === "green") {
41
+ }
42
+ else if (color === 'green') {
55
43
  buttonClass = `inline-flex items-center 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`;
56
- } else if (color === "green-outline") {
44
+ }
45
+ else if (color === 'green-outline') {
57
46
  buttonClass = `inline-flex items-center 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`;
58
- } else if (color === "red") {
47
+ }
48
+ else if (color === 'red') {
59
49
  buttonClass = `inline-flex items-center 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`;
60
- } else if (color === "red-outline") {
50
+ }
51
+ else if (color === 'red-outline') {
61
52
  buttonClass = `inline-flex items-center 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`;
62
- } else if (color === "yellow") {
53
+ }
54
+ else if (color === 'yellow') {
63
55
  buttonClass = `inline-flex items-center 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`;
64
- } else if (color === "yellow-outline") {
56
+ }
57
+ else if (color === 'yellow-outline') {
65
58
  buttonClass = `inline-flex items-center 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`;
66
- } else if (color === "purple") {
59
+ }
60
+ else if (color === 'purple') {
67
61
  buttonClass = `inline-flex items-center 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`;
68
- } else if (color === "purple-outline") {
62
+ }
63
+ else if (color === 'purple-outline') {
69
64
  buttonClass = `inline-flex items-center 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`;
70
- } else {
65
+ }
66
+ else {
71
67
  // blue
72
68
  buttonClass = `inline-flex items-center 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`;
73
- }
69
+ }
74
70
  </script>
75
71
 
76
72
  <button on:click={handleToggle} class={buttonClass} type="button"
77
- >{label}
78
- <svg
79
- class="ml-2 w-4 h-4"
80
- fill="none"
81
- stroke="currentColor"
82
- viewBox="0 0 24 24"
83
- xmlns="http://www.w3.org/2000/svg"
84
- ><path
85
- stroke-linecap="round"
86
- stroke-linejoin="round"
87
- stroke-width="2"
88
- d="M19 9l-7 7-7-7"
89
- />
90
- </svg>
73
+ >{label}
74
+ <svg
75
+ class="ml-2 w-4 h-4"
76
+ fill="none"
77
+ stroke="currentColor"
78
+ viewBox="0 0 24 24"
79
+ xmlns="http://www.w3.org/2000/svg"
80
+ ><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" />
81
+ </svg>
91
82
  </button>
92
83
 
93
84
  <div
94
- class:hidden={toggleHidden}
95
- class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
85
+ class:hidden={toggleHidden}
86
+ class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700"
96
87
  >
97
- {#if $$slots.header}
98
- <div class="py-3 px-4 text-gray-900 dark:text-white">
99
- <slot name="header" />
100
- </div>
101
- {/if}
102
- <ul class="py-1" aria-labelledby="dropdownButton">
103
- {#each items as { link, label, divider }}
104
- <li
105
- class:border-b={divider}
106
- class:border-gray-100={divider}
107
- class:dark:border-gray-500={divider}
108
- >
109
- <a
110
- href={link}
111
- class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
112
- >{label}</a
113
- >
114
- </li>
115
- {/each}
116
- </ul>
88
+ {#if $$slots.header}
89
+ <div class="py-3 px-4 text-gray-900 dark:text-white">
90
+ <slot name="header" />
91
+ </div>
92
+ {/if}
93
+ <ul class="py-1" aria-labelledby="dropdownButton">
94
+ {#each items as { href, name, divider }}
95
+ <li
96
+ class:border-b={divider}
97
+ class:border-gray-100={divider}
98
+ class:dark:border-gray-500={divider}
99
+ >
100
+ <a
101
+ {href}
102
+ class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100 dark:hover:bg-gray-600 dark:text-gray-200 dark:hover:text-white"
103
+ >{name}</a
104
+ >
105
+ </li>
106
+ {/each}
107
+ </ul>
117
108
  </div>
@@ -1,45 +1,12 @@
1
- /** @typedef {typeof __propDef.props} DropdownDefaultProps */
2
- /** @typedef {typeof __propDef.events} DropdownDefaultEvents */
3
- /** @typedef {typeof __propDef.slots} DropdownDefaultSlots */
4
- export default class DropdownDefault extends SvelteComponentTyped<{
5
- label?: string;
6
- rounded?: boolean;
7
- textSize?: string;
8
- color?: string;
9
- items?: ({
10
- link: string;
11
- label: string;
12
- divider?: undefined;
13
- } | {
14
- link: string;
15
- label: string;
16
- divider: boolean;
17
- })[];
18
- }, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {
21
- header: {};
22
- }> {
23
- }
24
- export type DropdownDefaultProps = typeof __propDef.props;
25
- export type DropdownDefaultEvents = typeof __propDef.events;
26
- export type DropdownDefaultSlots = typeof __propDef.slots;
27
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { DropdownType } from '../types';
28
3
  declare const __propDef: {
29
4
  props: {
30
5
  label?: string;
31
6
  rounded?: boolean;
32
7
  textSize?: string;
33
8
  color?: string;
34
- items?: ({
35
- link: string;
36
- label: string;
37
- divider?: undefined;
38
- } | {
39
- link: string;
40
- label: string;
41
- divider: boolean;
42
- })[];
9
+ items: DropdownType[];
43
10
  };
44
11
  events: {
45
12
  [evt: string]: CustomEvent<any>;
@@ -48,4 +15,9 @@ declare const __propDef: {
48
15
  header: {};
49
16
  };
50
17
  };
18
+ export declare type DropdownDefaultProps = typeof __propDef.props;
19
+ export declare type DropdownDefaultEvents = typeof __propDef.events;
20
+ export declare type DropdownDefaultSlots = typeof __propDef.slots;
21
+ export default class DropdownDefault extends SvelteComponentTyped<DropdownDefaultProps, DropdownDefaultEvents, DropdownDefaultSlots> {
22
+ }
51
23
  export {};
@@ -16,14 +16,14 @@ export let allRightsReserved = 'All Rights Reserved.';
16
16
 
17
17
  <footer class={footerClass}>
18
18
  <div class={divClass}>
19
- <a href={site.link} class={siteNameLinkClass}>
19
+ <a href={site.href} class={siteNameLinkClass}>
20
20
  <img src={site.img} class={imgClass} alt={site.name} />
21
21
  <span class={siteNameClass}>{site.name}</span>
22
22
  </a>
23
23
  <ul class={ulClass}>
24
- {#each links as { name, link, rel }}
24
+ {#each links as { name, href, rel }}
25
25
  <li>
26
- <a href={link} {rel} class={aClass}>{name}</a>
26
+ <a {href} {rel} class={aClass}>{name}</a>
27
27
  </li>
28
28
  {/each}
29
29
  </ul>
@@ -31,6 +31,6 @@ export let allRightsReserved = 'All Rights Reserved.';
31
31
  <hr class={hrClass} />
32
32
  <span class={copyRightSpanClass}
33
33
  >{copyrightYear}
34
- <a href={site.link} class={copyRightLinkClass}>{site.name}</a>. {allRightsReserved}
34
+ <a href={site.href} class={copyRightLinkClass}>{site.name}</a>. {allRightsReserved}
35
35
  </span>
36
36
  </footer>
@@ -12,12 +12,12 @@ export let allRightsReserved = 'All Rights Reserved.';
12
12
  <footer class={footerClass}>
13
13
  <span class={siteNameClass}
14
14
  >{copyrightYear}
15
- <a href={site.link} class={siteNameLinkClass} target="_blank">{site.name}</a>. {allRightsReserved}
15
+ <a href={site.href} class={siteNameLinkClass} target="_blank">{site.name}</a>. {allRightsReserved}
16
16
  </span>
17
17
  <ul class={ulClass}>
18
- {#each links as { name, link, rel }}
18
+ {#each links as { name, href, rel }}
19
19
  <li>
20
- <a href={link} {rel} class={aClass}>{name}</a>
20
+ <a {href} {rel} class={aClass}>{name}</a>
21
21
  </li>
22
22
  {/each}
23
23
  </ul>
@@ -23,9 +23,9 @@ export let allRightsReserved = 'All Rights Reserved.';
23
23
  {parent}
24
24
  </h2>
25
25
  <ul class={ulClass}>
26
- {#each children as { name, link }}
26
+ {#each children as { name, href }}
27
27
  <li class="mb-4">
28
- <a href={link} class={linkClass}>{name}</a>
28
+ <a {href} class={linkClass}>{name}</a>
29
29
  </li>
30
30
  {/each}
31
31
  </ul>
@@ -34,11 +34,11 @@ export let allRightsReserved = 'All Rights Reserved.';
34
34
  </div>
35
35
  <div class={copyrightDivClass}>
36
36
  <span class={copyrightClass}
37
- >{copyrightYear} <a href={site.link}>{site.name}</a>. {allRightsReserved}
37
+ >{copyrightYear} <a href={site.href}>{site.name}</a>. {allRightsReserved}
38
38
  </span>
39
39
  <div class={socialMediaDivClass}>
40
- {#each socialMedia as { link, icon }}
41
- <a href={link} class={socialMediaLinkClass}>
40
+ {#each socialMedia as { href, icon }}
41
+ <a {href} class={socialMediaLinkClass}>
42
42
  <svelte:component this={icon} className={iconClass} />
43
43
  </a>
44
44
  {/each}
@@ -1,9 +1,9 @@
1
1
  import { SvelteComponentTyped } from "svelte";
2
- import type { LinkType, SiteType, SocialMediaType } from '../types';
2
+ import type { SiteType, SocialMediaType, SocialMediaLinkType } from '../types';
3
3
  declare const __propDef: {
4
4
  props: {
5
5
  site: SiteType;
6
- links: LinkType[];
6
+ links: SocialMediaLinkType[];
7
7
  socialMedia: SocialMediaType[];
8
8
  footerClass?: string;
9
9
  linksClass?: string;