flowbite-svelte 0.12.4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowbite-svelte",
3
- "version": "0.12.4",
3
+ "version": "0.12.5",
4
4
  "description": "Flowbite components for Svelte",
5
5
  "main": "./package/index.js",
6
6
  "author": {
@@ -1,37 +1,43 @@
1
- <script>
2
- export let progress = '45';
3
- export let size = 'h-2.5';
4
- export let label = '';
5
- export let position = '';
6
- export let color = 'blue';
7
- let barColor;
8
- if (color === 'blue') {
9
- barColor = 'bg-blue-600';
10
- } else if (color === 'gray') {
11
- barColor = 'bg-gray-600';
12
- } else if (color === 'red') {
13
- barColor = 'bg-red-600';
14
- } else if (color === 'green') {
15
- barColor = 'bg-green-600';
16
- } else if (color === 'yellow') {
17
- barColor = 'bg-yellow-600';
18
- } else if (color === 'purple') {
19
- barColor = 'bg-purple-600';
20
- } else if (color === 'indigo') {
21
- barColor = 'bg-indigo-600';
22
- } else {
23
- barColor = 'bg-blue-600';
24
- }
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
+ }
25
31
  </script>
26
32
 
27
- {#if position === 'out'}
33
+ {#if labelOutside}
28
34
  <div class="flex justify-between mb-1">
29
- <span class="text-base font-medium text-blue-700 dark:text-white">{label}</span>
35
+ <span class="text-base font-medium text-blue-700 dark:text-white">{labelOutside}</span>
30
36
  <span class="text-sm font-medium text-blue-700 dark:text-white">{progress}%</span>
31
37
  </div>
32
38
  {/if}
33
39
  <div class="w-full bg-gray-200 rounded-full {size} dark:bg-gray-700">
34
- {#if position === 'in'}
40
+ {#if labelInside}
35
41
  <div
36
42
  class="bg-blue-600 text-xs font-medium text-blue-100 text-center p-0.5 leading-none rounded-full"
37
43
  style="width: {progress}%"
@@ -1,31 +1,20 @@
1
- /** @typedef {typeof __propDef.props} ProgressbarProps */
2
- /** @typedef {typeof __propDef.events} ProgressbarEvents */
3
- /** @typedef {typeof __propDef.slots} ProgressbarSlots */
4
- export default class Progressbar extends SvelteComponentTyped<{
5
- progress?: string;
6
- color?: string;
7
- label?: string;
8
- size?: string;
9
- position?: string;
10
- }, {
11
- [evt: string]: CustomEvent<any>;
12
- }, {}> {
13
- }
14
- export type ProgressbarProps = typeof __propDef.props;
15
- export type ProgressbarEvents = typeof __propDef.events;
16
- export type ProgressbarSlots = typeof __propDef.slots;
17
1
  import { SvelteComponentTyped } from "svelte";
18
2
  declare const __propDef: {
19
3
  props: {
20
4
  progress?: string;
21
- color?: string;
22
- label?: string;
23
5
  size?: string;
24
- position?: string;
6
+ labelInside?: boolean;
7
+ labelOutside?: string;
8
+ color?: string;
25
9
  };
26
10
  events: {
27
11
  [evt: string]: CustomEvent<any>;
28
12
  };
29
13
  slots: {};
30
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
+ }
31
20
  export {};