negodesign 0.0.24 → 0.0.26

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 (139) 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 -44
  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 -81
  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 -32
  24. package/dist/components/core/card/shared/CardCart.svelte.d.ts +1 -0
  25. package/dist/components/core/card/shared/CardDescription.svelte +38 -23
  26. package/dist/components/core/card/shared/CardDescription.svelte.d.ts +3 -0
  27. package/dist/components/core/card/shared/CardFavorite.svelte +33 -29
  28. package/dist/components/core/card/shared/CardFavorite.svelte.d.ts +1 -0
  29. package/dist/components/core/card/shared/CardStarRating.svelte +20 -20
  30. package/dist/components/core/card/shared/CardStartPrice.svelte +34 -0
  31. package/dist/components/core/card/shared/CardStartPrice.svelte.d.ts +8 -0
  32. package/dist/components/core/card/shared/CardTags.svelte +73 -56
  33. package/dist/components/core/card/shared/CardTags.svelte.d.ts +2 -1
  34. package/dist/components/core/card/shared/CardThumbnailVideo.svelte +169 -169
  35. package/dist/components/core/card/shared/TruncatableText.svelte +55 -55
  36. package/dist/components/core/card/types.d.ts +13 -0
  37. package/dist/components/core/carousel/{shared/ui/SimpleBadgeCarousel.svelte → badge/ui/CarouselBadge.svelte} +83 -80
  38. package/dist/components/core/carousel/badge/ui/CarouselBadge.svelte.d.ts +4 -0
  39. package/dist/components/core/carousel/hero/CarouselHero.svelte +158 -158
  40. package/dist/components/core/carousel/highlights/types.d.ts +12 -0
  41. package/dist/components/core/carousel/highlights/types.js +1 -0
  42. package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +63 -65
  43. package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte.d.ts +1 -1
  44. package/dist/components/core/carousel/promotion/types.d.ts +11 -0
  45. package/dist/components/core/carousel/promotion/types.js +1 -0
  46. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +64 -65
  47. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte.d.ts +1 -1
  48. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +55 -0
  49. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte.d.ts +9 -0
  50. package/dist/components/core/carousel/types.d.ts +10 -26
  51. package/dist/components/core/datatable/ui/DataTableActions.svelte +28 -28
  52. package/dist/components/core/datatable/ui/DataTableCheckbox.svelte +22 -22
  53. package/dist/components/core/datatable/ui/DataTableContent.svelte +59 -59
  54. package/dist/components/core/datatable/ui/DataTableCore.svelte +151 -151
  55. package/dist/components/core/datatable/ui/DataTableDragHandle.svelte +8 -8
  56. package/dist/components/core/datatable/ui/DataTableListFilter.svelte +59 -59
  57. package/dist/components/core/datatable/ui/DataTableListPagination.svelte +35 -35
  58. package/dist/components/core/form/ui/input-base.svelte +81 -81
  59. package/dist/components/core/form/ui/input-email-or-phone.svelte +23 -23
  60. package/dist/components/core/form/ui/input-email.svelte +23 -23
  61. package/dist/components/core/form/ui/input-password-confirm.svelte +23 -23
  62. package/dist/components/core/form/ui/input-password.svelte +23 -23
  63. package/dist/components/core/form/ui/input-phone.svelte +33 -33
  64. package/dist/components/core/form/ui/input-username.svelte +22 -22
  65. package/dist/components/core/hero/SimpleHero.svelte +65 -65
  66. package/dist/components/core/label/LabelOr.svelte +25 -25
  67. package/dist/components/core/link/link-forget-password.svelte +12 -12
  68. package/dist/components/core/link/link-privacy-polity.svelte +12 -12
  69. package/dist/components/core/link/link-terms-of-service.svelte +12 -12
  70. package/dist/components/core/nav/ui/menu-links.svelte +27 -27
  71. package/dist/components/core/nav/ui/mobile/nav-menu-drawer.svelte +85 -85
  72. package/dist/components/core/nav/ui/nav-menu-bottom-sidebar.svelte +33 -33
  73. package/dist/components/core/nav/ui/nav-menu-sidebar.svelte +97 -97
  74. package/dist/components/core/nav/ui/nav-menu-top-bar-sidebar.svelte +103 -103
  75. package/dist/components/core/nav/ui/nav-menu.svelte +106 -106
  76. package/dist/components/core/panel/CarouselSlot.svelte +63 -38
  77. package/dist/components/core/panel/CarouselSlot.svelte.d.ts +5 -2
  78. package/dist/components/core/panel/LeftHero.svelte +116 -116
  79. package/dist/components/core/search/SearchInput.svelte +32 -32
  80. package/dist/components/core/search/shared/SearchInputCore.svelte +66 -66
  81. package/dist/components/core/sidebar/MenuBarSidebar.svelte +70 -70
  82. package/dist/components/core/tabs/ui/tab-underline.svelte +43 -43
  83. package/dist/components/pages/admin/01/ui/AdminContent.svelte +14 -14
  84. package/dist/components/pages/admin/01/ui/AdminPanel.svelte +46 -46
  85. package/dist/components/pages/security/login/01/ui/FormRegister.svelte +28 -28
  86. package/dist/components/pages/security/login/01/ui/LoginCard.svelte +107 -107
  87. package/dist/components/pages/security/login/PageLogin.svelte +22 -22
  88. package/dist/components/ui/badge/badge.svelte +49 -49
  89. package/dist/components/ui/button/button.svelte +82 -82
  90. package/dist/components/ui/chart/chart-container.svelte +80 -80
  91. package/dist/components/ui/chart/chart-style.svelte +37 -37
  92. package/dist/components/ui/chart/chart-tooltip.svelte +184 -184
  93. package/dist/components/ui/checkbox/checkbox.svelte +40 -40
  94. package/dist/components/ui/data-table/flex-render.svelte +40 -40
  95. package/dist/components/ui/drawer/drawer-close.svelte +7 -7
  96. package/dist/components/ui/drawer/drawer-content.svelte +33 -33
  97. package/dist/components/ui/drawer/drawer-description.svelte +17 -17
  98. package/dist/components/ui/drawer/drawer-footer.svelte +20 -20
  99. package/dist/components/ui/drawer/drawer-header.svelte +20 -20
  100. package/dist/components/ui/drawer/drawer-nested.svelte +12 -12
  101. package/dist/components/ui/drawer/drawer-overlay.svelte +17 -17
  102. package/dist/components/ui/drawer/drawer-portal.svelte +7 -7
  103. package/dist/components/ui/drawer/drawer-title.svelte +17 -17
  104. package/dist/components/ui/drawer/drawer-trigger.svelte +7 -7
  105. package/dist/components/ui/drawer/drawer.svelte +12 -12
  106. package/dist/components/ui/select/select-content.svelte +45 -45
  107. package/dist/components/ui/select/select-group-heading.svelte +21 -21
  108. package/dist/components/ui/select/select-group.svelte +17 -17
  109. package/dist/components/ui/select/select-item.svelte +41 -41
  110. package/dist/components/ui/select/select-label.svelte +20 -20
  111. package/dist/components/ui/select/select-portal.svelte +7 -7
  112. package/dist/components/ui/select/select-scroll-down-button.svelte +21 -21
  113. package/dist/components/ui/select/select-scroll-up-button.svelte +21 -21
  114. package/dist/components/ui/select/select-separator.svelte +18 -18
  115. package/dist/components/ui/select/select-trigger.svelte +30 -30
  116. package/dist/components/ui/select/select.svelte +11 -11
  117. package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
  118. package/dist/components/ui/star-rating/star-rating-star.svelte +41 -41
  119. package/dist/components/ui/star-rating/star-rating.svelte +20 -20
  120. package/dist/components/ui/table/table-body.svelte +15 -15
  121. package/dist/components/ui/table/table-caption.svelte +20 -20
  122. package/dist/components/ui/table/table-cell.svelte +15 -15
  123. package/dist/components/ui/table/table-footer.svelte +20 -20
  124. package/dist/components/ui/table/table-head.svelte +15 -15
  125. package/dist/components/ui/table/table-header.svelte +20 -20
  126. package/dist/components/ui/table/table-row.svelte +15 -15
  127. package/dist/components/ui/table/table.svelte +17 -17
  128. package/dist/components/ui/tabs/tabs-content.svelte +17 -17
  129. package/dist/components/ui/tabs/tabs-list.svelte +40 -40
  130. package/dist/components/ui/tabs/tabs-trigger.svelte +23 -23
  131. package/dist/components/ui/tabs/tabs.svelte +19 -19
  132. package/dist/globals.css +143 -15
  133. package/dist/hooks/responsive.svelte.d.ts +1 -1
  134. package/dist/hooks/responsive.svelte.js +1 -1
  135. package/dist/index.d.ts +2 -2
  136. package/dist/index.js +2 -2
  137. package/dist/styles/globals.css +149 -149
  138. package/package.json +113 -113
  139. package/dist/components/core/carousel/shared/ui/SimpleBadgeCarousel.svelte.d.ts +0 -4
