negodesign 0.0.26 → 0.0.27
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/01/CardHighlight01.svelte +91 -91
- package/dist/components/core/card/highlight/02/CardHighlight02.svelte +93 -93
- package/dist/components/core/card/highlight/CardHighlight.svelte +22 -22
- package/dist/components/core/card/media/01/CardMedia01.svelte +111 -111
- package/dist/components/core/card/media/02/CardMedia02.svelte +110 -110
- package/dist/components/core/card/media/CardMedia.svelte +17 -17
- package/dist/components/core/card/profile/01/CardProfile01.svelte +98 -98
- package/dist/components/core/card/profile/02/CardProfile02.svelte +98 -98
- package/dist/components/core/card/profile/CardProfile.svelte +17 -17
- package/dist/components/core/card/promotion/CardPromotion.svelte +112 -112
- package/dist/components/core/card/shared/CardButton.svelte +30 -30
- package/dist/components/core/card/shared/CardCart.svelte +36 -36
- package/dist/components/core/card/shared/CardDescription.svelte +38 -38
- package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
- package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
- package/dist/components/core/card/shared/CardStartPrice.svelte +34 -34
- package/dist/components/core/card/shared/CardTags.svelte +73 -73
- package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
- package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
- package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +82 -83
- package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
- package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +63 -63
- package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +64 -64
- package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +55 -55
- 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 +63 -63
- 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 +3 -0
- package/dist/styles/globals.css +149 -149
- package/package.json +113 -113
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
4
|
-
|
|
5
|
-
type CardButtonProps = {
|
|
6
|
-
id: string | number;
|
|
7
|
-
icon: IconSvgElement;
|
|
8
|
-
isFlex?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
text: string;
|
|
11
|
-
onClick: (id: string | number) => void;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let {
|
|
15
|
-
id,
|
|
16
|
-
icon,
|
|
17
|
-
isFlex,
|
|
18
|
-
className,
|
|
19
|
-
text,
|
|
20
|
-
onClick
|
|
21
|
-
}: CardButtonProps = $props();
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<Button
|
|
25
|
-
class="{isFlex ? 'flex-1' : ''} {className}"
|
|
26
|
-
onclick={() => onClick(id)}
|
|
27
|
-
>
|
|
28
|
-
<HugeiconsIcon {icon} />
|
|
29
|
-
<span>{text}</span>
|
|
30
|
-
</Button>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
|
|
4
|
+
|
|
5
|
+
type CardButtonProps = {
|
|
6
|
+
id: string | number;
|
|
7
|
+
icon: IconSvgElement;
|
|
8
|
+
isFlex?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
text: string;
|
|
11
|
+
onClick: (id: string | number) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let {
|
|
15
|
+
id,
|
|
16
|
+
icon,
|
|
17
|
+
isFlex,
|
|
18
|
+
className,
|
|
19
|
+
text,
|
|
20
|
+
onClick
|
|
21
|
+
}: CardButtonProps = $props();
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<Button
|
|
25
|
+
class="{isFlex ? 'flex-1' : ''} {className}"
|
|
26
|
+
onclick={() => onClick(id)}
|
|
27
|
+
>
|
|
28
|
+
<HugeiconsIcon {icon} />
|
|
29
|
+
<span>{text}</span>
|
|
30
|
+
</Button>
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
-
import {
|
|
5
|
-
ShoppingCartAdd01Icon,
|
|
6
|
-
ShoppingCartRemove01Icon,
|
|
7
|
-
} from "@hugeicons/core-free-icons";
|
|
8
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
9
|
-
|
|
10
|
-
type Props = {
|
|
11
|
-
id: string | number;
|
|
12
|
-
isCart: boolean;
|
|
13
|
-
isLoading?: boolean;
|
|
14
|
-
onCartClick?: (id: string | number) => void;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
let { id, isCart, isLoading = false, onCartClick }: Props = $props();
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
{#if isLoading}
|
|
21
|
-
<Skeleton class="w-8 h-8 rounded-full" />
|
|
22
|
-
{:else if isCart}
|
|
23
|
-
<Button
|
|
24
|
-
class="w-8 h-8 rounded-full bg-[#1d63be]"
|
|
25
|
-
onclick={() => onCartClick!(id)}
|
|
26
|
-
>
|
|
27
|
-
<HugeiconsIcon icon={ShoppingCartRemove01Icon} />
|
|
28
|
-
</Button>
|
|
29
|
-
{:else}
|
|
30
|
-
<Button
|
|
31
|
-
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
32
|
-
onclick={() => onCartClick!(id)}
|
|
33
|
-
>
|
|
34
|
-
<HugeiconsIcon icon={ShoppingCartAdd01Icon} />
|
|
35
|
-
</Button>
|
|
36
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import {
|
|
5
|
+
ShoppingCartAdd01Icon,
|
|
6
|
+
ShoppingCartRemove01Icon,
|
|
7
|
+
} from "@hugeicons/core-free-icons";
|
|
8
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
9
|
+
|
|
10
|
+
type Props = {
|
|
11
|
+
id: string | number;
|
|
12
|
+
isCart: boolean;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
onCartClick?: (id: string | number) => void;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let { id, isCart, isLoading = false, onCartClick }: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
{#if isLoading}
|
|
21
|
+
<Skeleton class="w-8 h-8 rounded-full" />
|
|
22
|
+
{:else if isCart}
|
|
23
|
+
<Button
|
|
24
|
+
class="w-8 h-8 rounded-full bg-[#1d63be]"
|
|
25
|
+
onclick={() => onCartClick!(id)}
|
|
26
|
+
>
|
|
27
|
+
<HugeiconsIcon icon={ShoppingCartRemove01Icon} />
|
|
28
|
+
</Button>
|
|
29
|
+
{:else}
|
|
30
|
+
<Button
|
|
31
|
+
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
32
|
+
onclick={() => onCartClick!(id)}
|
|
33
|
+
>
|
|
34
|
+
<HugeiconsIcon icon={ShoppingCartAdd01Icon} />
|
|
35
|
+
</Button>
|
|
36
|
+
{/if}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Message01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
-
import TruncatableText from "./TruncatableText.svelte";
|
|
5
|
-
import { t } from "../../../../i18n";
|
|
6
|
-
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
7
|
-
|
|
8
|
-
type CardDescriptionProps = {
|
|
9
|
-
content?: string;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
isDescriptionIcon?: boolean;
|
|
12
|
-
isDescriptionLabel?: boolean;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
let {
|
|
16
|
-
content,
|
|
17
|
-
isLoading = false,
|
|
18
|
-
isDescriptionIcon = true,
|
|
19
|
-
isDescriptionLabel = true,
|
|
20
|
-
}: CardDescriptionProps = $props();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
{#if isLoading}
|
|
24
|
-
<Skeleton class="w-full h-5" />
|
|
25
|
-
{:else if content}
|
|
26
|
-
{#if isDescriptionLabel}
|
|
27
|
-
<div class="mb-1 text-[14px] md:text-[15px] flex items-center gap-1">
|
|
28
|
-
{#if isDescriptionIcon}
|
|
29
|
-
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
30
|
-
{/if}
|
|
31
|
-
<div>{$t("label.description")}</div>
|
|
32
|
-
</div>
|
|
33
|
-
{/if}
|
|
34
|
-
<TruncatableText
|
|
35
|
-
text={content}
|
|
36
|
-
class="text-justify text-[13px] md:text-[14px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
37
|
-
/>
|
|
38
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Message01Icon } from "@hugeicons/core-free-icons";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import TruncatableText from "./TruncatableText.svelte";
|
|
5
|
+
import { t } from "../../../../i18n";
|
|
6
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
7
|
+
|
|
8
|
+
type CardDescriptionProps = {
|
|
9
|
+
content?: string;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
isDescriptionIcon?: boolean;
|
|
12
|
+
isDescriptionLabel?: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
content,
|
|
17
|
+
isLoading = false,
|
|
18
|
+
isDescriptionIcon = true,
|
|
19
|
+
isDescriptionLabel = true,
|
|
20
|
+
}: CardDescriptionProps = $props();
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if isLoading}
|
|
24
|
+
<Skeleton class="w-full h-5" />
|
|
25
|
+
{:else if content}
|
|
26
|
+
{#if isDescriptionLabel}
|
|
27
|
+
<div class="mb-1 text-[14px] md:text-[15px] flex items-center gap-1">
|
|
28
|
+
{#if isDescriptionIcon}
|
|
29
|
+
<HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
|
|
30
|
+
{/if}
|
|
31
|
+
<div>{$t("label.description")}</div>
|
|
32
|
+
</div>
|
|
33
|
+
{/if}
|
|
34
|
+
<TruncatableText
|
|
35
|
+
text={content}
|
|
36
|
+
class="text-justify text-[13px] md:text-[14px] text-gray-800 dark:text-gray-50 mt-3 my-4"
|
|
37
|
+
/>
|
|
38
|
+
{/if}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Button } from "../../../ui/button/index.js";
|
|
3
|
-
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
-
import { HeartAddIcon, HeartRemoveIcon } from "@hugeicons/core-free-icons";
|
|
5
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
6
|
-
|
|
7
|
-
type Props = {
|
|
8
|
-
id: string | number;
|
|
9
|
-
isFavorite: boolean;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
onFavoriteClick?: (id: string | number) => void;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
let { id, isFavorite, isLoading = false, onFavoriteClick }: Props = $props();
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if isLoading}
|
|
18
|
-
<Skeleton class="w-8 h-8 rounded-full" />
|
|
19
|
-
{:else if isFavorite}
|
|
20
|
-
<Button
|
|
21
|
-
class="w-8 h-8 rounded-full bg-[#ce2356]"
|
|
22
|
-
onclick={() => onFavoriteClick!(id)}
|
|
23
|
-
>
|
|
24
|
-
<HugeiconsIcon icon={HeartRemoveIcon} />
|
|
25
|
-
</Button>
|
|
26
|
-
{:else}
|
|
27
|
-
<Button
|
|
28
|
-
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
29
|
-
onclick={() => onFavoriteClick!(id)}
|
|
30
|
-
>
|
|
31
|
-
<HugeiconsIcon icon={HeartAddIcon} />
|
|
32
|
-
</Button>
|
|
33
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button } from "../../../ui/button/index.js";
|
|
3
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
4
|
+
import { HeartAddIcon, HeartRemoveIcon } from "@hugeicons/core-free-icons";
|
|
5
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
id: string | number;
|
|
9
|
+
isFavorite: boolean;
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
onFavoriteClick?: (id: string | number) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
let { id, isFavorite, isLoading = false, onFavoriteClick }: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
{#if isLoading}
|
|
18
|
+
<Skeleton class="w-8 h-8 rounded-full" />
|
|
19
|
+
{:else if isFavorite}
|
|
20
|
+
<Button
|
|
21
|
+
class="w-8 h-8 rounded-full bg-[#ce2356]"
|
|
22
|
+
onclick={() => onFavoriteClick!(id)}
|
|
23
|
+
>
|
|
24
|
+
<HugeiconsIcon icon={HeartRemoveIcon} />
|
|
25
|
+
</Button>
|
|
26
|
+
{:else}
|
|
27
|
+
<Button
|
|
28
|
+
class="w-8 h-8 rounded-full bg-[#808080]"
|
|
29
|
+
onclick={() => onFavoriteClick!(id)}
|
|
30
|
+
>
|
|
31
|
+
<HugeiconsIcon icon={HeartAddIcon} />
|
|
32
|
+
</Button>
|
|
33
|
+
{/if}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import * as StarRating from "../../../ui/star-rating";
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
startNumber: number;
|
|
6
|
-
startMax: number;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
let { startNumber, startMax }: Props = $props();
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if startNumber}
|
|
13
|
-
<StarRating.Root max={startMax} value={startNumber} class="size-15 h-auto">
|
|
14
|
-
{#snippet children({ items })}
|
|
15
|
-
{#each items as item (item.index)}
|
|
16
|
-
<StarRating.Star {...item} class="py-0! my-0!" />
|
|
17
|
-
{/each}
|
|
18
|
-
{/snippet}
|
|
19
|
-
</StarRating.Root>
|
|
20
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import * as StarRating from "../../../ui/star-rating";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
startNumber: number;
|
|
6
|
+
startMax: number;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
let { startNumber, startMax }: Props = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if startNumber}
|
|
13
|
+
<StarRating.Root max={startMax} value={startNumber} class="size-15 h-auto">
|
|
14
|
+
{#snippet children({ items })}
|
|
15
|
+
{#each items as item (item.index)}
|
|
16
|
+
<StarRating.Star {...item} class="py-0! my-0!" />
|
|
17
|
+
{/each}
|
|
18
|
+
{/snippet}
|
|
19
|
+
</StarRating.Root>
|
|
20
|
+
{/if}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import StartBg from "../../../../assets/start.png";
|
|
3
|
-
|
|
4
|
-
type Props = {
|
|
5
|
-
newPrice?: string | number;
|
|
6
|
-
oldPrice?: string | number;
|
|
7
|
-
type?: "start" | "normal";
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
let { newPrice, oldPrice, type = "normal" }: Props = $props();
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div class="relative min-w-25 md:min-w-32">
|
|
14
|
-
{#if type == "start"}
|
|
15
|
-
<img
|
|
16
|
-
src={StartBg}
|
|
17
|
-
alt=""
|
|
18
|
-
class="shadow rounded-tl-lg rounded-bl-lg md:w-20 md:h-20 lg:w-32 lg:h-24 absolute"
|
|
19
|
-
/>
|
|
20
|
-
{/if}
|
|
21
|
-
{#if newPrice && oldPrice}
|
|
22
|
-
<div class="z-20 flex justify-center items-center">
|
|
23
|
-
<div class="font-extrabold md:text-3xl lg:text-4xl">{newPrice}</div>
|
|
24
|
-
<div class="mx-2">/</div>
|
|
25
|
-
<div
|
|
26
|
-
class="font-semibold line-through text-red-600 text-[10px] md:text-xl"
|
|
27
|
-
>
|
|
28
|
-
{oldPrice}
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
{:else}
|
|
32
|
-
<div class="z-20 font-bold">{newPrice}</div>
|
|
33
|
-
{/if}
|
|
34
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import StartBg from "../../../../assets/start.png";
|
|
3
|
+
|
|
4
|
+
type Props = {
|
|
5
|
+
newPrice?: string | number;
|
|
6
|
+
oldPrice?: string | number;
|
|
7
|
+
type?: "start" | "normal";
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
let { newPrice, oldPrice, type = "normal" }: Props = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="relative min-w-25 md:min-w-32">
|
|
14
|
+
{#if type == "start"}
|
|
15
|
+
<img
|
|
16
|
+
src={StartBg}
|
|
17
|
+
alt=""
|
|
18
|
+
class="shadow rounded-tl-lg rounded-bl-lg md:w-20 md:h-20 lg:w-32 lg:h-24 absolute"
|
|
19
|
+
/>
|
|
20
|
+
{/if}
|
|
21
|
+
{#if newPrice && oldPrice}
|
|
22
|
+
<div class="z-20 flex justify-center items-center">
|
|
23
|
+
<div class="font-extrabold md:text-3xl lg:text-4xl">{newPrice}</div>
|
|
24
|
+
<div class="mx-2">/</div>
|
|
25
|
+
<div
|
|
26
|
+
class="font-semibold line-through text-red-600 text-[10px] md:text-xl"
|
|
27
|
+
>
|
|
28
|
+
{oldPrice}
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
{:else}
|
|
32
|
+
<div class="z-20 font-bold">{newPrice}</div>
|
|
33
|
+
{/if}
|
|
34
|
+
</div>
|
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
-
import type { CardTagsProps } from "../types";
|
|
4
|
-
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
className?: string;
|
|
8
|
-
tags?: CardTagsProps[];
|
|
9
|
-
isTagBorderBottom?: boolean;
|
|
10
|
-
isWrap?: boolean;
|
|
11
|
-
isLoading?: boolean;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
tags,
|
|
16
|
-
className,
|
|
17
|
-
isTagBorderBottom,
|
|
18
|
-
isWrap = false,
|
|
19
|
-
isLoading = false,
|
|
20
|
-
}: Props = $props();
|
|
21
|
-
|
|
22
|
-
let isJustify = $derived(tags?.length == 2 || tags?.length == 3);
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
{#snippet createBadge(tag: CardTagsProps)}
|
|
26
|
-
<div
|
|
27
|
-
class="flex items-center h-5 shrink-0 {isTagBorderBottom
|
|
28
|
-
? 'border border-gray-200 rounded-full px-2 py-1'
|
|
29
|
-
: ''}"
|
|
30
|
-
>
|
|
31
|
-
{#if tag.icon}
|
|
32
|
-
<HugeiconsIcon
|
|
33
|
-
icon={tag.icon}
|
|
34
|
-
class="mr-0.5 h-3.75 w-3.75 shrink-0"
|
|
35
|
-
/>
|
|
36
|
-
{/if}
|
|
37
|
-
<div class="whitespace-nowrap">{tag.text}</div>
|
|
38
|
-
</div>
|
|
39
|
-
{/snippet}
|
|
40
|
-
|
|
41
|
-
{#snippet skeletonTag()}
|
|
42
|
-
<div class="my-2 flex gap-5">
|
|
43
|
-
{#each Array.from({ length: 3 }) as it, i (i)}
|
|
44
|
-
<Skeleton class="h-5 w-25 bg-black/50" />
|
|
45
|
-
{/each}
|
|
46
|
-
</div>
|
|
47
|
-
{/snippet}
|
|
48
|
-
|
|
49
|
-
{#if isWrap}
|
|
50
|
-
<div class="flex flex-wrap gap-2 md:gap-5 {className}">
|
|
51
|
-
{#if isLoading}
|
|
52
|
-
{@render skeletonTag()}
|
|
53
|
-
{:else if tags && tags.length > 0}
|
|
54
|
-
{#each tags as tag, i (i)}
|
|
55
|
-
{@render createBadge(tag)}
|
|
56
|
-
{/each}
|
|
57
|
-
{/if}
|
|
58
|
-
</div>
|
|
59
|
-
{:else}
|
|
60
|
-
<div
|
|
61
|
-
class="flex overflow-x-auto no-scrollbar w-full
|
|
62
|
-
{isJustify ? 'justify-between' : 'gap-4 md:gap-5 lg:gap-10'}
|
|
63
|
-
{className}"
|
|
64
|
-
>
|
|
65
|
-
{#if isLoading}
|
|
66
|
-
{@render skeletonTag()}
|
|
67
|
-
{:else if tags && tags.length > 0}
|
|
68
|
-
{#each tags as tag, i (i)}
|
|
69
|
-
{@render createBadge(tag)}
|
|
70
|
-
{/each}
|
|
71
|
-
{/if}
|
|
72
|
-
</div>
|
|
73
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
3
|
+
import type { CardTagsProps } from "../types";
|
|
4
|
+
import Skeleton from "../../../ui/skeleton/skeleton.svelte";
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
className?: string;
|
|
8
|
+
tags?: CardTagsProps[];
|
|
9
|
+
isTagBorderBottom?: boolean;
|
|
10
|
+
isWrap?: boolean;
|
|
11
|
+
isLoading?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
tags,
|
|
16
|
+
className,
|
|
17
|
+
isTagBorderBottom,
|
|
18
|
+
isWrap = false,
|
|
19
|
+
isLoading = false,
|
|
20
|
+
}: Props = $props();
|
|
21
|
+
|
|
22
|
+
let isJustify = $derived(tags?.length == 2 || tags?.length == 3);
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
{#snippet createBadge(tag: CardTagsProps)}
|
|
26
|
+
<div
|
|
27
|
+
class="flex items-center h-5 shrink-0 {isTagBorderBottom
|
|
28
|
+
? 'border border-gray-200 rounded-full px-2 py-1'
|
|
29
|
+
: ''}"
|
|
30
|
+
>
|
|
31
|
+
{#if tag.icon}
|
|
32
|
+
<HugeiconsIcon
|
|
33
|
+
icon={tag.icon}
|
|
34
|
+
class="mr-0.5 h-3.75 w-3.75 shrink-0"
|
|
35
|
+
/>
|
|
36
|
+
{/if}
|
|
37
|
+
<div class="whitespace-nowrap">{tag.text}</div>
|
|
38
|
+
</div>
|
|
39
|
+
{/snippet}
|
|
40
|
+
|
|
41
|
+
{#snippet skeletonTag()}
|
|
42
|
+
<div class="my-2 flex gap-5">
|
|
43
|
+
{#each Array.from({ length: 3 }) as it, i (i)}
|
|
44
|
+
<Skeleton class="h-5 w-25 bg-black/50" />
|
|
45
|
+
{/each}
|
|
46
|
+
</div>
|
|
47
|
+
{/snippet}
|
|
48
|
+
|
|
49
|
+
{#if isWrap}
|
|
50
|
+
<div class="flex flex-wrap gap-2 md:gap-5 {className}">
|
|
51
|
+
{#if isLoading}
|
|
52
|
+
{@render skeletonTag()}
|
|
53
|
+
{:else if tags && tags.length > 0}
|
|
54
|
+
{#each tags as tag, i (i)}
|
|
55
|
+
{@render createBadge(tag)}
|
|
56
|
+
{/each}
|
|
57
|
+
{/if}
|
|
58
|
+
</div>
|
|
59
|
+
{:else}
|
|
60
|
+
<div
|
|
61
|
+
class="flex overflow-x-auto no-scrollbar w-full
|
|
62
|
+
{isJustify ? 'justify-between' : 'gap-4 md:gap-5 lg:gap-10'}
|
|
63
|
+
{className}"
|
|
64
|
+
>
|
|
65
|
+
{#if isLoading}
|
|
66
|
+
{@render skeletonTag()}
|
|
67
|
+
{:else if tags && tags.length > 0}
|
|
68
|
+
{#each tags as tag, i (i)}
|
|
69
|
+
{@render createBadge(tag)}
|
|
70
|
+
{/each}
|
|
71
|
+
{/if}
|
|
72
|
+
</div>
|
|
73
|
+
{/if}
|