@r2digisolutions/components 0.22.2 → 0.23.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.
Files changed (57) hide show
  1. package/dist/components/atoms/Avatar/Avatar.stories.d.ts +1 -1
  2. package/dist/components/atoms/Avatar/Avatar.svelte +5 -3
  3. package/dist/components/atoms/Avatar/Avatar.svelte.d.ts +1 -1
  4. package/dist/components/atoms/Avatar/AvatarStory.svelte +1 -1
  5. package/dist/components/atoms/Avatar/AvatarStory.svelte.d.ts +1 -1
  6. package/dist/components/atoms/Container/Container.stories.d.ts +1 -1
  7. package/dist/components/atoms/Container/ContainerStory.svelte.d.ts +1 -1
  8. package/dist/components/molecules/AdSlot/AdSlot.stories.js +10 -0
  9. package/dist/components/molecules/AdSlot/AdSlot.svelte +16 -0
  10. package/dist/components/molecules/AdSlot/AdSlot.svelte.d.ts +8 -0
  11. package/dist/components/molecules/AdSlot/AdSlotStory.svelte +23 -0
  12. package/dist/components/molecules/AdSlot/AdSlotStory.svelte.d.ts +18 -0
  13. package/dist/components/molecules/AdUnit/AdUnit.stories.js +28 -0
  14. package/dist/components/molecules/AdUnit/AdUnit.svelte +151 -0
  15. package/dist/components/molecules/AdUnit/AdUnit.svelte.d.ts +15 -0
  16. package/dist/components/molecules/AdUnit/AdUnitStory.svelte +36 -0
  17. package/dist/components/molecules/AdUnit/AdUnitStory.svelte.d.ts +7 -0
  18. package/dist/components/molecules/AvatarGroup/AvatarGroup.svelte +1 -1
  19. package/dist/components/molecules/AvatarGroup/AvatarGroup.svelte.d.ts +1 -1
  20. package/dist/components/molecules/AvatarLabel/AvatarLabel.svelte +1 -1
  21. package/dist/components/molecules/AvatarLabel/AvatarLabel.svelte.d.ts +1 -1
  22. package/dist/components/molecules/Card/Card.svelte +6 -15
  23. package/dist/components/molecules/FeatureList/FeatureList.svelte +26 -7
  24. package/dist/components/molecules/FeatureList/FeatureList.svelte.d.ts +2 -0
  25. package/dist/components/molecules/KnowledgeCard/KnowledgeCard.stories.js +25 -0
  26. package/dist/components/molecules/KnowledgeCard/KnowledgeCard.svelte +95 -0
  27. package/dist/components/molecules/KnowledgeCard/KnowledgeCard.svelte.d.ts +15 -0
  28. package/dist/components/molecules/KnowledgeCard/KnowledgeCardStory.svelte +56 -0
  29. package/dist/components/molecules/KnowledgeCard/KnowledgeCardStory.svelte.d.ts +6 -0
  30. package/dist/components/molecules/LocaleSwitcher/LocaleSwitcher.svelte +5 -5
  31. package/dist/components/molecules/MediaCard/MediaCard.svelte +101 -24
  32. package/dist/components/molecules/MediaCard/MediaCard.svelte.d.ts +25 -6
  33. package/dist/components/molecules/MediaCard/MediaCardStory.svelte +34 -1
  34. package/dist/components/molecules/SearchResultRow/SearchResultRow.stories.js +25 -0
  35. package/dist/components/molecules/SearchResultRow/SearchResultRow.svelte +74 -0
  36. package/dist/components/molecules/SearchResultRow/SearchResultRow.svelte.d.ts +18 -0
  37. package/dist/components/molecules/SearchResultRow/SearchResultRowStory.svelte +85 -0
  38. package/dist/components/molecules/SearchResultRow/SearchResultRowStory.svelte.d.ts +6 -0
  39. package/dist/components/molecules/StatCard/StatCard.svelte +7 -1
  40. package/dist/components/molecules/StatCard/StatCard.svelte.d.ts +2 -0
  41. package/dist/components/organisms/Drawer/Drawer.svelte +120 -37
  42. package/dist/components/organisms/Drawer/Drawer.svelte.d.ts +6 -0
  43. package/dist/components/organisms/MapExplorer/MapExplorer.stories.d.ts +12 -0
  44. package/dist/components/organisms/MapExplorer/MapExplorer.stories.js +11 -0
  45. package/dist/components/organisms/MapExplorer/MapExplorer.svelte +928 -0
  46. package/dist/components/organisms/MapExplorer/MapExplorer.svelte.d.ts +96 -0
  47. package/dist/components/organisms/MapExplorer/MapExplorerStory.svelte +124 -0
  48. package/dist/components/organisms/MapExplorer/MapExplorerStory.svelte.d.ts +3 -0
  49. package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -1
  50. package/dist/components/organisms/Navbar/Navbar.stories.js +1 -1
  51. package/dist/components/organisms/Navbar/Navbar.svelte +137 -64
  52. package/dist/components/organisms/Navbar/Navbar.svelte.d.ts +5 -1
  53. package/dist/components/organisms/Navbar/NavbarStory.svelte +1 -1
  54. package/dist/components/organisms/Navbar/NavbarStory.svelte.d.ts +1 -1
  55. package/dist/index.d.ts +8 -0
  56. package/dist/index.js +5 -0
  57. package/package.json +12 -8
