@softwareone/spi-sv5-library 1.5.4 → 1.5.6

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.
@@ -13,6 +13,11 @@
13
13
 
14
14
  let showProfileItems = $state(false);
15
15
 
16
+ const onClickProfileItem = (url: string) => {
17
+ handleProfile();
18
+ goto(url);
19
+ };
20
+
16
21
  const handleProfile = () => {
17
22
  showProfileItems = !showProfileItems;
18
23
  };
@@ -63,9 +68,15 @@
63
68
  <menu class="account-dropdown" transition:fade={{ delay: 50, duration: 250 }}>
64
69
  {#each profileMenuItems as item}
65
70
  <li>
66
- <a href={item.url} class="account-menu-item" onclick={() => handleProfile()}>
71
+ <button
72
+ class="account-menu-item"
73
+ type="button"
74
+ onclick={() => {
75
+ onClickProfileItem(item.url);
76
+ }}
77
+ >
67
78
  {item.text}
68
- </a>
79
+ </button>
69
80
  </li>
70
81
  {/each}
71
82
  </menu>
@@ -150,7 +161,6 @@
150
161
  }
151
162
 
152
163
  .account-menu-item {
153
- display: inline-block;
154
164
  width: 100%;
155
165
  font-weight: 400;
156
166
  font-size: 14px;
@@ -19,7 +19,9 @@
19
19
  {#if column.type === ColumnType.Text}
20
20
  <h2>{column.label}</h2>
21
21
  <p>{column.value}</p>
22
- <p class="text-description">{column.description ?? ''}</p>
22
+ {#if column.description}
23
+ <p class="text-description">{column.description}</p>
24
+ {/if}
23
25
  {/if}
24
26
 
25
27
  {#if column.type === ColumnType.Status}
@@ -37,14 +39,27 @@
37
39
  {#if column.type === ColumnType.Image}
38
40
  {@const { content, iconType } = column}
39
41
  <h2>{column.label}</h2>
40
- {#if iconType === ImageType.Default}
41
- <img src={content} alt="icon" />
42
- {:else if iconType === ImageType.Avatar}
43
- <Avatar text={content} />
44
- {:else if iconType === ImageType.Material}
45
- <span class="material-icons">{content}</span>
46
- {/if}
47
- <p class="text-description">{column.description ?? ''}</p>
42
+
43
+ <figure class:text-right={column.alignTextRight}>
44
+ {#if iconType === ImageType.Default}
45
+ <img src={content} alt="icon" />
46
+ {:else if iconType === ImageType.Avatar}
47
+ <Avatar text={content} />
48
+ {:else if iconType === ImageType.Material}
49
+ <span class="material-icons">{content}</span>
50
+ {/if}
51
+
52
+ {#if column.value || column.description}
53
+ <div>
54
+ {#if column.value}
55
+ <p>{column.value}</p>
56
+ {/if}
57
+ {#if column.description}
58
+ <p class="text-description">{column.description}</p>
59
+ {/if}
60
+ </div>
61
+ {/if}
62
+ </figure>
48
63
  {/if}
49
64
  </div>
50
65
  {/each}
@@ -70,6 +85,7 @@
70
85
  }
71
86
 
72
87
  .text-description {
88
+ font-size: 12px;
73
89
  color: #6b7180;
74
90
  }
75
91
 
@@ -121,6 +137,16 @@
121
137
  border-radius: 9999px;
122
138
  }
123
139
 
140
+ .panel-element > figure {
141
+ display: flex;
142
+ flex-direction: column;
143
+ gap: 8px;
144
+ }
145
+
146
+ .panel-element > figure.text-right {
147
+ flex-direction: row;
148
+ }
149
+
124
150
  @media screen and (max-width: 700px) {
125
151
  .buttons-section {
126
152
  flex-direction: column;
@@ -26,6 +26,7 @@ type Icon = BaseColumn & {
26
26
  type: ColumnType.Image;
27
27
  iconType: ImageType;
28
28
  content: string;
29
+ alignTextRight?: boolean;
29
30
  };
30
31
  type Status = BaseColumn & {
31
32
  type: ColumnType.Status;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@softwareone/spi-sv5-library",
3
- "version": "1.5.4",
3
+ "version": "1.5.6",
4
4
  "description": "Svelte components",
5
5
  "keywords": [
6
6
  "svelte",