@skeletonlabs/skeleton 2.9.1-dev.0020c671 → 2.9.1-dev.7a9827ee

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.
@@ -1,4 +1,4 @@
1
- <script>export let initials = "AB";
1
+ <script>export let initials = "";
2
2
  export let fill = "fill-token";
3
3
  export let fontSize = 150;
4
4
  export let src = "";
@@ -24,8 +24,8 @@ function prunedRestProps() {
24
24
 
25
25
  <!-- FIXME: resolve a11y warnings -->
26
26
  <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
27
- <figure class="avatar {classesBase}" data-testid="avatar" on:click on:keydown on:keyup on:keypress>
28
- {#if src}
27
+ <figure class="avatar {classesBase}" data-testid="avatar" {...prunedRestProps()} on:click on:keydown on:keyup on:keypress>
28
+ {#if src || fallback}
29
29
  <img
30
30
  class="avatar-image {cImage}"
31
31
  style={$$props.style ?? ''}
@@ -33,9 +33,8 @@ function prunedRestProps() {
33
33
  alt={$$props.alt || ''}
34
34
  use:action={actionParams}
35
35
  on:error={() => (src = fallback)}
36
- {...prunedRestProps()}
37
36
  />
38
- {:else}
37
+ {:else if initials}
39
38
  <svg class="avatar-initials w-full h-full" viewBox="0 0 512 512">
40
39
  <text
41
40
  x="50%"
@@ -49,5 +48,7 @@ function prunedRestProps() {
49
48
  {String(initials).substring(0, 2).toUpperCase()}
50
49
  </text>
51
50
  </svg>
51
+ {:else}
52
+ <slot />
52
53
  {/if}
53
54
  </figure>
@@ -38,7 +38,9 @@ declare const __propDef: {
38
38
  } & {
39
39
  [evt: string]: CustomEvent<any>;
40
40
  };
41
- slots: {};
41
+ slots: {
42
+ default: {};
43
+ };
42
44
  };
43
45
  export type AvatarProps = typeof __propDef.props;
44
46
  export type AvatarEvents = typeof __propDef.events;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skeletonlabs/skeleton",
3
- "version": "2.9.1-dev.0020c671",
3
+ "version": "2.9.1-dev.7a9827ee",
4
4
  "description": "A SvelteKit component library.",
5
5
  "author": "endigo9740 <chris@skeletonlabs.dev>",
6
6
  "repository": {