@r2digisolutions/components 0.25.16 → 0.25.17

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.
@@ -15,6 +15,7 @@
15
15
  disabled?: boolean;
16
16
  destructive?: boolean;
17
17
  separator?: boolean;
18
+ icon?: any;
18
19
  }
19
20
 
20
21
  type UserStatus = 'online' | 'offline' | 'busy' | 'away' | null;
@@ -235,8 +236,8 @@
235
236
  compact && 'h-8 gap-2 py-0',
236
237
  compact && (variant === 'ghost' ? 'px-1' : 'px-2'),
237
238
  !compact && size === 'sm' && (variant === 'ghost' ? 'px-1.5 py-1' : 'px-2.5 py-1'),
238
- size === 'md' && (variant === 'ghost' ? 'px-2 py-1.5' : 'px-2.5 py-2'),
239
- size === 'lg' && (variant === 'ghost' ? 'px-2.5 py-2' : 'px-3 py-2.5'),
239
+ size === 'md' && (variant === 'ghost' ? 'px-2 py-1.5' : 'px-2.5 py-1.5'),
240
+ size === 'lg' && (variant === 'ghost' ? 'px-2.5 py-2' : 'px-3 py-2'),
240
241
  open && (variant === 'ghost' ? 'bg-surface-overlay' : 'ring-brand-500/30 ring-2')
241
242
  ]}
242
243
  aria-haspopup="menu"
@@ -286,7 +287,7 @@
286
287
  {#if header}
287
288
  {@render header()}
288
289
  {:else}
289
- <div class="border-border bg-surface-overlay/50 px-3.5 py-3 border-b">
290
+ <div class="border-border bg-surface-overlay/50 px-3.5 py-2 border-b">
290
291
  <div class="gap-3 flex items-start">
291
292
  <Avatar {src} {name} size="lg" {status} />
292
293
  <div class="min-w-0 pt-0.5 flex-1">
@@ -317,7 +318,7 @@
317
318
  <div class="p-1.5">
318
319
  {#each items as item (item.id)}
319
320
  {#if item.separator}
320
- <div class="my-1.5 border-border border-t" role="separator"></div>
321
+ <div class="my-1 border-border border-t" role="separator"></div>
321
322
  {:else}
322
323
  <button
323
324
  type="button"
@@ -325,7 +326,7 @@
325
326
  disabled={item.disabled}
326
327
  onclick={() => select(item)}
327
328
  class={[
328
- 'gap-2 rounded-xl px-2.5 py-2 flex w-full items-start text-left transition-colors',
329
+ 'gap-2.5 rounded-xl px-2.5 py-1.5 flex w-full items-center text-left transition-colors',
329
330
  'focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none',
330
331
  item.destructive
331
332
  ? 'text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-950/40'
@@ -333,6 +334,9 @@
333
334
  item.disabled && 'cursor-not-allowed opacity-40'
334
335
  ]}
335
336
  >
337
+ {#if item.icon}
338
+ <svelte:component this={item.icon} size={18} class="shrink-0 text-muted" aria-hidden="true" />
339
+ {/if}
336
340
  <span class="min-w-0 flex-1">
337
341
  <span class="text-sm font-medium block">{item.label}</span>
338
342
  {#if item.description}
@@ -340,7 +344,7 @@
340
344
  {/if}
341
345
  </span>
342
346
  {#if item.shortcut}
343
- <span class="mt-0.5 font-mono text-muted shrink-0 text-[10px]">{item.shortcut}</span>
347
+ <span class="font-mono text-muted shrink-0 text-[10px]">{item.shortcut}</span>
344
348
  {/if}
345
349
  </button>
346
350
  {/if}
@@ -7,6 +7,7 @@ export interface UserMenuItem {
7
7
  disabled?: boolean;
8
8
  destructive?: boolean;
9
9
  separator?: boolean;
10
+ icon?: any;
10
11
  }
11
12
  type UserStatus = 'online' | 'offline' | 'busy' | 'away' | null;
12
13
  interface UserMenuProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.25.16",
3
+ "version": "0.25.17",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",