@xbg.solutions/create-frontend 1.1.2 → 1.2.0
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/bin/xbg-frontend.cjs +32 -0
- package/package.json +17 -3
- package/src/commands/add.cjs +470 -0
- package/src/commands/generate.cjs +24 -0
- package/src/manifest.json +1578 -0
- package/src/registry/advanced/ChartWrapper.svelte +587 -0
- package/src/registry/advanced/DataTable.svelte +645 -0
- package/src/registry/advanced/FormWizard.svelte +546 -0
- package/src/registry/advanced/ImageUpload.svelte +663 -0
- package/src/registry/advanced/index.ts +33 -0
- package/src/registry/atoms/calendar/Calendar.svelte +181 -0
- package/src/registry/atoms/calendar/index.ts +1 -0
- package/src/registry/atoms/dialog/Dialog.svelte +179 -0
- package/src/registry/atoms/dialog/DialogDescription.svelte +16 -0
- package/src/registry/atoms/dialog/DialogFooter.svelte +16 -0
- package/src/registry/atoms/dialog/DialogHeader.svelte +16 -0
- package/src/registry/atoms/dialog/DialogTitle.svelte +16 -0
- package/src/registry/atoms/dialog/index.ts +10 -0
- package/src/registry/atoms/icon/BrandIcon.svelte +47 -0
- package/src/registry/atoms/icon/DynamicIcon.svelte +49 -0
- package/src/registry/atoms/icon/index.ts +2 -0
- package/src/registry/atoms/legend/Legend.svelte +32 -0
- package/src/registry/atoms/legend/index.ts +1 -0
- package/src/registry/atoms/menu/MenuItem.svelte +85 -0
- package/src/registry/atoms/menu/index.ts +1 -0
- package/src/registry/atoms/message/Message.svelte +62 -0
- package/src/registry/atoms/message/index.ts +1 -0
- package/src/registry/atoms/nav/NavItem.svelte +67 -0
- package/src/registry/atoms/nav/index.ts +1 -0
- package/src/registry/atoms/notification-badge/NotificationBadge.svelte +30 -0
- package/src/registry/atoms/notification-badge/index.ts +1 -0
- package/src/registry/atoms/otp-input/OtpInput.svelte +108 -0
- package/src/registry/atoms/otp-input/index.ts +1 -0
- package/src/registry/atoms/select/Select.svelte +216 -0
- package/src/registry/atoms/select/index.ts +6 -0
- package/src/registry/atoms/settings-card/SettingsCard.svelte +48 -0
- package/src/registry/atoms/settings-card/index.ts +1 -0
- package/src/registry/atoms/sidebar-item/SidebarItem.svelte +90 -0
- package/src/registry/atoms/sidebar-item/index.ts +1 -0
- package/src/registry/atoms/statistic-card/StatisticCard.svelte +53 -0
- package/src/registry/atoms/statistic-card/index.ts +1 -0
- package/src/registry/atoms/text-editor/TextEditor.svelte +77 -0
- package/src/registry/atoms/text-editor/index.ts +1 -0
- package/src/registry/atoms/uploader/Uploader.svelte +102 -0
- package/src/registry/atoms/uploader/index.ts +1 -0
- package/src/registry/atoms/user-item/UserItem.svelte +39 -0
- package/src/registry/atoms/user-item/index.ts +1 -0
- package/src/registry/blocks/account-section/AccountSection01.svelte +112 -0
- package/src/registry/blocks/account-section/AccountSection02.svelte +190 -0
- package/src/registry/blocks/account-section/AccountSection03.svelte +161 -0
- package/src/registry/blocks/account-section/AccountSection04.svelte +164 -0
- package/src/registry/blocks/account-section/AccountSection05.svelte +76 -0
- package/src/registry/blocks/account-section/index.ts +5 -0
- package/src/registry/blocks/app-shell/AppShell01.svelte +74 -0
- package/src/registry/blocks/app-shell/AppShell02.svelte +87 -0
- package/src/registry/blocks/app-shell/AppShell03.svelte +79 -0
- package/src/registry/blocks/app-shell/AppShell04.svelte +177 -0
- package/src/registry/blocks/app-shell/index.ts +4 -0
- package/src/registry/blocks/auth/AuthSplitScreen.svelte +132 -0
- package/src/registry/blocks/auth/LoginBlock01.svelte +94 -0
- package/src/registry/blocks/auth/LoginBlock02.svelte +103 -0
- package/src/registry/blocks/auth/LoginBlock03.svelte +53 -0
- package/src/registry/blocks/auth/LoginBlock04.svelte +99 -0
- package/src/registry/blocks/auth/LoginBlock05.svelte +101 -0
- package/src/registry/blocks/auth/OtpBlock01.svelte +115 -0
- package/src/registry/blocks/auth/OtpBlock02.svelte +113 -0
- package/src/registry/blocks/auth/OtpBlock03.svelte +143 -0
- package/src/registry/blocks/auth/OtpBlock04.svelte +122 -0
- package/src/registry/blocks/auth/OtpBlock05.svelte +81 -0
- package/src/registry/blocks/auth/SignupBlock01.svelte +103 -0
- package/src/registry/blocks/auth/SignupBlock02.svelte +94 -0
- package/src/registry/blocks/auth/SignupBlock03.svelte +120 -0
- package/src/registry/blocks/auth/SignupBlock04.svelte +112 -0
- package/src/registry/blocks/auth/SignupBlock05.svelte +77 -0
- package/src/registry/blocks/auth/index.ts +31 -0
- package/src/registry/blocks/banner/Banner01.svelte +67 -0
- package/src/registry/blocks/banner/Banner02.svelte +61 -0
- package/src/registry/blocks/banner/Banner03.svelte +54 -0
- package/src/registry/blocks/banner/Banner04.svelte +49 -0
- package/src/registry/blocks/banner/Banner05.svelte +47 -0
- package/src/registry/blocks/banner/index.ts +5 -0
- package/src/registry/blocks/bento-grid/BentoGrid01.svelte +92 -0
- package/src/registry/blocks/bento-grid/BentoGrid02.svelte +79 -0
- package/src/registry/blocks/bento-grid/BentoGrid03.svelte +79 -0
- package/src/registry/blocks/bento-grid/BentoGrid04.svelte +58 -0
- package/src/registry/blocks/bento-grid/BentoGrid05.svelte +92 -0
- package/src/registry/blocks/bento-grid/BentoGrid06.svelte +42 -0
- package/src/registry/blocks/bento-grid/index.ts +14 -0
- package/src/registry/blocks/blog-section/BlogSection01.svelte +100 -0
- package/src/registry/blocks/blog-section/BlogSection02.svelte +93 -0
- package/src/registry/blocks/blog-section/BlogSection03.svelte +92 -0
- package/src/registry/blocks/blog-section/BlogSection04.svelte +97 -0
- package/src/registry/blocks/blog-section/BlogSection05.svelte +120 -0
- package/src/registry/blocks/blog-section/index.ts +15 -0
- package/src/registry/blocks/buttons/ButtonBookmark.svelte +37 -0
- package/src/registry/blocks/buttons/ButtonLike.svelte +37 -0
- package/src/registry/blocks/buttons/ButtonMenu.svelte +37 -0
- package/src/registry/blocks/buttons/ButtonSplitDropdown.svelte +46 -0
- package/src/registry/blocks/buttons/ButtonStepper.svelte +55 -0
- package/src/registry/blocks/buttons/ButtonSteps.svelte +73 -0
- package/src/registry/blocks/buttons/ButtonToggleGroup.svelte +35 -0
- package/src/registry/blocks/buttons/ButtonsGroup.svelte +63 -0
- package/src/registry/blocks/buttons/SocialButtonsHorizontal.svelte +41 -0
- package/src/registry/blocks/buttons/SocialButtonsVertical.svelte +53 -0
- package/src/registry/blocks/buttons/index.ts +10 -0
- package/src/registry/blocks/calendar/CalendarBlock01.svelte +169 -0
- package/src/registry/blocks/calendar/CalendarBlock02.svelte +133 -0
- package/src/registry/blocks/calendar/CalendarBlock03.svelte +194 -0
- package/src/registry/blocks/calendar/CalendarBlock04.svelte +96 -0
- package/src/registry/blocks/calendar/CalendarBlock05.svelte +97 -0
- package/src/registry/blocks/calendar/CalendarBlock06.svelte +98 -0
- package/src/registry/blocks/calendar/CalendarBlock07.svelte +109 -0
- package/src/registry/blocks/calendar/CalendarBlock08.svelte +71 -0
- package/src/registry/blocks/calendar/CalendarBlock09.svelte +99 -0
- package/src/registry/blocks/calendar/CalendarBlock10.svelte +88 -0
- package/src/registry/blocks/calendar/CalendarBlock11.svelte +99 -0
- package/src/registry/blocks/calendar/CalendarBlock12.svelte +121 -0
- package/src/registry/blocks/calendar/CalendarBlock13.svelte +92 -0
- package/src/registry/blocks/calendar/CalendarBlock14.svelte +71 -0
- package/src/registry/blocks/calendar/CalendarBlock15.svelte +96 -0
- package/src/registry/blocks/calendar/CalendarBlock16.svelte +98 -0
- package/src/registry/blocks/calendar/CalendarBlock17.svelte +88 -0
- package/src/registry/blocks/calendar/CalendarBlock18.svelte +84 -0
- package/src/registry/blocks/calendar/CalendarBlock19.svelte +105 -0
- package/src/registry/blocks/calendar/CalendarBlock20.svelte +78 -0
- package/src/registry/blocks/calendar/CalendarBlock21.svelte +115 -0
- package/src/registry/blocks/calendar/CalendarBlock22.svelte +136 -0
- package/src/registry/blocks/calendar/CalendarBlock23.svelte +112 -0
- package/src/registry/blocks/calendar/CalendarBlock24.svelte +116 -0
- package/src/registry/blocks/calendar/CalendarBlock25.svelte +144 -0
- package/src/registry/blocks/calendar/CalendarBlock26.svelte +163 -0
- package/src/registry/blocks/calendar/CalendarBlock27.svelte +112 -0
- package/src/registry/blocks/calendar/CalendarBlock28.svelte +109 -0
- package/src/registry/blocks/calendar/CalendarBlock29.svelte +126 -0
- package/src/registry/blocks/calendar/CalendarBlock30.svelte +122 -0
- package/src/registry/blocks/calendar/CalendarBlock31.svelte +161 -0
- package/src/registry/blocks/calendar/CalendarBlock32.svelte +154 -0
- package/src/registry/blocks/calendar/index.ts +32 -0
- package/src/registry/blocks/card/Card01.svelte +69 -0
- package/src/registry/blocks/card/Card02.svelte +50 -0
- package/src/registry/blocks/card/Card03.svelte +60 -0
- package/src/registry/blocks/card/Card04.svelte +89 -0
- package/src/registry/blocks/card/Card05.svelte +51 -0
- package/src/registry/blocks/card/Card06.svelte +77 -0
- package/src/registry/blocks/card/Card07.svelte +35 -0
- package/src/registry/blocks/card/Card08.svelte +36 -0
- package/src/registry/blocks/card/index.ts +8 -0
- package/src/registry/blocks/cart/Cart01.svelte +183 -0
- package/src/registry/blocks/cart/Cart02.svelte +103 -0
- package/src/registry/blocks/cart/Cart03.svelte +38 -0
- package/src/registry/blocks/cart/Cart04.svelte +174 -0
- package/src/registry/blocks/cart/index.ts +4 -0
- package/src/registry/blocks/checkout/Checkout01.svelte +237 -0
- package/src/registry/blocks/checkout/Checkout02.svelte +205 -0
- package/src/registry/blocks/checkout/Checkout03.svelte +189 -0
- package/src/registry/blocks/checkout/Checkout04.svelte +109 -0
- package/src/registry/blocks/checkout/index.ts +4 -0
- package/src/registry/blocks/comparison-section/ComparisonSection01.svelte +116 -0
- package/src/registry/blocks/comparison-section/ComparisonSection02.svelte +98 -0
- package/src/registry/blocks/comparison-section/ComparisonSection03.svelte +93 -0
- package/src/registry/blocks/comparison-section/ComparisonSection04.svelte +98 -0
- package/src/registry/blocks/comparison-section/ComparisonSection05.svelte +119 -0
- package/src/registry/blocks/comparison-section/ComparisonSection06.svelte +154 -0
- package/src/registry/blocks/comparison-section/index.ts +6 -0
- package/src/registry/blocks/contact-section/ContactSection01.svelte +64 -0
- package/src/registry/blocks/contact-section/ContactSection02.svelte +108 -0
- package/src/registry/blocks/contact-section/ContactSection03.svelte +64 -0
- package/src/registry/blocks/contact-section/ContactSection04.svelte +30 -0
- package/src/registry/blocks/contact-section/ContactSection05.svelte +71 -0
- package/src/registry/blocks/contact-section/ContactSection06.svelte +88 -0
- package/src/registry/blocks/contact-section/index.ts +6 -0
- package/src/registry/blocks/cta/CTA01.svelte +44 -0
- package/src/registry/blocks/cta/CTA02.svelte +48 -0
- package/src/registry/blocks/cta/CTA03.svelte +53 -0
- package/src/registry/blocks/cta/CTA04.svelte +60 -0
- package/src/registry/blocks/cta/CTA05.svelte +53 -0
- package/src/registry/blocks/cta/CTA06.svelte +44 -0
- package/src/registry/blocks/cta/CTA07.svelte +39 -0
- package/src/registry/blocks/cta/index.ts +7 -0
- package/src/registry/blocks/dashboard/ChartsBlock01.svelte +275 -0
- package/src/registry/blocks/dashboard/DashboardBlock01.svelte +207 -0
- package/src/registry/blocks/dashboard/DashboardBlock02.svelte +259 -0
- package/src/registry/blocks/dashboard/DashboardBlock03.svelte +315 -0
- package/src/registry/blocks/dashboard/DashboardBlock04.svelte +220 -0
- package/src/registry/blocks/dashboard/DashboardBlock05.svelte +158 -0
- package/src/registry/blocks/dashboard/DashboardBlock06.svelte +173 -0
- package/src/registry/blocks/dashboard/DashboardBlock07.svelte +103 -0
- package/src/registry/blocks/dashboard/index.ts +16 -0
- package/src/registry/blocks/description-list/DescriptionList01.svelte +75 -0
- package/src/registry/blocks/description-list/DescriptionList02.svelte +50 -0
- package/src/registry/blocks/description-list/DescriptionList03.svelte +74 -0
- package/src/registry/blocks/description-list/DescriptionList04.svelte +88 -0
- package/src/registry/blocks/description-list/index.ts +4 -0
- package/src/registry/blocks/empty-lp/EmptyLP01.svelte +46 -0
- package/src/registry/blocks/empty-lp/EmptyLP02.svelte +49 -0
- package/src/registry/blocks/empty-lp/EmptyLP03.svelte +61 -0
- package/src/registry/blocks/empty-lp/EmptyLP04.svelte +37 -0
- package/src/registry/blocks/empty-lp/index.ts +4 -0
- package/src/registry/blocks/empty-section/EmptySection01.svelte +47 -0
- package/src/registry/blocks/empty-section/EmptySection02.svelte +93 -0
- package/src/registry/blocks/empty-section/EmptySection03.svelte +101 -0
- package/src/registry/blocks/empty-section/EmptySection04.svelte +76 -0
- package/src/registry/blocks/empty-section/index.ts +4 -0
- package/src/registry/blocks/faq-section/FaqSection01.svelte +114 -0
- package/src/registry/blocks/faq-section/FaqSection02.svelte +137 -0
- package/src/registry/blocks/faq-section/FaqSection03.svelte +107 -0
- package/src/registry/blocks/faq-section/FaqSection04.svelte +74 -0
- package/src/registry/blocks/faq-section/FaqSection05.svelte +69 -0
- package/src/registry/blocks/faq-section/index.ts +11 -0
- package/src/registry/blocks/feature-section/FeatureSection01.svelte +94 -0
- package/src/registry/blocks/feature-section/FeatureSection02.svelte +61 -0
- package/src/registry/blocks/feature-section/FeatureSection03.svelte +85 -0
- package/src/registry/blocks/feature-section/FeatureSection04.svelte +67 -0
- package/src/registry/blocks/feature-section/FeatureSection05.svelte +61 -0
- package/src/registry/blocks/feature-section/FeatureSection06.svelte +58 -0
- package/src/registry/blocks/feature-section/FeatureSection07.svelte +79 -0
- package/src/registry/blocks/feature-section/FeatureSection08.svelte +92 -0
- package/src/registry/blocks/feature-section/FeatureSection09.svelte +58 -0
- package/src/registry/blocks/feature-section/FeatureSection10.svelte +87 -0
- package/src/registry/blocks/feature-section/FeatureSection11.svelte +118 -0
- package/src/registry/blocks/feature-section/FeatureSection12.svelte +76 -0
- package/src/registry/blocks/feature-section/FeatureSection13.svelte +88 -0
- package/src/registry/blocks/feature-section/FeatureSection14.svelte +119 -0
- package/src/registry/blocks/feature-section/FeatureSection15.svelte +122 -0
- package/src/registry/blocks/feature-section/FeatureSection16.svelte +113 -0
- package/src/registry/blocks/feature-section/FeatureSection17.svelte +93 -0
- package/src/registry/blocks/feature-section/FeatureSection18.svelte +97 -0
- package/src/registry/blocks/feature-section/FeatureSection19.svelte +74 -0
- package/src/registry/blocks/feature-section/FeatureSection20.svelte +69 -0
- package/src/registry/blocks/feature-section/index.ts +20 -0
- package/src/registry/blocks/footer/Footer01.svelte +62 -0
- package/src/registry/blocks/footer/Footer02.svelte +67 -0
- package/src/registry/blocks/footer/Footer03.svelte +87 -0
- package/src/registry/blocks/footer/Footer04.svelte +67 -0
- package/src/registry/blocks/footer/Footer05.svelte +20 -0
- package/src/registry/blocks/footer/Footer06.svelte +107 -0
- package/src/registry/blocks/footer/Footer07.svelte +88 -0
- package/src/registry/blocks/footer/Footer08.svelte +84 -0
- package/src/registry/blocks/footer/Footer09.svelte +65 -0
- package/src/registry/blocks/footer/index.ts +19 -0
- package/src/registry/blocks/forms/SettingsBlock.svelte +329 -0
- package/src/registry/blocks/forms/index.ts +1 -0
- package/src/registry/blocks/gallery-section/GallerySection01.svelte +43 -0
- package/src/registry/blocks/gallery-section/GallerySection02.svelte +45 -0
- package/src/registry/blocks/gallery-section/GallerySection03.svelte +43 -0
- package/src/registry/blocks/gallery-section/GallerySection04.svelte +49 -0
- package/src/registry/blocks/gallery-section/GallerySection05.svelte +45 -0
- package/src/registry/blocks/gallery-section/GallerySection06.svelte +49 -0
- package/src/registry/blocks/gallery-section/GallerySection07.svelte +48 -0
- package/src/registry/blocks/gallery-section/GallerySection08.svelte +43 -0
- package/src/registry/blocks/gallery-section/GallerySection09.svelte +55 -0
- package/src/registry/blocks/gallery-section/GallerySection10.svelte +43 -0
- package/src/registry/blocks/gallery-section/GallerySection11.svelte +75 -0
- package/src/registry/blocks/gallery-section/GallerySection12.svelte +76 -0
- package/src/registry/blocks/gallery-section/index.ts +12 -0
- package/src/registry/blocks/header-section/HeaderSection01.svelte +53 -0
- package/src/registry/blocks/header-section/HeaderSection02.svelte +53 -0
- package/src/registry/blocks/header-section/HeaderSection03.svelte +61 -0
- package/src/registry/blocks/header-section/HeaderSection04.svelte +63 -0
- package/src/registry/blocks/header-section/HeaderSection05.svelte +53 -0
- package/src/registry/blocks/header-section/HeaderSection06.svelte +70 -0
- package/src/registry/blocks/header-section/HeaderSection07.svelte +97 -0
- package/src/registry/blocks/header-section/HeaderSection08.svelte +61 -0
- package/src/registry/blocks/header-section/HeaderSection09.svelte +53 -0
- package/src/registry/blocks/header-section/HeaderSection10.svelte +63 -0
- package/src/registry/blocks/header-section/HeaderSection11.svelte +68 -0
- package/src/registry/blocks/header-section/HeaderSection12.svelte +60 -0
- package/src/registry/blocks/header-section/HeaderSection13.svelte +92 -0
- package/src/registry/blocks/header-section/HeaderSection14.svelte +77 -0
- package/src/registry/blocks/header-section/HeaderSection15.svelte +49 -0
- package/src/registry/blocks/header-section/HeaderSection16.svelte +74 -0
- package/src/registry/blocks/header-section/HeaderSection17.svelte +58 -0
- package/src/registry/blocks/header-section/HeaderSection18.svelte +66 -0
- package/src/registry/blocks/header-section/HeaderSection19.svelte +47 -0
- package/src/registry/blocks/header-section/HeaderSection20.svelte +53 -0
- package/src/registry/blocks/header-section/index.ts +20 -0
- package/src/registry/blocks/hero-section/HeroSection01.svelte +69 -0
- package/src/registry/blocks/hero-section/HeroSection02.svelte +47 -0
- package/src/registry/blocks/hero-section/HeroSection03.svelte +56 -0
- package/src/registry/blocks/hero-section/HeroSection04.svelte +69 -0
- package/src/registry/blocks/hero-section/HeroSection05.svelte +73 -0
- package/src/registry/blocks/hero-section/HeroSection06.svelte +78 -0
- package/src/registry/blocks/hero-section/HeroSection07.svelte +48 -0
- package/src/registry/blocks/hero-section/HeroSection08.svelte +73 -0
- package/src/registry/blocks/hero-section/HeroSection09.svelte +51 -0
- package/src/registry/blocks/hero-section/HeroSection10.svelte +47 -0
- package/src/registry/blocks/hero-section/HeroSection11.svelte +60 -0
- package/src/registry/blocks/hero-section/HeroSection12.svelte +74 -0
- package/src/registry/blocks/hero-section/HeroSection13.svelte +86 -0
- package/src/registry/blocks/hero-section/HeroSection14.svelte +116 -0
- package/src/registry/blocks/hero-section/HeroSection15.svelte +75 -0
- package/src/registry/blocks/hero-section/HeroSection16.svelte +92 -0
- package/src/registry/blocks/hero-section/HeroSection17.svelte +78 -0
- package/src/registry/blocks/hero-section/HeroSection18.svelte +82 -0
- package/src/registry/blocks/hero-section/HeroSection19.svelte +72 -0
- package/src/registry/blocks/hero-section/HeroSection20.svelte +79 -0
- package/src/registry/blocks/hero-section/HeroSection21.svelte +75 -0
- package/src/registry/blocks/hero-section/HeroSection22.svelte +103 -0
- package/src/registry/blocks/hero-section/index.ts +22 -0
- package/src/registry/blocks/logo-section/LogoSection01.svelte +54 -0
- package/src/registry/blocks/logo-section/LogoSection02.svelte +56 -0
- package/src/registry/blocks/logo-section/LogoSection03.svelte +58 -0
- package/src/registry/blocks/logo-section/LogoSection04.svelte +58 -0
- package/src/registry/blocks/logo-section/LogoSection05.svelte +43 -0
- package/src/registry/blocks/logo-section/LogoSection06.svelte +43 -0
- package/src/registry/blocks/logo-section/LogoSection07.svelte +56 -0
- package/src/registry/blocks/logo-section/index.ts +7 -0
- package/src/registry/blocks/lp-navbar/LPNavbar01.svelte +94 -0
- package/src/registry/blocks/lp-navbar/LPNavbar02.svelte +96 -0
- package/src/registry/blocks/lp-navbar/LPNavbar03.svelte +97 -0
- package/src/registry/blocks/lp-navbar/LPNavbar04.svelte +103 -0
- package/src/registry/blocks/lp-navbar/LPNavbar05.svelte +173 -0
- package/src/registry/blocks/lp-navbar/LPNavbar06.svelte +200 -0
- package/src/registry/blocks/lp-navbar/LPNavbar07.svelte +202 -0
- package/src/registry/blocks/lp-navbar/index.ts +7 -0
- package/src/registry/blocks/mail/MailBlock.svelte +321 -0
- package/src/registry/blocks/mail/index.ts +2 -0
- package/src/registry/blocks/music/MusicBlock.svelte +239 -0
- package/src/registry/blocks/music/index.ts +1 -0
- package/src/registry/blocks/navbar/Navbar01.svelte +234 -0
- package/src/registry/blocks/navbar/Navbar02.svelte +111 -0
- package/src/registry/blocks/navbar/Navbar03.svelte +88 -0
- package/src/registry/blocks/navbar/index.ts +3 -0
- package/src/registry/blocks/not-found/NotFound01.svelte +29 -0
- package/src/registry/blocks/not-found/NotFound02.svelte +28 -0
- package/src/registry/blocks/not-found/NotFound03.svelte +25 -0
- package/src/registry/blocks/not-found/index.ts +3 -0
- package/src/registry/blocks/order-history/OrderHistory01.svelte +208 -0
- package/src/registry/blocks/order-history/OrderHistory02.svelte +131 -0
- package/src/registry/blocks/order-history/OrderHistory03.svelte +133 -0
- package/src/registry/blocks/order-history/index.ts +3 -0
- package/src/registry/blocks/page-header/PageHeader01.svelte +39 -0
- package/src/registry/blocks/page-header/PageHeader02.svelte +58 -0
- package/src/registry/blocks/page-header/PageHeader03.svelte +64 -0
- package/src/registry/blocks/page-header/PageHeader04.svelte +49 -0
- package/src/registry/blocks/page-header/PageHeader05.svelte +49 -0
- package/src/registry/blocks/page-header/PageHeader06.svelte +58 -0
- package/src/registry/blocks/page-header/PageHeader07.svelte +64 -0
- package/src/registry/blocks/page-header/PageHeader08.svelte +68 -0
- package/src/registry/blocks/page-header/index.ts +8 -0
- package/src/registry/blocks/playground/PlaygroundBlock01.svelte +162 -0
- package/src/registry/blocks/playground/PlaygroundBlock02.svelte +156 -0
- package/src/registry/blocks/playground/index.ts +2 -0
- package/src/registry/blocks/pricing-section/PricingSection01.svelte +109 -0
- package/src/registry/blocks/pricing-section/PricingSection02.svelte +145 -0
- package/src/registry/blocks/pricing-section/PricingSection03.svelte +94 -0
- package/src/registry/blocks/pricing-section/PricingSection04.svelte +103 -0
- package/src/registry/blocks/pricing-section/PricingSection05.svelte +128 -0
- package/src/registry/blocks/pricing-section/index.ts +20 -0
- package/src/registry/blocks/product-card/ProductCard01.svelte +74 -0
- package/src/registry/blocks/product-card/ProductCard02.svelte +108 -0
- package/src/registry/blocks/product-card/ProductCard03.svelte +80 -0
- package/src/registry/blocks/product-card/ProductCard04.svelte +50 -0
- package/src/registry/blocks/product-card/ProductCard05.svelte +107 -0
- package/src/registry/blocks/product-card/index.ts +5 -0
- package/src/registry/blocks/product-detail/ProductDetail01.svelte +174 -0
- package/src/registry/blocks/product-detail/ProductDetail02.svelte +170 -0
- package/src/registry/blocks/product-detail/ProductDetail03.svelte +159 -0
- package/src/registry/blocks/product-detail/ProductDetail04.svelte +106 -0
- package/src/registry/blocks/product-detail/ProductDetail05.svelte +181 -0
- package/src/registry/blocks/product-detail/index.ts +5 -0
- package/src/registry/blocks/product-listing/ProductListing01.svelte +194 -0
- package/src/registry/blocks/product-listing/ProductListing02.svelte +163 -0
- package/src/registry/blocks/product-listing/ProductListing03.svelte +173 -0
- package/src/registry/blocks/product-listing/ProductListing04.svelte +179 -0
- package/src/registry/blocks/product-listing/ProductListing05.svelte +126 -0
- package/src/registry/blocks/product-listing/index.ts +5 -0
- package/src/registry/blocks/product-reviews/ProductReviews01.svelte +156 -0
- package/src/registry/blocks/product-reviews/ProductReviews02.svelte +139 -0
- package/src/registry/blocks/product-reviews/ProductReviews03.svelte +137 -0
- package/src/registry/blocks/product-reviews/ProductReviews04.svelte +129 -0
- package/src/registry/blocks/product-reviews/index.ts +4 -0
- package/src/registry/blocks/promo-section/PromoSection01.svelte +72 -0
- package/src/registry/blocks/promo-section/PromoSection02.svelte +61 -0
- package/src/registry/blocks/promo-section/PromoSection03.svelte +110 -0
- package/src/registry/blocks/promo-section/PromoSection04.svelte +103 -0
- package/src/registry/blocks/promo-section/index.ts +4 -0
- package/src/registry/blocks/rich-text/RichText01.svelte +30 -0
- package/src/registry/blocks/rich-text/RichText02.svelte +72 -0
- package/src/registry/blocks/rich-text/RichText03.svelte +52 -0
- package/src/registry/blocks/rich-text/RichText04.svelte +44 -0
- package/src/registry/blocks/rich-text/RichText05.svelte +56 -0
- package/src/registry/blocks/rich-text/index.ts +5 -0
- package/src/registry/blocks/section/Section01.svelte +38 -0
- package/src/registry/blocks/section/Section02.svelte +90 -0
- package/src/registry/blocks/section/Section03.svelte +95 -0
- package/src/registry/blocks/section/Section04.svelte +117 -0
- package/src/registry/blocks/section/index.ts +4 -0
- package/src/registry/blocks/section-footer/SectionFooter01.svelte +39 -0
- package/src/registry/blocks/section-footer/SectionFooter02.svelte +33 -0
- package/src/registry/blocks/section-footer/SectionFooter03.svelte +33 -0
- package/src/registry/blocks/section-footer/SectionFooter04.svelte +34 -0
- package/src/registry/blocks/section-footer/SectionFooter05.svelte +69 -0
- package/src/registry/blocks/section-footer/index.ts +5 -0
- package/src/registry/blocks/section-header/SectionHeader01.svelte +39 -0
- package/src/registry/blocks/section-header/SectionHeader02.svelte +58 -0
- package/src/registry/blocks/section-header/SectionHeader03.svelte +88 -0
- package/src/registry/blocks/section-header/SectionHeader04.svelte +45 -0
- package/src/registry/blocks/section-header/SectionHeader05.svelte +64 -0
- package/src/registry/blocks/section-header/index.ts +5 -0
- package/src/registry/blocks/settings/Settings01.svelte +202 -0
- package/src/registry/blocks/settings/Settings02.svelte +201 -0
- package/src/registry/blocks/settings/Settings03.svelte +156 -0
- package/src/registry/blocks/settings/Settings04.svelte +175 -0
- package/src/registry/blocks/settings/Settings05.svelte +248 -0
- package/src/registry/blocks/settings/Settings06.svelte +120 -0
- package/src/registry/blocks/settings/Settings07.svelte +136 -0
- package/src/registry/blocks/settings/index.ts +7 -0
- package/src/registry/blocks/sidebar/SidebarLayout01.svelte +108 -0
- package/src/registry/blocks/sidebar/SidebarLayout02.svelte +75 -0
- package/src/registry/blocks/sidebar/SidebarLayout03.svelte +108 -0
- package/src/registry/blocks/sidebar/SidebarLayout04.svelte +111 -0
- package/src/registry/blocks/sidebar/SidebarLayout05.svelte +103 -0
- package/src/registry/blocks/sidebar/SidebarLayout06.svelte +122 -0
- package/src/registry/blocks/sidebar/SidebarLayout07.svelte +183 -0
- package/src/registry/blocks/sidebar/SidebarLayout08.svelte +162 -0
- package/src/registry/blocks/sidebar/SidebarLayout09.svelte +167 -0
- package/src/registry/blocks/sidebar/SidebarLayout10.svelte +159 -0
- package/src/registry/blocks/sidebar/SidebarLayout11.svelte +135 -0
- package/src/registry/blocks/sidebar/SidebarLayout12.svelte +159 -0
- package/src/registry/blocks/sidebar/SidebarLayout13.svelte +103 -0
- package/src/registry/blocks/sidebar/SidebarLayout14.svelte +87 -0
- package/src/registry/blocks/sidebar/SidebarLayout15.svelte +228 -0
- package/src/registry/blocks/sidebar/index.ts +15 -0
- package/src/registry/blocks/sign-in/SignIn01.svelte +140 -0
- package/src/registry/blocks/sign-in/SignIn02.svelte +155 -0
- package/src/registry/blocks/sign-in/SignIn03.svelte +214 -0
- package/src/registry/blocks/sign-in/SignIn04.svelte +163 -0
- package/src/registry/blocks/sign-in/SignIn05.svelte +209 -0
- package/src/registry/blocks/sign-in/SignIn06.svelte +233 -0
- package/src/registry/blocks/sign-in/SignIn07.svelte +268 -0
- package/src/registry/blocks/sign-in/SignIn08.svelte +125 -0
- package/src/registry/blocks/sign-in/SignIn09.svelte +93 -0
- package/src/registry/blocks/sign-in/SignIn10.svelte +74 -0
- package/src/registry/blocks/sign-in/index.ts +10 -0
- package/src/registry/blocks/sign-up/SignUp01.svelte +124 -0
- package/src/registry/blocks/sign-up/SignUp02.svelte +110 -0
- package/src/registry/blocks/sign-up/SignUp03.svelte +182 -0
- package/src/registry/blocks/sign-up/SignUp04.svelte +126 -0
- package/src/registry/blocks/sign-up/SignUp05.svelte +182 -0
- package/src/registry/blocks/sign-up/SignUp06.svelte +221 -0
- package/src/registry/blocks/sign-up/SignUp07.svelte +98 -0
- package/src/registry/blocks/sign-up/index.ts +7 -0
- package/src/registry/blocks/stats-section/StatsSection01.svelte +66 -0
- package/src/registry/blocks/stats-section/StatsSection02.svelte +60 -0
- package/src/registry/blocks/stats-section/StatsSection03.svelte +66 -0
- package/src/registry/blocks/stats-section/StatsSection04.svelte +66 -0
- package/src/registry/blocks/stats-section/StatsSection05.svelte +60 -0
- package/src/registry/blocks/stats-section/StatsSection06.svelte +48 -0
- package/src/registry/blocks/stats-section/StatsSection07.svelte +66 -0
- package/src/registry/blocks/stats-section/index.ts +7 -0
- package/src/registry/blocks/store-navbar/StoreNavbar01.svelte +101 -0
- package/src/registry/blocks/store-navbar/StoreNavbar02.svelte +65 -0
- package/src/registry/blocks/store-navbar/StoreNavbar03.svelte +83 -0
- package/src/registry/blocks/store-navbar/StoreNavbar04.svelte +110 -0
- package/src/registry/blocks/store-navbar/StoreNavbar05.svelte +80 -0
- package/src/registry/blocks/store-navbar/index.ts +5 -0
- package/src/registry/blocks/table-header/TableHeader01.svelte +96 -0
- package/src/registry/blocks/table-header/TableHeader02.svelte +86 -0
- package/src/registry/blocks/table-header/TableHeader03.svelte +99 -0
- package/src/registry/blocks/table-header/TableHeader04.svelte +107 -0
- package/src/registry/blocks/table-header/index.ts +4 -0
- package/src/registry/blocks/tasks/TasksBlock.svelte +286 -0
- package/src/registry/blocks/tasks/index.ts +1 -0
- package/src/registry/blocks/team-section/TeamSection01.svelte +80 -0
- package/src/registry/blocks/team-section/TeamSection02.svelte +102 -0
- package/src/registry/blocks/team-section/TeamSection03.svelte +76 -0
- package/src/registry/blocks/team-section/TeamSection04.svelte +106 -0
- package/src/registry/blocks/team-section/index.ts +13 -0
- package/src/registry/blocks/testimonials/Testimonial01.svelte +74 -0
- package/src/registry/blocks/testimonials/Testimonial02.svelte +74 -0
- package/src/registry/blocks/testimonials/Testimonial03.svelte +79 -0
- package/src/registry/blocks/testimonials/Testimonial04.svelte +113 -0
- package/src/registry/blocks/testimonials/Testimonial05.svelte +74 -0
- package/src/registry/blocks/testimonials/Testimonial06.svelte +114 -0
- package/src/registry/blocks/testimonials/Testimonial07.svelte +131 -0
- package/src/registry/blocks/testimonials/Testimonials01.svelte +60 -0
- package/src/registry/blocks/testimonials/Testimonials02.svelte +61 -0
- package/src/registry/blocks/testimonials/Testimonials03.svelte +79 -0
- package/src/registry/blocks/testimonials/Testimonials04.svelte +74 -0
- package/src/registry/blocks/testimonials/Testimonials05.svelte +68 -0
- package/src/registry/blocks/testimonials/Testimonials06.svelte +82 -0
- package/src/registry/blocks/testimonials/Testimonials07.svelte +98 -0
- package/src/registry/blocks/testimonials/index.ts +16 -0
- package/src/registry/templates/cn.ts +42 -0
- package/src/index.ts +0 -2
- package/tsconfig.json +0 -20
- /package/src/{generate-component.cjs → commands/generate-component.cjs} +0 -0
- /package/src/{generate-route.cjs → commands/generate-route.cjs} +0 -0
- /package/src/{generate-service.cjs → commands/generate-service.cjs} +0 -0
- /package/src/{manage-auth-users.cjs → commands/manage-auth-users.cjs} +0 -0
- /package/src/{setup.cjs → commands/setup.cjs} +0 -0
- /package/src/{validate-setup.cjs → commands/validate.cjs} +0 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AccountSection03.svelte
|
|
3
|
+
Saved addresses: list of 2 address cards with address details + "Default" badge on one,
|
|
4
|
+
Edit/Delete buttons. "+ Add new address" button.
|
|
5
|
+
Modal/inline form for adding address (collapsed by default, $state for show).
|
|
6
|
+
-->
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { cn } from '$lib/utils/cn';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { class: className = '' }: Props = $props();
|
|
15
|
+
|
|
16
|
+
let showAddForm = $state(false);
|
|
17
|
+
let newAddress = $state({
|
|
18
|
+
fullName: '',
|
|
19
|
+
street: '',
|
|
20
|
+
city: '',
|
|
21
|
+
state: '',
|
|
22
|
+
zipCode: '',
|
|
23
|
+
country: ''
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const addresses = [
|
|
27
|
+
{
|
|
28
|
+
id: 1,
|
|
29
|
+
fullName: 'Sarah Anderson',
|
|
30
|
+
street: '123 Main Street, Apt 4B',
|
|
31
|
+
city: 'New York',
|
|
32
|
+
state: 'NY',
|
|
33
|
+
zipCode: '10001',
|
|
34
|
+
country: 'USA',
|
|
35
|
+
isDefault: true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 2,
|
|
39
|
+
fullName: 'Sarah Anderson',
|
|
40
|
+
street: '456 Oak Avenue',
|
|
41
|
+
city: 'San Francisco',
|
|
42
|
+
state: 'CA',
|
|
43
|
+
zipCode: '94102',
|
|
44
|
+
country: 'USA',
|
|
45
|
+
isDefault: false
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div class={cn('w-full bg-gray-50 py-8', className)}>
|
|
51
|
+
<div class="mx-auto max-w-4xl px-4">
|
|
52
|
+
<div class="mb-6 flex items-center justify-between">
|
|
53
|
+
<h1 class="text-2xl font-bold text-gray-900">Saved Addresses</h1>
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
onclick={() => (showAddForm = !showAddForm)}
|
|
57
|
+
class="rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700"
|
|
58
|
+
>
|
|
59
|
+
{showAddForm ? 'Cancel' : '+ Add New Address'}
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<!-- Add address form -->
|
|
64
|
+
{#if showAddForm}
|
|
65
|
+
<div class="mb-6 rounded-lg border border-blue-200 bg-blue-50 p-6">
|
|
66
|
+
<h2 class="mb-4 text-lg font-semibold text-gray-900">Add New Address</h2>
|
|
67
|
+
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
|
68
|
+
<div>
|
|
69
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
|
|
70
|
+
<input
|
|
71
|
+
type="text"
|
|
72
|
+
bind:value={newAddress.fullName}
|
|
73
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
74
|
+
placeholder="Enter full name"
|
|
75
|
+
/>
|
|
76
|
+
</div>
|
|
77
|
+
<div>
|
|
78
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Street Address</label>
|
|
79
|
+
<input
|
|
80
|
+
type="text"
|
|
81
|
+
bind:value={newAddress.street}
|
|
82
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
83
|
+
placeholder="Street address"
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
<div>
|
|
87
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">City</label>
|
|
88
|
+
<input
|
|
89
|
+
type="text"
|
|
90
|
+
bind:value={newAddress.city}
|
|
91
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
92
|
+
placeholder="City"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
<div>
|
|
96
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">State/Province</label>
|
|
97
|
+
<input
|
|
98
|
+
type="text"
|
|
99
|
+
bind:value={newAddress.state}
|
|
100
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
101
|
+
placeholder="State"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
<div>
|
|
105
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">ZIP/Postal Code</label>
|
|
106
|
+
<input
|
|
107
|
+
type="text"
|
|
108
|
+
bind:value={newAddress.zipCode}
|
|
109
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
110
|
+
placeholder="ZIP code"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
<div>
|
|
114
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Country</label>
|
|
115
|
+
<input
|
|
116
|
+
type="text"
|
|
117
|
+
bind:value={newAddress.country}
|
|
118
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
119
|
+
placeholder="Country"
|
|
120
|
+
/>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div class="mt-4 flex gap-3">
|
|
124
|
+
<button type="button" class="rounded-lg bg-blue-600 px-6 py-2 text-sm font-medium text-white hover:bg-blue-700">Save Address</button>
|
|
125
|
+
<button
|
|
126
|
+
type="button"
|
|
127
|
+
onclick={() => (showAddForm = false)}
|
|
128
|
+
class="rounded-lg border border-gray-300 px-6 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50"
|
|
129
|
+
>
|
|
130
|
+
Cancel
|
|
131
|
+
</button>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
{/if}
|
|
135
|
+
|
|
136
|
+
<!-- Addresses list -->
|
|
137
|
+
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
138
|
+
{#each addresses as address}
|
|
139
|
+
<div class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
|
|
140
|
+
<div class="mb-4 flex items-start justify-between">
|
|
141
|
+
<h3 class="text-lg font-semibold text-gray-900">{address.fullName}</h3>
|
|
142
|
+
{#if address.isDefault}
|
|
143
|
+
<span class="inline-flex items-center rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-700">Default</span>
|
|
144
|
+
{/if}
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="mb-4 space-y-1 text-sm text-gray-600">
|
|
148
|
+
<p>{address.street}</p>
|
|
149
|
+
<p>{address.city}, {address.state} {address.zipCode}</p>
|
|
150
|
+
<p>{address.country}</p>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<div class="flex gap-3">
|
|
154
|
+
<button type="button" class="flex-1 rounded-lg border border-blue-600 px-3 py-2 text-sm font-medium text-blue-600 hover:bg-blue-50">Edit</button>
|
|
155
|
+
<button type="button" class="flex-1 rounded-lg border border-red-300 px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50">Delete</button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
{/each}
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AccountSection04.svelte
|
|
3
|
+
Payment methods: list of 2 payment method cards with card icon (Visa/Mastercard SVG logo),
|
|
4
|
+
last 4 digits, expiry, "Default" badge. Add new card button. PayPal linked account entry.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let { class: className = '' }: Props = $props();
|
|
14
|
+
|
|
15
|
+
let showAddCard = $state(false);
|
|
16
|
+
|
|
17
|
+
const paymentMethods = [
|
|
18
|
+
{
|
|
19
|
+
id: 1,
|
|
20
|
+
type: 'visa',
|
|
21
|
+
lastFour: '4242',
|
|
22
|
+
expiry: '12/26',
|
|
23
|
+
cardName: 'Visa',
|
|
24
|
+
isDefault: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 2,
|
|
28
|
+
type: 'mastercard',
|
|
29
|
+
lastFour: '5555',
|
|
30
|
+
expiry: '08/27',
|
|
31
|
+
cardName: 'Mastercard',
|
|
32
|
+
isDefault: false
|
|
33
|
+
}
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
const paypalLinked = {
|
|
37
|
+
email: 'sarah.anderson@example.com',
|
|
38
|
+
isDefault: false
|
|
39
|
+
};
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<div class={cn('w-full bg-gray-50 py-8', className)}>
|
|
43
|
+
<div class="mx-auto max-w-4xl px-4">
|
|
44
|
+
<div class="mb-6 flex items-center justify-between">
|
|
45
|
+
<h1 class="text-2xl font-bold text-gray-900">Payment Methods</h1>
|
|
46
|
+
<button
|
|
47
|
+
type="button"
|
|
48
|
+
onclick={() => (showAddCard = !showAddCard)}
|
|
49
|
+
class="rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700"
|
|
50
|
+
>
|
|
51
|
+
{showAddCard ? 'Cancel' : '+ Add Card'}
|
|
52
|
+
</button>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<!-- Add card form -->
|
|
56
|
+
{#if showAddCard}
|
|
57
|
+
<div class="mb-6 rounded-lg border border-blue-200 bg-blue-50 p-6">
|
|
58
|
+
<h2 class="mb-4 text-lg font-semibold text-gray-900">Add Payment Method</h2>
|
|
59
|
+
<div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
|
|
60
|
+
<div class="sm:col-span-2">
|
|
61
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Card Number</label>
|
|
62
|
+
<input
|
|
63
|
+
type="text"
|
|
64
|
+
placeholder="1234 5678 9012 3456"
|
|
65
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
66
|
+
/>
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Expiry Date</label>
|
|
70
|
+
<input
|
|
71
|
+
type="text"
|
|
72
|
+
placeholder="MM/YY"
|
|
73
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
76
|
+
<div>
|
|
77
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">CVV</label>
|
|
78
|
+
<input
|
|
79
|
+
type="text"
|
|
80
|
+
placeholder="123"
|
|
81
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
82
|
+
/>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="sm:col-span-2">
|
|
85
|
+
<label class="block text-sm font-medium text-gray-700 mb-1">Cardholder Name</label>
|
|
86
|
+
<input
|
|
87
|
+
type="text"
|
|
88
|
+
placeholder="Name on card"
|
|
89
|
+
class="w-full rounded-lg border border-gray-300 px-4 py-2 text-sm focus:border-blue-500 focus:outline-none"
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="mt-4 flex gap-3">
|
|
94
|
+
<button type="button" class="rounded-lg bg-blue-600 px-6 py-2 text-sm font-medium text-white hover:bg-blue-700">Add Card</button>
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
onclick={() => (showAddCard = false)}
|
|
98
|
+
class="rounded-lg border border-gray-300 px-6 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50"
|
|
99
|
+
>
|
|
100
|
+
Cancel
|
|
101
|
+
</button>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
{/if}
|
|
105
|
+
|
|
106
|
+
<!-- Payment methods list -->
|
|
107
|
+
<div class="grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
108
|
+
{#each paymentMethods as method}
|
|
109
|
+
<div class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
|
|
110
|
+
<div class="mb-4 flex items-start justify-between">
|
|
111
|
+
<div class="flex items-center gap-3">
|
|
112
|
+
{#if method.type === 'visa'}
|
|
113
|
+
<div class="flex h-10 w-16 items-center justify-center rounded bg-blue-600">
|
|
114
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="20" viewBox="0 0 48 32" fill="none"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="white" font-size="12" font-weight="bold">VISA</text></svg>
|
|
115
|
+
</div>
|
|
116
|
+
{:else if method.type === 'mastercard'}
|
|
117
|
+
<div class="flex h-10 w-16 items-center justify-center rounded bg-orange-500">
|
|
118
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="20" viewBox="0 0 48 32" fill="none"><circle cx="16" cy="16" r="12" fill="red"/><circle cx="32" cy="16" r="12" fill="orange"/></svg>
|
|
119
|
+
</div>
|
|
120
|
+
{/if}
|
|
121
|
+
<div>
|
|
122
|
+
<p class="font-medium text-gray-900">{method.cardName}</p>
|
|
123
|
+
<p class="text-sm text-gray-500">****{method.lastFour}</p>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
{#if method.isDefault}
|
|
127
|
+
<span class="inline-flex items-center rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-700">Default</span>
|
|
128
|
+
{/if}
|
|
129
|
+
</div>
|
|
130
|
+
|
|
131
|
+
<p class="mb-4 text-sm text-gray-600">Expires {method.expiry}</p>
|
|
132
|
+
|
|
133
|
+
<div class="flex gap-3">
|
|
134
|
+
<button type="button" class="flex-1 rounded-lg border border-blue-600 px-3 py-2 text-sm font-medium text-blue-600 hover:bg-blue-50">Edit</button>
|
|
135
|
+
<button type="button" class="flex-1 rounded-lg border border-red-300 px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50">Delete</button>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
{/each}
|
|
139
|
+
|
|
140
|
+
<!-- PayPal -->
|
|
141
|
+
<div class="rounded-lg border border-gray-200 bg-white p-6 shadow-sm">
|
|
142
|
+
<div class="mb-4 flex items-start justify-between">
|
|
143
|
+
<div class="flex items-center gap-3">
|
|
144
|
+
<div class="flex h-10 w-16 items-center justify-center rounded bg-blue-700">
|
|
145
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="20" viewBox="0 0 48 32" fill="none"><text x="50%" y="50%" dominant-baseline="middle" text-anchor="middle" fill="white" font-size="10" font-weight="bold">PayPal</text></svg>
|
|
146
|
+
</div>
|
|
147
|
+
<div>
|
|
148
|
+
<p class="font-medium text-gray-900">PayPal</p>
|
|
149
|
+
<p class="text-sm text-gray-500">{paypalLinked.email}</p>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
{#if paypalLinked.isDefault}
|
|
153
|
+
<span class="inline-flex items-center rounded-full bg-blue-100 px-3 py-1 text-xs font-medium text-blue-700">Default</span>
|
|
154
|
+
{/if}
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<div class="flex gap-3">
|
|
158
|
+
<button type="button" class="flex-1 rounded-lg border border-blue-600 px-3 py-2 text-sm font-medium text-blue-600 hover:bg-blue-50">Edit</button>
|
|
159
|
+
<button type="button" class="flex-1 rounded-lg border border-red-300 px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-50">Remove</button>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AccountSection05.svelte
|
|
3
|
+
Wishlist page: "My Wishlist (8)" heading.
|
|
4
|
+
4-col grid of saved product cards with: image placeholder, name, price,
|
|
5
|
+
"Move to cart" + remove (X) buttons.
|
|
6
|
+
-->
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { cn } from '$lib/utils/cn';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { class: className = '' }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const wishlistItems = [
|
|
17
|
+
{ id: 1, name: 'Premium Leather Jacket', price: '$189.99', category: 'Outerwear' },
|
|
18
|
+
{ id: 2, name: 'Classic White Sneakers', price: '$79.99', category: 'Shoes' },
|
|
19
|
+
{ id: 3, name: 'Wool Blend Trousers', price: '$129.99', category: 'Bottoms' },
|
|
20
|
+
{ id: 4, name: 'Silk Scarf', price: '$49.99', category: 'Accessories' },
|
|
21
|
+
{ id: 5, name: 'Cotton T-Shirt', price: '$29.99', category: 'Tops' },
|
|
22
|
+
{ id: 6, name: 'Designer Sunglasses', price: '$159.99', category: 'Accessories' },
|
|
23
|
+
{ id: 7, name: 'Canvas Tote Bag', price: '$89.99', category: 'Bags' },
|
|
24
|
+
{ id: 8, name: 'Cashmere Sweater', price: '$179.99', category: 'Tops' }
|
|
25
|
+
];
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div class={cn('w-full bg-gray-50 py-8', className)}>
|
|
29
|
+
<div class="mx-auto max-w-7xl px-4">
|
|
30
|
+
<div class="mb-8">
|
|
31
|
+
<h1 class="text-3xl font-bold text-gray-900">My Wishlist ({wishlistItems.length})</h1>
|
|
32
|
+
<p class="mt-2 text-gray-600">Items you've saved for later</p>
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<!-- Products grid -->
|
|
36
|
+
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
|
|
37
|
+
{#each wishlistItems as item}
|
|
38
|
+
<div class="rounded-lg bg-white shadow-sm hover:shadow-md transition-shadow overflow-hidden">
|
|
39
|
+
<!-- Product image placeholder -->
|
|
40
|
+
<div class="relative aspect-square bg-gray-100">
|
|
41
|
+
<button
|
|
42
|
+
type="button"
|
|
43
|
+
class="absolute right-2 top-2 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md hover:bg-gray-100"
|
|
44
|
+
>
|
|
45
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" class="text-red-500"><path d="M18 6 6 18M6 6 18 18"/></svg>
|
|
46
|
+
</button>
|
|
47
|
+
<div class="flex h-full items-center justify-center">
|
|
48
|
+
<div class="text-center text-gray-400 text-sm">Product Image</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Product details -->
|
|
53
|
+
<div class="p-4">
|
|
54
|
+
<p class="mb-1 text-xs font-medium text-gray-500 uppercase tracking-wide">{item.category}</p>
|
|
55
|
+
<h3 class="mb-2 text-sm font-semibold text-gray-900 line-clamp-2">{item.name}</h3>
|
|
56
|
+
<p class="mb-4 text-lg font-bold text-gray-900">{item.price}</p>
|
|
57
|
+
|
|
58
|
+
<button type="button" class="w-full rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700">
|
|
59
|
+
Move to Cart
|
|
60
|
+
</button>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
{/each}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Empty state (if no items) -->
|
|
67
|
+
<!-- {#if wishlistItems.length === 0}
|
|
68
|
+
<div class="rounded-lg border-2 border-dashed border-gray-300 bg-white py-12 text-center">
|
|
69
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="mx-auto mb-4 text-gray-400"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>
|
|
70
|
+
<h3 class="mt-2 text-lg font-semibold text-gray-900">Your wishlist is empty</h3>
|
|
71
|
+
<p class="mt-1 text-gray-600">Add items to your wishlist to save them for later</p>
|
|
72
|
+
<a href="#" class="mt-4 inline-block rounded-lg bg-blue-600 px-6 py-2 text-sm font-medium text-white hover:bg-blue-700">Continue Shopping</a>
|
|
73
|
+
</div>
|
|
74
|
+
{/if} -->
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as AccountSection01 } from './AccountSection01.svelte';
|
|
2
|
+
export { default as AccountSection02 } from './AccountSection02.svelte';
|
|
3
|
+
export { default as AccountSection03 } from './AccountSection03.svelte';
|
|
4
|
+
export { default as AccountSection04 } from './AccountSection04.svelte';
|
|
5
|
+
export { default as AccountSection05 } from './AccountSection05.svelte';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AppShell01.svelte
|
|
3
|
+
Navbar1 (with links + upgrade) + breadcrumb + page title/description +
|
|
4
|
+
action buttons (Share, View, Edit, Publish) + slotted content area.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import { Button } from '$lib/components/ui';
|
|
9
|
+
import Navbar01 from '$lib/components/blocks/navbar/Navbar01.svelte';
|
|
10
|
+
import type { Snippet } from 'svelte';
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
class: className = '',
|
|
14
|
+
title = 'Project alpha',
|
|
15
|
+
description = 'Manage your project\'s details such as name, image, description and settings.',
|
|
16
|
+
breadcrumbs = [{ label: 'Home', href: '#' }, { label: 'Settings', href: '#' }, { label: 'Profile details' }],
|
|
17
|
+
onshare = () => {},
|
|
18
|
+
onview = () => {},
|
|
19
|
+
onedit = () => {},
|
|
20
|
+
onpublish = () => {},
|
|
21
|
+
children
|
|
22
|
+
}: {
|
|
23
|
+
class?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
breadcrumbs?: Array<{ label: string; href?: string }>;
|
|
27
|
+
onshare?: () => void;
|
|
28
|
+
onview?: () => void;
|
|
29
|
+
onedit?: () => void;
|
|
30
|
+
onpublish?: () => void;
|
|
31
|
+
children?: Snippet;
|
|
32
|
+
} = $props();
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<div class={cn('flex min-h-screen flex-col bg-muted/30', className)}>
|
|
36
|
+
<Navbar01 />
|
|
37
|
+
|
|
38
|
+
<div class="flex-1 px-4 py-6 md:px-8">
|
|
39
|
+
<!-- Breadcrumb -->
|
|
40
|
+
<nav class="mb-4 flex items-center gap-1.5 text-sm text-muted-foreground">
|
|
41
|
+
{#each breadcrumbs as crumb, i}
|
|
42
|
+
{#if i > 0}<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>{/if}
|
|
43
|
+
{#if crumb.href && i < breadcrumbs.length - 1}
|
|
44
|
+
<a href={crumb.href} class="hover:text-foreground">{crumb.label}</a>
|
|
45
|
+
{:else}
|
|
46
|
+
<span class={i === breadcrumbs.length - 1 ? 'font-medium text-foreground' : ''}>{crumb.label}</span>
|
|
47
|
+
{/if}
|
|
48
|
+
{/each}
|
|
49
|
+
</nav>
|
|
50
|
+
|
|
51
|
+
<!-- Page header -->
|
|
52
|
+
<div class="mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
53
|
+
<div>
|
|
54
|
+
<h1 class="text-2xl font-bold">{title}</h1>
|
|
55
|
+
{#if description}<p class="mt-1 text-sm text-muted-foreground">{description}</p>{/if}
|
|
56
|
+
</div>
|
|
57
|
+
<div class="flex shrink-0 items-center gap-2">
|
|
58
|
+
<Button variant="outline" size="sm" onclick={onshare}>Share</Button>
|
|
59
|
+
<Button variant="outline" size="sm" onclick={onview}>View</Button>
|
|
60
|
+
<Button variant="outline" size="sm" onclick={onedit}>Edit</Button>
|
|
61
|
+
<Button size="sm" onclick={onpublish}>Publish</Button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<!-- Content slot -->
|
|
66
|
+
{#if children}
|
|
67
|
+
{@render children()}
|
|
68
|
+
{:else}
|
|
69
|
+
<div class="flex min-h-32 items-center justify-center rounded-lg border border-dashed bg-background text-sm text-muted-foreground">
|
|
70
|
+
Slot (swap it with your content)
|
|
71
|
+
</div>
|
|
72
|
+
{/if}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AppShell02.svelte
|
|
3
|
+
Navbar2 + tabs below navbar + page title/description + action buttons +
|
|
4
|
+
multiple stacked content slots.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import { Button } from '$lib/components/ui';
|
|
9
|
+
import Navbar02 from '$lib/components/blocks/navbar/Navbar02.svelte';
|
|
10
|
+
import type { Snippet } from 'svelte';
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
class: className = '',
|
|
14
|
+
title = 'Project alpha',
|
|
15
|
+
description = 'Manage your profile details such as name, avatar, email and bio.',
|
|
16
|
+
tabs = ['Profile','Reports','Analytics','Notifications','Help Center'],
|
|
17
|
+
activeTab = 'Profile',
|
|
18
|
+
onedit = () => {},
|
|
19
|
+
onpublish = () => {},
|
|
20
|
+
children,
|
|
21
|
+
slots = 3
|
|
22
|
+
}: {
|
|
23
|
+
class?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
tabs?: string[];
|
|
27
|
+
activeTab?: string;
|
|
28
|
+
onedit?: () => void;
|
|
29
|
+
onpublish?: () => void;
|
|
30
|
+
children?: Snippet;
|
|
31
|
+
slots?: number;
|
|
32
|
+
} = $props();
|
|
33
|
+
|
|
34
|
+
let currentTab = $state(activeTab);
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<div class={cn('flex min-h-screen flex-col bg-muted/30', className)}>
|
|
38
|
+
<Navbar02 />
|
|
39
|
+
|
|
40
|
+
<!-- Tab bar -->
|
|
41
|
+
<div class="border-b bg-background px-4 md:px-8">
|
|
42
|
+
<div class="flex gap-0 overflow-x-auto">
|
|
43
|
+
{#each tabs as tab}
|
|
44
|
+
<button
|
|
45
|
+
type="button"
|
|
46
|
+
onclick={() => (currentTab = tab)}
|
|
47
|
+
class={cn(
|
|
48
|
+
'shrink-0 border-b-2 px-4 py-3 text-sm font-medium transition-colors',
|
|
49
|
+
currentTab === tab
|
|
50
|
+
? 'border-foreground text-foreground'
|
|
51
|
+
: 'border-transparent text-muted-foreground hover:text-foreground'
|
|
52
|
+
)}
|
|
53
|
+
>{tab}</button>
|
|
54
|
+
{/each}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="flex-1 px-4 py-6 md:px-8">
|
|
59
|
+
<!-- Page header -->
|
|
60
|
+
<div class="mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
61
|
+
<div>
|
|
62
|
+
<h1 class="text-2xl font-bold">{title}</h1>
|
|
63
|
+
{#if description}<p class="mt-1 text-sm text-muted-foreground">{description}</p>{/if}
|
|
64
|
+
</div>
|
|
65
|
+
<div class="flex shrink-0 items-center gap-2">
|
|
66
|
+
<Button size="sm" onclick={onpublish}>Publish</Button>
|
|
67
|
+
<Button variant="outline" size="sm" onclick={onedit}>Edit</Button>
|
|
68
|
+
<Button variant="ghost" size="icon" class="h-8 w-8">
|
|
69
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="1"/><circle cx="19" cy="12" r="1"/><circle cx="5" cy="12" r="1"/></svg>
|
|
70
|
+
</Button>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- Stacked content slots -->
|
|
75
|
+
{#if children}
|
|
76
|
+
{@render children()}
|
|
77
|
+
{:else}
|
|
78
|
+
<div class="flex flex-col gap-4">
|
|
79
|
+
{#each Array(slots) as _}
|
|
80
|
+
<div class="flex min-h-24 items-center justify-center rounded-lg border border-dashed bg-background text-sm text-muted-foreground">
|
|
81
|
+
Slot (swap it with your content)
|
|
82
|
+
</div>
|
|
83
|
+
{/each}
|
|
84
|
+
</div>
|
|
85
|
+
{/if}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
AppShell03.svelte
|
|
3
|
+
Navbar2 + breadcrumb + page title/description + inline search + stacked slots.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import { cn } from '$lib/utils/cn';
|
|
7
|
+
import { Button } from '$lib/components/ui';
|
|
8
|
+
import Navbar02 from '$lib/components/blocks/navbar/Navbar02.svelte';
|
|
9
|
+
import type { Snippet } from 'svelte';
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
class: className = '',
|
|
13
|
+
title = 'Project alpha',
|
|
14
|
+
description = 'Manage your project\'s details such as name, avatar, email and bio.',
|
|
15
|
+
breadcrumbs = [{ label: 'Home', href: '#' }, { label: 'Settings', href: '#' }, { label: 'Profile details' }],
|
|
16
|
+
searchPlaceholder = 'Search',
|
|
17
|
+
onpublish = () => {},
|
|
18
|
+
onedit = () => {},
|
|
19
|
+
children,
|
|
20
|
+
slots = 3
|
|
21
|
+
}: {
|
|
22
|
+
class?: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
breadcrumbs?: Array<{ label: string; href?: string }>;
|
|
26
|
+
searchPlaceholder?: string;
|
|
27
|
+
onpublish?: () => void;
|
|
28
|
+
onedit?: () => void;
|
|
29
|
+
children?: Snippet;
|
|
30
|
+
slots?: number;
|
|
31
|
+
} = $props();
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<div class={cn('flex min-h-screen flex-col bg-muted/30', className)}>
|
|
35
|
+
<Navbar02 />
|
|
36
|
+
|
|
37
|
+
<div class="flex-1 px-4 py-6 md:px-8">
|
|
38
|
+
<!-- Breadcrumb -->
|
|
39
|
+
<nav class="mb-4 flex items-center gap-1.5 text-sm text-muted-foreground">
|
|
40
|
+
{#each breadcrumbs as crumb, i}
|
|
41
|
+
{#if i > 0}<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>{/if}
|
|
42
|
+
{#if crumb.href && i < breadcrumbs.length - 1}
|
|
43
|
+
<a href={crumb.href} class="hover:text-foreground">{crumb.label}</a>
|
|
44
|
+
{:else}
|
|
45
|
+
<span class={i === breadcrumbs.length - 1 ? 'font-medium text-foreground' : ''}>{crumb.label}</span>
|
|
46
|
+
{/if}
|
|
47
|
+
{/each}
|
|
48
|
+
</nav>
|
|
49
|
+
|
|
50
|
+
<!-- Page header with inline search -->
|
|
51
|
+
<div class="mb-6 flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between">
|
|
52
|
+
<div>
|
|
53
|
+
<h1 class="text-2xl font-bold">{title}</h1>
|
|
54
|
+
{#if description}<p class="mt-1 text-sm text-muted-foreground">{description}</p>{/if}
|
|
55
|
+
</div>
|
|
56
|
+
<div class="flex shrink-0 items-center gap-2">
|
|
57
|
+
<div class="flex items-center gap-2 rounded-md border bg-background px-3 py-1.5">
|
|
58
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="text-muted-foreground"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
|
59
|
+
<input type="text" placeholder={searchPlaceholder} class="bg-transparent text-sm outline-none placeholder:text-muted-foreground w-40" />
|
|
60
|
+
</div>
|
|
61
|
+
<Button size="sm" onclick={onpublish}>Publish</Button>
|
|
62
|
+
<Button variant="outline" size="sm" onclick={onedit}>Edit</Button>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<!-- Stacked slots -->
|
|
67
|
+
{#if children}
|
|
68
|
+
{@render children()}
|
|
69
|
+
{:else}
|
|
70
|
+
<div class="flex flex-col gap-4">
|
|
71
|
+
{#each Array(slots) as _}
|
|
72
|
+
<div class="flex min-h-24 items-center justify-center rounded-lg border border-dashed bg-background text-sm text-muted-foreground">
|
|
73
|
+
Slot (swap it with your content)
|
|
74
|
+
</div>
|
|
75
|
+
{/each}
|
|
76
|
+
</div>
|
|
77
|
+
{/if}
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|