rimelight-components 2.1.17 → 2.1.19

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.
Files changed (149) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/components/app/Footer.d.vue.ts +18 -9
  4. package/dist/runtime/components/app/Footer.vue +25 -12
  5. package/dist/runtime/components/app/Footer.vue.d.ts +18 -9
  6. package/dist/runtime/components/app/Header.d.vue.ts +24 -15
  7. package/dist/runtime/components/app/Header.vue +18 -11
  8. package/dist/runtime/components/app/Header.vue.d.ts +24 -15
  9. package/dist/runtime/components/app/HeaderLayer.d.vue.ts +13 -7
  10. package/dist/runtime/components/app/HeaderLayer.vue +21 -9
  11. package/dist/runtime/components/app/HeaderLayer.vue.d.ts +13 -7
  12. package/dist/runtime/components/app/Image.d.vue.ts +18 -4
  13. package/dist/runtime/components/app/Image.vue +34 -16
  14. package/dist/runtime/components/app/Image.vue.d.ts +18 -4
  15. package/dist/runtime/components/app/Logo.d.vue.ts +17 -3
  16. package/dist/runtime/components/app/Logo.vue +16 -4
  17. package/dist/runtime/components/app/Logo.vue.d.ts +17 -3
  18. package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +17 -3
  19. package/dist/runtime/components/app/NewsletterSignup.vue +16 -3
  20. package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +17 -3
  21. package/dist/runtime/components/app/ScrollToTop.d.vue.ts +20 -5
  22. package/dist/runtime/components/app/ScrollToTop.vue +31 -15
  23. package/dist/runtime/components/app/ScrollToTop.vue.d.ts +20 -5
  24. package/dist/runtime/components/blocks/Block.d.vue.ts +13 -7
  25. package/dist/runtime/components/blocks/Block.vue +20 -7
  26. package/dist/runtime/components/blocks/Block.vue.d.ts +13 -7
  27. package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +17 -3
  28. package/dist/runtime/components/blocks/BlockEditRenderer.vue +15 -3
  29. package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +17 -3
  30. package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
  31. package/dist/runtime/components/blocks/BlockEditor.vue +11 -35
  32. package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
  33. package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +17 -3
  34. package/dist/runtime/components/blocks/BlockViewRenderer.vue +15 -3
  35. package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +17 -3
  36. package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +17 -3
  37. package/dist/runtime/components/blocks/TextRenderer.vue +19 -5
  38. package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +17 -3
  39. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +17 -1
  40. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +18 -4
  41. package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +17 -1
  42. package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +17 -1
  43. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +14 -2
  44. package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +17 -1
  45. package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +27 -3
  46. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +25 -9
  47. package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +27 -3
  48. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +17 -3
  49. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +21 -13
  50. package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +17 -3
  51. package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +19 -3
  52. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +20 -6
  53. package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +19 -3
  54. package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +17 -3
  55. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +16 -4
  56. package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +17 -3
  57. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +17 -1
  58. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +18 -4
  59. package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +17 -1
  60. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +17 -1
  61. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +14 -2
  62. package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +17 -1
  63. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +19 -1
  64. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +18 -4
  65. package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +19 -1
  66. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +17 -1
  67. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +16 -2
  68. package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +17 -1
  69. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +17 -1
  70. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +18 -4
  71. package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +17 -1
  72. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +17 -1
  73. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +16 -2
  74. package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +17 -1
  75. package/dist/runtime/components/cards/TeamCard.d.vue.ts +16 -7
  76. package/dist/runtime/components/cards/TeamCard.vue +29 -7
  77. package/dist/runtime/components/cards/TeamCard.vue.d.ts +16 -7
  78. package/dist/runtime/components/content/Callout.d.vue.ts +13 -7
  79. package/dist/runtime/components/content/Callout.vue +19 -6
  80. package/dist/runtime/components/content/Callout.vue.d.ts +13 -7
  81. package/dist/runtime/components/content/Section.d.vue.ts +19 -13
  82. package/dist/runtime/components/content/Section.vue +93 -87
  83. package/dist/runtime/components/content/Section.vue.d.ts +19 -13
  84. package/dist/runtime/components/content/Test.d.vue.ts +12 -7
  85. package/dist/runtime/components/content/Test.vue +15 -3
  86. package/dist/runtime/components/content/Test.vue.d.ts +12 -7
  87. package/dist/runtime/components/nodes/LinkNode.d.vue.ts +17 -3
  88. package/dist/runtime/components/nodes/LinkNode.vue +17 -3
  89. package/dist/runtime/components/nodes/LinkNode.vue.d.ts +17 -3
  90. package/dist/runtime/components/nodes/TextNode.d.vue.ts +17 -3
  91. package/dist/runtime/components/nodes/TextNode.vue +15 -3
  92. package/dist/runtime/components/nodes/TextNode.vue.d.ts +17 -3
  93. package/dist/runtime/components/page/PageEditor.d.vue.ts +35 -5
  94. package/dist/runtime/components/page/PageEditor.vue +80 -31
  95. package/dist/runtime/components/page/PageEditor.vue.d.ts +35 -5
  96. package/dist/runtime/components/page/PageMention.d.vue.ts +19 -2
  97. package/dist/runtime/components/page/PageMention.vue +21 -6
  98. package/dist/runtime/components/page/PageMention.vue.d.ts +19 -2
  99. package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +30 -2
  100. package/dist/runtime/components/page/PagePropertiesEditor.vue +113 -76
  101. package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +30 -2
  102. package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +38 -2
  103. package/dist/runtime/components/page/PagePropertiesRenderer.vue +80 -29
  104. package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +38 -2
  105. package/dist/runtime/components/page/PageRenderer.d.vue.ts +26 -2
  106. package/dist/runtime/components/page/PageRenderer.vue +56 -18
  107. package/dist/runtime/components/page/PageRenderer.vue.d.ts +26 -2
  108. package/dist/runtime/components/page/PageSurround.d.vue.ts +25 -3
  109. package/dist/runtime/components/page/PageSurround.vue +61 -26
  110. package/dist/runtime/components/page/PageSurround.vue.d.ts +25 -3
  111. package/dist/runtime/components/page/PageTOC.d.vue.ts +15 -7
  112. package/dist/runtime/components/page/PageTOC.vue +23 -9
  113. package/dist/runtime/components/page/PageTOC.vue.d.ts +15 -7
  114. package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
  115. package/dist/runtime/components/page/modals/CreatePageModal.vue +34 -24
  116. package/dist/runtime/components/page/modals/CreatePageModal.vue.d.ts +12 -4
  117. package/dist/runtime/components/page/modals/DeletePageModal.d.vue.ts +14 -7
  118. package/dist/runtime/components/page/modals/DeletePageModal.vue +28 -7
  119. package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
  120. package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +23 -3
  121. package/dist/runtime/components/swatches/ColorSwatch.vue +41 -15
  122. package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +23 -3
  123. package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +22 -3
  124. package/dist/runtime/components/swatches/FontSwatch.vue +29 -12
  125. package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +22 -3
  126. package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +22 -3
  127. package/dist/runtime/components/swatches/ImageSwatch.vue +29 -12
  128. package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +22 -3
  129. package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -5
  130. package/dist/runtime/components/utilities/Placeholder.vue +19 -5
  131. package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -5
  132. package/dist/runtime/composables/index.d.ts +1 -0
  133. package/dist/runtime/composables/index.js +1 -0
  134. package/dist/runtime/composables/index.mjs +1 -0
  135. package/dist/runtime/composables/useRC.d.ts +3 -0
  136. package/dist/runtime/composables/useRC.js +14 -0
  137. package/dist/runtime/composables/useRC.mjs +14 -0
  138. package/dist/runtime/types/app.config.d.ts +6 -0
  139. package/dist/runtime/types/schemas.d.ts +2 -2
  140. package/dist/runtime/types/tv.d.ts +66 -0
  141. package/dist/runtime/types/tv.js +0 -0
  142. package/dist/runtime/types/tv.mjs +0 -0
  143. package/dist/runtime/utils/index.d.ts +1 -0
  144. package/dist/runtime/utils/index.js +1 -0
  145. package/dist/runtime/utils/index.mjs +1 -0
  146. package/dist/runtime/utils/tv.d.ts +1 -0
  147. package/dist/runtime/utils/tv.js +4 -0
  148. package/dist/runtime/utils/tv.mjs +4 -0
  149. package/package.json +1 -1
