rimelight-components 1.4.0 → 1.4.2

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,7 +1,8 @@
1
1
  export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
2
  type __VLS_Props = {
3
3
  level?: SectionLevel;
4
- title?: string;
4
+ title: string;
5
+ description?: string;
5
6
  };
6
7
  declare var __VLS_11: {};
7
8
  type __VLS_Slots = {} & {
@@ -2,45 +2,70 @@
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
- const { level = 1, title = `H${level}` } = defineProps({
46
+ const { level = 1 } = defineProps({
32
47
  level: { type: Number, required: false },
33
- title: { type: String, required: false }
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>
39
61
  <section :class="sectionSlot()" v-bind="$attrs">
40
- <component :is="`h${level}`" :class="headingSlot()" v-if="title">
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>
@@ -1,7 +1,8 @@
1
1
  export type SectionLevel = 1 | 2 | 3 | 4 | 5 | 6;
2
2
  type __VLS_Props = {
3
3
  level?: SectionLevel;
4
- title?: string;
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.0",
3
+ "version": "1.4.2",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "Rimelight Entertainment/rimelight-components",
6
6
  "license": "MIT",