flowbite-svelte 0.9.1 → 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 (43) hide show
  1. package/accordions/AccordionItem.svelte +31 -34
  2. package/accordions/AccordionItem.svelte.d.ts +6 -16
  3. package/buttongroups/ButtonGroup.svelte +1 -14
  4. package/buttongroups/ButtonGroup.svelte.d.ts +1 -1
  5. package/buttongroups/ButtonGroupOutline.svelte +1 -14
  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.d.ts +14 -14
  24. package/navbar/DropdownNavbar.svelte +116 -201
  25. package/navbar/DropdownNavbar.svelte.d.ts +8 -52
  26. package/navbar/Navbar.svelte +68 -99
  27. package/navbar/Navbar.svelte.d.ts +8 -26
  28. package/package.json +1 -1
  29. package/spinners/Spinner.svelte +63 -57
  30. package/spinners/Spinner.svelte.d.ts +8 -17
  31. package/spinners/SpinnerButton.svelte +31 -31
  32. package/spinners/SpinnerButton.svelte.d.ts +6 -15
  33. package/tabs/DefaultTabs.svelte +13 -39
  34. package/tabs/DefaultTabs.svelte.d.ts +7 -23
  35. package/tabs/InteractiveTabs.svelte +33 -63
  36. package/tabs/InteractiveTabs.svelte.d.ts +7 -35
  37. package/tabs/PillTabs.svelte +12 -34
  38. package/tabs/PillTabs.svelte.d.ts +7 -21
  39. package/tooltips/LightTooltip.svelte +112 -114
  40. package/tooltips/LightTooltip.svelte.d.ts +6 -21
  41. package/tooltips/Tooltip.svelte +113 -114
  42. package/tooltips/Tooltip.svelte.d.ts +6 -21
  43. package/types.d.ts +48 -5
@@ -1,105 +1,74 @@
1
- <script>
2
- import { page } from "$app/stores";
3
-
4
- export let sitename = "Svelte Flow";
5
- export let logo = "/images/mkdir-logo.png";
6
- export let alt = "Svelte Flow";
7
- export let textsize = "text-sm";
8
- let barHidden = true;
9
- const handleClickbtn = () => {
1
+ <script >import { page } from '$app/stores';
2
+ export let sitename = 'Svelte Flow';
3
+ export let logo = '/images/mkdir-logo.png';
4
+ export let alt = 'Svelte Flow';
5
+ export let textsize = 'text-sm';
6
+ let barHidden = true;
7
+ const handleClickbtn = () => {
10
8
  barHidden = !barHidden;
11
- };
12
- export let menus = [
13
- {
14
- name: "Home",
15
- link: "/",
16
- rel: undefined,
17
- },
18
- {
19
- name: "About",
20
- link: "/about",
21
- rel: undefined,
22
- },
23
- {
24
- name: "Profile",
25
- link: "/profile",
26
- rel: undefined,
27
- },
28
- {
29
- name: "GitHub",
30
- link: "/#",
31
- rel: undefined,
32
- },
33
- ];
9
+ };
10
+ export let menus;
34
11
  </script>
35
12
 
