flowbite-svelte 0.12.2 → 0.12.5
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 +72 -25
- package/accordions/AccordionItem.svelte +4 -2
- package/accordions/AccordionItem.svelte.d.ts +2 -0
- package/alerts/Alert.svelte.d.ts +1 -1
- package/cards/Card.svelte +1 -1
- package/index.d.ts +1 -0
- package/index.js +3 -0
- package/package.json +2 -1
- package/progressbars/Progressbar.svelte +50 -0
- package/progressbars/Progressbar.svelte.d.ts +20 -0
package/README.md
CHANGED
|
@@ -4,92 +4,139 @@
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
[Getting started](https://flowbite-svelte.vercel.app/getting-started)
|
|
7
|
+
- [Getting started](https://flowbite-svelte.vercel.app/getting-started)
|
|
8
|
+
- [About](https://flowbite-svelte.vercel.app/about)
|
|
9
|
+
- [Type list](https://flowbite-svelte.vercel.app/type-list)
|
|
10
|
+
- [CLI](https://flowbite-svelte.vercel.app/cli)
|
|
8
11
|
|
|
9
12
|
## Accordion components
|
|
10
13
|
|
|
11
|
-
[
|
|
14
|
+
- [Default accordion](https://flowbite-svelte.vercel.app/accordions/default)
|
|
15
|
+
- [Icon accordion](https://flowbite-svelte.vercel.app/accordions/icon-accordion)
|
|
12
16
|
|
|
13
|
-
##
|
|
17
|
+
## Alert components
|
|
14
18
|
|
|
15
|
-
[
|
|
19
|
+
- [Default alert](https://flowbite-svelte.vercel.app/alerts/default-alert)
|
|
20
|
+
- [Border alert](https://flowbite-svelte.vercel.app/alerts/border-alert)
|
|
21
|
+
- [Information alert](https://flowbite-svelte.vercel.app/alerts/information-alert)
|
|
22
|
+
- [Animation alert](https://flowbite-svelte.vercel.app/alerts/animation)
|
|
16
23
|
|
|
17
|
-
##
|
|
24
|
+
## Avatar components
|
|
18
25
|
|
|
19
|
-
[
|
|
26
|
+
- [Avatar](https://flowbite-svelte.vercel.app/avatar)
|
|
20
27
|
|
|
21
28
|
## Badges components
|
|
22
29
|
|
|
23
|
-
[
|
|
30
|
+
- [Default badge](https://flowbite-svelte.vercel.app/badges/default)
|
|
31
|
+
- [Icon badge](https://flowbite-svelte.vercel.app/badges/badge-icon)
|
|
32
|
+
- [Link badge](https://flowbite-svelte.vercel.app/badges/badge-link)
|
|
24
33
|
|
|
25
34
|
## Button group compnents
|
|
26
35
|
|
|
27
|
-
[
|
|
36
|
+
- [Default button group](https://flowbite-svelte.vercel.app/button-groups/default)
|
|
37
|
+
- [Outline button group](https://flowbite-svelte.vercel.app/button-groups/outline)
|
|
28
38
|
|
|
29
39
|
## Button components
|
|
30
40
|
|
|
31
|
-
[
|
|
41
|
+
- [Setup](https://flowbite-svelte.vercel.app/buttons/setup)
|
|
42
|
+
- [Default Button](https://flowbite-svelte.vercel.app/buttons/default)
|
|
43
|
+
- [Colored Shadow Button](https://flowbite-svelte.vercel.app/buttons/colored-shadow)
|
|
44
|
+
- [Gradient Duotone Button](https://flowbite-svelte.vercel.app/buttons/gradient-duotone)
|
|
45
|
+
- [Gradient Monochrome Button](https://flowbite-svelte.vercel.app/buttons/gradient-monochrome)
|
|
46
|
+
- [Gradietn Outline Button](https://flowbite-svelte.vercel.app/buttons/gradient-outline)
|
|
47
|
+
- [Outlined Button](https://flowbite-svelte.vercel.app/buttons/outlined)
|
|
48
|
+
- [Rounded Button](https://flowbite-svelte.vercel.app/buttons/rounded)
|
|
32
49
|
|
|
33
50
|
## Card components
|
|
34
51
|
|
|
35
|
-
[
|
|
52
|
+
- [Default Card](https://flowbite-svelte.vercel.app/cards/card)
|
|
53
|
+
- [CTA Card](https://flowbite-svelte.vercel.app/cards/cta)
|
|
54
|
+
- [Ecommerce Card](https://flowbite-svelte.vercel.app/cards/ecommerce)
|
|
55
|
+
- [Horizontal Card](https://flowbite-svelte.vercel.app/cards/horizontal)
|
|
56
|
+
- [Interactive Card](https://flowbite-svelte.vercel.app/cards/interactive)
|
|
57
|
+
- [List Card](https://flowbite-svelte.vercel.app/cards/list)
|
|
58
|
+
- [Signin Card](https://flowbite-svelte.vercel.app/cards/signin)
|
|
36
59
|
|
|
37
60
|
## Dark mode components
|
|
38
61
|
|
|
39
|
-
[Dark mode](https://flowbite-svelte.vercel.app/darkmode)
|
|
62
|
+
- [Dark mode](https://flowbite-svelte.vercel.app/darkmode)
|
|
40
63
|
|
|
41
64
|
## Dropdown components
|
|
42
65
|
|
|
43
|
-
[Dropdowns](https://flowbite-svelte.vercel.app/dropdowns)
|
|
66
|
+
- [Dropdowns](https://flowbite-svelte.vercel.app/dropdowns)
|
|
44
67
|
|
|
45
68
|
## Form components
|
|
46
69
|
|
|
47
|
-
[Forms](https://flowbite-svelte.vercel.app/forms)
|
|
70
|
+
- [Forms](https://flowbite-svelte.vercel.app/forms)
|
|
48
71
|
|
|
49
72
|
## Footer components
|
|
50
73
|
|
|
51
|
-
[Footer](https://flowbite-svelte.vercel.app/footer)
|
|
74
|
+
- [Default Footer](https://flowbite-svelte.vercel.app/footer/default)
|
|
75
|
+
- [Footer with Logo](https://flowbite-svelte.vercel.app/footer/logo)
|
|
76
|
+
- [Footer with Sitemap](https://flowbite-svelte.vercel.app/footer/sitemap)
|
|
77
|
+
- [Footer with Socialmedia](https://flowbite-svelte.vercel.app/footer/socialmedia)
|
|
52
78
|
|
|
53
79
|
## Icons components
|
|
54
80
|
|
|
55
|
-
[
|
|
81
|
+
- [Heroicons](https://flowbite-svelte.vercel.app/icons/heroicons)
|
|
82
|
+
- [Simpleicons](https://flowbite-svelte.vercel.app/icons/simple-icons)
|
|
56
83
|
|
|
57
84
|
## List group components
|
|
58
85
|
|
|
59
|
-
[List group](https://flowbite-svelte.vercel.app/list-group)
|
|
86
|
+
- [List group](https://flowbite-svelte.vercel.app/list-group)
|
|
60
87
|
|
|
61
88
|
## Modal components
|
|
62
89
|
|
|
63
|
-
[
|
|
90
|
+
- [Small Modal](https://flowbite-svelte.vercel.app/modals/small)
|
|
91
|
+
- [Medium Modal](https://flowbite-svelte.vercel.app/modals/medium)
|
|
92
|
+
- [Large Modal](https://flowbite-svelte.vercel.app/modals/large)
|
|
93
|
+
- [Extra Large Modal](https://flowbite-svelte.vercel.app/modals/extra-large)
|
|
94
|
+
- [Signin Modal](https://flowbite-svelte.vercel.app/modals/signin)
|
|
95
|
+
- [All Modals](https://flowbite-svelte.vercel.app/modals/all-modals)
|
|
64
96
|
|
|
65
97
|
## Navbar components
|
|
66
98
|
|
|
67
|
-
[
|
|
99
|
+
- [Default Navbar](https://flowbite-svelte.vercel.app/navbars/default)
|
|
100
|
+
- [Dropdown Navbar](https://flowbite-svelte.vercel.app/navbars/dropdown)
|
|
68
101
|
|
|
69
102
|
## Pagination components
|
|
70
103
|
|
|
71
|
-
[Pagination](https://flowbite-svelte.vercel.app/paginations)
|
|
104
|
+
- [Pagination](https://flowbite-svelte.vercel.app/paginations)
|
|
72
105
|
|
|
73
106
|
## Sidebar components
|
|
74
107
|
|
|
75
|
-
[Sidebar](https://flowbite-svelte.vercel.app/sidebars)
|
|
108
|
+
- [Sidebar](https://flowbite-svelte.vercel.app/sidebars)
|
|
76
109
|
|
|
77
110
|
## Spinner components
|
|
78
111
|
|
|
79
|
-
[
|
|
112
|
+
- [Default Spinner](https://flowbite-svelte.vercel.app/spinners/default)
|
|
113
|
+
- [Button Spinner](https://flowbite-svelte.vercel.app/spinners/button-spinner)
|
|
80
114
|
|
|
81
115
|
## Tab components
|
|
82
116
|
|
|
83
|
-
[Tabs](https://flowbite-svelte.vercel.app/tabs)
|
|
117
|
+
- [Default Tabs](https://flowbite-svelte.vercel.app/tabs/default-tabs)
|
|
118
|
+
- [Underline Tabs](https://flowbite-svelte.vercel.app/tabs/underline-tabs)
|
|
119
|
+
- [Icon Tabs](https://flowbite-svelte.vercel.app/tabs/icon-tabs)
|
|
120
|
+
- [Full width Tabs](https://flowbite-svelte.vercel.app/tabs/full-width-tabs)
|
|
121
|
+
- [Interactive Tabs](https://flowbite-svelte.vercel.app/tabs/interactive-tabs)
|
|
122
|
+
- [Interactive Tabs 2](https://flowbite-svelte.vercel.app/tabs/interactive-tabs-2)
|
|
123
|
+
- [Multiple Interactive Tabs](https://flowbite-svelte.vercel.app/tabs/multiple-interactive-tabs)
|
|
124
|
+
- [Pill Tabs](https://flowbite-svelte.vercel.app/tabs/pilltabs)
|
|
84
125
|
|
|
85
126
|
## Timeline components
|
|
86
127
|
|
|
87
|
-
[
|
|
128
|
+
- [Default timeline](https://flowbite-svelte.vercel.app/timelines/default)
|
|
129
|
+
- [Vetical timeline](https://flowbite-svelte.vercel.app/timelines/vertical)
|
|
130
|
+
- [Horizontal timeline](https://flowbite-svelte.vercel.app/timelines/horizontal)
|
|
131
|
+
- [Activity log](https://flowbite-svelte.vercel.app/timelines/activity)
|
|
132
|
+
- [Grouped timeline](https://flowbite-svelte.vercel.app/timelines/group)
|
|
88
133
|
|
|
89
134
|
## Toast components
|
|
90
135
|
|
|
91
|
-
[Toast](https://flowbite-svelte.vercel.app/toasts)
|
|
136
|
+
- [Toast](https://flowbite-svelte.vercel.app/toasts)
|
|
92
137
|
|
|
93
138
|
## Tooltip components
|
|
94
139
|
|
|
95
|
-
[
|
|
140
|
+
- [Default Tooltip](https://flowbite-svelte.vercel.app/tooltips/default)
|
|
141
|
+
- [Light Tooltip](https://flowbite-svelte.vercel.app/tooltips/light)
|
|
142
|
+
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import collapse from 'svelte-collapse';
|
|
3
3
|
import { ChevronDownIconSolid, ChevronUpIconSolid } from '@codewithshin/svelte-heroicons';
|
|
4
4
|
export let id = '';
|
|
5
|
+
export let btnClass = 'flex items-center focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-800 justify-between p-5 w-full font-medium border border-gray-200 dark:border-gray-700 text-left text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800';
|
|
6
|
+
export let slotClass = 'p-5 border border-t-0 border-gray-200 dark:border-gray-700';
|
|
5
7
|
const store = getContext('svelte-collapsible-accordion');
|
|
6
8
|
$: params = {
|
|
7
9
|
open: $store.id === id,
|
|
@@ -24,7 +26,7 @@ const handleToggle = () => {
|
|
|
24
26
|
type="button"
|
|
25
27
|
class:rounded-t-xl={id === '1'}
|
|
26
28
|
class:border-t-0={id !== '1'}
|
|
27
|
-
class=
|
|
29
|
+
class={btnClass}
|
|
28
30
|
>
|
|
29
31
|
<span><slot name="header" /></span>
|
|
30
32
|
{#if params.open}
|
|
@@ -35,7 +37,7 @@ const handleToggle = () => {
|
|
|
35
37
|
</button>
|
|
36
38
|
</h2>
|
|
37
39
|
<div use:collapse={params}>
|
|
38
|
-
<div class=
|
|
40
|
+
<div class={slotClass}>
|
|
39
41
|
<slot name="body" />
|
|
40
42
|
</div>
|
|
41
43
|
</div>
|
package/alerts/Alert.svelte.d.ts
CHANGED
package/cards/Card.svelte
CHANGED
|
@@ -7,7 +7,7 @@ export let btnColor = 'blue';
|
|
|
7
7
|
export let textdivClass = 'p-5';
|
|
8
8
|
export let paragraphClass = 'mb-3 font-normal text-gray-700 dark:text-gray-400';
|
|
9
9
|
export let headerClass = 'mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white';
|
|
10
|
-
export let header = 'Lorem ipsum
|
|
10
|
+
export let header = 'Lorem ipsum';
|
|
11
11
|
export let divClass = 'max-w-sm bg-white rounded-lg border border-gray-200 shadow-md dark:bg-gray-800 dark:border-gray-700';
|
|
12
12
|
let buttonClass;
|
|
13
13
|
if (btnColor === 'blue') {
|
package/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export { default as Pagination } from "./paginations/Pagination.svelte";
|
|
|
56
56
|
export { default as Previous } from "./paginations/Previous.svelte";
|
|
57
57
|
export { default as Next } from "./paginations/Next.svelte";
|
|
58
58
|
export { default as TableData } from "./paginations/TableData.svelte";
|
|
59
|
+
export { default as Progressbar } from "./progressbars/Progressbar.svelte";
|
|
59
60
|
export { default as Sidebar } from "./sidebars/Sidebar.svelte";
|
|
60
61
|
export { default as Spinner } from "./spinners/Spinner.svelte";
|
|
61
62
|
export { default as SpinnerButton } from "./spinners/SpinnerButton.svelte";
|
package/index.js
CHANGED
|
@@ -88,6 +88,9 @@ export { default as Previous } from './paginations/Previous.svelte'
|
|
|
88
88
|
export { default as Next } from './paginations/Next.svelte'
|
|
89
89
|
export { default as TableData } from './paginations/TableData.svelte'
|
|
90
90
|
|
|
91
|
+
// Progressbar
|
|
92
|
+
export { default as Progressbar } from'./progressbars/Progressbar.svelte'
|
|
93
|
+
|
|
91
94
|
// Sidebar
|
|
92
95
|
export { default as Sidebar } from './sidebars/Sidebar.svelte'
|
|
93
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flowbite-svelte",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
4
4
|
"description": "Flowbite components for Svelte",
|
|
5
5
|
"main": "./package/index.js",
|
|
6
6
|
"author": {
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"./paginations/Pagination.svelte": "./paginations/Pagination.svelte",
|
|
132
132
|
"./paginations/Previous.svelte": "./paginations/Previous.svelte",
|
|
133
133
|
"./paginations/TableData.svelte": "./paginations/TableData.svelte",
|
|
134
|
+
"./progressbars/Progressbar.svelte": "./progressbars/Progressbar.svelte",
|
|
134
135
|
"./sidebars/Sidebar.svelte": "./sidebars/Sidebar.svelte",
|
|
135
136
|
"./sidebars/SidebarDropdown.svelte": "./sidebars/SidebarDropdown.svelte",
|
|
136
137
|
"./spinners/Spinner.svelte": "./spinners/Spinner.svelte",
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script >export let progress = '45';
|
|
2
|
+
export let size = 'h-2.5';
|
|
3
|
+
export let labelInside = false;
|
|
4
|
+
export let labelOutside = '';
|
|
5
|
+
export let color = 'blue';
|
|
6
|
+
let barColor;
|
|
7
|
+
if (color === 'blue') {
|
|
8
|
+
barColor = 'bg-blue-600';
|
|
9
|
+
}
|
|
10
|
+
else if (color === 'gray') {
|
|
11
|
+
barColor = 'bg-gray-600';
|
|
12
|
+
}
|
|
13
|
+
else if (color === 'red') {
|
|
14
|
+
barColor = 'bg-red-600';
|
|
15
|
+
}
|
|
16
|
+
else if (color === 'green') {
|
|
17
|
+
barColor = 'bg-green-600';
|
|
18
|
+
}
|
|
19
|
+
else if (color === 'yellow') {
|
|
20
|
+
barColor = 'bg-yellow-600';
|
|
21
|
+
}
|
|
22
|
+
else if (color === 'purple') {
|
|
23
|
+
barColor = 'bg-purple-600';
|
|
24
|
+
}
|
|
25
|
+
else if (color === 'indigo') {
|
|
26
|
+
barColor = 'bg-indigo-600';
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
barColor = 'bg-blue-600';
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
{#if labelOutside}
|
|
34
|
+
<div class="flex justify-between mb-1">
|
|
35
|
+
<span class="text-base font-medium text-blue-700 dark:text-white">{labelOutside}</span>
|
|
36
|
+
<span class="text-sm font-medium text-blue-700 dark:text-white">{progress}%</span>
|
|
37
|
+
</div>
|
|
38
|
+
{/if}
|
|
39
|
+
<div class="w-full bg-gray-200 rounded-full {size} dark:bg-gray-700">
|
|
40
|
+
{#if labelInside}
|
|
41
|
+
<div
|
|
42
|
+
class="bg-blue-600 text-xs font-medium text-blue-100 text-center p-0.5 leading-none rounded-full"
|
|
43
|
+
style="width: {progress}%"
|
|
44
|
+
>
|
|
45
|
+
{progress}%
|
|
46
|
+
</div>
|
|
47
|
+
{:else}
|
|
48
|
+
<div class="{barColor} {size} rounded-full" style="width: {progress}%" />
|
|
49
|
+
{/if}
|
|
50
|
+
</div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
progress?: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
labelInside?: boolean;
|
|
7
|
+
labelOutside?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
};
|
|
10
|
+
events: {
|
|
11
|
+
[evt: string]: CustomEvent<any>;
|
|
12
|
+
};
|
|
13
|
+
slots: {};
|
|
14
|
+
};
|
|
15
|
+
export declare type ProgressbarProps = typeof __propDef.props;
|
|
16
|
+
export declare type ProgressbarEvents = typeof __propDef.events;
|
|
17
|
+
export declare type ProgressbarSlots = typeof __propDef.slots;
|
|
18
|
+
export default class Progressbar extends SvelteComponentTyped<ProgressbarProps, ProgressbarEvents, ProgressbarSlots> {
|
|
19
|
+
}
|
|
20
|
+
export {};
|