negodesign 0.0.27 → 0.0.29

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 (55) hide show
  1. package/dist/assets/placeholder-company.png +0 -0
  2. package/dist/assets/placeholder-image.png +0 -0
  3. package/dist/components/core/banner/BannerNotification.svelte +94 -0
  4. package/dist/components/core/banner/BannerNotification.svelte.d.ts +4 -0
  5. package/dist/components/core/banner/CardAdBanner.svelte +74 -0
  6. package/dist/components/core/banner/CardAdBanner.svelte.d.ts +4 -0
  7. package/dist/components/core/banner/types.d.ts +42 -0
  8. package/dist/components/core/banner/types.js +1 -0
  9. package/dist/components/core/card/highlight/01/CardHighlight01.svelte +29 -6
  10. package/dist/components/core/card/highlight/02/CardHighlight02.svelte +27 -10
  11. package/dist/components/core/card/media/01/CardMedia01.svelte +124 -98
  12. package/dist/components/core/card/media/02/CardMedia02.svelte +125 -99
  13. package/dist/components/core/card/media/CardMedia.svelte +10 -9
  14. package/dist/components/core/card/media/CardMedia.svelte.d.ts +1 -0
  15. package/dist/components/core/card/profile/01/CardProfile01.svelte +104 -86
  16. package/dist/components/core/card/profile/02/CardProfile02.svelte +103 -87
  17. package/dist/components/core/card/profile/CardProfile.svelte +8 -7
  18. package/dist/components/core/card/profile/CardProfile.svelte.d.ts +1 -0
  19. package/dist/components/core/card/promotion/CardPromotion.svelte +30 -7
  20. package/dist/components/core/card/shared/CardButton.svelte +30 -21
  21. package/dist/components/core/card/shared/CardButton.svelte.d.ts +1 -0
  22. package/dist/components/core/card/shared/CardDescription.svelte +30 -30
  23. package/dist/components/core/card/shared/CardStarRating.svelte +18 -14
  24. package/dist/components/core/card/shared/CardStarRating.svelte.d.ts +1 -0
  25. package/dist/components/core/card/shared/CardStartPrice.svelte +26 -28
  26. package/dist/components/core/card/shared/CardTags.svelte +54 -57
  27. package/dist/components/core/card/shared/CardThumbnailVideo.svelte +207 -148
  28. package/dist/components/core/card/shared/CardThumbnailVideo.svelte.d.ts +1 -0
  29. package/dist/components/core/card/types.d.ts +2 -0
  30. package/dist/components/core/carousel/grid/media/types.d.ts +10 -0
  31. package/dist/components/core/carousel/grid/media/types.js +1 -0
  32. package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte +48 -0
  33. package/dist/components/core/carousel/grid/media/ui/CarouselGridMedia.svelte.d.ts +4 -0
  34. package/dist/components/core/carousel/grid/profile/types.d.ts +10 -0
  35. package/dist/components/core/carousel/grid/profile/types.js +1 -0
  36. package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte +51 -0
  37. package/dist/components/core/carousel/grid/profile/ui/CarouselGridProfile.svelte.d.ts +4 -0
  38. package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte +38 -0
  39. package/dist/components/core/carousel/grid/shared/ui/CarouselGridSlot.svelte.d.ts +10 -0
  40. package/dist/components/core/carousel/hero/CarouselHero.svelte +21 -19
  41. package/dist/components/core/carousel/hero/CarouselHero.svelte.d.ts +1 -0
  42. package/dist/components/core/carousel/highlights/types.d.ts +4 -4
  43. package/dist/components/core/carousel/highlights/ui/CarouselHighlights.svelte +6 -22
  44. package/dist/components/core/carousel/promotion/types.d.ts +5 -5
  45. package/dist/components/core/carousel/promotion/ui/CarouselPromotion.svelte +6 -23
  46. package/dist/components/core/carousel/shared/ui/CarouselHeader.svelte +6 -1
  47. package/dist/components/core/carousel/types.d.ts +1 -0
  48. package/dist/components/core/panel/CarouselSlot.svelte +3 -14
  49. package/dist/components/core/panel/CarouselSlot.svelte.d.ts +2 -12
  50. package/dist/components/core/panel/type.d.ts +11 -0
  51. package/dist/components/core/panel/type.js +1 -0
  52. package/dist/globals.css +358 -83
  53. package/dist/index.d.ts +15 -5
  54. package/dist/index.js +15 -5
  55. package/package.json +1 -1
