@hyvor/design 2.1.22-beta.3 → 2.1.22-beta.4

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.
@@ -67,8 +67,7 @@
67
67
  fromFranceText = 'From France'
68
68
  }: Props = $props();
69
69
 
70
- // Tooltip is loaded lazily so its code isn't part of the initial bundle;
71
- // the plain icon button still renders on the server / before hydration
70
+ // load Tooltip after mount to avoid including it in builds
72
71
  let tooltipReady = $state(false);
73
72
  onMount(() => {
74
73
  tooltipReady = true;
@@ -169,29 +168,15 @@
169
168
  </a>
170
169
  {#if tooltipReady}
171
170
  {#await import('../../components/Tooltip/Tooltip.svelte') then m}
172
- <m.default text={emailCopied ? copiedLabel : copyEmailLabel} position="top">
173
- <IconButton
174
- size="small"
175
- variant="invisible"
176
- color="input"
177
- onclick={handleCopyEmail}
178
- onmouseleave={() => (emailCopied = false)}
179
- >
180
- <IconCopy size={12} />
181
- </IconButton>
171
+ <m.default
172
+ text={emailCopied ? copiedLabel : copyEmailLabel}
173
+ position="top"
174
+ >
175
+ {@render CopyButton()}
182
176
  </m.default>
183
177
  {/await}
184
178
  {:else}
185
- <IconButton
186
- size="small"
187
- variant="invisible"
188
- color="input"
189
- aria-label={emailCopied ? copiedLabel : copyEmailLabel}
190
- onclick={handleCopyEmail}
191
- onmouseleave={() => (emailCopied = false)}
192
- >
193
- <IconCopy size={12} />
194
- </IconButton>
179
+ {@render CopyButton()}
195
180
  {/if}
196
181
  </div>
197
182
  {/if}
@@ -200,7 +185,12 @@
200
185
  {#each SOCIAL_PLATFORMS as platform (platform.key)}
201
186
  {@const href = socialLinks[platform.key]}
202
187
  {#if href}
203
- <a {href} target="_blank" rel="nofollow" aria-label={platform.label}>
188
+ <a
189
+ {href}
190
+ target="_blank"
191
+ rel="nofollow"
192
+ aria-label={platform.label}
193
+ >
204
194
  <platform.icon size={16} />
205
195
  </a>
206
196
  {/if}
@@ -229,7 +219,11 @@
229
219
  <svg class="ring" viewBox="0 0 32 32" aria-hidden="true">
230
220
  <circle cx="16" cy="16" r="16" fill="#173a8a" />
231
221
  {#each gdprStars as s}
232
- <path d={gdprStarPath} fill="#ffcd3c" transform="translate({s.x}, {s.y})" />
222
+ <path
223
+ d={gdprStarPath}
224
+ fill="#ffcd3c"
225
+ transform="translate({s.x}, {s.y})"
226
+ />
233
227
  {/each}
234
228
  </svg>
235
229
  <span class="lock"><IconLockFill size={10} /></span>
@@ -255,6 +249,19 @@
255
249
  {/if}
256
250
  </div>
257
251
 
252
+ {#snippet CopyButton()}
253
+ <IconButton
254
+ size="small"
255
+ variant="invisible"
256
+ color="input"
257
+ aria-label={emailCopied ? copiedLabel : copyEmailLabel}
258
+ onclick={handleCopyEmail}
259
+ onmouseleave={() => (emailCopied = false)}
260
+ >
261
+ <IconCopy size={12} />
262
+ </IconButton>
263
+ {/snippet}
264
+
258
265
  <style>
259
266
  .footer-outer {
260
267
  position: relative;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyvor/design",
3
- "version": "2.1.22-beta.3",
3
+ "version": "2.1.22-beta.4",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "sideEffects": [