@nuxt/ui 4.0.1 → 4.1.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/.nuxt/ui/calendar.ts +221 -9
- package/.nuxt/ui/chat-message.ts +10 -3
- package/.nuxt/ui/command-palette.ts +12 -2
- package/.nuxt/ui/context-menu.ts +3 -1
- package/.nuxt/ui/dropdown-menu.ts +3 -1
- package/.nuxt/ui/empty.ts +83 -0
- package/.nuxt/ui/index.ts +1 -0
- package/.nuxt/ui/input-menu.ts +12 -2
- package/.nuxt/ui/input-number.ts +25 -14
- package/.nuxt/ui/kbd.ts +1 -1
- package/.nuxt/ui/prose/code-tree.ts +1 -1
- package/.nuxt/ui/prose/img.ts +2 -1
- package/.nuxt/ui/select-menu.ts +12 -2
- package/.nuxt/ui/select.ts +4 -2
- package/.nuxt/ui/table.ts +8 -2
- package/.nuxt/ui/tree.ts +25 -11
- package/cli/templates.mjs +14 -2
- package/dist/module.d.mts +15 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +5 -2
- package/dist/runtime/components/Accordion.d.vue.ts +7 -1
- package/dist/runtime/components/Accordion.vue +4 -4
- package/dist/runtime/components/Accordion.vue.d.ts +7 -1
- package/dist/runtime/components/Alert.d.vue.ts +4 -4
- package/dist/runtime/components/Alert.vue +1 -1
- package/dist/runtime/components/Alert.vue.d.ts +4 -4
- package/dist/runtime/components/AuthForm.d.vue.ts +3 -1
- package/dist/runtime/components/AuthForm.vue +1 -1
- package/dist/runtime/components/AuthForm.vue.d.ts +3 -1
- package/dist/runtime/components/Avatar.d.vue.ts +5 -4
- package/dist/runtime/components/Avatar.vue +10 -3
- package/dist/runtime/components/Avatar.vue.d.ts +5 -4
- package/dist/runtime/components/Badge.d.vue.ts +9 -3
- package/dist/runtime/components/Badge.vue +3 -3
- package/dist/runtime/components/Badge.vue.d.ts +9 -3
- package/dist/runtime/components/Banner.d.vue.ts +4 -2
- package/dist/runtime/components/Banner.vue +1 -1
- package/dist/runtime/components/Banner.vue.d.ts +4 -2
- package/dist/runtime/components/BlogPost.d.vue.ts +9 -3
- package/dist/runtime/components/BlogPost.vue +2 -2
- package/dist/runtime/components/BlogPost.vue.d.ts +9 -3
- package/dist/runtime/components/BlogPosts.d.vue.ts +22 -13
- package/dist/runtime/components/BlogPosts.vue +8 -2
- package/dist/runtime/components/BlogPosts.vue.d.ts +22 -13
- package/dist/runtime/components/Breadcrumb.d.vue.ts +19 -4
- package/dist/runtime/components/Breadcrumb.vue +8 -8
- package/dist/runtime/components/Breadcrumb.vue.d.ts +19 -4
- package/dist/runtime/components/Button.d.vue.ts +9 -3
- package/dist/runtime/components/Button.vue +3 -3
- package/dist/runtime/components/Button.vue.d.ts +9 -3
- package/dist/runtime/components/Calendar.d.vue.ts +4 -0
- package/dist/runtime/components/Calendar.vue +3 -1
- package/dist/runtime/components/Calendar.vue.d.ts +4 -0
- package/dist/runtime/components/ChangelogVersion.d.vue.ts +12 -4
- package/dist/runtime/components/ChangelogVersion.vue +3 -3
- package/dist/runtime/components/ChangelogVersion.vue.d.ts +12 -4
- package/dist/runtime/components/ChangelogVersions.d.vue.ts +8 -36
- package/dist/runtime/components/ChangelogVersions.vue +2 -2
- package/dist/runtime/components/ChangelogVersions.vue.d.ts +8 -36
- package/dist/runtime/components/ChatMessage.d.vue.ts +1 -0
- package/dist/runtime/components/ChatMessage.vue +1 -1
- package/dist/runtime/components/ChatMessage.vue.d.ts +1 -0
- package/dist/runtime/components/ChatMessages.d.vue.ts +14 -15
- package/dist/runtime/components/ChatMessages.vue +24 -8
- package/dist/runtime/components/ChatMessages.vue.d.ts +14 -15
- package/dist/runtime/components/CommandPalette.d.vue.ts +43 -12
- package/dist/runtime/components/CommandPalette.vue +134 -68
- package/dist/runtime/components/CommandPalette.vue.d.ts +43 -12
- package/dist/runtime/components/ContextMenu.d.vue.ts +28 -6
- package/dist/runtime/components/ContextMenu.vue +2 -0
- package/dist/runtime/components/ContextMenu.vue.d.ts +28 -6
- package/dist/runtime/components/ContextMenuContent.d.vue.ts +2 -3
- package/dist/runtime/components/ContextMenuContent.vue +21 -11
- package/dist/runtime/components/ContextMenuContent.vue.d.ts +2 -3
- package/dist/runtime/components/DashboardNavbar.d.vue.ts +9 -3
- package/dist/runtime/components/DashboardNavbar.vue +3 -3
- package/dist/runtime/components/DashboardNavbar.vue.d.ts +9 -3
- package/dist/runtime/components/DashboardSearch.d.vue.ts +3 -1
- package/dist/runtime/components/DashboardSearch.vue +2 -2
- package/dist/runtime/components/DashboardSearch.vue.d.ts +3 -1
- package/dist/runtime/components/DashboardSearchButton.vue +2 -2
- package/dist/runtime/components/DashboardSidebar.d.vue.ts +5 -1
- package/dist/runtime/components/DashboardSidebar.vue +4 -4
- package/dist/runtime/components/DashboardSidebar.vue.d.ts +5 -1
- package/dist/runtime/components/Drawer.vue +2 -5
- package/dist/runtime/components/DropdownMenu.d.vue.ts +28 -6
- package/dist/runtime/components/DropdownMenu.vue +2 -0
- package/dist/runtime/components/DropdownMenu.vue.d.ts +28 -6
- package/dist/runtime/components/DropdownMenuContent.d.vue.ts +8 -5
- package/dist/runtime/components/DropdownMenuContent.vue +21 -11
- package/dist/runtime/components/DropdownMenuContent.vue.d.ts +8 -5
- package/dist/runtime/components/Empty.d.vue.ts +53 -0
- package/dist/runtime/components/Empty.vue +68 -0
- package/dist/runtime/components/Empty.vue.d.ts +53 -0
- package/dist/runtime/components/Error.d.vue.ts +0 -1
- package/dist/runtime/components/Error.vue +1 -1
- package/dist/runtime/components/Error.vue.d.ts +0 -1
- package/dist/runtime/components/FileUpload.d.vue.ts +6 -1
- package/dist/runtime/components/FileUpload.vue +8 -7
- package/dist/runtime/components/FileUpload.vue.d.ts +6 -1
- package/dist/runtime/components/FooterColumns.d.vue.ts +9 -2
- package/dist/runtime/components/FooterColumns.vue +2 -2
- package/dist/runtime/components/FooterColumns.vue.d.ts +9 -2
- package/dist/runtime/components/Header.d.vue.ts +4 -1
- package/dist/runtime/components/Header.vue +3 -3
- package/dist/runtime/components/Header.vue.d.ts +4 -1
- package/dist/runtime/components/Input.d.vue.ts +9 -3
- package/dist/runtime/components/Input.vue +3 -3
- package/dist/runtime/components/Input.vue.d.ts +9 -3
- package/dist/runtime/components/InputMenu.d.vue.ts +40 -10
- package/dist/runtime/components/InputMenu.vue +117 -65
- package/dist/runtime/components/InputMenu.vue.d.ts +40 -10
- package/dist/runtime/components/InputNumber.d.vue.ts +4 -2
- package/dist/runtime/components/InputNumber.vue +7 -5
- package/dist/runtime/components/InputNumber.vue.d.ts +4 -2
- package/dist/runtime/components/InputTags.d.vue.ts +10 -3
- package/dist/runtime/components/InputTags.vue +5 -5
- package/dist/runtime/components/InputTags.vue.d.ts +10 -3
- package/dist/runtime/components/Main.d.vue.ts +2 -4
- package/dist/runtime/components/Main.vue +1 -1
- package/dist/runtime/components/Main.vue.d.ts +2 -4
- package/dist/runtime/components/Modal.d.vue.ts +1 -4
- package/dist/runtime/components/Modal.vue +3 -6
- package/dist/runtime/components/Modal.vue.d.ts +1 -4
- package/dist/runtime/components/NavigationMenu.d.vue.ts +16 -4
- package/dist/runtime/components/NavigationMenu.vue +14 -7
- package/dist/runtime/components/NavigationMenu.vue.d.ts +16 -4
- package/dist/runtime/components/PageAnchors.d.vue.ts +9 -2
- package/dist/runtime/components/PageAnchors.vue +2 -2
- package/dist/runtime/components/PageAnchors.vue.d.ts +9 -2
- package/dist/runtime/components/PageCard.d.vue.ts +3 -1
- package/dist/runtime/components/PageCard.vue +1 -1
- package/dist/runtime/components/PageCard.vue.d.ts +3 -1
- package/dist/runtime/components/PageFeature.d.vue.ts +3 -1
- package/dist/runtime/components/PageFeature.vue +1 -1
- package/dist/runtime/components/PageFeature.vue.d.ts +3 -1
- package/dist/runtime/components/PageLinks.d.vue.ts +9 -2
- package/dist/runtime/components/PageLinks.vue +2 -2
- package/dist/runtime/components/PageLinks.vue.d.ts +9 -2
- package/dist/runtime/components/PageSection.d.vue.ts +3 -1
- package/dist/runtime/components/PageSection.vue +1 -1
- package/dist/runtime/components/PageSection.vue.d.ts +3 -1
- package/dist/runtime/components/Pagination.d.vue.ts +3 -1
- package/dist/runtime/components/Pagination.vue +1 -1
- package/dist/runtime/components/Pagination.vue.d.ts +3 -1
- package/dist/runtime/components/Popover.d.vue.ts +24 -23
- package/dist/runtime/components/Popover.vue +4 -4
- package/dist/runtime/components/Popover.vue.d.ts +24 -23
- package/dist/runtime/components/PricingPlan.d.vue.ts +9 -3
- package/dist/runtime/components/PricingPlan.vue +3 -3
- package/dist/runtime/components/PricingPlan.vue.d.ts +9 -3
- package/dist/runtime/components/PricingPlans.d.vue.ts +20 -13
- package/dist/runtime/components/PricingPlans.vue +7 -1
- package/dist/runtime/components/PricingPlans.vue.d.ts +20 -13
- package/dist/runtime/components/Select.d.vue.ts +20 -9
- package/dist/runtime/components/Select.vue +18 -9
- package/dist/runtime/components/Select.vue.d.ts +20 -9
- package/dist/runtime/components/SelectMenu.d.vue.ts +39 -11
- package/dist/runtime/components/SelectMenu.vue +114 -61
- package/dist/runtime/components/SelectMenu.vue.d.ts +39 -11
- package/dist/runtime/components/Separator.d.vue.ts +3 -1
- package/dist/runtime/components/Separator.vue +1 -1
- package/dist/runtime/components/Separator.vue.d.ts +3 -1
- package/dist/runtime/components/Slideover.d.vue.ts +1 -4
- package/dist/runtime/components/Slideover.vue +3 -6
- package/dist/runtime/components/Slideover.vue.d.ts +1 -4
- package/dist/runtime/components/Stepper.d.vue.ts +4 -1
- package/dist/runtime/components/Stepper.vue +1 -1
- package/dist/runtime/components/Stepper.vue.d.ts +4 -1
- package/dist/runtime/components/Table.d.vue.ts +21 -1
- package/dist/runtime/components/Table.vue +126 -60
- package/dist/runtime/components/Table.vue.d.ts +21 -1
- package/dist/runtime/components/Tabs.d.vue.ts +8 -3
- package/dist/runtime/components/Tabs.vue +3 -3
- package/dist/runtime/components/Tabs.vue.d.ts +8 -3
- package/dist/runtime/components/Textarea.d.vue.ts +9 -3
- package/dist/runtime/components/Textarea.vue +3 -3
- package/dist/runtime/components/Textarea.vue.d.ts +9 -3
- package/dist/runtime/components/Toast.d.vue.ts +4 -4
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/Toast.vue.d.ts +4 -4
- package/dist/runtime/components/Toaster.d.vue.ts +6 -0
- package/dist/runtime/components/Toaster.vue +6 -3
- package/dist/runtime/components/Toaster.vue.d.ts +6 -0
- package/dist/runtime/components/Tooltip.d.vue.ts +3 -1
- package/dist/runtime/components/Tooltip.vue +1 -1
- package/dist/runtime/components/Tooltip.vue.d.ts +3 -1
- package/dist/runtime/components/Tree.d.vue.ts +43 -5
- package/dist/runtime/components/Tree.vue +169 -81
- package/dist/runtime/components/Tree.vue.d.ts +43 -5
- package/dist/runtime/components/User.d.vue.ts +3 -1
- package/dist/runtime/components/User.vue +1 -1
- package/dist/runtime/components/User.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentNavigation.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentNavigation.vue +5 -5
- package/dist/runtime/components/content/ContentNavigation.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentSearch.d.vue.ts +3 -1
- package/dist/runtime/components/content/ContentSearch.vue +4 -2
- package/dist/runtime/components/content/ContentSearch.vue.d.ts +3 -1
- package/dist/runtime/components/content/ContentSearchButton.vue +2 -2
- package/dist/runtime/components/content/ContentSurround.d.vue.ts +1 -0
- package/dist/runtime/components/content/ContentSurround.vue +4 -4
- package/dist/runtime/components/content/ContentSurround.vue.d.ts +1 -0
- package/dist/runtime/components/content/ContentToc.d.vue.ts +2 -0
- package/dist/runtime/components/content/ContentToc.vue +2 -2
- package/dist/runtime/components/content/ContentToc.vue.d.ts +2 -0
- package/dist/runtime/components/prose/Accordion.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Accordion.vue +3 -2
- package/dist/runtime/components/prose/Accordion.vue.d.ts +6 -0
- package/dist/runtime/components/prose/CodeTree.vue +40 -36
- package/dist/runtime/components/prose/Collapsible.d.vue.ts +2 -2
- package/dist/runtime/components/prose/Collapsible.vue +2 -2
- package/dist/runtime/components/prose/Collapsible.vue.d.ts +2 -2
- package/dist/runtime/components/prose/Field.d.vue.ts +1 -1
- package/dist/runtime/components/prose/Field.vue.d.ts +1 -1
- package/dist/runtime/components/prose/Img.vue +14 -3
- package/dist/runtime/components/prose/Tabs.d.vue.ts +6 -0
- package/dist/runtime/components/prose/Tabs.vue +3 -2
- package/dist/runtime/components/prose/Tabs.vue.d.ts +6 -0
- package/dist/runtime/composables/useKbd.js +1 -1
- package/dist/runtime/composables/useToast.d.ts +3 -1
- package/dist/runtime/composables/useToast.js +4 -3
- package/dist/runtime/inertia/components/Link.vue +12 -7
- package/dist/runtime/locale/hr.d.ts +3 -0
- package/dist/runtime/locale/hr.js +129 -0
- package/dist/runtime/locale/index.d.ts +1 -0
- package/dist/runtime/locale/index.js +1 -0
- package/dist/runtime/types/index.d.ts +2 -1
- package/dist/runtime/types/index.js +2 -1
- package/dist/runtime/types/tv.d.ts +6 -0
- package/dist/shared/{ui.D-FDXAUi.mjs → ui.Cmctwxv6.mjs} +381 -48
- package/dist/unplugin.mjs +2 -1
- package/dist/vite.mjs +3 -2
- package/package.json +18 -17
|
@@ -22,7 +22,9 @@ export interface BlogPostProps {
|
|
|
22
22
|
/** The authors of the blog post. */
|
|
23
23
|
authors?: UserProps[];
|
|
24
24
|
/** The image of the blog post. Can be a string or an object. */
|
|
25
|
-
image?: string | Partial<HTMLImageElement
|
|
25
|
+
image?: string | (Partial<HTMLImageElement> & {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
});
|
|
26
28
|
/**
|
|
27
29
|
* The orientation of the blog post.
|
|
28
30
|
* @defaultValue 'vertical'
|
|
@@ -43,8 +45,12 @@ export interface BlogPostSlots {
|
|
|
43
45
|
badge(props?: {}): any;
|
|
44
46
|
title(props?: {}): any;
|
|
45
47
|
description(props?: {}): any;
|
|
46
|
-
authors(props
|
|
47
|
-
|
|
48
|
+
authors(props: {
|
|
49
|
+
ui: BlogPost['ui'];
|
|
50
|
+
}): any;
|
|
51
|
+
header(props: {
|
|
52
|
+
ui: BlogPost['ui'];
|
|
53
|
+
}): any;
|
|
48
54
|
body(props?: {}): any;
|
|
49
55
|
footer(props?: {}): any;
|
|
50
56
|
}
|
|
@@ -70,7 +70,7 @@ const ariaLabel = computed(() => {
|
|
|
70
70
|
<template>
|
|
71
71
|
<Primitive :as="as" :data-orientation="orientation" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
|
|
72
72
|
<div v-if="image || !!slots.header" :class="ui.header({ class: props.ui?.header })">
|
|
73
|
-
<slot name="header">
|
|
73
|
+
<slot name="header" :ui="ui">
|
|
74
74
|
<component
|
|
75
75
|
:is="ImageComponent"
|
|
76
76
|
v-bind="typeof image === 'string' ? { src: image, alt: title } : { alt: title, ...image }"
|
|
@@ -117,7 +117,7 @@ const ariaLabel = computed(() => {
|
|
|
117
117
|
</div>
|
|
118
118
|
|
|
119
119
|
<div v-if="authors?.length || !!slots.authors" :class="ui.authors({ class: props.ui?.authors })">
|
|
120
|
-
<slot name="authors">
|
|
120
|
+
<slot name="authors" :ui="ui">
|
|
121
121
|
<template v-if="authors?.length">
|
|
122
122
|
<UAvatarGroup v-if="authors.length > 1">
|
|
123
123
|
<ULink
|
|
@@ -22,7 +22,9 @@ export interface BlogPostProps {
|
|
|
22
22
|
/** The authors of the blog post. */
|
|
23
23
|
authors?: UserProps[];
|
|
24
24
|
/** The image of the blog post. Can be a string or an object. */
|
|
25
|
-
image?: string | Partial<HTMLImageElement
|
|
25
|
+
image?: string | (Partial<HTMLImageElement> & {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
});
|
|
26
28
|
/**
|
|
27
29
|
* The orientation of the blog post.
|
|
28
30
|
* @defaultValue 'vertical'
|
|
@@ -43,8 +45,12 @@ export interface BlogPostSlots {
|
|
|
43
45
|
badge(props?: {}): any;
|
|
44
46
|
title(props?: {}): any;
|
|
45
47
|
description(props?: {}): any;
|
|
46
|
-
authors(props
|
|
47
|
-
|
|
48
|
+
authors(props: {
|
|
49
|
+
ui: BlogPost['ui'];
|
|
50
|
+
}): any;
|
|
51
|
+
header(props: {
|
|
52
|
+
ui: BlogPost['ui'];
|
|
53
|
+
}): any;
|
|
48
54
|
body(props?: {}): any;
|
|
49
55
|
footer(props?: {}): any;
|
|
50
56
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
2
|
import theme from '#build/ui/blog-posts';
|
|
3
|
-
import type { BlogPostProps } from '../types';
|
|
3
|
+
import type { BlogPostProps, BlogPostSlots } from '../types';
|
|
4
4
|
import type { ComponentConfig } from '../types/tv';
|
|
5
5
|
type BlogPosts = ComponentConfig<typeof theme, AppConfig, 'blogPosts'>;
|
|
6
|
-
export interface BlogPostsProps {
|
|
6
|
+
export interface BlogPostsProps<T extends BlogPostProps = BlogPostProps> {
|
|
7
7
|
/**
|
|
8
8
|
* The element or component this component should render as.
|
|
9
9
|
* @defaultValue 'div'
|
|
10
10
|
*/
|
|
11
11
|
as?: any;
|
|
12
|
-
posts?:
|
|
12
|
+
posts?: T[];
|
|
13
13
|
/**
|
|
14
14
|
* The orientation of the blog posts.
|
|
15
15
|
* @defaultValue 'horizontal'
|
|
@@ -17,16 +17,25 @@ export interface BlogPostsProps {
|
|
|
17
17
|
orientation?: BlogPosts['variants']['orientation'];
|
|
18
18
|
class?: any;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type ExtendSlotWithPost<T extends BlogPostProps, K extends keyof BlogPostSlots> = BlogPostSlots[K] extends (props: infer P) => any ? (props: P & {
|
|
21
|
+
post: T;
|
|
22
|
+
}) => any : BlogPostSlots[K];
|
|
23
|
+
export type BlogPostsSlots<T extends BlogPostProps = BlogPostProps> = {
|
|
24
|
+
[K in keyof BlogPostSlots]: ExtendSlotWithPost<T, K>;
|
|
25
|
+
} & {
|
|
21
26
|
default(props?: {}): any;
|
|
22
|
-
}
|
|
23
|
-
declare const __VLS_export:
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: <T extends BlogPostProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
29
|
+
props: __VLS_PrettifyLocal<BlogPostsProps<BlogPostProps>> & import("vue").PublicProps;
|
|
30
|
+
expose: (exposed: {}) => void;
|
|
31
|
+
attrs: any;
|
|
32
|
+
slots: BlogPostsSlots<T>;
|
|
33
|
+
emit: {};
|
|
34
|
+
}>) => import("vue").VNode & {
|
|
35
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
|
+
};
|
|
26
37
|
declare const _default: typeof __VLS_export;
|
|
27
38
|
export default _default;
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
};
|
|
39
|
+
type __VLS_PrettifyLocal<T> = {
|
|
40
|
+
[K in keyof T as K]: T[K];
|
|
41
|
+
} & {};
|
|
@@ -6,6 +6,7 @@ import theme from "#build/ui/blog-posts";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
import { Primitive } from "reka-ui";
|
|
8
8
|
import { useAppConfig } from "#imports";
|
|
9
|
+
import { omit } from "../utils";
|
|
9
10
|
import { tv } from "../utils/tv";
|
|
10
11
|
import UBlogPost from "./BlogPost.vue";
|
|
11
12
|
const props = defineProps({
|
|
@@ -14,7 +15,8 @@ const props = defineProps({
|
|
|
14
15
|
orientation: { type: null, required: false, default: "horizontal" },
|
|
15
16
|
class: { type: null, required: false }
|
|
16
17
|
});
|
|
17
|
-
defineSlots();
|
|
18
|
+
const slots = defineSlots();
|
|
19
|
+
const getProxySlots = () => omit(slots, ["default"]);
|
|
18
20
|
const appConfig = useAppConfig();
|
|
19
21
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.blogPosts || {} }));
|
|
20
22
|
</script>
|
|
@@ -27,7 +29,11 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.blogPosts ||
|
|
|
27
29
|
:key="index"
|
|
28
30
|
:orientation="orientation === 'vertical' ? 'horizontal' : 'vertical'"
|
|
29
31
|
v-bind="post"
|
|
30
|
-
|
|
32
|
+
>
|
|
33
|
+
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
|
|
34
|
+
<slot :name="name" v-bind="slotData" :post="post" />
|
|
35
|
+
</template>
|
|
36
|
+
</UBlogPost>
|
|
31
37
|
</slot>
|
|
32
38
|
</Primitive>
|
|
33
39
|
</template>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
2
|
import theme from '#build/ui/blog-posts';
|
|
3
|
-
import type { BlogPostProps } from '../types';
|
|
3
|
+
import type { BlogPostProps, BlogPostSlots } from '../types';
|
|
4
4
|
import type { ComponentConfig } from '../types/tv';
|
|
5
5
|
type BlogPosts = ComponentConfig<typeof theme, AppConfig, 'blogPosts'>;
|
|
6
|
-
export interface BlogPostsProps {
|
|
6
|
+
export interface BlogPostsProps<T extends BlogPostProps = BlogPostProps> {
|
|
7
7
|
/**
|
|
8
8
|
* The element or component this component should render as.
|
|
9
9
|
* @defaultValue 'div'
|
|
10
10
|
*/
|
|
11
11
|
as?: any;
|
|
12
|
-
posts?:
|
|
12
|
+
posts?: T[];
|
|
13
13
|
/**
|
|
14
14
|
* The orientation of the blog posts.
|
|
15
15
|
* @defaultValue 'horizontal'
|
|
@@ -17,16 +17,25 @@ export interface BlogPostsProps {
|
|
|
17
17
|
orientation?: BlogPosts['variants']['orientation'];
|
|
18
18
|
class?: any;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type ExtendSlotWithPost<T extends BlogPostProps, K extends keyof BlogPostSlots> = BlogPostSlots[K] extends (props: infer P) => any ? (props: P & {
|
|
21
|
+
post: T;
|
|
22
|
+
}) => any : BlogPostSlots[K];
|
|
23
|
+
export type BlogPostsSlots<T extends BlogPostProps = BlogPostProps> = {
|
|
24
|
+
[K in keyof BlogPostSlots]: ExtendSlotWithPost<T, K>;
|
|
25
|
+
} & {
|
|
21
26
|
default(props?: {}): any;
|
|
22
|
-
}
|
|
23
|
-
declare const __VLS_export:
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_export: <T extends BlogPostProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
29
|
+
props: __VLS_PrettifyLocal<BlogPostsProps<BlogPostProps>> & import("vue").PublicProps;
|
|
30
|
+
expose: (exposed: {}) => void;
|
|
31
|
+
attrs: any;
|
|
32
|
+
slots: BlogPostsSlots<T>;
|
|
33
|
+
emit: {};
|
|
34
|
+
}>) => import("vue").VNode & {
|
|
35
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
36
|
+
};
|
|
26
37
|
declare const _default: typeof __VLS_export;
|
|
27
38
|
export default _default;
|
|
28
|
-
type
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
};
|
|
39
|
+
type __VLS_PrettifyLocal<T> = {
|
|
40
|
+
[K in keyof T as K]: T[K];
|
|
41
|
+
} & {};
|
|
@@ -41,14 +41,29 @@ type SlotProps<T extends BreadcrumbItem> = (props: {
|
|
|
41
41
|
item: T;
|
|
42
42
|
index: number;
|
|
43
43
|
active?: boolean;
|
|
44
|
+
ui: Breadcrumb['ui'];
|
|
44
45
|
}) => any;
|
|
45
46
|
export type BreadcrumbSlots<T extends BreadcrumbItem = BreadcrumbItem> = {
|
|
46
47
|
'item': SlotProps<T>;
|
|
47
48
|
'item-leading': SlotProps<T>;
|
|
48
|
-
'item-label':
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
'item-label': (props: {
|
|
50
|
+
item: T;
|
|
51
|
+
index: number;
|
|
52
|
+
active?: boolean;
|
|
53
|
+
}) => any;
|
|
54
|
+
'item-trailing': (props: {
|
|
55
|
+
item: T;
|
|
56
|
+
index: number;
|
|
57
|
+
active?: boolean;
|
|
58
|
+
}) => any;
|
|
59
|
+
'separator': (props: {
|
|
60
|
+
ui: Breadcrumb['ui'];
|
|
61
|
+
}) => any;
|
|
62
|
+
} & DynamicSlots<T, 'leading', {
|
|
63
|
+
index: number;
|
|
64
|
+
active?: boolean;
|
|
65
|
+
ui: Breadcrumb['ui'];
|
|
66
|
+
}> & DynamicSlots<T, 'label' | 'trailing', {
|
|
52
67
|
index: number;
|
|
53
68
|
active?: boolean;
|
|
54
69
|
}>;
|
|
@@ -35,27 +35,27 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.breadcrumb ||
|
|
|
35
35
|
<template v-for="(item, index) in items" :key="index">
|
|
36
36
|
<li :class="ui.item({ class: [props.ui?.item, item.ui?.item] })">
|
|
37
37
|
<ULink v-slot="{ active, ...slotProps }" v-bind="pickLinkProps(item)" custom>
|
|
38
|
-
<ULinkBase v-bind="slotProps" as="span" :aria-current="active && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
|
|
39
|
-
<slot :name="item.slot || 'item'" :item="item" :index="index">
|
|
40
|
-
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="index === items.length - 1" :index="index">
|
|
41
|
-
<UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: index === items.length - 1 })" />
|
|
42
|
-
<UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: index === items.length - 1 })" />
|
|
38
|
+
<ULinkBase v-bind="slotProps" as="span" :aria-current="(item.active ?? active) && index === items.length - 1 ? 'page' : void 0" :class="ui.link({ class: [props.ui?.link, item.ui?.link, item.class], active: item.active ?? index === items.length - 1, disabled: !!item.disabled, to: !!item.to })">
|
|
39
|
+
<slot :name="item.slot || 'item'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" :ui="ui">
|
|
40
|
+
<slot :name="item.slot ? `${item.slot}-leading` : 'item-leading'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" :ui="ui">
|
|
41
|
+
<UIcon v-if="item.icon" :name="item.icon" :class="ui.linkLeadingIcon({ class: [props.ui?.linkLeadingIcon, item.ui?.linkLeadingIcon], active: item.active ?? index === items.length - 1 })" />
|
|
42
|
+
<UAvatar v-else-if="item.avatar" :size="props.ui?.linkLeadingAvatarSize || ui.linkLeadingAvatarSize()" v-bind="item.avatar" :class="ui.linkLeadingAvatar({ class: [props.ui?.linkLeadingAvatar, item.ui?.linkLeadingAvatar], active: item.active ?? index === items.length - 1 })" />
|
|
43
43
|
</slot>
|
|
44
44
|
|
|
45
45
|
<span v-if="get(item, props.labelKey) || !!slots[item.slot ? `${item.slot}-label` : 'item-label']" :class="ui.linkLabel({ class: [props.ui?.linkLabel, item.ui?.linkLabel] })">
|
|
46
|
-
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="index === items.length - 1" :index="index">
|
|
46
|
+
<slot :name="item.slot ? `${item.slot}-label` : 'item-label'" :item="item" :active="item.active ?? index === items.length - 1" :index="index">
|
|
47
47
|
{{ get(item, props.labelKey) }}
|
|
48
48
|
</slot>
|
|
49
49
|
</span>
|
|
50
50
|
|
|
51
|
-
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="index === items.length - 1" :index="index" />
|
|
51
|
+
<slot :name="item.slot ? `${item.slot}-trailing` : 'item-trailing'" :item="item" :active="item.active ?? index === items.length - 1" :index="index" />
|
|
52
52
|
</slot>
|
|
53
53
|
</ULinkBase>
|
|
54
54
|
</ULink>
|
|
55
55
|
</li>
|
|
56
56
|
|
|
57
57
|
<li v-if="index < items.length - 1" role="presentation" aria-hidden="true" :class="ui.separator({ class: [props.ui?.separator, item.ui?.separator] })">
|
|
58
|
-
<slot name="separator">
|
|
58
|
+
<slot name="separator" :ui="ui">
|
|
59
59
|
<UIcon :name="separatorIcon" :class="ui.separatorIcon({ class: [props.ui?.separatorIcon, item.ui?.separatorIcon] })" />
|
|
60
60
|
</slot>
|
|
61
61
|
</li>
|
|
@@ -41,14 +41,29 @@ type SlotProps<T extends BreadcrumbItem> = (props: {
|
|
|
41
41
|
item: T;
|
|
42
42
|
index: number;
|
|
43
43
|
active?: boolean;
|
|
44
|
+
ui: Breadcrumb['ui'];
|
|
44
45
|
}) => any;
|
|
45
46
|
export type BreadcrumbSlots<T extends BreadcrumbItem = BreadcrumbItem> = {
|
|
46
47
|
'item': SlotProps<T>;
|
|
47
48
|
'item-leading': SlotProps<T>;
|
|
48
|
-
'item-label':
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
'item-label': (props: {
|
|
50
|
+
item: T;
|
|
51
|
+
index: number;
|
|
52
|
+
active?: boolean;
|
|
53
|
+
}) => any;
|
|
54
|
+
'item-trailing': (props: {
|
|
55
|
+
item: T;
|
|
56
|
+
index: number;
|
|
57
|
+
active?: boolean;
|
|
58
|
+
}) => any;
|
|
59
|
+
'separator': (props: {
|
|
60
|
+
ui: Breadcrumb['ui'];
|
|
61
|
+
}) => any;
|
|
62
|
+
} & DynamicSlots<T, 'leading', {
|
|
63
|
+
index: number;
|
|
64
|
+
active?: boolean;
|
|
65
|
+
ui: Breadcrumb['ui'];
|
|
66
|
+
}> & DynamicSlots<T, 'label' | 'trailing', {
|
|
52
67
|
index: number;
|
|
53
68
|
active?: boolean;
|
|
54
69
|
}>;
|
|
@@ -31,9 +31,15 @@ export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'ra
|
|
|
31
31
|
ui?: Button['slots'];
|
|
32
32
|
}
|
|
33
33
|
export interface ButtonSlots {
|
|
34
|
-
leading(props
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
leading(props: {
|
|
35
|
+
ui: Button['ui'];
|
|
36
|
+
}): any;
|
|
37
|
+
default(props: {
|
|
38
|
+
ui: Button['ui'];
|
|
39
|
+
}): any;
|
|
40
|
+
trailing(props: {
|
|
41
|
+
ui: Button['ui'];
|
|
42
|
+
}): any;
|
|
37
43
|
}
|
|
38
44
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
39
45
|
declare const _default: typeof __VLS_export;
|
|
@@ -128,18 +128,18 @@ const ui = computed(() => tv({
|
|
|
128
128
|
})"
|
|
129
129
|
@click="onClickWrapper"
|
|
130
130
|
>
|
|
131
|
-
<slot name="leading">
|
|
131
|
+
<slot name="leading" :ui="ui">
|
|
132
132
|
<UIcon v-if="isLeading && leadingIconName" :name="leadingIconName" :class="ui.leadingIcon({ class: props.ui?.leadingIcon, active })" />
|
|
133
133
|
<UAvatar v-else-if="!!avatar" :size="props.ui?.leadingAvatarSize || ui.leadingAvatarSize()" v-bind="avatar" :class="ui.leadingAvatar({ class: props.ui?.leadingAvatar, active })" />
|
|
134
134
|
</slot>
|
|
135
135
|
|
|
136
|
-
<slot>
|
|
136
|
+
<slot :ui="ui">
|
|
137
137
|
<span v-if="label !== void 0 && label !== null" :class="ui.label({ class: props.ui?.label, active })">
|
|
138
138
|
{{ label }}
|
|
139
139
|
</span>
|
|
140
140
|
</slot>
|
|
141
141
|
|
|
142
|
-
<slot name="trailing">
|
|
142
|
+
<slot name="trailing" :ui="ui">
|
|
143
143
|
<UIcon v-if="isTrailing && trailingIconName" :name="trailingIconName" :class="ui.trailingIcon({ class: props.ui?.trailingIcon, active })" />
|
|
144
144
|
</slot>
|
|
145
145
|
</ULinkBase>
|
|
@@ -31,9 +31,15 @@ export interface ButtonProps extends UseComponentIconsProps, Omit<LinkProps, 'ra
|
|
|
31
31
|
ui?: Button['slots'];
|
|
32
32
|
}
|
|
33
33
|
export interface ButtonSlots {
|
|
34
|
-
leading(props
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
leading(props: {
|
|
35
|
+
ui: Button['ui'];
|
|
36
|
+
}): any;
|
|
37
|
+
default(props: {
|
|
38
|
+
ui: Button['ui'];
|
|
39
|
+
}): any;
|
|
40
|
+
trailing(props: {
|
|
41
|
+
ui: Button['ui'];
|
|
42
|
+
}): any;
|
|
37
43
|
}
|
|
38
44
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ButtonSlots>;
|
|
39
45
|
declare const _default: typeof __VLS_export;
|
|
@@ -63,6 +63,10 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
63
63
|
* @defaultValue 'primary'
|
|
64
64
|
*/
|
|
65
65
|
color?: Calendar['variants']['color'];
|
|
66
|
+
/**
|
|
67
|
+
* @defaultValue 'solid'
|
|
68
|
+
*/
|
|
69
|
+
variant?: Calendar['variants']['variant'];
|
|
66
70
|
/**
|
|
67
71
|
* @defaultValue 'md'
|
|
68
72
|
*/
|
|
@@ -22,6 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
prevMonthIcon: { type: [String, Object], required: false },
|
|
23
23
|
prevMonth: { type: Object, required: false },
|
|
24
24
|
color: { type: null, required: false },
|
|
25
|
+
variant: { type: null, required: false },
|
|
25
26
|
size: { type: null, required: false },
|
|
26
27
|
range: { type: Boolean, required: false },
|
|
27
28
|
multiple: { type: Boolean, required: false },
|
|
@@ -58,13 +59,14 @@ const emits = defineEmits(["update:modelValue", "update:placeholder", "update:va
|
|
|
58
59
|
defineSlots();
|
|
59
60
|
const { code: locale, dir, t } = useLocale();
|
|
60
61
|
const appConfig = useAppConfig();
|
|
61
|
-
const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "size", "monthControls", "yearControls", "class", "ui"), emits);
|
|
62
|
+
const rootProps = useForwardPropsEmits(reactiveOmit(props, "range", "modelValue", "defaultValue", "color", "variant", "size", "monthControls", "yearControls", "class", "ui"), emits);
|
|
62
63
|
const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleLeft : appConfig.ui.icons.chevronDoubleRight));
|
|
63
64
|
const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronLeft : appConfig.ui.icons.chevronRight));
|
|
64
65
|
const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronDoubleRight : appConfig.ui.icons.chevronDoubleLeft));
|
|
65
66
|
const prevMonthIcon = computed(() => props.prevMonthIcon || (dir.value === "rtl" ? appConfig.ui.icons.chevronRight : appConfig.ui.icons.chevronLeft));
|
|
66
67
|
const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.calendar || {} })({
|
|
67
68
|
color: props.color,
|
|
69
|
+
variant: props.variant,
|
|
68
70
|
size: props.size
|
|
69
71
|
}));
|
|
70
72
|
function paginateYear(date, sign) {
|
|
@@ -63,6 +63,10 @@ export interface CalendarProps<R extends boolean = false, M extends boolean = fa
|
|
|
63
63
|
* @defaultValue 'primary'
|
|
64
64
|
*/
|
|
65
65
|
color?: Calendar['variants']['color'];
|
|
66
|
+
/**
|
|
67
|
+
* @defaultValue 'solid'
|
|
68
|
+
*/
|
|
69
|
+
variant?: Calendar['variants']['variant'];
|
|
66
70
|
/**
|
|
67
71
|
* @defaultValue 'md'
|
|
68
72
|
*/
|
|
@@ -22,7 +22,9 @@ export interface ChangelogVersionProps {
|
|
|
22
22
|
/** The authors of the changelog version. */
|
|
23
23
|
authors?: UserProps[];
|
|
24
24
|
/** The image of the changelog version. Can be a string or an object. */
|
|
25
|
-
image?: string | Partial<HTMLImageElement
|
|
25
|
+
image?: string | (Partial<HTMLImageElement> & {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
});
|
|
26
28
|
/**
|
|
27
29
|
* Display an indicator dot on the left.
|
|
28
30
|
* @defaultValue true
|
|
@@ -36,16 +38,22 @@ export interface ChangelogVersionProps {
|
|
|
36
38
|
}
|
|
37
39
|
export interface ChangelogVersionSlots {
|
|
38
40
|
header(props?: {}): any;
|
|
39
|
-
badge(props
|
|
41
|
+
badge(props: {
|
|
42
|
+
ui: ChangelogVersion['ui'];
|
|
43
|
+
}): any;
|
|
40
44
|
date(props?: {}): any;
|
|
41
45
|
title(props?: {}): any;
|
|
42
46
|
description(props?: {}): any;
|
|
43
|
-
image(props
|
|
47
|
+
image(props: {
|
|
48
|
+
ui: ChangelogVersion['ui'];
|
|
49
|
+
}): any;
|
|
44
50
|
body(props?: {}): any;
|
|
45
51
|
footer(props?: {}): any;
|
|
46
52
|
authors(props?: {}): any;
|
|
47
53
|
actions(props?: {}): any;
|
|
48
|
-
indicator(props
|
|
54
|
+
indicator(props: {
|
|
55
|
+
ui: ChangelogVersion['ui'];
|
|
56
|
+
}): any;
|
|
49
57
|
}
|
|
50
58
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChangelogVersionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChangelogVersionProps> & Readonly<{}>, {
|
|
51
59
|
as: any;
|
|
@@ -95,7 +95,7 @@ const ariaLabel = computed(() => {
|
|
|
95
95
|
|
|
96
96
|
<Primitive :as="as" :class="ui.root({ class: [props.ui?.root, props.class] })" @click="onClick">
|
|
97
97
|
<div v-if="!!props.indicator || !!slots.indicator" :class="ui.indicator({ class: props.ui?.indicator })">
|
|
98
|
-
<slot name="indicator">
|
|
98
|
+
<slot name="indicator" :ui="ui">
|
|
99
99
|
<ReuseDateTemplate />
|
|
100
100
|
|
|
101
101
|
<div :class="ui.dot({ class: props.ui?.dot })">
|
|
@@ -108,7 +108,7 @@ const ariaLabel = computed(() => {
|
|
|
108
108
|
<div v-if="!!slots.header || (date || !!slots.date) || (badge || !!slots.badge) || (title || !!slots.title) || (description || !!slots.description) || (image || !!slots.image)" :class="ui.header({ class: props.ui?.header })">
|
|
109
109
|
<slot name="header">
|
|
110
110
|
<div v-if="date || !!slots.date || (badge || !!slots.badge)" :class="ui.meta({ class: props.ui?.meta, badge: !!badge || !!slots.badge || !props.indicator })">
|
|
111
|
-
<slot name="badge">
|
|
111
|
+
<slot name="badge" :ui="ui">
|
|
112
112
|
<UBadge v-if="badge" color="neutral" variant="solid" v-bind="typeof badge === 'string' ? { label: badge } : badge" :class="ui.badge({ class: props.ui?.badge })" />
|
|
113
113
|
</slot>
|
|
114
114
|
|
|
@@ -130,7 +130,7 @@ const ariaLabel = computed(() => {
|
|
|
130
130
|
</div>
|
|
131
131
|
|
|
132
132
|
<div v-if="image || !!slots.image" :class="ui.imageWrapper({ class: props.ui?.imageWrapper })">
|
|
133
|
-
<slot name="image">
|
|
133
|
+
<slot name="image" :ui="ui">
|
|
134
134
|
<component
|
|
135
135
|
:is="ImageComponent"
|
|
136
136
|
v-if="image"
|
|
@@ -22,7 +22,9 @@ export interface ChangelogVersionProps {
|
|
|
22
22
|
/** The authors of the changelog version. */
|
|
23
23
|
authors?: UserProps[];
|
|
24
24
|
/** The image of the changelog version. Can be a string or an object. */
|
|
25
|
-
image?: string | Partial<HTMLImageElement
|
|
25
|
+
image?: string | (Partial<HTMLImageElement> & {
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
});
|
|
26
28
|
/**
|
|
27
29
|
* Display an indicator dot on the left.
|
|
28
30
|
* @defaultValue true
|
|
@@ -36,16 +38,22 @@ export interface ChangelogVersionProps {
|
|
|
36
38
|
}
|
|
37
39
|
export interface ChangelogVersionSlots {
|
|
38
40
|
header(props?: {}): any;
|
|
39
|
-
badge(props
|
|
41
|
+
badge(props: {
|
|
42
|
+
ui: ChangelogVersion['ui'];
|
|
43
|
+
}): any;
|
|
40
44
|
date(props?: {}): any;
|
|
41
45
|
title(props?: {}): any;
|
|
42
46
|
description(props?: {}): any;
|
|
43
|
-
image(props
|
|
47
|
+
image(props: {
|
|
48
|
+
ui: ChangelogVersion['ui'];
|
|
49
|
+
}): any;
|
|
44
50
|
body(props?: {}): any;
|
|
45
51
|
footer(props?: {}): any;
|
|
46
52
|
authors(props?: {}): any;
|
|
47
53
|
actions(props?: {}): any;
|
|
48
|
-
indicator(props
|
|
54
|
+
indicator(props: {
|
|
55
|
+
ui: ChangelogVersion['ui'];
|
|
56
|
+
}): any;
|
|
49
57
|
}
|
|
50
58
|
declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ChangelogVersionProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ChangelogVersionProps> & Readonly<{}>, {
|
|
51
59
|
as: any;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AppConfig } from '@nuxt/schema';
|
|
2
2
|
import type { SpringOptions } from 'motion-v';
|
|
3
3
|
import theme from '#build/ui/changelog-versions';
|
|
4
|
-
import type { ChangelogVersionProps } from '../types';
|
|
4
|
+
import type { ChangelogVersionProps, ChangelogVersionSlots } from '../types';
|
|
5
5
|
import type { ComponentConfig } from '../types/tv';
|
|
6
6
|
type ChangelogVersions = ComponentConfig<typeof theme, AppConfig, 'changelogVersions'>;
|
|
7
7
|
export interface ChangelogVersionsProps<T extends ChangelogVersionProps = ChangelogVersionProps> {
|
|
@@ -26,43 +26,15 @@ export interface ChangelogVersionsProps<T extends ChangelogVersionProps = Change
|
|
|
26
26
|
class?: any;
|
|
27
27
|
ui?: ChangelogVersions['slots'];
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
type ExtendSlotWithVersion<T extends ChangelogVersionProps, K extends keyof ChangelogVersionSlots> = ChangelogVersionSlots[K] extends (props: infer P) => any ? (props: P & {
|
|
30
|
+
version: T;
|
|
31
|
+
}) => any : ChangelogVersionSlots[K];
|
|
32
|
+
export type ChangelogVersionsSlots<T extends ChangelogVersionProps = ChangelogVersionProps> = {
|
|
33
|
+
[K in keyof ChangelogVersionSlots]: ExtendSlotWithVersion<T, K>;
|
|
34
|
+
} & {
|
|
30
35
|
default(props?: {}): any;
|
|
31
36
|
indicator(props?: {}): any;
|
|
32
|
-
|
|
33
|
-
version: T;
|
|
34
|
-
}): any;
|
|
35
|
-
badge(props: {
|
|
36
|
-
version: T;
|
|
37
|
-
}): any;
|
|
38
|
-
date(props: {
|
|
39
|
-
version: T;
|
|
40
|
-
}): any;
|
|
41
|
-
title(props: {
|
|
42
|
-
version: T;
|
|
43
|
-
}): any;
|
|
44
|
-
description(props: {
|
|
45
|
-
version: T;
|
|
46
|
-
}): any;
|
|
47
|
-
image(props: {
|
|
48
|
-
version: T;
|
|
49
|
-
}): any;
|
|
50
|
-
body(props: {
|
|
51
|
-
version: T;
|
|
52
|
-
}): any;
|
|
53
|
-
footer(props: {
|
|
54
|
-
version: T;
|
|
55
|
-
}): any;
|
|
56
|
-
authors(props: {
|
|
57
|
-
version: T;
|
|
58
|
-
}): any;
|
|
59
|
-
actions(props: {
|
|
60
|
-
version: T;
|
|
61
|
-
}): any;
|
|
62
|
-
indicator(props: {
|
|
63
|
-
version: T;
|
|
64
|
-
}): any;
|
|
65
|
-
}
|
|
37
|
+
};
|
|
66
38
|
declare const __VLS_export: <T extends ChangelogVersionProps>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
67
39
|
props: __VLS_PrettifyLocal<ChangelogVersionsProps<T>> & import("vue").PublicProps;
|
|
68
40
|
expose: (exposed: {}) => void;
|
|
@@ -45,8 +45,8 @@ const ui = computed(() => tv({ extend: tv(theme), ...appConfig.ui?.changelogVers
|
|
|
45
45
|
:indicator="!!props.indicator"
|
|
46
46
|
v-bind="version"
|
|
47
47
|
>
|
|
48
|
-
<template v-for="(_, name) in getProxySlots()" #[name]>
|
|
49
|
-
<slot :name="name" v-bind="
|
|
48
|
+
<template v-for="(_, name) in getProxySlots()" #[name]="slotData">
|
|
49
|
+
<slot :name="name" v-bind="slotData" :version="version" />
|
|
50
50
|
</template>
|
|
51
51
|
</UChangelogVersion>
|
|
52
52
|
</slot>
|