negodesign 0.0.24 → 0.0.25
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/breadcrumb/breadcrumb-list.svelte +31 -31
- package/dist/components/core/button/ButtonBack.svelte +18 -18
- package/dist/components/core/button/ButtonLogin.svelte +15 -15
- package/dist/components/core/button/ButtonLoginWith.svelte +57 -57
- package/dist/components/core/button/ButtonSend.svelte +15 -15
- package/dist/components/core/card/highlight/CardHighlight.svelte +67 -44
- package/dist/components/core/card/media/01/CardMedia01.svelte +114 -114
- package/dist/components/core/card/media/02/CardMedia02.svelte +113 -113
- package/dist/components/core/card/media/CardMedia.svelte +17 -17
- package/dist/components/core/card/profile/01/CardProfile01.svelte +101 -101
- package/dist/components/core/card/profile/02/CardProfile02.svelte +97 -97
- package/dist/components/core/card/profile/CardProfile.svelte +17 -17
- package/dist/components/core/card/promotion/CardPromotion.svelte +102 -81
- package/dist/components/core/card/shared/CardButton.svelte +30 -30
- package/dist/components/core/card/shared/CardCart.svelte +36 -32
- package/dist/components/core/card/shared/CardCart.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardDescription.svelte +23 -23
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -29
- package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +1 -0
- package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
- package/dist/components/core/card/shared/CardTags.svelte +56 -56
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
- package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
- package/dist/components/core/card/types.d.ts +1 -0
- package/dist/components/core/carousel/{shared/ui/SimpleBadgeCarousel.svelte → badge/ui/CarouselBadge.svelte} +80 -80
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte.d.ts +4 -0
- package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
- package/dist/components/core/carousel/highlights/types.d.ts +9 -0
- package/dist/components/core/carousel/highlights/types.js +1 -0
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +41 -65
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte.d.ts +1 -1
- package/dist/components/core/carousel/promotion/types.d.ts +9 -0
- package/dist/components/core/carousel/promotion/types.js +1 -0
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +41 -65
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte.d.ts +1 -1
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +50 -0
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte.d.ts +4 -0
- package/dist/components/core/carousel/types.d.ts +11 -26
- package/dist/components/core/datatable/ui/DataTableActions.svelte +28 -28
- package/dist/components/core/datatable/ui/DataTableCheckbox.svelte +22 -22
- package/dist/components/core/datatable/ui/DataTableContent.svelte +59 -59
- package/dist/components/core/datatable/ui/DataTableCore.svelte +151 -151
- package/dist/components/core/datatable/ui/DataTableDragHandle.svelte +8 -8
- package/dist/components/core/datatable/ui/DataTableListFilter.svelte +59 -59
- package/dist/components/core/datatable/ui/DataTableListPagination.svelte +35 -35
- package/dist/components/core/form/ui/input-base.svelte +81 -81
- package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -23
- package/dist/components/core/form/ui/input-email.svelte +23 -23
- package/dist/components/core/form/ui/input-password-confirm.svelte +23 -23
- package/dist/components/core/form/ui/input-password.svelte +23 -23
- package/dist/components/core/form/ui/input-phone.svelte +33 -33
- package/dist/components/core/form/ui/input-username.svelte +22 -22
- package/dist/components/core/hero/SimpleHero.svelte +65 -65
- package/dist/components/core/label/LabelOr.svelte +25 -25
- package/dist/components/core/link/link-forget-password.svelte +12 -12
- package/dist/components/core/link/link-privacy-polity.svelte +12 -12
- package/dist/components/core/link/link-terms-of-service.svelte +12 -12
- package/dist/components/core/nav/ui/menu-links.svelte +27 -27
- package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -85
- package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte +33 -33
- package/dist/components/core/nav/ui/nav-menu-sidebar.svelte +97 -97
- package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte +103 -103
- package/dist/components/core/nav/ui/nav-menu.svelte +106 -106
- package/dist/components/core/panel/CarouselSlot.svelte +38 -38
- package/dist/components/core/panel/LeftHero.svelte +116 -116
- package/dist/components/core/search/SearchInput.svelte +32 -32
- package/dist/components/core/search/shared/SearchInputCore.svelte +66 -66
- package/dist/components/core/sidebar/MenuBarSidebar.svelte +70 -70
- package/dist/components/core/tabs/ui/tab-underline.svelte +43 -43
- package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
- package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
- package/dist/components/pages/security/login/01/ui/FormRegister.svelte +28 -28
- package/dist/components/pages/security/login/01/ui/LoginCard.svelte +107 -107
- package/dist/components/pages/security/login/PageLogin.svelte +22 -22
- package/dist/components/ui/badge/badge.svelte +49 -49
- package/dist/components/ui/button/button.svelte +82 -82
- package/dist/components/ui/chart/chart-container.svelte +80 -80
- package/dist/components/ui/chart/chart-style.svelte +37 -37
- package/dist/components/ui/chart/chart-tooltip.svelte +184 -184
- package/dist/components/ui/checkbox/checkbox.svelte +40 -40
- package/dist/components/ui/data-table/flex-render.svelte +40 -40
- package/dist/components/ui/drawer/drawer-close.svelte +7 -7
- package/dist/components/ui/drawer/drawer-content.svelte +33 -33
- package/dist/components/ui/drawer/drawer-description.svelte +17 -17
- package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
- package/dist/components/ui/drawer/drawer-header.svelte +20 -20
- package/dist/components/ui/drawer/drawer-nested.svelte +12 -12
- package/dist/components/ui/drawer/drawer-overlay.svelte +17 -17
- package/dist/components/ui/drawer/drawer-portal.svelte +7 -7
- package/dist/components/ui/drawer/drawer-title.svelte +17 -17
- package/dist/components/ui/drawer/drawer-trigger.svelte +7 -7
- package/dist/components/ui/drawer/drawer.svelte +12 -12
- package/dist/components/ui/select/select-content.svelte +45 -45
- package/dist/components/ui/select/select-group-heading.svelte +21 -21
- package/dist/components/ui/select/select-group.svelte +17 -17
- package/dist/components/ui/select/select-item.svelte +41 -41
- package/dist/components/ui/select/select-label.svelte +20 -20
- package/dist/components/ui/select/select-portal.svelte +7 -7
- package/dist/components/ui/select/select-scroll-down-button.svelte +21 -21
- package/dist/components/ui/select/select-scroll-up-button.svelte +21 -21
- package/dist/components/ui/select/select-separator.svelte +18 -18
- package/dist/components/ui/select/select-trigger.svelte +30 -30
- package/dist/components/ui/select/select.svelte +11 -11
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
- package/dist/components/ui/star-rating/star-rating-star.svelte +41 -41
- package/dist/components/ui/star-rating/star-rating.svelte +20 -20
- package/dist/components/ui/table/table-body.svelte +15 -15
- package/dist/components/ui/table/table-caption.svelte +20 -20
- package/dist/components/ui/table/table-cell.svelte +15 -15
- package/dist/components/ui/table/table-footer.svelte +20 -20
- package/dist/components/ui/table/table-head.svelte +15 -15
- package/dist/components/ui/table/table-header.svelte +20 -20
- package/dist/components/ui/table/table-row.svelte +15 -15
- package/dist/components/ui/table/table.svelte +17 -17
- package/dist/components/ui/tabs/tabs-content.svelte +17 -17
- package/dist/components/ui/tabs/tabs-list.svelte +40 -40
- package/dist/components/ui/tabs/tabs-trigger.svelte +23 -23
- package/dist/components/ui/tabs/tabs.svelte +19 -19
- package/dist/globals.css +6 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/styles/globals.css +149 -149
- package/package.json +113 -113
- package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte.d.ts +0 -4
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as Breadcrumb from "../../ui/breadcrumb/index.js";
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
items: {
|
|
6
|
-
url?: string;
|
|
7
|
-
label: string;
|
|
8
|
-
}[];
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
let { items }: Props = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
<Breadcrumb.Root>
|
|
15
|
-
<Breadcrumb.List>
|
|
16
|
-
{#each items as item, i (item.label)}
|
|
17
|
-
{@const isLast = i === items.length - 1}
|
|
18
|
-
|
|
19
|
-
<Breadcrumb.Item class={isLast ? "" : "hidden md:block"}>
|
|
20
|
-
{#if isLast}
|
|
21
|
-
<Breadcrumb.Page>{item.label}</Breadcrumb.Page>
|
|
22
|
-
{:else}
|
|
23
|
-
<Breadcrumb.Link href={item.url ?? "##"}>{item.label}</Breadcrumb.Link>
|
|
24
|
-
{/if}
|
|
25
|
-
</Breadcrumb.Item>
|
|
26
|
-
|
|
27
|
-
{#if !isLast}
|
|
28
|
-
<Breadcrumb.Separator class="hidden md:block" />
|
|
29
|
-
{/if}
|
|
30
|
-
{/each}
|
|
31
|
-
</Breadcrumb.List>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as Breadcrumb from "../../ui/breadcrumb/index.js";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
items: {
|
|
6
|
+
url?: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let { items }: Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Breadcrumb.Root>
|
|
15
|
+
<Breadcrumb.List>
|
|
16
|
+
{#each items as item, i (item.label)}
|
|
17
|
+
{@const isLast = i === items.length - 1}
|
|
18
|
+
|
|
19
|
+
<Breadcrumb.Item class={isLast ? "" : "hidden md:block"}>
|
|
20
|
+
{#if isLast}
|
|
21
|
+
<Breadcrumb.Page>{item.label}</Breadcrumb.Page>
|
|
22
|
+
{:else}
|
|
23
|
+
<Breadcrumb.Link href={item.url ?? "##"}>{item.label}</Breadcrumb.Link>
|
|
24
|
+
{/if}
|
|
25
|
+
</Breadcrumb.Item>
|
|
26
|
+
|
|
27
|
+
{#if !isLast}
|
|
28
|
+
<Breadcrumb.Separator class="hidden md:block" />
|
|
29
|
+
{/if}
|
|
30
|
+
{/each}
|
|
31
|
+
</Breadcrumb.List>
|
|
32
32
|
</Breadcrumb.Root>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from "../../ui/button/button.svelte";
|
|
3
|
-
import { ArrowLeft01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
-
import { t } from "../../../i18n";
|
|
6
|
-
import type { ButtonProps } from "../../ui/button";
|
|
7
|
-
|
|
8
|
-
let { ...restProps }: ButtonProps = $props();
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<Button
|
|
12
|
-
variant="outline"
|
|
13
|
-
class="inline-flex items-center gap-1 text-sm text-slate-600 hover:text-slate-900 transition-colors rounded-full bg-input"
|
|
14
|
-
{...restProps}
|
|
15
|
-
>
|
|
16
|
-
<HugeiconsIcon icon={ArrowLeft01Icon} size={16} />
|
|
17
|
-
<span class="sr-only">{$t("label.back")}</span>
|
|
18
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from "../../ui/button/button.svelte";
|
|
3
|
+
import { ArrowLeft01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
5
|
+
import { t } from "../../../i18n";
|
|
6
|
+
import type { ButtonProps } from "../../ui/button";
|
|
7
|
+
|
|
8
|
+
let { ...restProps }: ButtonProps = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<Button
|
|
12
|
+
variant="outline"
|
|
13
|
+
class="inline-flex items-center gap-1 text-sm text-slate-600 hover:text-slate-900 transition-colors rounded-full bg-input"
|
|
14
|
+
{...restProps}
|
|
15
|
+
>
|
|
16
|
+
<HugeiconsIcon icon={ArrowLeft01Icon} size={16} />
|
|
17
|
+
<span class="sr-only">{$t("label.back")}</span>
|
|
18
|
+
</Button>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button, {
|
|
3
|
-
type ButtonProps,
|
|
4
|
-
} from "../../ui/button/button.svelte";
|
|
5
|
-
import { t } from "../../../i18n";
|
|
6
|
-
import { Login02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
8
|
-
|
|
9
|
-
let { ...restProps }: ButtonProps = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Button class="w-full flex items-center gap-2" {...restProps}>
|
|
13
|
-
<HugeiconsIcon icon={Login02Icon} size={16} />
|
|
14
|
-
{$t("label.login")}
|
|
15
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button, {
|
|
3
|
+
type ButtonProps,
|
|
4
|
+
} from "../../ui/button/button.svelte";
|
|
5
|
+
import { t } from "../../../i18n";
|
|
6
|
+
import { Login02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
8
|
+
|
|
9
|
+
let { ...restProps }: ButtonProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Button class="w-full flex items-center gap-2" {...restProps}>
|
|
13
|
+
<HugeiconsIcon icon={Login02Icon} size={16} />
|
|
14
|
+
{$t("label.login")}
|
|
15
|
+
</Button>
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button, {
|
|
3
|
-
type ButtonProps,
|
|
4
|
-
} from "../../ui/button/button.svelte";
|
|
5
|
-
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
6
|
-
import { t } from "../../../i18n";
|
|
7
|
-
import {
|
|
8
|
-
GoogleIcon,
|
|
9
|
-
Facebook01Icon as Facebook,
|
|
10
|
-
Linkedin01Icon as Linkedin,
|
|
11
|
-
} from "@hugeicons/core-free-icons";
|
|
12
|
-
import type { Snippet } from "svelte";
|
|
13
|
-
|
|
14
|
-
type IconDefault = "GOOGLE" | "FACEBOOK" | "LINKEDLN";
|
|
15
|
-
|
|
16
|
-
type Props = {
|
|
17
|
-
icon?: IconSvgElement | IconDefault | Snippet;
|
|
18
|
-
label?: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
let { icon, label, ...restProps }: Props & ButtonProps = $props();
|
|
22
|
-
|
|
23
|
-
const defaultIconMap: Record<IconDefault, IconSvgElement> = {
|
|
24
|
-
GOOGLE: GoogleIcon,
|
|
25
|
-
FACEBOOK: Facebook,
|
|
26
|
-
LINKEDLN: Linkedin,
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const defaultLabelMap: Record<IconDefault, string> = {
|
|
30
|
-
GOOGLE: "Google",
|
|
31
|
-
FACEBOOK: "Facebook",
|
|
32
|
-
LINKEDLN: "Linkedin",
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
function isIconDefault(value: unknown): value is IconDefault {
|
|
36
|
-
return typeof value === "string" && value in defaultLabelMap;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let resolvedIcon = $derived(
|
|
40
|
-
isIconDefault(icon) ? defaultIconMap[icon] : icon,
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
let resolvedLabel = $derived(
|
|
44
|
-
label ?? (isIconDefault(icon) ? defaultLabelMap[icon] : ""),
|
|
45
|
-
);
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<Button variant="outline" class="w-full flex items-center gap-2" {...restProps}>
|
|
49
|
-
{#if resolvedIcon}
|
|
50
|
-
{#if typeof resolvedIcon === "function"}
|
|
51
|
-
{@render resolvedIcon()}
|
|
52
|
-
{:else}
|
|
53
|
-
<HugeiconsIcon icon={resolvedIcon} size={16} />
|
|
54
|
-
{/if}
|
|
55
|
-
{/if}
|
|
56
|
-
{$t("label.login.with", { name: resolvedLabel })}
|
|
57
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button, {
|
|
3
|
+
type ButtonProps,
|
|
4
|
+
} from "../../ui/button/button.svelte";
|
|
5
|
+
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
6
|
+
import { t } from "../../../i18n";
|
|
7
|
+
import {
|
|
8
|
+
GoogleIcon,
|
|
9
|
+
Facebook01Icon as Facebook,
|
|
10
|
+
Linkedin01Icon as Linkedin,
|
|
11
|
+
} from "@hugeicons/core-free-icons";
|
|
12
|
+
import type { Snippet } from "svelte";
|
|
13
|
+
|
|
14
|
+
type IconDefault = "GOOGLE" | "FACEBOOK" | "LINKEDLN";
|
|
15
|
+
|
|
16
|
+
type Props = {
|
|
17
|
+
icon?: IconSvgElement | IconDefault | Snippet;
|
|
18
|
+
label?: string;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
let { icon, label, ...restProps }: Props & ButtonProps = $props();
|
|
22
|
+
|
|
23
|
+
const defaultIconMap: Record<IconDefault, IconSvgElement> = {
|
|
24
|
+
GOOGLE: GoogleIcon,
|
|
25
|
+
FACEBOOK: Facebook,
|
|
26
|
+
LINKEDLN: Linkedin,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const defaultLabelMap: Record<IconDefault, string> = {
|
|
30
|
+
GOOGLE: "Google",
|
|
31
|
+
FACEBOOK: "Facebook",
|
|
32
|
+
LINKEDLN: "Linkedin",
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
function isIconDefault(value: unknown): value is IconDefault {
|
|
36
|
+
return typeof value === "string" && value in defaultLabelMap;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let resolvedIcon = $derived(
|
|
40
|
+
isIconDefault(icon) ? defaultIconMap[icon] : icon,
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
let resolvedLabel = $derived(
|
|
44
|
+
label ?? (isIconDefault(icon) ? defaultLabelMap[icon] : ""),
|
|
45
|
+
);
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<Button variant="outline" class="w-full flex items-center gap-2" {...restProps}>
|
|
49
|
+
{#if resolvedIcon}
|
|
50
|
+
{#if typeof resolvedIcon === "function"}
|
|
51
|
+
{@render resolvedIcon()}
|
|
52
|
+
{:else}
|
|
53
|
+
<HugeiconsIcon icon={resolvedIcon} size={16} />
|
|
54
|
+
{/if}
|
|
55
|
+
{/if}
|
|
56
|
+
{$t("label.login.with", { name: resolvedLabel })}
|
|
57
|
+
</Button>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button, {
|
|
3
|
-
type ButtonProps,
|
|
4
|
-
} from "../../ui/button/button.svelte";
|
|
5
|
-
import { t } from "../../../i18n";
|
|
6
|
-
import { Login02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
8
|
-
|
|
9
|
-
let { ...restProps }: ButtonProps = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
<Button class="w-full flex items-center gap-2" {...restProps}>
|
|
13
|
-
<HugeiconsIcon icon={Login02Icon} size={16} />
|
|
14
|
-
{$t("label.send")}
|
|
15
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button, {
|
|
3
|
+
type ButtonProps,
|
|
4
|
+
} from "../../ui/button/button.svelte";
|
|
5
|
+
import { t } from "../../../i18n";
|
|
6
|
+
import { Login02Icon } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
8
|
+
|
|
9
|
+
let { ...restProps }: ButtonProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Button class="w-full flex items-center gap-2" {...restProps}>
|
|
13
|
+
<HugeiconsIcon icon={Login02Icon} size={16} />
|
|
14
|
+
{$t("label.send")}
|
|
15
|
+
</Button>
|
|
@@ -1,44 +1,67 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
3
|
+
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
4
|
+
/**
|
|
5
|
+
* Card component with a title and content.
|
|
6
|
+
* @component
|
|
7
|
+
*/
|
|
8
|
+
import type { CardPromotionProps } from "../types";
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
id,
|
|
12
|
+
logo,
|
|
13
|
+
imageUrl,
|
|
14
|
+
title,
|
|
15
|
+
isLoading = false,
|
|
16
|
+
isFavorite = false,
|
|
17
|
+
onClickFavorite,
|
|
18
|
+
}: CardPromotionProps = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<article class="relative rounded-sm">
|
|
22
|
+
{#if logo}
|
|
23
|
+
<div class="absolute top-1 left-1 z-2 flex gap-1 p-2">
|
|
24
|
+
{#if isLoading}
|
|
25
|
+
<Skeleton class="h-30 w-30 rounded-lg" />
|
|
26
|
+
{:else}
|
|
27
|
+
<img src={logo} width={30} height={30} alt={title} class="rounded-lg" />
|
|
28
|
+
{/if}
|
|
29
|
+
</div>
|
|
30
|
+
{/if}
|
|
31
|
+
|
|
32
|
+
<div class="absolute top-1 right-1 z-2 flex gap-1 p-2">
|
|
33
|
+
<CardFavorite
|
|
34
|
+
{id}
|
|
35
|
+
{isFavorite}
|
|
36
|
+
{isLoading}
|
|
37
|
+
onFavoriteClick={() => onClickFavorite?.(id)}
|
|
38
|
+
/>
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
{#if imageUrl}
|
|
42
|
+
{#if isLoading}
|
|
43
|
+
<Skeleton
|
|
44
|
+
class="rounded-lg md:h-37.5 md:w-37.5 lg:h-50 lg:w-50 object-cover object-center"
|
|
45
|
+
/>
|
|
46
|
+
{:else}
|
|
47
|
+
<img
|
|
48
|
+
src={imageUrl}
|
|
49
|
+
alt={imageUrl}
|
|
50
|
+
class="rounded-lg md:h-37.5 md:w-37.5 lg:h-50 lg:w-50 object-cover object-center"
|
|
51
|
+
/>
|
|
52
|
+
{/if}
|
|
53
|
+
{/if}
|
|
54
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
55
|
+
|
|
56
|
+
<div
|
|
57
|
+
class="absolute bottom-1 inset-x-0 flex justify-center m-auto bg-black/10 backdrop-blur-sm max-w-11/12 p-2 rounded-md"
|
|
58
|
+
>
|
|
59
|
+
{#if title}
|
|
60
|
+
{#if isLoading}
|
|
61
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
62
|
+
{:else}
|
|
63
|
+
<div class="text-center font-semibold text-[12px]">{title}</div>
|
|
64
|
+
{/if}
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
</article>
|
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* Card component with a title and content.
|
|
4
|
-
* @component
|
|
5
|
-
*/
|
|
6
|
-
import {
|
|
7
|
-
InformationCircleIcon,
|
|
8
|
-
UserIcon,
|
|
9
|
-
} from "@hugeicons/core-free-icons";
|
|
10
|
-
import { t } from "../../../../../i18n";
|
|
11
|
-
import type { CardMediaProps } from "../../types";
|
|
12
|
-
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
13
|
-
import CardDescription from "../../shared/CardDescription.svelte";
|
|
14
|
-
import CardTags from "../../shared/CardTags.svelte";
|
|
15
|
-
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
-
import CardButton from "../../shared/CardButton.svelte";
|
|
17
|
-
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
id,
|
|
21
|
-
tags,
|
|
22
|
-
logo,
|
|
23
|
-
title,
|
|
24
|
-
content,
|
|
25
|
-
imageUrl,
|
|
26
|
-
videoUrl,
|
|
27
|
-
//videoAction,
|
|
28
|
-
startNumber,
|
|
29
|
-
startMax = 5,
|
|
30
|
-
isImageButtonMaximized = false,
|
|
31
|
-
isVideoButtonMaximized = false,
|
|
32
|
-
isTagBorderBottom = false,
|
|
33
|
-
isFavorite = false,
|
|
34
|
-
buttonProfileClass,
|
|
35
|
-
buttonDetailsClass,
|
|
36
|
-
onFavoriteClick,
|
|
37
|
-
onButtonProfile,
|
|
38
|
-
onButtonDetails,
|
|
39
|
-
}: CardMediaProps = $props();
|
|
40
|
-
|
|
41
|
-
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
-
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
-
);
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<article
|
|
47
|
-
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg p-5 space-y-1 md:space-y-3"
|
|
48
|
-
>
|
|
49
|
-
<div class="flex justify-between items-center w-full mb-4">
|
|
50
|
-
<div class="flex justify-start gap-2">
|
|
51
|
-
<div class="flex justify-center items-center">
|
|
52
|
-
{#if logo}
|
|
53
|
-
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
54
|
-
{/if}
|
|
55
|
-
</div>
|
|
56
|
-
<div class="flex-col">
|
|
57
|
-
{#if title}
|
|
58
|
-
<div class="text-center font-bold text-lg">{title}</div>
|
|
59
|
-
{/if}
|
|
60
|
-
{#if startNumber}
|
|
61
|
-
<CardStarRating startNumber={startNumber} startMax={startMax} />
|
|
62
|
-
{/if}
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
<div class="flex justify-end items-center">
|
|
66
|
-
<CardFavorite
|
|
67
|
-
isFavorite={isFavorite}
|
|
68
|
-
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
69
|
-
/>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
72
|
-
|
|
73
|
-
<div class="h-15 my-2">
|
|
74
|
-
<CardDescription content={content}/>
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<CardTags
|
|
78
|
-
className="my-6"
|
|
79
|
-
tags={tags ?? []}
|
|
80
|
-
isTagBorderBottom={isTagBorderBottom}
|
|
81
|
-
/>
|
|
82
|
-
|
|
83
|
-
<CardThumbnailVideo
|
|
84
|
-
{imageUrl}
|
|
85
|
-
{videoUrl}
|
|
86
|
-
{isImageButtonMaximized}
|
|
87
|
-
{isVideoButtonMaximized}
|
|
88
|
-
/>
|
|
89
|
-
|
|
90
|
-
{#if onButtonProfile || onButtonDetails}
|
|
91
|
-
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
92
|
-
{#if onButtonProfile}
|
|
93
|
-
<CardButton
|
|
94
|
-
id={id}
|
|
95
|
-
icon={UserIcon}
|
|
96
|
-
className={buttonProfileClass}
|
|
97
|
-
text={$t("label.view.profile")}
|
|
98
|
-
onClick={onButtonProfile}
|
|
99
|
-
isFlex={isShowButtonProfileAndDetails}
|
|
100
|
-
/>
|
|
101
|
-
{/if}
|
|
102
|
-
{#if onButtonDetails}
|
|
103
|
-
<CardButton
|
|
104
|
-
id={id}
|
|
105
|
-
icon={InformationCircleIcon}
|
|
106
|
-
className={buttonDetailsClass}
|
|
107
|
-
text={$t("label.more.details")}
|
|
108
|
-
onClick={onButtonDetails}
|
|
109
|
-
isFlex={isShowButtonProfileAndDetails}
|
|
110
|
-
/>
|
|
111
|
-
{/if}
|
|
112
|
-
</div>
|
|
113
|
-
{/if}
|
|
114
|
-
</article>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* Card component with a title and content.
|
|
4
|
+
* @component
|
|
5
|
+
*/
|
|
6
|
+
import {
|
|
7
|
+
InformationCircleIcon,
|
|
8
|
+
UserIcon,
|
|
9
|
+
} from "@hugeicons/core-free-icons";
|
|
10
|
+
import { t } from "../../../../../i18n";
|
|
11
|
+
import type { CardMediaProps } from "../../types";
|
|
12
|
+
import CardStarRating from "../../shared/CardStarRating.svelte";
|
|
13
|
+
import CardDescription from "../../shared/CardDescription.svelte";
|
|
14
|
+
import CardTags from "../../shared/CardTags.svelte";
|
|
15
|
+
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
+
import CardButton from "../../shared/CardButton.svelte";
|
|
17
|
+
import CardFavorite from "../../shared/CardFavorite.svelte";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
id,
|
|
21
|
+
tags,
|
|
22
|
+
logo,
|
|
23
|
+
title,
|
|
24
|
+
content,
|
|
25
|
+
imageUrl,
|
|
26
|
+
videoUrl,
|
|
27
|
+
//videoAction,
|
|
28
|
+
startNumber,
|
|
29
|
+
startMax = 5,
|
|
30
|
+
isImageButtonMaximized = false,
|
|
31
|
+
isVideoButtonMaximized = false,
|
|
32
|
+
isTagBorderBottom = false,
|
|
33
|
+
isFavorite = false,
|
|
34
|
+
buttonProfileClass,
|
|
35
|
+
buttonDetailsClass,
|
|
36
|
+
onFavoriteClick,
|
|
37
|
+
onButtonProfile,
|
|
38
|
+
onButtonDetails,
|
|
39
|
+
}: CardMediaProps = $props();
|
|
40
|
+
|
|
41
|
+
let isShowButtonProfileAndDetails = $derived(
|
|
42
|
+
onButtonProfile != null && onButtonDetails != null,
|
|
43
|
+
);
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<article
|
|
47
|
+
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg p-5 space-y-1 md:space-y-3"
|
|
48
|
+
>
|
|
49
|
+
<div class="flex justify-between items-center w-full mb-4">
|
|
50
|
+
<div class="flex justify-start gap-2">
|
|
51
|
+
<div class="flex justify-center items-center">
|
|
52
|
+
{#if logo}
|
|
53
|
+
<img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
|
|
54
|
+
{/if}
|
|
55
|
+
</div>
|
|
56
|
+
<div class="flex-col">
|
|
57
|
+
{#if title}
|
|
58
|
+
<div class="text-center font-bold text-lg">{title}</div>
|
|
59
|
+
{/if}
|
|
60
|
+
{#if startNumber}
|
|
61
|
+
<CardStarRating startNumber={startNumber} startMax={startMax} />
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex justify-end items-center">
|
|
66
|
+
<CardFavorite
|
|
67
|
+
isFavorite={isFavorite}
|
|
68
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div class="h-15 my-2">
|
|
74
|
+
<CardDescription content={content}/>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<CardTags
|
|
78
|
+
className="my-6"
|
|
79
|
+
tags={tags ?? []}
|
|
80
|
+
isTagBorderBottom={isTagBorderBottom}
|
|
81
|
+
/>
|
|
82
|
+
|
|
83
|
+
<CardThumbnailVideo
|
|
84
|
+
{imageUrl}
|
|
85
|
+
{videoUrl}
|
|
86
|
+
{isImageButtonMaximized}
|
|
87
|
+
{isVideoButtonMaximized}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
{#if onButtonProfile || onButtonDetails}
|
|
91
|
+
<div class="flex justify-center items-center gap-2 mt-4 w-full">
|
|
92
|
+
{#if onButtonProfile}
|
|
93
|
+
<CardButton
|
|
94
|
+
id={id}
|
|
95
|
+
icon={UserIcon}
|
|
96
|
+
className={buttonProfileClass}
|
|
97
|
+
text={$t("label.view.profile")}
|
|
98
|
+
onClick={onButtonProfile}
|
|
99
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
100
|
+
/>
|
|
101
|
+
{/if}
|
|
102
|
+
{#if onButtonDetails}
|
|
103
|
+
<CardButton
|
|
104
|
+
id={id}
|
|
105
|
+
icon={InformationCircleIcon}
|
|
106
|
+
className={buttonDetailsClass}
|
|
107
|
+
text={$t("label.more.details")}
|
|
108
|
+
onClick={onButtonDetails}
|
|
109
|
+
isFlex={isShowButtonProfileAndDetails}
|
|
110
|
+
/>
|
|
111
|
+
{/if}
|
|
112
|
+
</div>
|
|
113
|
+
{/if}
|
|
114
|
+
</article>
|