@@ -1,8 +1,10 @@
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',
7
+ content: "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).",
6
8
  isFavorite: true,
7
9
  newPrice: 1000,
8
10
  oldPrice: 2000,
@@ -10,22 +12,34 @@ const items = [
10
12
  onClickBuy: () => alert('Comprar'),
11
13
  onClickShop: (id) => alert(`Shop ${id}`),
12
14
  isCart: true,
15
+ tags: [
16
+ { icon: GlobalIcon, text: 'Luanda', },
17
+ { icon: MapPin, text: 'Kilamba', },
18
+ { icon: NecklaceIcon, text: 'Rua 19', },
19
+ ]
13
20
  },
14
21
  {
15
22
  id: 2,
16
23
  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',
17
24
  title: 'Miramar Suites',
25
+ content: "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).",
18
26
  newPrice: 1000,
19
27
  oldPrice: 2000,
20
28
  buttonBuyText: 'Comprar',
21
29
  onClickBuy: (id) => alert(`Buy ${id}`),
22
30
  onClickShop: (id) => alert(`Shop ${id}`),
23
31
  isCart: true,
32
+ tags: [
33
+ { icon: GlobalIcon, text: 'Luanda', },
34
+ { icon: MapPin, text: 'Kilamba', },
35
+ { icon: NecklaceIcon, text: 'Rua 19', },
36
+ ]
24
37
  },