@@ -1,27 +1,37 @@
1
1
  <script setup>
2
2
  import { ref, computed, watch } from "vue";
3
3
  import {} from "../../../types";
4
- import { tv } from "tailwind-variants";
4
+ import { tv } from "../../../utils/tv";
5
+ import { useRC } from "../../../composables/useRC";
5
6
  import { useI18n } from "vue-i18n";
6
- const { t } = useI18n();
7
- const { isOpen, loading, definitions } = defineProps({
7
+ const { isOpen, loading, definitions, rc: rcProp } = defineProps({
8
8
  isOpen: { type: Boolean, required: true },
9
9
  definitions: { type: Object, required: true },
10
- loading: { type: Boolean, required: false }
10
+ loading: { type: Boolean, required: false },
11
+ rc: { type: Object, required: false }
11
12
  });
12
- const emits = defineEmits(["close", "confirm"]);
13
+ const emit = defineEmits(["close", "confirm"]);
14
+ const slots = defineSlots();
15
+ const { rc } = useRC("CreatePageModal", rcProp);
13
16
  const createPageModalStyles = tv({
14
17
  slots: {
15
- base: "flex flex-col gap-6",
16
- group: "border border-neutral-200 rounded-lg p-4 bg-white shadow-sm",
17
- groupTitle: "text-lg font-bold text-neutral-900 mb-4",
18
- field: "flex flex-col gap-1.5",
19
- label: "text-sm font-medium text-neutral-700",
20
- input: "w-full px-3 py-2 rounded-md border border-neutral-300 focus:ring-2 focus:ring-primary-500 transition-all outline-hidden",
21
- select: "w-full px-3 py-2 rounded-md border border-neutral-300 bg-white"
18
+ header: "flex items-center justify-between",
19
+ headerTitle: "text-base font-semibold leading-6",
20
+ closeButton: "-my-1",
21
+ body: "space-y-4 py-4",
22
+ field: "w-full",
23
+ footer: "flex justify-end gap-2"
22
24
  }
23
25
  });
24
- const styles = createPageModalStyles();
26
+ const {
27
+ header: headerClass,
28
+ headerTitle,
29
+ closeButton,
30
+ body,
31
+ field,
32
+ footer
33
+ } = createPageModalStyles();
34
+ const { t } = useI18n();
25
35
  const selectedType = ref("");
26
36
  const title = ref("");
27
37
  const slug = ref("");
@@ -44,8 +54,8 @@ const handleConfirm = () => {
44
54
  const properties = {};
45
55
  Object.entries(definition.properties).forEach(([groupKey, group]) => {
46
56
  properties[groupKey] = {};
47
- Object.entries(group.fields).forEach(([fieldKey, field]) => {
48
- properties[groupKey][fieldKey] = field.value;
57
+ Object.entries(group.fields).forEach(([fieldKey, field2]) => {
58
+ properties[groupKey][fieldKey] = field2.value;
49
59
  });
50
60
  });
51
61
  const newPage = {
@@ -55,29 +65,29 @@ const handleConfirm = () => {
55
65
  properties,
56
66
  blocks: definition.initialBlocks ? definition.initialBlocks() : []
57
67
  };
58
- emits("confirm", newPage);
68
+ emit("confirm", newPage);
59
69
  };
60
70
  </script>
61
71
 
62
72
  <template>
63
- <UModal :model-value="isOpen" @update:model-value="emits('close')">
73
+ <UModal :model-value="isOpen" @update:model-value="emit('close')">
64
74
  <slot/>
65
75
  <template #content>
66
76
  <UCard>
67
77
  <template #header>
68
- <div class="flex items-center justify-between">
69
- <h3 class="text-base font-semibold leading-6">Create New Page</h3>
70
- <UButton color="neutral" variant="ghost" icon="i-heroicons-x-mark-20-solid" class="-my-1" @click="emits('close')" />
78
+ <div :class="headerClass({ class: rc.header })">
79
+ <h3 :class="headerTitle({ class: rc.headerTitle })">Create New Page</h3>
80
+ <UButton color="neutral" variant="ghost" icon="i-heroicons-x-mark-20-solid" :class="closeButton({ class: rc.closeButton })" @click="emit('close')" />
71
81
  </div>
72
82
  </template>
73
83
 
74
- <div class="space-y-4 py-4">
84
+ <div :class="body({ class: rc.body })">
75
85
  <UFormField label="Page Template" required>
76
86
  <USelect
77
87
  v-model="selectedType"
78
88
  :items="typeOptions"
79
89
  :placeholder="t('editor.template_placeholder', 'Select a template...')"
80
- class="w-full"
90
+ :class="field({ class: rc.field })"
81
91
  />
82
92
  </UFormField>
83
93
 
@@ -91,8 +101,8 @@ const handleConfirm = () => {
91
101
  </div>
92
102
 
93
103
  <template #footer>
94
- <div class="flex justify-end gap-2">
95
- <UButton color="neutral" variant="ghost" label="Cancel" @click="emits('close')" />
104
+ <div :class="footer({ class: rc.footer })">
105
+ <UButton color="neutral" variant="ghost" label="Cancel" @click="emit('close')" />
96
106
  <UButton
97
107
  color="primary"
98
108
  label="Create & Edit"
@@ -3,15 +3,23 @@ export interface CreatePageModalProps {
3
3
  isOpen: boolean;
4
4
  definitions: Record<string, PageDefinition>;
5
5
  loading?: boolean;
6
+ rc?: {
7
+ header?: string;
8
+ headerTitle?: string;
9
+ closeButton?: string;
10
+ body?: string;
11
+ field?: string;
12
+ footer?: string;
13
+ };
6
14
  }
7
15
  export interface CreatePageModalEmits {
8
16
  close: [];
9
17
  confirm: [page: Partial<Page>];
10
18
  }
11
- declare var __VLS_10: {};
12
- type __VLS_Slots = {} & {
13
- default?: (props: typeof __VLS_10) => any;
14
- };
19
+ export interface CreatePageModalSlots {
20
+ default: (props: {}) => any;
21
+ }
22
+ type __VLS_Slots = CreatePageModalSlots;
15
23
  declare const __VLS_base: import("vue").DefineComponent<CreatePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
24
  close: () => any;
17
25
  confirm: (page: Partial<{
@@ -2,16 +2,23 @@ export interface DeletePageModalProps {
2
2
  isOpen: boolean;
3
3
  loading?: boolean;
4
4
  pageTitle: string;
5
+ rc?: {
6
+ header?: string;
7
+ headerTitle?: string;
8
+ closeButton?: string;
9
+ body?: string;
10
+ footer?: string;
11
+ };
5
12
  }
6
13
  export interface DeletePageModalEmits {
7
- (e: 'close'): void;
8
- (e: 'confirm'): void;
14
+ close: [];
15
+ confirm: [];
9
16
  }
10
- declare var __VLS_10: {};
11
- type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_10) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<DeletePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ export interface DeletePageModalSlots {
18
+ default: (props: {}) => any;
19
+ }
20
+ type __VLS_Slots = DeletePageModalSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<DeletePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
22
  close: () => any;
16
23
  confirm: () => any;
17
24
  }, string, import("vue").PublicProps, Readonly<DeletePageModalProps> & Readonly<{
@@ -1,12 +1,33 @@
1
1
  <script setup>
2
2
  import { ref, watch } from "vue";
3
3
  import { useI18n } from "vue-i18n";
4
- const { isOpen, loading, pageTitle } = defineProps({
4
+ import { tv } from "../../../utils/tv";
5
+ import { useRC } from "../../../composables/useRC";
6
+ const { isOpen, loading, pageTitle, rc: rcProp } = defineProps({
5
7
  isOpen: { type: Boolean, required: true },
6
8
  loading: { type: Boolean, required: false },
7
- pageTitle: { type: String, required: true }
9
+ pageTitle: { type: String, required: true },
10
+ rc: { type: Object, required: false }
8
11
  });
9
12
  const emits = defineEmits(["close", "confirm"]);
13
+ const slots = defineSlots();
14
+ const { rc } = useRC("DeletePageModal", rcProp);
15
+ const deletePageModalStyles = tv({
16
+ slots: {
17
+ header: "flex items-center justify-between",
18
+ headerTitle: "text-base font-semibold leading-6 text-error-600",
19
+ closeButton: "-my-1",
20
+ body: "text-sm text-neutral-600 dark:text-neutral-400",
21
+ footer: "flex justify-end gap-2"
22
+ }
23
+ });
24
+ const {
25
+ header: headerClass,
26
+ headerTitle,
27
+ closeButton,
28
+ body,
29
+ footer
30
+ } = deletePageModalStyles();
10
31
  const { t } = useI18n();
11
32
  const confirmationInput = ref("");
12
33
  const CONFIRMATION_TEXT = "DELETE";
@@ -26,21 +47,21 @@ const handleConfirm = () => {
26
47
  <template #content>
27
48
  <UCard :ui="{ body: 'space-y-4' }">
28
49
  <template #header>
29
- <div class="flex items-center justify-between">
30
- <h3 class="text-base font-semibold leading-6 text-error-600">
50
+ <div :class="headerClass({ class: rc.header })">
51
+ <h3 :class="headerTitle({ class: rc.headerTitle })">
31
52
  {{ t("editor.delete_page_title", "Delete Page") }}
32
53
  </h3>
33
54
  <UButton
34
55
  color="neutral"
35
56
  variant="ghost"
36
57
  icon="lucide:x"
37
- class="-my-1"
58
+ :class="closeButton({ class: rc.closeButton })"
38
59
  @click="emits('close')"
39
60
  />
40
61
  </div>
41
62
  </template>
42
63
 
43
- <div class="text-sm text-neutral-600 dark:text-neutral-400">
64
+ <div :class="body({ class: rc.body })">
44
65
  <p>
45
66
  Are you sure you want to delete <strong>{{ pageTitle }}</strong>?
46
67
  This action is permanent and cannot be undone.
@@ -61,7 +82,7 @@ const handleConfirm = () => {
61
82
  </UFormField>
62
83
 
63
84
  <template #footer>
64
- <div class="flex justify-end gap-2">
85
+ <div :class="footer({ class: rc.footer })">
65
86
  <UButton
66
87
  color="neutral"
67
88
  variant="ghost"
@@ -2,16 +2,23 @@ export interface DeletePageModalProps {
2
2
  isOpen: boolean;
3
3
  loading?: boolean;
4
4
  pageTitle: string;
5
+ rc?: {
6
+ header?: string;
7
+ headerTitle?: string;
8
+ closeButton?: string;
9
+ body?: string;
10
+ footer?: string;
11
+ };
5
12
  }
6
13
  export interface DeletePageModalEmits {
7
- (e: 'close'): void;
8
- (e: 'confirm'): void;
14
+ close: [];
15
+ confirm: [];
9
16
  }
10
- declare var __VLS_10: {};
11
- type __VLS_Slots = {} & {
12
- default?: (props: typeof __VLS_10) => any;
13
- };
14
- declare const __VLS_base: import("vue").DefineComponent<DeletePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
17
+ export interface DeletePageModalSlots {
18
+ default: (props: {}) => any;
19
+ }
20
+ type __VLS_Slots = DeletePageModalSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<DeletePageModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
22
  close: () => any;
16
23
  confirm: () => any;
17
24
  }, string, import("vue").PublicProps, Readonly<DeletePageModalProps> & Readonly<{
@@ -1,11 +1,31 @@
1
- type __VLS_Props = {
1
+ export interface ColorSwatchProps {
2
2
  name?: string;
3
3
  hex?: string;
4
4
  rgb?: string;
5
5
  hsl?: string;
6
6
  oklch?: string;
7
7
  cmyk?: string;
8
- };
9
- declare const __VLS_export: 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>;
8
+ rc?: {
9
+ card?: string;
10
+ title?: string;
11
+ content?: string;
12
+ preview?: string;
13
+ details?: string;
14
+ buttonGroup?: string;
15
+ button?: string;
16
+ };
17
+ }
18
+ export interface ColorSwatchEmits {
19
+ }
20
+ export interface ColorSwatchSlots {
21
+ }
22
+ type __VLS_Slots = ColorSwatchSlots;
23
+ declare const __VLS_base: import("vue").DefineComponent<ColorSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
25
  declare const _default: typeof __VLS_export;
11
26
  export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -2,16 +2,42 @@
2
2
  import { computed } from "vue";
3
3
  import { useClipboard } from "@vueuse/core";
4
4
  import { useToast } from "@nuxt/ui/composables";
5
- const { copy } = useClipboard();
6
- const toast = useToast();
7
- const { name, hex, rgb, hsl, oklch, cmyk } = defineProps({
5
+ import { tv } from "../../utils/tv";
6
+ import { useRC } from "../../composables/useRC";
7
+ const { name, hex, rgb, hsl, oklch, cmyk, rc: rcProp } = defineProps({
8
8
  name: { type: String, required: false },
9
9
  hex: { type: String, required: false },
10
10
  rgb: { type: String, required: false },
11
11
  hsl: { type: String, required: false },
12
12
  oklch: { type: String, required: false },
13
- cmyk: { type: String, required: false }
13
+ cmyk: { type: String, required: false },
14
+ rc: { type: Object, required: false }
15
+ });
16
+ const emit = defineEmits([]);
17
+ const slots = defineSlots();
18
+ const { rc } = useRC("ColorSwatch", rcProp);
19
+ const colorSwatchStyles = tv({
20
+ slots: {
21
+ card: "w-full rounded-none xl:w-fit",
22
+ title: "text-lg font-bold",
23
+ content: "flex flex-col items-center gap-sm xl:flex-row xl:items-start",
24
+ preview: "flex aspect-square size-48 p-sm",
25
+ details: "flex flex-col justify-end gap-xs text-xs",
26
+ buttonGroup: "flex w-full flex-col justify-center gap-sm",
27
+ button: "w-full xl:w-36"
28
+ }
14
29
  });
30
+ const {
31
+ card,
32
+ title: titleStyle,
33
+ content,
34
+ preview,
35
+ details,
36
+ buttonGroup,
37
+ button
38
+ } = colorSwatchStyles();
39
+ const { copy } = useClipboard();
40
+ const toast = useToast();
15
41
  const copyToClipboard = async (text) => {
16
42
  try {
17
43
  await copy(`${text}`);
@@ -42,13 +68,13 @@ const color = computed(() => {
42
68
  </script>
43
69
 
44
70
  <template>
45
- <UCard variant="subtle" class="w-full rounded-none xl:w-fit">
71
+ <UCard variant="subtle" :class="card({ class: rc.card })">
46
72
  <template #header v-if="name">
47
- <h3 class="text-lg font-bold">{{ name }}</h3>
73
+ <h3 :class="titleStyle({ class: rc.title })">{{ name }}</h3>
48
74
  </template>
49
- <div class="flex flex-col items-center gap-sm xl:flex-row xl:items-start">
50
- <div class="flex aspect-square size-48 p-sm" :style="{ backgroundColor: color }">
51
- <div class="flex flex-col justify-end gap-xs text-xs">
75
+ <div :class="content({ class: rc.content })">
76
+ <div :class="preview({ class: rc.preview })" :style="{ backgroundColor: color }">
77
+ <div :class="details({ class: rc.details })">
52
78
  <span v-if="name" class="text-sm">{{ formatColor(name) }}</span>
53
79
  <span v-if="hex">HEX {{ formatColor(hex) }}</span>
54
80
  <span v-if="rgb">{{ formatColor(rgb) }}</span>
@@ -57,14 +83,14 @@ const color = computed(() => {
57
83
  <span v-if="cmyk">{{ formatColor(cmyk) }}</span>
58
84
  </div>
59
85
  </div>
60
- <div class="flex w-full flex-col justify-center gap-sm">
86
+ <div :class="buttonGroup({ class: rc.buttonGroup })">
61
87
  <UButton
62
88
  v-if="hex"
63
89
  variant="outline"
64
90
  size="sm"
65
91
  icon="lucide:copy"
66
92
  label="Copy HEX"
67
- class="w-full xl:w-36"
93
+ :class="button({ class: rc.button })"
68
94
  @click="copyToClipboard(hex)"
69
95
  />
70
96
  <UButton
@@ -73,7 +99,7 @@ const color = computed(() => {
73
99
  size="sm"
74
100
  icon="lucide:copy"
75
101
  label="Copy RGB"
76
- class="w-full xl:w-36"
102
+ :class="button({ class: rc.button })"
77
103
  @click="copyToClipboard(rgb)"
78
104
  />
79
105
  <UButton
@@ -82,7 +108,7 @@ const color = computed(() => {
82
108
  size="sm"
83
109
  icon="lucide:copy"
84
110
  label="Copy HSL"
85
- class="w-full xl:w-36"
111
+ :class="button({ class: rc.button })"
86
112
  @click="copyToClipboard(hsl)"
87
113
  />
88
114
  <UButton
@@ -91,7 +117,7 @@ const color = computed(() => {
91
117
  size="sm"
92
118
  icon="lucide:copy"
93
119
  label="Copy OKLCH"
94
- class="w-full xl:w-36"
120
+ :class="button({ class: rc.button })"
95
121
  @click="copyToClipboard(oklch)"
96
122
  />
97
123
  <UButton
@@ -100,7 +126,7 @@ const color = computed(() => {
100
126
  size="sm"
101
127
  icon="lucide:copy"
102
128
  label="Copy CMYK"
103
- class="w-full xl:w-36"
129
+ :class="button({ class: rc.button })"
104
130
  @click="copyToClipboard(cmyk)"
105
131
  />
106
132
  </div>
@@ -1,11 +1,31 @@
1
- type __VLS_Props = {
1
+ export interface ColorSwatchProps {
2
2
  name?: string;
3
3
  hex?: string;
4
4
  rgb?: string;
5
5
  hsl?: string;
6
6
  oklch?: string;
7
7
  cmyk?: string;
8
- };
9
- declare const __VLS_export: 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>;
8
+ rc?: {
9
+ card?: string;
10
+ title?: string;
11
+ content?: string;
12
+ preview?: string;
13
+ details?: string;
14
+ buttonGroup?: string;
15
+ button?: string;
16
+ };
17
+ }
18
+ export interface ColorSwatchEmits {
19
+ }
20
+ export interface ColorSwatchSlots {
21
+ }
22
+ type __VLS_Slots = ColorSwatchSlots;
23
+ declare const __VLS_base: import("vue").DefineComponent<ColorSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ColorSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
10
25
  declare const _default: typeof __VLS_export;
11
26
  export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -1,10 +1,29 @@
1
- type __VLS_Props = {
1
+ export interface FontSwatchProps {
2
2
  name?: string;
3
3
  jpg?: string;
4
4
  png?: string;
5
5
  webp?: string;
6
6
  svg?: string;
7
- };
8
- declare const __VLS_export: 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>;
7
+ rc?: {
8
+ card?: string;
9
+ title?: string;
10
+ content?: string;
11
+ actions?: string;
12
+ buttonGroup?: string;
13
+ button?: string;
14
+ };
15
+ }
16
+ export interface FontSwatchEmits {
17
+ }
18
+ export interface FontSwatchSlots {
19
+ }
20
+ type __VLS_Slots = FontSwatchSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<FontSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FontSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
23
  declare const _default: typeof __VLS_export;
10
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -1,12 +1,29 @@
1
1
  <script setup>
2
- import { computed } from "#imports";
3
- const { name, jpg, png, webp, svg } = defineProps({
2
+ import { computed } from "vue";
3
+ import { tv } from "../../utils/tv";
4
+ import { useRC } from "../../composables/useRC";
5
+ const { name, jpg, png, webp, svg, rc: rcProp } = defineProps({
4
6
  name: { type: String, required: false },
5
7
  jpg: { type: String, required: false },
6
8
  png: { type: String, required: false },
7
9
  webp: { type: String, required: false },
8
- svg: { type: String, required: false }
10
+ svg: { type: String, required: false },
11
+ rc: { type: Object, required: false }
9
12
  });
13
+ const emit = defineEmits([]);
14
+ const slots = defineSlots();
15
+ const { rc } = useRC("FontSwatch", rcProp);
16
+ const fontSwatchStyles = tv({
17
+ slots: {
18
+ card: "w-full rounded-none xl:w-fit",
19
+ title: "text-lg font-bold",
20
+ content: "flex flex-col gap-sm",
21
+ actions: "flex flex-col items-center gap-sm xl:flex-row xl:items-start",
22
+ buttonGroup: "flex w-full flex-col justify-center gap-sm",
23
+ button: "w-full xl:w-36"
24
+ }
25
+ });
26
+ const { card, title: titleStyle, content, actions, buttonGroup, button } = fontSwatchStyles();
10
27
  const image = computed(() => {
11
28
  if (webp) return webp;
12
29
  if (png) return png;
@@ -17,12 +34,12 @@ const image = computed(() => {
17
34
  </script>
18
35
 
19
36
  <template>
20
- <UCard variant="subtle" class="w-full rounded-none xl:w-fit">
37
+ <UCard variant="subtle" :class="card({ class: rc.card })">
21
38
  <template #header v-if="name">
22
- <h3 class="text-lg font-bold">{{ name }}</h3>
39
+ <h3 :class="titleStyle({ class: rc.title })">{{ name }}</h3>
23
40
  <span></span>
24
41
  </template>
25
- <div class="flex flex-col gap-sm">
42
+ <div :class="content({ class: rc.content })">
26
43
  <h1>H1</h1>
27
44
  <p>{{}}</p>
28
45
  </div>
@@ -31,15 +48,15 @@ const image = computed(() => {
31
48
  <p>a b c d e f g h i j k l m n o p q r s t u v w x y z</p>
32
49
  <p>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</p>
33
50
  <p></p>
34
- <div class="flex flex-col items-center gap-sm xl:flex-row xl:items-start">
35
- <div class="flex w-full flex-col justify-center gap-sm">
51
+ <div :class="actions({ class: rc.actions })">
52
+ <div :class="buttonGroup({ class: rc.buttonGroup })">
36
53
  <UButton
37
54
  v-if="jpg"
38
55
  variant="outline"
39
56
  size="sm"
40
57
  icon="lucide:download"
41
58
  label="Download JPG"
42
- class="w-full xl:w-36"
59
+ :class="button({ class: rc.button })"
43
60
  :to="jpg"
44
61
  target="_blank"
45
62
  />
@@ -49,7 +66,7 @@ const image = computed(() => {
49
66
  size="sm"
50
67
  icon="lucide:download"
51
68
  label="Download PNG"
52
- class="w-full xl:w-36"
69
+ :class="button({ class: rc.button })"
53
70
  :to="png"
54
71
  target="_blank"
55
72
  />
@@ -59,7 +76,7 @@ const image = computed(() => {
59
76
  size="sm"
60
77
  icon="lucide:download"
61
78
  label="Download WEBP"
62
- class="w-full xl:w-36"
79
+ :class="button({ class: rc.button })"
63
80
  :to="webp"
64
81
  target="_blank"
65
82
  />
@@ -69,7 +86,7 @@ const image = computed(() => {
69
86
  size="sm"
70
87
  icon="lucide:download"
71
88
  label="Download SVG"
72
- class="w-full xl:w-36"
89
+ :class="button({ class: rc.button })"
73
90
  :to="svg"
74
91
  target="_blank"
75
92
  />
@@ -1,10 +1,29 @@
1
- type __VLS_Props = {
1
+ export interface FontSwatchProps {
2
2
  name?: string;
3
3
  jpg?: string;
4
4
  png?: string;
5
5
  webp?: string;
6
6
  svg?: string;
7
- };
8
- declare const __VLS_export: 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>;
7
+ rc?: {
8
+ card?: string;
9
+ title?: string;
10
+ content?: string;
11
+ actions?: string;
12
+ buttonGroup?: string;
13
+ button?: string;
14
+ };
15
+ }
16
+ export interface FontSwatchEmits {
17
+ }
18
+ export interface FontSwatchSlots {
19
+ }
20
+ type __VLS_Slots = FontSwatchSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<FontSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FontSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
23
  declare const _default: typeof __VLS_export;
10
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -1,10 +1,29 @@
1
- type __VLS_Props = {
1
+ export interface ImageSwatchProps {
2
2
  name?: string;
3
3
  jpg?: string;
4
4
  png?: string;
5
5
  webp?: string;
6
6
  svg?: string;
7
- };
8
- declare const __VLS_export: 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>;
7
+ rc?: {
8
+ card?: string;
9
+ title?: string;
10
+ content?: string;
11
+ image?: string;
12
+ buttonGroup?: string;
13
+ button?: string;
14
+ };
15
+ }
16
+ export interface ImageSwatchEmits {
17
+ }
18
+ export interface ImageSwatchSlots {
19
+ }
20
+ type __VLS_Slots = ImageSwatchSlots;
21
+ declare const __VLS_base: import("vue").DefineComponent<ImageSwatchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageSwatchProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
9
23
  declare const _default: typeof __VLS_export;
10
24
  export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };