flowbite-svelte 0.13.1 → 0.13.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/avatar/Avatar.svelte
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script >export let avatar;
|
|
1
|
+
<script >export let avatar = {};
|
|
2
2
|
let isCircle = avatar.round ? 'rounded-full' : 'rounded';
|
|
3
3
|
let isBorder = avatar.border ? 'p-1 ring-2 ring-gray-300 dark:ring-gray-500' : '';
|
|
4
4
|
export let avatarClass = `w-${avatar.size} h-${avatar.size} ${isCircle} ${isBorder}`;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { DropdownType,
|
|
2
|
+
import type { DropdownType, DropdownColorType } from '../types';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
label?: string;
|
|
6
6
|
rounded?: boolean;
|
|
7
7
|
textSize?: string;
|
|
8
|
-
color?:
|
|
8
|
+
color?: DropdownColorType;
|
|
9
9
|
items: DropdownType[];
|
|
10
10
|
};
|
|
11
11
|
events: {
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
<script >export let items;
|
|
2
|
+
export let html = false;
|
|
2
3
|
export let rowState = undefined;
|
|
3
4
|
let trClass;
|
|
4
5
|
let trLastClass;
|
|
5
6
|
if (rowState === 'striped') {
|
|
6
|
-
trClass =
|
|
7
|
-
'border-b dark:bg-gray-800 dark:border-gray-700 odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
|
|
7
|
+
trClass = 'border-b dark:bg-gray-800 dark:border-gray-700 odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
|
|
8
8
|
trLastClass = 'odd:bg-white even:bg-gray-50 odd:dark:bg-gray-800 even:dark:bg-gray-700';
|
|
9
9
|
}
|
|
10
10
|
else if (rowState === 'hover') {
|
|
11
|
-
trClass =
|
|
12
|
-
'bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600';
|
|
11
|
+
trClass = 'bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600';
|
|
13
12
|
trLastClass = 'bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-600';
|
|
14
13
|
}
|
|
15
14
|
else {
|
|
@@ -23,15 +22,20 @@ else {
|
|
|
23
22
|
<tr class={trLastClass}>
|
|
24
23
|
{#each item as cell, j}
|
|
25
24
|
{#if j === 0}
|
|
26
|
-
<th
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
|
|
26
|
+
{#if html}
|
|
27
|
+
{@html cell}
|
|
28
|
+
{:else}
|
|
29
|
+
{cell}
|
|
30
|
+
{/if}
|
|
31
31
|
</th>
|
|
32
32
|
{:else}
|
|
33
33
|
<td class="px-6 py-4">
|
|
34
|
-
{
|
|
34
|
+
{#if html}
|
|
35
|
+
{@html cell}
|
|
36
|
+
{:else}
|
|
37
|
+
{cell}
|
|
38
|
+
{/if}
|
|
35
39
|
</td>
|
|
36
40
|
{/if}
|
|
37
41
|
{/each}
|
|
@@ -40,15 +44,20 @@ else {
|
|
|
40
44
|
<tr class={trClass}>
|
|
41
45
|
{#each item as cell, j}
|
|
42
46
|
{#if j === 0}
|
|
43
|
-
<th
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
47
|
+
<th scope="row" class="px-6 py-4 font-medium text-gray-900 dark:text-white whitespace-nowrap">
|
|
48
|
+
{#if html}
|
|
49
|
+
{@html cell}
|
|
50
|
+
{:else}
|
|
51
|
+
{cell}
|
|
52
|
+
{/if}
|
|
48
53
|
</th>
|
|
49
54
|
{:else}
|
|
50
55
|
<td class="px-6 py-4">
|
|
51
|
-
{
|
|
56
|
+
{#if html}
|
|
57
|
+
{@html cell}
|
|
58
|
+
{:else}
|
|
59
|
+
{cell}
|
|
60
|
+
{/if}
|
|
52
61
|
</td>
|
|
53
62
|
{/if}
|
|
54
63
|
{/each}
|
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SvelteComponent } from 'svelte';
|
|
2
2
|
export declare type Colors = 'blue' | 'gray' | 'red' | 'yellow' | 'purple' | 'green' | 'indigo' | 'pink';
|
|
3
|
+
export declare type DropdownColorType = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
3
4
|
export declare type Buttontypes = 'blue' | 'blue-outline' | 'dark' | 'dark-outline' | 'light' | 'green' | 'green-outline' | 'red' | 'red-outline' | 'yellow' | 'yellow-outline' | 'purple' | 'purple-outline';
|
|
4
5
|
export declare type Buttonshadows = 'blue' | 'green' | 'cyan' | 'teal' | 'lime' | 'red' | 'pink' | 'purple';
|
|
5
6
|
export declare type Gradientduotones = 'purple2blue' | 'cyan2blue' | 'green2blue' | 'purple2pink' | 'pink2orange' | 'teal2lime' | 'red2yellow';
|