rimelight-components 1.4.1 → 1.4.3

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 CHANGED
@@ -3,6 +3,7 @@ import * as _nuxt_schema from '@nuxt/schema';
3
3
  interface CalloutOptions {
4
4
  icon: string;
5
5
  title: string;
6
+ tooltip: string;
6
7
  }
7
8
  interface ModuleOptions {
8
9
  callouts: {
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 __VLS_8: {};
5
+ declare var __VLS_14: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_8) => any;
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 :icon="icon" :title="title" :color="variant" variant="subtle">
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 __VLS_8: {};
5
+ declare var __VLS_14: {};
6
6
  type __VLS_Slots = {} & {
7
- default?: (props: typeof __VLS_8) => any;
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>;
@@ -2,6 +2,7 @@ export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
2
  type __VLS_Props = {
3
3
  level?: SectionLevel;
4
4
  title: string;
5
+ description?: string;
5
6
  };
6
7
  declare var __VLS_11: {};
7
8
  type __VLS_Slots = {} & {
@@ -2,37 +2,59 @@
2
2
  import { tv } from "tailwind-variants";
3
3
  const sectionVariants = tv({
4
4
  slots: {
5
- sectionSlot: "flex flex-col gap-md lg:gap-lg",
6
- headingSlot: ""
5
+ sectionSlot: "flex flex-col py-4",
6
+ headingSlot: "font-bold",
7
+ descriptionSlot: "text-muted",
8
+ separatorSlot: "py-2",
9
+ contentSlot: "flex flex-col gap-md mt-2"
7
10
  },
8
11
  variants: {
9
12
  level: {
10
13
  1: {
11
- headingSlot: "text-4xl font-bold"
14
+ sectionSlot: "gap-2",
15
+ headingSlot: "text-4xl",
16
+ descriptionSlot: "text-2xl"
12
17
  },
13
18
  2: {
14
- headingSlot: "text-3xl font-bold"
19
+ sectionSlot: "gap-1.5",
20
+ headingSlot: "text-3xl",
21
+ descriptionSlot: "text-xl"
15
22
  },
16
23
  3: {
17
- headingSlot: "text-2xl font-bold"
24
+ sectionSlot: "gap-1",
25
+ headingSlot: "text-2xl",
26
+ descriptionSlot: "text-lg"
18
27
  },
19
28
  4: {
20
- headingSlot: "text-xl font-bold"
29
+ sectionSlot: "gap-0.5",
30
+ headingSlot: "text-xl",
31
+ descriptionSlot: "text-md"
21
32
  },
22
33
  5: {
23
- headingSlot: "text-lg font-bold"
34
+ sectionSlot: "gap-0.25",
35
+ headingSlot: "text-lg",
36
+ descriptionSlot: "text-sm"
24
37
  },
25
38
  6: {
26
- headingSlot: "text-base font-bold"
39
+ sectionSlot: "gap-0.125",
40
+ headingSlot: "text-base",
41
+ descriptionSlot: "text-xs"
27
42
  }
28
43
  }
29
44
  }
30
45
  });
31
46
  const { level = 1 } = defineProps({
32
47
  level: { type: Number, required: false },
33
- title: { type: String, required: true }
48
+ title: { type: String, required: true },
49
+ description: { type: String, required: false }
34
50
  });
35
- const { sectionSlot, headingSlot } = sectionVariants({ level });
51
+ const {
52
+ sectionSlot,
53
+ headingSlot,
54
+ descriptionSlot,
55
+ separatorSlot,
56
+ contentSlot
57
+ } = sectionVariants({ level });
36
58
  </script>
37
59
 
38
60
  <template>
@@ -40,7 +62,10 @@ const { sectionSlot, headingSlot } = sectionVariants({ level });
40
62
  <component :is="`h${level}`" :class="headingSlot()">
41
63
  {{ title }}
42
64
  </component>
43
- <USeparator />
44
- <slot />
65
+ <p v-if="description" :class="descriptionSlot()">{{ description }}</p>
66
+ <USeparator :class="separatorSlot()" />
67
+ <div :class="contentSlot()">
68
+ <slot />
69
+ </div>
45
70
  </section>
46
71
  </template>
@@ -2,6 +2,7 @@ export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
2
  type __VLS_Props = {
3
3
  level?: SectionLevel;
4
4
  title: string;
5
+ description?: string;
5
6
  };
6
7
  declare var __VLS_11: {};
7
8
  type __VLS_Slots = {} & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "Rimelight Entertainment/rimelight-components",
6
6
  "license": "MIT",