36
- <nav
37
- class="px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"
38
- >
39
- <div class="container flex flex-wrap justify-between items-center mx-auto">
40
- <a href="/" class="flex">
41
- <img src={logo} {alt} />
42
- <span
43
- class="self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white"
44
- >{sitename}</span
45
- >
46
- </a>
47
- <button
48
- on:click={handleClickbtn}
49
- type="button"
50
- class="inline-flex justify-center items-center ml-3 text-gray-400 rounded-lg md:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500"
51
- aria-controls="mobile-menu-2"
52
- aria-expanded="false"
53
- >
54
- <span class="sr-only">Open main menu</span>
55
- <svg
56
- class="w-6 h-6"
57
- fill="currentColor"
58
- viewBox="0 0 20 20"
59
- xmlns="http://www.w3.org/2000/svg"
60
- ><path
61
- fill-rule="evenodd"
62
- d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
63
- clip-rule="evenodd"
64
- /></svg
65
- >
66
- <svg
67
- class="hidden w-6 h-6"
68
- fill="currentColor"
69
- viewBox="0 0 20 20"
70
- xmlns="http://www.w3.org/2000/svg"
71
- ><path
72
- fill-rule="evenodd"
73
- 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"
74
- clip-rule="evenodd"
75
- /></svg
76
- >
77
- </button>
78
- <div
79
- class:hidden={barHidden}
80
- class="hidden w-full md:block md:w-auto"
81
- id="mobile-menu"
82
- >
83
- <ul
84
- class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium"
85
- >
86
- {#each menus as { name, link, rel }}
87
- <li>
88
- <a
89
- class:active={$page.url.pathname === link}
90
- href={link}
91
- {rel}
92
- class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent {textsize}"
93
- >{name}</a
94
- >
95
- </li>
96
- {/each}
97
- </ul>
98
- </div>
99
- </div>
13
+ <nav class="px-2 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700">
14
+ <div class="container flex flex-wrap justify-between items-center mx-auto">
15
+ <a href="/" class="flex">
16
+ <img src={logo} {alt} />
17
+ <span
18
+ class="self-center text-lg font-semibold text-gray-900 whitespace-nowrap dark:text-white"
19
+ >{sitename}</span
20
+ >
21
+ </a>
22
+ <button
23
+ on:click={handleClickbtn}
24
+ type="button"
25
+ class="inline-flex justify-center items-center ml-3 text-gray-400 rounded-lg md:hidden hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-blue-300 dark:text-gray-400 dark:hover:text-white dark:focus:ring-gray-500"
26
+ aria-controls="mobile-menu-2"
27
+ aria-expanded="false"
28
+ >
29
+ <span class="sr-only">Open main menu</span>
30
+ <svg
31
+ class="w-6 h-6"
32
+ fill="currentColor"
33
+ viewBox="0 0 20 20"
34
+ xmlns="http://www.w3.org/2000/svg"
35
+ ><path
36
+ fill-rule="evenodd"
37
+ d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
38
+ clip-rule="evenodd"
39
+ /></svg
40
+ >
41
+ <svg
42
+ class="hidden w-6 h-6"
43
+ fill="currentColor"
44
+ viewBox="0 0 20 20"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ ><path
47
+ fill-rule="evenodd"
48
+ 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"
49
+ clip-rule="evenodd"
50
+ /></svg
51
+ >
52
+ </button>
53
+ <div class:hidden={barHidden} class="hidden w-full md:block md:w-auto" id="mobile-menu">
54
+ <ul class="flex flex-col mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-sm md:font-medium">
55
+ {#each menus as { name, link, rel }}
56
+ <li>
57
+ <a
58
+ class:active={$page.url.pathname === link}
59
+ href={link}
60
+ {rel}
61
+ class="block py-2 pr-4 pl-3 text-gray-700 border-b border-gray-100 hover:bg-gray-50 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-gray-400 dark:hover:text-white dark:border-gray-700 dark:hover:bg-gray-700 md:dark:hover:bg-transparent {textsize}"
62
+ >{name}</a
63
+ >
64
+ </li>
65
+ {/each}
66
+ </ul>
67
+ </div>
68
+ </div>
100
69
  </nav>
101
70
 
102
71
  <style>
103
- #mobile-menu .active {
104
- color: #fab534;
105
- }</style>
72
+ #mobile-menu .active {
73
+ color: #fab534;
74
+ }</style>
@@ -1,39 +1,21 @@
1
- /** @typedef {typeof __propDef.props} NavbarProps */
2
- /** @typedef {typeof __propDef.events} NavbarEvents */
3
- /** @typedef {typeof __propDef.slots} NavbarSlots */
4
- export default class Navbar extends SvelteComponentTyped<{
5
- alt?: string;
6
- sitename?: string;
7
- logo?: string;
8
- textsize?: string;
9
- menus?: {
10
- name: string;
11
- link: string;
12
- rel: any;
13
- }[];
14
- }, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}> {
17
- }
18
- export type NavbarProps = typeof __propDef.props;
19
- export type NavbarEvents = typeof __propDef.events;
20
- export type NavbarSlots = typeof __propDef.slots;
21
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { LinkType } from '../types';
22
3
  declare const __propDef: {
23
4
  props: {
24
- alt?: string;
25
5
  sitename?: string;
26
6
  logo?: string;
7
+ alt?: string;
27
8
  textsize?: string;
28
- menus?: {
29
- name: string;
30
- link: string;
31
- rel: any;
32
- }[];
9
+ menus: LinkType[];
33
10
  };
34
11
  events: {
35
12
  [evt: string]: CustomEvent<any>;
36
13
  };
37
14
  slots: {};
38
15
  };
