negodesign 0.0.80 → 0.0.82
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/README.md +133 -133
- package/dist/components/NegoDesign.svelte +21 -21
- 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/product-details/shared/ProductDetailFilesVertical.svelte +103 -103
- package/dist/components/pages/profile-user/shared/ProfileUserAddress.svelte +83 -83
- package/dist/components/pages/profile-user/shared/ProfileUserTabs.svelte +80 -80
- package/dist/components/pages/security/auth/PageAuth01.svelte +62 -62
- package/dist/components/pages/security/auth/PageAuth02.svelte +40 -40
- package/dist/components/pages/security/auth/PageAuth03.svelte +40 -40
- package/dist/components/pages/security/login/01/ui/FormLogin.svelte +91 -63
- package/dist/components/pages/security/login/01/ui/FormLogin.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte +49 -26
- package/dist/components/pages/security/login/01/ui/FormLoginEmailPassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte +49 -26
- package/dist/components/pages/security/login/01/ui/FormLoginPhonePassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte +49 -26
- package/dist/components/pages/security/login/01/ui/FormLoginUsernamePassword.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/LoginCard01.svelte +148 -132
- package/dist/components/pages/security/login/01/ui/LoginCard01.svelte.d.ts +2 -0
- package/dist/components/pages/security/login/01/ui/PageLogin01.svelte +66 -64
- package/dist/components/pages/security/login/02/ui/FormLogin02.svelte +82 -72
- package/dist/components/pages/security/login/02/ui/FormLogin02.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte +27 -26
- package/dist/components/pages/security/login/02/ui/FormLoginEmailPassword02.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte +27 -26
- package/dist/components/pages/security/login/02/ui/FormLoginPhonePassword02.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte +27 -26
- package/dist/components/pages/security/login/02/ui/FormLoginUsernamePassword02.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/02/ui/LoginCard02.svelte +15 -2
- package/dist/components/pages/security/login/02/ui/LoginCard02.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/02/ui/PageLogin02.svelte +2 -0
- package/dist/components/pages/security/login/03/ui/FormLogin03.svelte +94 -91
- package/dist/components/pages/security/login/03/ui/FormLogin03.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte +27 -26
- package/dist/components/pages/security/login/03/ui/FormLoginEmailPassword03.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte +27 -26
- package/dist/components/pages/security/login/03/ui/FormLoginPhonePassword03.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte +27 -26
- package/dist/components/pages/security/login/03/ui/FormLoginUsernamePassword03.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/03/ui/LoginCard03.svelte +15 -2
- package/dist/components/pages/security/login/03/ui/LoginCard03.svelte.d.ts +1 -0
- package/dist/components/pages/security/login/03/ui/PageLogin03.svelte +2 -0
- package/dist/components/pages/security/login/PageLogin.svelte +30 -30
- package/dist/components/pages/security/login/types.d.ts +1 -0
- package/dist/components/pages/security/register/01/ui/PageRegister01.svelte +78 -76
- package/dist/components/pages/security/register/01/ui/RegisterCard01.svelte +107 -104
- package/dist/components/pages/security/register/01/ui/RegisterCard01.svelte.d.ts +1 -0
- package/dist/components/pages/security/register/02/ui/PageRegister02.svelte +2 -0
- package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte +3 -1
- package/dist/components/pages/security/register/02/ui/RegisterCard02.svelte.d.ts +1 -0
- package/dist/components/pages/security/register/03/ui/PageRegister03.svelte +2 -0
- package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte +3 -1
- package/dist/components/pages/security/register/03/ui/RegisterCard03.svelte.d.ts +1 -0
- package/dist/components/pages/security/register/FormRegister.svelte +148 -146
- package/dist/components/pages/security/register/FormRegister.svelte.d.ts +1 -0
- package/dist/components/pages/security/register/types.d.ts +1 -0
- package/dist/components/ui/avatar/avatar-fallback.svelte +29 -29
- package/dist/components/ui/avatar/avatar-image.svelte +38 -38
- package/dist/components/ui/avatar/avatar.svelte +39 -39
- package/dist/components/ui/badge/badge.svelte +46 -46
- package/dist/components/ui/banner/AdCardBanner.svelte +74 -74
- package/dist/components/ui/banner/CtaCardBanner.svelte +118 -118
- package/dist/components/ui/banner/CtaCardImageBanner.svelte +94 -94
- package/dist/components/ui/breadcrumb/core/breadcrumb-list.svelte +31 -31
- package/dist/components/ui/button/ButtonBack.svelte +18 -18
- package/dist/components/ui/button/ButtonLogin.svelte +19 -15
- package/dist/components/ui/button/ButtonLoginWith.svelte +57 -57
- package/dist/components/ui/button/ButtonSend.svelte +15 -15
- package/dist/components/ui/button/button.svelte +100 -86
- package/dist/components/ui/button/button.svelte.d.ts +1 -0
- package/dist/components/ui/card/core/highlight/01/CardHighlight01.svelte +103 -103
- package/dist/components/ui/card/core/highlight/02/CardHighlight02.svelte +99 -99
- package/dist/components/ui/card/core/highlight/CardHighlight.svelte +22 -22
- package/dist/components/ui/card/core/media/01/CardMedia01.svelte +133 -133
- package/dist/components/ui/card/core/media/02/CardMedia02.svelte +127 -127
- package/dist/components/ui/card/core/media/CardMedia.svelte +18 -18
- package/dist/components/ui/card/core/product/01/CardProduct01.svelte +136 -136
- package/dist/components/ui/card/core/product/02/CardProduct02.svelte +124 -124
- package/dist/components/ui/card/core/product/CardProduct.svelte +22 -22
- package/dist/components/ui/card/core/profile/01/CardProfile01.svelte +134 -134
- package/dist/components/ui/card/core/profile/02/CardProfile02.svelte +132 -132
- package/dist/components/ui/card/core/profile/CardProfile.svelte +18 -18
- package/dist/components/ui/card/core/promotion/CardPromotion.svelte +139 -139
- package/dist/components/ui/card/core/promotion/CardPromotionPrice.svelte +32 -32
- package/dist/components/ui/card/core/shared/CardButton.svelte +42 -42
- package/dist/components/ui/card/core/shared/CardCart.svelte +36 -36
- package/dist/components/ui/card/core/shared/CardDescription.svelte +41 -41
- package/dist/components/ui/card/core/shared/CardFavorite.svelte +33 -33
- package/dist/components/ui/card/core/shared/CardLogo.svelte +19 -19
- package/dist/components/ui/card/core/shared/CardPhoneOrWhatsapp.svelte +45 -45
- package/dist/components/ui/card/core/shared/CardStarRating.svelte +24 -24
- package/dist/components/ui/card/core/shared/CardTags.svelte +95 -95
- package/dist/components/ui/card/core/shared/CardThumbnailVideo.svelte +232 -232
- package/dist/components/ui/card/core/shared/CardTitlePrice.svelte +24 -24
- package/dist/components/ui/card/core/shared/TruncatableText.svelte +49 -49
- package/dist/components/ui/carousel/carousel-content.svelte +56 -56
- package/dist/components/ui/carousel/carousel-item.svelte +29 -29
- package/dist/components/ui/carousel/carousel-next.svelte +40 -40
- package/dist/components/ui/carousel/carousel-previous.svelte +40 -40
- package/dist/components/ui/carousel/carousel.svelte +225 -225
- package/dist/components/ui/carousel/core/badge/ui/CarouselBadge.svelte +108 -108
- package/dist/components/ui/carousel/core/grid/shared/ui/CarouselGridSlot.svelte +38 -38
- package/dist/components/ui/carousel/core/hero/ui/CarouselHero.svelte +181 -181
- package/dist/components/ui/carousel/core/highlights/ui/CarouselHighlights.svelte +67 -67
- package/dist/components/ui/carousel/core/product/ui/CarouselProduct.svelte +57 -57
- package/dist/components/ui/carousel/core/promotion/ui/CarouselPromotion.svelte +67 -67
- package/dist/components/ui/carousel/core/shared/ui/CarouselHeader.svelte +59 -59
- package/dist/components/ui/checkbox/checkbox.svelte +96 -96
- package/dist/components/ui/collapsible/collapsible-content.svelte +30 -30
- package/dist/components/ui/collapsible/collapsible-trigger.svelte +51 -51
- package/dist/components/ui/collapsible/collapsible.svelte +66 -66
- package/dist/components/ui/data-table/flex-render.svelte +40 -40
- package/dist/components/ui/datatable/ui/DataTableActions.svelte +28 -28
- package/dist/components/ui/datatable/ui/DataTableCheckbox.svelte +22 -22
- package/dist/components/ui/datatable/ui/DataTableContent.svelte +59 -59
- package/dist/components/ui/datatable/ui/DataTableCore.svelte +148 -148
- package/dist/components/ui/datatable/ui/DataTableDragHandle.svelte +8 -8
- package/dist/components/ui/datatable/ui/DataTableListFilter.svelte +60 -60
- package/dist/components/ui/datatable/ui/DataTableListPagination.svelte +35 -35
- package/dist/components/ui/drawer/drawer-close.svelte +41 -41
- package/dist/components/ui/drawer/drawer-content.svelte +81 -81
- package/dist/components/ui/drawer/drawer-description.svelte +19 -19
- 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 +34 -34
- package/dist/components/ui/drawer/drawer-overlay.svelte +25 -25
- package/dist/components/ui/drawer/drawer-portal.svelte +19 -19
- package/dist/components/ui/drawer/drawer-title.svelte +19 -19
- package/dist/components/ui/drawer/drawer-trigger.svelte +42 -42
- package/dist/components/ui/drawer/drawer.svelte +74 -74
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-group.svelte +25 -25
- package/dist/components/ui/dropdown-menu/dropdown-menu-checkbox-item.svelte +69 -69
- package/dist/components/ui/dropdown-menu/dropdown-menu-content.svelte +106 -106
- package/dist/components/ui/dropdown-menu/dropdown-menu-group-heading.svelte +27 -27
- package/dist/components/ui/dropdown-menu/dropdown-menu-group.svelte +21 -21
- package/dist/components/ui/dropdown-menu/dropdown-menu-item.svelte +60 -60
- package/dist/components/ui/dropdown-menu/dropdown-menu-label.svelte +27 -27
- package/dist/components/ui/dropdown-menu/dropdown-menu-portal.svelte +6 -6
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-group.svelte +43 -43
- package/dist/components/ui/dropdown-menu/dropdown-menu-radio-item.svelte +70 -70
- package/dist/components/ui/dropdown-menu/dropdown-menu-separator.svelte +20 -20
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-content.svelte +33 -33
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub-trigger.svelte +57 -57
- package/dist/components/ui/dropdown-menu/dropdown-menu-sub.svelte +76 -76
- package/dist/components/ui/dropdown-menu/dropdown-menu-trigger.svelte +68 -68
- package/dist/components/ui/dropdown-menu/dropdown-menu.svelte +53 -53
- package/dist/components/ui/empty/empty-content.svelte +19 -19
- package/dist/components/ui/empty/empty-description.svelte +19 -19
- package/dist/components/ui/empty/empty-header.svelte +19 -19
- package/dist/components/ui/empty/empty-media.svelte +41 -41
- package/dist/components/ui/empty/empty-title.svelte +19 -19
- package/dist/components/ui/empty/empty.svelte +19 -19
- package/dist/components/ui/footer/ui/Footer.svelte +18 -18
- package/dist/components/ui/form/ui/calendar/Calendar.svelte +193 -193
- package/dist/components/ui/form/ui/calendar/CalendarCard.svelte +89 -89
- package/dist/components/ui/form/ui/calendar/DaysGrid.svelte +75 -75
- package/dist/components/ui/form/ui/calendar/MonthSelect.svelte +49 -49
- package/dist/components/ui/form/ui/calendar/YearSelect.svelte +116 -116
- package/dist/components/ui/form/ui/input-base.svelte +83 -83
- package/dist/components/ui/form/ui/input-calendar-interval.svelte +178 -178
- package/dist/components/ui/form/ui/input-calendar.svelte +109 -109
- package/dist/components/ui/form/ui/input-email-or-phone.svelte +23 -23
- package/dist/components/ui/form/ui/input-email.svelte +23 -23
- package/dist/components/ui/form/ui/input-password-confirm.svelte +23 -23
- package/dist/components/ui/form/ui/input-password.svelte +23 -23
- package/dist/components/ui/form/ui/input-phone.svelte +43 -37
- package/dist/components/ui/form/ui/input-select.svelte +246 -246
- package/dist/components/ui/form/ui/input-username.svelte +22 -22
- package/dist/components/ui/grid/core/ui/01/Grid01.svelte +30 -30
- package/dist/components/ui/grid/core/ui/02/Grid02.svelte +30 -30
- package/dist/components/ui/grid/core/ui/ItemsPanel.svelte +26 -26
- package/dist/components/ui/grid/core/ui/ItemsPanelCarousel.svelte +37 -37
- package/dist/components/ui/grid/core/ui/ItemsPanelGrid.svelte +43 -43
- package/dist/components/ui/grid/core/ui/ItemsSimpleGrid.svelte +45 -45
- package/dist/components/ui/grid/core/ui/shared/DescriptionGrid.svelte +23 -23
- package/dist/components/ui/grid/core/ui/shared/IconRenderGrid.svelte +23 -23
- package/dist/components/ui/grid/core/ui/shared/TitleGrid.svelte +19 -19
- package/dist/components/ui/hero/SimpleHero.svelte +65 -65
- package/dist/components/ui/input-otp/input-otp-group.svelte +22 -22
- package/dist/components/ui/input-otp/input-otp-separator.svelte +27 -27
- package/dist/components/ui/input-otp/input-otp-slot.svelte +63 -63
- package/dist/components/ui/input-otp/input-otp.svelte +181 -181
- package/dist/components/ui/label/core/LabelOr.svelte +25 -25
- package/dist/components/ui/label/label.svelte +19 -19
- package/dist/components/ui/language-switcher/language-switcher.svelte +48 -48
- package/dist/components/ui/light-switch/light-switch.svelte +48 -48
- package/dist/components/ui/link/link-forget-password.svelte +12 -12
- package/dist/components/ui/link/link-privacy-polity.svelte +12 -12
- package/dist/components/ui/link/link-terms-of-service.svelte +12 -12
- package/dist/components/ui/modal/core/ui/ModalCore.svelte +132 -132
- package/dist/components/ui/modal/form/index.d.ts +3 -2
- package/dist/components/ui/modal/form/index.js +2 -1
- package/dist/components/ui/modal/form/types.d.ts +41 -0
- package/dist/components/ui/modal/form/ui/ModalForm.svelte +11 -6
- package/dist/components/ui/modal/form/ui/ModalFormEmailOrPhone.svelte +204 -0
- package/dist/components/ui/modal/form/ui/ModalFormEmailOrPhone.svelte.d.ts +4 -0
- package/dist/components/ui/modal/grid/ui/02/ModalGridSelection02.svelte +146 -146
- package/dist/components/ui/modal/share/ui/ModalShareSelection.svelte +156 -156
- package/dist/components/ui/nav/ui/ComplexMenu.svelte +51 -51
- package/dist/components/ui/nav/ui/Menu.svelte +72 -72
- package/dist/components/ui/nav/ui/SimpleMenu.svelte +14 -14
- package/dist/components/ui/nav/ui/mobile/ComplexMenuMobile.svelte +125 -125
- package/dist/components/ui/nav/ui/mobile/MenuMobile.svelte +54 -54
- package/dist/components/ui/nav/ui/shared/MenuButton.svelte +51 -51
- package/dist/components/ui/nav/ui/shared/MenuLinks.svelte +40 -40
- package/dist/components/ui/nav/ui/shared/MenuListItem.svelte +44 -44
- package/dist/components/ui/nav/ui/shared/MenuLogo.svelte +13 -13
- package/dist/components/ui/nav/ui/shared/dropdown/DropdownNavigationMenuItemGrid.svelte +30 -30
- package/dist/components/ui/nav/ui/shared/navigation/NavDropdown.svelte +88 -88
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItem.svelte +17 -17
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemCard.svelte +53 -53
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemGrid.svelte +35 -36
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItemList.svelte +24 -24
- package/dist/components/ui/nav/ui/shared/navigation/NavigationMenuItems.svelte +21 -21
- package/dist/components/ui/panel/CarouselSlot.svelte +57 -57
- package/dist/components/ui/panel/LeftHero.svelte +114 -114
- package/dist/components/ui/panel/NotFoundEmpty.svelte +66 -66
- package/dist/components/ui/phone-input/country-selector.svelte +87 -87
- package/dist/components/ui/phone-input/flag.svelte +11 -11
- package/dist/components/ui/phone-input/phone-input.svelte +163 -163
- package/dist/components/ui/popover/popover-close.svelte +25 -25
- package/dist/components/ui/popover/popover-content.svelte +92 -92
- package/dist/components/ui/popover/popover-portal.svelte +6 -6
- package/dist/components/ui/popover/popover-trigger.svelte +68 -68
- package/dist/components/ui/popover/popover.svelte +53 -53
- package/dist/components/ui/search/SearchInput.svelte +32 -32
- package/dist/components/ui/search/shared/SearchInputCore.svelte +66 -66
- package/dist/components/ui/separator/separator.svelte +28 -28
- package/dist/components/ui/sidebar/core/MenuBarSidebar.svelte +70 -70
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBarSidebar.svelte +97 -97
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuBottomSidebar.svelte +33 -33
- package/dist/components/ui/sidebar/core/ui/navbar/NavMenuTopBarSidebar.svelte +101 -101
- package/dist/components/ui/sidebar/core/ui/navbar/nav-menu-header-sidebar.svelte +77 -77
- package/dist/components/ui/sidebar/sidebar-content.svelte +24 -24
- package/dist/components/ui/sidebar/sidebar-footer.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-group-content.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-menu-action.svelte +38 -38
- package/dist/components/ui/sidebar/sidebar-menu-button.svelte +70 -70
- package/dist/components/ui/sidebar/sidebar-menu-sub-button.svelte +39 -39
- package/dist/components/ui/sidebar/sidebar-provider.svelte +62 -62
- package/dist/components/ui/sidebar/sidebar-rail.svelte +36 -36
- package/dist/components/ui/sidebar/sidebar-separator.svelte +21 -21
- package/dist/components/ui/sidebar/sidebar-trigger.svelte +36 -36
- package/dist/components/ui/sidebar/sidebar.svelte +118 -118
- package/dist/components/ui/skeleton/skeleton.svelte +19 -19
- package/dist/components/ui/star-rating/star-rating-star.svelte +66 -66
- package/dist/components/ui/star-rating/star-rating.svelte +149 -149
- 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/data/TabModel.d.ts +1 -0
- package/dist/components/ui/tabs/ui/tab-underline.svelte +47 -43
- package/dist/components/ui/underline-tabs/underline-tabs-content.svelte +33 -33
- package/dist/components/ui/underline-tabs/underline-tabs-list.svelte +40 -40
- package/dist/components/ui/underline-tabs/underline-tabs-trigger.svelte +91 -91
- package/dist/components/ui/underline-tabs/underline-tabs.svelte +61 -61
- package/dist/docs/ApiTable.svelte +42 -42
- package/dist/docs/CodeBlock.svelte +26 -26
- package/dist/docs/DocsHeader.svelte +25 -25
- package/dist/docs/DocsSidebar.svelte +108 -108
- package/dist/docs/components.js +624 -584
- package/dist/globals.css +27 -7
- package/dist/i18n/langs/en.d.ts +3 -1
- package/dist/i18n/langs/en.js +3 -1
- package/dist/i18n/langs/pt.d.ts +3 -1
- package/dist/i18n/langs/pt.js +3 -1
- package/dist/i18n/translations.d.ts +6 -2
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/styles/globals.css +283 -283
- package/dist/types/index.d.ts +3 -1
- package/package.json +81 -81
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
<script lang="ts">
|
|
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 "../../../../skeleton/skeleton.svelte";
|
|
15
|
-
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
-
import CardPhoneOrWhatsapp from "../../shared/CardPhoneOrWhatsapp.svelte";
|
|
17
|
-
import ImgPlaceholder from "../../../../../../assets/placeholder-image.png";
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
id,
|
|
21
|
-
tags = [],
|
|
22
|
-
title,
|
|
23
|
-
content,
|
|
24
|
-
className,
|
|
25
|
-
startNumber,
|
|
26
|
-
startMax = 5,
|
|
27
|
-
isTagBorderBottom = true,
|
|
28
|
-
isFavorite = false,
|
|
29
|
-
buttonProfileClass,
|
|
30
|
-
onEmailClick,
|
|
31
|
-
onWhatsappClick,
|
|
32
|
-
isLoading = false,
|
|
33
|
-
onFavoriteClick,
|
|
34
|
-
onButtonProfile,
|
|
35
|
-
imageUrl,
|
|
36
|
-
videoUrl,
|
|
37
|
-
isImageButtonMaximized = false,
|
|
38
|
-
isVideoButtonMaximized = false,
|
|
39
|
-
isDescriptionLabel = false,
|
|
40
|
-
isDescriptionIcon = false,
|
|
41
|
-
}: CardProfileProps = $props();
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
<article
|
|
45
|
-
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg space-y-1 md:space-y-3 relative {className}"
|
|
46
|
-
>
|
|
47
|
-
<div class="p-5">
|
|
48
|
-
<div class="flex justify-start items-center w-full relative">
|
|
49
|
-
<div class="flex justify-start gap-2">
|
|
50
|
-
<div class="flex justify-center items-center">
|
|
51
|
-
{#if isLoading}
|
|
52
|
-
<Skeleton class="w-12 h-12 rounded-lg bg-gray-400 mt-0.5" />
|
|
53
|
-
{:else if imageUrl}
|
|
54
|
-
<img
|
|
55
|
-
src={imageUrl}
|
|
56
|
-
alt={imageUrl}
|
|
57
|
-
class="w-12 h-12 rounded-lg"
|
|
58
|
-
onerror={(e) =>
|
|
59
|
-
((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
60
|
-
/>
|
|
61
|
-
{/if}
|
|
62
|
-
</div>
|
|
63
|
-
<div class="flex flex-col justify-start items-start">
|
|
64
|
-
{#if title}
|
|
65
|
-
<div class="text-left font-bold">{title}</div>
|
|
66
|
-
{:else if isLoading}
|
|
67
|
-
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
68
|
-
{/if}
|
|
69
|
-
|
|
70
|
-
{#if startNumber}
|
|
71
|
-
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
72
|
-
{:else if isLoading}
|
|
73
|
-
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
74
|
-
{/if}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div class="flex justify-end items-center absolute top-1 right-1">
|
|
80
|
-
<CardFavorite
|
|
81
|
-
{id}
|
|
82
|
-
{isFavorite}
|
|
83
|
-
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
84
|
-
{isLoading}
|
|
85
|
-
/>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<div class="mb-4">
|
|
89
|
-
<CardDescription
|
|
90
|
-
{content}
|
|
91
|
-
{isLoading}
|
|
92
|
-
{isDescriptionLabel}
|
|
93
|
-
{isDescriptionIcon}
|
|
94
|
-
lines={tags.length == 0 ? 3 : 2}
|
|
95
|
-
/>
|
|
96
|
-
</div>
|
|
97
|
-
|
|
98
|
-
<CardTags
|
|
99
|
-
className="my-2"
|
|
100
|
-
tags={tags ?? []}
|
|
101
|
-
{isTagBorderBottom}
|
|
102
|
-
{isLoading}
|
|
103
|
-
/>
|
|
104
|
-
|
|
105
|
-
<CardThumbnailVideo
|
|
106
|
-
{imageUrl}
|
|
107
|
-
{videoUrl}
|
|
108
|
-
{isImageButtonMaximized}
|
|
109
|
-
{isVideoButtonMaximized}
|
|
110
|
-
{isLoading}
|
|
111
|
-
class="h-32.5 md:h-36 lg:h-44"
|
|
112
|
-
/>
|
|
113
|
-
|
|
114
|
-
{#if onButtonProfile}
|
|
115
|
-
<div class="flex justify-center items-center gap-2 mt-2 -mb-2 w-full">
|
|
116
|
-
{#if onButtonProfile}
|
|
117
|
-
<CardButton
|
|
118
|
-
{id}
|
|
119
|
-
icon={UserIcon}
|
|
120
|
-
className={buttonProfileClass}
|
|
121
|
-
text={$t("label.view.profile")}
|
|
122
|
-
onClick={onButtonProfile}
|
|
123
|
-
isFlex
|
|
124
|
-
/>
|
|
125
|
-
{:else if isLoading}
|
|
126
|
-
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
127
|
-
{/if}
|
|
128
|
-
</div>
|
|
129
|
-
{/if}
|
|
130
|
-
</div>
|
|
131
|
-
<CardPhoneOrWhatsapp {id} {onEmailClick} {onWhatsappClick} />
|
|
132
|
-
</article>
|
|
1
|
+
<script lang="ts">
|
|
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 "../../../../skeleton/skeleton.svelte";
|
|
15
|
+
import CardThumbnailVideo from "../../shared/CardThumbnailVideo.svelte";
|
|
16
|
+
import CardPhoneOrWhatsapp from "../../shared/CardPhoneOrWhatsapp.svelte";
|
|
17
|
+
import ImgPlaceholder from "../../../../../../assets/placeholder-image.png";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
id,
|
|
21
|
+
tags = [],
|
|
22
|
+
title,
|
|
23
|
+
content,
|
|
24
|
+
className,
|
|
25
|
+
startNumber,
|
|
26
|
+
startMax = 5,
|
|
27
|
+
isTagBorderBottom = true,
|
|
28
|
+
isFavorite = false,
|
|
29
|
+
buttonProfileClass,
|
|
30
|
+
onEmailClick,
|
|
31
|
+
onWhatsappClick,
|
|
32
|
+
isLoading = false,
|
|
33
|
+
onFavoriteClick,
|
|
34
|
+
onButtonProfile,
|
|
35
|
+
imageUrl,
|
|
36
|
+
videoUrl,
|
|
37
|
+
isImageButtonMaximized = false,
|
|
38
|
+
isVideoButtonMaximized = false,
|
|
39
|
+
isDescriptionLabel = false,
|
|
40
|
+
isDescriptionIcon = false,
|
|
41
|
+
}: CardProfileProps = $props();
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<article
|
|
45
|
+
class="border border-gray-300 dark:border-gray-700 bg-gray-100 dark:bg-transparent rounded-lg space-y-1 md:space-y-3 relative {className}"
|
|
46
|
+
>
|
|
47
|
+
<div class="p-5">
|
|
48
|
+
<div class="flex justify-start items-center w-full relative">
|
|
49
|
+
<div class="flex justify-start gap-2">
|
|
50
|
+
<div class="flex justify-center items-center">
|
|
51
|
+
{#if isLoading}
|
|
52
|
+
<Skeleton class="w-12 h-12 rounded-lg bg-gray-400 mt-0.5" />
|
|
53
|
+
{:else if imageUrl}
|
|
54
|
+
<img
|
|
55
|
+
src={imageUrl}
|
|
56
|
+
alt={imageUrl}
|
|
57
|
+
class="w-12 h-12 rounded-lg"
|
|
58
|
+
onerror={(e) =>
|
|
59
|
+
((e.target as HTMLImageElement).src = ImgPlaceholder)}
|
|
60
|
+
/>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
63
|
+
<div class="flex flex-col justify-start items-start">
|
|
64
|
+
{#if title}
|
|
65
|
+
<div class="text-left font-bold">{title}</div>
|
|
66
|
+
{:else if isLoading}
|
|
67
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
68
|
+
{/if}
|
|
69
|
+
|
|
70
|
+
{#if startNumber}
|
|
71
|
+
<CardStarRating {startNumber} {startMax} {isLoading} />
|
|
72
|
+
{:else if isLoading}
|
|
73
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-300 mt-0.5" />
|
|
74
|
+
{/if}
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
|
|
79
|
+
<div class="flex justify-end items-center absolute top-1 right-1">
|
|
80
|
+
<CardFavorite
|
|
81
|
+
{id}
|
|
82
|
+
{isFavorite}
|
|
83
|
+
onFavoriteClick={() => onFavoriteClick!(id)}
|
|
84
|
+
{isLoading}
|
|
85
|
+
/>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="mb-4">
|
|
89
|
+
<CardDescription
|
|
90
|
+
{content}
|
|
91
|
+
{isLoading}
|
|
92
|
+
{isDescriptionLabel}
|
|
93
|
+
{isDescriptionIcon}
|
|
94
|
+
lines={tags.length == 0 ? 3 : 2}
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<CardTags
|
|
99
|
+
className="my-2"
|
|
100
|
+
tags={tags ?? []}
|
|
101
|
+
{isTagBorderBottom}
|
|
102
|
+
{isLoading}
|
|
103
|
+
/>
|
|
104
|
+
|
|
105
|
+
<CardThumbnailVideo
|
|
106
|
+
{imageUrl}
|
|
107
|
+
{videoUrl}
|
|
108
|
+
{isImageButtonMaximized}
|
|
109
|
+
{isVideoButtonMaximized}
|
|
110
|
+
{isLoading}
|
|
111
|
+
class="h-32.5 md:h-36 lg:h-44"
|
|
112
|
+
/>
|
|
113
|
+
|
|
114
|
+
{#if onButtonProfile}
|
|
115
|
+
<div class="flex justify-center items-center gap-2 mt-2 -mb-2 w-full">
|
|
116
|
+
{#if onButtonProfile}
|
|
117
|
+
<CardButton
|
|
118
|
+
{id}
|
|
119
|
+
icon={UserIcon}
|
|
120
|
+
className={buttonProfileClass}
|
|
121
|
+
text={$t("label.view.profile")}
|
|
122
|
+
onClick={onButtonProfile}
|
|
123
|
+
isFlex
|
|
124
|
+
/>
|
|
125
|
+
{:else if isLoading}
|
|
126
|
+
<Skeleton class="w-20 h-4 rounded-lg bg-gray-400 mt-0.5" />
|
|
127
|
+
{/if}
|
|
128
|
+
</div>
|
|
129
|
+
{/if}
|
|
130
|
+
</div>
|
|
131
|
+
<CardPhoneOrWhatsapp {id} {onEmailClick} {onWhatsappClick} />
|
|
132
|
+
</article>
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import type { CardProfileProps } from "../types";
|
|
3
|
-
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
|
-
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
|
-
|
|
6
|
-
type Props = {
|
|
7
|
-
variant?: 1 | 2;
|
|
8
|
-
isLoading?: boolean;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
let { variant, isLoading, ...restProps }: CardProfileProps & Props = $props();
|
|
12
|
-
</script>
|
|
13
|
-
|
|
14
|
-
{#if variant === 2}
|
|
15
|
-
<CardProfile02 {...restProps} {isLoading} />
|
|
16
|
-
{:else}
|
|
17
|
-
<CardProfile01 {...restProps} {isLoading} />
|
|
18
|
-
{/if}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CardProfileProps } from "../types";
|
|
3
|
+
import CardProfile01 from "./01/CardProfile01.svelte";
|
|
4
|
+
import CardProfile02 from "./02/CardProfile02.svelte";
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
variant?: 1 | 2;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
let { variant, isLoading, ...restProps }: CardProfileProps & Props = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
{#if variant === 2}
|
|
15
|
+
<CardProfile02 {...restProps} {isLoading} />
|
|
16
|
+
{:else}
|
|
17
|
+
<CardProfile01 {...restProps} {isLoading} />
|
|
18
|
+
{/if}
|
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import Button from "../../../button/button.svelte";
|
|
3
|
-
import Skeleton from "../../../skeleton/skeleton.svelte";
|
|
4
|
-
import { t } from "../../../../../i18n";
|
|
5
|
-
import CardCart from "../shared/CardCart.svelte";
|
|
6
|
-
import CardDescription from "../shared/CardDescription.svelte";
|
|
7
|
-
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
8
|
-
import CardStartPrice from "./CardPromotionPrice.svelte";
|
|
9
|
-
import CardTags from "../shared/CardTags.svelte";
|
|
10
|
-
import ImgPlaceHolderGallery from "../../../../../assets/placeholder-image.png";
|
|
11
|
-
import ImgPlaceholderCompany from "../../../../../assets/placeholder-company.png";
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Card component with a title and content.
|
|
15
|
-
* @component
|
|
16
|
-
*/
|
|
17
|
-
import type { CardPromotionProps } from "../types";
|
|
18
|
-
|
|
19
|
-
let {
|
|
20
|
-
id,
|
|
21
|
-
tags,
|
|
22
|
-
logo,
|
|
23
|
-
title,
|
|
24
|
-
imageUrl,
|
|
25
|
-
isFavorite = false,
|
|
26
|
-
isCart = false,
|
|
27
|
-
isLoading = false,
|
|
28
|
-
newPrice,
|
|
29
|
-
oldPrice,
|
|
30
|
-
content,
|
|
31
|
-
buttonBuyText,
|
|
32
|
-
buttonBuyClass,
|
|
33
|
-
isDescriptionIcon,
|
|
34
|
-
isDescriptionLabel,
|
|
35
|
-
onClickBuy,
|
|
36
|
-
onClickShop,
|
|
37
|
-
onClickFavorite,
|
|
38
|
-
}: CardPromotionProps = $props();
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<article class="relative rounded-lg border">
|
|
42
|
-
<aside class="relative w-full">
|
|
43
|
-
<div class="absolute top-1 left-1 z-2 gap-1 p-2">
|
|
44
|
-
{#if isLoading}
|
|
45
|
-
<Skeleton class="h-5 w-20 rounded-full bg-black/20" />
|
|
46
|
-
{:else if logo}
|
|
47
|
-
<img
|
|
48
|
-
src={logo}
|
|
49
|
-
width={30}
|
|
50
|
-
height={30}
|
|
51
|
-
alt={title}
|
|
52
|
-
onerror={(e) =>
|
|
53
|
-
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
54
|
-
class="rounded-lg"
|
|
55
|
-
/>
|
|
56
|
-
{:else}
|
|
57
|
-
<img
|
|
58
|
-
src={ImgPlaceholderCompany}
|
|
59
|
-
width={30}
|
|
60
|
-
height={30}
|
|
61
|
-
alt={title}
|
|
62
|
-
class="rounded-lg"
|
|
63
|
-
/>
|
|
64
|
-
{/if}
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<div class="absolute top-1 right-1 z-2 flex items-center gap-1 p-2">
|
|
68
|
-
<CardFavorite
|
|
69
|
-
{id}
|
|
70
|
-
{isFavorite}
|
|
71
|
-
{isLoading}
|
|
72
|
-
onFavoriteClick={onClickFavorite}
|
|
73
|
-
/>
|
|
74
|
-
<CardCart {id} {isCart} {isLoading} onCartClick={onClickShop} />
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
{#if isLoading}
|
|
78
|
-
<Skeleton
|
|
79
|
-
class="rounded-lg h-30 w-full object-cover object-center bg-black/15"
|
|
80
|
-
/>
|
|
81
|
-
{:else if imageUrl}
|
|
82
|
-
<img
|
|
83
|
-
src={imageUrl}
|
|
84
|
-
alt={imageUrl}
|
|
85
|
-
class="rounded-tr-lg rounded-tl-lg h-36 w-full object-cover object-center"
|
|
86
|
-
onerror={(e) =>
|
|
87
|
-
((e.target as HTMLImageElement).src = ImgPlaceHolderGallery)}
|
|
88
|
-
/>
|
|
89
|
-
{/if}
|
|
90
|
-
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
91
|
-
</aside>
|
|
92
|
-
|
|
93
|
-
<aside
|
|
94
|
-
class="bottom-1 inset-x-0 flex flex-col items-center justify-center gap-0.5 m-auto max-w-11/12 p-1 rounded-md"
|
|
95
|
-
>
|
|
96
|
-
<div class="flex justify-between w-full items-center mb-1">
|
|
97
|
-
{#if title}
|
|
98
|
-
{#if isLoading}
|
|
99
|
-
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
100
|
-
{:else}
|
|
101
|
-
<div class="font-semibold line-clamp-1 flex-nowrap">
|
|
102
|
-
{title}
|
|
103
|
-
</div>
|
|
104
|
-
{/if}
|
|
105
|
-
{/if}
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div>
|
|
109
|
-
<CardDescription {content} {isDescriptionIcon} {isDescriptionLabel} />
|
|
110
|
-
</div>
|
|
111
|
-
|
|
112
|
-
{#if tags && tags.length > 0}
|
|
113
|
-
<div class="w-full mb-2">
|
|
114
|
-
<CardTags {tags} />
|
|
115
|
-
</div>
|
|
116
|
-
{/if}
|
|
117
|
-
|
|
118
|
-
<div class="flex justify-start gap-2 w-full">
|
|
119
|
-
{#if isLoading}
|
|
120
|
-
<Skeleton class="h-5 bg-black/10 w-25 my-2 mr-2" />
|
|
121
|
-
{:else if newPrice || oldPrice}
|
|
122
|
-
<div>
|
|
123
|
-
<CardStartPrice {newPrice} {oldPrice} />
|
|
124
|
-
</div>
|
|
125
|
-
{/if}
|
|
126
|
-
</div>
|
|
127
|
-
|
|
128
|
-
{#if isLoading}
|
|
129
|
-
<Skeleton class="h-9 w-full rounded-md" />
|
|
130
|
-
{:else}
|
|
131
|
-
<Button
|
|
132
|
-
onclick={() => onClickBuy!(id)}
|
|
133
|
-
class="w-full bottom-0 bg-gradient {buttonBuyClass}"
|
|
134
|
-
>
|
|
135
|
-
{buttonBuyText || $t("label.buy")}
|
|
136
|
-
</Button>
|
|
137
|
-
{/if}
|
|
138
|
-
</aside>
|
|
139
|
-
</article>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Button from "../../../button/button.svelte";
|
|
3
|
+
import Skeleton from "../../../skeleton/skeleton.svelte";
|
|
4
|
+
import { t } from "../../../../../i18n";
|
|
5
|
+
import CardCart from "../shared/CardCart.svelte";
|
|
6
|
+
import CardDescription from "../shared/CardDescription.svelte";
|
|
7
|
+
import CardFavorite from "../shared/CardFavorite.svelte";
|
|
8
|
+
import CardStartPrice from "./CardPromotionPrice.svelte";
|
|
9
|
+
import CardTags from "../shared/CardTags.svelte";
|
|
10
|
+
import ImgPlaceHolderGallery from "../../../../../assets/placeholder-image.png";
|
|
11
|
+
import ImgPlaceholderCompany from "../../../../../assets/placeholder-company.png";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Card component with a title and content.
|
|
15
|
+
* @component
|
|
16
|
+
*/
|
|
17
|
+
import type { CardPromotionProps } from "../types";
|
|
18
|
+
|
|
19
|
+
let {
|
|
20
|
+
id,
|
|
21
|
+
tags,
|
|
22
|
+
logo,
|
|
23
|
+
title,
|
|
24
|
+
imageUrl,
|
|
25
|
+
isFavorite = false,
|
|
26
|
+
isCart = false,
|
|
27
|
+
isLoading = false,
|
|
28
|
+
newPrice,
|
|
29
|
+
oldPrice,
|
|
30
|
+
content,
|
|
31
|
+
buttonBuyText,
|
|
32
|
+
buttonBuyClass,
|
|
33
|
+
isDescriptionIcon,
|
|
34
|
+
isDescriptionLabel,
|
|
35
|
+
onClickBuy,
|
|
36
|
+
onClickShop,
|
|
37
|
+
onClickFavorite,
|
|
38
|
+
}: CardPromotionProps = $props();
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<article class="relative rounded-lg border">
|
|
42
|
+
<aside class="relative w-full">
|
|
43
|
+
<div class="absolute top-1 left-1 z-2 gap-1 p-2">
|
|
44
|
+
{#if isLoading}
|
|
45
|
+
<Skeleton class="h-5 w-20 rounded-full bg-black/20" />
|
|
46
|
+
{:else if logo}
|
|
47
|
+
<img
|
|
48
|
+
src={logo}
|
|
49
|
+
width={30}
|
|
50
|
+
height={30}
|
|
51
|
+
alt={title}
|
|
52
|
+
onerror={(e) =>
|
|
53
|
+
((e.target as HTMLImageElement).src = ImgPlaceholderCompany)}
|
|
54
|
+
class="rounded-lg"
|
|
55
|
+
/>
|
|
56
|
+
{:else}
|
|
57
|
+
<img
|
|
58
|
+
src={ImgPlaceholderCompany}
|
|
59
|
+
width={30}
|
|
60
|
+
height={30}
|
|
61
|
+
alt={title}
|
|
62
|
+
class="rounded-lg"
|
|
63
|
+
/>
|
|
64
|
+
{/if}
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="absolute top-1 right-1 z-2 flex items-center gap-1 p-2">
|
|
68
|
+
<CardFavorite
|
|
69
|
+
{id}
|
|
70
|
+
{isFavorite}
|
|
71
|
+
{isLoading}
|
|
72
|
+
onFavoriteClick={onClickFavorite}
|
|
73
|
+
/>
|
|
74
|
+
<CardCart {id} {isCart} {isLoading} onCartClick={onClickShop} />
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
{#if isLoading}
|
|
78
|
+
<Skeleton
|
|
79
|
+
class="rounded-lg h-30 w-full object-cover object-center bg-black/15"
|
|
80
|
+
/>
|
|
81
|
+
{:else if imageUrl}
|
|
82
|
+
<img
|
|
83
|
+
src={imageUrl}
|
|
84
|
+
alt={imageUrl}
|
|
85
|
+
class="rounded-tr-lg rounded-tl-lg h-36 w-full object-cover object-center"
|
|
86
|
+
onerror={(e) =>
|
|
87
|
+
((e.target as HTMLImageElement).src = ImgPlaceHolderGallery)}
|
|
88
|
+
/>
|
|
89
|
+
{/if}
|
|
90
|
+
<div class="absolute inset-0 bg-black/5 rounded-sm h-full w-full"></div>
|
|
91
|
+
</aside>
|
|
92
|
+
|
|
93
|
+
<aside
|
|
94
|
+
class="bottom-1 inset-x-0 flex flex-col items-center justify-center gap-0.5 m-auto max-w-11/12 p-1 rounded-md"
|
|
95
|
+
>
|
|
96
|
+
<div class="flex justify-between w-full items-center mb-1">
|
|
97
|
+
{#if title}
|
|
98
|
+
{#if isLoading}
|
|
99
|
+
<Skeleton class="h-4 w-30 rounded-lg" />
|
|
100
|
+
{:else}
|
|
101
|
+
<div class="font-semibold line-clamp-1 flex-nowrap">
|
|
102
|
+
{title}
|
|
103
|
+
</div>
|
|
104
|
+
{/if}
|
|
105
|
+
{/if}
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<div>
|
|
109
|
+
<CardDescription {content} {isDescriptionIcon} {isDescriptionLabel} />
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
{#if tags && tags.length > 0}
|
|
113
|
+
<div class="w-full mb-2">
|
|
114
|
+
<CardTags {tags} />
|
|
115
|
+
</div>
|
|
116
|
+
{/if}
|
|
117
|
+
|
|
118
|
+
<div class="flex justify-start gap-2 w-full">
|
|
119
|
+
{#if isLoading}
|
|
120
|
+
<Skeleton class="h-5 bg-black/10 w-25 my-2 mr-2" />
|
|
121
|
+
{:else if newPrice || oldPrice}
|
|
122
|
+
<div>
|
|
123
|
+
<CardStartPrice {newPrice} {oldPrice} />
|
|
124
|
+
</div>
|
|
125
|
+
{/if}
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{#if isLoading}
|
|
129
|
+
<Skeleton class="h-9 w-full rounded-md" />
|
|
130
|
+
{:else}
|
|
131
|
+
<Button
|
|
132
|
+
onclick={() => onClickBuy!(id)}
|
|
133
|
+
class="w-full bottom-0 bg-gradient {buttonBuyClass}"
|
|
134
|
+
>
|
|
135
|
+
{buttonBuyText || $t("label.buy")}
|
|
136
|
+
</Button>
|
|
137
|
+
{/if}
|
|
138
|
+
</aside>
|
|
139
|
+
</article>
|
|
@@ -1,32 +1,32 @@
|
|
|
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 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-start 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}
|
|
32
|
-
</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 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-start 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}
|
|
32
|
+
</div>
|