flowbite-svelte 0.22.25 → 0.22.26
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 +7 -0
- package/avatar/Avatar.svelte +9 -8
- package/avatar/Placeholder.svelte +1 -1
- package/package.json +1 -1
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.22.26](https://github.com/themesberg/flowbite-svelte/compare/v0.22.25...v0.22.26) (2022-07-30)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* avatar w/tooltip / initials ([6b9a333](https://github.com/themesberg/flowbite-svelte/commit/6b9a333c96f3485b33a2fdeecc113138452acca0))
|
|
11
|
+
|
|
5
12
|
### [0.22.25](https://github.com/themesberg/flowbite-svelte/compare/v0.22.24...v0.22.25) (2022-07-29)
|
|
6
13
|
|
|
7
14
|
|
package/avatar/Avatar.svelte
CHANGED
|
@@ -9,7 +9,6 @@ export let stacked = false;
|
|
|
9
9
|
export let dot = { top: false, color: 'bg-gray-300 dark:bg-gray-500' };
|
|
10
10
|
export let alt = '';
|
|
11
11
|
export let size = 'md';
|
|
12
|
-
// export let ring: string = 'ring-gray-300 dark:ring-gray-500';
|
|
13
12
|
const sizes = {
|
|
14
13
|
xs: 'w-6 h-6',
|
|
15
14
|
sm: 'w-8 h-8',
|
|
@@ -18,21 +17,23 @@ const sizes = {
|
|
|
18
17
|
xl: 'w-36 h-36'
|
|
19
18
|
};
|
|
20
19
|
let avatarClass;
|
|
21
|
-
$: avatarClass = classNames(rounded ? 'rounded' : 'rounded-full', border && 'p-1 ring-2 ring-gray-300 dark:ring-gray-500', sizes[size], stacked && 'border-2 -ml-4 border-white dark:border-gray-800', $$props.class);
|
|
20
|
+
$: avatarClass = classNames(rounded ? 'rounded' : 'rounded-full', border && 'p-1 ring-2 ring-gray-300 dark:ring-gray-500', sizes[size], stacked && 'border-2 -ml-4 border-white dark:border-gray-800', 'bg-gray-100 dark:bg-gray-600 text-gray-600 dark:text-gray-300', $$props.class);
|
|
22
21
|
</script>
|
|
23
22
|
|
|
24
23
|
<Dot show={$$props.dot} {rounded} {...dot} {size}>
|
|
25
24
|
{#if src}
|
|
26
25
|
<img class={avatarClass} {alt} {src} />
|
|
27
26
|
{:else if $$slots.default}
|
|
28
|
-
<
|
|
29
|
-
|
|
27
|
+
<svelte:element
|
|
28
|
+
this={href ? 'a' : 'div'}
|
|
29
|
+
class="flex justify-center items-center text-xs font-medium {avatarClass}"
|
|
30
30
|
{href}
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
>
|
|
32
|
+
<slot />
|
|
33
|
+
</svelte:element>
|
|
33
34
|
{:else}
|
|
34
|
-
<div class={avatarClass}>
|
|
35
|
+
<svelte:element this={href ? 'a' : 'div'} class={avatarClass}>
|
|
35
36
|
<AvatarPlaceholder {rounded} />
|
|
36
|
-
</
|
|
37
|
+
</svelte:element>
|
|
37
38
|
{/if}
|
|
38
39
|
</Dot>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
</script>
|
|
3
3
|
|
|
4
4
|
<svg
|
|
5
|
-
class="text-gray-400 bg-gray-
|
|
5
|
+
class="text-gray-400 bg-gray-100 dark:bg-gray-600 {rounded ? 'rounded' : 'rounded-full'}"
|
|
6
6
|
fill="currentColor"
|
|
7
7
|
viewBox="0 0 16 16"
|
|
8
8
|
xmlns="http://www.w3.org/2000/svg"
|