flowbite-svelte 0.26.11 → 0.26.12
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.26.12](https://github.com/themesberg/flowbite-svelte/compare/v0.26.11...v0.26.12) (2022-09-05)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add labelInsideClass to progressbar component ([fe20cd7](https://github.com/themesberg/flowbite-svelte/commit/fe20cd7f693f21e052dc5adb3fd3eb4bcfa80b76))
|
|
11
|
+
|
|
5
12
|
### [0.26.11](https://github.com/themesberg/flowbite-svelte/compare/v0.26.10...v0.26.11) (2022-09-05)
|
|
6
13
|
|
|
7
14
|
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ export let size = 'h-2.5';
|
|
|
4
4
|
export let labelInside = false;
|
|
5
5
|
export let labelOutside = '';
|
|
6
6
|
export let color = 'blue';
|
|
7
|
+
export let labelInsideClass = 'text-blue-100 text-xs font-medium text-center p-0.5 leading-none rounded-full';
|
|
7
8
|
// let barColor: string;
|
|
8
9
|
const barColors = {
|
|
9
10
|
blue: 'bg-blue-600',
|
|
@@ -17,20 +18,17 @@ const barColors = {
|
|
|
17
18
|
</script>
|
|
18
19
|
|
|
19
20
|
{#if labelOutside}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
<div {...$$restProps} class={classNames('flex justify-between mb-1', $$props.class)}>
|
|
22
|
+
<span class="text-base font-medium text-blue-700 dark:text-white">{labelOutside}</span>
|
|
23
|
+
<span class="text-sm font-medium text-blue-700 dark:text-white">{progress}%</span>
|
|
24
|
+
</div>
|
|
24
25
|
{/if}
|
|
25
|
-
<div class=
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
{:else}
|
|
34
|
-
<div class={classNames(barColors[color], size, 'rounded-full')} style="width: {progress}%" />
|
|
35
|
-
{/if}
|
|
26
|
+
<div class={classNames('w-full bg-gray-200 rounded-full dark:bg-gray-700', size, $$props.class)}>
|
|
27
|
+
{#if labelInside}
|
|
28
|
+
<div class={classNames(labelInsideClass, barColors[color])} style="width: {progress}%">
|
|
29
|
+
{progress}%
|
|
30
|
+
</div>
|
|
31
|
+
{:else}
|
|
32
|
+
<div class={classNames(barColors[color], size, 'rounded-full')} style="width: {progress}%" />
|
|
33
|
+
{/if}
|
|
36
34
|
</div>
|
|
@@ -2,11 +2,13 @@ import { SvelteComponentTyped } from "svelte";
|
|
|
2
2
|
import type { Colors } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
+
[x: string]: any;
|
|
5
6
|
progress?: string;
|
|
6
7
|
size?: string;
|
|
7
8
|
labelInside?: boolean;
|
|
8
9
|
labelOutside?: string;
|
|
9
10
|
color?: Colors;
|
|
11
|
+
labelInsideClass?: string;
|
|
10
12
|
};
|
|
11
13
|
events: {
|
|
12
14
|
[evt: string]: CustomEvent<any>;
|