@hyvor/design 2.0.1 → 2.0.3

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.
@@ -6,30 +6,3 @@
6
6
  </script>
7
7
 
8
8
  <UserPicture pictureUrl={user.picture_url} name={user.username || user.name || ''} size={30} />
9
-
10
- {#if user.picture_url}
11
- <img src={user.picture_url} alt={user.name} />
12
- {:else}
13
- <span class="user-placeholder">
14
- {user.name ? user.name[0].toUpperCase() : '?'}
15
- </span>
16
- {/if}
17
-
18
- <style>
19
- img {
20
- width: 30px;
21
- height: 30px;
22
- border-radius: 50%;
23
- }
24
- .user-placeholder {
25
- display: inline-flex;
26
- align-items: center;
27
- justify-content: center;
28
- width: 30px;
29
- height: 30px;
30
- border-radius: 50%;
31
- color: var(--text);
32
- font-size: 14px;
33
- background-color: var(--input);
34
- }
35
- </style>
@@ -4,7 +4,7 @@
4
4
  const bubble = createBubbler();
5
5
  interface Props {
6
6
  href: string;
7
- color?: 'link' | 'accent' | 'text';
7
+ color?: 'link' | 'accent' | 'text' | 'inherit';
8
8
  underline?: boolean;
9
9
  start?: import('svelte').Snippet;
10
10
  children?: import('svelte').Snippet;
@@ -57,6 +57,9 @@
57
57
  a.color-text {
58
58
  --local-color: var(--text);
59
59
  }
60
+ a.color-inherit {
61
+ --local-color: inherit;
62
+ }
60
63
  a.underline {
61
64
  text-decoration: underline;
62
65
  text-decoration-color: var(--local-color);
@@ -1,6 +1,6 @@
1
1
  interface Props {
2
2
  href: string;
3
- color?: 'link' | 'accent' | 'text';
3
+ color?: 'link' | 'accent' | 'text' | 'inherit';
4
4
  underline?: boolean;
5
5
  start?: import('svelte').Snippet;
6
6
  children?: import('svelte').Snippet;
@@ -13,11 +13,12 @@
13
13
  [key: string]: any;
14
14
  };
15
15
 
16
- let { href, active = false, disabled = false, start, children, end }: Props = $props();
16
+ let { href, active = false, disabled = false, start, children, end, ...rest }: Props = $props();
17
17
  </script>
18
18
 
19
19
  <a
20
20
  {href}
21
+ {...rest}
21
22
  class:active
22
23
  class:disabled
23
24
  onkeyup={bubble('keyup')}
@@ -34,7 +34,7 @@
34
34
  let {
35
35
  state = 'default',
36
36
  size = 'medium',
37
- block = false,
37
+ block = true,
38
38
  value = $bindable(undefined),
39
39
  input = $bindable(),
40
40
  start,
@@ -52,7 +52,9 @@
52
52
  onmouseenter,
53
53
  onmouseleave,
54
54
  onchange,
55
- oninput
55
+ oninput,
56
+
57
+ ...rest
56
58
  }: Props = $props();
57
59
  </script>
58
60
 
@@ -64,6 +66,7 @@
64
66
  {/if}
65
67
 
66
68
  <input
69
+ {...rest}
67
70
  bind:value
68
71
  bind:this={input}
69
72
  onkeyup={legacyHandlers(onkeyup, bubble('keyup'))}
@@ -6,11 +6,12 @@
6
6
  children?: import('svelte').Snippet;
7
7
  }
8
8
 
9
- let { href, children }: Props = $props();
9
+ let { href, children, ...rest }: Props = $props();
10
10
  </script>
11
11
 
12
12
  <a
13
13
  {href}
14
+ {...rest}
14
15
  class:active={href === $page.url.pathname}
15
16
  aria-current={href === $page.url.pathname ? 'page' : undefined}
16
17
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyvor/design",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "repository": {