flowbite-svelte 0.8.8 → 0.9.2

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 (76) hide show
  1. package/README.md +9 -1
  2. package/accordions/AccordionDefault.svelte +20 -21
  3. package/accordions/AccordionDefault.svelte.d.ts +6 -19
  4. package/accordions/AccordionItem.svelte +31 -34
  5. package/accordions/AccordionItem.svelte.d.ts +6 -16
  6. package/alerts/Alert.svelte +90 -97
  7. package/alerts/Alert.svelte.d.ts +7 -17
  8. package/alerts/BorderAlert.svelte +90 -104
  9. package/alerts/BorderAlert.svelte.d.ts +7 -17
  10. package/alerts/InfoAlert.svelte +106 -111
  11. package/alerts/InfoAlert.svelte.d.ts +8 -20
  12. package/badges/Badge.svelte +22 -16
  13. package/badges/Badge.svelte.d.ts +8 -16
  14. package/badges/BadgeIcon.svelte +24 -18
  15. package/badges/BadgeIcon.svelte.d.ts +8 -18
  16. package/badges/BadgeLink.svelte +23 -17
  17. package/badges/BadgeLink.svelte.d.ts +9 -18
  18. package/buttongroups/ButtonGroup.svelte +41 -64
  19. package/buttongroups/ButtonGroup.svelte.d.ts +7 -23
  20. package/buttongroups/ButtonGroupOutline.svelte +41 -66
  21. package/buttongroups/ButtonGroupOutline.svelte.d.ts +7 -23
  22. package/buttons/Button.svelte +48 -35
  23. package/buttons/Button.svelte.d.ts +8 -19
  24. package/buttons/ColorShadowButton.svelte +22 -16
  25. package/buttons/ColorShadowButton.svelte.d.ts +8 -18
  26. package/buttons/GradientDuotoneButton.svelte +20 -15
  27. package/buttons/GradientDuotoneButton.svelte.d.ts +8 -18
  28. package/buttons/GradientMonochromeButton.svelte +22 -16
  29. package/buttons/GradientMonochromeButton.svelte.d.ts +8 -18
  30. package/buttons/GradientOutlineButton.svelte +30 -25
  31. package/buttons/GradientOutlineButton.svelte.d.ts +8 -18
  32. package/cards/Card.svelte +73 -71
  33. package/cards/Card.svelte.d.ts +12 -26
  34. package/cards/CtaCard.svelte +48 -58
  35. package/cards/CtaCard.svelte.d.ts +8 -32
  36. package/cards/EcommerceCard.svelte +77 -77
  37. package/cards/EcommerceCard.svelte.d.ts +10 -28
  38. package/cards/HorizontalCard.svelte +21 -24
  39. package/cards/HorizontalCard.svelte.d.ts +9 -22
  40. package/cards/InteractiveCard.svelte +96 -110
  41. package/cards/InteractiveCard.svelte.d.ts +10 -50
  42. package/darkmode/DarkMode.svelte +60 -69
  43. package/darkmode/DarkMode.svelte.d.ts +5 -12
  44. package/dropdowns/DropdownDefault.svelte.d.ts +2 -2
  45. package/footer/LogoFooter.svelte +32 -48
  46. package/footer/LogoFooter.svelte.d.ts +11 -46
  47. package/footer/SimpleFooter.svelte +20 -33
  48. package/footer/SimpleFooter.svelte.d.ts +8 -36
  49. package/footer/SitemapFooter.svelte +43 -112
  50. package/footer/SitemapFooter.svelte.d.ts +13 -59
  51. package/footer/SocialMediaFooter.svelte.d.ts +14 -14
  52. package/modals/ExtraLargeModal.svelte.d.ts +2 -2
  53. package/modals/LargeModal.svelte.d.ts +2 -2
  54. package/modals/MediumModal.svelte.d.ts +2 -2
  55. package/modals/SmallModal.svelte.d.ts +2 -2
  56. package/navbar/DropdownNavbar.svelte +116 -201
  57. package/navbar/DropdownNavbar.svelte.d.ts +8 -52
  58. package/navbar/Navbar.svelte +68 -99
  59. package/navbar/Navbar.svelte.d.ts +8 -26
  60. package/package.json +34 -10
  61. package/spinners/Spinner.svelte +63 -57
  62. package/spinners/Spinner.svelte.d.ts +8 -17
  63. package/spinners/SpinnerButton.svelte +31 -31
  64. package/spinners/SpinnerButton.svelte.d.ts +6 -15
  65. package/tabs/DefaultTabs.svelte +13 -39
  66. package/tabs/DefaultTabs.svelte.d.ts +7 -23
  67. package/tabs/InteractiveTabs.svelte +33 -63
  68. package/tabs/InteractiveTabs.svelte.d.ts +7 -35
  69. package/tabs/PillTabs.svelte +12 -34
  70. package/tabs/PillTabs.svelte.d.ts +7 -21
  71. package/tooltips/LightTooltip.svelte +112 -114
  72. package/tooltips/LightTooltip.svelte.d.ts +6 -21
  73. package/tooltips/Tooltip.svelte +113 -114
  74. package/tooltips/Tooltip.svelte.d.ts +6 -21
  75. package/types.d.ts +66 -0
  76. package/types.js +1 -0
