@wordup-md/nuxt-layer-shadcn-unocss 0.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/.cursor/rules/active-context-rule.mdc +8 -0
- package/.cursor/rules/memory-bank-overview.mdc +17 -0
- package/.cursor/rules/product-context-rule.mdc +8 -0
- package/.cursor/rules/progress-rule.mdc +8 -0
- package/.cursor/rules/projectbrief-rule.mdc +8 -0
- package/.cursor/rules/system-patterns-rule.mdc +8 -0
- package/.cursor/rules/tech-context-rule.mdc +8 -0
- package/.cursorrules +52 -0
- package/.editorconfig +12 -0
- package/.nuxtrc +1 -0
- package/.playground/app.config.ts +189 -0
- package/.playground/assets/style.css +15 -0
- package/.playground/components/content/MdcExample.vue +81 -0
- package/.playground/components/content/MdcReplay.vue +319 -0
- package/.playground/content/1.getting-started/1.introduction.md +8 -0
- package/.playground/content/1.getting-started/2.writing/1.markdown.md +56 -0
- package/.playground/content/1.getting-started/2.writing/2.pages.md +177 -0
- package/.playground/content/1.getting-started/2.writing/3.folders.md +56 -0
- package/.playground/content/1.getting-started/2.writing/_dir.yml +3 -0
- package/.playground/content/1.getting-started/_dir.yml +3 -0
- package/.playground/content/2.content-elements/1.text-formatting.md +60 -0
- package/.playground/content/2.content-elements/10.horizontal-rule.md +25 -0
- package/.playground/content/2.content-elements/11.tables.md +25 -0
- package/.playground/content/2.content-elements/12.overview.md +93 -0
- package/.playground/content/2.content-elements/13.text-components.md +36 -0
- package/.playground/content/2.content-elements/2.headings.md +32 -0
- package/.playground/content/2.content-elements/3.paragraphs.md +39 -0
- package/.playground/content/2.content-elements/4.lists.md +37 -0
- package/.playground/content/2.content-elements/5.links.md +17 -0
- package/.playground/content/2.content-elements/6.images.md +17 -0
- package/.playground/content/2.content-elements/7.blockquotes.md +17 -0
- package/.playground/content/2.content-elements/8.code-blocks.md +141 -0
- package/.playground/content/2.content-elements/9.inline-code.md +21 -0
- package/.playground/content/2.content-elements/_dir.yml +3 -0
- package/.playground/content/2.content-elements/index.md +8 -0
- package/.playground/content/3.components/1.index.md +187 -0
- package/.playground/content/3.components/2.docs/_dir.yml +3 -0
- package/.playground/content/3.components/2.docs/alert.md +152 -0
- package/.playground/content/3.components/2.docs/badge.md +131 -0
- package/.playground/content/3.components/2.docs/button-link.md +53 -0
- package/.playground/content/3.components/2.docs/callout.md +16 -0
- package/.playground/content/3.components/2.docs/code-group.md +77 -0
- package/.playground/content/3.components/2.docs/code-snippet.md +129 -0
- package/.playground/content/3.components/2.docs/field-group.md +62 -0
- package/.playground/content/3.components/2.docs/field.md +39 -0
- package/.playground/content/3.components/2.docs/file-tree.md +144 -0
- package/.playground/content/3.components/2.docs/icon.md +94 -0
- package/.playground/content/3.components/2.docs/pm.md +67 -0
- package/.playground/content/3.components/2.docs/read-more.md +44 -0
- package/.playground/content/3.components/2.docs/shortcut.md +36 -0
- package/.playground/content/3.components/2.docs/stack.md +81 -0
- package/.playground/content/3.components/2.docs/steps.md +148 -0
- package/.playground/content/3.components/2.docs/tabs.md +375 -0
- package/.playground/content/3.components/3.page/_dir.yml +2 -0
- package/.playground/content/3.components/3.page/accordion.md +74 -0
- package/.playground/content/3.components/3.page/card-group.md +115 -0
- package/.playground/content/3.components/3.page/card.md +142 -0
- package/.playground/content/3.components/3.page/collapsible.md +61 -0
- package/.playground/content/3.components/3.page/hero-alt.md +118 -0
- package/.playground/content/3.components/3.page/hero.md +60 -0
- package/.playground/content/3.components/3.page/team-card.md +82 -0
- package/.playground/content/3.components/_dir.yml +2 -0
- package/.playground/content/4.development/1.configuration/1.overview.md +297 -0
- package/.playground/content/4.development/1.configuration/2.nuxt-content.md +105 -0
- package/.playground/content/4.development/1.configuration/3.og-image.md +86 -0
- package/.playground/content/4.development/1.configuration/4.edit-link.md +63 -0
- package/.playground/content/4.development/1.configuration/5.banner.md +52 -0
- package/.playground/content/4.development/1.configuration/6.carbon-ads.md +65 -0
- package/.playground/content/4.development/1.configuration/7.umami.md +41 -0
- package/.playground/content/4.development/1.configuration/_dir.yml +3 -0
- package/.playground/content/4.development/2.advanced/1.override.md +49 -0
- package/.playground/content/4.development/2.advanced/2.math.md +89 -0
- package/.playground/content/4.development/2.advanced/_dir.yml +3 -0
- package/.playground/content/4.development/3.themes.md +9 -0
- package/.playground/content/4.development/4.composables.md +38 -0
- package/.playground/content/4.development/5.installation.md +36 -0
- package/.playground/content/4.development/_dir.yml +3 -0
- package/.playground/content/_menu-footer.md +5 -0
- package/.playground/content/index.md +67 -0
- package/.playground/content/test-card.md +187 -0
- package/.playground/content/test.md +88 -0
- package/.playground/content/test2.md +12 -0
- package/.playground/content/test3.md +187 -0
- package/.playground/nuxt.config.ts +52 -0
- package/.playground/public/banner-preview.png +0 -0
- package/.playground/public/favicon.ico +0 -0
- package/.playground/public/front-matter-showcase/authors.png +0 -0
- package/.playground/public/front-matter-showcase/badges.png +0 -0
- package/.playground/public/front-matter-showcase/nav-badges.png +0 -0
- package/.playground/public/hero.png +0 -0
- package/.playground/public/logo-dark.svg +12 -0
- package/.playground/public/logo.svg +12 -0
- package/.playground/public/og-nuxt-seo.png +0 -0
- package/.playground/public/og-nuxt.png +0 -0
- package/.playground/public/og-shadcn-docs-dark.png +0 -0
- package/.playground/public/og-shadcn-docs.png +0 -0
- package/.playground/public/sidebar-default.png +0 -0
- package/.playground/public/sidebar-group.png +0 -0
- package/.playground/public/sidebar-tree.png +0 -0
- package/.playground/uno.config.ts +16 -0
- package/README.md +93 -0
- package/app.vue +59 -0
- package/assets/css/a11y.css +48 -0
- package/assets/css/mdc-editor.css +91 -0
- package/components/A11yModeToggle.vue +23 -0
- package/components/DarkModeToggle.vue +26 -0
- package/components/LinkIcon.vue +32 -0
- package/components/OgImage/ShadcnDocs.vue +55 -0
- package/components/ThemeCustomizer.vue +156 -0
- package/components/ThemePopover.vue +27 -0
- package/components/content/Accordion.vue +18 -0
- package/components/content/AccordionItem.vue +32 -0
- package/components/content/Alert.vue +100 -0
- package/components/content/Badge.vue +52 -0
- package/components/content/ButtonLink.vue +38 -0
- package/components/content/Callout.vue +17 -0
- package/components/content/Card.vue +173 -0
- package/components/content/CardGroup.vue +38 -0
- package/components/content/CodeCopy.vue +52 -0
- package/components/content/CodeGroup._vue +27 -0
- package/components/content/CodeSnippet._vue +78 -0
- package/components/content/Collapsible.vue +80 -0
- package/components/content/Field.vue +53 -0
- package/components/content/FieldGroup.vue +5 -0
- package/components/content/FileTree.vue +110 -0
- package/components/content/FileTreeItem.vue +64 -0
- package/components/content/FileTreeRoot.vue +27 -0
- package/components/content/Hero.vue +154 -0
- package/components/content/HeroAlt.vue +116 -0
- package/components/content/Icon.vue +69 -0
- package/components/content/Kbd.vue +20 -0
- package/components/content/PmInstall.vue +35 -0
- package/components/content/PmRun.vue +31 -0
- package/components/content/PmX.vue +31 -0
- package/components/content/ProseA.vue +21 -0
- package/components/content/ProseBlockquote.vue +5 -0
- package/components/content/ProseCode.vue +121 -0
- package/components/content/ProseCodeInline.vue +24 -0
- package/components/content/ProseEm.vue +5 -0
- package/components/content/ProseH1.vue +27 -0
- package/components/content/ProseH2.vue +22 -0
- package/components/content/ProseH3.vue +21 -0
- package/components/content/ProseH4.vue +21 -0
- package/components/content/ProseH5.vue +21 -0
- package/components/content/ProseH6.vue +21 -0
- package/components/content/ProseHr.vue +3 -0
- package/components/content/ProseImg.vue +42 -0
- package/components/content/ProseLi.vue +5 -0
- package/components/content/ProseOl.vue +5 -0
- package/components/content/ProseP.vue +5 -0
- package/components/content/ProsePre.vue +56 -0
- package/components/content/ProseSection.vue +27 -0
- package/components/content/ProseStrong.vue +5 -0
- package/components/content/ProseTable.vue +7 -0
- package/components/content/ProseTbody.vue +5 -0
- package/components/content/ProseTd.vue +5 -0
- package/components/content/ProseTh.vue +5 -0
- package/components/content/ProseThead.vue +5 -0
- package/components/content/ProseTr.vue +5 -0
- package/components/content/ProseUl.vue +5 -0
- package/components/content/ReadMore.vue +41 -0
- package/components/content/Shortcut.vue +20 -0
- package/components/content/Stack.vue +17 -0
- package/components/content/Steps.vue +23 -0
- package/components/content/Tabs.vue +52 -0
- package/components/content/TabsInner.vue +263 -0
- package/components/content/TeamCard.vue +52 -0
- package/components/content/TeamCardGroup.vue +5 -0
- package/components/content/global/AlertEditor.vue +58 -0
- package/components/content/global/BadgeEditor.vue +56 -0
- package/components/content/global/BrEditor.vue +3 -0
- package/components/content/global/CardEditor.vue +142 -0
- package/components/content/global/CardGroupEditor.vue +50 -0
- package/components/content/global/CodeGroup.vue +13 -0
- package/components/content/global/CodeGroupEditor.vue +50 -0
- package/components/content/global/DivEditor.vue +22 -0
- package/components/content/global/FieldEditor.vue +38 -0
- package/components/content/global/FieldGroupEditor.vue +24 -0
- package/components/content/global/HeroEditor.vue +67 -0
- package/components/content/global/ProseSectionEditor.vue +180 -0
- package/components/content/global/ReadMoreEditor.vue +70 -0
- package/components/content/global/SectionEditor.vue +22 -0
- package/components/content/global/StackEditor.vue +35 -0
- package/components/content/global/StepsEditor.vue +55 -0
- package/components/content/global/Tabs._vue +97 -0
- package/components/content/global/TabsEditor.vue +38 -0
- package/components/layout/Aside.vue +83 -0
- package/components/layout/AsideTree.vue +25 -0
- package/components/layout/AsideTreeItem.vue +86 -0
- package/components/layout/AsideTreeItemButton.vue +32 -0
- package/components/layout/Banner.vue +77 -0
- package/components/layout/Breadcrumb.vue +34 -0
- package/components/layout/DocsFooter.vue +6 -0
- package/components/layout/EditLink.vue +23 -0
- package/components/layout/Footer.vue +80 -0
- package/components/layout/FooterItem.vue +50 -0
- package/components/layout/FooterSubmenuItem.vue +39 -0
- package/components/layout/Header/Logo.vue +30 -0
- package/components/layout/Header/MenuItem.vue +83 -0
- package/components/layout/Header/Nav.vue +112 -0
- package/components/layout/Header/NavMobile.vue +14 -0
- package/components/layout/Header/NavMobileItem.vue +79 -0
- package/components/layout/Header/SubmenuItem.vue +39 -0
- package/components/layout/Header.vue +160 -0
- package/components/layout/LangSwitcher.vue +90 -0
- package/components/layout/MobileNav.vue +44 -0
- package/components/layout/PrevNext.vue +24 -0
- package/components/layout/PrevNextButton.vue +50 -0
- package/components/layout/SearchButton.vue +46 -0
- package/components/layout/SearchDialog.vue +217 -0
- package/components/layout/Title.vue +98 -0
- package/components/layout/Toc.vue +99 -0
- package/components/layout/TocTree.vue +42 -0
- package/components/ui/accordion/Accordion.vue +19 -0
- package/components/ui/accordion/AccordionContent.vue +24 -0
- package/components/ui/accordion/AccordionItem.vue +24 -0
- package/components/ui/accordion/AccordionTrigger.vue +39 -0
- package/components/ui/accordion/index.ts +4 -0
- package/components/ui/alert/Alert.vue +19 -0
- package/components/ui/alert/AlertDescription.vue +14 -0
- package/components/ui/alert/AlertTitle.vue +14 -0
- package/components/ui/alert/index.ts +23 -0
- package/components/ui/avatar/Avatar.vue +25 -0
- package/components/ui/avatar/AvatarFallback.vue +11 -0
- package/components/ui/avatar/AvatarImage.vue +12 -0
- package/components/ui/avatar/index.ts +24 -0
- package/components/ui/badge/Badge.vue +17 -0
- package/components/ui/badge/index.ts +71 -0
- package/components/ui/breadcrumb/Breadcrumb.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbItem.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbLink.vue +23 -0
- package/components/ui/breadcrumb/BreadcrumbList.vue +16 -0
- package/components/ui/breadcrumb/BreadcrumbPage.vue +19 -0
- package/components/ui/breadcrumb/BreadcrumbSeparator.vue +23 -0
- package/components/ui/breadcrumb/index.ts +6 -0
- package/components/ui/button/Button.vue +29 -0
- package/components/ui/button/index.ts +35 -0
- package/components/ui/card/Card.vue +21 -0
- package/components/ui/card/CardContent.vue +14 -0
- package/components/ui/card/CardDescription.vue +14 -0
- package/components/ui/card/CardFooter.vue +14 -0
- package/components/ui/card/CardHeader.vue +14 -0
- package/components/ui/card/CardTitle.vue +18 -0
- package/components/ui/card/index.ts +6 -0
- package/components/ui/collapsible/Collapsible.vue +18 -0
- package/components/ui/collapsible/CollapsibleContent.vue +14 -0
- package/components/ui/collapsible/CollapsibleTrigger.vue +11 -0
- package/components/ui/collapsible/index.ts +3 -0
- package/components/ui/command/Command.vue +89 -0
- package/components/ui/command/CommandEmpty.vue +30 -0
- package/components/ui/command/CommandGroup.vue +50 -0
- package/components/ui/command/CommandInput.vue +44 -0
- package/components/ui/command/CommandInputOnly.vue +50 -0
- package/components/ui/command/CommandItem.vue +79 -0
- package/components/ui/command/CommandList.vue +28 -0
- package/components/ui/command/CommandSeparator.vue +24 -0
- package/components/ui/command/index.ts +24 -0
- package/components/ui/dialog/Dialog.vue +14 -0
- package/components/ui/dialog/DialogClose.vue +11 -0
- package/components/ui/dialog/DialogContent.vue +52 -0
- package/components/ui/dialog/DialogDescription.vue +24 -0
- package/components/ui/dialog/DialogFooter.vue +19 -0
- package/components/ui/dialog/DialogHeader.vue +16 -0
- package/components/ui/dialog/DialogScrollContent.vue +61 -0
- package/components/ui/dialog/DialogTitle.vue +29 -0
- package/components/ui/dialog/DialogTrigger.vue +11 -0
- package/components/ui/dialog/index.ts +9 -0
- package/components/ui/input/Input.vue +27 -0
- package/components/ui/input/index.ts +1 -0
- package/components/ui/label/Label.vue +27 -0
- package/components/ui/label/index.ts +1 -0
- package/components/ui/navigation-menu/NavigationMenu.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuContent.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuIndicator.vue +24 -0
- package/components/ui/navigation-menu/NavigationMenuItem.vue +11 -0
- package/components/ui/navigation-menu/NavigationMenuLink.vue +19 -0
- package/components/ui/navigation-menu/NavigationMenuList.vue +33 -0
- package/components/ui/navigation-menu/NavigationMenuTrigger.vue +34 -0
- package/components/ui/navigation-menu/NavigationMenuViewport.vue +33 -0
- package/components/ui/navigation-menu/index.ts +14 -0
- package/components/ui/popover/Popover.vue +15 -0
- package/components/ui/popover/PopoverContent.vue +49 -0
- package/components/ui/popover/PopoverTrigger.vue +11 -0
- package/components/ui/popover/index.ts +4 -0
- package/components/ui/scroll-area/ScrollArea.vue +32 -0
- package/components/ui/scroll-area/ScrollBar.vue +41 -0
- package/components/ui/scroll-area/index.ts +2 -0
- package/components/ui/separator/Separator.vue +20 -0
- package/components/ui/separator/index.ts +1 -0
- package/components/ui/sheet/Sheet.vue +14 -0
- package/components/ui/sheet/SheetClose.vue +11 -0
- package/components/ui/sheet/SheetContent.vue +58 -0
- package/components/ui/sheet/SheetDescription.vue +22 -0
- package/components/ui/sheet/SheetFooter.vue +19 -0
- package/components/ui/sheet/SheetHeader.vue +16 -0
- package/components/ui/sheet/SheetTitle.vue +22 -0
- package/components/ui/sheet/SheetTrigger.vue +11 -0
- package/components/ui/sheet/index.ts +31 -0
- package/components/ui/slider/Slider.vue +36 -0
- package/components/ui/slider/index.ts +1 -0
- package/components/ui/tabs/Tabs.vue +15 -0
- package/components/ui/tabs/TabsContent.vue +22 -0
- package/components/ui/tabs/TabsList.vue +25 -0
- package/components/ui/tabs/TabsTrigger.vue +27 -0
- package/components/ui/tabs/index.ts +4 -0
- package/components/ui/textarea/Textarea.vue +27 -0
- package/components/ui/textarea/index.ts +1 -0
- package/components/ui/toast/Toast.vue +28 -0
- package/components/ui/toast/ToastAction.vue +22 -0
- package/components/ui/toast/ToastClose.vue +27 -0
- package/components/ui/toast/ToastDescription.vue +22 -0
- package/components/ui/toast/ToastProvider.vue +11 -0
- package/components/ui/toast/ToastTitle.vue +22 -0
- package/components/ui/toast/ToastViewport.vue +20 -0
- package/components/ui/toast/Toaster.vue +34 -0
- package/components/ui/toast/index.ts +38 -0
- package/components/ui/toast/use-toast.ts +165 -0
- package/components.json +18 -0
- package/composables/useBreadcrumb.ts +47 -0
- package/composables/useCollapsedMap.ts +3 -0
- package/composables/useConfig.ts +227 -0
- package/composables/useEditLink.ts +27 -0
- package/composables/useI18nDocs.ts +114 -0
- package/composables/useMdcMenu.ts +204 -0
- package/composables/usePm.ts +58 -0
- package/composables/useScrollspy.ts +51 -0
- package/composables/useThemes.ts +46 -0
- package/composables/useToast.ts +1 -0
- package/content/index.md +45 -0
- package/eslint.config.js +3 -0
- package/i18n/i18n.config.ts +414 -0
- package/index.d.ts +610 -0
- package/layouts/blank.vue +5 -0
- package/layouts/default.vue +9 -0
- package/layouts/editorial.vue +83 -0
- package/lib/registry/themes.ts +636 -0
- package/lib/uno-preset.ts +143 -0
- package/memory-bank/activeContext.md +17 -0
- package/memory-bank/productContext.md +21 -0
- package/memory-bank/progress.md +16 -0
- package/memory-bank/projectbrief.md +20 -0
- package/memory-bank/systemPatterns.md +25 -0
- package/memory-bank/techContext.md +29 -0
- package/modules/inject-css.ts +40 -0
- package/nuxt.config.ts +124 -0
- package/package.json +71 -0
- package/pages/[...slug].vue +109 -0
- package/pages/admin/[...slug].vue +145 -0
- package/pages/index.vue +24 -0
- package/plugins/injectCssHmr.ts +26 -0
- package/plugins/wordup.ts +130 -0
- package/public/content-doc.json +792 -0
- package/public/iconesjs.svg +4 -0
- package/scripts/buildContentDoc-cli.ts +8 -0
- package/scripts/buildContentDoc.ts +165 -0
- package/tailwind.config.js +1 -0
- package/tsconfig.json +3 -0
- package/uno.config.mjs +58 -0
- package/utils/index.ts +12 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flex size-full flex-col justify-center p-16"
|
|
4
|
+
:class="[colorMode === 'light' ? 'bg-white' : 'bg-zinc-950']"
|
|
5
|
+
:style="`background-size: 120px 120px; background-image: linear-gradient(to right, ${colorMode === 'light' ? '#e5e7eb' : '#27272a'} 1px, transparent 1px), linear-gradient(to bottom, ${colorMode === 'light' ? '#e5e7eb' : '#27272a'} 1px, transparent 1px);`"
|
|
6
|
+
>
|
|
7
|
+
<div class="mb-4 flex">
|
|
8
|
+
<img
|
|
9
|
+
v-if="colorMode === 'light'"
|
|
10
|
+
:src="logo.light"
|
|
11
|
+
height="65"
|
|
12
|
+
>
|
|
13
|
+
<img
|
|
14
|
+
v-else
|
|
15
|
+
:src="logo.dark"
|
|
16
|
+
height="65"
|
|
17
|
+
>
|
|
18
|
+
<span
|
|
19
|
+
v-if="showTitle && siteTitle"
|
|
20
|
+
class="ml-4 self-center text-4xl font-bold"
|
|
21
|
+
:class="[colorMode === 'light' ? 'text-zinc-900' : 'text-zinc-100']"
|
|
22
|
+
>
|
|
23
|
+
{{ siteTitle }}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div class="relative">
|
|
27
|
+
<h1
|
|
28
|
+
class="text-8xl font-bold"
|
|
29
|
+
:class="[colorMode === 'light' ? 'text-zinc-900' : 'text-zinc-100']"
|
|
30
|
+
>
|
|
31
|
+
{{ title }}
|
|
32
|
+
</h1>
|
|
33
|
+
<p
|
|
34
|
+
class="text-4xl leading-tight"
|
|
35
|
+
:class="[colorMode === 'light' ? 'text-zinc-500' : 'text-zinc-400']"
|
|
36
|
+
>
|
|
37
|
+
{{ description }}
|
|
38
|
+
</p>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
colorMode?: 'dark' | 'light'
|
|
46
|
+
title: string
|
|
47
|
+
description: string
|
|
48
|
+
}>()
|
|
49
|
+
|
|
50
|
+
const { logo, title: siteTitle, showTitle } = useConfig().value.header
|
|
51
|
+
|
|
52
|
+
const colorMode = computed(() => {
|
|
53
|
+
return props.colorMode || useConfig().value.site.ogImageColor || 'light'
|
|
54
|
+
})
|
|
55
|
+
</script>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid gap-6">
|
|
3
|
+
<div class="grid space-y-1">
|
|
4
|
+
<h1 class="text-lg font-semibold text-foreground">
|
|
5
|
+
{{ $t('Customize') }}
|
|
6
|
+
</h1>
|
|
7
|
+
<p class="text-sm text-muted-foreground">
|
|
8
|
+
{{ $t('Pick a style and color for the docs.') }}
|
|
9
|
+
</p>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="space-y-1.5">
|
|
12
|
+
<UiLabel>Color</UiLabel>
|
|
13
|
+
<div class="grid grid-cols-3 gap-2">
|
|
14
|
+
<template
|
|
15
|
+
v-for="color in allColors"
|
|
16
|
+
:key="color"
|
|
17
|
+
>
|
|
18
|
+
<UiButton
|
|
19
|
+
class="justify-start gap-2"
|
|
20
|
+
variant="outline"
|
|
21
|
+
:class="{ 'border-2 border-primary': theme === color }"
|
|
22
|
+
@click="setTheme(color)"
|
|
23
|
+
>
|
|
24
|
+
<span
|
|
25
|
+
class="flex size-5 items-center justify-center rounded-full"
|
|
26
|
+
:style="{ backgroundColor: backgroundColor(color) }"
|
|
27
|
+
>
|
|
28
|
+
<NuxtIcon
|
|
29
|
+
v-if="theme === color"
|
|
30
|
+
name="lucide:check"
|
|
31
|
+
size="16"
|
|
32
|
+
class="text-white"
|
|
33
|
+
/>
|
|
34
|
+
</span>
|
|
35
|
+
<span class="text-xs capitalize">{{ color }}</span>
|
|
36
|
+
</UiButton>
|
|
37
|
+
</template>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="space-y-1.5">
|
|
41
|
+
<UiLabel>Radius</UiLabel>
|
|
42
|
+
<div class="grid grid-cols-5 gap-2">
|
|
43
|
+
<template
|
|
44
|
+
v-for="r in RADII"
|
|
45
|
+
:key="r"
|
|
46
|
+
>
|
|
47
|
+
<UiButton
|
|
48
|
+
class="justify-center gap-2"
|
|
49
|
+
variant="outline"
|
|
50
|
+
:class="{ 'border-2 border-primary': radius === r }"
|
|
51
|
+
@click="setRadius(r)"
|
|
52
|
+
>
|
|
53
|
+
<span class="text-xs capitalize">{{ r }}</span>
|
|
54
|
+
</UiButton>
|
|
55
|
+
</template>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div
|
|
59
|
+
v-if="darkModeToggle"
|
|
60
|
+
class="space-y-1.5"
|
|
61
|
+
>
|
|
62
|
+
<UiLabel>Theme</UiLabel>
|
|
63
|
+
<div class="grid grid-cols-3 gap-2">
|
|
64
|
+
<UiButton
|
|
65
|
+
class="justify-center gap-2"
|
|
66
|
+
variant="outline"
|
|
67
|
+
:class="{ 'border-2 border-primary': colorMode.preference === 'light' }"
|
|
68
|
+
@click="colorMode.preference = 'light'"
|
|
69
|
+
>
|
|
70
|
+
<NuxtIcon
|
|
71
|
+
name="lucide:sun"
|
|
72
|
+
size="16"
|
|
73
|
+
/>
|
|
74
|
+
<span class="text-xs capitalize">Light</span>
|
|
75
|
+
</UiButton>
|
|
76
|
+
<UiButton
|
|
77
|
+
class="justify-center gap-2"
|
|
78
|
+
variant="outline"
|
|
79
|
+
:class="{ 'border-2 border-primary': colorMode.preference === 'dark' }"
|
|
80
|
+
@click="colorMode.preference = 'dark'"
|
|
81
|
+
>
|
|
82
|
+
<NuxtIcon
|
|
83
|
+
name="lucide:moon"
|
|
84
|
+
size="16"
|
|
85
|
+
/>
|
|
86
|
+
<span class="text-xs capitalize">Dark</span>
|
|
87
|
+
</UiButton>
|
|
88
|
+
<UiButton
|
|
89
|
+
class="justify-center gap-2"
|
|
90
|
+
variant="outline"
|
|
91
|
+
:class="{ 'border-2 border-primary': colorMode.preference === 'system' }"
|
|
92
|
+
@click="colorMode.preference = 'system'"
|
|
93
|
+
>
|
|
94
|
+
<NuxtIcon
|
|
95
|
+
name="lucide:monitor"
|
|
96
|
+
size="16"
|
|
97
|
+
/>
|
|
98
|
+
<span class="text-xs capitalize">System</span>
|
|
99
|
+
</UiButton>
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
</div>
|
|
103
|
+
</template>
|
|
104
|
+
|
|
105
|
+
<script setup lang="ts">
|
|
106
|
+
import { themes } from '@/lib/registry/themes'
|
|
107
|
+
|
|
108
|
+
const { themeClass, theme, radius, setTheme, setRadius } = useThemes()
|
|
109
|
+
const { darkModeToggle } = useConfig().value.header
|
|
110
|
+
|
|
111
|
+
// Create an array of color values
|
|
112
|
+
const allColors: Color[] = [
|
|
113
|
+
'zinc',
|
|
114
|
+
'rose',
|
|
115
|
+
'blue',
|
|
116
|
+
'green',
|
|
117
|
+
'orange',
|
|
118
|
+
'red',
|
|
119
|
+
'slate',
|
|
120
|
+
'stone',
|
|
121
|
+
'gray',
|
|
122
|
+
'neutral',
|
|
123
|
+
'yellow',
|
|
124
|
+
'violet',
|
|
125
|
+
]
|
|
126
|
+
|
|
127
|
+
const RADII = [0, 0.25, 0.5, 0.75, 1]
|
|
128
|
+
|
|
129
|
+
// Whenever the theme value changes, update the document class list
|
|
130
|
+
watch(theme, () => {
|
|
131
|
+
setClassTheme()
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
// Whenever the radius value changes, update the document style
|
|
135
|
+
watch(radius, () => {
|
|
136
|
+
setStyleRadius()
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
function setClassTheme() {
|
|
140
|
+
document.body.classList.remove(
|
|
141
|
+
...allColors.map(color => `theme-${color}`),
|
|
142
|
+
)
|
|
143
|
+
document.body.classList.add(themeClass.value)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function setStyleRadius() {
|
|
147
|
+
document.body.style.setProperty('--radius', `${radius.value}rem`)
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function backgroundColor(color: Color) {
|
|
151
|
+
const bg = themes.find(theme => theme.name === color)
|
|
152
|
+
return `hsl(${bg?.activeColor.light})`
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const colorMode = useColorMode()
|
|
156
|
+
</script>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiPopover>
|
|
3
|
+
<UiPopoverTrigger as-child>
|
|
4
|
+
<UiButton
|
|
5
|
+
variant="ghost"
|
|
6
|
+
size="icon"
|
|
7
|
+
>
|
|
8
|
+
<NuxtIcon
|
|
9
|
+
name="lucide:paintbrush"
|
|
10
|
+
size="16"
|
|
11
|
+
/>
|
|
12
|
+
</UiButton>
|
|
13
|
+
</UiPopoverTrigger>
|
|
14
|
+
<UiPopoverContent
|
|
15
|
+
class="w-[23rem]"
|
|
16
|
+
:align="breakpoints.isGreaterOrEqual('md') ? 'end' : 'center'"
|
|
17
|
+
>
|
|
18
|
+
<ThemeCustomizer />
|
|
19
|
+
</UiPopoverContent>
|
|
20
|
+
</UiPopover>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'
|
|
25
|
+
|
|
26
|
+
const breakpoints = useBreakpoints(breakpointsTailwind)
|
|
27
|
+
</script>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiAccordion
|
|
3
|
+
:type
|
|
4
|
+
:collapsible
|
|
5
|
+
:default-value="defaultValue"
|
|
6
|
+
class="[&:not(:first-child)]:mt-5"
|
|
7
|
+
>
|
|
8
|
+
<slot />
|
|
9
|
+
</UiAccordion>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
const { type = 'single' } = defineProps<{
|
|
14
|
+
type?: 'single' | 'multiple'
|
|
15
|
+
collapsible?: boolean
|
|
16
|
+
defaultValue: string | string[]
|
|
17
|
+
}>()
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiAccordionItem :value="value ?? autoValue">
|
|
3
|
+
<UiAccordionTrigger>
|
|
4
|
+
<ContentSlot
|
|
5
|
+
:use="$slots.title"
|
|
6
|
+
unwrap="p"
|
|
7
|
+
/>
|
|
8
|
+
{{ title }}
|
|
9
|
+
</UiAccordionTrigger>
|
|
10
|
+
<UiAccordionContent>
|
|
11
|
+
<ContentSlot
|
|
12
|
+
:use="$slots.content"
|
|
13
|
+
unwrap="p"
|
|
14
|
+
/>
|
|
15
|
+
{{ content }}
|
|
16
|
+
</UiAccordionContent>
|
|
17
|
+
</UiAccordionItem>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import { useId } from 'vue'
|
|
22
|
+
|
|
23
|
+
defineProps<{
|
|
24
|
+
value?: string
|
|
25
|
+
title?: string
|
|
26
|
+
content?: string
|
|
27
|
+
}>()
|
|
28
|
+
|
|
29
|
+
defineSlots()
|
|
30
|
+
|
|
31
|
+
const autoValue = useId()
|
|
32
|
+
</script>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UiAlert
|
|
3
|
+
class="transition-all [&:not(:first-child)]:mt-5 group/card"
|
|
4
|
+
:class="[
|
|
5
|
+
typeTwClass[type],
|
|
6
|
+
to && 'hover:bg-muted/50',
|
|
7
|
+
!noClick && to && 'cursor-pointer',
|
|
8
|
+
inStack && 'm-0 rounded-none border-none',
|
|
9
|
+
]"
|
|
10
|
+
@click="alertClick"
|
|
11
|
+
>
|
|
12
|
+
<div class="flex flex-row gap-2">
|
|
13
|
+
<Icon
|
|
14
|
+
v-if="icon && title"
|
|
15
|
+
:name="icon"
|
|
16
|
+
:size="16"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<UiAlertTitle
|
|
20
|
+
v-if="title"
|
|
21
|
+
class="font-semibold mb-3"
|
|
22
|
+
>
|
|
23
|
+
{{ title }}
|
|
24
|
+
</UiAlertTitle>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<UiAlertDescription class="w-full">
|
|
28
|
+
<div class="flex flex-row gap-2">
|
|
29
|
+
<Icon
|
|
30
|
+
v-if="icon && !title"
|
|
31
|
+
:name="icon"
|
|
32
|
+
:size="16"
|
|
33
|
+
class="mb-[2px] mt-0.5 min-w-5 self-start"
|
|
34
|
+
/>
|
|
35
|
+
|
|
36
|
+
<span
|
|
37
|
+
class="w-full text-foreground"
|
|
38
|
+
:class="[to && 'pr-8']"
|
|
39
|
+
>
|
|
40
|
+
<slot />
|
|
41
|
+
</span>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<LinkIcon
|
|
45
|
+
v-if="showLinkIcon"
|
|
46
|
+
:to
|
|
47
|
+
:target
|
|
48
|
+
:external
|
|
49
|
+
/>
|
|
50
|
+
</UiAlertDescription>
|
|
51
|
+
</UiAlert>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script setup lang="ts">
|
|
55
|
+
const {
|
|
56
|
+
to,
|
|
57
|
+
target,
|
|
58
|
+
type = 'default',
|
|
59
|
+
external = undefined,
|
|
60
|
+
inStack = false,
|
|
61
|
+
showLinkIcon = true,
|
|
62
|
+
noClick = false,
|
|
63
|
+
} = defineProps<{
|
|
64
|
+
title?: string
|
|
65
|
+
icon?: string
|
|
66
|
+
type?: 'default' | 'info' | 'warning' | 'success' | 'danger' | 'secondary'
|
|
67
|
+
to?: string
|
|
68
|
+
target?: Target
|
|
69
|
+
external?: boolean
|
|
70
|
+
inStack?: boolean
|
|
71
|
+
showLinkIcon?: boolean
|
|
72
|
+
noClick?: boolean
|
|
73
|
+
}>()
|
|
74
|
+
|
|
75
|
+
const typeTwClass = {
|
|
76
|
+
default: '',
|
|
77
|
+
info: 'border-info text-info bg-info/05 dark:bg-info/15 [&>svg]:text-info',
|
|
78
|
+
warning: 'border-warning text-warning bg-warning/05 dark:bg-warning/15 [&>svg]:text-warning',
|
|
79
|
+
success: 'border-success text-success bg-success/05 dark:bg-success/15 [&>svg]:text-success',
|
|
80
|
+
danger: 'border-danger text-danger bg-danger/05 dark:bg-danger/15 [&>svg]:text-danger',
|
|
81
|
+
example: 'border-violet-600 border-dashed text-violet-600 bg-violet-600/05 dark:bg-violet-600/15 [&>svg]:text-violet-600',
|
|
82
|
+
secondary: 'bg-muted/50',
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
async function alertClick() {
|
|
86
|
+
if (!noClick && to) {
|
|
87
|
+
if (target) {
|
|
88
|
+
await navigateTo(to, {
|
|
89
|
+
external: external ?? to?.startsWith('http'),
|
|
90
|
+
open: { target },
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
await navigateTo(to, {
|
|
95
|
+
external: external ?? to?.startsWith('http'),
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLink
|
|
3
|
+
v-if="to"
|
|
4
|
+
:to
|
|
5
|
+
:target
|
|
6
|
+
class="mx-0.5"
|
|
7
|
+
>
|
|
8
|
+
<UiBadge
|
|
9
|
+
:variant
|
|
10
|
+
:type
|
|
11
|
+
:class="[
|
|
12
|
+
'cursor-pointer',
|
|
13
|
+
size === 'sm'
|
|
14
|
+
&& 'rounded-md px-1.5 py-0.5 text-xs font-normal leading-none',
|
|
15
|
+
]"
|
|
16
|
+
>
|
|
17
|
+
<ContentSlot unwrap="p" />
|
|
18
|
+
</UiBadge>
|
|
19
|
+
</NuxtLink>
|
|
20
|
+
|
|
21
|
+
<span
|
|
22
|
+
v-else
|
|
23
|
+
class="mx-0.5 inline"
|
|
24
|
+
>
|
|
25
|
+
<UiBadge
|
|
26
|
+
:variant
|
|
27
|
+
:type
|
|
28
|
+
:class="[
|
|
29
|
+
size === 'sm'
|
|
30
|
+
&& 'rounded-md px-1.5 py-0.5 text-xs font-normal leading-none',
|
|
31
|
+
size === 'lg'
|
|
32
|
+
&& 'px-3 text-base',
|
|
33
|
+
]"
|
|
34
|
+
>
|
|
35
|
+
<ContentSlot unwrap="p" />
|
|
36
|
+
</UiBadge>
|
|
37
|
+
</span>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
const {
|
|
42
|
+
type = 'default',
|
|
43
|
+
variant = 'default',
|
|
44
|
+
size = 'md',
|
|
45
|
+
} = defineProps<{
|
|
46
|
+
type?: 'default' | 'primary' | 'secondary' | 'info' | 'warning' | 'success' | 'danger' | 'new'
|
|
47
|
+
to?: string
|
|
48
|
+
target?: Target
|
|
49
|
+
variant?: 'default' | 'fill' | 'outline' | 'text'
|
|
50
|
+
size?: 'sm' | 'md' | 'lg'
|
|
51
|
+
}>()
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<NuxtLink
|
|
3
|
+
:to="to || href"
|
|
4
|
+
:target="(blank && '_blank') || target"
|
|
5
|
+
>
|
|
6
|
+
<UiButton
|
|
7
|
+
:variant
|
|
8
|
+
:size
|
|
9
|
+
>
|
|
10
|
+
<Icon
|
|
11
|
+
v-if="leftIcon"
|
|
12
|
+
:name="leftIcon"
|
|
13
|
+
class="mr-1"
|
|
14
|
+
/>
|
|
15
|
+
<ContentSlot unwrap="p" />
|
|
16
|
+
<Icon
|
|
17
|
+
v-if="rightIcon"
|
|
18
|
+
:name="rightIcon"
|
|
19
|
+
class="ml-1"
|
|
20
|
+
/>
|
|
21
|
+
</UiButton>
|
|
22
|
+
</NuxtLink>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script setup lang="ts">
|
|
26
|
+
import type { ButtonVariants } from '../ui/button'
|
|
27
|
+
|
|
28
|
+
defineProps<{
|
|
29
|
+
variant?: ButtonVariants['variant']
|
|
30
|
+
size?: ButtonVariants['size']
|
|
31
|
+
leftIcon?: string
|
|
32
|
+
rightIcon?: string
|
|
33
|
+
to?: string
|
|
34
|
+
href?: string
|
|
35
|
+
target?: Target
|
|
36
|
+
blank?: boolean
|
|
37
|
+
}>()
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<UseTemplate>
|
|
3
|
+
<UiCard
|
|
4
|
+
class="card relative flex flex-col h-full overflow-hidden transition-all min-h-8"
|
|
5
|
+
:class="[
|
|
6
|
+
to && 'hover:shadow-lg',
|
|
7
|
+
inStack && 'mb-0 rounded-none border-none shadow-none',
|
|
8
|
+
['left', 'right'].includes(mediaPosition) && 'flex-row',
|
|
9
|
+
mediaPosition === 'right' && 'flex-row-reverse',
|
|
10
|
+
mediaPosition === 'bottom' && 'flex-col-reverse',
|
|
11
|
+
['cover', 'center'].includes(mediaPosition) && 'bg-opacity-0',
|
|
12
|
+
mediaPosition === 'center' && 'text-center items-center flex-row p-8',
|
|
13
|
+
$attrs.class,
|
|
14
|
+
]"
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
v-if="media || $slots.media"
|
|
18
|
+
class="overflow-hidden"
|
|
19
|
+
:class="{
|
|
20
|
+
'w-5/13 shrink-0': media && (mediaPosition === 'left' || mediaPosition === 'right'),
|
|
21
|
+
'absolute inset-0': ['cover', 'center'].includes(mediaPosition),
|
|
22
|
+
}"
|
|
23
|
+
>
|
|
24
|
+
<NuxtImg
|
|
25
|
+
v-if="media"
|
|
26
|
+
:src="media"
|
|
27
|
+
class="w-full h-full object-cover aspect-video"
|
|
28
|
+
:class="{
|
|
29
|
+
'group-hover/card:scale-105 transition-all': to,
|
|
30
|
+
}"
|
|
31
|
+
/>
|
|
32
|
+
<ContentSlot
|
|
33
|
+
:use="$slots.media"
|
|
34
|
+
unwrap="p"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<div class="w-full z-1">
|
|
39
|
+
<UiCardHeader
|
|
40
|
+
v-if="
|
|
41
|
+
icon || title || $slots.title || description || $slots.description
|
|
42
|
+
"
|
|
43
|
+
:class="{
|
|
44
|
+
'flex-row gap-5': iconPosition === 'left',
|
|
45
|
+
'items-center': mediaPosition === 'center',
|
|
46
|
+
}"
|
|
47
|
+
>
|
|
48
|
+
<Icon
|
|
49
|
+
v-if="icon"
|
|
50
|
+
:name="icon"
|
|
51
|
+
:size="iconSize"
|
|
52
|
+
:class="{ 'mb-2': iconPosition !== 'left' && (title || $slots.title) }"
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<div class="flex flex-col gap-1.5 w-full">
|
|
56
|
+
<UiCardTitle
|
|
57
|
+
v-if="title || $slots.title"
|
|
58
|
+
:class="{ 'group-hover/card:underline': to, 'pr-4': ['left', 'bottom'].includes(mediaPosition) && to }"
|
|
59
|
+
>
|
|
60
|
+
<ContentSlot
|
|
61
|
+
:use="$slots.title"
|
|
62
|
+
unwrap="p"
|
|
63
|
+
/>
|
|
64
|
+
<MDC
|
|
65
|
+
v-if="title"
|
|
66
|
+
:value="title"
|
|
67
|
+
unwrap="p"
|
|
68
|
+
/>
|
|
69
|
+
</UiCardTitle>
|
|
70
|
+
|
|
71
|
+
<UiCardDescription v-if="description || $slots.description">
|
|
72
|
+
<ContentSlot
|
|
73
|
+
:use="$slots.description"
|
|
74
|
+
unwrap="p"
|
|
75
|
+
/>
|
|
76
|
+
<!-- v-if="description" -->
|
|
77
|
+
<!-- <MDC
|
|
78
|
+
v-if="description"
|
|
79
|
+
:value="description || ''"
|
|
80
|
+
unwrap="p"
|
|
81
|
+
/> -->
|
|
82
|
+
{{ description }}
|
|
83
|
+
</UiCardDescription>
|
|
84
|
+
</div>
|
|
85
|
+
</UiCardHeader>
|
|
86
|
+
|
|
87
|
+
<UiCardContent
|
|
88
|
+
v-if="content || $slots.content || $slots.default"
|
|
89
|
+
:class="{ 'py-3': !icon && !(title || $slots.title) && !(description || $slots.description) }"
|
|
90
|
+
>
|
|
91
|
+
<ContentSlot unwrap="p" />
|
|
92
|
+
<ContentSlot
|
|
93
|
+
:use="$slots.content"
|
|
94
|
+
unwrap="p"
|
|
95
|
+
/>
|
|
96
|
+
</UiCardContent>
|
|
97
|
+
|
|
98
|
+
<UiCardFooter v-if="footer || $slots.footer">
|
|
99
|
+
<ContentSlot
|
|
100
|
+
:use="$slots.footer"
|
|
101
|
+
unwrap="p"
|
|
102
|
+
/>
|
|
103
|
+
<MDC
|
|
104
|
+
v-if="footer"
|
|
105
|
+
:value="footer"
|
|
106
|
+
unwrap="p"
|
|
107
|
+
/>
|
|
108
|
+
</UiCardFooter>
|
|
109
|
+
|
|
110
|
+
<LinkIcon
|
|
111
|
+
v-if="showLinkIcon"
|
|
112
|
+
:to
|
|
113
|
+
:target
|
|
114
|
+
:external
|
|
115
|
+
/>
|
|
116
|
+
</div>
|
|
117
|
+
</UiCard>
|
|
118
|
+
</UseTemplate>
|
|
119
|
+
|
|
120
|
+
<div class="group/card group-has-[div]:mt-0 [&:not(:first-child)]:mt-5">
|
|
121
|
+
<NuxtLink
|
|
122
|
+
v-if="to"
|
|
123
|
+
:to
|
|
124
|
+
:target
|
|
125
|
+
style="text-decoration: none; font-weight: 500"
|
|
126
|
+
>
|
|
127
|
+
<CardInner />
|
|
128
|
+
</NuxtLink>
|
|
129
|
+
<CardInner v-else />
|
|
130
|
+
</div>
|
|
131
|
+
</template>
|
|
132
|
+
|
|
133
|
+
<script setup lang="ts">
|
|
134
|
+
defineOptions({
|
|
135
|
+
inheritAttrs: false,
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
const {
|
|
139
|
+
title,
|
|
140
|
+
to,
|
|
141
|
+
external = undefined,
|
|
142
|
+
showLinkIcon = true,
|
|
143
|
+
iconSize = 24,
|
|
144
|
+
iconPosition = 'left',
|
|
145
|
+
mediaPosition = 'top',
|
|
146
|
+
} = defineProps<{
|
|
147
|
+
title?: string
|
|
148
|
+
description?: string
|
|
149
|
+
content?: string
|
|
150
|
+
footer?: string
|
|
151
|
+
|
|
152
|
+
to?: string
|
|
153
|
+
target?: Target
|
|
154
|
+
external?: boolean
|
|
155
|
+
showLinkIcon?: boolean
|
|
156
|
+
|
|
157
|
+
icon?: string
|
|
158
|
+
iconSize?: number
|
|
159
|
+
iconPosition?: 'top' | 'left'
|
|
160
|
+
|
|
161
|
+
media?: string
|
|
162
|
+
mediaPosition?: 'left' | 'right' | 'top' | 'bottom' | 'cover' | 'center'
|
|
163
|
+
|
|
164
|
+
inStack?: boolean
|
|
165
|
+
}>()
|
|
166
|
+
|
|
167
|
+
defineSlots()
|
|
168
|
+
|
|
169
|
+
const [UseTemplate, CardInner] = createReusableTemplate()
|
|
170
|
+
|
|
171
|
+
// const _slots: SetupContext['slots'] = useSlots()
|
|
172
|
+
// console.log(_slots)
|
|
173
|
+
</script>
|