@xbg.solutions/create-frontend 1.1.1 → 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,321 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
MailBlock.svelte
|
|
3
|
+
Full 3-panel email client:
|
|
4
|
+
- Left panel: account header + folder/label nav with unread counts
|
|
5
|
+
- Center panel: thread list with tags and preview text
|
|
6
|
+
- Right panel: reading pane with full message + reply box
|
|
7
|
+
-->
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import { cn } from '$lib/utils/cn';
|
|
10
|
+
|
|
11
|
+
export interface MailFolder {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
icon: 'inbox' | 'drafts' | 'sent' | 'junk' | 'trash' | 'archive' | 'tag';
|
|
15
|
+
count?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface MailTag {
|
|
19
|
+
label: string;
|
|
20
|
+
variant?: 'default' | 'secondary' | 'outline';
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface MailMessage {
|
|
24
|
+
id: string;
|
|
25
|
+
from: string;
|
|
26
|
+
fromEmail?: string;
|
|
27
|
+
avatar?: string;
|
|
28
|
+
subject: string;
|
|
29
|
+
preview: string;
|
|
30
|
+
body: string;
|
|
31
|
+
date: string;
|
|
32
|
+
read: boolean;
|
|
33
|
+
starred?: boolean;
|
|
34
|
+
tags?: MailTag[];
|
|
35
|
+
folderId: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let {
|
|
39
|
+
class: className = '',
|
|
40
|
+
accountName = 'Alicia Koch',
|
|
41
|
+
accountEmail = 'alicia@example.com',
|
|
42
|
+
folders = defaultFolders(),
|
|
43
|
+
messages = [] as MailMessage[],
|
|
44
|
+
selectedFolderId = 'inbox',
|
|
45
|
+
selectedMessageId = null as string | null,
|
|
46
|
+
muted = false
|
|
47
|
+
}: {
|
|
48
|
+
class?: string;
|
|
49
|
+
accountName?: string;
|
|
50
|
+
accountEmail?: string;
|
|
51
|
+
folders?: MailFolder[];
|
|
52
|
+
messages?: MailMessage[];
|
|
53
|
+
selectedFolderId?: string;
|
|
54
|
+
selectedMessageId?: string | null;
|
|
55
|
+
muted?: boolean;
|
|
56
|
+
} = $props();
|
|
57
|
+
|
|
58
|
+
function defaultFolders(): MailFolder[] {
|
|
59
|
+
return [
|
|
60
|
+
{ id: 'inbox', label: 'Inbox', icon: 'inbox', count: 128 },
|
|
61
|
+
{ id: 'drafts', label: 'Drafts', icon: 'drafts', count: 9 },
|
|
62
|
+
{ id: 'sent', label: 'Sent', icon: 'sent' },
|
|
63
|
+
{ id: 'junk', label: 'Junk', icon: 'junk', count: 23 },
|
|
64
|
+
{ id: 'trash', label: 'Trash', icon: 'trash' },
|
|
65
|
+
{ id: 'archive', label: 'Archive', icon: 'archive' },
|
|
66
|
+
{ id: 'social', label: 'Social', icon: 'tag', count: 972 },
|
|
67
|
+
{ id: 'updates', label: 'Updates', icon: 'tag', count: 342 },
|
|
68
|
+
{ id: 'forums', label: 'Forums', icon: 'tag', count: 128 },
|
|
69
|
+
{ id: 'shopping', label: 'Shopping', icon: 'tag', count: 8 },
|
|
70
|
+
{ id: 'promotions',label:'Promotions',icon:'tag', count: 21 }
|
|
71
|
+
];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
let replyText = $state('');
|
|
75
|
+
|
|
76
|
+
let folderMessages = $derived(messages.filter(m => m.folderId === selectedFolderId));
|
|
77
|
+
let selectedMessage = $derived(messages.find(m => m.id === selectedMessageId) ?? null);
|
|
78
|
+
|
|
79
|
+
function selectMessage(id: string) {
|
|
80
|
+
selectedMessageId = id;
|
|
81
|
+
const msg = messages.find(m => m.id === id);
|
|
82
|
+
if (msg) msg.read = true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function unreadCount(folderId: string) {
|
|
86
|
+
return messages.filter(m => m.folderId === folderId && !m.read).length;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function initials(name: string) {
|
|
90
|
+
return name.split(' ').map(w => w[0]).join('').slice(0, 2).toUpperCase();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Icon paths as inline SVG content strings
|
|
94
|
+
function folderIcon(icon: MailFolder['icon']) {
|
|
95
|
+
switch (icon) {
|
|
96
|
+
case 'inbox': return 'M22 12h-6l-2 3h-4l-2-3H2';
|
|
97
|
+
case 'drafts': return 'M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z';
|
|
98
|
+
case 'sent': return 'M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z';
|
|
99
|
+
case 'junk': return 'M3 6h18M19 6l-1 14H6L5 6M10 11v6M14 11v6M9 6V4h6v2';
|
|
100
|
+
case 'trash': return 'M3 6h18M19 6l-1 14H6L5 6M10 11v6M14 11v6M9 6V4h6v2';
|
|
101
|
+
case 'archive': return 'M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z';
|
|
102
|
+
case 'tag': return 'M12 2H2v10l9.29 9.29c.94.94 2.48.94 3.42 0l6.58-6.58c.94-.94.94-2.48 0-3.42L12 2z M7 7h.01';
|
|
103
|
+
default: return '';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</script>
|
|
107
|
+
|
|
108
|
+
<div class={cn('flex h-full min-h-[600px] overflow-hidden rounded-xl border bg-background', className)}>
|
|
109
|
+
|
|
110
|
+
<!-- LEFT: Folder nav -->
|
|
111
|
+
<aside class="flex w-52 flex-col border-r">
|
|
112
|
+
<!-- Account header -->
|
|
113
|
+
<div class="flex items-center gap-2 border-b px-4 py-3">
|
|
114
|
+
<div class="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-primary text-xs font-bold text-primary-foreground">
|
|
115
|
+
{initials(accountName)}
|
|
116
|
+
</div>
|
|
117
|
+
<div class="min-w-0">
|
|
118
|
+
<p class="truncate text-sm font-medium">{accountName}</p>
|
|
119
|
+
<p class="truncate text-xs text-muted-foreground">{accountEmail}</p>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<!-- Compose -->
|
|
124
|
+
<div class="px-3 py-2">
|
|
125
|
+
<button
|
|
126
|
+
type="button"
|
|
127
|
+
class="flex w-full items-center justify-center gap-2 rounded-md bg-primary px-3 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90"
|
|
128
|
+
>
|
|
129
|
+
<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"><line x1="12" x2="12" y1="5" y2="19"/><line x1="5" x2="19" y1="12" y2="12"/></svg>
|
|
130
|
+
Compose
|
|
131
|
+
</button>
|
|
132
|
+
</div>
|
|
133
|
+
|
|
134
|
+
<!-- Folder list -->
|
|
135
|
+
<nav class="flex-1 overflow-y-auto px-2 py-1">
|
|
136
|
+
{#each folders as folder}
|
|
137
|
+
{@const count = unreadCount(folder.id) || folder.count}
|
|
138
|
+
<button
|
|
139
|
+
type="button"
|
|
140
|
+
onclick={() => { selectedFolderId = folder.id; selectedMessageId = null; }}
|
|
141
|
+
class={cn(
|
|
142
|
+
'flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm transition-colors hover:bg-muted',
|
|
143
|
+
selectedFolderId === folder.id && 'bg-muted font-medium'
|
|
144
|
+
)}
|
|
145
|
+
>
|
|
146
|
+
<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" class="shrink-0 text-muted-foreground">
|
|
147
|
+
<path d={folderIcon(folder.icon)}/>
|
|
148
|
+
</svg>
|
|
149
|
+
<span class="flex-1 truncate text-left">{folder.label}</span>
|
|
150
|
+
{#if count}
|
|
151
|
+
<span class="text-xs font-medium text-muted-foreground">{count}</span>
|
|
152
|
+
{/if}
|
|
153
|
+
</button>
|
|
154
|
+
{/each}
|
|
155
|
+
</nav>
|
|
156
|
+
</aside>
|
|
157
|
+
|
|
158
|
+
<!-- CENTER: Thread list -->
|
|
159
|
+
<div class="flex w-72 flex-col border-r">
|
|
160
|
+
<!-- Search -->
|
|
161
|
+
<div class="border-b px-3 py-2">
|
|
162
|
+
<div class="flex items-center gap-2 rounded-md border bg-muted/50 px-3 py-1.5">
|
|
163
|
+
<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" class="text-muted-foreground"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
|
|
164
|
+
<input type="text" placeholder="Search..." class="flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground" />
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<!-- Folder title + unread count -->
|
|
169
|
+
<div class="flex items-center justify-between border-b px-4 py-2">
|
|
170
|
+
<h2 class="text-sm font-semibold capitalize">{folders.find(f => f.id === selectedFolderId)?.label ?? selectedFolderId}</h2>
|
|
171
|
+
{#if unreadCount(selectedFolderId) > 0}
|
|
172
|
+
<span class="rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-bold text-primary-foreground">
|
|
173
|
+
{unreadCount(selectedFolderId)} new
|
|
174
|
+
</span>
|
|
175
|
+
{/if}
|
|
176
|
+
</div>
|
|
177
|
+
|
|
178
|
+
<!-- Thread items -->
|
|
179
|
+
<div class="flex-1 overflow-y-auto">
|
|
180
|
+
{#each folderMessages as msg}
|
|
181
|
+
<button
|
|
182
|
+
type="button"
|
|
183
|
+
onclick={() => selectMessage(msg.id)}
|
|
184
|
+
class={cn(
|
|
185
|
+
'flex w-full flex-col gap-1 border-b px-4 py-3 text-left transition-colors hover:bg-muted/50',
|
|
186
|
+
selectedMessageId === msg.id && 'bg-muted',
|
|
187
|
+
!msg.read && 'bg-blue-50/50 dark:bg-blue-950/20'
|
|
188
|
+
)}
|
|
189
|
+
>
|
|
190
|
+
<div class="flex items-center justify-between gap-2">
|
|
191
|
+
<span class={cn('truncate text-sm', !msg.read && 'font-semibold')}>{msg.from}</span>
|
|
192
|
+
<span class="shrink-0 text-[10px] text-muted-foreground">{msg.date}</span>
|
|
193
|
+
</div>
|
|
194
|
+
<p class={cn('truncate text-xs', !msg.read ? 'font-medium text-foreground' : 'text-muted-foreground')}>{msg.subject}</p>
|
|
195
|
+
<p class="truncate text-xs text-muted-foreground">{msg.preview}</p>
|
|
196
|
+
{#if msg.tags?.length}
|
|
197
|
+
<div class="flex flex-wrap gap-1 pt-0.5">
|
|
198
|
+
{#each msg.tags as tag}
|
|
199
|
+
<span class={cn(
|
|
200
|
+
'rounded-sm px-1.5 py-0.5 text-[10px] font-medium',
|
|
201
|
+
tag.variant === 'secondary' ? 'bg-secondary text-secondary-foreground' :
|
|
202
|
+
tag.variant === 'outline' ? 'border border-border text-muted-foreground' :
|
|
203
|
+
'bg-primary/10 text-primary'
|
|
204
|
+
)}>{tag.label}</span>
|
|
205
|
+
{/each}
|
|
206
|
+
</div>
|
|
207
|
+
{/if}
|
|
208
|
+
</button>
|
|
209
|
+
{:else}
|
|
210
|
+
<div class="flex h-32 items-center justify-center text-sm text-muted-foreground">
|
|
211
|
+
No messages
|
|
212
|
+
</div>
|
|
213
|
+
{/each}
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
|
|
217
|
+
<!-- RIGHT: Reading pane -->
|
|
218
|
+
<div class="flex flex-1 flex-col overflow-hidden">
|
|
219
|
+
{#if selectedMessage}
|
|
220
|
+
<!-- Message header -->
|
|
221
|
+
<div class="flex items-start justify-between gap-4 border-b px-6 py-4">
|
|
222
|
+
<div class="min-w-0">
|
|
223
|
+
<h3 class="truncate text-base font-semibold">{selectedMessage.subject}</h3>
|
|
224
|
+
<div class="mt-0.5 flex items-center gap-2 text-xs text-muted-foreground">
|
|
225
|
+
<span class="font-medium text-foreground">{selectedMessage.from}</span>
|
|
226
|
+
{#if selectedMessage.fromEmail}
|
|
227
|
+
<span><{selectedMessage.fromEmail}></span>
|
|
228
|
+
{/if}
|
|
229
|
+
<span>·</span>
|
|
230
|
+
<span>{selectedMessage.date}</span>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
<!-- Actions -->
|
|
234
|
+
<div class="flex shrink-0 items-center gap-1">
|
|
235
|
+
<button
|
|
236
|
+
type="button"
|
|
237
|
+
onclick={() => (muted = !muted)}
|
|
238
|
+
class={cn(
|
|
239
|
+
'flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted',
|
|
240
|
+
muted && 'text-orange-500'
|
|
241
|
+
)}
|
|
242
|
+
title={muted ? 'Unmute' : 'Mute'}
|
|
243
|
+
>
|
|
244
|
+
{#if muted}
|
|
245
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M11 5 6 9H2v6h4l5 4V5zM23 9l-6 6M17 9l6 6"/></svg>
|
|
246
|
+
{:else}
|
|
247
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14"/><path d="M15.54 8.46a5 5 0 0 1 0 7.07"/></svg>
|
|
248
|
+
{/if}
|
|
249
|
+
</button>
|
|
250
|
+
<button type="button" class="flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted" title="Archive">
|
|
251
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="5" x="2" y="3" rx="1"/><path d="M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8"/><path d="M10 12h4"/></svg>
|
|
252
|
+
</button>
|
|
253
|
+
<button type="button" class="flex h-8 w-8 items-center justify-center rounded-md hover:bg-muted" title="Delete">
|
|
254
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"/><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"/><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"/></svg>
|
|
255
|
+
</button>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<!-- Message body -->
|
|
260
|
+
<div class="flex-1 overflow-y-auto px-6 py-5">
|
|
261
|
+
<div class="flex items-center gap-3 mb-5">
|
|
262
|
+
<div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-bold">
|
|
263
|
+
{initials(selectedMessage.from)}
|
|
264
|
+
</div>
|
|
265
|
+
<div>
|
|
266
|
+
<p class="text-sm font-medium">{selectedMessage.from}</p>
|
|
267
|
+
{#if selectedMessage.fromEmail}
|
|
268
|
+
<p class="text-xs text-muted-foreground">{selectedMessage.fromEmail}</p>
|
|
269
|
+
{/if}
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
<div class="prose prose-sm max-w-none text-sm leading-relaxed text-foreground">
|
|
273
|
+
{selectedMessage.body}
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<!-- Reply box -->
|
|
278
|
+
<div class="border-t px-6 py-4">
|
|
279
|
+
<div class="rounded-md border">
|
|
280
|
+
<div class="border-b px-4 py-2 text-xs text-muted-foreground">
|
|
281
|
+
Reply to {selectedMessage.from}
|
|
282
|
+
</div>
|
|
283
|
+
<textarea
|
|
284
|
+
bind:value={replyText}
|
|
285
|
+
rows={4}
|
|
286
|
+
placeholder="Write your reply..."
|
|
287
|
+
class="w-full resize-none bg-transparent px-4 py-3 text-sm outline-none placeholder:text-muted-foreground"
|
|
288
|
+
></textarea>
|
|
289
|
+
<div class="flex items-center justify-between border-t px-4 py-2">
|
|
290
|
+
<div class="flex items-center gap-1">
|
|
291
|
+
<button type="button" class="flex h-7 w-7 items-center justify-center rounded hover:bg-muted text-muted-foreground">
|
|
292
|
+
<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"><path d="m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48"/></svg>
|
|
293
|
+
</button>
|
|
294
|
+
</div>
|
|
295
|
+
<div class="flex items-center gap-2">
|
|
296
|
+
<button
|
|
297
|
+
type="button"
|
|
298
|
+
onclick={() => (muted = !muted)}
|
|
299
|
+
class={cn('rounded-md border px-3 py-1.5 text-xs font-medium hover:bg-muted', muted && 'border-orange-300 text-orange-600')}
|
|
300
|
+
>
|
|
301
|
+
{muted ? 'Unmute' : 'Mute'}
|
|
302
|
+
</button>
|
|
303
|
+
<button
|
|
304
|
+
type="button"
|
|
305
|
+
class="rounded-md bg-primary px-4 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50"
|
|
306
|
+
disabled={!replyText.trim()}
|
|
307
|
+
onclick={() => (replyText = '')}
|
|
308
|
+
>Send</button>
|
|
309
|
+
</div>
|
|
310
|
+
</div>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
{:else}
|
|
314
|
+
<!-- Empty state -->
|
|
315
|
+
<div class="flex flex-1 flex-col items-center justify-center gap-3 text-muted-foreground">
|
|
316
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"/></svg>
|
|
317
|
+
<p class="text-sm">Select a message to read</p>
|
|
318
|
+
</div>
|
|
319
|
+
{/if}
|
|
320
|
+
</div>
|
|
321
|
+
</div>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
MusicBlock.svelte
|
|
3
|
+
Music/media app layout with menu bar, sidebar, and album grid.
|
|
4
|
+
-->
|
|
5
|
+
<script lang="ts">
|
|
6
|
+
import { cn } from '$lib/utils/cn';
|
|
7
|
+
import {
|
|
8
|
+
Button,
|
|
9
|
+
Tabs,
|
|
10
|
+
TabsList,
|
|
11
|
+
TabsTrigger,
|
|
12
|
+
TabsContent
|
|
13
|
+
} from '$lib/components/ui';
|
|
14
|
+
import { DynamicIcon } from '$lib/components/ui/icon';
|
|
15
|
+
import Separator from '$lib/components/ui/Separator.svelte';
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
class: className = '',
|
|
19
|
+
sidebarItems = {
|
|
20
|
+
discover: [],
|
|
21
|
+
library: [],
|
|
22
|
+
playlists: []
|
|
23
|
+
},
|
|
24
|
+
albums = [],
|
|
25
|
+
madeForYou = []
|
|
26
|
+
}: {
|
|
27
|
+
class?: string;
|
|
28
|
+
sidebarItems?: {
|
|
29
|
+
discover: Array<{ label: string; icon?: string; active?: boolean }>;
|
|
30
|
+
library: Array<{ label: string; icon?: string; active?: boolean }>;
|
|
31
|
+
playlists: Array<{ label: string }>;
|
|
32
|
+
};
|
|
33
|
+
albums?: Array<{
|
|
34
|
+
title: string;
|
|
35
|
+
artist: string;
|
|
36
|
+
image?: string;
|
|
37
|
+
}>;
|
|
38
|
+
madeForYou?: Array<{
|
|
39
|
+
title: string;
|
|
40
|
+
artist: string;
|
|
41
|
+
image?: string;
|
|
42
|
+
}>;
|
|
43
|
+
} = $props();
|
|
44
|
+
|
|
45
|
+
let activeTab = $state('music');
|
|
46
|
+
|
|
47
|
+
const menuItems = ['Music', 'File', 'Edit', 'View', 'Account'];
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<div class={cn('flex h-screen flex-col', className)}>
|
|
51
|
+
<!-- Menu Bar -->
|
|
52
|
+
<div class="flex items-center gap-4 border-b px-4 py-2">
|
|
53
|
+
{#each menuItems as item}
|
|
54
|
+
<button
|
|
55
|
+
type="button"
|
|
56
|
+
class="text-sm font-medium text-muted-foreground transition-colors hover:text-foreground"
|
|
57
|
+
>
|
|
58
|
+
{item}
|
|
59
|
+
</button>
|
|
60
|
+
{/each}
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<div class="flex flex-1 overflow-hidden">
|
|
64
|
+
<!-- Left Sidebar -->
|
|
65
|
+
<aside class="w-56 shrink-0 border-r bg-background">
|
|
66
|
+
<div class="flex h-full flex-col gap-4 p-4">
|
|
67
|
+
<!-- Discover Section -->
|
|
68
|
+
<div>
|
|
69
|
+
<h4 class="mb-2 px-2 text-sm font-semibold">Discover</h4>
|
|
70
|
+
<nav class="space-y-0.5">
|
|
71
|
+
{#each sidebarItems.discover as item}
|
|
72
|
+
<a
|
|
73
|
+
href="#"
|
|
74
|
+
class={cn(
|
|
75
|
+
'flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors',
|
|
76
|
+
item.active
|
|
77
|
+
? 'bg-muted font-medium text-foreground'
|
|
78
|
+
: 'text-muted-foreground hover:bg-muted hover:text-foreground'
|
|
79
|
+
)}
|
|
80
|
+
>
|
|
81
|
+
{#if item.icon}
|
|
82
|
+
<DynamicIcon name={item.icon} size={16} />
|
|
83
|
+
{/if}
|
|
84
|
+
{item.label}
|
|
85
|
+
</a>
|
|
86
|
+
{/each}
|
|
87
|
+
</nav>
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
<!-- Library Section -->
|
|
91
|
+
<div>
|
|
92
|
+
<h4 class="mb-2 px-2 text-sm font-semibold">Library</h4>
|
|
93
|
+
<nav class="space-y-0.5">
|
|
94
|
+
{#each sidebarItems.library as item}
|
|
95
|
+
<a
|
|
96
|
+
href="#"
|
|
97
|
+
class={cn(
|
|
98
|
+
'flex items-center gap-3 rounded-md px-2 py-1.5 text-sm transition-colors',
|
|
99
|
+
item.active
|
|
100
|
+
? 'bg-muted font-medium text-foreground'
|
|
101
|
+
: 'text-muted-foreground hover:bg-muted hover:text-foreground'
|
|
102
|
+
)}
|
|
103
|
+
>
|
|
104
|
+
{#if item.icon}
|
|
105
|
+
<DynamicIcon name={item.icon} size={16} />
|
|
106
|
+
{/if}
|
|
107
|
+
{item.label}
|
|
108
|
+
</a>
|
|
109
|
+
{/each}
|
|
110
|
+
</nav>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<!-- Playlists Section -->
|
|
114
|
+
<div>
|
|
115
|
+
<h4 class="mb-2 px-2 text-sm font-semibold">Playlists</h4>
|
|
116
|
+
<Separator class="mb-2" />
|
|
117
|
+
<nav class="space-y-0.5">
|
|
118
|
+
{#each sidebarItems.playlists as item}
|
|
119
|
+
<a
|
|
120
|
+
href="#"
|
|
121
|
+
class="flex items-center gap-3 rounded-md px-2 py-1.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"
|
|
122
|
+
>
|
|
123
|
+
<DynamicIcon name="list-music" size={16} />
|
|
124
|
+
{item.label}
|
|
125
|
+
</a>
|
|
126
|
+
{/each}
|
|
127
|
+
</nav>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</aside>
|
|
131
|
+
|
|
132
|
+
<!-- Main Content -->
|
|
133
|
+
<main class="flex-1 overflow-y-auto">
|
|
134
|
+
<div class="p-6">
|
|
135
|
+
<Tabs value={activeTab}>
|
|
136
|
+
<div class="flex items-center justify-between">
|
|
137
|
+
<TabsList>
|
|
138
|
+
<TabsTrigger value="music">Music</TabsTrigger>
|
|
139
|
+
<TabsTrigger value="podcasts">Podcasts</TabsTrigger>
|
|
140
|
+
<TabsTrigger value="live">Live</TabsTrigger>
|
|
141
|
+
</TabsList>
|
|
142
|
+
<Button size="sm">
|
|
143
|
+
<!-- Lucide: PlusCircle -->
|
|
144
|
+
<span class="mr-1">+</span>
|
|
145
|
+
Add music
|
|
146
|
+
</Button>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<TabsContent value="music">
|
|
150
|
+
<!-- Listen Now -->
|
|
151
|
+
<div class="mt-6">
|
|
152
|
+
<h2 class="text-2xl font-semibold tracking-tight">Listen Now</h2>
|
|
153
|
+
<p class="text-sm text-muted-foreground">Top picks for you. Updated daily.</p>
|
|
154
|
+
</div>
|
|
155
|
+
<Separator class="my-4" />
|
|
156
|
+
|
|
157
|
+
<!-- Album Grid -->
|
|
158
|
+
<div class="grid grid-cols-4 gap-4">
|
|
159
|
+
{#each albums as album}
|
|
160
|
+
<div class="space-y-3">
|
|
161
|
+
<div class="overflow-hidden rounded-md">
|
|
162
|
+
{#if album.image}
|
|
163
|
+
<img
|
|
164
|
+
src={album.image}
|
|
165
|
+
alt={album.title}
|
|
166
|
+
class="aspect-square w-full object-cover transition-all hover:scale-105"
|
|
167
|
+
/>
|
|
168
|
+
{:else}
|
|
169
|
+
<div class="flex aspect-square w-full items-center justify-center bg-muted">
|
|
170
|
+
<!-- Lucide: Music -->
|
|
171
|
+
<span class="text-2xl text-muted-foreground">M</span>
|
|
172
|
+
</div>
|
|
173
|
+
{/if}
|
|
174
|
+
</div>
|
|
175
|
+
<div class="space-y-1">
|
|
176
|
+
<h3 class="text-sm font-medium leading-none">{album.title}</h3>
|
|
177
|
+
<p class="text-xs text-muted-foreground">{album.artist}</p>
|
|
178
|
+
</div>
|
|
179
|
+
</div>
|
|
180
|
+
{:else}
|
|
181
|
+
<p class="col-span-4 py-8 text-center text-muted-foreground">No albums to display.</p>
|
|
182
|
+
{/each}
|
|
183
|
+
</div>
|
|
184
|
+
|
|
185
|
+
<!-- Made For You -->
|
|
186
|
+
{#if madeForYou.length > 0}
|
|
187
|
+
<div class="mt-8">
|
|
188
|
+
<h2 class="text-2xl font-semibold tracking-tight">Made for You</h2>
|
|
189
|
+
<p class="text-sm text-muted-foreground">Your personal mixes. Get better recommendations as you listen.</p>
|
|
190
|
+
</div>
|
|
191
|
+
<Separator class="my-4" />
|
|
192
|
+
<div class="grid grid-cols-4 gap-4">
|
|
193
|
+
{#each madeForYou as album}
|
|
194
|
+
<div class="space-y-3">
|
|
195
|
+
<div class="overflow-hidden rounded-md">
|
|
196
|
+
{#if album.image}
|
|
197
|
+
<img
|
|
198
|
+
src={album.image}
|
|
199
|
+
alt={album.title}
|
|
200
|
+
class="aspect-[4/5] w-full object-cover transition-all hover:scale-105"
|
|
201
|
+
/>
|
|
202
|
+
{:else}
|
|
203
|
+
<div class="flex aspect-[4/5] w-full items-center justify-center bg-muted">
|
|
204
|
+
<span class="text-2xl text-muted-foreground">M</span>
|
|
205
|
+
</div>
|
|
206
|
+
{/if}
|
|
207
|
+
</div>
|
|
208
|
+
<div class="space-y-1">
|
|
209
|
+
<h3 class="text-sm font-medium leading-none">{album.title}</h3>
|
|
210
|
+
<p class="text-xs text-muted-foreground">{album.artist}</p>
|
|
211
|
+
</div>
|
|
212
|
+
</div>
|
|
213
|
+
{/each}
|
|
214
|
+
</div>
|
|
215
|
+
{/if}
|
|
216
|
+
</TabsContent>
|
|
217
|
+
|
|
218
|
+
<TabsContent value="podcasts">
|
|
219
|
+
<div class="mt-6 flex flex-col items-center justify-center rounded-md border border-dashed py-16">
|
|
220
|
+
<h3 class="text-xl font-semibold">No episodes added</h3>
|
|
221
|
+
<p class="mt-1 text-sm text-muted-foreground">You have not added any podcasts. Add one below.</p>
|
|
222
|
+
<Button class="mt-4" size="sm">
|
|
223
|
+
<span class="mr-1">+</span>
|
|
224
|
+
Add Podcast
|
|
225
|
+
</Button>
|
|
226
|
+
</div>
|
|
227
|
+
</TabsContent>
|
|
228
|
+
|
|
229
|
+
<TabsContent value="live">
|
|
230
|
+
<div class="mt-6 flex flex-col items-center justify-center rounded-md border border-dashed py-16">
|
|
231
|
+
<h3 class="text-xl font-semibold">No live events</h3>
|
|
232
|
+
<p class="mt-1 text-sm text-muted-foreground">There are no live events scheduled at this time.</p>
|
|
233
|
+
</div>
|
|
234
|
+
</TabsContent>
|
|
235
|
+
</Tabs>
|
|
236
|
+
</div>
|
|
237
|
+
</main>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MusicBlock } from './MusicBlock.svelte';
|