@@ -1,127 +1,113 @@
1
- <script>
2
- let isOpen = true;
3
- const toggleDropdown = () => {
1
+ <script >let isOpen = true;
2
+ const toggleDropdown = () => {
4
3
  isOpen = !isOpen;
5
- };
6
-
7
- export let dropdownLinks = [
8
- {
9
- href: "/",
10
- label: "label 1",
11
- },
12
- {
13
- href: "about",
14
- label: "About",
15
- },
16
- {
17
- href: "profile",
18
- label: "Profile",
19
- },
20
- ];
21
- export let img = {
22
- src: "",
23
- alt: "",
24
- };
25
- export let header = "Lorem ipsum";
26
- export let content = "Proin efficitur purus felis.";
27
- export let buttonColor = "blue";
28
- export let link1 = { href: "", title: "", rel: "" };
29
- export let link2 = { href: "", title: "", rel: "" };
30
- let linkClass;
31
- if (buttonColor === "blue") {
4
+ };
5
+ export let dropdownLinks;
6
+ export let img;
7
+ export let header = 'Lorem ipsum';
8
+ export let content = 'Proin efficitur purus felis.';
9
+ export let buttonColor = 'blue';
10
+ export let link1;
11
+ export let link2;
12
+ let linkClass;
13
+ if (buttonColor === 'blue') {
32
14
  linkClass =
33
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
34
- } else if (buttonColor === "gray") {
15
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
16
+ }
17
+ else if (buttonColor === 'gray') {
35
18
  linkClass =
36
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-gray-700 rounded-lg hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800";
37
- } else if (buttonColor === "red") {
19
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-gray-700 rounded-lg hover:bg-gray-800 focus:ring-4 focus:ring-gray-300 dark:bg-gray-600 dark:hover:bg-gray-700 dark:focus:ring-gray-800';
20
+ }
21
+ else if (buttonColor === 'red') {
38
22
  linkClass =
39
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-red-700 rounded-lg hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800";
40
- } else if (buttonColor === "yellow") {
23
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-red-700 rounded-lg hover:bg-red-800 focus:ring-4 focus:ring-red-300 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800';
24
+ }
25
+ else if (buttonColor === 'yellow') {
41
26
  linkClass =
42
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-yellow-700 rounded-lg hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800";
43
- } else if (buttonColor === "green") {
27
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-yellow-700 rounded-lg hover:bg-yellow-800 focus:ring-4 focus:ring-yellow-300 dark:bg-yellow-600 dark:hover:bg-yellow-700 dark:focus:ring-yellow-800';
28
+ }
29
+ else if (buttonColor === 'green') {
44
30
  linkClass =
45
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-green-700 rounded-lg hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";
46
- } else if (buttonColor === "indigo") {
31
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-green-700 rounded-lg hover:bg-green-800 focus:ring-4 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800';
32
+ }
33
+ else if (buttonColor === 'indigo') {
47
34
  linkClass =
48
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-indigo-700 rounded-lg hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800";
49
- } else if (buttonColor === "purple") {
35
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-indigo-700 rounded-lg hover:bg-indigo-800 focus:ring-4 focus:ring-indigo-300 dark:bg-indigo-600 dark:hover:bg-indigo-700 dark:focus:ring-indigo-800';
36
+ }
37
+ else if (buttonColor === 'purple') {
50
38
  linkClass =
51
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-purple-700 rounded-lg hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800";
52
- } else if (buttonColor === "pink") {
39
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-purple-700 rounded-lg hover:bg-purple-800 focus:ring-4 focus:ring-purple-300 dark:bg-purple-600 dark:hover:bg-purple-700 dark:focus:ring-purple-800';
40
+ }
41
+ else if (buttonColor === 'pink') {
53
42
  linkClass =
54
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-pink-700 rounded-lg hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800";
55
- } else {
43
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-pink-700 rounded-lg hover:bg-pink-800 focus:ring-4 focus:ring-pink-300 dark:bg-pink-600 dark:hover:bg-pink-700 dark:focus:ring-pink-800';
44
+ }
45
+ else {
56
46
  linkClass =
57
- "inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800";
58
- }
47
+ 'inline-flex items-center py-2 px-4 text-sm font-medium text-center text-white bg-blue-700 rounded-lg hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800';
48
+ }
59
49
  </script>
