rimelight-components 1.7.3 → 1.7.5
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.
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export type CalloutVariant = "info" | "success" | "warning" | "error" | "commentary" | "ideation" | "source";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
variant: CalloutVariant;
|
|
4
|
+
to?: string;
|
|
5
|
+
target?: string;
|
|
4
6
|
};
|
|
5
|
-
declare var
|
|
7
|
+
declare var __VLS_19: {};
|
|
6
8
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_19) => any;
|
|
8
10
|
};
|
|
9
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -2,40 +2,48 @@
|
|
|
2
2
|
import { useAppConfig } from "#imports";
|
|
3
3
|
import { computed } from "#imports";
|
|
4
4
|
const appConfig = useAppConfig();
|
|
5
|
-
const {
|
|
6
|
-
variant
|
|
5
|
+
const {
|
|
6
|
+
variant,
|
|
7
|
+
to = "",
|
|
8
|
+
target = ""
|
|
9
|
+
} = defineProps({
|
|
10
|
+
variant: { type: String, required: true },
|
|
11
|
+
to: { type: String, required: false },
|
|
12
|
+
target: { type: String, required: false }
|
|
7
13
|
});
|
|
8
14
|
const config = computed(() => {
|
|
9
15
|
return appConfig.rimelightComponents?.callouts?.[variant] ?? {
|
|
10
16
|
icon: "lucide:alert-circle",
|
|
11
17
|
title: "Callout",
|
|
12
|
-
|
|
18
|
+
tooltip: "Callout"
|
|
13
19
|
};
|
|
14
20
|
});
|
|
15
21
|
const icon = computed(() => config.value.icon);
|
|
16
22
|
const title = computed(() => config.value.title);
|
|
17
|
-
const
|
|
23
|
+
const tooltip = computed(() => config.value.tooltip);
|
|
18
24
|
</script>
|
|
19
25
|
|
|
20
26
|
<template>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
<NuxtLink :to="to" :target="target">
|
|
28
|
+
<UAlert
|
|
29
|
+
:title="$t(title)"
|
|
30
|
+
:color="variant"
|
|
31
|
+
variant="subtle"
|
|
32
|
+
:close="{
|
|
26
33
|
class: 'pointer-events-none focus-visible:outline-none'
|
|
27
34
|
}"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
>
|
|
36
|
+
<template #leading>
|
|
37
|
+
<UIcon :name="icon" class="size-6" />
|
|
38
|
+
</template>
|
|
39
|
+
<template #content>
|
|
40
|
+
<slot />
|
|
41
|
+
</template>
|
|
42
|
+
<template #close>
|
|
43
|
+
<UTooltip v-if="tooltip" :text="$t(tooltip)">
|
|
44
|
+
<UIcon name="lucide:circle-question-mark" class="size-5" />
|
|
45
|
+
</UTooltip>
|
|
46
|
+
</template>
|
|
47
|
+
</UAlert>
|
|
48
|
+
</NuxtLink>
|
|
41
49
|
</template>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export type CalloutVariant = "info" | "success" | "warning" | "error" | "commentary" | "ideation" | "source";
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
variant: CalloutVariant;
|
|
4
|
+
to?: string;
|
|
5
|
+
target?: string;
|
|
4
6
|
};
|
|
5
|
-
declare var
|
|
7
|
+
declare var __VLS_19: {};
|
|
6
8
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
9
|
+
default?: (props: typeof __VLS_19) => any;
|
|
8
10
|
};
|
|
9
11
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|