horizon-design 0.0.19 → 0.0.20

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.
@@ -12,20 +12,38 @@
12
12
  let {
13
13
  class: className = '',
14
14
  size = 'md',
15
+ label,
15
16
  'aria-label': ariaLabel = 'Loading',
16
17
  ...rest
17
18
  }: {
18
19
  class?: string;
19
20
  size?: 'sm' | 'md' | 'lg' | 'xl';
21
+ label?: string;
20
22
  'aria-label'?: string;
21
23
  [key: string]: unknown;
22
24
  } = $props();
23
25
  </script>
24
26
 
25
- <MingcuteLoading3Fill
26
- aria-label={ariaLabel}
27
- class={cn('animate-spin', sizes[size], className)}
28
- data-slot="spinner"
29
- role="status"
30
- {...rest}
31
- />
27
+ {#if label}
28
+ <span
29
+ class={cn('inline-flex items-center gap-2', className)}
30
+ data-slot="spinner-wrapper"
31
+ role="status"
32
+ {...rest}
33
+ >
34
+ <MingcuteLoading3Fill
35
+ aria-hidden="true"
36
+ class={cn('animate-spin shrink-0', sizes[size])}
37
+ data-slot="spinner"
38
+ />
39
+ <span data-slot="spinner-label">{label}</span>
40
+ </span>
41
+ {:else}
42
+ <MingcuteLoading3Fill
43
+ aria-label={ariaLabel}
44
+ class={cn('animate-spin', sizes[size], className)}
45
+ data-slot="spinner"
46
+ role="status"
47
+ {...rest}
48
+ />
49
+ {/if}
@@ -1,6 +1,7 @@
1
1
  type $$ComponentProps = {
2
2
  class?: string;
3
3
  size?: 'sm' | 'md' | 'lg' | 'xl';
4
+ label?: string;
4
5
  'aria-label'?: string;
5
6
  [key: string]: unknown;
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "horizon-design",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/horizon-engine/horizon-design"