60
50
 
61
51
  <div
62
- class="max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700"
52
+ class="max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700"
63
53
  >
64
- <div class="flex justify-end px-4 pt-4">
65
- <button
66
- id="dropdownButton"
67
- on:click={toggleDropdown}
68
- class="sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
69
- type="button"
70
- >
71
- <svg
72
- class="w-6 h-6"
73
- fill="currentColor"
74
- viewBox="0 0 20 20"
75
- xmlns="http://www.w3.org/2000/svg"
76
- ><path
77
- d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
78
- /></svg
79
- >
80
- </button>
54
+ <div class="flex justify-end px-4 pt-4">
55
+ <button
56
+ id="dropdownButton"
57
+ on:click={toggleDropdown}
58
+ class="sm:inline-block text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-1.5"
59
+ type="button"
60
+ >
61
+ <svg
62
+ class="w-6 h-6"
63
+ fill="currentColor"
64
+ viewBox="0 0 20 20"
65
+ xmlns="http://www.w3.org/2000/svg"
66
+ ><path
67
+ d="M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
68
+ /></svg
69
+ >
70
+ </button>
81
71
 
82
- <div
83
- id="dropdown"
84
- class:hidden={isOpen}
85
- class:block={!isOpen}
86
- class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute"
87
- >
88
- <ul class="py-1" aria-labelledby="dropdownButton">
89
- {#each dropdownLinks as { href, label, rel }}
90
- <li>
91
- <a
92
- {href}
93
- {rel}
94
- 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"
95
- >{label}</a
96
- >
97
- </li>
98
- {/each}
99
- </ul>
100
- </div>
101
- </div>
72
+ <div
73
+ id="dropdown"
74
+ class:hidden={isOpen}
75
+ class:block={!isOpen}
76
+ class="hidden z-10 w-44 text-base list-none bg-white rounded divide-y divide-gray-100 shadow dark:bg-gray-700 absolute"
77
+ >
78
+ <ul class="py-1" aria-labelledby="dropdownButton">
79
+ {#each dropdownLinks as { href, label, rel }}
80
+ <li>
81
+ <a
82
+ {href}
83
+ {rel}
84
+ 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"
85
+ >{label}</a
86
+ >
87
+ </li>
88
+ {/each}
89
+ </ul>
90
+ </div>
91
+ </div>
102
92
 
103
- <div class="flex flex-col items-center pb-10">
104
- <img
105
- class="mb-3 w-24 h-24 rounded-full shadow-lg"
106
- src={img.src}
107
- alt={img.alt}
108
- />
109
- <h3 class="mb-1 text-xl font-medium text-gray-900 dark:text-white">
110
- {header}
111
- </h3>
112
- <span class="text-sm text-gray-500 dark:text-gray-400">{content}</span>
113
- <div class="flex mt-4 space-x-3 lg:mt-6">
114
- {#if link1.href}
115
- <a href={link1.href} rel={link1.rel} class={linkClass}>{link1.title}</a>
116
- {/if}
117
- {#if link2.href}
118
- <a
119
- href={link2.href}
120
- rel={link2.rel}
121
- class="inline-flex items-center py-2 px-4 text-sm font-medium text-center text-gray-900 bg-white rounded-lg border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-800"
122
- >{link2.title}</a
123
- >
124
- {/if}
125
- </div>
126
- </div>
93
+ <div class="flex flex-col items-center pb-10">
94
+ <img class="mb-3 w-24 h-24 rounded-full shadow-lg" src={img.src} alt={img.alt} />
95
+ <h3 class="mb-1 text-xl font-medium text-gray-900 dark:text-white">
96
+ {header}
97
+ </h3>
98
+ <span class="text-sm text-gray-500 dark:text-gray-400">{content}</span>
99
+ <div class="flex mt-4 space-x-3 lg:mt-6">
100
+ {#if link1.link}
101
+ <a href={link1.link} rel={link1.rel} class={linkClass}>{link1.name}</a>
102
+ {/if}
103
+ {#if link2.link}
104
+ <a
105
+ href={link2.link}
106
+ rel={link2.rel}
107
+ class="inline-flex items-center py-2 px-4 text-sm font-medium text-center text-gray-900 bg-white rounded-lg border border-gray-300 hover:bg-gray-100 focus:ring-4 focus:ring-blue-300 dark:bg-gray-800 dark:text-white dark:border-gray-600 dark:hover:bg-gray-700 dark:hover:border-gray-700 dark:focus:ring-gray-800"
108
+ >{link2.name}</a
109
+ >
110
+ {/if}
111
+ </div>
112
+ </div>
127
113
  </div>
@@ -1,63 +1,23 @@
1
- /** @typedef {typeof __propDef.props} InteractiveCardProps */
2
- /** @typedef {typeof __propDef.events} InteractiveCardEvents */
3
- /** @typedef {typeof __propDef.slots} InteractiveCardSlots */
4
- export default class InteractiveCard extends SvelteComponentTyped<{
5
- header?: string;
6
- img?: {
7
- src: string;
8
- alt: string;
9
- };
10
- dropdownLinks?: {
11
- href: string;
12
- label: string;
13
- }[];
14
- content?: string;
15
- buttonColor?: string;
16
- link1?: {
17
- href: string;
18
- title: string;
19
- rel: string;
20
- };
21
- link2?: {
22
- href: string;
23
- title: string;
24
- rel: string;
25
- };
26
- }, {
27
- [evt: string]: CustomEvent<any>;
28
- }, {}> {
29
- }
30
- export type InteractiveCardProps = typeof __propDef.props;
31
- export type InteractiveCardEvents = typeof __propDef.events;
32
- export type InteractiveCardSlots = typeof __propDef.slots;
33
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { DropdownLinkType, ImgType, LinkType } from '../types';
34
3
  declare const __propDef: {
35
4
  props: {
5
+ dropdownLinks: DropdownLinkType[];
6
+ img: ImgType;
36
7
  header?: string;
37
- img?: {
38
- src: string;
39
- alt: string;
40
- };
41
- dropdownLinks?: {
42
- href: string;
43
- label: string;
44
- }[];
45
8
  content?: string;
46
9
  buttonColor?: string;
47
- link1?: {
48
- href: string;
49
- title: string;
50
- rel: string;
51
- };
52
- link2?: {
53
- href: string;
54
- title: string;
55
- rel: string;
56
- };
10
+ link1: LinkType;
11
+ link2: LinkType;
57
12
  };
58
13
  events: {
59
14
  [evt: string]: CustomEvent<any>;
60
15
  };
61
16
  slots: {};
62
17
  };
18
+ export declare type InteractiveCardProps = typeof __propDef.props;
19
+ export declare type InteractiveCardEvents = typeof __propDef.events;
20
+ export declare type InteractiveCardSlots = typeof __propDef.slots;
21
+ export default class InteractiveCard extends SvelteComponentTyped<InteractiveCardProps, InteractiveCardEvents, InteractiveCardSlots> {
22
+ }
63
23
  export {};
@@ -1,78 +1,69 @@
1
- <script>
2
- import { onMount } from "svelte";
3
- export let btnClass =
4
- "text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 fixed left-0 top-8 z-50";
5
-
6
- let mode;
7
-
8
- const toggleTheme = () => {
1
+ <script >import { onMount } from 'svelte';
2
+ export let btnClass = 'text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 fixed left-0 top-8 z-50';
3
+ let mode;
4
+ const toggleTheme = () => {
9
5
  // console.log("clicked theme icon");
10
- if (localStorage.getItem("color-theme") === "dark") {
11
- console.log("it's dark");
12
- mode = "dark";
13
- window.document.documentElement.classList.remove("dark");
14
- window.document.documentElement.classList.add("light");
15
- localStorage.setItem("color-theme", "light");
16
- } else {
17
- console.log("it's light");
18
- mode = "light";
19
- window.document.documentElement.classList.remove("light");
20
- window.document.documentElement.classList.add("dark");
21
- localStorage.setItem("color-theme", "dark");
6
+ if (localStorage.getItem('color-theme') === 'dark') {
7
+ // console.log("it's dark");
8
+ mode = 'dark';
9
+ window.document.documentElement.classList.remove('dark');
10
+ window.document.documentElement.classList.add('light');
11
+ localStorage.setItem('color-theme', 'light');
22
12
  }
23
- };
24
-
25
- onMount(() => {
26
- let themeToggleDarkIcon = document.getElementById("theme-toggle-dark-icon");
27
- let themeToggleLightIcon = document.getElementById(
28
- "theme-toggle-light-icon"
29
- );
30
- if (
31
- localStorage.getItem("color-theme") === "dark" ||
32
- (!("color-theme" in localStorage) &&
33
- window.matchMedia("(prefers-color-scheme: dark)").matches)
34
- ) {
35
- document.documentElement.classList.add("dark");
36
- themeToggleDarkIcon.classList.add("hidden");
37
- } else {
38
- document.documentElement.classList.remove("dark");
39
- themeToggleLightIcon.classList.add("hidden");
13
+ else {
14
+ // console.log("it's light");
15
+ mode = 'light';
16
+ window.document.documentElement.classList.remove('light');
17
+ window.document.documentElement.classList.add('dark');
18
+ localStorage.setItem('color-theme', 'dark');
19
+ }
20
+ };
21
+ onMount(() => {
22
+ let themeToggleDarkIcon = document.getElementById('theme-toggle-dark-icon');
23
+ let themeToggleLightIcon = document.getElementById('theme-toggle-light-icon');
24
+ if (localStorage.getItem('color-theme') === 'dark' ||
25
+ (!('color-theme' in localStorage) &&
26
+ window.matchMedia('(prefers-color-scheme: dark)').matches)) {
27
+ document.documentElement.classList.add('dark');
28
+ themeToggleDarkIcon.classList.add('hidden');
29
+ }
30
+ else {
31
+ document.documentElement.classList.remove('dark');
32
+ themeToggleLightIcon.classList.add('hidden');
40
33
  }
41
- });
34
+ });
42
35
  </script>
43
36
 
44
37
  <button
45
- on:click={toggleTheme}
46
- aria-label="Dark mode"
47
- id="theme-toggle"
48
- type="button"
49
- class={btnClass}
38
+ on:click={toggleTheme}
39
+ aria-label="Dark mode"
40
+ id="theme-toggle"
41
+ type="button"
42
+ class={btnClass}
50
43
  >
51
- <svg
52
- class:hidden={mode === "light"}
53
- on:click={() => (mode = "dark")}
54
- id="theme-toggle-dark-icon"
55
- class="hidden w-5 h-5"
56
- fill="currentColor"
57
- viewBox="0 0 20 20"
58
- xmlns="http://www.w3.org/2000/svg"
59
- ><path
60
- d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"
61
- /></svg
62
- >
44
+ <svg
45
+ class:hidden={mode === 'light'}
46
+ on:click={() => (mode = 'dark')}
47
+ id="theme-toggle-dark-icon"
48
+ class="hidden w-5 h-5"
49
+ fill="currentColor"
50
+ viewBox="0 0 20 20"
51
+ xmlns="http://www.w3.org/2000/svg"
52
+ ><path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" /></svg
53
+ >
63
54
 
64
- <svg
65
- class:hidden={mode === "dark"}
66
- on:click={() => (mode = "light")}
67
- id="theme-toggle-light-icon"
68
- class="hidden w-5 h-5"
69
- fill="currentColor"
70
- viewBox="0 0 20 20"
71
- xmlns="http://www.w3.org/2000/svg"
72
- ><path
73
- d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
74
- fill-rule="evenodd"
75
- clip-rule="evenodd"
76
- /></svg
77
- >
55
+ <svg
56
+ class:hidden={mode === 'dark'}
57
+ on:click={() => (mode = 'light')}
58
+ id="theme-toggle-light-icon"
59
+ class="hidden w-5 h-5"
60
+ fill="currentColor"
61
+ viewBox="0 0 20 20"
62
+ xmlns="http://www.w3.org/2000/svg"
63
+ ><path
64
+ d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z"
65
+ fill-rule="evenodd"
66
+ clip-rule="evenodd"
67
+ /></svg
68
+ >
78
69
  </button>
@@ -1,15 +1,3 @@
1
- /** @typedef {typeof __propDef.props} DarkModeProps */
2
- /** @typedef {typeof __propDef.events} DarkModeEvents */
3
- /** @typedef {typeof __propDef.slots} DarkModeSlots */
4
- export default class DarkMode extends SvelteComponentTyped<{
5
- btnClass?: string;
6
- }, {
7
- [evt: string]: CustomEvent<any>;
8
- }, {}> {
9
- }
10
- export type DarkModeProps = typeof __propDef.props;
11
- export type DarkModeEvents = typeof __propDef.events;
12
- export type DarkModeSlots = typeof __propDef.slots;
13
1
  import { SvelteComponentTyped } from "svelte";
14
2
  declare const __propDef: {
15
3
  props: {
@@ -20,4 +8,9 @@ declare const __propDef: {
20
8
  };
21
9
  slots: {};
22
10
  };
11
+ export declare type DarkModeProps = typeof __propDef.props;
12
+ export declare type DarkModeEvents = typeof __propDef.events;
13
+ export declare type DarkModeSlots = typeof __propDef.slots;
14
+ export default class DarkMode extends SvelteComponentTyped<DarkModeProps, DarkModeEvents, DarkModeSlots> {
15
+ }
23
16
  export {};
@@ -2,10 +2,10 @@
2
2
  /** @typedef {typeof __propDef.events} DropdownDefaultEvents */
3
3
  /** @typedef {typeof __propDef.slots} DropdownDefaultSlots */
4
4
  export default class DropdownDefault extends SvelteComponentTyped<{
5
+ label?: string;
5
6
  rounded?: boolean;
6
7
  textSize?: string;
7
8
  color?: string;
8
- label?: string;
9
9
  items?: ({
10
10
  link: string;
11
11
  label: string;
@@ -27,10 +27,10 @@ export type DropdownDefaultSlots = typeof __propDef.slots;
27
27
  import { SvelteComponentTyped } from "svelte";
28
28
  declare const __propDef: {
29
29
  props: {
30
+ label?: string;
30
31
  rounded?: boolean;
31
32
  textSize?: string;
32
33
  color?: string;
33
- label?: string;
34
34
  items?: ({
35
35
  link: string;
36
36
  label: string;
@@ -1,52 +1,36 @@
1
- <script>
2
- export let site = {
3
- link: "/",
4
- name: "Flowbite Svelte",
5
- img: "/images/mkdir-logo.png",
6
- };
7
-
8
- export let links = [
9
- { name: "About", link: "/about", rel: undefined },
10
- { name: "Privacy Policy", link: "/", rel: undefined },
11
- { name: "Licensing", link: "/", rel: undefined },
12
- { name: "Contact", link: "/", rel: undefined },
13
- ];
14
- export let footerClass =
15
- "p-4 bg-white rounded-lg shadow md:px-6 md:py-8 dark:bg-gray-800";
16
- export let divClass = "sm:flex sm:items-center sm:justify-between";
17
- export let siteNameClass =
18
- "self-center text-2xl font-semibold whitespace-nowrap dark:text-white";
19
- export let ulClass =
20
- "flex flex-wrap items-center mb-6 text-sm text-gray-500 sm:mb-0 dark:text-gray-400";
21
- export let aClass = "mr-4 hover:underline md:mr-6";
22
- export let siteNameLinkClass = "flex items-center mb-4 sm:mb-0";
23
- export let imgClass = "mr-3 h-8";
24
- export let hrClass =
25
- "my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8";
26
- export let copyRightSpanClass =
27
- "block text-sm text-gray-500 sm:text-center dark:text-gray-400";
28
- export let copyRightLinkClass = "hover:underline";
29
- export let copyrightYear = "© 2022";
30
- export let allRightsReserved = "All Rights Reserved.";
1
+ <script >export let site;
2
+ export let links;
3
+ export let footerClass = 'p-4 bg-white rounded-lg shadow md:px-6 md:py-8 dark:bg-gray-800';
4
+ export let divClass = 'sm:flex sm:items-center sm:justify-between';
5
+ export let siteNameClass = 'self-center text-2xl font-semibold whitespace-nowrap dark:text-white';
6
+ export let ulClass = 'flex flex-wrap items-center mb-6 text-sm text-gray-500 sm:mb-0 dark:text-gray-400';
7
+ export let aClass = 'mr-4 hover:underline md:mr-6';
8
+ export let siteNameLinkClass = 'flex items-center mb-4 sm:mb-0';
9
+ export let imgClass = 'mr-3 h-8';
10
+ export let hrClass = 'my-6 border-gray-200 sm:mx-auto dark:border-gray-700 lg:my-8';
11
+ export let copyRightSpanClass = 'block text-sm text-gray-500 sm:text-center dark:text-gray-400';
12
+ export let copyRightLinkClass = 'hover:underline';
13
+ export let copyrightYear = '© 2022';
14
+ export let allRightsReserved = 'All Rights Reserved.';
31
15
  </script>
32
16
 
33
17
  <footer class={footerClass}>
34
- <div class={divClass}>
35
- <a href={site.link} class={siteNameLinkClass}>
36
- <img src={site.img} class={imgClass} alt={site.name} />
37
- <span class={siteNameClass}>{site.name}</span>
38
- </a>
39
- <ul class={ulClass}>
40
- {#each links as { name, link, rel }}
41
- <li>
42
- <a href={link} {rel} class={aClass}>{name}</a>
43
- </li>
44
- {/each}
45
- </ul>
46
- </div>
47
- <hr class={hrClass} />
48
- <span class={copyRightSpanClass}
49
- >{copyrightYear}
50
- <a href={site.link} class={copyRightLinkClass}>{site.name}</a>. {allRightsReserved}
51
- </span>
18
+ <div class={divClass}>
19
+ <a href={site.link} class={siteNameLinkClass}>
20
+ <img src={site.img} class={imgClass} alt={site.name} />
21
+ <span class={siteNameClass}>{site.name}</span>
22
+ </a>
23
+ <ul class={ulClass}>
24
+ {#each links as { name, link, rel }}
25
+ <li>
26
+ <a href={link} {rel} class={aClass}>{name}</a>
27
+ </li>
28
+ {/each}
29
+ </ul>
30
+ </div>
31
+ <hr class={hrClass} />
32
+ <span class={copyRightSpanClass}
33
+ >{copyrightYear}
34
+ <a href={site.link} class={copyRightLinkClass}>{site.name}</a>. {allRightsReserved}
35
+ </span>
52
36
  </footer>
@@ -1,65 +1,30 @@
1
- /** @typedef {typeof __propDef.props} LogoFooterProps */
2
- /** @typedef {typeof __propDef.events} LogoFooterEvents */
3
- /** @typedef {typeof __propDef.slots} LogoFooterSlots */
4
- export default class LogoFooter extends SvelteComponentTyped<{
5
- site?: {
6
- link: string;
7
- name: string;
8
- img: string;
9
- };
10
- links?: {
11
- name: string;
12
- link: string;
13
- rel: any;
14
- }[];
15
- footerClass?: string;
16
- siteNameClass?: string;
17
- ulClass?: string;
18
- aClass?: string;
19
- siteNameLinkClass?: string;
20
- copyrightYear?: string;
21
- allRightsReserved?: string;
22
- divClass?: string;
23
- imgClass?: string;
24
- hrClass?: string;
25
- copyRightSpanClass?: string;
26
- copyRightLinkClass?: string;
27
- }, {
28
- [evt: string]: CustomEvent<any>;
29
- }, {}> {
30
- }
31
- export type LogoFooterProps = typeof __propDef.props;
32
- export type LogoFooterEvents = typeof __propDef.events;
33
- export type LogoFooterSlots = typeof __propDef.slots;
34
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { LinkType, SiteType } from '../types';
35
3
  declare const __propDef: {
36
4
  props: {
37
- site?: {
38
- link: string;
39
- name: string;
40
- img: string;
41
- };
42
- links?: {
43
- name: string;
44
- link: string;
45
- rel: any;
46
- }[];
5
+ site: SiteType;
6
+ links: LinkType[];
47
7
  footerClass?: string;
8
+ divClass?: string;
48
9
  siteNameClass?: string;
49
10
  ulClass?: string;
50
11
  aClass?: string;
51
12
  siteNameLinkClass?: string;
52
- copyrightYear?: string;
53
- allRightsReserved?: string;
54
- divClass?: string;
55
13
  imgClass?: string;
56
14
  hrClass?: string;
57
15
  copyRightSpanClass?: string;
58
16
  copyRightLinkClass?: string;
17
+ copyrightYear?: string;
18
+ allRightsReserved?: string;
59
19
  };
60
20
  events: {
61
21
  [evt: string]: CustomEvent<any>;
62
22
  };
63
23
  slots: {};
64
24
  };
25
+ export declare type LogoFooterProps = typeof __propDef.props;
26
+ export declare type LogoFooterEvents = typeof __propDef.events;
27
+ export declare type LogoFooterSlots = typeof __propDef.slots;
28
+ export default class LogoFooter extends SvelteComponentTyped<LogoFooterProps, LogoFooterEvents, LogoFooterSlots> {
29
+ }
65
30
  export {};