negodesign 0.0.25 → 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.
Files changed (129) hide show
  1. package/dist/assets/start.png +0 -0
  2. package/dist/components/core/breadcrumb/breadcrumb-list.svelte +31 -31
  3. package/dist/components/core/button/ButtonBack.svelte +18 -18
  4. package/dist/components/core/button/ButtonLogin.svelte +15 -15
  5. package/dist/components/core/button/ButtonLoginWith.svelte +57 -57
  6. package/dist/components/core/button/ButtonSend.svelte +15 -15
  7. package/dist/components/core/card/highlight/01/CardHighlight01.svelte +91 -0
  8. package/dist/components/core/card/highlight/01/CardHighlight01.svelte.d.ts +8 -0
  9. package/dist/components/core/card/highlight/02/CardHighlight02.svelte +93 -0
  10. package/dist/components/core/card/highlight/02/CardHighlight02.svelte.d.ts +8 -0
  11. package/dist/components/core/card/highlight/CardHighlight.svelte +22 -67
  12. package/dist/components/core/card/highlight/CardHighlight.svelte.d.ts +5 -2
  13. package/dist/components/core/card/highlight/data.js +32 -1
  14. package/dist/components/core/card/media/01/CardMedia01.svelte +111 -114
  15. package/dist/components/core/card/media/02/CardMedia02.svelte +110 -113
  16. package/dist/components/core/card/media/CardMedia.svelte +17 -17
  17. package/dist/components/core/card/profile/01/CardProfile01.svelte +98 -101
  18. package/dist/components/core/card/profile/02/CardProfile02.svelte +98 -97
  19. package/dist/components/core/card/profile/CardProfile.svelte +17 -17
  20. package/dist/components/core/card/promotion/CardPromotion.svelte +112 -102
  21. package/dist/components/core/card/promotion/data.js +31 -0
  22. package/dist/components/core/card/shared/CardButton.svelte +30 -30
  23. package/dist/components/core/card/shared/CardCart.svelte +36 -36
  24. package/dist/components/core/card/shared/CardDescription.svelte +38 -23
  25. package/dist/components/core/card/shared/CardDescription.svelte.d.ts +3 -0
  26. package/dist/components/core/card/shared/CardFavorite.svelte +33 -33
  27. package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
  28. package/dist/components/core/card/shared/CardStartPrice.svelte +34 -0
  29. package/dist/components/core/card/shared/CardStartPrice.svelte.d.ts +8 -0
  30. package/dist/components/core/card/shared/CardTags.svelte +73 -56
  31. package/dist/components/core/card/shared/CardTags.svelte.d.ts +2 -1
  32. package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
  33. package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
  34. package/dist/components/core/card/types.d.ts +13 -1
  35. package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte +82 -80
  36. package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
  37. package/dist/components/core/carousel/highlights/types.d.ts +3 -0
  38. package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +63 -41
  39. package/dist/components/core/carousel/promotion/types.d.ts +2 -0
  40. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +64 -41
  41. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +55 -50
  42. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte.d.ts +6 -1
  43. package/dist/components/core/carousel/types.d.ts +1 -2
  44. package/dist/components/core/datatable/ui/DataTableActions.svelte +28 -28
  45. package/dist/components/core/datatable/ui/DataTableCheckbox.svelte +22 -22
  46. package/dist/components/core/datatable/ui/DataTableContent.svelte +59 -59
  47. package/dist/components/core/datatable/ui/DataTableCore.svelte +151 -151
  48. package/dist/components/core/datatable/ui/DataTableDragHandle.svelte +8 -8
  49. package/dist/components/core/datatable/ui/DataTableListFilter.svelte +59 -59
  50. package/dist/components/core/datatable/ui/DataTableListPagination.svelte +35 -35
  51. package/dist/components/core/form/ui/input-base.svelte +81 -81
  52. package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -23
  53. package/dist/components/core/form/ui/input-email.svelte +23 -23
  54. package/dist/components/core/form/ui/input-password-confirm.svelte +23 -23
  55. package/dist/components/core/form/ui/input-password.svelte +23 -23
  56. package/dist/components/core/form/ui/input-phone.svelte +33 -33
  57. package/dist/components/core/form/ui/input-username.svelte +22 -22
  58. package/dist/components/core/hero/SimpleHero.svelte +65 -65
  59. package/dist/components/core/label/LabelOr.svelte +25 -25
  60. package/dist/components/core/link/link-forget-password.svelte +12 -12
  61. package/dist/components/core/link/link-privacy-polity.svelte +12 -12
  62. package/dist/components/core/link/link-terms-of-service.svelte +12 -12
  63. package/dist/components/core/nav/ui/menu-links.svelte +27 -27
  64. package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -85
  65. package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte +33 -33
  66. package/dist/components/core/nav/ui/nav-menu-sidebar.svelte +97 -97
  67. package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte +103 -103
  68. package/dist/components/core/nav/ui/nav-menu.svelte +106 -106
  69. package/dist/components/core/panel/CarouselSlot.svelte +63 -38
  70. package/dist/components/core/panel/CarouselSlot.svelte.d.ts +5 -2
  71. package/dist/components/core/panel/LeftHero.svelte +116 -116
  72. package/dist/components/core/search/SearchInput.svelte +32 -32
  73. package/dist/components/core/search/shared/SearchInputCore.svelte +66 -66
  74. package/dist/components/core/sidebar/MenuBarSidebar.svelte +70 -70
  75. package/dist/components/core/tabs/ui/tab-underline.svelte +43 -43
  76. package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
  77. package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
  78. package/dist/components/pages/security/login/01/ui/FormRegister.svelte +28 -28
  79. package/dist/components/pages/security/login/01/ui/LoginCard.svelte +107 -107
  80. package/dist/components/pages/security/login/PageLogin.svelte +22 -22
  81. package/dist/components/ui/badge/badge.svelte +49 -49
  82. package/dist/components/ui/button/button.svelte +82 -82
  83. package/dist/components/ui/chart/chart-container.svelte +80 -80
  84. package/dist/components/ui/chart/chart-style.svelte +37 -37
  85. package/dist/components/ui/chart/chart-tooltip.svelte +184 -184
  86. package/dist/components/ui/checkbox/checkbox.svelte +40 -40
  87. package/dist/components/ui/data-table/flex-render.svelte +40 -40
  88. package/dist/components/ui/drawer/drawer-close.svelte +7 -7
  89. package/dist/components/ui/drawer/drawer-content.svelte +33 -33
  90. package/dist/components/ui/drawer/drawer-description.svelte +17 -17
  91. package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
  92. package/dist/components/ui/drawer/drawer-header.svelte +20 -20
  93. package/dist/components/ui/drawer/drawer-nested.svelte +12 -12
  94. package/dist/components/ui/drawer/drawer-overlay.svelte +17 -17
  95. package/dist/components/ui/drawer/drawer-portal.svelte +7 -7
  96. package/dist/components/ui/drawer/drawer-title.svelte +17 -17
  97. package/dist/components/ui/drawer/drawer-trigger.svelte +7 -7
  98. package/dist/components/ui/drawer/drawer.svelte +12 -12
  99. package/dist/components/ui/select/select-content.svelte +45 -45
  100. package/dist/components/ui/select/select-group-heading.svelte +21 -21
  101. package/dist/components/ui/select/select-group.svelte +17 -17
  102. package/dist/components/ui/select/select-item.svelte +41 -41
  103. package/dist/components/ui/select/select-label.svelte +20 -20
  104. package/dist/components/ui/select/select-portal.svelte +7 -7
  105. package/dist/components/ui/select/select-scroll-down-button.svelte +21 -21
  106. package/dist/components/ui/select/select-scroll-up-button.svelte +21 -21
  107. package/dist/components/ui/select/select-separator.svelte +18 -18
  108. package/dist/components/ui/select/select-trigger.svelte +30 -30
  109. package/dist/components/ui/select/select.svelte +11 -11
  110. package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
  111. package/dist/components/ui/star-rating/star-rating-star.svelte +41 -41
  112. package/dist/components/ui/star-rating/star-rating.svelte +20 -20
  113. package/dist/components/ui/table/table-body.svelte +15 -15
  114. package/dist/components/ui/table/table-caption.svelte +20 -20
  115. package/dist/components/ui/table/table-cell.svelte +15 -15
  116. package/dist/components/ui/table/table-footer.svelte +20 -20
  117. package/dist/components/ui/table/table-head.svelte +15 -15
  118. package/dist/components/ui/table/table-header.svelte +20 -20
  119. package/dist/components/ui/table/table-row.svelte +15 -15
  120. package/dist/components/ui/table/table.svelte +17 -17
  121. package/dist/components/ui/tabs/tabs-content.svelte +17 -17
  122. package/dist/components/ui/tabs/tabs-list.svelte +40 -40
  123. package/dist/components/ui/tabs/tabs-trigger.svelte +23 -23
  124. package/dist/components/ui/tabs/tabs.svelte +19 -19
  125. package/dist/globals.css +142 -17
  126. package/dist/hooks/responsive.svelte.d.ts +1 -1
  127. package/dist/hooks/responsive.svelte.js +1 -1
  128. package/dist/styles/globals.css +149 -149
  129. package/package.json +113 -113
