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.
- package/README.md +9 -1
- package/accordions/AccordionDefault.svelte +20 -21
- package/accordions/AccordionDefault.svelte.d.ts +6 -19
- package/accordions/AccordionItem.svelte +31 -34
- package/accordions/AccordionItem.svelte.d.ts +6 -16
- package/alerts/Alert.svelte +90 -97
- package/alerts/Alert.svelte.d.ts +7 -17
- package/alerts/BorderAlert.svelte +90 -104
- package/alerts/BorderAlert.svelte.d.ts +7 -17
- package/alerts/InfoAlert.svelte +106 -111
- package/alerts/InfoAlert.svelte.d.ts +8 -20
- package/badges/Badge.svelte +22 -16
- package/badges/Badge.svelte.d.ts +8 -16
- package/badges/BadgeIcon.svelte +24 -18
- package/badges/BadgeIcon.svelte.d.ts +8 -18
- package/badges/BadgeLink.svelte +23 -17
- package/badges/BadgeLink.svelte.d.ts +9 -18
- package/buttongroups/ButtonGroup.svelte +41 -64
- package/buttongroups/ButtonGroup.svelte.d.ts +7 -23
- package/buttongroups/ButtonGroupOutline.svelte +41 -66
- package/buttongroups/ButtonGroupOutline.svelte.d.ts +7 -23
- package/buttons/Button.svelte +48 -35
- package/buttons/Button.svelte.d.ts +8 -19
- package/buttons/ColorShadowButton.svelte +22 -16
- package/buttons/ColorShadowButton.svelte.d.ts +8 -18
- package/buttons/GradientDuotoneButton.svelte +20 -15
- package/buttons/GradientDuotoneButton.svelte.d.ts +8 -18
- package/buttons/GradientMonochromeButton.svelte +22 -16
- package/buttons/GradientMonochromeButton.svelte.d.ts +8 -18
- package/buttons/GradientOutlineButton.svelte +30 -25
- package/buttons/GradientOutlineButton.svelte.d.ts +8 -18
- package/cards/Card.svelte +73 -71
- package/cards/Card.svelte.d.ts +12 -26
- package/cards/CtaCard.svelte +48 -58
- package/cards/CtaCard.svelte.d.ts +8 -32
- package/cards/EcommerceCard.svelte +77 -77
- package/cards/EcommerceCard.svelte.d.ts +10 -28
- 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/dropdowns/DropdownDefault.svelte.d.ts +2 -2
- 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/modals/ExtraLargeModal.svelte.d.ts +2 -2
- package/modals/LargeModal.svelte.d.ts +2 -2
- package/modals/MediumModal.svelte.d.ts +2 -2
- package/modals/SmallModal.svelte.d.ts +2 -2
- 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 +34 -10
- 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 +66 -0
- package/types.js +1 -0
package/tabs/PillTabs.svelte
CHANGED
|
@@ -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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 {};
|
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 {};
|