@@ -1,98 +1,114 @@
1
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 { CardProfileProps } from "../../types";
12
- import CardStarRating from "../../shared/CardStarRating.svelte";
13
- import CardTags from "../../shared/CardTags.svelte";
14
- import CardDescription from "../../shared/CardDescription.svelte";
15
- import CardButton from "../../shared/CardButton.svelte";
16
- import CardFavorite from "../../shared/CardFavorite.svelte";
17
- let {
18
- id,
19
- tags,
20
- logo,
21
- title,
22
- content,
23
- className,
24
- startNumber,
25
- startMax = 5,
26
- isTagBorderBottom = true,
27
- isFavorite = false,
28
- buttonProfileClass,
29
- buttonDetailsClass,
30
- onFavoriteClick,
31
- onButtonProfile,
32
- onButtonDetails,
33
- }: CardProfileProps = $props();
2
+ /**
3
+ * Card component with a title and content.
4
+ * @component
5
+ */
6
+ import { InformationCircleIcon, UserIcon } from "@hugeicons/core-free-icons";
7
+ import { t } from "../../../../../i18n";
8
+ import type { CardProfileProps } from "../../types";
9
+ import CardStarRating from "../../shared/CardStarRating.svelte";
10
+ import CardTags from "../../shared/CardTags.svelte";
11
+ import CardDescription from "../../shared/CardDescription.svelte";
12
+ import CardButton from "../../shared/CardButton.svelte";
13
+ import CardFavorite from "../../shared/CardFavorite.svelte";
14
+ import Skeleton from "../../../../ui/skeleton/skeleton.svelte";
15
+ let {
16
+ id,
17
+ tags,
18
+ logo,
19
+ title,
20
+ content,
21
+ className,
22
+ startNumber,
23
+ startMax = 5,
24
+ isTagBorderBottom = true,
25
+ isFavorite = false,
26
+ buttonProfileClass,
27
+ buttonDetailsClass,
28
+ isLoading = false,
29
+ onFavoriteClick,
30
+ onButtonProfile,
31
+ onButtonDetails,
32
+ }: CardProfileProps = $props();
34
33
 
35
- let isShowButtonProfileAndDetails = $derived(
36
- onButtonProfile != null && onButtonDetails != null,
37
- );
34
+ let isShowButtonProfileAndDetails = $derived(
35
+ onButtonProfile != null && onButtonDetails != null,
36
+ );
38
37
  </script>
39
38
 
40
39
  <article
41
- 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 {className}"
40
+ 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 {className}"
42
41
  >
