rimelight-components 1.4.3 → 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.
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ name?: string;
2
3
  hex?: string;
3
4
  rgb?: string;
4
5
  hsl?: string;
@@ -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
- <div class="flex flex-row gap-sm">
43
- <div class="aspect-square size-64" :class="`bg-[${color}]`" />
44
- <div class="flex flex-col justify-center gap-sm">
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-32"
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-32"
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-32"
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-32"
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-32"
91
+ class="w-28"
88
92
  @click="copyToClipboard(cmyk)"
89
93
  />
90
94
  </div>
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ name?: string;
2
3
  hex?: string;
3
4
  rgb?: string;
4
5
  hsl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rimelight-components",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "Rimelight Entertainment/rimelight-components",
6
6
  "license": "MIT",