negodesign 0.0.35 → 0.0.37
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/core/card/product/01/CardProduct01.svelte +130 -0
- package/dist/components/core/card/product/01/CardProduct01.svelte.d.ts +4 -0
- package/dist/components/core/card/product/02/CardProduct02.svelte +118 -0
- package/dist/components/core/card/product/02/CardProduct02.svelte.d.ts +4 -0
- package/dist/components/core/card/product/CardProduct.svelte +22 -0
- package/dist/components/core/card/product/CardProduct.svelte.d.ts +11 -0
- package/dist/components/core/card/product/data.d.ts +3 -0
- package/dist/components/core/card/product/data.js +89 -0
- package/dist/components/core/card/profile/01/CardProfile01.svelte +0 -1
- package/dist/components/core/card/promotion/CardPromotion.svelte +1 -1
- package/dist/components/core/card/promotion/CardPromotionPrice.svelte.d.ts +8 -0
- package/dist/components/core/card/shared/CardPhoneOrWhatsapp.svelte +12 -5
- package/dist/components/core/card/shared/CardTags.svelte +49 -24
- package/dist/components/core/card/shared/CardTitlePrice.svelte +24 -0
- package/dist/components/core/card/shared/CardTitlePrice.svelte.d.ts +15 -0
- package/dist/components/core/card/shared/TruncatableText.svelte +1 -1
- package/dist/components/core/card/types.d.ts +48 -0
- package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +38 -28
- package/dist/components/core/carousel/grid/product/types.d.ts +22 -0
- package/dist/components/core/carousel/grid/product/types.js +1 -0
- package/dist/components/core/carousel/grid/product/ui/CarouselGridProduct.svelte +71 -0
- package/dist/components/core/carousel/grid/product/ui/CarouselGridProduct.svelte.d.ts +4 -0
- package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +56 -46
- package/dist/components/core/carousel/grid/promotion/types.d.ts +23 -0
- package/dist/components/core/carousel/grid/promotion/types.js +1 -0
- package/dist/components/core/carousel/grid/promotion/ui/CarouselGridPromotion.svelte +68 -0
- package/dist/components/core/carousel/grid/promotion/ui/CarouselGridPromotion.svelte.d.ts +4 -0
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +57 -47
- package/dist/components/core/carousel/product/types.d.ts +21 -0
- package/dist/components/core/carousel/product/types.js +1 -0
- package/dist/components/core/carousel/product/ui/CarouselProduct.svelte +57 -0
- package/dist/components/core/carousel/product/ui/CarouselProduct.svelte.d.ts +4 -0
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +57 -47
- package/dist/components/core/panel/NotFoundEmpty.svelte +76 -0
- package/dist/components/core/panel/NotFoundEmpty.svelte.d.ts +16 -0
- package/dist/components/pages/company-profile/CompanyProfile.svelte +144 -0
- package/dist/components/pages/company-profile/CompanyProfile.svelte.d.ts +4 -0
- package/dist/components/pages/company-profile/data.d.ts +2 -0
- package/dist/components/pages/company-profile/data.js +115 -0
- package/dist/components/pages/company-profile/shared/ProfileAboutCompany.svelte +79 -0
- package/dist/components/pages/company-profile/shared/ProfileAboutCompany.svelte.d.ts +9 -0
- package/dist/components/pages/company-profile/shared/ProfileBanner.svelte +270 -0
- package/dist/components/pages/company-profile/shared/ProfileBanner.svelte.d.ts +14 -0
- package/dist/components/pages/company-profile/shared/ProfileGallery.svelte +198 -0
- package/dist/components/pages/company-profile/shared/ProfileGallery.svelte.d.ts +9 -0
- package/dist/components/pages/company-profile/shared/ProfileMenuBadge.svelte +56 -0
- package/dist/components/pages/company-profile/shared/ProfileMenuBadge.svelte.d.ts +11 -0
- package/dist/components/pages/company-profile/shared/ProfileProducts.svelte +62 -0
- package/dist/components/pages/company-profile/shared/ProfileProducts.svelte.d.ts +9 -0
- package/dist/components/pages/company-profile/shared/ProfileSidebar.svelte +57 -0
- package/dist/components/pages/company-profile/shared/ProfileSidebar.svelte.d.ts +11 -0
- package/dist/components/pages/company-profile/types.d.ts +137 -0
- package/dist/components/pages/company-profile/types.js +1 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/data.d.ts +3 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/data.js +179 -0
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/DocSectionView.svelte +2 -1
- package/dist/components/pages/privacy-policy-or-terms-of-use/shared/DocSectionView.svelte.d.ts +1 -0
- package/dist/components/pages/product-details/01/ProductDetails01.svelte +19 -7
- package/dist/components/pages/product-details/02/ProductDetails02.svelte +42 -37
- package/dist/components/pages/product-details/03/ProductDetails03.svelte +33 -29
- package/dist/components/pages/product-details/ProductDetails.svelte +11 -7
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte +11 -5
- package/dist/components/pages/product-details/shared/ProductDetailFeatures.svelte.d.ts +2 -1
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte +52 -20
- package/dist/components/pages/product-details/shared/ProductDetailFilesVertical.svelte.d.ts +1 -1
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte +51 -20
- package/dist/components/pages/product-details/shared/ProductDetailImage.svelte.d.ts +1 -1
- package/dist/components/pages/product-details/shared/ProductDetailPrice.svelte +1 -1
- package/dist/components/pages/product-details/types.d.ts +9 -2
- package/dist/components/pages/profile-user/types.d.ts +7 -0
- package/dist/components/ui/empty/empty-content.svelte +23 -0
- package/dist/components/ui/empty/empty-content.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-description.svelte +23 -0
- package/dist/components/ui/empty/empty-description.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-header.svelte +20 -0
- package/dist/components/ui/empty/empty-header.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty-media.svelte +41 -0
- package/dist/components/ui/empty/empty-media.svelte.d.ts +26 -0
- package/dist/components/ui/empty/empty-title.svelte +20 -0
- package/dist/components/ui/empty/empty-title.svelte.d.ts +5 -0
- package/dist/components/ui/empty/empty.svelte +23 -0
- package/dist/components/ui/empty/empty.svelte.d.ts +5 -0
- package/dist/components/ui/empty/index.d.ts +7 -0
- package/dist/components/ui/empty/index.js +9 -0
- package/dist/globals.css +301 -5
- package/dist/i18n/langs/en.d.ts +25 -0
- package/dist/i18n/langs/en.js +25 -0
- package/dist/i18n/langs/pt.d.ts +25 -0
- package/dist/i18n/langs/pt.js +25 -0
- package/dist/i18n/translations.d.ts +50 -0
- package/package.json +1 -1
- package/dist/components/core/card/shared/CardStartPrice.svelte.d.ts +0 -8
- package/dist/components/pages/product-details/04/ProductDetails04.svelte +0 -65
- package/dist/components/pages/product-details/04/ProductDetails04.svelte.d.ts +0 -11
- /package/dist/components/core/card/{shared/CardStartPrice.svelte → promotion/CardPromotionPrice.svelte} +0 -0
|
@@ -12,12 +12,13 @@
|
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
14
|
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
15
|
+
import type { ProductDetailsFeatureProps } from "../types";
|
|
15
16
|
|
|
16
17
|
let {
|
|
17
18
|
features,
|
|
18
19
|
isLoading = false,
|
|
19
20
|
}: {
|
|
20
|
-
features: string[];
|
|
21
|
+
features: string[] | ProductDetailsFeatureProps[];
|
|
21
22
|
isLoading?: boolean;
|
|
22
23
|
} = $props();
|
|
23
24
|
</script>
|
|
@@ -29,10 +30,15 @@
|
|
|
29
30
|
{/each}
|
|
30
31
|
</div>
|
|
31
32
|
{:else}
|
|
32
|
-
<ul class="flex flex-
|
|
33
|
-
{#each features as feature, i (
|
|
34
|
-
<li
|
|
35
|
-
|
|
33
|
+
<ul class="flex flex-wrap gap-2 md:gap-5">
|
|
34
|
+
{#each features as feature, i (i)}
|
|
35
|
+
<li
|
|
36
|
+
class="flex items-start gap-2 text-sm text-foreground/90 border rounded-lg p-2"
|
|
37
|
+
>
|
|
38
|
+
<span
|
|
39
|
+
aria-hidden="true"
|
|
40
|
+
class="mt-1.5 size-1.5 shrink-0 rounded-full bg-gradient"
|
|
41
|
+
></span>
|
|
36
42
|
<span>{feature}</span>
|
|
37
43
|
</li>
|
|
38
44
|
{/each}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { ProductDetailsFeatureProps } from "../types";
|
|
1
2
|
type $$ComponentProps = {
|
|
2
|
-
features: string[];
|
|
3
|
+
features: string[] | ProductDetailsFeatureProps[];
|
|
3
4
|
isLoading?: boolean;
|
|
4
5
|
};
|
|
5
6
|
declare const ProductDetailFeatures: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
/**
|
|
3
|
-
* Lista vertical de ficheiros/thumbnails do produto com seleção de imagem.
|
|
3
|
+
* Lista vertical de ficheiros/thumbnails do produto com seleção de imagem/vídeo.
|
|
4
4
|
* Quando `isLoading` é true, exibe Skeletons.
|
|
5
|
+
* Se houver um item do tipo "video", ele é priorizado (aparece primeiro).
|
|
5
6
|
* @component
|
|
6
7
|
* @example
|
|
7
8
|
* ```svelte
|
|
8
|
-
* <ProductDetailFilesVertical
|
|
9
|
+
* <ProductDetailFilesVertical files={data.gallery} />
|
|
9
10
|
* ```
|
|
10
11
|
*/
|
|
11
12
|
</script>
|
|
@@ -15,57 +16,88 @@
|
|
|
15
16
|
import type { ProductDetailsImage } from "../types";
|
|
16
17
|
|
|
17
18
|
let {
|
|
18
|
-
|
|
19
|
+
files,
|
|
19
20
|
className,
|
|
20
21
|
isLoading = false,
|
|
21
22
|
}: {
|
|
22
|
-
|
|
23
|
+
files: ProductDetailsImage[];
|
|
23
24
|
className?: string;
|
|
24
25
|
isLoading?: boolean;
|
|
25
26
|
} = $props();
|
|
26
27
|
|
|
28
|
+
// Vídeo primeiro, mantendo a ordem relativa do resto
|
|
29
|
+
const sortedFiles = $derived(
|
|
30
|
+
[...(files ?? [])].sort(
|
|
31
|
+
(a, b) => (a.type === "video" ? 0 : 1) - (b.type === "video" ? 0 : 1),
|
|
32
|
+
),
|
|
33
|
+
);
|
|
34
|
+
|
|
27
35
|
let activeIndex = $state(0);
|
|
28
|
-
const active = $derived(
|
|
36
|
+
const active = $derived(sortedFiles[activeIndex]);
|
|
29
37
|
</script>
|
|
30
38
|
|
|
39
|
+
{#snippet media(file: ProductDetailsImage, cls: string)}
|
|
40
|
+
{#if file.type === "video"}
|
|
41
|
+
<!-- svelte-ignore a11y_media_has_caption -->
|
|
42
|
+
<video src={file.src} class={cls} muted playsinline></video>
|
|
43
|
+
{:else}
|
|
44
|
+
<img src={file.src} alt={file.alt ?? ""} class={cls} />
|
|
45
|
+
{/if}
|
|
46
|
+
{/snippet}
|
|
47
|
+
|
|
31
48
|
<div class="flex flex-col gap-3 {className}">
|
|
32
49
|
{#if isLoading}
|
|
33
50
|
<div class="flex gap-3">
|
|
34
51
|
<div class="flex shrink-0 flex-col gap-2">
|
|
35
|
-
{#each Array.from({ length: Math.min(
|
|
52
|
+
{#each Array.from( { length: Math.min(files.length || 3, 4) }, ) as _, i (i)}
|
|
36
53
|
<Skeleton class="h-16 w-16 rounded-md" />
|
|
37
54
|
{/each}
|
|
38
55
|
</div>
|
|
39
56
|
<Skeleton class="aspect-4/3 min-w-0 flex-1 rounded-lg" />
|
|
40
57
|
</div>
|
|
41
|
-
{:else if
|
|
58
|
+
{:else if sortedFiles.length > 0}
|
|
42
59
|
<div class="flex gap-3">
|
|
43
60
|
<div class="flex shrink-0 flex-col gap-2">
|
|
44
|
-
{#each
|
|
61
|
+
{#each sortedFiles as file, i (file.src)}
|
|
45
62
|
<button
|
|
46
63
|
type="button"
|
|
47
|
-
aria-label={
|
|
64
|
+
aria-label={file.alt ?? `Item ${i + 1}`}
|
|
48
65
|
onclick={() => (activeIndex = i)}
|
|
49
|
-
class="overflow-hidden rounded-md border transition-opacity {i ===
|
|
66
|
+
class="relative overflow-hidden rounded-md border transition-opacity {i ===
|
|
50
67
|
activeIndex
|
|
51
68
|
? 'border-foreground opacity-100'
|
|
52
69
|
: 'border-muted opacity-60 hover:opacity-100'}"
|
|
53
70
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
71
|
+
{@render media(file, "h-16 w-16 object-cover")}
|
|
72
|
+
{#if file.type === "video"}
|
|
73
|
+
<span
|
|
74
|
+
class="absolute inset-0 flex items-center justify-center bg-black/30"
|
|
75
|
+
>
|
|
76
|
+
<svg
|
|
77
|
+
viewBox="0 0 24 24"
|
|
78
|
+
class="h-4 w-4 fill-white"
|
|
79
|
+
aria-hidden="true"
|
|
80
|
+
>
|
|
81
|
+
<path d="M8 5v14l11-7z" />
|
|
82
|
+
</svg>
|
|
83
|
+
</span>
|
|
84
|
+
{/if}
|
|
59
85
|
</button>
|
|
60
86
|
{/each}
|
|
61
87
|
</div>
|
|
62
88
|
|
|
63
89
|
<div class="min-w-0 flex-1 overflow-hidden rounded-lg border">
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
90
|
+
{#if active.type === "video"}
|
|
91
|
+
<!-- svelte-ignore a11y_media_has_caption -->
|
|
92
|
+
<video
|
|
93
|
+
src={active.src}
|
|
94
|
+
class="aspect-4/3 w-full object-cover"
|
|
95
|
+
controls
|
|
96
|
+
playsinline
|
|
97
|
+
></video>
|
|
98
|
+
{:else}
|
|
99
|
+
{@render media(active, "aspect-4/3 w-full object-cover")}
|
|
100
|
+
{/if}
|
|
69
101
|
</div>
|
|
70
102
|
</div>
|
|
71
103
|
{/if}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
/**
|
|
3
|
-
* Galeria de imagens do produto com miniatura selecionável.
|
|
3
|
+
* Galeria de imagens/vídeo do produto com miniatura selecionável.
|
|
4
4
|
* Quando `isLoading` é true, exibe Skeletons.
|
|
5
|
+
* Se houver um item do tipo "video", ele é priorizado (aparece primeiro).
|
|
5
6
|
* @component
|
|
6
7
|
* @example
|
|
7
8
|
* ```svelte
|
|
8
|
-
* <ProductDetailImage
|
|
9
|
+
* <ProductDetailImage files={data.gallery} className="md:col-span-2" />
|
|
9
10
|
* ```
|
|
10
11
|
*/
|
|
11
12
|
</script>
|
|
@@ -15,53 +16,83 @@
|
|
|
15
16
|
import type { ProductDetailsImage } from "../types";
|
|
16
17
|
|
|
17
18
|
let {
|
|
18
|
-
|
|
19
|
+
files,
|
|
19
20
|
className,
|
|
20
21
|
isLoading = false,
|
|
21
22
|
}: {
|
|
22
|
-
|
|
23
|
+
files: ProductDetailsImage[];
|
|
23
24
|
className?: string;
|
|
24
25
|
isLoading?: boolean;
|
|
25
26
|
} = $props();
|
|
26
27
|
|
|
28
|
+
// Vídeo primeiro, mantendo a ordem relativa do resto
|
|
29
|
+
const sortedFiles = $derived(
|
|
30
|
+
[...(files ?? [])].sort(
|
|
31
|
+
(a, b) => (a.type === "video" ? 0 : 1) - (b.type === "video" ? 0 : 1),
|
|
32
|
+
),
|
|
33
|
+
);
|
|
34
|
+
|
|
27
35
|
let activeIndex = $state(0);
|
|
28
|
-
const active = $derived(
|
|
36
|
+
const active = $derived(sortedFiles[activeIndex]);
|
|
29
37
|
</script>
|
|
30
38
|
|
|
39
|
+
{#snippet media(file: ProductDetailsImage, cls: string)}
|
|
40
|
+
{#if file.type === "video"}
|
|
41
|
+
<video src={file.src} class={cls} muted playsinline></video>
|
|
42
|
+
{:else}
|
|
43
|
+
<img src={file.src} alt={file.alt ?? ""} class={cls} />
|
|
44
|
+
{/if}
|
|
45
|
+
{/snippet}
|
|
46
|
+
|
|
31
47
|
<div class="flex flex-col gap-3 {className}">
|
|
32
48
|
{#if isLoading}
|
|
33
49
|
<Skeleton class="aspect-4/3 w-full rounded-lg" />
|
|
34
50
|
<div class="flex gap-2">
|
|
35
|
-
{#each Array.from({ length: Math.min(
|
|
51
|
+
{#each Array.from({ length: Math.min(files.length || 3, 4) }) as _, i (i)}
|
|
36
52
|
<Skeleton class="h-16 w-16 rounded-md md:h-20 md:w-20" />
|
|
37
53
|
{/each}
|
|
38
54
|
</div>
|
|
39
55
|
{:else if active}
|
|
40
56
|
<div class="overflow-hidden rounded-lg border">
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
57
|
+
{#if active.type === "video"}
|
|
58
|
+
<!-- svelte-ignore a11y_media_has_caption -->
|
|
59
|
+
<video
|
|
60
|
+
src={active.src}
|
|
61
|
+
class="aspect-4/3 w-full object-cover"
|
|
62
|
+
controls
|
|
63
|
+
playsinline
|
|
64
|
+
></video>
|
|
65
|
+
{:else}
|
|
66
|
+
{@render media(active, "aspect-4/3 w-full object-cover")}
|
|
67
|
+
{/if}
|
|
46
68
|
</div>
|
|
47
69
|
|
|
48
|
-
{#if
|
|
70
|
+
{#if sortedFiles.length > 1}
|
|
49
71
|
<div class="flex gap-2 overflow-x-auto no-scrollbar">
|
|
50
|
-
{#each
|
|
72
|
+
{#each sortedFiles as file, i (file.src)}
|
|
51
73
|
<button
|
|
52
74
|
type="button"
|
|
53
|
-
aria-label={
|
|
75
|
+
aria-label={file.alt ?? `Item ${i + 1}`}
|
|
54
76
|
onclick={() => (activeIndex = i)}
|
|
55
|
-
class="shrink-0 overflow-hidden rounded-md border transition-opacity {i ===
|
|
77
|
+
class="relative shrink-0 overflow-hidden rounded-md border transition-opacity {i ===
|
|
56
78
|
activeIndex
|
|
57
79
|
? 'border-foreground opacity-100'
|
|
58
80
|
: 'border-muted opacity-60 hover:opacity-100'}"
|
|
59
81
|
>
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
82
|
+
{@render media(file, "h-16 w-16 object-cover md:h-20 md:w-20")}
|
|
83
|
+
{#if file.type === "video"}
|
|
84
|
+
<span
|
|
85
|
+
class="absolute inset-0 flex items-center justify-center bg-black/30"
|
|
86
|
+
>
|
|
87
|
+
<svg
|
|
88
|
+
viewBox="0 0 24 24"
|
|
89
|
+
class="h-5 w-5 fill-white"
|
|
90
|
+
aria-hidden="true"
|
|
91
|
+
>
|
|
92
|
+
<path d="M8 5v14l11-7z" />
|
|
93
|
+
</svg>
|
|
94
|
+
</span>
|
|
95
|
+
{/if}
|
|
65
96
|
</button>
|
|
66
97
|
{/each}
|
|
67
98
|
</div>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</script>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import CardStartPrice from "../../../core/card/
|
|
14
|
+
import CardStartPrice from "../../../core/card/promotion/CardPromotionPrice.svelte";
|
|
15
15
|
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
16
16
|
|
|
17
17
|
let {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { IconSvgElement } from "@hugeicons/svelte";
|
|
2
|
+
export interface ProductDetailsFeatureProps {
|
|
3
|
+
icon?: IconSvgElement | string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* Item individual do breadcrumb de navegação.
|
|
4
8
|
* Representa um nível hierárquico na navegação da página
|
|
@@ -29,6 +33,7 @@ export interface ProductDetailsImage {
|
|
|
29
33
|
src: string;
|
|
30
34
|
/** Texto alternativo para acessibilidade (recomendado). */
|
|
31
35
|
alt?: string;
|
|
36
|
+
type?: "image" | "video";
|
|
32
37
|
}
|
|
33
38
|
/**
|
|
34
39
|
* Informações de localização do produto.
|
|
@@ -45,6 +50,8 @@ export interface ProductDetailsLocation {
|
|
|
45
50
|
* Se não for fornecido, usa um mapa padrão.
|
|
46
51
|
*/
|
|
47
52
|
mapUrl?: string;
|
|
53
|
+
latitude?: number;
|
|
54
|
+
longitude?: number;
|
|
48
55
|
}
|
|
49
56
|
/**
|
|
50
57
|
* Avaliação de um cliente sobre o produto.
|
|
@@ -117,7 +124,7 @@ export interface ProductDetailsData {
|
|
|
117
124
|
/** Quantidade disponível em stock. */
|
|
118
125
|
quantityAvailable?: number;
|
|
119
126
|
/** Lista de características/features do produto (strings). */
|
|
120
|
-
features?: string[];
|
|
127
|
+
features?: string[] | ProductDetailsFeatureProps[];
|
|
121
128
|
/**
|
|
122
129
|
* Abas de conteúdo personalizadas.
|
|
123
130
|
* Se não for fornecido, usa padrão: Descrição + Avaliações.
|
|
@@ -143,7 +150,7 @@ export interface ProductDetailsProps {
|
|
|
143
150
|
* - 4: Abas de conteúdo (descrição e avaliações) abaixo da info
|
|
144
151
|
* @default 1
|
|
145
152
|
*/
|
|
146
|
-
varient?: 1 | 2 | 3
|
|
153
|
+
varient?: 1 | 2 | 3;
|
|
147
154
|
/** Dados completos do produto a serem exibidos. */
|
|
148
155
|
data: ProductDetailsData;
|
|
149
156
|
/**
|
|
@@ -136,6 +136,13 @@ export interface ProfileUserProps {
|
|
|
136
136
|
id: string;
|
|
137
137
|
label: string;
|
|
138
138
|
}[];
|
|
139
|
+
onLoginAsUser?: (id: string | number) => void;
|
|
140
|
+
onAddAddress?: () => void;
|
|
141
|
+
onChangePassword?: (payload: {
|
|
142
|
+
currentPassword: string;
|
|
143
|
+
newPassword: string;
|
|
144
|
+
confirmPassword: string;
|
|
145
|
+
}) => void;
|
|
139
146
|
userHeader?: ProfileUserHeaderProps;
|
|
140
147
|
userAddress?: ProfileUserAddressProps;
|
|
141
148
|
userResetPassword?: ProfileUserResetPasswordProps;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="empty-content"
|
|
16
|
+
class={cn(
|
|
17
|
+
"gap-4 text-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const EmptyContent: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type EmptyContent = ReturnType<typeof EmptyContent>;
|
|
5
|
+
export default EmptyContent;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="empty-description"
|
|
16
|
+
class={cn(
|
|
17
|
+
"text-sm/relaxed text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const EmptyDescription: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type EmptyDescription = ReturnType<typeof EmptyDescription>;
|
|
5
|
+
export default EmptyDescription;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="empty-header"
|
|
16
|
+
class={cn("gap-2 flex max-w-sm flex-col items-center", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const EmptyHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type EmptyHeader = ReturnType<typeof EmptyHeader>;
|
|
5
|
+
export default EmptyHeader;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script lang="ts" module>
|
|
2
|
+
import { tv, type VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
export const emptyMediaVariants = tv({
|
|
5
|
+
base: "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "bg-transparent",
|
|
9
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
variant: "default",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export type EmptyMediaVariant = VariantProps<typeof emptyMediaVariants>["variant"];
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
22
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
ref = $bindable(null),
|
|
26
|
+
class: className,
|
|
27
|
+
children,
|
|
28
|
+
variant = "default",
|
|
29
|
+
...restProps
|
|
30
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> & { variant?: EmptyMediaVariant } = $props();
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div
|
|
34
|
+
bind:this={ref}
|
|
35
|
+
data-slot="empty-icon"
|
|
36
|
+
data-variant={variant}
|
|
37
|
+
class={cn(emptyMediaVariants({ variant }), className)}
|
|
38
|
+
{...restProps}
|
|
39
|
+
>
|
|
40
|
+
{@render children?.()}
|
|
41
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type VariantProps } from "tailwind-variants";
|
|
2
|
+
export declare const emptyMediaVariants: import("tailwind-variants").TVReturnType<{
|
|
3
|
+
variant: {
|
|
4
|
+
default: "bg-transparent";
|
|
5
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6";
|
|
6
|
+
};
|
|
7
|
+
}, undefined, "mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-transparent";
|
|
10
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6";
|
|
11
|
+
};
|
|
12
|
+
}, undefined, import("tailwind-variants").TVReturnTypeLike<{
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-transparent";
|
|
15
|
+
icon: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-6";
|
|
16
|
+
};
|
|
17
|
+
}, undefined>>;
|
|
18
|
+
export type EmptyMediaVariant = VariantProps<typeof emptyMediaVariants>["variant"];
|
|
19
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
20
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
21
|
+
type $$ComponentProps = WithElementRef<HTMLAttributes<HTMLDivElement>> & {
|
|
22
|
+
variant?: EmptyMediaVariant;
|
|
23
|
+
};
|
|
24
|
+
declare const EmptyMedia: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
25
|
+
type EmptyMedia = ReturnType<typeof EmptyMedia>;
|
|
26
|
+
export default EmptyMedia;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="empty-title"
|
|
16
|
+
class={cn("text-lg font-medium tracking-tight", className)}
|
|
17
|
+
{...restProps}
|
|
18
|
+
>
|
|
19
|
+
{@render children?.()}
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const EmptyTitle: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type EmptyTitle = ReturnType<typeof EmptyTitle>;
|
|
5
|
+
export default EmptyTitle;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn, type WithElementRef } from "../../../utils.js";
|
|
3
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
children,
|
|
9
|
+
...restProps
|
|
10
|
+
}: WithElementRef<HTMLAttributes<HTMLDivElement>> = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div
|
|
14
|
+
bind:this={ref}
|
|
15
|
+
data-slot="empty"
|
|
16
|
+
class={cn(
|
|
17
|
+
"gap-4 rounded-lg border-dashed p-12 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const Empty: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLDivElement>>, {}, "ref">;
|
|
4
|
+
type Empty = ReturnType<typeof Empty>;
|
|
5
|
+
export default Empty;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Content from "./empty-content.svelte";
|
|
2
|
+
import Description from "./empty-description.svelte";
|
|
3
|
+
import Header from "./empty-header.svelte";
|
|
4
|
+
import Media from "./empty-media.svelte";
|
|
5
|
+
import Title from "./empty-title.svelte";
|
|
6
|
+
import Root from "./empty.svelte";
|
|
7
|
+
export { Root, Header, Media, Title, Description, Content, Root as Empty, Header as EmptyHeader, Media as EmptyMedia, Title as EmptyTitle, Description as EmptyDescription, Content as EmptyContent, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Content from "./empty-content.svelte";
|
|
2
|
+
import Description from "./empty-description.svelte";
|
|
3
|
+
import Header from "./empty-header.svelte";
|
|
4
|
+
import Media from "./empty-media.svelte";
|
|
5
|
+
import Title from "./empty-title.svelte";
|
|
6
|
+
import Root from "./empty.svelte";
|
|
7
|
+
export { Root, Header, Media, Title, Description, Content,
|
|
8
|
+
//
|
|
9
|
+
Root as Empty, Header as EmptyHeader, Media as EmptyMedia, Title as EmptyTitle, Description as EmptyDescription, Content as EmptyContent, };
|