16
+ export declare type NavbarProps = typeof __propDef.props;
17
+ export declare type NavbarEvents = typeof __propDef.events;
18
+ export declare type NavbarSlots = typeof __propDef.slots;
19
+ export default class Navbar extends SvelteComponentTyped<NavbarProps, NavbarEvents, NavbarSlots> {
20
+ }
39
21
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "author": {
6
6
  "name": "Shinichi Okada",
@@ -1,62 +1,68 @@
1
- <script>
2
- export let color = "blue"; // {blue|gray|green|red|yellow|pink|purple}
3
- export let bg = "text-gray-200";
4
- export let size = "w-8 h-8";
5
- export let align; // text-{left|center|right}
6
- let colorClass;
7
- if (color === "blud") {
8
- colorClass = "fill-blue-600";
9
- } else if (color === "gray") {
10
- colorClass = "fill-gray-600 dark:fill-gray-300";
11
- } else if (color === "green") {
12
- colorClass = "fill-green-500";
13
- } else if (color === "red") {
14
- colorClass = "fill-red-600";
15
- } else if (color === "yellow") {
16
- colorClass = "fill-yellow-400";
17
- } else if (color === "pink") {
18
- colorClass = "fill-pink-600";
19
- } else if (color === "purple") {
20
- colorClass = "fill-purple-600";
21
- } else {
22
- colorClass = "fill-blue-600";
23
- }
1
+ <script >export let color = 'blue';
2
+ export let bg = 'text-gray-200';
3
+ export let size = 'w-8 h-8';
4
+ export let align;
5
+ let colorClass;
6
+ if (color === 'blue') {
7
+ colorClass = 'fill-blue-600';
8
+ }
9
+ else if (color === 'gray') {
10
+ colorClass = 'fill-gray-600 dark:fill-gray-300';
11
+ }
12
+ else if (color === 'green') {
13
+ colorClass = 'fill-green-500';
14
+ }
15
+ else if (color === 'red') {
16
+ colorClass = 'fill-red-600';
17
+ }
18
+ else if (color === 'yellow') {
19
+ colorClass = 'fill-yellow-400';
20
+ }
21
+ else if (color === 'pink') {
22
+ colorClass = 'fill-pink-600';
23
+ }
24
+ else if (color === 'purple') {
25
+ colorClass = 'fill-purple-600';
26
+ }
27
+ else {
28
+ colorClass = 'fill-blue-600';
29
+ }
24
30
  </script>
25
31
 
26
32
  {#if align}
27
- <div class={align}>
28
- <svg
29
- role="status"
30
- class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
31
- viewBox="0 0 100 101"
32
- fill="none"
33
- xmlns="http://www.w3.org/2000/svg"
34
- >
35
- <path
36
- d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
37
- fill="currentColor"
38
- />
39
- <path
40
- d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
41
- fill="currentFill"
42
- />
43
- </svg>
44
- </div>
33
+ <div class={align}>
34
+ <svg
35
+ role="status"
36
+ class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
37
+ viewBox="0 0 100 101"
38
+ fill="none"
39
+ xmlns="http://www.w3.org/2000/svg"
40
+ >
41
+ <path
42
+ d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
43
+ fill="currentColor"
44
+ />
45
+ <path
46
+ d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
47
+ fill="currentFill"
48
+ />
49
+ </svg>
50
+ </div>
45
51
  {:else}
46
- <svg
47
- role="status"
48
- class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
49
- viewBox="0 0 100 101"
50
- fill="none"
51
- xmlns="http://www.w3.org/2000/svg"
52
- >
53
- <path
54
- d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
55
- fill="currentColor"
56
- />
57
- <path
58
- d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
59
- fill="currentFill"
60
- />
61
- </svg>
52
+ <svg
53
+ role="status"
54
+ class="inline mr-2 {size} {bg} animate-spin dark:text-gray-600 {colorClass}"
55
+ viewBox="0 0 100 101"
56
+ fill="none"
57
+ xmlns="http://www.w3.org/2000/svg"
58
+ >
59
+ <path
60
+ d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
61
+ fill="currentColor"
62
+ />
63
+ <path
64
+ d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
65
+ fill="currentFill"
66
+ />
67
+ </svg>
62
68
  {/if}
@@ -1,29 +1,20 @@
1
- /** @typedef {typeof __propDef.props} SpinnerProps */
2
- /** @typedef {typeof __propDef.events} SpinnerEvents */
3
- /** @typedef {typeof __propDef.slots} SpinnerSlots */
4
- export default class Spinner extends SvelteComponentTyped<{
5
- align: any;
6
- color?: string;
7
- bg?: string;
8
- size?: string;
9
- }, {
10
- [evt: string]: CustomEvent<any>;
11
- }, {}> {
12
- }
13
- export type SpinnerProps = typeof __propDef.props;
14
- export type SpinnerEvents = typeof __propDef.events;
15
- export type SpinnerSlots = typeof __propDef.slots;
16
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { Colors, AlignType } from '../types';
17
3
  declare const __propDef: {
18
4
  props: {
19
- align: any;
20
- color?: string;
5
+ color?: Colors;
21
6
  bg?: string;
22
7
  size?: string;
8
+ align: AlignType;
23
9
  };
24
10
  events: {
25
11
  [evt: string]: CustomEvent<any>;
26
12
  };
27
13
  slots: {};
28
14
  };
15
+ export declare type SpinnerProps = typeof __propDef.props;
16
+ export declare type SpinnerEvents = typeof __propDef.events;
17
+ export declare type SpinnerSlots = typeof __propDef.slots;
18
+ export default class Spinner extends SvelteComponentTyped<SpinnerProps, SpinnerEvents, SpinnerSlots> {
19
+ }
29
20
  export {};
@@ -1,37 +1,37 @@
1
- <script>
2
- export let color; // {null|blue}
3
- let colorClass;
4
- let fillColor1;
5
- let fillColor2;
6
- if (color === "blue") {
1
+ <script >export let color; // {null|blue}
2
+ let colorClass;
3
+ let fillColor1;
4
+ let fillColor2;
5
+ if (color === 'blue') {
7
6
  colorClass =
8
- "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 mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 inline-flex items-center";
9
- fillColor1 = "#E5E7EB";
10
- fillColor2 = "currentColor";
11
- } else {
7
+ '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 mr-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 inline-flex items-center';
8
+ fillColor1 = '#E5E7EB';
9
+ fillColor2 = 'currentColor';
10
+ }
11
+ else {
12
12
  colorClass =
13
- "py-2.5 px-5 mr-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 inline-flex items-center";
14
- fillColor1 = "currentColor";
15
- fillColor2 = "#1C64F2";
16
- }
13
+ 'py-2.5 px-5 mr-2 text-sm font-medium text-gray-900 bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-2 focus:ring-blue-700 focus:text-blue-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700 inline-flex items-center';
14
+ fillColor1 = 'currentColor';
15
+ fillColor2 = '#1C64F2';
16
+ }
17
17
  </script>
18
18
 
19
19
  <button disabled type="button" class={colorClass}>
20
- <svg
21
- role="status"
22
- class="inline mr-3 w-4 h-4 text-white animate-spin"
23
- viewBox="0 0 100 101"
24
- fill="none"
25
- xmlns="http://www.w3.org/2000/svg"
26
- >
27
- <path
28
- d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
29
- fill={fillColor1}
30
- />
31
- <path
32
- d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
33
- fill={fillColor2}
34
- />
35
- </svg>
36
- <slot>Loading ...</slot>
20
+ <svg
21
+ role="status"
22
+ class="inline mr-3 w-4 h-4 text-white animate-spin"
23
+ viewBox="0 0 100 101"
24
+ fill="none"
25
+ xmlns="http://www.w3.org/2000/svg"
26
+ >
27
+ <path
28
+ d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
29
+ fill={fillColor1}
30
+ />
31
+ <path
32
+ d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
33
+ fill={fillColor2}
34
+ />
35
+ </svg>
36
+ <slot>Loading ...</slot>
37
37
  </button>
@@ -1,21 +1,7 @@
1
- /** @typedef {typeof __propDef.props} SpinnerButtonProps */
2
- /** @typedef {typeof __propDef.events} SpinnerButtonEvents */
3
- /** @typedef {typeof __propDef.slots} SpinnerButtonSlots */
4
- export default class SpinnerButton extends SvelteComponentTyped<{
5
- color: any;
6
- }, {
7
- [evt: string]: CustomEvent<any>;
8
- }, {
9
- default: {};
10
- }> {
11
- }
12
- export type SpinnerButtonProps = typeof __propDef.props;
13
- export type SpinnerButtonEvents = typeof __propDef.events;
14
- export type SpinnerButtonSlots = typeof __propDef.slots;
15
1
  import { SvelteComponentTyped } from "svelte";
16
2
  declare const __propDef: {
17
3
  props: {
18
- color: any;
4
+ color: 'blue' | undefined;
19
5
  };
20
6
  events: {
21
7
  [evt: string]: CustomEvent<any>;
@@ -24,4 +10,9 @@ declare const __propDef: {
24
10
  default: {};
25
11
  };
26
12
  };
13
+ export declare type SpinnerButtonProps = typeof __propDef.props;
14
+ export declare type SpinnerButtonEvents = typeof __propDef.events;
15
+ export declare type SpinnerButtonSlots = typeof __propDef.slots;
16
+ export default class SpinnerButton extends SvelteComponentTyped<SpinnerButtonProps, SpinnerButtonEvents, SpinnerButtonSlots> {
17
+ }
27
18
  export {};
@@ -1,43 +1,17 @@
1
- <script>
2
- export let tabs = [
3
- {
4
- name: "Profile",
5
- active: true,
6
- link: "/#",
7
- rel: undefined,
8
- },
9
- {
10
- name: "Dashboard",
11
- active: false,
12
- link: "/#",
13
- rel: undefined,
14
- },
15
- {
16
- name: "Settings",
17
- active: false,
18
- link: "/#",
19
- rel: undefined,
20
- },
21
- {
22
- name: "Contacts",
23
- active: false,
24
- link: "/#",
25
- rel: undefined,
26
- },
27
- ];
1
+ <script >export let tabs;
28
2
  </script>
29
3
 
30
4
  <ul class="flex flex-wrap border-b border-gray-200 dark:border-gray-700">
31
- {#each tabs as { name, active, link, rel }}
32
- <li class="mr-2">
33
- <a
34
- href={link}
35
- {rel}
36
- aria-current="page"
37
- class={active
38
- ? "inline-block py-4 px-4 text-sm font-medium text-center text-blue-600 bg-gray-100 rounded-t-lg active dark:bg-gray-800 dark:text-blue-500"
39
- : " inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300 "}
40
- >{name}</a
41
- >
42
- </li>{/each}
5
+ {#each tabs as { name, active, link, rel }}
6
+ <li class="mr-2">
7
+ <a
8
+ href={link}
9
+ {rel}
10
+ aria-current="page"
11
+ class={active
12
+ ? 'inline-block py-4 px-4 text-sm font-medium text-center text-blue-600 bg-gray-100 rounded-t-lg active dark:bg-gray-800 dark:text-blue-500'
13
+ : ' inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg hover:text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-gray-300 '}
14
+ >{name}</a
15
+ >
16
+ </li>{/each}
43
17
  </ul>
@@ -1,33 +1,17 @@
1
- /** @typedef {typeof __propDef.props} DefaultTabsProps */
2
- /** @typedef {typeof __propDef.events} DefaultTabsEvents */
3
- /** @typedef {typeof __propDef.slots} DefaultTabsSlots */
4
- export default class DefaultTabs extends SvelteComponentTyped<{
5
- tabs?: {
6
- name: string;
7
- active: boolean;
8
- link: string;
9
- rel: any;
10
- }[];
11
- }, {
12
- [evt: string]: CustomEvent<any>;
13
- }, {}> {
14
- }
15
- export type DefaultTabsProps = typeof __propDef.props;
16
- export type DefaultTabsEvents = typeof __propDef.events;
17
- export type DefaultTabsSlots = typeof __propDef.slots;
18
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { TabType } from '../types';
19
3
  declare const __propDef: {
20
4
  props: {
21
- tabs?: {
22
- name: string;
23
- active: boolean;
24
- link: string;
25
- rel: any;
26
- }[];
5
+ tabs: TabType[];
27
6
  };
28
7
  events: {
29
8
  [evt: string]: CustomEvent<any>;
30
9
  };
31
10
  slots: {};
32
11
  };
12
+ export declare type DefaultTabsProps = typeof __propDef.props;
13
+ export declare type DefaultTabsEvents = typeof __propDef.events;
14
+ export declare type DefaultTabsSlots = typeof __propDef.slots;
15
+ export default class DefaultTabs extends SvelteComponentTyped<DefaultTabsProps, DefaultTabsEvents, DefaultTabsSlots> {
16
+ }
33
17
  export {};