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.
- package/accordions/AccordionItem.svelte +31 -34
- package/accordions/AccordionItem.svelte.d.ts +6 -16
- package/buttongroups/ButtonGroup.svelte +1 -14
- package/buttongroups/ButtonGroup.svelte.d.ts +1 -1
- package/buttongroups/ButtonGroupOutline.svelte +1 -14
- package/buttongroups/ButtonGroupOutline.svelte.d.ts +1 -1
- package/cards/CtaCard.svelte +8 -19
- package/cards/CtaCard.svelte.d.ts +2 -2
- package/cards/EcommerceCard.svelte +1 -1
- package/cards/EcommerceCard.svelte.d.ts +2 -2
- package/cards/HorizontalCard.svelte +21 -24
- package/cards/HorizontalCard.svelte.d.ts +9 -22
- package/cards/InteractiveCard.svelte +96 -110
- package/cards/InteractiveCard.svelte.d.ts +10 -50
- package/darkmode/DarkMode.svelte +60 -69
- package/darkmode/DarkMode.svelte.d.ts +5 -12
- package/footer/LogoFooter.svelte +32 -48
- package/footer/LogoFooter.svelte.d.ts +11 -46
- package/footer/SimpleFooter.svelte +20 -33
- package/footer/SimpleFooter.svelte.d.ts +8 -36
- package/footer/SitemapFooter.svelte +43 -112
- package/footer/SitemapFooter.svelte.d.ts +13 -59
- package/footer/SocialMediaFooter.svelte.d.ts +14 -14
- package/navbar/DropdownNavbar.svelte +116 -201
- package/navbar/DropdownNavbar.svelte.d.ts +8 -52
- package/navbar/Navbar.svelte +68 -99
- package/navbar/Navbar.svelte.d.ts +8 -26
- package/package.json +1 -1
- package/spinners/Spinner.svelte +63 -57
- package/spinners/Spinner.svelte.d.ts +8 -17
- package/spinners/SpinnerButton.svelte +31 -31
- package/spinners/SpinnerButton.svelte.d.ts +6 -15
- package/tabs/DefaultTabs.svelte +13 -39
- package/tabs/DefaultTabs.svelte.d.ts +7 -23
- package/tabs/InteractiveTabs.svelte +33 -63
- package/tabs/InteractiveTabs.svelte.d.ts +7 -35
- package/tabs/PillTabs.svelte +12 -34
- package/tabs/PillTabs.svelte.d.ts +7 -21
- package/tooltips/LightTooltip.svelte +112 -114
- package/tooltips/LightTooltip.svelte.d.ts +6 -21
- package/tooltips/Tooltip.svelte +113 -114
- package/tooltips/Tooltip.svelte.d.ts +6 -21
- package/types.d.ts +48 -5
package/tooltips/Tooltip.svelte
CHANGED
|
@@ -1,122 +1,121 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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;
|
|
7
|
+
// export let bgColor = "";
|
|
9
8
|
</script>
|
|
10
9
|
|
|
11
10
|
<div class="tooltip-wrapper">
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
<span class="tooltip-slot">
|
|
12
|
+
<slot />
|
|
13
|
+
</span>
|
|
14
|
+
<div
|
|
15
|
+
class="inline-block absolute invisible z-10 py-2 px-3 bg-gray-900 rounded-lg shadow-sm opacity-0 transition-opacity duration-300 tooltip dark:bg-gray-700"
|
|
16
|
+
class:active
|
|
17
|
+
class:left
|
|
18
|
+
class:right
|
|
19
|
+
class:bottom
|
|
20
|
+
class:top
|
|
21
|
+
>
|
|
22
|
+
{#if tip}
|
|
23
|
+
<div class="text-sm font-medium text-white ">{tip}</div>
|
|
24
|
+
{:else}
|
|
25
|
+
<slot name="custom-tip" />
|
|
26
|
+
{/if}
|
|
27
|
+
</div>
|
|
29
28
|
</div>
|
|
30
29
|
|
|
31
30
|
<style>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
31
|
+
.tooltip-wrapper {
|
|
32
|
+
position: relative;
|
|
33
|
+
display: inline-block;
|
|
34
|
+
}
|
|
35
|
+
.tooltip {
|
|
36
|
+
position: absolute;
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
display: inline-block;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
color: inherit;
|
|
41
|
+
opacity: 0;
|
|
42
|
+
visibility: hidden;
|
|
43
|
+
transition: opacity 150ms, visibility 150ms;
|
|
44
|
+
}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
46
|
+
.tooltip.top:after {
|
|
47
|
+
content: '';
|
|
48
|
+
position: absolute;
|
|
49
|
+
top: 100%;
|
|
50
|
+
left: 50%;
|
|
51
|
+
margin-left: -10px;
|
|
52
|
+
border-width: 5px;
|
|
53
|
+
border-style: solid;
|
|
54
|
+
border-color: rgb(55 65 81) transparent transparent transparent;
|
|
55
|
+
}
|
|
56
|
+
.tooltip.bottom::after {
|
|
57
|
+
content: '';
|
|
58
|
+
position: absolute;
|
|
59
|
+
top: -30%;
|
|
60
|
+
left: 50%;
|
|
61
|
+
margin-left: -10px;
|
|
62
|
+
border-width: 5px;
|
|
63
|
+
border-style: solid;
|
|
64
|
+
border-color: transparent transparent rgb(55 65 81) transparent;
|
|
65
|
+
}
|
|
66
|
+
.tooltip.right::after {
|
|
67
|
+
content: '';
|
|
68
|
+
position: absolute;
|
|
69
|
+
/* vertically center */
|
|
70
|
+
top: 50%;
|
|
71
|
+
transform: translateY(-50%);
|
|
72
|
+
/* position tooltip correctly */
|
|
73
|
+
right: 100%;
|
|
74
|
+
margin-left: -5px;
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
76
|
+
border-width: 5px;
|
|
77
|
+
border-style: solid;
|
|
78
|
+
border-color: transparent rgb(55 65 81) transparent transparent;
|
|
79
|
+
}
|
|
80
|
+
.tooltip.left::after {
|
|
81
|
+
content: '';
|
|
82
|
+
position: absolute;
|
|
83
|
+
/* vertically center */
|
|
84
|
+
top: 50%;
|
|
85
|
+
transform: translateY(-50%);
|
|
86
|
+
/* position tooltip correctly */
|
|
87
|
+
left: 100%;
|
|
88
|
+
/* margin-left: -5px; */
|
|
89
|
+
border-width: 5px;
|
|
90
|
+
border-style: solid;
|
|
91
|
+
border-color: transparent transparent transparent rgb(55 65 81);
|
|
92
|
+
}
|
|
93
|
+
.tooltip.top {
|
|
94
|
+
left: 50%;
|
|
95
|
+
transform: translate(-50%, -100%);
|
|
96
|
+
margin-top: -8px;
|
|
97
|
+
}
|
|
98
|
+
.tooltip.bottom {
|
|
99
|
+
left: 50%;
|
|
100
|
+
bottom: 0px;
|
|
101
|
+
transform: translate(-50%, 100%);
|
|
102
|
+
/* margin-bottom: -px; */
|
|
103
|
+
}
|
|
104
|
+
.tooltip.left {
|
|
105
|
+
left: 0;
|
|
106
|
+
transform: translateX(-100%);
|
|
107
|
+
margin-left: -8px;
|
|
108
|
+
}
|
|
109
|
+
.tooltip.right {
|
|
110
|
+
right: 0;
|
|
111
|
+
transform: translateX(100%);
|
|
112
|
+
margin-right: 0px;
|
|
113
|
+
}
|
|
114
|
+
.tooltip.active {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
visibility: initial;
|
|
117
|
+
}
|
|
118
|
+
.tooltip-slot:hover + .tooltip {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
visibility: initial;
|
|
121
|
+
}</style>
|
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
/** @typedef {typeof __propDef.props} TooltipProps */
|
|
2
|
-
/** @typedef {typeof __propDef.events} TooltipEvents */
|
|
3
|
-
/** @typedef {typeof __propDef.slots} TooltipSlots */
|
|
4
|
-
export default class Tooltip 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 TooltipProps = typeof __propDef.props;
|
|
19
|
-
export type TooltipEvents = typeof __propDef.events;
|
|
20
|
-
export type TooltipSlots = typeof __propDef.slots;
|
|
21
1
|
import { SvelteComponentTyped } from "svelte";
|
|
22
2
|
declare const __propDef: {
|
|
23
3
|
props: {
|
|
24
|
-
tip
|
|
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 TooltipProps = typeof __propDef.props;
|
|
20
|
+
export declare type TooltipEvents = typeof __propDef.events;
|
|
21
|
+
export declare type TooltipSlots = typeof __propDef.slots;
|
|
22
|
+
export default class Tooltip extends SvelteComponentTyped<TooltipProps, TooltipEvents, TooltipSlots> {
|
|
23
|
+
}
|
|
39
24
|
export {};
|
package/types.d.ts
CHANGED
|
@@ -1,23 +1,66 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
1
2
|
export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink';
|
|
2
3
|
export declare type Buttontypes = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
3
4
|
export declare type Buttonshadows = 'blue' | 'green' | 'cyan' | 'teal' | 'lime' | 'red' | 'pink' | 'purple';
|
|
4
5
|
export declare type Gradientduotones = 'purple2blue' | 'cyan2blue' | 'green2blue' | 'purple2pink' | 'pink2orange' | 'teal2lime' | 'red2yellow';
|
|
5
6
|
export declare type Textsize = 'text-xs' | 'text-sm' | 'text-base' | 'text-lg' | 'text-xl' | 'text-2xl' | 'text-3xl' | 'text-4xl';
|
|
6
7
|
export interface ButtonGroupType {
|
|
7
|
-
name
|
|
8
|
+
name: string;
|
|
8
9
|
link?: string;
|
|
9
10
|
rel?: string;
|
|
10
|
-
icon?:
|
|
11
|
+
icon?: typeof SvelteComponent;
|
|
11
12
|
}
|
|
12
|
-
export declare type
|
|
13
|
+
export declare type CardButtonType = {
|
|
13
14
|
textSize?: Textsize;
|
|
14
|
-
name
|
|
15
|
+
name: string;
|
|
15
16
|
type?: Buttontypes;
|
|
16
17
|
link?: string;
|
|
17
18
|
rel?: string;
|
|
18
19
|
rounded?: boolean;
|
|
19
20
|
};
|
|
20
|
-
export declare type
|
|
21
|
+
export declare type ImgType = {
|
|
21
22
|
src: string;
|
|
22
23
|
alt?: string;
|
|
23
24
|
};
|
|
25
|
+
export interface LinkType {
|
|
26
|
+
name: string;
|
|
27
|
+
link: string;
|
|
28
|
+
rel?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SiteType {
|
|
31
|
+
name: string;
|
|
32
|
+
link: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SocialMediaType {
|
|
35
|
+
link: string;
|
|
36
|
+
icon: typeof SvelteComponent;
|
|
37
|
+
}
|
|
38
|
+
export declare type AlignType = 'text-center' | 'text-left' | 'text-right';
|
|
39
|
+
export interface TabType {
|
|
40
|
+
name: string;
|
|
41
|
+
active: boolean;
|
|
42
|
+
link: string;
|
|
43
|
+
rel?: string;
|
|
44
|
+
}
|
|
45
|
+
export interface InteractiveTabType {
|
|
46
|
+
label: string;
|
|
47
|
+
id: number;
|
|
48
|
+
content: string;
|
|
49
|
+
}
|
|
50
|
+
export interface PillTabType {
|
|
51
|
+
name: string;
|
|
52
|
+
selected: boolean;
|
|
53
|
+
link: string;
|
|
54
|
+
}
|
|
55
|
+
export interface NavbarType {
|
|
56
|
+
id: number;
|
|
57
|
+
name: string;
|
|
58
|
+
link: string;
|
|
59
|
+
rel?: string;
|
|
60
|
+
child?: NavbarType[];
|
|
61
|
+
}
|
|
62
|
+
export interface DropdownLinkType {
|
|
63
|
+
label: string;
|
|
64
|
+
href: string;
|
|
65
|
+
rel?: string;
|
|
66
|
+
}
|