Binary file
@@ -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>
@@ -0,0 +1,91 @@
1
+ <script lang="ts">
2
+ import Button from "../../../../ui/button/button.svelte";
3
+ import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
4
+ import { t } from "../../../../../i18n";
5
+ import CardDescription from "../../shared/CardDescription.svelte";
6
+ import CardFavorite from "../../shared/CardFavorite.svelte";
7
+ import CardTags from "../../shared/CardTags.svelte";
8
+ /**
9
+ * Card component with a title and content.
10
+ * @component
11
+ */
12
+ import type { CardHighlightProps } from "../../types";
13
+
14
+ let {
15
+ id,
16
+ logo,
17
+ tags,
18
+ title,
19
+ content,
20
+ imageUrl,
21
+ isLoading = false,
22
+ isFavorite = false,
23
+ buttonText,
24
+ isDescriptionIcon,
25
+ isDescriptionLabel,
26
+ onClickBtn,
27
+ onClickFavorite,
28
+ }: CardHighlightProps = $props();
29
+ </script>
30
+
31
+ <article
32
+ class="flex gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
33
+ >
34
+ <aside class="relative rounded-lg border h-50">
35
+ <div class="left-1 z-2 flex gap-1 w-50">
36
+ {#if isLoading}
37
+ <Skeleton class="w-hull h-full rounded-lg" />
38
+ {:else if logo}
39
+ <img src={logo} alt={title} class="rounded-lg" />
40
+ {/if}
41
+ </div>
42
+
43
+ <div class="absolute top-3 right-1">
44
+ <CardFavorite
45
+ {id}
46
+ {isFavorite}
47
+ {isLoading}
48
+ onFavoriteClick={() => onClickFavorite?.(id)}
49
+ />
50
+ </div>
51
+
52
+ {#if isLoading}
53
+ <Skeleton class="rounded-lg w-full h-full object-cover object-center" />
54
+ {:else if imageUrl}
55
+ <img
56
+ src={imageUrl}
57
+ alt={imageUrl}
58
+ class="rounded-lg w-full h-full object-cover object-center"
59
+ />
60
+ {/if}
61
+ <div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
62
+ </aside>
63
+ <div class="px-5">
64
+ <div class="p-2 rounded-md">
65
+ {#if isLoading}
66
+ <Skeleton class="h-4 w-30 rounded-lg" />
67
+ {:else if title}
68
+ <div class="font-semibold">{title}</div>
69
+ {/if}
70
+ </div>
71
+
72
+ <div class="w-75">
73
+ <CardDescription
74
+ {content}
75
+ {isLoading}
76
+ {isDescriptionIcon}
77
+ {isDescriptionLabel}
78
+ />
79
+ </div>
80
+
81
+ <CardTags {tags} {isLoading} />
82
+
83
+ {#if isLoading}
84
+ <Skeleton class="h-10 w-full rounded-md mt-2 md:mt-3" />
85
+ {:else}
86
+ <Button onclick={() => onClickBtn!(id)} class="mt-2 md:mt-3 md:min-w-32">
87
+ {buttonText || $t("label.buy")}
88
+ </Button>
89
+ {/if}
90
+ </div>
91
+ </article>
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Card component with a title and content.
3
+ * @component
4
+ */
5
+ import type { CardHighlightProps } from "../../types";
6
+ declare const CardHighlight01: import("svelte").Component<CardHighlightProps, {}, "">;
7
+ type CardHighlight01 = ReturnType<typeof CardHighlight01>;
8
+ export default CardHighlight01;
@@ -0,0 +1,93 @@
1
+ <script lang="ts">
2
+ import Button from "../../../../ui/button/button.svelte";
3
+ import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
4
+ import { t } from "../../../../../i18n";
5
+ import CardDescription from "../../shared/CardDescription.svelte";
6
+ import CardFavorite from "../../shared/CardFavorite.svelte";
7
+ import CardTags from "../../shared/CardTags.svelte";
8
+ /**
9
+ * Card component with a title and content.
10
+ * @component
11
+ */
12
+ import type { CardHighlightProps } from "../../types";
13
+
14
+ let {
15
+ id,
16
+ logo,
17
+ tags,
18
+ title,
19
+ content,
20
+ imageUrl,
21
+ isLoading = false,
22
+ isFavorite = false,
23
+ isDescriptionIcon,
24
+ isDescriptionLabel,
25
+ buttonText,
26
+ onClickBtn,
27
+ onClickFavorite,
28
+ }: CardHighlightProps = $props();
29
+ </script>
30
+
31
+ <article
32
+ class="flex flex-col gap-1 bg-white dark:bg-background p-3 rounded-lg shadow border"
33
+ >
34
+ <aside class="relative rounded-lg border h-50">
35
+ <div class="left-1 z-2 flex gap-1 w-50">
36
+ {#if isLoading}
37
+ <Skeleton class="w-hull h-full rounded-lg" />
38
+ {:else if logo}
39
+ <img src={logo} alt={title} class="rounded-lg" />
40
+ {/if}
41
+ </div>
42
+
43
+ <div class="absolute top-3 right-1">
44
+ <CardFavorite
45
+ {id}
46
+ {isFavorite}
47
+ {isLoading}
48
+ onFavoriteClick={() => onClickFavorite?.(id)}
49
+ />
50
+ </div>
51
+
52
+ {#if isLoading}
53
+ <Skeleton class="rounded-lg w-full h-full object-cover object-center" />
54
+ {:else if imageUrl}
55
+ <img
56
+ src={imageUrl}
57
+ alt={imageUrl}
58
+ class="rounded-lg w-full h-full object-cover object-center"
59
+ />
60
+ {/if}
61
+ <div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
62
+ </aside>
63
+ <div class="px-2">
64
+ <div class="rounded-md">
65
+ {#if isLoading}
66
+ <Skeleton class="h-4 w-30 rounded-lg" />
67
+ {:else if title}
68
+ <div class="font-semibold my-2">{title}</div>
69
+ {/if}
70
+ </div>
71
+
72
+ <div class="w-75 my-2">
73
+ <CardDescription
74
+ {content}
75
+ {isLoading}
76
+ {isDescriptionIcon}
77
+ {isDescriptionLabel}
78
+ />
79
+ </div>
80
+
81
+ <div class="my-2">
82
+ <CardTags {tags} {isLoading} />
83
+ </div>
84
+
85
+ {#if isLoading}
86
+ <Skeleton class="h-10 w-full rounded-md mt-2 md:mt-3" />
87
+ {:else}
88
+ <Button onclick={() => onClickBtn!(id)} class="mt-2 md:mt-3 md:min-w-32">
89
+ {buttonText || $t("label.buy")}
90
+ </Button>
91
+ {/if}
92
+ </div>
93
+ </article>
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Card component with a title and content.
3
+ * @component
4
+ */
5
+ import type { CardHighlightProps } from "../../types";
6
+ declare const CardHighlight02: import("svelte").Component<CardHighlightProps, {}, "">;
7
+ type CardHighlight02 = ReturnType<typeof CardHighlight02>;
8
+ export default CardHighlight02;
@@ -1,67 +1,22 @@
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
+ <script lang="ts">
2
+ /**
3
+ * Card component with a title and content.
4
+ * @component
5
+ */
6
+ import type { CardHighlightProps } from "../types";
7
+ import CardHighlight01 from "./01/CardHighlight01.svelte";
8
+ import CardHighlight02 from "./02/CardHighlight02.svelte";
9
+
10
+ let {
11
+ varient = 1,
12
+ ...restProps
13
+ }: CardHighlightProps & {
14
+ varient?: 1 | 2;
15
+ } = $props();
16
+ </script>
17
+
18
+ {#if varient == 2}
19
+ <CardHighlight02 {...restProps} />
20
+ {:else}
21
+ <CardHighlight01 {...restProps} />
22
+ {/if}
@@ -2,7 +2,10 @@
2
2
  * Card component with a title and content.
3
3
  * @component
4
4
  */
5
- import type { CardPromotionProps } from "../types";
6
- declare const CardHighlight: import("svelte").Component<CardPromotionProps, {}, "">;
5
+ import type { CardHighlightProps } from "../types";
6
+ type $$ComponentProps = CardHighlightProps & {
7
+ varient?: 1 | 2;
8
+ };
9
+ declare const CardHighlight: import("svelte").Component<$$ComponentProps, {}, "">;
7
10
  type CardHighlight = ReturnType<typeof CardHighlight>;
8
11
  export default CardHighlight;
@@ -1,31 +1,62 @@
1
+ import { GlobalIcon, MapPin, NecklaceIcon } from "@hugeicons/core-free-icons";
1
2
  const items = [
2
3
  {
3
4
  id: 1,
4
5
  imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
5
6
  title: 'Hotel Baía Azul',
6
7
  isFavorite: true,
8
+ content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
9
+ tags: [
10
+ { icon: GlobalIcon, text: 'Luanda', },
11
+ { icon: MapPin, text: 'Kilamba', },
12
+ { icon: NecklaceIcon, text: 'Rua 19', },
13
+ ]
7
14
  },
8
15
  {
9
16
  id: 2,
10
17
  imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
11
18
  title: 'Miramar Suites',
19
+ content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
20
+ tags: [
21
+ { icon: GlobalIcon, text: 'Luanda', },
22
+ { icon: MapPin, text: 'Kilamba', },
23
+ { icon: NecklaceIcon, text: 'Rua 19', },
24
+ ]
12
25
  },
13
26
  {
14
27
  id: 3,
15
28
  imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
16
29
  title: 'Palm Resort & Spa',
17
- isFavorite: true
30
+ isFavorite: true,
31
+ content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
32
+ tags: [
33
+ { icon: GlobalIcon, text: 'Luanda', },
34
+ { icon: MapPin, text: 'Kilamba', },
35
+ { icon: NecklaceIcon, text: 'Rua 19', },
36
+ ]
18
37
  },
19
38
  {
20
39
  id: 4,
21
40
  imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
22
41
  title: 'Hotel Central Park',
42
+ content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
43
+ tags: [
44
+ { icon: GlobalIcon, text: 'Luanda', },
45
+ { icon: MapPin, text: 'Kilamba', },
46
+ { icon: NecklaceIcon, text: 'Rua 19', },
47
+ ]
23
48
  },
24
49
  {
25
50
  id: 5,
26
51
  imageUrl: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
27
52
  title: 'Villa Serena Boutique',
28
53
  isFavorite: true,
54
+ content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets. It has survived not only many decades, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised thanks to these sheets and more recently with desktop publishing software like Aldus PageMaker and Microsoft Word including versions of Lorem Ipsum",
55
+ tags: [
56
+ { icon: GlobalIcon, text: 'Luanda', },
57
+ { icon: MapPin, text: 'Kilamba', },
58
+ { icon: NecklaceIcon, text: 'Rua 19', },
59
+ ]
29
60
  },
30
61
  ];
31
62
  export default items;