@r2digisolutions/components 0.10.0 → 0.11.0

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.
@@ -4,9 +4,11 @@
4
4
  export type BrandMarkSize = 'sm' | 'md' | 'lg' | 'xl';
5
5
 
6
6
  interface BrandMarkProps {
7
- /** 1–2 letter mark, or provide children for a custom glyph */
7
+ /** 1–2 letter mark, or provide children / logoSrc for a custom glyph */
8
8
  mark?: string;
9
9
  name?: string;
10
+ /** Official logo image URL (SVG/PNG). Replaces initials / children. */
11
+ logoSrc?: string;
10
12
  size?: BrandMarkSize;
11
13
  showName?: boolean;
12
14
  class?: string;
@@ -16,6 +18,7 @@
16
18
  const {
17
19
  mark,
18
20
  name = 'Brand',
21
+ logoSrc,
19
22
  size = 'md',
20
23
  showName = false,
21
24
  class: className = '',
@@ -49,12 +52,15 @@
49
52
  <span class={['inline-flex items-center gap-2.5', className]}>
50
53
  <span
51
54
  class={[
52
- 'inline-flex shrink-0 items-center justify-center bg-brand-500 font-bold tracking-tight text-white shadow-sm',
55
+ 'inline-flex shrink-0 items-center justify-center shadow-sm',
56
+ logoSrc ? 'overflow-hidden bg-white' : 'bg-brand-500 font-bold tracking-tight text-white',
53
57
  box[size]
54
58
  ]}
55
59
  aria-hidden={showName || !!name}
56
60
  >
57
- {#if children}
61
+ {#if logoSrc}
62
+ <img src={logoSrc} alt="" class="h-[78%] w-[78%] object-contain" />
63
+ {:else if children}
58
64
  {@render children()}
59
65
  {:else}
60
66
  {initials}
@@ -1,9 +1,11 @@
1
1
  import type { Snippet } from 'svelte';
2
2
  export type BrandMarkSize = 'sm' | 'md' | 'lg' | 'xl';
3
3
  interface BrandMarkProps {
4
- /** 1–2 letter mark, or provide children for a custom glyph */
4
+ /** 1–2 letter mark, or provide children / logoSrc for a custom glyph */
5
5
  mark?: string;
6
6
  name?: string;
7
+ /** Official logo image URL (SVG/PNG). Replaces initials / children. */
8
+ logoSrc?: string;
7
9
  size?: BrandMarkSize;
8
10
  showName?: boolean;
9
11
  class?: string;
@@ -8,6 +8,8 @@
8
8
  description?: string;
9
9
  brand?: string;
10
10
  mark?: string;
11
+ /** Official brand logo URL (SVG/PNG) for BrandMark */
12
+ logoSrc?: string;
11
13
  class?: string;
12
14
  footer?: Snippet;
13
15
  children?: Snippet;
@@ -18,6 +20,7 @@
18
20
  description,
19
21
  brand = 'R2 Digi',
20
22
  mark,
23
+ logoSrc,
21
24
  class: className = '',
22
25
  footer,
23
26
  children
@@ -31,7 +34,7 @@
31
34
  class={`mx-auto w-full max-w-md border border-border shadow-sm ${className}`}
32
35
  >
33
36
  <div class="mb-6 flex flex-col items-center gap-3 text-center">
34
- <BrandMark name={brand} {mark} size="lg" showName />
37
+ <BrandMark name={brand} {mark} {logoSrc} size="lg" showName />
35
38
  <div>
36
39
  <h1 class="text-xl font-semibold tracking-tight text-primary">{title}</h1>
37
40
  {#if description}
@@ -4,6 +4,8 @@ interface AuthCardProps {
4
4
  description?: string;
5
5
  brand?: string;
6
6
  mark?: string;
7
+ /** Official brand logo URL (SVG/PNG) for BrandMark */
8
+ logoSrc?: string;
7
9
  class?: string;
8
10
  footer?: Snippet;
9
11
  children?: Snippet;
@@ -7,6 +7,8 @@
7
7
 
8
8
  interface AuthShellProps {
9
9
  brand?: string;
10
+ /** Official brand logo URL (SVG/PNG) for BrandMark */
11
+ logoSrc?: string;
10
12
  tagline?: string;
11
13
  footer?: string;
12
14
  headline?: string;
@@ -26,6 +28,7 @@
26
28
 
27
29
  const {
28
30
  brand = 'R2DigiSolutions',
31
+ logoSrc,
29
32
  tagline = 'Build faster with a cohesive design system.',
30
33
  footer = '© R2DigiSolutions. All rights reserved.',
31
34
  headline = 'Sign in to continue',
@@ -52,8 +55,10 @@
52
55
  {:else}
53
56
  <div
54
57
  class={[
55
- 'relative flex h-full min-h-0 flex-col justify-between overflow-hidden bg-gradient-to-br from-brand-600 via-brand-700 to-brand-950 text-white',
56
- compact ? 'gap-4 px-5 py-5' : 'gap-6 p-8 sm:p-10'
58
+ 'flex flex-col justify-between overflow-hidden bg-gradient-to-br from-brand-600 via-brand-700 to-brand-950 text-white',
59
+ compact
60
+ ? 'relative gap-4 px-5 py-5'
61
+ : 'absolute inset-0 gap-6 p-8 sm:p-10'
57
62
  ]}
58
63
  >
59
64
  <div
@@ -67,7 +72,7 @@
67
72
 
68
73
  <div class={['relative z-10', compact ? 'space-y-3' : 'space-y-6']}>
69
74
  <div class="flex items-center gap-2.5">
70
- <BrandMark name={brand} size={compact ? 'sm' : 'md'} />
75
+ <BrandMark name={brand} {logoSrc} size={compact ? 'sm' : 'md'} />
71
76
  <span class={['font-semibold tracking-tight text-white', compact ? 'text-sm' : 'text-base']}>
72
77
  {brand}
73
78
  </span>
@@ -90,7 +95,7 @@
90
95
  </div>
91
96
  {#if !compact && highlights.length}
92
97
  <ul class="hidden space-y-2.5 pt-1 text-sm text-white/75 sm:block">
93
- {#each highlights as item}
98
+ {#each highlights as item (item)}
94
99
  <li class="flex items-start gap-2">
95
100
  <span class="mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-white/80"></span>
96
101
  {item}
@@ -110,28 +115,33 @@
110
115
  <div
111
116
  class={[
112
117
  'flex w-full flex-col overflow-hidden bg-surface',
118
+ // h-dvh (not height:100%): % collapses when html/body have no explicit height
113
119
  fillParent && 'h-full min-h-0',
114
- !fillParent && fullHeight && 'h-full min-h-dvh',
120
+ !fillParent && fullHeight && 'h-dvh min-h-dvh',
115
121
  !fillParent && !fullHeight && 'min-h-[32rem]',
116
122
  className
117
123
  ]}
118
- style:height={fillParent ? '100%' : fullHeight ? '100%' : undefined}
119
- style:min-height={fillParent ? '100%' : fullHeight ? '100dvh' : '32rem'}
124
+ style:height={fillParent ? '100%' : undefined}
125
+ style:min-height={fillParent ? '100%' : !fullHeight ? '32rem' : undefined}
120
126
  >
121
127
  <div
122
128
  class={[
123
129
  'flex h-full min-h-0 w-full flex-1 flex-col',
124
- showAside && 'lg:flex-row',
130
+ showAside && 'lg:flex-row lg:items-stretch',
125
131
  asideSide === 'right' && 'lg:flex-row-reverse'
126
132
  ]}
127
133
  >
128
134
  {#if showAside}
129
- <aside class="relative hidden h-full min-h-0 w-full overflow-hidden lg:block lg:w-1/2">
135
+ <aside
136
+ class="relative hidden min-h-0 w-full overflow-hidden lg:block lg:h-auto lg:w-1/2 lg:self-stretch"
137
+ >
130
138
  {@render marketingPanel(false)}
131
139
  </aside>
132
140
  {/if}
133
141
 
134
- <section class="relative flex h-full min-h-0 w-full flex-1 flex-col bg-surface">
142
+ <section
143
+ class="relative flex min-h-0 w-full flex-1 flex-col bg-surface lg:h-auto lg:self-stretch"
144
+ >
135
145
  <div
136
146
  class="pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_at_top,_var(--tw-gradient-stops))] from-brand-500/5 via-transparent to-transparent"
137
147
  aria-hidden="true"
@@ -144,7 +154,7 @@
144
154
  </div>
145
155
  {:else}
146
156
  <div class="shrink-0 px-5 pt-6 text-center lg:hidden">
147
- <BrandMark name={brand} showName size="md" class="justify-center" />
157
+ <BrandMark name={brand} {logoSrc} showName size="md" class="justify-center" />
148
158
  <p class="mt-2 text-sm text-muted">{tagline}</p>
149
159
  </div>
150
160
  {/if}
@@ -2,6 +2,8 @@ import type { Snippet } from 'svelte';
2
2
  export type AuthAsideSide = 'left' | 'right' | 'none';
3
3
  interface AuthShellProps {
4
4
  brand?: string;
5
+ /** Official brand logo URL (SVG/PNG) for BrandMark */
6
+ logoSrc?: string;
5
7
  tagline?: string;
6
8
  footer?: string;
7
9
  headline?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",