rimelight-components 1.4.2 → 1.4.4
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/dist/module.d.mts +1 -0
- package/dist/module.mjs +14 -7
- package/dist/runtime/components/content/Callout.d.vue.ts +2 -2
- package/dist/runtime/components/content/Callout.vue +19 -2
- package/dist/runtime/components/content/Callout.vue.d.ts +2 -2
- package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +1 -0
- package/dist/runtime/components/swatches/ColorSwatch.vue +15 -11
- package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/module.d.mts
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,31 +4,38 @@ const defaultOptions = {
|
|
|
4
4
|
callouts: {
|
|
5
5
|
info: {
|
|
6
6
|
icon: "lucide:shield-alert",
|
|
7
|
-
title: "Note"
|
|
7
|
+
title: "Note",
|
|
8
|
+
tooltip: "This callout is used for general notes."
|
|
8
9
|
},
|
|
9
10
|
success: {
|
|
10
11
|
icon: "lucide:circle-alert",
|
|
11
|
-
title: "Tip"
|
|
12
|
+
title: "Tip",
|
|
13
|
+
tooltip: "This callout is used for tips and useful information."
|
|
12
14
|
},
|
|
13
15
|
warning: {
|
|
14
16
|
icon: "lucide:triangle-alert",
|
|
15
|
-
title: "Warning"
|
|
17
|
+
title: "Warning",
|
|
18
|
+
tooltip: "This callout is used for important information."
|
|
16
19
|
},
|
|
17
20
|
error: {
|
|
18
21
|
icon: "lucide:octagon-alert",
|
|
19
|
-
title: "Danger"
|
|
22
|
+
title: "Danger",
|
|
23
|
+
tooltip: "This callout is used for critical information and prohibitions."
|
|
20
24
|
},
|
|
21
25
|
commentary: {
|
|
22
26
|
icon: "lucide:message-circle-warning",
|
|
23
|
-
title: "Commentary"
|
|
27
|
+
title: "Commentary",
|
|
28
|
+
tooltip: "This callout is used for developer commentary."
|
|
24
29
|
},
|
|
25
30
|
ideation: {
|
|
26
31
|
icon: "lucide:badge-alert",
|
|
27
|
-
title: "Ideation"
|
|
32
|
+
title: "Ideation",
|
|
33
|
+
tooltip: "This alert is used for ideas and brainstorming."
|
|
28
34
|
},
|
|
29
35
|
source: {
|
|
30
36
|
icon: "lucide:book-alert",
|
|
31
|
-
title: "Creator's Remarks"
|
|
37
|
+
title: "Creator's Remarks",
|
|
38
|
+
tooltip: "This alert is used for direct commentary of the author."
|
|
32
39
|
}
|
|
33
40
|
}
|
|
34
41
|
};
|
|
@@ -2,9 +2,9 @@ export type CalloutVariant = "info" | "success" | "warning" | "error" | "comment
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
variant: CalloutVariant;
|
|
4
4
|
};
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_14: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_14) => any;
|
|
8
8
|
};
|
|
9
9
|
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
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -8,17 +8,34 @@ const { variant } = defineProps({
|
|
|
8
8
|
const config = computed(() => {
|
|
9
9
|
return appConfig.rimelightComponents?.callouts?.[variant] ?? {
|
|
10
10
|
icon: "lucide:alert-circle",
|
|
11
|
-
title: "Unknown"
|
|
11
|
+
title: "Unknown",
|
|
12
|
+
tooltip: "Callout"
|
|
12
13
|
};
|
|
13
14
|
});
|
|
14
15
|
const icon = computed(() => config.value.icon);
|
|
15
16
|
const title = computed(() => config.value.title);
|
|
17
|
+
const tooltip = computed(() => config.value.tooltip);
|
|
16
18
|
</script>
|
|
17
19
|
|
|
18
20
|
<template>
|
|
19
|
-
<UAlert
|
|
21
|
+
<UAlert
|
|
22
|
+
:title="title"
|
|
23
|
+
:color="variant"
|
|
24
|
+
variant="subtle"
|
|
25
|
+
:close="{
|
|
26
|
+
class: 'pointer-events-none focus-visible:outline-none'
|
|
27
|
+
}"
|
|
28
|
+
>
|
|
29
|
+
<template #leading>
|
|
30
|
+
<UIcon :name="icon" class="size-6" />
|
|
31
|
+
</template>
|
|
20
32
|
<template #description>
|
|
21
33
|
<slot />
|
|
22
34
|
</template>
|
|
35
|
+
<template #close>
|
|
36
|
+
<UTooltip :text="tooltip">
|
|
37
|
+
<UIcon name="lucide:circle-question-mark" class="size-4" />
|
|
38
|
+
</UTooltip>
|
|
39
|
+
</template>
|
|
23
40
|
</UAlert>
|
|
24
41
|
</template>
|
|
@@ -2,9 +2,9 @@ export type CalloutVariant = "info" | "success" | "warning" | "error" | "comment
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
variant: CalloutVariant;
|
|
4
4
|
};
|
|
5
|
-
declare var
|
|
5
|
+
declare var __VLS_14: {};
|
|
6
6
|
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof
|
|
7
|
+
default?: (props: typeof __VLS_14) => any;
|
|
8
8
|
};
|
|
9
9
|
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
10
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -4,7 +4,8 @@ import { useToast } from "#imports";
|
|
|
4
4
|
import { computed } from "#imports";
|
|
5
5
|
const { copy } = useClipboard();
|
|
6
6
|
const toast = useToast();
|
|
7
|
-
const { hex, rgb, hsl, oklch, cmyk } = defineProps({
|
|
7
|
+
const { name, hex, rgb, hsl, oklch, cmyk } = defineProps({
|
|
8
|
+
name: { type: String, required: false },
|
|
8
9
|
hex: { type: String, required: false },
|
|
9
10
|
rgb: { type: String, required: false },
|
|
10
11
|
hsl: { type: String, required: false },
|
|
@@ -33,22 +34,25 @@ const color = computed(() => {
|
|
|
33
34
|
if (hsl) return hsl;
|
|
34
35
|
if (cmyk) return cmyk;
|
|
35
36
|
if (oklch) return oklch;
|
|
36
|
-
return "primary-500";
|
|
37
|
+
return "var(--color-primary-500)";
|
|
37
38
|
});
|
|
38
39
|
</script>
|
|
39
40
|
|
|
40
41
|
<template>
|
|
41
|
-
<UCard>
|
|
42
|
-
<
|
|
43
|
-
<
|
|
44
|
-
|
|
42
|
+
<UCard variant="subtle" class="w-fit rounded-none">
|
|
43
|
+
<template #header v-if="name">
|
|
44
|
+
<h3 class="text-lg font-bold">{{ name }}</h3>
|
|
45
|
+
</template>
|
|
46
|
+
<div class="gap-sm flex flex-row">
|
|
47
|
+
<div class="aspect-square size-48" :style="{ backgroundColor: color }" />
|
|
48
|
+
<div class="gap-sm flex flex-col justify-center">
|
|
45
49
|
<UButton
|
|
46
50
|
v-if="hex"
|
|
47
51
|
variant="outline"
|
|
48
52
|
size="sm"
|
|
49
53
|
icon="lucide:copy"
|
|
50
54
|
label="Copy HEX"
|
|
51
|
-
class="w-
|
|
55
|
+
class="w-28"
|
|
52
56
|
@click="copyToClipboard(hex)"
|
|
53
57
|
/>
|
|
54
58
|
<UButton
|
|
@@ -57,7 +61,7 @@ const color = computed(() => {
|
|
|
57
61
|
size="sm"
|
|
58
62
|
icon="lucide:copy"
|
|
59
63
|
label="Copy RGB"
|
|
60
|
-
class="w-
|
|
64
|
+
class="w-28"
|
|
61
65
|
@click="copyToClipboard(rgb)"
|
|
62
66
|
/>
|
|
63
67
|
<UButton
|
|
@@ -66,7 +70,7 @@ const color = computed(() => {
|
|
|
66
70
|
size="sm"
|
|
67
71
|
icon="lucide:copy"
|
|
68
72
|
label="Copy HSL"
|
|
69
|
-
class="w-
|
|
73
|
+
class="w-28"
|
|
70
74
|
@click="copyToClipboard(hsl)"
|
|
71
75
|
/>
|
|
72
76
|
<UButton
|
|
@@ -75,7 +79,7 @@ const color = computed(() => {
|
|
|
75
79
|
size="sm"
|
|
76
80
|
icon="lucide:copy"
|
|
77
81
|
label="Copy OKLCH"
|
|
78
|
-
class="w-
|
|
82
|
+
class="w-28"
|
|
79
83
|
@click="copyToClipboard(oklch)"
|
|
80
84
|
/>
|
|
81
85
|
<UButton
|
|
@@ -84,7 +88,7 @@ const color = computed(() => {
|
|
|
84
88
|
size="sm"
|
|
85
89
|
icon="lucide:copy"
|
|
86
90
|
label="Copy CMYK"
|
|
87
|
-
class="w-
|
|
91
|
+
class="w-28"
|
|
88
92
|
@click="copyToClipboard(cmyk)"
|
|
89
93
|
/>
|
|
90
94
|
</div>
|