25
38
  {
26
39
  id: 3,
27
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',
28
41
  title: 'Palm Resort & Spa',
42
+ content: "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).",
29
43
  isFavorite: true,
30
44
  newPrice: 1000,
31
45
  oldPrice: 2000,
@@ -33,22 +47,34 @@ const items = [
33
47
  onClickBuy: (id) => alert(`Buy ${id}`),
34
48
  onClickShop: (id) => alert(`Shop ${id}`),
35
49
  isCart: true,
50
+ tags: [
51
+ { icon: GlobalIcon, text: 'Luanda', },
52
+ { icon: MapPin, text: 'Kilamba', },
53
+ { icon: NecklaceIcon, text: 'Rua 19', },
54
+ ]
36
55
  },
37
56
  {
38
57
  id: 4,
39
58
  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',
40
59
  title: 'Hotel Central Park',
60
+ content: "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).",
41
61
  newPrice: 1000,
42
62
  oldPrice: 2000,
43
63
  buttonBuyText: 'Comprar',
44
64
  onClickBuy: (id) => alert(`Buy ${id}`),
45
65
  onClickShop: (id) => alert(`Shop ${id}`),
46
66
  isCart: true,
67
+ tags: [
68
+ { icon: GlobalIcon, text: 'Luanda', },
69
+ { icon: MapPin, text: 'Kilamba', },
70
+ { icon: NecklaceIcon, text: 'Rua 19', },
71
+ ]
47
72
  },
48
73
  {
49
74
  id: 5,
50
75
  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',
51
76
  title: 'Villa Serena Boutique',
77
+ content: "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).",
52
78
  isFavorite: true,
53
79
  newPrice: 1000,
54
80
  oldPrice: 2000,
@@ -56,6 +82,11 @@ const items = [
56
82
  onClickBuy: (id) => alert(`Buy ${id}`),
57
83
  onClickShop: (id) => alert(`Shop ${id}`),
58
84
  isCart: true,
85
+ tags: [
86
+ { icon: GlobalIcon, text: 'Luanda', },
87
+ { icon: MapPin, text: 'Kilamba', },
88
+ { icon: NecklaceIcon, text: 'Rua 19', },
89
+ ]
59
90
  },
60
91
  ];
61
92
  export default items;
@@ -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,32 +1,36 @@
1
- <script lang="ts">
2
- import { Button } from "../../../ui/button/index.js";
3
- import {
4
- ShoppingCartAdd01Icon,
5
- ShoppingCartRemove01Icon,
6
- } from "@hugeicons/core-free-icons";
7
- import { HugeiconsIcon } from "@hugeicons/svelte";
8
-
9
- type Props = {
10
- id: string | number;
11
- isCart: boolean;
12
- onCartClick?: (id: string | number) => void;
13
- };
14
-
15
- let { id, isCart, onCartClick }: Props = $props();
16
- </script>
17
-
18
- {#if isCart}
19
- <Button
20
- class="w-8 h-8 rounded-full bg-[#1d63be]"
21
- onclick={() => onCartClick!(id)}
22
- >
23
- <HugeiconsIcon icon={ShoppingCartRemove01Icon} />
24
- </Button>
25
- {:else}
26
- <Button
27
- class="w-8 h-8 rounded-full bg-[#808080]"
28
- onclick={() => onCartClick!(id)}
29
- >
30
- <HugeiconsIcon icon={ShoppingCartAdd01Icon} />
31
- </Button>
32
- {/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,6 +1,7 @@
1
1
  type Props = {
2
2
  id: string | number;
3
3
  isCart: boolean;
4
+ isLoading?: boolean;
4
5
  onCartClick?: (id: string | number) => void;
5
6
  };
6
7
  declare const CardCart: import("svelte").Component<Props, {}, "">;
@@ -1,23 +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
-
7
- type CardDescriptionProps = {
8
- content?: string;
9
- };
10
-
11
- let { content }: CardDescriptionProps = $props();
12
- </script>
13
-
14
- {#if content}
15
- <div class="mb-1 text-[14px] flex items-center gap-1">
16
- <HugeiconsIcon icon={Message01Icon} class="h-4 w-4" />
17
- <div>{$t("label.description")}</div>
18
- </div>
19
- <TruncatableText
20
- text={content}
21
- class="text-justify text-[13px] text-gray-800 dark:text-gray-50 mt-3 my-4"
22
- />
23
- {/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,5 +1,8 @@
1
1
  type CardDescriptionProps = {
2
2
  content?: string;
3
+ isLoading?: boolean;
4
+ isDescriptionIcon?: boolean;
5
+ isDescriptionLabel?: boolean;
3
6
  };
4
7
  declare const CardDescription: import("svelte").Component<CardDescriptionProps, {}, "">;
5
8
  type CardDescription = ReturnType<typeof CardDescription>;
@@ -1,29 +1,33 @@
1
- <script lang="ts">
2
- import { Button } from "../../../ui/button/index.js";
3
- import { HeartAddIcon, HeartRemoveIcon } from "@hugeicons/core-free-icons";
4
- import { HugeiconsIcon } from "@hugeicons/svelte";
5
-
6
- type Props = {
7
- id: string | number;
8
- isFavorite: boolean;
9
- onFavoriteClick?: (id: string | number) => void;
10
- };
11
-
12
- let { id, isFavorite, onFavoriteClick }: Props = $props();
13
- </script>
14
-
15
- {#if isFavorite}
16
- <Button
17
- class="w-8 h-8 rounded-full bg-[#ce2356]"
18
- onclick={() => onFavoriteClick!(id)}
19
- >
20
- <HugeiconsIcon icon={HeartRemoveIcon} />
21
- </Button>
22
- {:else}
23
- <Button
24
- class="w-8 h-8 rounded-full bg-[#808080]"
25
- onclick={() => onFavoriteClick!(id)}
26
- >
27
- <HugeiconsIcon icon={HeartAddIcon} />
28
- </Button>
29
- {/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,6 +1,7 @@
1
1
  type Props = {
2
2
  id: string | number;
3
3
  isFavorite: boolean;
4
+ isLoading?: boolean;
4
5
  onFavoriteClick?: (id: string | number) => void;
5
6
  };
6
7
  declare const CardFavorite: import("svelte").Component<Props, {}, "">;
@@ -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}
@@ -0,0 +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>
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ newPrice?: string | number;
3
+ oldPrice?: string | number;
4
+ type?: "start" | "normal";
5
+ };
6
+ declare const CardStartPrice: import("svelte").Component<Props, {}, "">;
7
+ type CardStartPrice = ReturnType<typeof CardStartPrice>;
8
+ export default CardStartPrice;
@@ -1,56 +1,73 @@
1
- <script lang="ts">
2
- import { HugeiconsIcon } from "@hugeicons/svelte";
3
- import type { CardTagsProps } from "../types";
4
-
5
- type Props = {
6
- className?: string;
7
- tags: CardTagsProps[];
8
- isTagBorderBottom?: boolean;
9
- isWrap?: boolean;
10
- };
11
-
12
- const {
13
- tags,
14
- className,
15
- isTagBorderBottom,
16
- isWrap = false,
17
- }: Props = $props();
18
-
19
- let isJustify = $derived(tags.length == 2 || tags.length == 3);
20
- </script>
21
-
22
- {#snippet createBadge(tag: CardTagsProps)}
23
- <div
24
- class="flex items-center h-5 shrink-0 {isTagBorderBottom
25
- ? 'border border-gray-200 rounded-full px-2 py-1'
26
- : ''}"
27
- >
28
- {#if tag.icon}
29
- <HugeiconsIcon
30
- icon={tag.icon}
31
- class="mr-0.5 h-3.75 w-3.75 shrink-0"
32
- />
33
- {/if}
34
- <div class="whitespace-nowrap">{tag.text}</div>
35
- </div>
36
- {/snippet}
37
-
38
- {#if tags && tags.length > 0}
39
- {#if isWrap}
40
- <div class="flex flex-wrap gap-2 md:gap-5 {className}">
41
- {#each tags as tag, i (i)}
42
- {@render createBadge(tag)}
43
- {/each}
44
- </div>
45
- {:else}
46
- <div class="flex overflow-x-auto no-scrollbar w-full
47
- {isJustify ? 'justify-between' : 'gap-4 md:gap-5 lg:gap-10'}
48
- {className}">
49
- {#each tags as tag, i (i)}
50
- {@render createBadge(tag)}
51
- {/each}
52
- </div>
53
- {/if}
54
- {:else}
55
- <div class="w-full h-5 {className}"></div>
56
- {/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}
@@ -1,9 +1,10 @@
1
1
  import type { CardTagsProps } from "../types";
2
2
  type Props = {
3
3
  className?: string;
4
- tags: CardTagsProps[];
4
+ tags?: CardTagsProps[];
5
5
  isTagBorderBottom?: boolean;
6
6
  isWrap?: boolean;
7
+ isLoading?: boolean;
7
8
  };
8
9
  declare const CardTags: import("svelte").Component<Props, {}, "">;
9
10
  type CardTags = ReturnType<typeof CardTags>;