@@ -0,0 +1,96 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { SelectOption } from '../../molecules/Select/Select.svelte';
3
+ export type MapExplorerBounds = {
4
+ south: number;
5
+ west: number;
6
+ north: number;
7
+ east: number;
8
+ };
9
+ export type MapExplorerItem = {
10
+ id: string;
11
+ lat: number;
12
+ lng: number;
13
+ title: string;
14
+ subtitle?: string;
15
+ meta?: string;
16
+ priceLabel?: string;
17
+ imageUrl?: string | null;
18
+ href?: string;
19
+ badge?: string;
20
+ chip?: string;
21
+ };
22
+ export type MapExplorerCluster = {
23
+ id: string;
24
+ lat: number;
25
+ lng: number;
26
+ count: number;
27
+ };
28
+ export type MapExplorerFilter = {
29
+ id: string;
30
+ label: string;
31
+ placeholder?: string;
32
+ value: string;
33
+ options: SelectOption[];
34
+ type?: 'select' | 'chips';
35
+ searchable?: boolean;
36
+ };
37
+ export type MapExplorerPanel = 'list' | 'map';
38
+ export type MapExplorerListView = 'list' | 'grid';
39
+ export type MapExplorerCardContext = {
40
+ select: () => void;
41
+ selected: boolean;
42
+ layout: MapExplorerListView;
43
+ };
44
+ interface MapExplorerProps {
45
+ items?: MapExplorerItem[];
46
+ pins?: MapExplorerItem[];
47
+ clusters?: MapExplorerCluster[];
48
+ selectedId?: string | null;
49
+ query?: string;
50
+ filters?: MapExplorerFilter[];
51
+ total?: number;
52
+ loading?: boolean;
53
+ title?: string;
54
+ description?: string;
55
+ resultLabel?: string;
56
+ searchPlaceholder?: string;
57
+ filtersTitle?: string;
58
+ filtersHint?: string;
59
+ clearFiltersLabel?: string;
60
+ searchAreaLabel?: string;
61
+ locateLabel?: string;
62
+ listLabel?: string;
63
+ mapLabel?: string;
64
+ emptyTitle?: string;
65
+ emptyDescription?: string;
66
+ detailCtaLabel?: string;
67
+ listViewLabel?: string;
68
+ gridViewLabel?: string;
69
+ listView?: MapExplorerListView;
70
+ locateOnLoad?: boolean;
71
+ showSearchArea?: boolean;
72
+ fitToken?: string;
73
+ defaultCenter?: [number, number];
74
+ defaultZoom?: number;
75
+ tileUrl?: string;
76
+ darkTileUrl?: string;
77
+ tileAttribution?: string;
78
+ class?: string;
79
+ card?: Snippet<[MapExplorerItem, MapExplorerCardContext]>;
80
+ detail?: Snippet<[MapExplorerItem]>;
81
+ emptyAction?: Snippet;
82
+ onsearch?: (query: string) => void;
83
+ onfilterchange?: (id: string, value: string) => void;
84
+ onclearfilters?: () => void;
85
+ onselect?: (item: MapExplorerItem | null) => void;
86
+ onboundschange?: (bounds: MapExplorerBounds, zoom: number) => void;
87
+ onsearcharea?: (bounds: MapExplorerBounds, zoom: number) => void;
88
+ onclusterclick?: (cluster: MapExplorerCluster) => void;
89
+ onlocate?: (coords: {
90
+ lat: number;
91
+ lng: number;
92
+ }) => void;
93
+ }
94
+ declare const MapExplorer: import("svelte").Component<MapExplorerProps, {}, "listView" | "query" | "selectedId">;
95
+ type MapExplorer = ReturnType<typeof MapExplorer>;
96
+ export default MapExplorer;
@@ -0,0 +1,124 @@
1
+ <script lang="ts">
2
+ import MapExplorer, {
3
+ type MapExplorerCluster,
4
+ type MapExplorerFilter,
5
+ type MapExplorerItem
6
+ } from './MapExplorer.svelte';
7
+
8
+ const items: MapExplorerItem[] = [
9
+ {
10
+ id: '1',
11
+ lat: 40.42,
12
+ lng: -3.7,
13
+ title: 'Noche de indie en Malasaña',
14
+ subtitle: 'Sala El Sol · Madrid',
15
+ meta: 'Vie 21:00',
16
+ priceLabel: 'Desde 18 €',
17
+ badge: 'Madrid',
18
+ chip: 'Conciertos',
19
+ href: '#madrid'
20
+ },
21
+ {
22
+ id: '2',
23
+ lat: 41.387,
24
+ lng: 2.168,
25
+ title: 'Jazz al parque',
26
+ subtitle: 'Parc de la Ciutadella · Barcelona',
27
+ meta: 'Sáb 19:30',
28
+ priceLabel: 'Gratis',
29
+ badge: 'Barcelona',
30
+ chip: 'Festivales',
31
+ href: '#barcelona'
32
+ },
33
+ {
34
+ id: '3',
35
+ lat: 39.47,
36
+ lng: -0.376,
37
+ title: 'Teatro en el centro',
38
+ subtitle: 'Teatre Principal · Valencia',
39
+ meta: 'Dom 18:00',
40
+ priceLabel: 'Desde 22 €',
41
+ badge: 'Valencia',
42
+ chip: 'Teatro',
43
+ href: '#valencia'
44
+ },
45
+ {
46
+ id: '4',
47
+ lat: 37.389,
48
+ lng: -5.984,
49
+ title: 'Final de copa',
50
+ subtitle: 'Estadio Benito Villamarín · Sevilla',
51
+ meta: 'Sáb 21:00',
52
+ priceLabel: 'Desde 35 €',
53
+ badge: 'Sevilla',
54
+ chip: 'Deporte',
55
+ href: '#sevilla'
56
+ }
57
+ ];
58
+
59
+ const clusters: MapExplorerCluster[] = [
60
+ { id: 'c-north', lat: 43.26, lng: -2.93, count: 128 },
61
+ { id: 'c-galicia', lat: 42.88, lng: -8.54, count: 64 }
62
+ ];
63
+
64
+ let query = $state('');
65
+ let category = $state('');
66
+ let when = $state('');
67
+
68
+ const filters = $derived<MapExplorerFilter[]>([
69
+ {
70
+ id: 'category',
71
+ label: 'Category',
72
+ value: category,
73
+ options: [
74
+ { value: '', label: 'All categories' },
75
+ { value: 'concerts', label: 'Concerts' },
76
+ { value: 'festivals', label: 'Festivals' },
77
+ { value: 'theatre', label: 'Theatre' },
78
+ { value: 'sports', label: 'Sports' }
79
+ ]
80
+ },
81
+ {
82
+ id: 'when',
83
+ label: 'When',
84
+ type: 'chips',
85
+ value: when,
86
+ options: [
87
+ { value: 'today', label: 'Today' },
88
+ { value: 'weekend', label: 'Weekend' },
89
+ { value: 'week', label: 'This week' }
90
+ ]
91
+ }
92
+ ]);
93
+
94
+ const visible = $derived.by(() => {
95
+ const q = query.trim().toLowerCase();
96
+ return items.filter((item) => {
97
+ if (category && !item.chip?.toLowerCase().includes(category.slice(0, 4))) return false;
98
+ if (q && !`${item.title} ${item.subtitle}`.toLowerCase().includes(q)) return false;
99
+ return true;
100
+ });
101
+ });
102
+ </script>
103
+
104
+ <div class="h-[80vh]">
105
+ <MapExplorer
106
+ items={visible}
107
+ {clusters}
108
+ {filters}
109
+ bind:query
110
+ title="Events in Spain"
111
+ description="Airbnb-style explorer: map, clusters, filters and a detail drawer."
112
+ total={visible.length + 192}
113
+ locateOnLoad={false}
114
+ onfilterchange={(id, value) => {
115
+ if (id === 'category') category = value;
116
+ if (id === 'when') when = value;
117
+ }}
118
+ onclearfilters={() => {
119
+ query = '';
120
+ category = '';
121
+ when = '';
122
+ }}
123
+ />
124
+ </div>
@@ -0,0 +1,3 @@
1
+ declare const MapExplorerStory: import("svelte").Component<Record<string, never>, {}, "">;
2
+ type MapExplorerStory = ReturnType<typeof MapExplorerStory>;
3
+ export default MapExplorerStory;
@@ -8,7 +8,7 @@ declare const meta: {
8
8
  example?: "marketing" | "app" | "centered" | "docs" | "compact";
9
9
  bordered?: boolean;
10
10
  blur?: boolean;
11
- maxWidth?: "full" | "5xl" | "6xl" | "7xl";
11
+ maxWidth?: "full" | "5xl" | "6xl" | "7xl" | "2xl";
12
12
  centerLinks?: boolean;
13
13
  }, {}, "">;
