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,69 +1,39 @@
1
- <script>
2
- // import { handleTabs } from "./handleTabs";
3
- export let tabId = "myTab";
4
-
5
- export let activeTabValue = 1;
6
- const handleClick = (tabValue) => () => (activeTabValue = tabValue);
7
-
8
- export let tabs = [
9
- {
10
- lavel: "Profile",
11
- id: 1,
12
- content:
13
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
14
- },
15
- {
16
- lavel: "Dashboard",
17
- id: 2,
18
- content:
19
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
20
- },
21
- {
22
- lavel: "Settings",
23
- id: 3,
24
- content:
25
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
26
- },
27
- {
28
- name: "Contacts",
29
- id: 4,
30
- content:
31
- "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",
32
- },
33
- ];
1
+ <script >export let tabId = 'myTab';
2
+ export let activeTabValue = 1;
3
+ const handleClick = (tabValue) => () => (activeTabValue = tabValue);
4
+ export let tabs;
34
5
  </script>
35
6
 
36
7
  <div class="mb-4 border-b border-gray-200 dark:border-gray-700">
37
- <ul class="flex flex-wrap -mb-px" id={tabId} role="tablist">
38
- {#each tabs as { label, selected, id }}
39
- <li class="mr-2" role="presentation">
40
- <button
41
- on:click={handleClick(id)}
42
- class="inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"
43
- id="{label}-tab"
44
- type="button"
45
- role="tab"
46
- class:active={activeTabValue === id}
47
- aria-controls={label}
48
- aria-selected={selected}>{label}</button
49
- >
50
- </li>
51
- {/each}
52
- </ul>
8
+ <ul class="flex flex-wrap -mb-px" id={tabId} role="tablist">
9
+ {#each tabs as { label, id }}
10
+ <li class="mr-2" role="presentation">
11
+ <button
12
+ on:click={handleClick(id)}
13
+ class="inline-block py-4 px-4 text-sm font-medium text-center text-gray-500 rounded-t-lg border-b-2 border-transparent hover:text-gray-600 hover:border-gray-300 dark:text-gray-400 dark:hover:text-gray-300"
14
+ id="{label}-tab"
15
+ type="button"
16
+ role="tab"
17
+ class:active={activeTabValue === id}
18
+ aria-controls={label}>{label}</button
19
+ >
20
+ </li>
21
+ {/each}
22
+ </ul>
53
23
  </div>
54
24
  <div id="{tabId}Content">
55
- {#each tabs as { label, content, id }}
56
- {#if activeTabValue === id}
57
- <div
58
- class="p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
59
- id={label}
60
- role="tabpanel"
61
- aria-labelledby="{label}-tab"
62
- >
63
- <p class="text-sm text-gray-500 dark:text-gray-400">
64
- {content}
65
- </p>
66
- </div>
67
- {/if}
68
- {/each}
25
+ {#each tabs as { label, content, id }}
26
+ {#if activeTabValue === id}
27
+ <div
28
+ class="p-4 bg-gray-50 rounded-lg dark:bg-gray-800"
29
+ id={label}
30
+ role="tabpanel"
31
+ aria-labelledby="{label}-tab"
32
+ >
33
+ <p class="text-sm text-gray-500 dark:text-gray-400">
34
+ {content}
35
+ </p>
36
+ </div>
37
+ {/if}
38
+ {/each}
69
39
  </div>
@@ -1,47 +1,19 @@
1
- /** @typedef {typeof __propDef.props} InteractiveTabsProps */
2
- /** @typedef {typeof __propDef.events} InteractiveTabsEvents */
3
- /** @typedef {typeof __propDef.slots} InteractiveTabsSlots */
4
- export default class InteractiveTabs extends SvelteComponentTyped<{
5
- tabId?: string;
6
- activeTabValue?: number;
7
- tabs?: ({
8
- lavel: string;
9
- id: number;
10
- content: string;
11
- name?: undefined;
12
- } | {
13
- name: string;
14
- id: number;
15
- content: string;
16
- lavel?: undefined;
17
- })[];
18
- }, {
19
- [evt: string]: CustomEvent<any>;
20
- }, {}> {
21
- }
22
- export type InteractiveTabsProps = typeof __propDef.props;
23
- export type InteractiveTabsEvents = typeof __propDef.events;
24
- export type InteractiveTabsSlots = typeof __propDef.slots;
25
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { InteractiveTabType } from '../types';
26
3
  declare const __propDef: {
27
4
  props: {
28
5
  tabId?: string;
29
6
  activeTabValue?: number;
30
- tabs?: ({
31
- lavel: string;
32
- id: number;
33
- content: string;
34
- name?: undefined;
35
- } | {
36
- name: string;
37
- id: number;
38
- content: string;
39
- lavel?: undefined;
40
- })[];
7
+ tabs: InteractiveTabType[];
41
8
  };
42
9
  events: {
43
10
  [evt: string]: CustomEvent<any>;
44
11
  };
45
12
  slots: {};
46
13
  };
14
+ export declare type InteractiveTabsProps = typeof __propDef.props;
15
+ export declare type InteractiveTabsEvents = typeof __propDef.events;
16
+ export declare type InteractiveTabsSlots = typeof __propDef.slots;
17
+ export default class InteractiveTabs extends SvelteComponentTyped<InteractiveTabsProps, InteractiveTabsEvents, InteractiveTabsSlots> {
18
+ }
47
19
  export {};
@@ -1,38 +1,16 @@
1
- <script>
2
- export let tabs = [
3
- {
4
- name: "Profile",
5
- selected: true,
6
- link: "/#",
7
- },
8
- {
9
- name: "Dashboard",
10
- selected: false,
11
- link: "/#",
12
- },
13
- {
14
- name: "Settings",
15
- selected: false,
16
- link: "/#",
17
- },
18
- {
19
- name: "Contacts",
20
- selected: false,
21
- link: "/#",
22
- },
23
- ];
1
+ <script >export let tabs;
24
2
  </script>
25
3
 
26
4
  <ul class="flex flex-wrap">
27
- {#each tabs as { name, selected, link }}
28
- <li class="mr-2">
29
- <a
30
- class="{selected
31
- ? 'active inline-block py-3 px-4 text-sm font-medium text-center text-white bg-blue-600 rounded-lg'
32
- : 'inline-block py-3 px-4 text-sm font-medium text-center text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white'} "
33
- href={link}
34
- rel="external">{name}</a
35
- >
36
- </li>
37
- {/each}
5
+ {#each tabs as { name, selected, link }}
6
+ <li class="mr-2">
7
+ <a
8
+ class="{selected
9
+ ? 'active inline-block py-3 px-4 text-sm font-medium text-center text-white bg-blue-600 rounded-lg'
10
+ : 'inline-block py-3 px-4 text-sm font-medium text-center text-gray-500 rounded-lg hover:text-gray-900 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 dark:hover:text-white'} "
11
+ href={link}
12
+ rel="external">{name}</a
13
+ >
14
+ </li>
15
+ {/each}
38
16
  </ul>
@@ -1,31 +1,17 @@
1
- /** @typedef {typeof __propDef.props} PillTabsProps */
2
- /** @typedef {typeof __propDef.events} PillTabsEvents */
3
- /** @typedef {typeof __propDef.slots} PillTabsSlots */
4
- export default class PillTabs extends SvelteComponentTyped<{
5
- tabs?: {
6
- name: string;
7
- selected: boolean;
8
- link: string;
9
- }[];
10
- }, {
11
- [evt: string]: CustomEvent<any>;
12
- }, {}> {
13
- }
14
- export type PillTabsProps = typeof __propDef.props;
15
- export type PillTabsEvents = typeof __propDef.events;
16
- export type PillTabsSlots = typeof __propDef.slots;
17
1
  import { SvelteComponentTyped } from "svelte";
2
+ import type { PillTabType } from '../types';
18
3
  declare const __propDef: {
19
4
  props: {
20
- tabs?: {
21
- name: string;
22
- selected: boolean;
23
- link: string;
24
- }[];
5
+ tabs: PillTabType[];
25
6
  };
26
7
  events: {
27
8
  [evt: string]: CustomEvent<any>;
28
9
  };
29
10
  slots: {};
30
11
  };
12
+ export declare type PillTabsProps = typeof __propDef.props;
13
+ export declare type PillTabsEvents = typeof __propDef.events;
14
+ export declare type PillTabsSlots = typeof __propDef.slots;
15
+ export default class PillTabs extends SvelteComponentTyped<PillTabsProps, PillTabsEvents, PillTabsSlots> {
16
+ }
31
17
  export {};
@@ -1,122 +1,120 @@
1
- <script>
2
- export let tip = "";
3
- export let top = false;
4
- export let right = false;
5
- export let bottom = false;
6
- export let left = false;
7
- export let active = false;
8
- // export let bgColor = "";
1
+ <script >export let tip;
2
+ export let top = false;
3
+ export let right = false;
4
+ export let bottom = false;
5
+ export let left = false;
6
+ export let active = false;
9
7
  </script>
10
8
 
11
9
  <div class="tooltip-wrapper">
12
- <span class="tooltip-slot">
13
- <slot />
14
- </span>
15
- <div
16
- class="inline-block absolute invisible z-10 py-2 px-3 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 tooltip"
17
- class:active
18
- class:left
19
- class:right
20
- class:bottom
21
- class:top
22
- >
23
- {#if tip}
24
- <div class="text-sm font-medium text-gray-900">{tip}</div>
25
- {:else}
26
- <slot name="custom-tip" />
27
- {/if}
28
- </div>
10
+ <span class="tooltip-slot">
11
+ <slot />
12
+ </span>
13
+ <div
14
+ class="inline-block absolute invisible z-10 py-2 px-3 bg-white rounded-lg border border-gray-200 shadow-sm opacity-0 tooltip"
15
+ class:active
16
+ class:left
17
+ class:right
18
+ class:bottom
19
+ class:top
20
+ >
21
+ {#if tip}
22
+ <div class="text-sm font-medium text-gray-900">{tip}</div>
23
+ {:else}
24
+ <slot name="custom-tip" />
25
+ {/if}
26
+ </div>
29
27
  </div>
30
28
 
31
29
  <style>
32
- .tooltip-wrapper {
33
- position: relative;
34
- display: inline-block;
35
- }
36
- .tooltip {
37
- position: absolute;
38
- font-family: inherit;
39
- display: inline-block;
40
- white-space: nowrap;
41
- color: inherit;
42
- opacity: 0;
43
- visibility: hidden;
44
- transition: opacity 150ms, visibility 150ms;
45
- }
30
+ .tooltip-wrapper {
31
+ position: relative;
32
+ display: inline-block;
33
+ }
34
+ .tooltip {
35
+ position: absolute;
36
+ font-family: inherit;
37
+ display: inline-block;
38
+ white-space: nowrap;
39
+ color: inherit;
40
+ opacity: 0;
41
+ visibility: hidden;
42
+ transition: opacity 150ms, visibility 150ms;
43
+ }
46
44
 
47
- .tooltip.top:after {
48
- content: "";
49
- position: absolute;
50
- top: 100%;
51
- left: 50%;
52
- margin-left: -10px;
53
- border-width: 5px;
54
- border-style: solid;
55
- border-color: #ddd transparent transparent transparent;
56
- }
57
- .tooltip.bottom::after {
58
- content: "";
59
- position: absolute;
60
- top: -30%;
61
- left: 50%;
62
- margin-left: -10px;
63
- border-width: 5px;
64
- border-style: solid;
65
- border-color: transparent transparent #ddd transparent;
66
- }
67
- .tooltip.right::after {
68
- content: "";
69
- position: absolute;
70
- /* vertically center */
71
- top: 50%;
72
- transform: translateY(-50%);
73
- /* position tooltip correctly */
74
- right: 100%;
75
- margin-left: -5px;
45
+ .tooltip.top:after {
46
+ content: '';
47
+ position: absolute;
48
+ top: 100%;
49
+ left: 50%;
50
+ margin-left: -10px;
51
+ border-width: 5px;
52
+ border-style: solid;
53
+ border-color: #ddd transparent transparent transparent;
54
+ }
55
+ .tooltip.bottom::after {
56
+ content: '';
57
+ position: absolute;
58
+ top: -30%;
59
+ left: 50%;
60
+ margin-left: -10px;
61
+ border-width: 5px;
62
+ border-style: solid;
63
+ border-color: transparent transparent #ddd transparent;
64
+ }
65
+ .tooltip.right::after {
66
+ content: '';
67
+ position: absolute;
68
+ /* vertically center */
69
+ top: 50%;
70
+ transform: translateY(-50%);
71
+ /* position tooltip correctly */
72
+ right: 100%;
73
+ margin-left: -5px;
76
74
 
77
- border-width: 5px;
78
- border-style: solid;
79
- border-color: transparent #ddd transparent transparent;
80
- }
81
- .tooltip.left::after {
82
- content: "";
83
- position: absolute;
84
- /* vertically center */
85
- top: 50%;
86
- transform: translateY(-50%);
87
- /* position tooltip correctly */
88
- left: 100%;
89
- /* margin-left: -5px; */
90
- border-width: 5px;
91
- border-style: solid;
92
- border-color: transparent transparent transparent #ddd;
93
- }
94
- .tooltip.top {
95
- left: 50%;
96
- transform: translate(-50%, -100%);
97
- margin-top: -8px;
98
- }
99
- .tooltip.bottom {
100
- left: 50%;
101
- bottom: 0px;
102
- transform: translate(-50%, 100%);
103
- /* margin-bottom: -px; */
104
- }
105
- .tooltip.left {
106
- left: 0;
107
- transform: translateX(-100%);
108
- margin-left: -8px;
109
- }
110
- .tooltip.right {
111
- right: 0;
112
- transform: translateX(100%);
113
- margin-right: 0px;
114
- }
115
- .tooltip.active {
116
- opacity: 1;
117
- visibility: initial;
118
- }
119
- .tooltip-slot:hover + .tooltip {
120
- opacity: 1;
121
- visibility: initial;
122
- }</style>
75
+ border-width: 5px;
76
+ border-style: solid;
77
+ border-color: transparent #ddd transparent transparent;
78
+ }
79
+ .tooltip.left::after {
80
+ content: '';
81
+ position: absolute;
82
+ /* vertically center */
83
+ top: 50%;
84
+ transform: translateY(-50%);
85
+ /* position tooltip correctly */
86
+ left: 100%;
87
+ /* margin-left: -5px; */
88
+ border-width: 5px;
89
+ border-style: solid;
90
+ border-color: transparent transparent transparent #ddd;
91
+ }
92
+ .tooltip.top {
93
+ left: 50%;
94
+ transform: translate(-50%, -100%);
95
+ margin-top: -8px;
96
+ }
97
+ .tooltip.bottom {
98
+ left: 50%;
99
+ bottom: 0px;
100
+ transform: translate(-50%, 100%);
101
+ /* margin-bottom: -px; */
102
+ }
103
+ .tooltip.left {
104
+ left: 0;
105
+ transform: translateX(-100%);
106
+ margin-left: -8px;
107
+ }
108
+ .tooltip.right {
109
+ right: 0;
110
+ transform: translateX(100%);
111
+ margin-right: 0px;
112
+ }
113
+ .tooltip.active {
114
+ opacity: 1;
115
+ visibility: initial;
116
+ }
117
+ .tooltip-slot:hover + .tooltip {
118
+ opacity: 1;
119
+ visibility: initial;
120
+ }</style>
@@ -1,27 +1,7 @@
1
- /** @typedef {typeof __propDef.props} LightTooltipProps */
2
- /** @typedef {typeof __propDef.events} LightTooltipEvents */
3
- /** @typedef {typeof __propDef.slots} LightTooltipSlots */
4
- export default class LightTooltip extends SvelteComponentTyped<{
5
- tip?: string;
6
- top?: boolean;
7
- right?: boolean;
8
- bottom?: boolean;
9
- left?: boolean;
10
- active?: boolean;
11
- }, {
12
- [evt: string]: CustomEvent<any>;
13
- }, {
14
- default: {};
15
- 'custom-tip': {};
16
- }> {
17
- }
18
- export type LightTooltipProps = typeof __propDef.props;
19
- export type LightTooltipEvents = typeof __propDef.events;
20
- export type LightTooltipSlots = typeof __propDef.slots;
21
1
  import { SvelteComponentTyped } from "svelte";
22
2
  declare const __propDef: {
23
3
  props: {
24
- tip?: string;
4
+ tip: string;
25
5
  top?: boolean;
26
6
  right?: boolean;
27
7
  bottom?: boolean;
@@ -36,4 +16,9 @@ declare const __propDef: {
36
16
  'custom-tip': {};
37
17
  };
38
18
  };
19
+ export declare type LightTooltipProps = typeof __propDef.props;
20
+ export declare type LightTooltipEvents = typeof __propDef.events;
21
+ export declare type LightTooltipSlots = typeof __propDef.slots;
22
+ export default class LightTooltip extends SvelteComponentTyped<LightTooltipProps, LightTooltipEvents, LightTooltipSlots> {
23
+ }
39
24
  export {};