@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,220 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
DashboardBlock04.svelte
|
|
3
|
+
Orders dashboard variant with a different column layout.
|
|
4
|
+
Features a wider detail panel alongside orders and inline stats.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import {
|
|
9
|
+
Button,
|
|
10
|
+
Card,
|
|
11
|
+
CardHeader,
|
|
12
|
+
CardContent,
|
|
13
|
+
CardTitle,
|
|
14
|
+
CardDescription,
|
|
15
|
+
Badge,
|
|
16
|
+
Separator,
|
|
17
|
+
Table,
|
|
18
|
+
TableHeader,
|
|
19
|
+
TableBody,
|
|
20
|
+
TableRow,
|
|
21
|
+
TableHead,
|
|
22
|
+
TableCell
|
|
23
|
+
} from '$lib/components/ui';
|
|
24
|
+
|
|
25
|
+
let {
|
|
26
|
+
class: className = '',
|
|
27
|
+
orders = [],
|
|
28
|
+
selectedOrder = null,
|
|
29
|
+
stats = [],
|
|
30
|
+
onSelectOrder = undefined,
|
|
31
|
+
onCreateOrder = undefined
|
|
32
|
+
}: {
|
|
33
|
+
class?: string;
|
|
34
|
+
/** Orders data */
|
|
35
|
+
orders?: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
customer: string;
|
|
38
|
+
email: string;
|
|
39
|
+
type: string;
|
|
40
|
+
status: string;
|
|
41
|
+
date: string;
|
|
42
|
+
amount: string;
|
|
43
|
+
}>;
|
|
44
|
+
/** Selected order detail */
|
|
45
|
+
selectedOrder?: {
|
|
46
|
+
id: string;
|
|
47
|
+
date: string;
|
|
48
|
+
items: Array<{ name: string; qty: number; price: string }>;
|
|
49
|
+
subtotal: string;
|
|
50
|
+
shipping: string;
|
|
51
|
+
tax: string;
|
|
52
|
+
total: string;
|
|
53
|
+
customer?: { name: string; email: string; phone?: string };
|
|
54
|
+
paymentMethod?: string;
|
|
55
|
+
} | null;
|
|
56
|
+
/** Summary stats */
|
|
57
|
+
stats?: Array<{
|
|
58
|
+
title: string;
|
|
59
|
+
value: string;
|
|
60
|
+
change?: string;
|
|
61
|
+
}>;
|
|
62
|
+
onSelectOrder?: ((id: string) => void) | undefined;
|
|
63
|
+
onCreateOrder?: (() => void) | undefined;
|
|
64
|
+
} = $props();
|
|
65
|
+
|
|
66
|
+
function statusVariant(status: string): 'default' | 'secondary' | 'outline' | 'destructive' {
|
|
67
|
+
switch (status.toLowerCase()) {
|
|
68
|
+
case 'fulfilled': return 'default';
|
|
69
|
+
case 'pending': return 'secondary';
|
|
70
|
+
case 'cancelled':
|
|
71
|
+
case 'declined': return 'destructive';
|
|
72
|
+
default: return 'outline';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<div class={cn('flex min-h-screen flex-col', className)}>
|
|
78
|
+
<main class="flex flex-1 gap-4 p-4 md:p-8">
|
|
79
|
+
<!-- Left Column: Stats + Table -->
|
|
80
|
+
<div class="flex flex-1 flex-col gap-4">
|
|
81
|
+
<!-- Header -->
|
|
82
|
+
<div class="flex items-center justify-between">
|
|
83
|
+
<div>
|
|
84
|
+
<h1 class="text-2xl font-bold tracking-tight">Orders</h1>
|
|
85
|
+
<p class="text-muted-foreground">Manage and track your orders.</p>
|
|
86
|
+
</div>
|
|
87
|
+
<Button onclick={() => onCreateOrder?.()}>Create Order</Button>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- Stats Row -->
|
|
91
|
+
{#if stats.length > 0}
|
|
92
|
+
<div class="grid gap-4 sm:grid-cols-3">
|
|
93
|
+
{#each stats as stat}
|
|
94
|
+
<Card>
|
|
95
|
+
<CardHeader class="pb-2">
|
|
96
|
+
<CardDescription>{stat.title}</CardDescription>
|
|
97
|
+
<CardTitle class="text-2xl">{stat.value}</CardTitle>
|
|
98
|
+
</CardHeader>
|
|
99
|
+
{#if stat.change}
|
|
100
|
+
<CardContent>
|
|
101
|
+
<p class="text-xs text-muted-foreground">{stat.change}</p>
|
|
102
|
+
</CardContent>
|
|
103
|
+
{/if}
|
|
104
|
+
</Card>
|
|
105
|
+
{/each}
|
|
106
|
+
</div>
|
|
107
|
+
{/if}
|
|
108
|
+
|
|
109
|
+
<!-- Orders Table -->
|
|
110
|
+
<Card>
|
|
111
|
+
<CardContent class="p-0">
|
|
112
|
+
<Table>
|
|
113
|
+
<TableHeader>
|
|
114
|
+
<TableRow>
|
|
115
|
+
<TableHead>Customer</TableHead>
|
|
116
|
+
<TableHead>Type</TableHead>
|
|
117
|
+
<TableHead>Status</TableHead>
|
|
118
|
+
<TableHead>Date</TableHead>
|
|
119
|
+
<TableHead class="text-right">Amount</TableHead>
|
|
120
|
+
</TableRow>
|
|
121
|
+
</TableHeader>
|
|
122
|
+
<TableBody>
|
|
123
|
+
{#each orders as order}
|
|
124
|
+
<TableRow
|
|
125
|
+
class="cursor-pointer"
|
|
126
|
+
onclick={() => onSelectOrder?.(order.id)}
|
|
127
|
+
>
|
|
128
|
+
<TableCell>
|
|
129
|
+
<div class="font-medium">{order.customer}</div>
|
|
130
|
+
<div class="text-sm text-muted-foreground">{order.email}</div>
|
|
131
|
+
</TableCell>
|
|
132
|
+
<TableCell>{order.type}</TableCell>
|
|
133
|
+
<TableCell>
|
|
134
|
+
<Badge variant={statusVariant(order.status)}>
|
|
135
|
+
{order.status}
|
|
136
|
+
</Badge>
|
|
137
|
+
</TableCell>
|
|
138
|
+
<TableCell>{order.date}</TableCell>
|
|
139
|
+
<TableCell class="text-right font-medium">{order.amount}</TableCell>
|
|
140
|
+
</TableRow>
|
|
141
|
+
{/each}
|
|
142
|
+
</TableBody>
|
|
143
|
+
</Table>
|
|
144
|
+
</CardContent>
|
|
145
|
+
</Card>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<!-- Right Column: Order Detail -->
|
|
149
|
+
{#if selectedOrder}
|
|
150
|
+
<Card class="hidden w-[420px] shrink-0 lg:block">
|
|
151
|
+
<CardHeader>
|
|
152
|
+
<CardTitle>Order {selectedOrder.id}</CardTitle>
|
|
153
|
+
<CardDescription>Placed on {selectedOrder.date}</CardDescription>
|
|
154
|
+
</CardHeader>
|
|
155
|
+
<CardContent class="space-y-4">
|
|
156
|
+
<!-- Line Items -->
|
|
157
|
+
<div>
|
|
158
|
+
<h4 class="text-sm font-medium mb-2">Items</h4>
|
|
159
|
+
<div class="space-y-2">
|
|
160
|
+
{#each selectedOrder.items as item}
|
|
161
|
+
<div class="flex justify-between text-sm">
|
|
162
|
+
<span>
|
|
163
|
+
{item.name}
|
|
164
|
+
<span class="text-muted-foreground">x{item.qty}</span>
|
|
165
|
+
</span>
|
|
166
|
+
<span>{item.price}</span>
|
|
167
|
+
</div>
|
|
168
|
+
{/each}
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<Separator />
|
|
173
|
+
|
|
174
|
+
<!-- Totals -->
|
|
175
|
+
<div class="space-y-1 text-sm">
|
|
176
|
+
<div class="flex justify-between">
|
|
177
|
+
<span class="text-muted-foreground">Subtotal</span>
|
|
178
|
+
<span>{selectedOrder.subtotal}</span>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="flex justify-between">
|
|
181
|
+
<span class="text-muted-foreground">Shipping</span>
|
|
182
|
+
<span>{selectedOrder.shipping}</span>
|
|
183
|
+
</div>
|
|
184
|
+
<div class="flex justify-between">
|
|
185
|
+
<span class="text-muted-foreground">Tax</span>
|
|
186
|
+
<span>{selectedOrder.tax}</span>
|
|
187
|
+
</div>
|
|
188
|
+
<Separator />
|
|
189
|
+
<div class="flex justify-between font-semibold">
|
|
190
|
+
<span>Total</span>
|
|
191
|
+
<span>{selectedOrder.total}</span>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
|
|
195
|
+
<Separator />
|
|
196
|
+
|
|
197
|
+
<!-- Customer Info -->
|
|
198
|
+
{#if selectedOrder.customer}
|
|
199
|
+
<div>
|
|
200
|
+
<h4 class="text-sm font-medium mb-1">Customer</h4>
|
|
201
|
+
<p class="text-sm">{selectedOrder.customer.name}</p>
|
|
202
|
+
<p class="text-sm text-muted-foreground">{selectedOrder.customer.email}</p>
|
|
203
|
+
{#if selectedOrder.customer.phone}
|
|
204
|
+
<p class="text-sm text-muted-foreground">{selectedOrder.customer.phone}</p>
|
|
205
|
+
{/if}
|
|
206
|
+
</div>
|
|
207
|
+
{/if}
|
|
208
|
+
|
|
209
|
+
<!-- Payment -->
|
|
210
|
+
{#if selectedOrder.paymentMethod}
|
|
211
|
+
<div>
|
|
212
|
+
<h4 class="text-sm font-medium mb-1">Payment</h4>
|
|
213
|
+
<p class="text-sm text-muted-foreground">{selectedOrder.paymentMethod}</p>
|
|
214
|
+
</div>
|
|
215
|
+
{/if}
|
|
216
|
+
</CardContent>
|
|
217
|
+
</Card>
|
|
218
|
+
{/if}
|
|
219
|
+
</main>
|
|
220
|
+
</div>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
DashboardBlock05.svelte
|
|
3
|
+
Compact stats dashboard with a data table.
|
|
4
|
+
Features inline stat badges and a clean table layout.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import {
|
|
9
|
+
Button,
|
|
10
|
+
Card,
|
|
11
|
+
CardHeader,
|
|
12
|
+
CardContent,
|
|
13
|
+
CardTitle,
|
|
14
|
+
CardDescription,
|
|
15
|
+
Badge,
|
|
16
|
+
Input,
|
|
17
|
+
Table,
|
|
18
|
+
TableHeader,
|
|
19
|
+
TableBody,
|
|
20
|
+
TableRow,
|
|
21
|
+
TableHead,
|
|
22
|
+
TableCell
|
|
23
|
+
} from '$lib/components/ui';
|
|
24
|
+
|
|
25
|
+
let {
|
|
26
|
+
class: className = '',
|
|
27
|
+
stats = [],
|
|
28
|
+
rows = [],
|
|
29
|
+
columns = ['Name', 'Status', 'Amount', 'Date'],
|
|
30
|
+
title = 'Dashboard',
|
|
31
|
+
description = '',
|
|
32
|
+
onSearch = undefined,
|
|
33
|
+
onRowClick = undefined
|
|
34
|
+
}: {
|
|
35
|
+
class?: string;
|
|
36
|
+
/** Compact stat items */
|
|
37
|
+
stats?: Array<{
|
|
38
|
+
title: string;
|
|
39
|
+
value: string;
|
|
40
|
+
change?: string;
|
|
41
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
42
|
+
}>;
|
|
43
|
+
/** Table data */
|
|
44
|
+
rows?: Array<{
|
|
45
|
+
id: string;
|
|
46
|
+
name: string;
|
|
47
|
+
email: string;
|
|
48
|
+
status: string;
|
|
49
|
+
amount: string;
|
|
50
|
+
date: string;
|
|
51
|
+
}>;
|
|
52
|
+
/** Table column headers */
|
|
53
|
+
columns?: string[];
|
|
54
|
+
title?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
onSearch?: ((query: string) => void) | undefined;
|
|
57
|
+
onRowClick?: ((id: string) => void) | undefined;
|
|
58
|
+
} = $props();
|
|
59
|
+
|
|
60
|
+
let searchQuery = $state('');
|
|
61
|
+
|
|
62
|
+
function trendColor(trend?: string): string {
|
|
63
|
+
if (trend === 'up') return 'text-green-600';
|
|
64
|
+
if (trend === 'down') return 'text-red-600';
|
|
65
|
+
return 'text-muted-foreground';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function statusVariant(status: string): 'default' | 'secondary' | 'outline' | 'destructive' {
|
|
69
|
+
switch (status.toLowerCase()) {
|
|
70
|
+
case 'active':
|
|
71
|
+
case 'fulfilled': return 'default';
|
|
72
|
+
case 'pending':
|
|
73
|
+
case 'processing': return 'secondary';
|
|
74
|
+
case 'cancelled':
|
|
75
|
+
case 'failed': return 'destructive';
|
|
76
|
+
default: return 'outline';
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
</script>
|
|
80
|
+
|
|
81
|
+
<div class={cn('space-y-4 p-4 md:p-8', className)}>
|
|
82
|
+
<!-- Header -->
|
|
83
|
+
<div class="flex flex-col gap-2 md:flex-row md:items-center md:justify-between">
|
|
84
|
+
<div>
|
|
85
|
+
<h1 class="text-2xl font-bold tracking-tight">{title}</h1>
|
|
86
|
+
{#if description}
|
|
87
|
+
<p class="text-muted-foreground">{description}</p>
|
|
88
|
+
{/if}
|
|
89
|
+
</div>
|
|
90
|
+
<Input
|
|
91
|
+
type="search"
|
|
92
|
+
placeholder="Search..."
|
|
93
|
+
class="w-full md:w-[250px]"
|
|
94
|
+
bind:value={searchQuery}
|
|
95
|
+
oninput={() => onSearch?.(searchQuery)}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
|
|
99
|
+
<!-- Compact Stats -->
|
|
100
|
+
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
|
101
|
+
{#each stats as stat}
|
|
102
|
+
<Card>
|
|
103
|
+
<CardContent class="p-4">
|
|
104
|
+
<div class="flex items-center justify-between">
|
|
105
|
+
<p class="text-sm text-muted-foreground">{stat.title}</p>
|
|
106
|
+
{#if stat.change}
|
|
107
|
+
<span class={cn('text-xs font-medium', trendColor(stat.trend))}>
|
|
108
|
+
{stat.change}
|
|
109
|
+
</span>
|
|
110
|
+
{/if}
|
|
111
|
+
</div>
|
|
112
|
+
<p class="text-2xl font-bold mt-1">{stat.value}</p>
|
|
113
|
+
</CardContent>
|
|
114
|
+
</Card>
|
|
115
|
+
{/each}
|
|
116
|
+
</div>
|
|
117
|
+
|
|
118
|
+
<!-- Data Table -->
|
|
119
|
+
<Card>
|
|
120
|
+
<CardHeader>
|
|
121
|
+
<CardTitle>{title}</CardTitle>
|
|
122
|
+
{#if description}
|
|
123
|
+
<CardDescription>{description}</CardDescription>
|
|
124
|
+
{/if}
|
|
125
|
+
</CardHeader>
|
|
126
|
+
<CardContent class="p-0">
|
|
127
|
+
<Table>
|
|
128
|
+
<TableHeader>
|
|
129
|
+
<TableRow>
|
|
130
|
+
{#each columns as col}
|
|
131
|
+
<TableHead>{col}</TableHead>
|
|
132
|
+
{/each}
|
|
133
|
+
</TableRow>
|
|
134
|
+
</TableHeader>
|
|
135
|
+
<TableBody>
|
|
136
|
+
{#each rows as row}
|
|
137
|
+
<TableRow
|
|
138
|
+
class="cursor-pointer"
|
|
139
|
+
onclick={() => onRowClick?.(row.id)}
|
|
140
|
+
>
|
|
141
|
+
<TableCell>
|
|
142
|
+
<div class="font-medium">{row.name}</div>
|
|
143
|
+
<div class="text-sm text-muted-foreground">{row.email}</div>
|
|
144
|
+
</TableCell>
|
|
145
|
+
<TableCell>
|
|
146
|
+
<Badge variant={statusVariant(row.status)}>
|
|
147
|
+
{row.status}
|
|
148
|
+
</Badge>
|
|
149
|
+
</TableCell>
|
|
150
|
+
<TableCell class="font-medium">{row.amount}</TableCell>
|
|
151
|
+
<TableCell class="text-muted-foreground">{row.date}</TableCell>
|
|
152
|
+
</TableRow>
|
|
153
|
+
{/each}
|
|
154
|
+
</TableBody>
|
|
155
|
+
</Table>
|
|
156
|
+
</CardContent>
|
|
157
|
+
</Card>
|
|
158
|
+
</div>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
DashboardBlock06.svelte
|
|
3
|
+
Table-focused dashboard with pagination.
|
|
4
|
+
Minimal stats header, prominent data table with page controls.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import {
|
|
9
|
+
Button,
|
|
10
|
+
Card,
|
|
11
|
+
CardHeader,
|
|
12
|
+
CardContent,
|
|
13
|
+
CardTitle,
|
|
14
|
+
CardDescription,
|
|
15
|
+
CardFooter,
|
|
16
|
+
Badge,
|
|
17
|
+
Input,
|
|
18
|
+
Table,
|
|
19
|
+
TableHeader,
|
|
20
|
+
TableBody,
|
|
21
|
+
TableRow,
|
|
22
|
+
TableHead,
|
|
23
|
+
TableCell
|
|
24
|
+
} from '$lib/components/ui';
|
|
25
|
+
|
|
26
|
+
let {
|
|
27
|
+
class: className = '',
|
|
28
|
+
rows = [],
|
|
29
|
+
columns = ['Customer', 'Type', 'Status', 'Date', 'Amount'],
|
|
30
|
+
currentPage = 1,
|
|
31
|
+
totalPages = 1,
|
|
32
|
+
totalItems = 0,
|
|
33
|
+
pageSize = 10,
|
|
34
|
+
title = 'Transactions',
|
|
35
|
+
description = 'A list of all transactions.',
|
|
36
|
+
onPageChange = undefined,
|
|
37
|
+
onSearch = undefined,
|
|
38
|
+
onRowClick = undefined,
|
|
39
|
+
onExport = undefined
|
|
40
|
+
}: {
|
|
41
|
+
class?: string;
|
|
42
|
+
/** Table rows */
|
|
43
|
+
rows?: Array<{
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
email: string;
|
|
47
|
+
status: string;
|
|
48
|
+
type: string;
|
|
49
|
+
amount: string;
|
|
50
|
+
date: string;
|
|
51
|
+
}>;
|
|
52
|
+
/** Column headers */
|
|
53
|
+
columns?: string[];
|
|
54
|
+
/** Pagination state */
|
|
55
|
+
currentPage?: number;
|
|
56
|
+
totalPages?: number;
|
|
57
|
+
totalItems?: number;
|
|
58
|
+
pageSize?: number;
|
|
59
|
+
title?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
onPageChange?: ((page: number) => void) | undefined;
|
|
62
|
+
onSearch?: ((query: string) => void) | undefined;
|
|
63
|
+
onRowClick?: ((id: string) => void) | undefined;
|
|
64
|
+
onExport?: (() => void) | undefined;
|
|
65
|
+
} = $props();
|
|
66
|
+
|
|
67
|
+
let searchQuery = $state('');
|
|
68
|
+
|
|
69
|
+
let startItem = $derived((currentPage - 1) * pageSize + 1);
|
|
70
|
+
let endItem = $derived(Math.min(currentPage * pageSize, totalItems));
|
|
71
|
+
|
|
72
|
+
function statusVariant(status: string): 'default' | 'secondary' | 'outline' | 'destructive' {
|
|
73
|
+
switch (status.toLowerCase()) {
|
|
74
|
+
case 'fulfilled':
|
|
75
|
+
case 'completed':
|
|
76
|
+
case 'active': return 'default';
|
|
77
|
+
case 'pending':
|
|
78
|
+
case 'processing': return 'secondary';
|
|
79
|
+
case 'cancelled':
|
|
80
|
+
case 'failed':
|
|
81
|
+
case 'declined': return 'destructive';
|
|
82
|
+
default: return 'outline';
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<div class={cn('space-y-4 p-4 md:p-8', className)}>
|
|
88
|
+
<!-- Header -->
|
|
89
|
+
<div class="flex flex-col gap-2 md:flex-row md:items-center md:justify-between">
|
|
90
|
+
<div>
|
|
91
|
+
<h1 class="text-2xl font-bold tracking-tight">{title}</h1>
|
|
92
|
+
<p class="text-muted-foreground">{description}</p>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="flex items-center gap-2">
|
|
95
|
+
<Input
|
|
96
|
+
type="search"
|
|
97
|
+
placeholder="Search..."
|
|
98
|
+
class="w-[200px]"
|
|
99
|
+
bind:value={searchQuery}
|
|
100
|
+
oninput={() => onSearch?.(searchQuery)}
|
|
101
|
+
/>
|
|
102
|
+
<Button variant="outline" onclick={() => onExport?.()}>
|
|
103
|
+
Export
|
|
104
|
+
</Button>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<!-- Table Card -->
|
|
109
|
+
<Card>
|
|
110
|
+
<CardContent class="p-0">
|
|
111
|
+
<Table>
|
|
112
|
+
<TableHeader>
|
|
113
|
+
<TableRow>
|
|
114
|
+
{#each columns as col}
|
|
115
|
+
<TableHead class={col === 'Amount' ? 'text-right' : ''}>
|
|
116
|
+
{col}
|
|
117
|
+
</TableHead>
|
|
118
|
+
{/each}
|
|
119
|
+
</TableRow>
|
|
120
|
+
</TableHeader>
|
|
121
|
+
<TableBody>
|
|
122
|
+
{#each rows as row}
|
|
123
|
+
<TableRow
|
|
124
|
+
class="cursor-pointer"
|
|
125
|
+
onclick={() => onRowClick?.(row.id)}
|
|
126
|
+
>
|
|
127
|
+
<TableCell>
|
|
128
|
+
<div class="font-medium">{row.name}</div>
|
|
129
|
+
<div class="text-sm text-muted-foreground">{row.email}</div>
|
|
130
|
+
</TableCell>
|
|
131
|
+
<TableCell>{row.type}</TableCell>
|
|
132
|
+
<TableCell>
|
|
133
|
+
<Badge variant={statusVariant(row.status)}>
|
|
134
|
+
{row.status}
|
|
135
|
+
</Badge>
|
|
136
|
+
</TableCell>
|
|
137
|
+
<TableCell class="text-muted-foreground">{row.date}</TableCell>
|
|
138
|
+
<TableCell class="text-right font-medium">{row.amount}</TableCell>
|
|
139
|
+
</TableRow>
|
|
140
|
+
{/each}
|
|
141
|
+
</TableBody>
|
|
142
|
+
</Table>
|
|
143
|
+
</CardContent>
|
|
144
|
+
|
|
145
|
+
<!-- Pagination Footer -->
|
|
146
|
+
<CardFooter class="flex items-center justify-between border-t px-6 py-4">
|
|
147
|
+
<p class="text-sm text-muted-foreground">
|
|
148
|
+
Showing {startItem}-{endItem} of {totalItems}
|
|
149
|
+
</p>
|
|
150
|
+
<div class="flex items-center gap-2">
|
|
151
|
+
<Button
|
|
152
|
+
variant="outline"
|
|
153
|
+
size="sm"
|
|
154
|
+
disabled={currentPage <= 1}
|
|
155
|
+
onclick={() => onPageChange?.(currentPage - 1)}
|
|
156
|
+
>
|
|
157
|
+
Previous
|
|
158
|
+
</Button>
|
|
159
|
+
<span class="text-sm text-muted-foreground">
|
|
160
|
+
Page {currentPage} of {totalPages}
|
|
161
|
+
</span>
|
|
162
|
+
<Button
|
|
163
|
+
variant="outline"
|
|
164
|
+
size="sm"
|
|
165
|
+
disabled={currentPage >= totalPages}
|
|
166
|
+
onclick={() => onPageChange?.(currentPage + 1)}
|
|
167
|
+
>
|
|
168
|
+
Next
|
|
169
|
+
</Button>
|
|
170
|
+
</div>
|
|
171
|
+
</CardFooter>
|
|
172
|
+
</Card>
|
|
173
|
+
</div>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
DashboardBlock07.svelte
|
|
3
|
+
Minimal dashboard with stats summary and a simple item list.
|
|
4
|
+
Clean, lightweight layout for overviews.
|
|
5
|
+
-->
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { cn } from '$lib/utils/cn';
|
|
8
|
+
import {
|
|
9
|
+
Card,
|
|
10
|
+
CardHeader,
|
|
11
|
+
CardContent,
|
|
12
|
+
CardTitle,
|
|
13
|
+
CardDescription,
|
|
14
|
+
Avatar,
|
|
15
|
+
Separator
|
|
16
|
+
} from '$lib/components/ui';
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
class: className = '',
|
|
20
|
+
stats = [],
|
|
21
|
+
items = [],
|
|
22
|
+
heading = 'Overview',
|
|
23
|
+
listTitle = 'Recent Activity',
|
|
24
|
+
listDescription = '',
|
|
25
|
+
onItemClick = undefined
|
|
26
|
+
}: {
|
|
27
|
+
class?: string;
|
|
28
|
+
/** Stat items for the top summary row */
|
|
29
|
+
stats?: Array<{
|
|
30
|
+
title: string;
|
|
31
|
+
value: string;
|
|
32
|
+
change?: string;
|
|
33
|
+
}>;
|
|
34
|
+
/** List items (e.g. recent activity, transactions) */
|
|
35
|
+
items?: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
title: string;
|
|
38
|
+
subtitle: string;
|
|
39
|
+
value: string;
|
|
40
|
+
avatar?: string;
|
|
41
|
+
}>;
|
|
42
|
+
heading?: string;
|
|
43
|
+
listTitle?: string;
|
|
44
|
+
listDescription?: string;
|
|
45
|
+
onItemClick?: ((id: string) => void) | undefined;
|
|
46
|
+
} = $props();
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<div class={cn('space-y-4 p-4 md:p-8', className)}>
|
|
50
|
+
<!-- Page Heading -->
|
|
51
|
+
<h1 class="text-2xl font-bold tracking-tight">{heading}</h1>
|
|
52
|
+
|
|
53
|
+
<!-- Stats Row -->
|
|
54
|
+
<div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3">
|
|
55
|
+
{#each stats as stat}
|
|
56
|
+
<Card>
|
|
57
|
+
<CardHeader class="pb-2">
|
|
58
|
+
<CardDescription>{stat.title}</CardDescription>
|
|
59
|
+
<CardTitle class="text-3xl">{stat.value}</CardTitle>
|
|
60
|
+
</CardHeader>
|
|
61
|
+
{#if stat.change}
|
|
62
|
+
<CardContent>
|
|
63
|
+
<p class="text-xs text-muted-foreground">{stat.change}</p>
|
|
64
|
+
</CardContent>
|
|
65
|
+
{/if}
|
|
66
|
+
</Card>
|
|
67
|
+
{/each}
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<!-- Activity List -->
|
|
71
|
+
<Card>
|
|
72
|
+
<CardHeader>
|
|
73
|
+
<CardTitle>{listTitle}</CardTitle>
|
|
74
|
+
{#if listDescription}
|
|
75
|
+
<CardDescription>{listDescription}</CardDescription>
|
|
76
|
+
{/if}
|
|
77
|
+
</CardHeader>
|
|
78
|
+
<CardContent>
|
|
79
|
+
<div class="space-y-0">
|
|
80
|
+
{#each items as item, i}
|
|
81
|
+
<button
|
|
82
|
+
class="flex w-full items-center gap-4 py-3 text-left hover:bg-muted/50 rounded-md px-2 transition-colors"
|
|
83
|
+
onclick={() => onItemClick?.(item.id)}
|
|
84
|
+
>
|
|
85
|
+
<Avatar
|
|
86
|
+
src={item.avatar}
|
|
87
|
+
fallback={item.title}
|
|
88
|
+
size="lg"
|
|
89
|
+
/>
|
|
90
|
+
<div class="flex-1 min-w-0">
|
|
91
|
+
<p class="text-sm font-medium leading-none truncate">{item.title}</p>
|
|
92
|
+
<p class="text-sm text-muted-foreground truncate">{item.subtitle}</p>
|
|
93
|
+
</div>
|
|
94
|
+
<span class="text-sm font-medium shrink-0">{item.value}</span>
|
|
95
|
+
</button>
|
|
96
|
+
{#if i < items.length - 1}
|
|
97
|
+
<Separator />
|
|
98
|
+
{/if}
|
|
99
|
+
{/each}
|
|
100
|
+
</div>
|
|
101
|
+
</CardContent>
|
|
102
|
+
</Card>
|
|
103
|
+
</div>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* src/lib/components/blocks/dashboard/index.ts
|
|
3
|
+
* Dashboard Block Components Export
|
|
4
|
+
*
|
|
5
|
+
* Exports all dashboard block components for use throughout the application.
|
|
6
|
+
* Each block is a self-contained dashboard layout variation.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { default as DashboardBlock01 } from './DashboardBlock01.svelte';
|
|
10
|
+
export { default as DashboardBlock02 } from './DashboardBlock02.svelte';
|
|
11
|
+
export { default as DashboardBlock03 } from './DashboardBlock03.svelte';
|
|
12
|
+
export { default as DashboardBlock04 } from './DashboardBlock04.svelte';
|
|
13
|
+
export { default as DashboardBlock05 } from './DashboardBlock05.svelte';
|
|
14
|
+
export { default as DashboardBlock06 } from './DashboardBlock06.svelte';
|
|
15
|
+
export { default as DashboardBlock07 } from './DashboardBlock07.svelte';
|
|
16
|
+
export { default as ChartsBlock01 } from './ChartsBlock01.svelte';
|