14
14
  tags: string[];
@@ -17,7 +17,7 @@ const meta = {
17
17
  blur: { control: 'boolean' },
18
18
  bordered: { control: 'boolean' },
19
19
  centerLinks: { control: 'boolean' },
20
- maxWidth: { control: 'select', options: ['full', '5xl', '6xl', '7xl'] }
20
+ maxWidth: { control: 'select', options: ['full', '5xl', '6xl', '7xl', '2xl'] }
21
21
  },
22
22
  args: {
23
23
  size: 'md',
@@ -11,6 +11,8 @@
11
11
 
12
12
  interface NavbarProps {
13
13
  brand?: string;
14
+ /** Real URL for the brand (SEO). Prefer this over onchange for marketing sites. */
15
+ brandHref?: string;
14
16
  links?: NavbarLink[];
15
17
  value?: string;
16
18
  size?: 'sm' | 'md' | 'lg';
@@ -20,10 +22,12 @@
20
22
  sticky?: boolean;
21
23
  /** Soft blur over page content when sticky/overlay */
22
24
  blur?: boolean;
25
+ /** Transparent bar over a full-bleed photo (marketing heroes) */
26
+ tone?: 'default' | 'on-media';
23
27
  /** Show bottom border */
24
28
  bordered?: boolean;
25
29
  /** Constrain inner content width */
26
- maxWidth?: 'full' | '5xl' | '6xl' | '7xl';
30
+ maxWidth?: 'full' | '5xl' | '6xl' | '7xl' | '2xl';
27
31
  /** Hide brand mark + text */
28
32
  showBrand?: boolean;
29
33
  /** Center nav links (marketing) */
@@ -36,12 +40,14 @@
36
40
 
37
41
  let {
38
42
  brand = 'Brand',
43
+ brandHref,
39
44
  links = [],
40
45
  value = $bindable(''),
41
46
  size = 'md',
42
47
  variant = 'underline',
43
48
  sticky = false,
44
49
  blur = true,
50
+ tone = 'default',
45
51
  bordered = true,
46
52
  maxWidth = 'full',
47
53
  showBrand = true,
@@ -56,7 +62,26 @@
56
62
  const brandSize = $derived({ sm: 'text-sm', md: 'text-base', lg: 'text-lg' }[size]);
57
63
  const linkSize = $derived({ sm: 'text-xs', md: 'text-sm', lg: 'text-sm' }[size]);
58
64
  const maxWidthClass = $derived(
59
- { full: 'max-w-none', '5xl': 'max-w-5xl', '6xl': 'max-w-6xl', '7xl': 'max-w-7xl' }[maxWidth]
65
+ {
66
+ full: 'max-w-none',
67
+ '5xl': 'max-w-5xl',
68
+ '6xl': 'max-w-6xl',
69
+ '7xl': 'max-w-7xl',
70
+ '2xl': 'max-w-screen-2xl'
71
+ }[maxWidth]
72
+ );
73
+ const onMedia = $derived(tone === 'on-media');
74
+ const mediaVars = $derived(
75
+ onMedia
76
+ ? [
77
+ '--text-primary: oklch(99% 0 0)',
78
+ '--text-secondary: oklch(90% 0 0)',
79
+ '--text-muted: oklch(78% 0 0)',
80
+ '--surface-elevated: oklch(100% 0 0 / 0.1)',
81
+ '--surface-overlay: oklch(100% 0 0 / 0.14)',
82
+ '--border: oklch(100% 0 0 / 0.18)'
83
+ ].join(';')
84
+ : undefined
60
85
  );
61
86
 
62
87
  function select(id: string, disabled?: boolean) {
@@ -64,16 +89,75 @@
64
89
  value = id;
65
90
  onchange?.(id);
66
91
  }
92
+
93
+ function desktopClass(active: boolean, disabled?: boolean) {
94
+ return [
95
+ 'gap-1.5 px-3 font-medium relative flex items-center transition-colors no-underline',
96
+ 'focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset',
97
+ linkSize,
98
+ variant === 'underline' && 'border-b-2',
99
+ variant === 'underline' &&
100
+ (active
101
+ ? 'border-brand-500 text-primary'
102
+ : 'text-secondary hover:text-primary border-transparent'),
103
+ variant === 'pills' && 'my-2 rounded-lg',
104
+ variant === 'pills' &&
105
+ (active
106
+ ? 'bg-surface-overlay text-primary'
107
+ : 'text-secondary hover:bg-surface-overlay/70 hover:text-primary'),
108
+ variant === 'plain' && (active ? 'text-brand-600' : 'text-secondary hover:text-primary'),
109
+ disabled && 'pointer-events-none cursor-not-allowed opacity-40'
110
+ ];
111
+ }
112
+
113
+ function mobileClass(active: boolean, disabled?: boolean) {
114
+ return [
115
+ 'px-3 py-1 text-xs font-medium shrink-0 rounded-full transition-colors no-underline',
116
+ 'focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none',
117
+ active
118
+ ? 'bg-brand-50 text-brand-700 dark:bg-brand-950/50 dark:text-brand-300'
119
+ : 'text-secondary hover:bg-surface-overlay',
120
+ disabled && 'pointer-events-none cursor-not-allowed opacity-40'
121
+ ];
122
+ }
67
123
  </script>
68
124
 
125
+ {#snippet brandMark()}
126
+ <span
127
+ class={[
128
+ 'rounded-lg bg-brand-500 font-bold text-white flex items-center justify-center',
129
+ size === 'lg' ? 'h-8 w-8 text-xs' : 'h-7 w-7 text-[11px]'
130
+ ]}
131
+ aria-hidden="true"
132
+ >
133
+ {brand.slice(0, 1).toUpperCase()}
134
+ </span>
135
+ <span class={['font-semibold tracking-tight text-primary', brandSize]}>{brand}</span>
136
+ {/snippet}
137
+
138
+ {#snippet linkInner(link: NavbarLink)}
139
+ {link.label}
140
+ {#if link.badge !== undefined && link.badge !== ''}
141
+ <span
142
+ class="bg-brand-50 px-1.5 py-0.5 font-semibold text-brand-700 dark:bg-brand-950/50 dark:text-brand-300 rounded-full text-[10px]"
143
+ >
144
+ {link.badge}
145
+ </span>
146
+ {/if}
147
+ {/snippet}
148
+
69
149
  <header
70
150
  class={[
71
- 'bg-surface-elevated relative z-40 w-full',
72
- bordered && 'border-border border-b',
151
+ 'relative z-40 w-full',
152
+ !onMedia && 'bg-surface-elevated',
153
+ onMedia && 'bg-gradient-to-b from-black/75 via-black/35 to-transparent',
154
+ bordered && !onMedia && 'border-border border-b',
73
155
  sticky && 'top-0 sticky',
74
- blur && 'bg-surface-elevated/85 backdrop-blur-md',
156
+ blur && !onMedia && 'bg-surface-elevated/85 backdrop-blur-md',
157
+ blur && onMedia && 'backdrop-blur-sm',
75
158
  className
76
159
  ]}
160
+ style={mediaVars}
77
161
  >
78
162
  <div
79
163
  class={['gap-3 px-4 sm:gap-4 sm:px-6 mx-auto flex w-full items-center', height, maxWidthClass]}
@@ -82,18 +166,15 @@
82
166
  <div class="flex shrink-0 items-center">{@render leading()}</div>
83
167
  {/if}
84
168
  {#if showBrand}
85
- <div class="gap-2 flex shrink-0 items-center">
86
- <span
87
- class={[
88
- 'rounded-lg bg-brand-500 font-bold text-white flex items-center justify-center',
89
- size === 'lg' ? 'h-8 w-8 text-xs' : 'h-7 w-7 text-[11px]'
90
- ]}
91
- aria-hidden="true"
92
- >
93
- {brand.slice(0, 1).toUpperCase()}
94
- </span>
95
- <span class={['font-semibold tracking-tight text-primary', brandSize]}>{brand}</span>
96
- </div>
169
+ {#if brandHref}
170
+ <a href={brandHref} class="gap-2 flex shrink-0 items-center no-underline" aria-label={brand}>
171
+ {@render brandMark()}
172
+ </a>
173
+ {:else}
174
+ <div class="gap-2 flex shrink-0 items-center">
175
+ {@render brandMark()}
176
+ </div>
177
+ {/if}
97
178
  {/if}
98
179
 
99
180
  <nav
@@ -106,38 +187,25 @@
106
187
  >
107
188
  {#each links as link (link.id)}
108
189
  {@const active = value === link.id}
109
- <button
110
- type="button"
111
- disabled={link.disabled}
112
- onclick={() => select(link.id, link.disabled)}
113
- class={[
114
- 'gap-1.5 px-3 font-medium relative flex items-center transition-colors',
115
- 'focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset',
116
- linkSize,
117
- variant === 'underline' && 'border-b-2',
118
- variant === 'underline' &&
119
- (active
120
- ? 'border-brand-500 text-primary'
121
- : 'text-secondary hover:text-primary border-transparent'),
122
- variant === 'pills' && 'my-2 rounded-lg',
123
- variant === 'pills' &&
124
- (active
125
- ? 'bg-surface-overlay text-primary'
126
- : 'text-secondary hover:bg-surface-overlay/70 hover:text-primary'),
127
- variant === 'plain' &&
128
- (active ? 'text-brand-600' : 'text-secondary hover:text-primary'),
129
- link.disabled && 'cursor-not-allowed opacity-40'
130
- ]}
131
- >
132
- {link.label}
133
- {#if link.badge !== undefined && link.badge !== ''}
134
- <span
135
- class="bg-brand-50 px-1.5 py-0.5 font-semibold text-brand-700 dark:bg-brand-950/50 dark:text-brand-300 rounded-full text-[10px]"
136
- >
137
- {link.badge}
138
- </span>
139
- {/if}
140
- </button>
190
+ {#if link.href && !link.disabled}
191
+ <a
192
+ href={link.href}
193
+ aria-current={active ? 'page' : undefined}
194
+ onclick={() => select(link.id)}
195
+ class={desktopClass(active)}
196
+ >
197
+ {@render linkInner(link)}
198
+ </a>
199
+ {:else}
200
+ <button
201
+ type="button"
202
+ disabled={link.disabled}
203
+ onclick={() => select(link.id, link.disabled)}
204
+ class={desktopClass(active, link.disabled)}
205
+ >
206
+ {@render linkInner(link)}
207
+ </button>
208
+ {/if}
141
209
  {/each}
142
210
  </nav>
143
211
 
@@ -146,21 +214,26 @@
146
214
  aria-label="Primary"
147
215
  >
148
216
  {#each links as link (link.id)}
149
- <button
150
- type="button"
151
- disabled={link.disabled}
152
- onclick={() => select(link.id, link.disabled)}
153
- class={[
154
- 'px-3 py-1 text-xs font-medium shrink-0 rounded-full transition-colors',
155
- 'focus-visible:ring-brand-500/30 focus-visible:ring-2 focus-visible:outline-none',
156
- value === link.id
157
- ? 'bg-brand-50 text-brand-700 dark:bg-brand-950/50 dark:text-brand-300'
158
- : 'text-secondary hover:bg-surface-overlay',
159
- link.disabled && 'cursor-not-allowed opacity-40'
160
- ]}
161
- >
162
- {link.label}
163
- </button>
217
+ {@const active = value === link.id}
218
+ {#if link.href && !link.disabled}
219
+ <a
220
+ href={link.href}
221
+ aria-current={active ? 'page' : undefined}
222
+ onclick={() => select(link.id)}
223
+ class={mobileClass(active)}
224
+ >
225
+ {@render linkInner(link)}
226
+ </a>
227
+ {:else}
228
+ <button
229
+ type="button"
230
+ disabled={link.disabled}
231
+ onclick={() => select(link.id, link.disabled)}
232
+ class={mobileClass(active, link.disabled)}
233
+ >
234
+ {@render linkInner(link)}
235
+ </button>
236
+ {/if}
164
237
  {/each}
165
238
  </nav>
166
239
 
@@ -8,6 +8,8 @@ export interface NavbarLink {
8
8
  }
9
9
  interface NavbarProps {
10
10
  brand?: string;
11
+ /** Real URL for the brand (SEO). Prefer this over onchange for marketing sites. */
12
+ brandHref?: string;
11
13
  links?: NavbarLink[];
12
14
  value?: string;
13
15
  size?: 'sm' | 'md' | 'lg';
@@ -17,10 +19,12 @@ interface NavbarProps {
17
19
  sticky?: boolean;
18
20
  /** Soft blur over page content when sticky/overlay */
19
21
  blur?: boolean;
22
+ /** Transparent bar over a full-bleed photo (marketing heroes) */
23
+ tone?: 'default' | 'on-media';
20
24
  /** Show bottom border */
21
25
  bordered?: boolean;
22
26
  /** Constrain inner content width */
23
- maxWidth?: 'full' | '5xl' | '6xl' | '7xl';
27
+ maxWidth?: 'full' | '5xl' | '6xl' | '7xl' | '2xl';
24
28
  /** Hide brand mark + text */
25
29
  showBrand?: boolean;
26
30
  /** Center nav links (marketing) */
@@ -13,7 +13,7 @@
13
13
  example?: 'marketing' | 'app' | 'centered' | 'docs' | 'compact';
14
14
  bordered?: boolean;
15
15
  blur?: boolean;
16
- maxWidth?: 'full' | '5xl' | '6xl' | '7xl';
16
+ maxWidth?: 'full' | '5xl' | '6xl' | '7xl' | '2xl';
17
17
  centerLinks?: boolean;
18
18
  }>();
19
19
 
@@ -5,7 +5,7 @@ type $$ComponentProps = {
5
5
  example?: 'marketing' | 'app' | 'centered' | 'docs' | 'compact';
6
6
  bordered?: boolean;
7
7
  blur?: boolean;
8
- maxWidth?: 'full' | '5xl' | '6xl' | '7xl';
8
+ maxWidth?: 'full' | '5xl' | '6xl' | '7xl' | '2xl';
9
9
  centerLinks?: boolean;
10
10
  };
11
11
  declare const NavbarStory: import("svelte").Component<$$ComponentProps, {}, "">;
package/dist/index.d.ts CHANGED
@@ -789,6 +789,12 @@ export { default as LandingHero } from './components/organisms/LandingHero/Landi
789
789
  export type { LandingHeroVariant, LandingHeroTone, LandingHeroCtaMode, LandingHeroSize, LandingHeroStat, LandingHeroLogo, LandingHeroProof, LandingHeroAnnouncement } from './components/organisms/LandingHero/LandingHero.svelte';
790
790
  export { default as SearchResults } from './components/organisms/SearchResults/SearchResults.svelte';
791
791
  export type { SearchResultItem, SearchResultKind, SearchResultsLayout, SearchResultsSort, SearchSuggestion } from './components/organisms/SearchResults/SearchResults.svelte';
792
+ export { default as SearchResultRow } from './components/molecules/SearchResultRow/SearchResultRow.svelte';
793
+ export type { SearchResultRowKind } from './components/molecules/SearchResultRow/SearchResultRow.svelte';
794
+ export { default as KnowledgeCard } from './components/molecules/KnowledgeCard/KnowledgeCard.svelte';
795
+ export { default as AdUnit } from './components/molecules/AdUnit/AdUnit.svelte';
796
+ export type { AdUnitFormat } from './components/molecules/AdUnit/AdUnit.svelte';
797
+ export { default as AdSlot } from './components/molecules/AdSlot/AdSlot.svelte';
792
798
  export { default as SettingsForm } from './components/organisms/SettingsForm/SettingsForm.svelte';
793
799
  export type { AccountSettingsValues } from './components/organisms/SettingsForm/SettingsForm.svelte';
794
800
  export { default as SchemaForm } from './components/organisms/SchemaForm/SchemaForm.svelte';
@@ -808,6 +814,8 @@ export { default as AssetPickerPage } from './components/organisms/AssetPickerPa
808
814
  export type { AssetPickerView, PickerAsset } from './components/organisms/AssetPickerPage/AssetPickerPage.svelte';
809
815
  export { default as ExploreFeedPage } from './components/organisms/ExploreFeedPage/ExploreFeedPage.svelte';
810
816
  export type { ExploreFeedItem, ExploreFeedGroup, ExploreSuggestion, ExploreFeaturedItem } from './components/organisms/ExploreFeedPage/ExploreFeedPage.svelte';
817
+ export { default as MapExplorer } from './components/organisms/MapExplorer/MapExplorer.svelte';
818
+ export type { MapExplorerBounds, MapExplorerCluster, MapExplorerFilter, MapExplorerCardContext, MapExplorerItem, MapExplorerListView, MapExplorerPanel } from './components/organisms/MapExplorer/MapExplorer.svelte';
811
819
  export { default as MultiWorkspaceDashboard } from './components/organisms/MultiWorkspaceDashboard/MultiWorkspaceDashboard.svelte';
812
820
  export type { WorkspaceInvite, WorkspaceViewMode, WorkspaceFilterId } from './components/organisms/MultiWorkspaceDashboard/MultiWorkspaceDashboard.svelte';
813
821
  export { default as LeadDetailPage } from './components/organisms/LeadDetailPage/LeadDetailPage.svelte';
package/dist/index.js CHANGED
@@ -539,6 +539,10 @@ export { default as BlogEditor } from './components/organisms/BlogEditor/BlogEdi
539
539
  export { default as BlogRenderer } from './components/organisms/BlogRenderer/BlogRenderer.svelte';
540
540
  export { default as LandingHero } from './components/organisms/LandingHero/LandingHero.svelte';
541
541
  export { default as SearchResults } from './components/organisms/SearchResults/SearchResults.svelte';
542
+ export { default as SearchResultRow } from './components/molecules/SearchResultRow/SearchResultRow.svelte';
543
+ export { default as KnowledgeCard } from './components/molecules/KnowledgeCard/KnowledgeCard.svelte';
544
+ export { default as AdUnit } from './components/molecules/AdUnit/AdUnit.svelte';
545
+ export { default as AdSlot } from './components/molecules/AdSlot/AdSlot.svelte';
542
546
  export { default as SettingsForm } from './components/organisms/SettingsForm/SettingsForm.svelte';
543
547
  export { default as SchemaForm } from './components/organisms/SchemaForm/SchemaForm.svelte';
544
548
  export { default as NotificationPreferencesPage } from './components/organisms/NotificationPreferencesPage/NotificationPreferencesPage.svelte';
@@ -549,6 +553,7 @@ export { default as MobileAccountPage } from './components/organisms/MobileAccou
549
553
  export { default as BacklogPage } from './components/organisms/BacklogPage/BacklogPage.svelte';
550
554
  export { default as AssetPickerPage } from './components/organisms/AssetPickerPage/AssetPickerPage.svelte';
551
555
  export { default as ExploreFeedPage } from './components/organisms/ExploreFeedPage/ExploreFeedPage.svelte';
556
+ export { default as MapExplorer } from './components/organisms/MapExplorer/MapExplorer.svelte';
552
557
  export { default as MultiWorkspaceDashboard } from './components/organisms/MultiWorkspaceDashboard/MultiWorkspaceDashboard.svelte';
553
558
  export { default as LeadDetailPage } from './components/organisms/LeadDetailPage/LeadDetailPage.svelte';
554
559
  export { default as DashboardGrid } from './components/organisms/DashboardGrid/DashboardGrid.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@r2digisolutions/components",
3
- "version": "0.22.2",
3
+ "version": "0.23.0",
4
4
  "private": false,
5
5
  "description": "R2DigiSolutions Svelte 5 component library — Atomic Design, Tailwind 4, Light/Dark mode",
6
6
  "license": "MIT",
@@ -66,7 +66,7 @@
66
66
  },
67
67
  "devDependencies": {
68
68
  "@eslint/js": "^10.0.1",
69
- "@lucide/svelte": "^1.46.0",
69
+ "@lucide/svelte": "^1.47.0",
70
70
  "@playwright/test": "^1.63.0",
71
71
  "@storybook/addon-a11y": "^10.6.0",
72
72
  "@storybook/addon-docs": "^10.6.0",
@@ -79,25 +79,27 @@
79
79
  "@sveltejs/package": "^2.5.8",
80
80
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
81
81
  "@tailwindcss/vite": "^4.3.3",
82
- "@types/node": "^26.5.1",
82
+ "@types/leaflet": "^1.9.22",
83
+ "@types/leaflet.markercluster": "^1.5.6",
84
+ "@types/node": "^26.6.2",
83
85
  "@vitest/browser-playwright": "^5.0.1",
84
86
  "bumpp": "~12.3.0",
85
- "eslint": "^10.10.0",
87
+ "eslint": "^10.11.0",
86
88
  "eslint-config-prettier": "^10.1.8",
87
89
  "eslint-plugin-svelte": "^3.23.0",
88
90
  "globals": "^17.12.0",
89
91
  "mdsvex": "^0.12.8",
90
92
  "playwright": "^1.63.0",
91
- "prettier": "^3.9.7",
93
+ "prettier": "^3.9.8",
92
94
  "prettier-plugin-svelte": "^4.1.1",
93
95
  "prettier-plugin-tailwindcss": "^0.8.1",
94
96
  "publint": "^0.3.24",
95
97
  "storybook": "^10.6.0",
96
- "svelte": "^5.57.0",
98
+ "svelte": "^5.57.1",
97
99
  "svelte-check": "^4.7.6",
98
100
  "tailwindcss": "^4.3.3",
99
101
  "typescript": "6.0.3",
100
- "typescript-eslint": "^8.70.0",
102
+ "typescript-eslint": "^8.70.1",
101
103
  "vite": "^8.3.0",
102
104
  "vitest": "^5.0.1",
103
105
  "vitest-browser-svelte": "^3.1.0"
@@ -111,6 +113,8 @@
111
113
  "atomic-design"
112
114
  ],
113
115
  "dependencies": {
114
- "@xyflow/svelte": "^1.6.6"
116
+ "@xyflow/svelte": "^1.6.6",
117
+ "leaflet": "^1.9.4",
118
+ "leaflet.markercluster": "^1.5.3"
115
119
  }
116
120
  }