43
- <div class="flex flex-col justify-center items-center w-full relative">
44
- <div class="flex flex-col justify-start gap-2">
45
- <div class="flex justify-center items-center">
46
- {#if logo}
47
- <img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
48
- {/if}
49
- </div>
50
- <div class="flex flex-col justify-center items-center">
51
- {#if title}
52
- <div class="text-center font-bold text-lg">{title}</div>
53
- {/if}
54
- {#if startNumber}
55
- <CardStarRating {startNumber} {startMax} />
56
- {/if}
57
- </div>
58
- </div>
59
- <div class="flex justify-end items-center absolute top-0 right-0">
60
- <CardFavorite
61
- {id}
62
- {isFavorite}
63
- onFavoriteClick={() => onFavoriteClick!(id)}
64
- />
65
- </div>
66
- </div>
42
+ <div class="flex flex-col justify-center items-center w-full relative">
43
+ <div class="flex flex-col justify-start gap-2">
44
+ <div class="flex justify-center items-center">
45
+ {#if isLoading}
46
+ <Skeleton class="w-12 h-12 rounded-lg bg-gray-400 mt-0.5" />
47
+ {:else if logo}
48
+ <img src={logo} alt={logo} class="w-12 h-12 rounded-lg" />
49
+ {/if}
50
+ </div>
51
+ <div class="flex flex-col justify-center items-center">
52
+ {#if title}
53
+ <div class="text-center font-bold text-lg">{title}</div>
54
+ {:else if isLoading}
55
+ <Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
56
+ {/if}
67
57
 
68
- <div class="h-15 mb-8">
69
- <CardDescription {content} />
58
+ {#if startNumber}
59
+ <CardStarRating {startNumber} {startMax} {isLoading} />
60
+ {:else if isLoading}
61
+ <Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
62
+ {/if}
63
+ </div>
64
+ </div>
65
+ <div class="flex justify-end items-center absolute top-0 right-0">
66
+ <CardFavorite
67
+ {id}
68
+ {isFavorite}
69
+ onFavoriteClick={() => onFavoriteClick!(id)}
70
+ {isLoading}
71
+ />
70
72
  </div>
73
+ </div>
71
74
 
72
- <CardTags className="my-4" tags={tags ?? []} {isTagBorderBottom} />
75
+ <div class="h-15 mb-8">
76
+ <CardDescription {content} {isLoading} />
77
+ </div>
73
78
 
74
- {#if onButtonProfile || onButtonDetails}
75
- <div class="flex justify-center items-center gap-2 mt-4 w-full">
76
- {#if onButtonProfile}
77
- <CardButton
78
- {id}
79
- icon={UserIcon}
80
- className={buttonProfileClass}
81
- text={$t("label.view.profile")}
82
- onClick={onButtonProfile}
83
- isFlex={isShowButtonProfileAndDetails}
84
- />
85
- {/if}
86
- {#if onButtonDetails}
87
- <CardButton
88
- {id}
89
- icon={InformationCircleIcon}
90
- className={buttonDetailsClass}
91
- text={$t("label.more.details")}
92
- onClick={onButtonDetails}
93
- isFlex={isShowButtonProfileAndDetails}
94
- />
95
- {/if}
96
- </div>
97
- {/if}
79
+ <CardTags
80
+ className="my-4"
81
+ tags={tags ?? []}
82
+ {isTagBorderBottom}
83
+ {isLoading}
84
+ />
85
+
86
+ {#if onButtonProfile || onButtonDetails}
87
+ <div class="flex justify-center items-center gap-2 mt-4 w-full">
88
+ {#if onButtonProfile}
89
+ <CardButton
90
+ {id}
91
+ icon={UserIcon}
92
+ className={buttonProfileClass}
93
+ text={$t("label.view.profile")}
94
+ onClick={onButtonProfile}
95
+ isFlex={isShowButtonProfileAndDetails}
96
+ />
97
+ {:else if isLoading}
98
+ <Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
99
+ {/if}
100
+ {#if onButtonDetails}
101
+ <CardButton
102
+ {id}
103
+ icon={InformationCircleIcon}
104
+ className={buttonDetailsClass}
105
+ text={$t("label.more.details")}
106
+ onClick={onButtonDetails}
107
+ isFlex={isShowButtonProfileAndDetails}
108
+ />
109
+ {:else if isLoading}
110
+ <Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
111
+ {/if}
112
+ </div>
113
+ {/if}
98
114
  </article>
@@ -1,13 +1,14 @@
1
1
  <script lang="ts">
2
- import type { CardProfileProps } from "../types";
3
- import CardProfile01 from "./01/CardProfile01.svelte";
4
- import CardProfile02 from "./02/CardProfile02.svelte";
2
+ import type { CardProfileProps } from "../types";
3
+ import CardProfile01 from "./01/CardProfile01.svelte";
4
+ import CardProfile02 from "./02/CardProfile02.svelte";
5
5
 
6
- type Props = {
7
- variant?: 1 | 2;
8
- };
6
+ type Props = {
7
+ variant?: 1 | 2;
8
+ isLoading?: boolean;
9
+ };
9
10
 
10
- let { variant, ...restProps }: CardProfileProps & Props = $props();
11
+ let { variant, isLoading, ...restProps }: CardProfileProps & Props = $props();
11
12
  </script>
12
13
 
13
14
  {#if variant === 2}
@@ -1,6 +1,7 @@
1
1
  import type { CardProfileProps } from "../types";
2
2
  type Props = {
3
3
  variant?: 1 | 2;
4
+ isLoading?: boolean;
4
5
  };
5
6
  type $$ComponentProps = CardProfileProps & Props;
6
7
  declare const CardProfile: import("svelte").Component<$$ComponentProps, {}, "">;
@@ -7,6 +7,9 @@
7
7
  import CardFavorite from "../shared/CardFavorite.svelte";
8
8
  import CardStartPrice from "../shared/CardStartPrice.svelte";
9
9
  import CardTags from "../shared/CardTags.svelte";
10
+ import ImgPlaceHolderGallery from "../../../../assets/placeholder-image.png";
11
+ import ImgPlaceholderCompany from "../../../../assets/placeholder-company.png";
12
+
10
13
  /**
11
14
  * Card component with a title and content.
12
15
  * @component
@@ -40,7 +43,23 @@
40
43
  {#if isLoading}
41
44
  <Skeleton class="h-5 w-20 rounded-full bg-black/20" />
42
45
  {:else if logo}
43
- <img src={logo} width={30} height={30} alt={title} class="rounded-lg" />
46
+ <img
47
+ src={logo}
48
+ width={30}
49
+ height={30}
50
+ alt={title}
51
+ onerror={(e) =>
52
+ ((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
53
+ class="rounded-lg"
54
+ />
55
+ {:else}
56
+ <img
57
+ src={ImgPlaceholderCompany}
58
+ width={30}
59
+ height={30}
60
+ alt={title}
61
+ class="rounded-lg"
62
+ />
44
63
  {/if}
45
64
  </div>
46
65
 
@@ -56,13 +75,15 @@
56
75
 
57
76
  {#if isLoading}
58
77
  <Skeleton
59
- class="rounded-lg md:h-25 md:w-25 lg:h-45 lg:w-45 object-cover object-center bg-black/15"
78
+ class="rounded-lg h-30 w-full object-cover object-center bg-black/15"
60
79
  />
61
80
  {:else if imageUrl}
62
81
  <img
63
82
  src={imageUrl}
64
83
  alt={imageUrl}
65
- class="rounded-tr-lg rounded-tl-lg h-25 lg:h-45 w-full object-cover object-center"
84
+ class="rounded-tr-lg rounded-tl-lg h-36 w-full object-cover object-center"
85
+ onerror={(e) =>
86
+ ((e.target as HTMLImageElement).src = ImgPlaceHolderGallery)}
66
87
  />
67
88
  {/if}
68
89
  <div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
@@ -87,9 +108,11 @@
87
108
  <CardDescription {content} {isDescriptionIcon} {isDescriptionLabel} />
88
109
  </div>
89
110
 
90
- <div class="w-full mb-3">
91
- <CardTags {tags} />
92
- </div>
111
+ {#if tags && tags.length > 0}
112
+ <div class="w-full mb-2">
113
+ <CardTags {tags} />
114
+ </div>
115
+ {/if}
93
116
 
94
117
  <div class="flex justify-start gap-2 w-full">
95
118
  {#if isLoading}
@@ -104,7 +127,7 @@
104
127
  {#if isLoading}
105
128
  <Skeleton class="h-9 w-full rounded-md" />
106
129
  {:else}
107
- <Button onclick={() => onClickBuy!(id)} class="w-full">
130
+ <Button onclick={() => onClickBuy!(id)} class="w-full bottom-0">
108
131
  {buttonBuyText || $t("label.buy")}
109
132
  </Button>
110
133
  {/if}
@@ -1,30 +1,39 @@
1
1
  <script lang="ts">
2
- import { Button } from "../../../ui/button/index.js";
3
- import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
2
+ import { Button } from "../../../ui/button/index.js";
3
+ import Skeleton from "../../../ui/skeleton/skeleton.svelte";
4
+ import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/svelte";
4
5
 
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
- };
6
+ type CardButtonProps = {
7
+ id: string | number;
8
+ icon: IconSvgElement;
9
+ isFlex?: boolean;
10
+ className?: string;
11
+ text: string;
12
+ isLoading?: boolean;
13
+ onClick: (id: string | number) => void;
14
+ };
13
15
 
14
- let {
15
- id,
16
- icon,
17
- isFlex,
18
- className,
19
- text,
20
- onClick
21
- }: CardButtonProps = $props();
16
+ let {
17
+ id,
18
+ icon,
19
+ isFlex,
20
+ className,
21
+ text,
22
+ isLoading,
23
+ onClick,
24
+ }: CardButtonProps = $props();
22
25
  </script>
23
26
 
24
- <Button
27
+ {#if isLoading}
28
+ <Skeleton
29
+ class="w-full h-7.5 rounded-lg bg-gray-500/80 dark:bg-gray-500/30"
30
+ />
31
+ {:else}
32
+ <Button
25
33
  class="{isFlex ? 'flex-1' : ''} {className}"
26
34
  onclick={() => onClick(id)}
27
- >
35
+ >
28
36
  <HugeiconsIcon {icon} />
29
37
  <span>{text}</span>
30
- </Button>
38
+ </Button>
39
+ {/if}
@@ -5,6 +5,7 @@ type CardButtonProps = {
5
5
  isFlex?: boolean;
6
6
  className?: string;
7
7
  text: string;
8
+ isLoading?: boolean;
8
9
  onClick: (id: string | number) => void;
9
10
  };
10
11
  declare const CardButton: import("svelte").Component<CardButtonProps, {}, "">;
@@ -1,38 +1,38 @@
1
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";
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
7
 
8
- type CardDescriptionProps = {
9
- content?: string;
10
- isLoading?: boolean;
11
- isDescriptionIcon?: boolean;
12
- isDescriptionLabel?: boolean;
13
- };
8
+ type CardDescriptionProps = {
9
+ content?: string;
10
+ isLoading?: boolean;
11
+ isDescriptionIcon?: boolean;
12
+ isDescriptionLabel?: boolean;
13
+ };
14
14
 
15
- let {
16
- content,
17
- isLoading = false,
18
- isDescriptionIcon = true,
19
- isDescriptionLabel = true,
20
- }: CardDescriptionProps = $props();
15
+ let {
16
+ content,
17
+ isLoading = false,
18
+ isDescriptionIcon = true,
19
+ isDescriptionLabel = true,
20
+ }: CardDescriptionProps = $props();
21
21
  </script>
22
22
 
23
23
  {#if isLoading}
24
- <Skeleton class="w-full h-5" />
24
+ <Skeleton class="w-full h-full bg-gray-500/89" />
25
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
- />
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}11
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
38
  {/if}
@@ -1,20 +1,24 @@
1
1
  <script lang="ts">
2
- import * as StarRating from "../../../ui/star-rating";
2
+ import Skeleton from "../../../ui/skeleton/skeleton.svelte";
3
+ import * as StarRating from "../../../ui/star-rating";
3
4
 
4
- type Props = {
5
- startNumber: number;
6
- startMax: number;
7
- };
5
+ type Props = {
6
+ startNumber: number;
7
+ startMax: number;
8
+ isLoading?: boolean;
9
+ };
8
10
 
9
- let { startNumber, startMax }: Props = $props();
11
+ let { startNumber, startMax, isLoading }: Props = $props();
10
12
  </script>
11
13
 
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>
14
+ {#if isLoading}
15
+ <Skeleton class="w-12 h-6 rounded-lg bg-gray-300/90" />
16
+ {:else if startNumber}
17
+ <StarRating.Root max={startMax} value={startNumber} class="size-15 h-auto">
18
+ {#snippet children({ items })}
19
+ {#each items as item (item.index)}
20
+ <StarRating.Star {...item} class="py-0! my-0!" />
21
+ {/each}
22
+ {/snippet}
23
+ </StarRating.Root>
20
24
  {/if}
@@ -1,6 +1,7 @@
1
1
  type Props = {
2
2
  startNumber: number;
3
3
  startMax: number;
4
+ isLoading?: boolean;
4
5
  };
5
6
  declare const CardStarRating: import("svelte").Component<Props, {}, "">;
6
7
  type CardStarRating = ReturnType<typeof CardStarRating>;
@@ -1,34 +1,32 @@
1
1
  <script lang="ts">
2
- import StartBg from "../../../../assets/start.png";
2
+ import StartBg from "../../../../assets/start.png";
3
3
 
4
- type Props = {
5
- newPrice?: string | number;
6
- oldPrice?: string | number;
7
- type?: "start" | "normal";
8
- };
4
+ type Props = {
5
+ newPrice?: string | number;
6
+ oldPrice?: string | number;
7
+ type?: "start" | "normal";
8
+ };
9
9
 
10
- let { newPrice, oldPrice, type = "normal" }: Props = $props();
10
+ let { newPrice, oldPrice, type = "normal" }: Props = $props();
11
11
  </script>
12
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}
13
+ <div class="relative min-w-25 md:min-w-32 ml-0 pl-0">
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 text-lg">{newPrice}</div>
24
+ <div class="mx-2">/</div>
25
+ <div class="font-semibold line-through text-red-600 text-[10px]">
26
+ {oldPrice}
27
+ </div>
28
+ </div>
29
+ {:else}
30
+ <div class="z-20 font-bold">{newPrice}</div>
31
+ {/if}
34
32
  </div>