@r2digisolutions/components 0.22.1 → 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.
- package/dist/components/atoms/Avatar/Avatar.stories.d.ts +1 -1
- package/dist/components/atoms/Avatar/Avatar.svelte +5 -3
- package/dist/components/atoms/Avatar/Avatar.svelte.d.ts +1 -1
- package/dist/components/atoms/Avatar/AvatarStory.svelte +1 -1
- package/dist/components/atoms/Avatar/AvatarStory.svelte.d.ts +1 -1
- package/dist/components/atoms/Container/Container.stories.d.ts +1 -1
- package/dist/components/atoms/Container/ContainerStory.svelte.d.ts +1 -1
- package/dist/components/molecules/AdSlot/AdSlot.stories.js +10 -0
- package/dist/components/molecules/AdSlot/AdSlot.svelte +16 -0
- package/dist/components/molecules/AdSlot/AdSlot.svelte.d.ts +8 -0
- package/dist/components/molecules/AdSlot/AdSlotStory.svelte +23 -0
- package/dist/components/molecules/AdSlot/AdSlotStory.svelte.d.ts +18 -0
- package/dist/components/molecules/AdUnit/AdUnit.stories.js +28 -0
- package/dist/components/molecules/AdUnit/AdUnit.svelte +151 -0
- package/dist/components/molecules/AdUnit/AdUnit.svelte.d.ts +15 -0
- package/dist/components/molecules/AdUnit/AdUnitStory.svelte +36 -0
- package/dist/components/molecules/AdUnit/AdUnitStory.svelte.d.ts +7 -0
- package/dist/components/molecules/AvatarGroup/AvatarGroup.svelte +1 -1
- package/dist/components/molecules/AvatarGroup/AvatarGroup.svelte.d.ts +1 -1
- package/dist/components/molecules/AvatarLabel/AvatarLabel.svelte +1 -1
- package/dist/components/molecules/AvatarLabel/AvatarLabel.svelte.d.ts +1 -1
- package/dist/components/molecules/Card/Card.svelte +6 -15
- package/dist/components/molecules/DatePicker/DatePicker.svelte +1 -1
- package/dist/components/molecules/FeatureList/FeatureList.svelte +26 -7
- package/dist/components/molecules/FeatureList/FeatureList.svelte.d.ts +2 -0
- package/dist/components/molecules/FormSelect/FormSelect.svelte +4 -0
- package/dist/components/molecules/FormSelect/FormSelect.svelte.d.ts +2 -0
- package/dist/components/molecules/KnowledgeCard/KnowledgeCard.stories.js +25 -0
- package/dist/components/molecules/KnowledgeCard/KnowledgeCard.svelte +95 -0
- package/dist/components/molecules/KnowledgeCard/KnowledgeCard.svelte.d.ts +15 -0
- package/dist/components/molecules/KnowledgeCard/KnowledgeCardStory.svelte +56 -0
- package/dist/components/molecules/KnowledgeCard/KnowledgeCardStory.svelte.d.ts +6 -0
- package/dist/components/molecules/LocaleSwitcher/LocaleSwitcher.svelte +5 -5
- package/dist/components/molecules/MediaCard/MediaCard.svelte +101 -24
- package/dist/components/molecules/MediaCard/MediaCard.svelte.d.ts +25 -6
- package/dist/components/molecules/MediaCard/MediaCardStory.svelte +34 -1
- package/dist/components/molecules/SearchResultRow/SearchResultRow.stories.js +25 -0
- package/dist/components/molecules/SearchResultRow/SearchResultRow.svelte +74 -0
- package/dist/components/molecules/SearchResultRow/SearchResultRow.svelte.d.ts +18 -0
- package/dist/components/molecules/SearchResultRow/SearchResultRowStory.svelte +85 -0
- package/dist/components/molecules/SearchResultRow/SearchResultRowStory.svelte.d.ts +6 -0
- package/dist/components/molecules/Select/Select.svelte +9 -2
- package/dist/components/molecules/Select/Select.svelte.d.ts +5 -0
- package/dist/components/molecules/StatCard/StatCard.svelte +7 -1
- package/dist/components/molecules/StatCard/StatCard.svelte.d.ts +2 -0
- package/dist/components/organisms/Drawer/Drawer.svelte +120 -37
- package/dist/components/organisms/Drawer/Drawer.svelte.d.ts +6 -0
- package/dist/components/organisms/MapExplorer/MapExplorer.stories.d.ts +12 -0
- package/dist/components/organisms/MapExplorer/MapExplorer.stories.js +11 -0
- package/dist/components/organisms/MapExplorer/MapExplorer.svelte +928 -0
- package/dist/components/organisms/MapExplorer/MapExplorer.svelte.d.ts +96 -0
- package/dist/components/organisms/MapExplorer/MapExplorerStory.svelte +124 -0
- package/dist/components/organisms/MapExplorer/MapExplorerStory.svelte.d.ts +3 -0
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/components/organisms/Navbar/Navbar.stories.js +1 -1
- package/dist/components/organisms/Navbar/Navbar.svelte +137 -64
- package/dist/components/organisms/Navbar/Navbar.svelte.d.ts +5 -1
- package/dist/components/organisms/Navbar/NavbarStory.svelte +1 -1
- package/dist/components/organisms/Navbar/NavbarStory.svelte.d.ts +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +5 -0
- package/package.json +12 -8
|
@@ -5,7 +5,7 @@ declare const meta: {
|
|
|
5
5
|
src?: string;
|
|
6
6
|
alt?: string;
|
|
7
7
|
name?: string;
|
|
8
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
8
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
9
9
|
status?: "online" | "offline" | "busy" | "away" | null;
|
|
10
10
|
}, {}, "">;
|
|
11
11
|
tags: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
2
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
3
3
|
type AvatarStatus = 'online' | 'offline' | 'busy' | 'away' | null;
|
|
4
4
|
|
|
5
5
|
interface AvatarProps {
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
md: 'h-10 w-10 text-sm',
|
|
32
32
|
lg: 'h-12 w-12 text-base',
|
|
33
33
|
xl: 'h-16 w-16 text-lg',
|
|
34
|
-
'2xl': 'h-20 w-20 text-xl'
|
|
34
|
+
'2xl': 'h-20 w-20 text-xl',
|
|
35
|
+
'3xl': 'h-28 w-28 text-2xl sm:h-32 sm:w-32'
|
|
35
36
|
};
|
|
36
37
|
|
|
37
38
|
const statusDotSizes: Record<AvatarSize, string> = {
|
|
@@ -40,7 +41,8 @@
|
|
|
40
41
|
md: 'h-2.5 w-2.5',
|
|
41
42
|
lg: 'h-3 w-3',
|
|
42
43
|
xl: 'h-3.5 w-3.5',
|
|
43
|
-
'2xl': 'h-4 w-4'
|
|
44
|
+
'2xl': 'h-4 w-4',
|
|
45
|
+
'3xl': 'h-5 w-5'
|
|
44
46
|
};
|
|
45
47
|
|
|
46
48
|
const statusColors: Record<NonNullable<AvatarStatus>, string> = {
|
|
@@ -2,7 +2,7 @@ type $$ComponentProps = {
|
|
|
2
2
|
src?: string;
|
|
3
3
|
alt?: string;
|
|
4
4
|
name?: string;
|
|
5
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
5
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
6
6
|
status?: 'online' | 'offline' | 'busy' | 'away' | null;
|
|
7
7
|
};
|
|
8
8
|
declare const AvatarStory: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -2,7 +2,7 @@ import type { StoryObj } from '@storybook/svelte';
|
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
4
|
component: import("svelte").Component<{
|
|
5
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
5
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
6
6
|
padding?: "none" | "sm" | "md" | "lg";
|
|
7
7
|
}, {}, "">;
|
|
8
8
|
tags: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const ContainerStory: import("svelte").Component<{
|
|
2
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "
|
|
2
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | "4xl" | "5xl" | "6xl" | "7xl";
|
|
3
3
|
padding?: "none" | "sm" | "md" | "lg";
|
|
4
4
|
}, {}, "">;
|
|
5
5
|
type ContainerStory = ReturnType<typeof ContainerStory>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
|
|
4
|
+
interface AdSlotProps {
|
|
5
|
+
class?: string
|
|
6
|
+
children?: Snippet
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { class: className = '', children }: AdSlotProps = $props()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if children}
|
|
13
|
+
<div class={['min-w-0', className]}>
|
|
14
|
+
{@render children()}
|
|
15
|
+
</div>
|
|
16
|
+
{/if}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import AdSlot from './AdSlot.svelte'
|
|
3
|
+
import AdUnit from '../AdUnit/AdUnit.svelte'
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<div class="mx-auto w-full max-w-xl space-y-4 p-4">
|
|
7
|
+
<p class="text-[11px] font-medium uppercase tracking-wide text-muted">With content</p>
|
|
8
|
+
<AdSlot>
|
|
9
|
+
<AdUnit
|
|
10
|
+
format="native"
|
|
11
|
+
headline="EvoFact — Facturación inteligente para tu empresa"
|
|
12
|
+
description="Prueba gratis 14 días. Sin tarjeta de crédito."
|
|
13
|
+
href="https://evoteg.com"
|
|
14
|
+
advertiser="evoteg.com"
|
|
15
|
+
/>
|
|
16
|
+
</AdSlot>
|
|
17
|
+
|
|
18
|
+
<p class="text-[11px] font-medium uppercase tracking-wide text-muted">Empty (renders nothing)</p>
|
|
19
|
+
<div class="rounded border border-dashed border-border p-3 text-xs text-muted">
|
|
20
|
+
AdSlot sin children → no renderiza nada:
|
|
21
|
+
<AdSlot />
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const AdSlotStory: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type AdSlotStory = InstanceType<typeof AdSlotStory>;
|
|
18
|
+
export default AdSlotStory;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import AdUnitStory from './AdUnitStory.svelte';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Molecules/AdUnit',
|
|
4
|
+
component: AdUnitStory,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
format: {
|
|
8
|
+
control: 'select',
|
|
9
|
+
options: ['native', 'search', 'horizontal', 'banner', 'vertical']
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Native = {
|
|
15
|
+
args: { format: 'native' }
|
|
16
|
+
};
|
|
17
|
+
export const Search = {
|
|
18
|
+
args: { format: 'search' }
|
|
19
|
+
};
|
|
20
|
+
export const Horizontal = {
|
|
21
|
+
args: { format: 'horizontal' }
|
|
22
|
+
};
|
|
23
|
+
export const Banner = {
|
|
24
|
+
args: { format: 'banner' }
|
|
25
|
+
};
|
|
26
|
+
export const Vertical = {
|
|
27
|
+
args: { format: 'vertical' }
|
|
28
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Image from '../../atoms/Image/Image.svelte'
|
|
3
|
+
|
|
4
|
+
export type AdUnitFormat = 'horizontal' | 'vertical' | 'banner' | 'native' | 'search'
|
|
5
|
+
|
|
6
|
+
interface AdUnitProps {
|
|
7
|
+
format?: AdUnitFormat
|
|
8
|
+
headline: string
|
|
9
|
+
description?: string
|
|
10
|
+
imageUrl?: string
|
|
11
|
+
href: string
|
|
12
|
+
advertiser?: string
|
|
13
|
+
/** Badge label shown on the ad. Defaults to 'Anuncio'. */
|
|
14
|
+
label?: string
|
|
15
|
+
class?: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
format = 'native',
|
|
20
|
+
headline,
|
|
21
|
+
description,
|
|
22
|
+
imageUrl,
|
|
23
|
+
href,
|
|
24
|
+
advertiser,
|
|
25
|
+
label = 'Anuncio',
|
|
26
|
+
class: className = ''
|
|
27
|
+
}: AdUnitProps = $props()
|
|
28
|
+
|
|
29
|
+
const hasImage = $derived(!!imageUrl)
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
{#snippet adBadge()}
|
|
33
|
+
<span
|
|
34
|
+
class="inline-flex items-center rounded border border-amber-400/60 bg-amber-50 px-1 py-0.5 text-[10px] font-medium leading-none text-amber-700 dark:border-amber-400/40 dark:bg-amber-400/10 dark:text-amber-400"
|
|
35
|
+
>
|
|
36
|
+
{label}
|
|
37
|
+
</span>
|
|
38
|
+
{/snippet}
|
|
39
|
+
|
|
40
|
+
<a
|
|
41
|
+
{href}
|
|
42
|
+
target="_blank"
|
|
43
|
+
rel="noopener sponsored"
|
|
44
|
+
class={[
|
|
45
|
+
'group block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/30',
|
|
46
|
+
(format === 'vertical') && 'max-w-xs',
|
|
47
|
+
className
|
|
48
|
+
]}
|
|
49
|
+
>
|
|
50
|
+
{#if format === 'search'}
|
|
51
|
+
<!-- Google-ads style: title brand, advertiser breadcrumb, description -->
|
|
52
|
+
<div class="flex min-w-0 gap-2 py-2">
|
|
53
|
+
<div class="min-w-0 flex-1">
|
|
54
|
+
<div class="mb-0.5 flex items-center gap-1.5">
|
|
55
|
+
{@render adBadge()}
|
|
56
|
+
{#if advertiser}
|
|
57
|
+
<span class="truncate text-xs text-muted">{advertiser}</span>
|
|
58
|
+
{/if}
|
|
59
|
+
</div>
|
|
60
|
+
<p class="truncate text-lg font-medium leading-snug text-brand-600 group-hover:underline">
|
|
61
|
+
{headline}
|
|
62
|
+
</p>
|
|
63
|
+
{#if description}
|
|
64
|
+
<p class="mt-1 line-clamp-2 text-sm text-secondary">{description}</p>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
{:else if format === 'native'}
|
|
69
|
+
<!-- Tile-like row with image thumb -->
|
|
70
|
+
<div
|
|
71
|
+
class="flex items-start gap-3 overflow-hidden rounded-xl border border-border bg-surface-elevated p-3 transition-colors hover:border-border-strong hover:bg-surface-overlay/70"
|
|
72
|
+
>
|
|
73
|
+
{#if hasImage}
|
|
74
|
+
<div class="h-16 w-16 shrink-0 overflow-hidden rounded-lg">
|
|
75
|
+
<Image src={imageUrl!} alt={headline} class="h-16 w-16" />
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
78
|
+
<div class="min-w-0 flex-1">
|
|
79
|
+
<div class="mb-1 flex items-center gap-1.5">
|
|
80
|
+
{@render adBadge()}
|
|
81
|
+
{#if advertiser}
|
|
82
|
+
<span class="truncate text-xs text-muted">{advertiser}</span>
|
|
83
|
+
{/if}
|
|
84
|
+
</div>
|
|
85
|
+
<p class="truncate text-sm font-semibold leading-snug text-primary group-hover:underline">
|
|
86
|
+
{headline}
|
|
87
|
+
</p>
|
|
88
|
+
{#if description}
|
|
89
|
+
<p class="mt-0.5 line-clamp-2 text-xs text-secondary">{description}</p>
|
|
90
|
+
{/if}
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
{:else if format === 'vertical'}
|
|
94
|
+
<!-- Stacked image on top, text below -->
|
|
95
|
+
<div
|
|
96
|
+
class="overflow-hidden rounded-xl border border-border bg-surface-elevated transition-colors hover:border-border-strong"
|
|
97
|
+
>
|
|
98
|
+
{#if hasImage}
|
|
99
|
+
<Image src={imageUrl!} alt={headline} aspectRatio="4/3" class="w-full" />
|
|
100
|
+
{:else}
|
|
101
|
+
<div class="h-32 w-full bg-surface-overlay"></div>
|
|
102
|
+
{/if}
|
|
103
|
+
<div class="p-3">
|
|
104
|
+
<div class="mb-1 flex items-center gap-1.5">
|
|
105
|
+
{@render adBadge()}
|
|
106
|
+
{#if advertiser}
|
|
107
|
+
<span class="truncate text-xs text-muted">{advertiser}</span>
|
|
108
|
+
{/if}
|
|
109
|
+
</div>
|
|
110
|
+
<p class="text-sm font-semibold leading-snug text-primary group-hover:underline">
|
|
111
|
+
{headline}
|
|
112
|
+
</p>
|
|
113
|
+
{#if description}
|
|
114
|
+
<p class="mt-1 text-xs text-secondary">{description}</p>
|
|
115
|
+
{/if}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
{:else}
|
|
119
|
+
<!-- banner / horizontal: image left or top strip + headline + description, wide -->
|
|
120
|
+
<div
|
|
121
|
+
class={[
|
|
122
|
+
'flex overflow-hidden rounded-xl border border-border bg-surface-elevated transition-colors hover:border-border-strong',
|
|
123
|
+
format === 'banner' ? 'flex-col' : 'flex-row items-center'
|
|
124
|
+
]}
|
|
125
|
+
>
|
|
126
|
+
{#if hasImage}
|
|
127
|
+
{#if format === 'banner'}
|
|
128
|
+
<Image src={imageUrl!} alt={headline} aspectRatio="21/4" class="w-full" />
|
|
129
|
+
{:else}
|
|
130
|
+
<div class="h-full w-36 shrink-0">
|
|
131
|
+
<Image src={imageUrl!} alt={headline} aspectRatio="1/1" class="h-full w-full" />
|
|
132
|
+
</div>
|
|
133
|
+
{/if}
|
|
134
|
+
{/if}
|
|
135
|
+
<div class={['flex-1 p-3', format === 'banner' && hasImage ? 'pt-2' : '']}>
|
|
136
|
+
<div class="mb-1 flex items-center gap-1.5">
|
|
137
|
+
{@render adBadge()}
|
|
138
|
+
{#if advertiser}
|
|
139
|
+
<span class="truncate text-xs text-muted">{advertiser}</span>
|
|
140
|
+
{/if}
|
|
141
|
+
</div>
|
|
142
|
+
<p class="text-sm font-semibold leading-snug text-primary group-hover:underline">
|
|
143
|
+
{headline}
|
|
144
|
+
</p>
|
|
145
|
+
{#if description}
|
|
146
|
+
<p class="mt-0.5 line-clamp-2 text-xs text-secondary">{description}</p>
|
|
147
|
+
{/if}
|
|
148
|
+
</div>
|
|
149
|
+
</div>
|
|
150
|
+
{/if}
|
|
151
|
+
</a>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type AdUnitFormat = 'horizontal' | 'vertical' | 'banner' | 'native' | 'search';
|
|
2
|
+
interface AdUnitProps {
|
|
3
|
+
format?: AdUnitFormat;
|
|
4
|
+
headline: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
imageUrl?: string;
|
|
7
|
+
href: string;
|
|
8
|
+
advertiser?: string;
|
|
9
|
+
/** Badge label shown on the ad. Defaults to 'Anuncio'. */
|
|
10
|
+
label?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const AdUnit: import("svelte").Component<AdUnitProps, {}, "">;
|
|
14
|
+
type AdUnit = ReturnType<typeof AdUnit>;
|
|
15
|
+
export default AdUnit;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import AdUnit from './AdUnit.svelte'
|
|
3
|
+
import type { AdUnitFormat } from './AdUnit.svelte'
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
format?: AdUnitFormat
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { format = 'native' }: Props = $props()
|
|
10
|
+
|
|
11
|
+
const demoImage = 'https://images.unsplash.com/photo-1461897104016-0b3b00cc81ee?w=600&q=80'
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<div class="mx-auto w-full max-w-xl space-y-4 p-4">
|
|
15
|
+
<p class="text-[11px] font-medium uppercase tracking-wide text-muted">Formato: {format}</p>
|
|
16
|
+
|
|
17
|
+
<AdUnit
|
|
18
|
+
{format}
|
|
19
|
+
headline="EvoFact — Facturación inteligente para tu empresa"
|
|
20
|
+
description="Emite facturas electrónicas con VeriFactu, gestiona clientes y cobra más rápido. Prueba gratis 14 días."
|
|
21
|
+
imageUrl={demoImage}
|
|
22
|
+
href="https://evoteg.com"
|
|
23
|
+
advertiser="evoteg.com"
|
|
24
|
+
/>
|
|
25
|
+
|
|
26
|
+
{#if format === 'native'}
|
|
27
|
+
<AdUnit
|
|
28
|
+
{format}
|
|
29
|
+
headline="Atom — Software para gimnasios"
|
|
30
|
+
description="Gestiona socios, accesos y clases con la plataforma líder en centros deportivos."
|
|
31
|
+
href="https://atom.com"
|
|
32
|
+
advertiser="atom.com"
|
|
33
|
+
label="Patrocinado"
|
|
34
|
+
/>
|
|
35
|
+
{/if}
|
|
36
|
+
</div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
interface AvatarGroupProps {
|
|
14
14
|
items?: AvatarGroupItem[];
|
|
15
15
|
max?: number;
|
|
16
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
16
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
17
17
|
/** Separator ring color against parent background */
|
|
18
18
|
ring?: AvatarGroupRing;
|
|
19
19
|
class?: string;
|
|
@@ -8,7 +8,7 @@ export type AvatarGroupRing = 'surface' | 'elevated' | 'inverse' | 'transparent'
|
|
|
8
8
|
interface AvatarGroupProps {
|
|
9
9
|
items?: AvatarGroupItem[];
|
|
10
10
|
max?: number;
|
|
11
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
11
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
12
12
|
/** Separator ring color against parent background */
|
|
13
13
|
ring?: AvatarGroupRing;
|
|
14
14
|
class?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Avatar from '../../atoms/Avatar/Avatar.svelte';
|
|
3
3
|
import StatusDot from '../../atoms/StatusDot/StatusDot.svelte';
|
|
4
4
|
|
|
5
|
-
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
5
|
+
type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
|
|
6
6
|
type Status = 'online' | 'offline' | 'busy' | 'away';
|
|
7
7
|
|
|
8
8
|
interface AvatarLabelProps {
|
|
@@ -56,26 +56,20 @@
|
|
|
56
56
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
57
57
|
<div
|
|
58
58
|
class={[
|
|
59
|
-
'flex flex-col
|
|
60
|
-
hoverable ? 'overflow-visible' : 'overflow-hidden',
|
|
59
|
+
'rounded-2xl flex flex-col overflow-hidden transition-[box-shadow,transform,border-color] duration-200',
|
|
61
60
|
variantClasses[variant],
|
|
62
|
-
hoverable &&
|
|
63
|
-
'cursor-pointer hover:-translate-y-0.5 hover:border-border-strong hover:shadow-md',
|
|
61
|
+
hoverable && 'hover:-translate-y-0.5 hover:border-border-strong hover:shadow-md cursor-pointer',
|
|
64
62
|
!!onclick && 'cursor-pointer',
|
|
65
63
|
className
|
|
66
64
|
]}
|
|
67
65
|
role={onclick ? 'button' : undefined}
|
|
68
66
|
tabindex={onclick ? 0 : undefined}
|
|
69
|
-
|
|
67
|
+
{onclick}
|
|
70
68
|
onkeydown={onclick ? handleKeydown : undefined}
|
|
71
69
|
>
|
|
72
70
|
{#if header}
|
|
73
71
|
<div
|
|
74
|
-
class={[
|
|
75
|
-
'w-full border-b border-border',
|
|
76
|
-
chrome && 'bg-surface/40',
|
|
77
|
-
paddingClasses[padding]
|
|
78
|
-
]}
|
|
72
|
+
class={['border-border w-full border-b', chrome && 'bg-surface/40', paddingClasses[padding]]}
|
|
79
73
|
>
|
|
80
74
|
{@render header()}
|
|
81
75
|
</div>
|
|
@@ -83,10 +77,7 @@
|
|
|
83
77
|
|
|
84
78
|
{#if children}
|
|
85
79
|
<div
|
|
86
|
-
class={[
|
|
87
|
-
'flex min-w-0 flex-1 flex-col',
|
|
88
|
-
padding !== 'none' ? paddingClasses[padding] : ''
|
|
89
|
-
]}
|
|
80
|
+
class={['min-w-0 flex flex-1 flex-col', padding !== 'none' ? paddingClasses[padding] : '']}
|
|
90
81
|
>
|
|
91
82
|
{@render children()}
|
|
92
83
|
</div>
|
|
@@ -95,7 +86,7 @@
|
|
|
95
86
|
{#if footer}
|
|
96
87
|
<div
|
|
97
88
|
class={[
|
|
98
|
-
'border-
|
|
89
|
+
'border-border border-t',
|
|
99
90
|
chrome ? 'bg-surface/40' : 'bg-surface-overlay/60',
|
|
100
91
|
paddingClasses[padding]
|
|
101
92
|
]}
|
|
@@ -12,35 +12,54 @@
|
|
|
12
12
|
interface FeatureListProps {
|
|
13
13
|
title?: string;
|
|
14
14
|
items?: FeatureListItem[];
|
|
15
|
+
/** Brand tint (default) or gray circles */
|
|
16
|
+
iconTone?: 'brand' | 'neutral';
|
|
15
17
|
class?: string;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
const {
|
|
20
|
+
const {
|
|
21
|
+
title,
|
|
22
|
+
items = [],
|
|
23
|
+
iconTone = 'brand',
|
|
24
|
+
class: className = ''
|
|
25
|
+
}: FeatureListProps = $props();
|
|
19
26
|
|
|
20
27
|
const icons: Record<NonNullable<FeatureListItem['icon']>, string> = {
|
|
21
28
|
check: 'M5 13l4 4L19 7',
|
|
22
29
|
bolt: 'M13 2L3 14h7l-1 8 10-12h-7l1-8z',
|
|
23
30
|
shield: 'M12 3l8 4v5c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V7l8-4z',
|
|
24
|
-
spark:
|
|
31
|
+
spark:
|
|
32
|
+
'M12 3v3m0 12v3M3 12h3m12 0h3M5.6 5.6l2.1 2.1m8.6 8.6l2.1 2.1M18.4 5.6l-2.1 2.1M7.7 16.3l-2.1 2.1'
|
|
25
33
|
};
|
|
26
34
|
</script>
|
|
27
35
|
|
|
28
|
-
<div class={['
|
|
36
|
+
<div class={['space-y-3 w-full', className]}>
|
|
29
37
|
{#if title}
|
|
30
38
|
<Heading level={3} size="md">{title}</Heading>
|
|
31
39
|
{/if}
|
|
32
40
|
<Stack gap="md">
|
|
33
41
|
{#each items as item (item.id)}
|
|
34
|
-
<div class=
|
|
42
|
+
<div class={['gap-3 flex', item.description ? 'items-start' : 'items-center']}>
|
|
35
43
|
<span
|
|
36
|
-
class=
|
|
44
|
+
class={[
|
|
45
|
+
'h-9 w-9 rounded-xl flex shrink-0 items-center justify-center',
|
|
46
|
+
iconTone === 'neutral'
|
|
47
|
+
? 'bg-surface-overlay text-secondary'
|
|
48
|
+
: 'bg-brand-50 text-brand-600 dark:bg-brand-950/50 dark:text-brand-400'
|
|
49
|
+
]}
|
|
37
50
|
aria-hidden="true"
|
|
38
51
|
>
|
|
39
|
-
<svg
|
|
52
|
+
<svg
|
|
53
|
+
class="h-4 w-4"
|
|
54
|
+
viewBox="0 0 24 24"
|
|
55
|
+
fill="none"
|
|
56
|
+
stroke="currentColor"
|
|
57
|
+
stroke-width="2"
|
|
58
|
+
>
|
|
40
59
|
<path stroke-linecap="round" stroke-linejoin="round" d={icons[item.icon ?? 'check']} />
|
|
41
60
|
</svg>
|
|
42
61
|
</span>
|
|
43
|
-
<div class=
|
|
62
|
+
<div class={item.description ? 'min-w-0' : 'min-h-9 min-w-0 flex flex-col justify-center'}>
|
|
44
63
|
<p class="text-sm font-medium text-primary">{item.title}</p>
|
|
45
64
|
{#if item.description}
|
|
46
65
|
<p class="mt-0.5 text-xs leading-relaxed text-muted">{item.description}</p>
|
|
@@ -7,6 +7,8 @@ export interface FeatureListItem {
|
|
|
7
7
|
interface FeatureListProps {
|
|
8
8
|
title?: string;
|
|
9
9
|
items?: FeatureListItem[];
|
|
10
|
+
/** Brand tint (default) or gray circles */
|
|
11
|
+
iconTone?: 'brand' | 'neutral';
|
|
10
12
|
class?: string;
|
|
11
13
|
}
|
|
12
14
|
declare const FeatureList: import("svelte").Component<FeatureListProps, {}, "">;
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
required?: boolean;
|
|
25
25
|
searchable?: boolean;
|
|
26
26
|
size?: 'sm' | 'md' | 'lg';
|
|
27
|
+
/** Min width (px) of the open listbox — see Select `listboxMinWidth`. */
|
|
28
|
+
listboxMinWidth?: number;
|
|
27
29
|
/** Sync with `form.data[name]` when inside `<Form>`. */
|
|
28
30
|
bindData?: boolean;
|
|
29
31
|
class?: string;
|
|
@@ -44,6 +46,7 @@
|
|
|
44
46
|
required = false,
|
|
45
47
|
searchable = false,
|
|
46
48
|
size = 'md',
|
|
49
|
+
listboxMinWidth,
|
|
47
50
|
bindData = false,
|
|
48
51
|
class: className = '',
|
|
49
52
|
onchange
|
|
@@ -100,6 +103,7 @@
|
|
|
100
103
|
{required}
|
|
101
104
|
{searchable}
|
|
102
105
|
{size}
|
|
106
|
+
{listboxMinWidth}
|
|
103
107
|
status={resolved.status}
|
|
104
108
|
helperText={resolved.helperText}
|
|
105
109
|
bind:value
|
|
@@ -13,6 +13,8 @@ interface FormSelectProps {
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
searchable?: boolean;
|
|
15
15
|
size?: 'sm' | 'md' | 'lg';
|
|
16
|
+
/** Min width (px) of the open listbox — see Select `listboxMinWidth`. */
|
|
17
|
+
listboxMinWidth?: number;
|
|
16
18
|
/** Sync with `form.data[name]` when inside `<Form>`. */
|
|
17
19
|
bindData?: boolean;
|
|
18
20
|
class?: string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import KnowledgeCardStory from './KnowledgeCardStory.svelte';
|
|
2
|
+
const meta = {
|
|
3
|
+
title: 'Molecules/KnowledgeCard',
|
|
4
|
+
component: KnowledgeCardStory,
|
|
5
|
+
tags: ['autodocs'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
example: {
|
|
8
|
+
control: 'select',
|
|
9
|
+
options: ['basic', 'with-cover', 'with-actions', 'minimal']
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export const Default = {
|
|
15
|
+
args: { example: 'basic' }
|
|
16
|
+
};
|
|
17
|
+
export const WithCover = {
|
|
18
|
+
args: { example: 'with-cover' }
|
|
19
|
+
};
|
|
20
|
+
export const WithActions = {
|
|
21
|
+
args: { example: 'with-actions' }
|
|
22
|
+
};
|
|
23
|
+
export const Minimal = {
|
|
24
|
+
args: { example: 'minimal' }
|
|
25
|
+
};
|