negodesign 0.0.81 → 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 -35
- 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,146 +1,146 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../../../../utils";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
-
import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";
|
|
5
|
-
import ModalCore from "../../../core/ui/ModalCore.svelte";
|
|
6
|
-
import type {
|
|
7
|
-
ModalGridSelectionProps,
|
|
8
|
-
ModelGridCard,
|
|
9
|
-
ModelGridCategory,
|
|
10
|
-
} from "../../types";
|
|
11
|
-
|
|
12
|
-
let {
|
|
13
|
-
title,
|
|
14
|
-
subtitle,
|
|
15
|
-
categories = [],
|
|
16
|
-
selectedCategory = $bindable(null),
|
|
17
|
-
cards = [],
|
|
18
|
-
selectedCard = $bindable(null),
|
|
19
|
-
selectedCards = $bindable([]),
|
|
20
|
-
multiple = false,
|
|
21
|
-
totalSteps = 1,
|
|
22
|
-
currentStep = 1,
|
|
23
|
-
isOpen = $bindable(false),
|
|
24
|
-
onSelect,
|
|
25
|
-
onSelectCategory,
|
|
26
|
-
onBack,
|
|
27
|
-
onContinue,
|
|
28
|
-
class: className,
|
|
29
|
-
}: ModalGridSelectionProps = $props();
|
|
30
|
-
|
|
31
|
-
function handleSelectCard(card: ModelGridCard) {
|
|
32
|
-
if (multiple) {
|
|
33
|
-
const exists = selectedCards.some(
|
|
34
|
-
(c: ModelGridCard) => c.title === card.title,
|
|
35
|
-
);
|
|
36
|
-
if (exists) {
|
|
37
|
-
selectedCards = selectedCards.filter(
|
|
38
|
-
(c: ModelGridCard) => c.title !== card.title,
|
|
39
|
-
);
|
|
40
|
-
} else {
|
|
41
|
-
selectedCards = [...selectedCards, card];
|
|
42
|
-
}
|
|
43
|
-
onSelect?.(card);
|
|
44
|
-
} else {
|
|
45
|
-
selectedCard = card;
|
|
46
|
-
onSelect?.(card);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function handleSelectCategory(category: ModelGridCategory) {
|
|
51
|
-
selectedCategory = category;
|
|
52
|
-
onSelectCategory?.(category);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function isSelectedCard(card: ModelGridCard): boolean {
|
|
56
|
-
if (multiple) {
|
|
57
|
-
return selectedCards.some((c: ModelGridCard) => c.title === card.title);
|
|
58
|
-
}
|
|
59
|
-
return selectedCard?.title === card.title;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function isSelectedCategory(category: ModelGridCategory): boolean {
|
|
63
|
-
return selectedCategory?.value === category.value;
|
|
64
|
-
}
|
|
65
|
-
</script>
|
|
66
|
-
|
|
67
|
-
<ModalCore
|
|
68
|
-
bind:isOpen
|
|
69
|
-
{title}
|
|
70
|
-
{subtitle}
|
|
71
|
-
{totalSteps}
|
|
72
|
-
{currentStep}
|
|
73
|
-
showProgress={false}
|
|
74
|
-
showBack={currentStep > 1}
|
|
75
|
-
{onBack}
|
|
76
|
-
{onContinue}
|
|
77
|
-
class={cn(className)}
|
|
78
|
-
>
|
|
79
|
-
{#snippet content()}
|
|
80
|
-
<!-- Categories -->
|
|
81
|
-
{#if categories.length > 0}
|
|
82
|
-
<div class="mb-6 flex flex-wrap gap-2">
|
|
83
|
-
{#each categories as cat (cat.value)}
|
|
84
|
-
{@const active = isSelectedCategory(cat)}
|
|
85
|
-
<button
|
|
86
|
-
type="button"
|
|
87
|
-
class={cn(
|
|
88
|
-
"rounded-full border px-4 py-1.5 text-sm font-medium transition-all duration-200",
|
|
89
|
-
active ? "" : "",
|
|
90
|
-
)}
|
|
91
|
-
onclick={() => handleSelectCategory(cat)}
|
|
92
|
-
>
|
|
93
|
-
{cat.label}
|
|
94
|
-
</button>
|
|
95
|
-
{/each}
|
|
96
|
-
</div>
|
|
97
|
-
{/if}
|
|
98
|
-
|
|
99
|
-
<!-- Cards Grid -->
|
|
100
|
-
<div class="grid grid-cols-1 gap-3 md:grid-cols-2">
|
|
101
|
-
{#each cards as card, i (i)}
|
|
102
|
-
{@const selected = isSelectedCard(card)}
|
|
103
|
-
<button
|
|
104
|
-
type="button"
|
|
105
|
-
class={cn(
|
|
106
|
-
"relative flex items-center gap-4 rounded-xl border p-4 text-left transition-all duration-200",
|
|
107
|
-
selected ? "" : "",
|
|
108
|
-
)}
|
|
109
|
-
onclick={() => handleSelectCard(card)}
|
|
110
|
-
>
|
|
111
|
-
<!-- Icon -->
|
|
112
|
-
<div
|
|
113
|
-
class={cn(
|
|
114
|
-
"flex size-10 shrink-0 items-center justify-center rounded-lg",
|
|
115
|
-
selected ? "bg-primary/20" : "bg-primary/40",
|
|
116
|
-
)}
|
|
117
|
-
>
|
|
118
|
-
{#if typeof card.icon === "string"}
|
|
119
|
-
<i class="{card.icon} text-lg"></i>
|
|
120
|
-
{:else}
|
|
121
|
-
<HugeiconsIcon icon={card.icon} class="size-5" />
|
|
122
|
-
{/if}
|
|
123
|
-
</div>
|
|
124
|
-
|
|
125
|
-
<!-- Text -->
|
|
126
|
-
<div class="min-w-0 flex-1">
|
|
127
|
-
<p class="text-sm font-bold">{card.title}</p>
|
|
128
|
-
{#if card.description}
|
|
129
|
-
<p class="mt-0.5 line-clamp-1 text-xs">
|
|
130
|
-
{card.description}
|
|
131
|
-
</p>
|
|
132
|
-
{/if}
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<!-- Checkmark -->
|
|
136
|
-
{#if selected}
|
|
137
|
-
<HugeiconsIcon
|
|
138
|
-
icon={CheckmarkCircle02Icon}
|
|
139
|
-
class="size-5 shrink-0 text-primary"
|
|
140
|
-
/>
|
|
141
|
-
{/if}
|
|
142
|
-
</button>
|
|
143
|
-
{/each}
|
|
144
|
-
</div>
|
|
145
|
-
{/snippet}
|
|
146
|
-
</ModalCore>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../../../../utils";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import { CheckmarkCircle02Icon } from "@hugeicons/core-free-icons";
|
|
5
|
+
import ModalCore from "../../../core/ui/ModalCore.svelte";
|
|
6
|
+
import type {
|
|
7
|
+
ModalGridSelectionProps,
|
|
8
|
+
ModelGridCard,
|
|
9
|
+
ModelGridCategory,
|
|
10
|
+
} from "../../types";
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
title,
|
|
14
|
+
subtitle,
|
|
15
|
+
categories = [],
|
|
16
|
+
selectedCategory = $bindable(null),
|
|
17
|
+
cards = [],
|
|
18
|
+
selectedCard = $bindable(null),
|
|
19
|
+
selectedCards = $bindable([]),
|
|
20
|
+
multiple = false,
|
|
21
|
+
totalSteps = 1,
|
|
22
|
+
currentStep = 1,
|
|
23
|
+
isOpen = $bindable(false),
|
|
24
|
+
onSelect,
|
|
25
|
+
onSelectCategory,
|
|
26
|
+
onBack,
|
|
27
|
+
onContinue,
|
|
28
|
+
class: className,
|
|
29
|
+
}: ModalGridSelectionProps = $props();
|
|
30
|
+
|
|
31
|
+
function handleSelectCard(card: ModelGridCard) {
|
|
32
|
+
if (multiple) {
|
|
33
|
+
const exists = selectedCards.some(
|
|
34
|
+
(c: ModelGridCard) => c.title === card.title,
|
|
35
|
+
);
|
|
36
|
+
if (exists) {
|
|
37
|
+
selectedCards = selectedCards.filter(
|
|
38
|
+
(c: ModelGridCard) => c.title !== card.title,
|
|
39
|
+
);
|
|
40
|
+
} else {
|
|
41
|
+
selectedCards = [...selectedCards, card];
|
|
42
|
+
}
|
|
43
|
+
onSelect?.(card);
|
|
44
|
+
} else {
|
|
45
|
+
selectedCard = card;
|
|
46
|
+
onSelect?.(card);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function handleSelectCategory(category: ModelGridCategory) {
|
|
51
|
+
selectedCategory = category;
|
|
52
|
+
onSelectCategory?.(category);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function isSelectedCard(card: ModelGridCard): boolean {
|
|
56
|
+
if (multiple) {
|
|
57
|
+
return selectedCards.some((c: ModelGridCard) => c.title === card.title);
|
|
58
|
+
}
|
|
59
|
+
return selectedCard?.title === card.title;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function isSelectedCategory(category: ModelGridCategory): boolean {
|
|
63
|
+
return selectedCategory?.value === category.value;
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<ModalCore
|
|
68
|
+
bind:isOpen
|
|
69
|
+
{title}
|
|
70
|
+
{subtitle}
|
|
71
|
+
{totalSteps}
|
|
72
|
+
{currentStep}
|
|
73
|
+
showProgress={false}
|
|
74
|
+
showBack={currentStep > 1}
|
|
75
|
+
{onBack}
|
|
76
|
+
{onContinue}
|
|
77
|
+
class={cn(className)}
|
|
78
|
+
>
|
|
79
|
+
{#snippet content()}
|
|
80
|
+
<!-- Categories -->
|
|
81
|
+
{#if categories.length > 0}
|
|
82
|
+
<div class="mb-6 flex flex-wrap gap-2">
|
|
83
|
+
{#each categories as cat (cat.value)}
|
|
84
|
+
{@const active = isSelectedCategory(cat)}
|
|
85
|
+
<button
|
|
86
|
+
type="button"
|
|
87
|
+
class={cn(
|
|
88
|
+
"rounded-full border px-4 py-1.5 text-sm font-medium transition-all duration-200",
|
|
89
|
+
active ? "" : "",
|
|
90
|
+
)}
|
|
91
|
+
onclick={() => handleSelectCategory(cat)}
|
|
92
|
+
>
|
|
93
|
+
{cat.label}
|
|
94
|
+
</button>
|
|
95
|
+
{/each}
|
|
96
|
+
</div>
|
|
97
|
+
{/if}
|
|
98
|
+
|
|
99
|
+
<!-- Cards Grid -->
|
|
100
|
+
<div class="grid grid-cols-1 gap-3 md:grid-cols-2">
|
|
101
|
+
{#each cards as card, i (i)}
|
|
102
|
+
{@const selected = isSelectedCard(card)}
|
|
103
|
+
<button
|
|
104
|
+
type="button"
|
|
105
|
+
class={cn(
|
|
106
|
+
"relative flex items-center gap-4 rounded-xl border p-4 text-left transition-all duration-200",
|
|
107
|
+
selected ? "" : "",
|
|
108
|
+
)}
|
|
109
|
+
onclick={() => handleSelectCard(card)}
|
|
110
|
+
>
|
|
111
|
+
<!-- Icon -->
|
|
112
|
+
<div
|
|
113
|
+
class={cn(
|
|
114
|
+
"flex size-10 shrink-0 items-center justify-center rounded-lg",
|
|
115
|
+
selected ? "bg-primary/20" : "bg-primary/40",
|
|
116
|
+
)}
|
|
117
|
+
>
|
|
118
|
+
{#if typeof card.icon === "string"}
|
|
119
|
+
<i class="{card.icon} text-lg"></i>
|
|
120
|
+
{:else}
|
|
121
|
+
<HugeiconsIcon icon={card.icon} class="size-5" />
|
|
122
|
+
{/if}
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<!-- Text -->
|
|
126
|
+
<div class="min-w-0 flex-1">
|
|
127
|
+
<p class="text-sm font-bold">{card.title}</p>
|
|
128
|
+
{#if card.description}
|
|
129
|
+
<p class="mt-0.5 line-clamp-1 text-xs">
|
|
130
|
+
{card.description}
|
|
131
|
+
</p>
|
|
132
|
+
{/if}
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<!-- Checkmark -->
|
|
136
|
+
{#if selected}
|
|
137
|
+
<HugeiconsIcon
|
|
138
|
+
icon={CheckmarkCircle02Icon}
|
|
139
|
+
class="size-5 shrink-0 text-primary"
|
|
140
|
+
/>
|
|
141
|
+
{/if}
|
|
142
|
+
</button>
|
|
143
|
+
{/each}
|
|
144
|
+
</div>
|
|
145
|
+
{/snippet}
|
|
146
|
+
</ModalCore>
|
|
@@ -1,156 +1,156 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { cn } from "../../../../../utils";
|
|
3
|
-
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
-
import ModalCore from "../../core/ui/ModalCore.svelte";
|
|
5
|
-
import type { ModalShareSelectionProps, ModelSocialShare } from "../types";
|
|
6
|
-
|
|
7
|
-
const defaultNetworks: ModelSocialShare[] = [
|
|
8
|
-
{ name: "WhatsApp", img: "/img/icons8-whatsapp-48.png", color: "#25D366" },
|
|
9
|
-
{
|
|
10
|
-
name: "Instagram",
|
|
11
|
-
img: "/img/icons8-instagram-48.png",
|
|
12
|
-
color: "#E4405F",
|
|
13
|
-
},
|
|
14
|
-
{ name: "Facebook", img: "/img/icons8-facebook-48.png", color: "#1877F2" },
|
|
15
|
-
{ name: "Twitter", img: "/img/icons8-twitterx-50.png", color: "#000000" },
|
|
16
|
-
{ name: "LinkedIn", img: "/img/icons8-linkedin-48.png", color: "#0A66C2" },
|
|
17
|
-
{
|
|
18
|
-
name: "Pinterest",
|
|
19
|
-
img: "/img/icons8-pinterest-48.png",
|
|
20
|
-
color: "#E60023",
|
|
21
|
-
},
|
|
22
|
-
{ name: "Tumblr", img: "/img/icons8-tumblr-48.png", color: "#36465D" },
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
let {
|
|
26
|
-
title,
|
|
27
|
-
subtitle,
|
|
28
|
-
networks,
|
|
29
|
-
isWhatsapp = true,
|
|
30
|
-
isInstagram = true,
|
|
31
|
-
isFacebook = true,
|
|
32
|
-
isTwitter = true,
|
|
33
|
-
isLinkedin = true,
|
|
34
|
-
isPinterest = false,
|
|
35
|
-
isTumblr = false,
|
|
36
|
-
linkLabel = "Or copy link",
|
|
37
|
-
linkValue = "",
|
|
38
|
-
copyText = "Copy",
|
|
39
|
-
copiedText = "Copied!",
|
|
40
|
-
isOpen = $bindable(false),
|
|
41
|
-
onShare,
|
|
42
|
-
onCopy,
|
|
43
|
-
onClose,
|
|
44
|
-
class: className,
|
|
45
|
-
}: ModalShareSelectionProps = $props();
|
|
46
|
-
|
|
47
|
-
let copied = $state(false);
|
|
48
|
-
|
|
49
|
-
const networkFlags: Record<string, boolean> = $derived({
|
|
50
|
-
whatsapp: isWhatsapp,
|
|
51
|
-
instagram: isInstagram,
|
|
52
|
-
facebook: isFacebook,
|
|
53
|
-
twitter: isTwitter,
|
|
54
|
-
linkedin: isLinkedin,
|
|
55
|
-
pinterest: isPinterest,
|
|
56
|
-
tumblr: isTumblr,
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
const visibleNetworks = $derived(
|
|
60
|
-
(networks?.length ? networks : defaultNetworks).filter(
|
|
61
|
-
(network) => networkFlags[network.name.toLowerCase()] ?? true,
|
|
62
|
-
),
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
function handleCopy() {
|
|
66
|
-
navigator.clipboard.writeText(linkValue).then(() => {
|
|
67
|
-
copied = true;
|
|
68
|
-
onCopy?.(linkValue);
|
|
69
|
-
setTimeout(() => (copied = false), 2000);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
</script>
|
|
73
|
-
|
|
74
|
-
<ModalCore
|
|
75
|
-
bind:isOpen
|
|
76
|
-
{title}
|
|
77
|
-
{subtitle}
|
|
78
|
-
showProgress={false}
|
|
79
|
-
showBack={false}
|
|
80
|
-
{onClose}
|
|
81
|
-
class={cn("max-w-lg", className)}
|
|
82
|
-
>
|
|
83
|
-
{#snippet content()}
|
|
84
|
-
<!-- Social Networks -->
|
|
85
|
-
{#if visibleNetworks.length > 0}
|
|
86
|
-
<div class="flex flex-wrap items-center justify-center gap-4">
|
|
87
|
-
{#each visibleNetworks as network (network.name)}
|
|
88
|
-
<button
|
|
89
|
-
type="button"
|
|
90
|
-
class="group flex flex-col items-center gap-2"
|
|
91
|
-
onclick={() => onShare?.(network)}
|
|
92
|
-
>
|
|
93
|
-
<div
|
|
94
|
-
class={cn(
|
|
95
|
-
"flex size-14 items-center justify-center rounded-full border-2 border-border bg-white transition-all duration-200",
|
|
96
|
-
"hover:scale-110 hover:shadow-md",
|
|
97
|
-
)}
|
|
98
|
-
style={network.color ? `border-color: ${network.color}30` : ""}
|
|
99
|
-
>
|
|
100
|
-
{#snippet icon()}
|
|
101
|
-
{#if network.img}
|
|
102
|
-
<img
|
|
103
|
-
src={network.img}
|
|
104
|
-
alt={network.name}
|
|
105
|
-
class="size-7 object-contain transition-transform duration-200 group-hover:scale-110"
|
|
106
|
-
loading="lazy"
|
|
107
|
-
/>
|
|
108
|
-
{:else if typeof network.icon === "string"}
|
|
109
|
-
<i
|
|
110
|
-
class="{network.icon} text-2xl transition-colors"
|
|
111
|
-
style={network.color ? `color: ${network.color}` : ""}
|
|
112
|
-
></i>
|
|
113
|
-
{:else if network.icon}
|
|
114
|
-
<HugeiconsIcon
|
|
115
|
-
icon={network.icon}
|
|
116
|
-
class="size-6 transition-colors"
|
|
117
|
-
style={network.color ? `color: ${network.color}` : ""}
|
|
118
|
-
/>
|
|
119
|
-
{/if}
|
|
120
|
-
{/snippet}
|
|
121
|
-
{@render icon()}
|
|
122
|
-
</div>
|
|
123
|
-
<span class="text-xs text-muted-foreground">{network.name}</span>
|
|
124
|
-
</button>
|
|
125
|
-
{/each}
|
|
126
|
-
</div>
|
|
127
|
-
{/if}
|
|
128
|
-
{/snippet}
|
|
129
|
-
|
|
130
|
-
{#snippet footer()}
|
|
131
|
-
<!-- Copy Link -->
|
|
132
|
-
<div>
|
|
133
|
-
<p class="mb-3 text-sm font-medium text-muted-foreground">{linkLabel}</p>
|
|
134
|
-
<div class="flex items-center gap-2">
|
|
135
|
-
<input
|
|
136
|
-
type="text"
|
|
137
|
-
readonly
|
|
138
|
-
value={linkValue}
|
|
139
|
-
class="flex-1 rounded-lg border border-border bg-muted px-4 py-2.5 text-sm text-foreground outline-none"
|
|
140
|
-
/>
|
|
141
|
-
<button
|
|
142
|
-
type="button"
|
|
143
|
-
class={cn(
|
|
144
|
-
"shrink-0 rounded-lg px-5 py-2.5 text-sm font-semibold transition-colors",
|
|
145
|
-
copied
|
|
146
|
-
? "bg-green-500 text-white"
|
|
147
|
-
: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
148
|
-
)}
|
|
149
|
-
onclick={handleCopy}
|
|
150
|
-
>
|
|
151
|
-
{copied ? copiedText : copyText}
|
|
152
|
-
</button>
|
|
153
|
-
</div>
|
|
154
|
-
</div>
|
|
155
|
-
{/snippet}
|
|
156
|
-
</ModalCore>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { cn } from "../../../../../utils";
|
|
3
|
+
import { HugeiconsIcon } from "@hugeicons/svelte";
|
|
4
|
+
import ModalCore from "../../core/ui/ModalCore.svelte";
|
|
5
|
+
import type { ModalShareSelectionProps, ModelSocialShare } from "../types";
|
|
6
|
+
|
|
7
|
+
const defaultNetworks: ModelSocialShare[] = [
|
|
8
|
+
{ name: "WhatsApp", img: "/img/icons8-whatsapp-48.png", color: "#25D366" },
|
|
9
|
+
{
|
|
10
|
+
name: "Instagram",
|
|
11
|
+
img: "/img/icons8-instagram-48.png",
|
|
12
|
+
color: "#E4405F",
|
|
13
|
+
},
|
|
14
|
+
{ name: "Facebook", img: "/img/icons8-facebook-48.png", color: "#1877F2" },
|
|
15
|
+
{ name: "Twitter", img: "/img/icons8-twitterx-50.png", color: "#000000" },
|
|
16
|
+
{ name: "LinkedIn", img: "/img/icons8-linkedin-48.png", color: "#0A66C2" },
|
|
17
|
+
{
|
|
18
|
+
name: "Pinterest",
|
|
19
|
+
img: "/img/icons8-pinterest-48.png",
|
|
20
|
+
color: "#E60023",
|
|
21
|
+
},
|
|
22
|
+
{ name: "Tumblr", img: "/img/icons8-tumblr-48.png", color: "#36465D" },
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
let {
|
|
26
|
+
title,
|
|
27
|
+
subtitle,
|
|
28
|
+
networks,
|
|
29
|
+
isWhatsapp = true,
|
|
30
|
+
isInstagram = true,
|
|
31
|
+
isFacebook = true,
|
|
32
|
+
isTwitter = true,
|
|
33
|
+
isLinkedin = true,
|
|
34
|
+
isPinterest = false,
|
|
35
|
+
isTumblr = false,
|
|
36
|
+
linkLabel = "Or copy link",
|
|
37
|
+
linkValue = "",
|
|
38
|
+
copyText = "Copy",
|
|
39
|
+
copiedText = "Copied!",
|
|
40
|
+
isOpen = $bindable(false),
|
|
41
|
+
onShare,
|
|
42
|
+
onCopy,
|
|
43
|
+
onClose,
|
|
44
|
+
class: className,
|
|
45
|
+
}: ModalShareSelectionProps = $props();
|
|
46
|
+
|
|
47
|
+
let copied = $state(false);
|
|
48
|
+
|
|
49
|
+
const networkFlags: Record<string, boolean> = $derived({
|
|
50
|
+
whatsapp: isWhatsapp,
|
|
51
|
+
instagram: isInstagram,
|
|
52
|
+
facebook: isFacebook,
|
|
53
|
+
twitter: isTwitter,
|
|
54
|
+
linkedin: isLinkedin,
|
|
55
|
+
pinterest: isPinterest,
|
|
56
|
+
tumblr: isTumblr,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const visibleNetworks = $derived(
|
|
60
|
+
(networks?.length ? networks : defaultNetworks).filter(
|
|
61
|
+
(network) => networkFlags[network.name.toLowerCase()] ?? true,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
function handleCopy() {
|
|
66
|
+
navigator.clipboard.writeText(linkValue).then(() => {
|
|
67
|
+
copied = true;
|
|
68
|
+
onCopy?.(linkValue);
|
|
69
|
+
setTimeout(() => (copied = false), 2000);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
</script>
|
|
73
|
+
|
|
74
|
+
<ModalCore
|
|
75
|
+
bind:isOpen
|
|
76
|
+
{title}
|
|
77
|
+
{subtitle}
|
|
78
|
+
showProgress={false}
|
|
79
|
+
showBack={false}
|
|
80
|
+
{onClose}
|
|
81
|
+
class={cn("max-w-lg", className)}
|
|
82
|
+
>
|
|
83
|
+
{#snippet content()}
|
|
84
|
+
<!-- Social Networks -->
|
|
85
|
+
{#if visibleNetworks.length > 0}
|
|
86
|
+
<div class="flex flex-wrap items-center justify-center gap-4">
|
|
87
|
+
{#each visibleNetworks as network (network.name)}
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
class="group flex flex-col items-center gap-2"
|
|
91
|
+
onclick={() => onShare?.(network)}
|
|
92
|
+
>
|
|
93
|
+
<div
|
|
94
|
+
class={cn(
|
|
95
|
+
"flex size-14 items-center justify-center rounded-full border-2 border-border bg-white transition-all duration-200",
|
|
96
|
+
"hover:scale-110 hover:shadow-md",
|
|
97
|
+
)}
|
|
98
|
+
style={network.color ? `border-color: ${network.color}30` : ""}
|
|
99
|
+
>
|
|
100
|
+
{#snippet icon()}
|
|
101
|
+
{#if network.img}
|
|
102
|
+
<img
|
|
103
|
+
src={network.img}
|
|
104
|
+
alt={network.name}
|
|
105
|
+
class="size-7 object-contain transition-transform duration-200 group-hover:scale-110"
|
|
106
|
+
loading="lazy"
|
|
107
|
+
/>
|
|
108
|
+
{:else if typeof network.icon === "string"}
|
|
109
|
+
<i
|
|
110
|
+
class="{network.icon} text-2xl transition-colors"
|
|
111
|
+
style={network.color ? `color: ${network.color}` : ""}
|
|
112
|
+
></i>
|
|
113
|
+
{:else if network.icon}
|
|
114
|
+
<HugeiconsIcon
|
|
115
|
+
icon={network.icon}
|
|
116
|
+
class="size-6 transition-colors"
|
|
117
|
+
style={network.color ? `color: ${network.color}` : ""}
|
|
118
|
+
/>
|
|
119
|
+
{/if}
|
|
120
|
+
{/snippet}
|
|
121
|
+
{@render icon()}
|
|
122
|
+
</div>
|
|
123
|
+
<span class="text-xs text-muted-foreground">{network.name}</span>
|
|
124
|
+
</button>
|
|
125
|
+
{/each}
|
|
126
|
+
</div>
|
|
127
|
+
{/if}
|
|
128
|
+
{/snippet}
|
|
129
|
+
|
|
130
|
+
{#snippet footer()}
|
|
131
|
+
<!-- Copy Link -->
|
|
132
|
+
<div>
|
|
133
|
+
<p class="mb-3 text-sm font-medium text-muted-foreground">{linkLabel}</p>
|
|
134
|
+
<div class="flex items-center gap-2">
|
|
135
|
+
<input
|
|
136
|
+
type="text"
|
|
137
|
+
readonly
|
|
138
|
+
value={linkValue}
|
|
139
|
+
class="flex-1 rounded-lg border border-border bg-muted px-4 py-2.5 text-sm text-foreground outline-none"
|
|
140
|
+
/>
|
|
141
|
+
<button
|
|
142
|
+
type="button"
|
|
143
|
+
class={cn(
|
|
144
|
+
"shrink-0 rounded-lg px-5 py-2.5 text-sm font-semibold transition-colors",
|
|
145
|
+
copied
|
|
146
|
+
? "bg-green-500 text-white"
|
|
147
|
+
: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
148
|
+
)}
|
|
149
|
+
onclick={handleCopy}
|
|
150
|
+
>
|
|
151
|
+
{copied ? copiedText : copyText}
|
|
152
|
+
</button>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
{/snippet}
|
|
156
|
+
</ModalCore>
|