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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/app/Footer.d.vue.ts +18 -9
- package/dist/runtime/components/app/Footer.vue +25 -12
- package/dist/runtime/components/app/Footer.vue.d.ts +18 -9
- package/dist/runtime/components/app/Header.d.vue.ts +24 -15
- package/dist/runtime/components/app/Header.vue +18 -11
- package/dist/runtime/components/app/Header.vue.d.ts +24 -15
- package/dist/runtime/components/app/HeaderLayer.d.vue.ts +13 -7
- package/dist/runtime/components/app/HeaderLayer.vue +21 -9
- package/dist/runtime/components/app/HeaderLayer.vue.d.ts +13 -7
- package/dist/runtime/components/app/Image.d.vue.ts +18 -4
- package/dist/runtime/components/app/Image.vue +34 -16
- package/dist/runtime/components/app/Image.vue.d.ts +18 -4
- package/dist/runtime/components/app/Logo.d.vue.ts +17 -3
- package/dist/runtime/components/app/Logo.vue +16 -4
- package/dist/runtime/components/app/Logo.vue.d.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.d.vue.ts +17 -3
- package/dist/runtime/components/app/NewsletterSignup.vue +16 -3
- package/dist/runtime/components/app/NewsletterSignup.vue.d.ts +17 -3
- package/dist/runtime/components/app/ScrollToTop.d.vue.ts +20 -5
- package/dist/runtime/components/app/ScrollToTop.vue +31 -15
- package/dist/runtime/components/app/ScrollToTop.vue.d.ts +20 -5
- package/dist/runtime/components/blocks/Block.d.vue.ts +13 -7
- package/dist/runtime/components/blocks/Block.vue +20 -7
- package/dist/runtime/components/blocks/Block.vue.d.ts +13 -7
- package/dist/runtime/components/blocks/BlockEditRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockEditRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/BlockEditor.d.vue.ts +13 -4
- package/dist/runtime/components/blocks/BlockEditor.vue +11 -35
- package/dist/runtime/components/blocks/BlockEditor.vue.d.ts +13 -4
- package/dist/runtime/components/blocks/BlockViewRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue +15 -3
- package/dist/runtime/components/blocks/BlockViewRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/TextRenderer.vue +19 -5
- package/dist/runtime/components/blocks/TextRenderer.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue +18 -4
- package/dist/runtime/components/blocks/editor/CalloutBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue +14 -2
- package/dist/runtime/components/blocks/editor/CardBlockEditor.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.d.vue.ts +27 -3
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue +25 -9
- package/dist/runtime/components/blocks/editor/ImageBlockEditor.vue.d.ts +27 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue +21 -13
- package/dist/runtime/components/blocks/editor/ParagraphBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.d.vue.ts +19 -3
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue +20 -6
- package/dist/runtime/components/blocks/editor/SectionBlockEditor.vue.d.ts +19 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.d.vue.ts +17 -3
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue +16 -4
- package/dist/runtime/components/blocks/editor/TestBlockEditor.vue.d.ts +17 -3
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/CalloutBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue +14 -2
- package/dist/runtime/components/blocks/renderer/CardBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.d.vue.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/ImageBlockRenderer.vue.d.ts +19 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/ParagraphBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue +18 -4
- package/dist/runtime/components/blocks/renderer/SectionBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.d.vue.ts +17 -1
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue +16 -2
- package/dist/runtime/components/blocks/renderer/TestBlockRenderer.vue.d.ts +17 -1
- package/dist/runtime/components/cards/TeamCard.d.vue.ts +16 -7
- package/dist/runtime/components/cards/TeamCard.vue +29 -7
- package/dist/runtime/components/cards/TeamCard.vue.d.ts +16 -7
- package/dist/runtime/components/content/Callout.d.vue.ts +13 -7
- package/dist/runtime/components/content/Callout.vue +19 -6
- package/dist/runtime/components/content/Callout.vue.d.ts +13 -7
- package/dist/runtime/components/content/Section.d.vue.ts +19 -13
- package/dist/runtime/components/content/Section.vue +93 -87
- package/dist/runtime/components/content/Section.vue.d.ts +19 -13
- package/dist/runtime/components/content/Test.d.vue.ts +12 -7
- package/dist/runtime/components/content/Test.vue +15 -3
- package/dist/runtime/components/content/Test.vue.d.ts +12 -7
- package/dist/runtime/components/nodes/LinkNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue +17 -3
- package/dist/runtime/components/nodes/LinkNode.vue.d.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.d.vue.ts +17 -3
- package/dist/runtime/components/nodes/TextNode.vue +15 -3
- package/dist/runtime/components/nodes/TextNode.vue.d.ts +17 -3
- package/dist/runtime/components/page/PageEditor.d.vue.ts +35 -5
- package/dist/runtime/components/page/PageEditor.vue +80 -31
- package/dist/runtime/components/page/PageEditor.vue.d.ts +35 -5
- package/dist/runtime/components/page/PageMention.d.vue.ts +19 -2
- package/dist/runtime/components/page/PageMention.vue +21 -6
- package/dist/runtime/components/page/PageMention.vue.d.ts +19 -2
- package/dist/runtime/components/page/PagePropertiesEditor.d.vue.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesEditor.vue +113 -76
- package/dist/runtime/components/page/PagePropertiesEditor.vue.d.ts +30 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.d.vue.ts +38 -2
- package/dist/runtime/components/page/PagePropertiesRenderer.vue +80 -29
- package/dist/runtime/components/page/PagePropertiesRenderer.vue.d.ts +38 -2
- package/dist/runtime/components/page/PageRenderer.d.vue.ts +26 -2
- package/dist/runtime/components/page/PageRenderer.vue +56 -18
- package/dist/runtime/components/page/PageRenderer.vue.d.ts +26 -2
- package/dist/runtime/components/page/PageSurround.d.vue.ts +25 -3
- package/dist/runtime/components/page/PageSurround.vue +61 -26
- package/dist/runtime/components/page/PageSurround.vue.d.ts +25 -3
- package/dist/runtime/components/page/PageTOC.d.vue.ts +15 -7
- package/dist/runtime/components/page/PageTOC.vue +23 -9
- package/dist/runtime/components/page/PageTOC.vue.d.ts +15 -7
- package/dist/runtime/components/page/modals/CreatePageModal.d.vue.ts +12 -4
- package/dist/runtime/components/page/modals/CreatePageModal.vue +34 -24
- package/dist/runtime/components/page/modals/CreatePageModal.vue.d.ts +12 -4
- package/dist/runtime/components/page/modals/DeletePageModal.d.vue.ts +14 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue +28 -7
- package/dist/runtime/components/page/modals/DeletePageModal.vue.d.ts +14 -7
- package/dist/runtime/components/swatches/ColorSwatch.d.vue.ts +23 -3
- package/dist/runtime/components/swatches/ColorSwatch.vue +41 -15
- package/dist/runtime/components/swatches/ColorSwatch.vue.d.ts +23 -3
- package/dist/runtime/components/swatches/FontSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/FontSwatch.vue +29 -12
- package/dist/runtime/components/swatches/FontSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.d.vue.ts +22 -3
- package/dist/runtime/components/swatches/ImageSwatch.vue +29 -12
- package/dist/runtime/components/swatches/ImageSwatch.vue.d.ts +22 -3
- package/dist/runtime/components/utilities/Placeholder.d.vue.ts +13 -5
- package/dist/runtime/components/utilities/Placeholder.vue +19 -5
- package/dist/runtime/components/utilities/Placeholder.vue.d.ts +13 -5
- package/dist/runtime/composables/index.d.ts +1 -0
- package/dist/runtime/composables/index.js +1 -0
- package/dist/runtime/composables/index.mjs +1 -0
- package/dist/runtime/composables/useRC.d.ts +3 -0
- package/dist/runtime/composables/useRC.js +14 -0
- package/dist/runtime/composables/useRC.mjs +14 -0
- package/dist/runtime/types/app.config.d.ts +6 -0
- package/dist/runtime/types/schemas.d.ts +2 -2
- package/dist/runtime/types/tv.d.ts +66 -0
- package/dist/runtime/types/tv.js +0 -0
- package/dist/runtime/types/tv.mjs +0 -0
- package/dist/runtime/utils/index.d.ts +1 -0
- package/dist/runtime/utils/index.js +1 -0
- package/dist/runtime/utils/index.mjs +1 -0
- package/dist/runtime/utils/tv.d.ts +1 -0
- package/dist/runtime/utils/tv.js +4 -0
- package/dist/runtime/utils/tv.mjs +4 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { readdirSync } from 'node:fs';
|
|
|
4
4
|
import { basename } from 'node:path';
|
|
5
5
|
|
|
6
6
|
const name = "rimelight-components";
|
|
7
|
-
const version = "2.1.
|
|
7
|
+
const version = "2.1.19";
|
|
8
8
|
const homepage = "https://rimelight.com/tools/rimelight-components";
|
|
9
9
|
|
|
10
10
|
const defaultOptions = {
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
1
|
+
export interface FooterProps {
|
|
2
|
+
rc?: {
|
|
3
|
+
root?: string;
|
|
4
|
+
container?: string;
|
|
5
|
+
left?: string;
|
|
6
|
+
center?: string;
|
|
7
|
+
right?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface FooterEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface FooterSlots {
|
|
13
|
+
left: (props: {}) => any;
|
|
14
|
+
center: (props: {}) => any;
|
|
15
|
+
right: (props: {}) => any;
|
|
16
|
+
}
|
|
17
|
+
type __VLS_Slots = FooterSlots;
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<FooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
20
|
declare const _default: typeof __VLS_export;
|
|
12
21
|
export default _default;
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
<script setup
|
|
1
|
+
<script setup>
|
|
2
|
+
import { tv } from "../../utils/tv";
|
|
3
|
+
import { useRC } from "../../composables/useRC";
|
|
4
|
+
const { rc: rcProp } = defineProps({
|
|
5
|
+
rc: { type: Object, required: false }
|
|
6
|
+
});
|
|
7
|
+
const emit = defineEmits([]);
|
|
8
|
+
const slots = defineSlots();
|
|
9
|
+
const { rc } = useRC("Footer", rcProp);
|
|
10
|
+
const footerStyles = tv({
|
|
11
|
+
slots: {
|
|
12
|
+
root: "py-8 lg:py-12",
|
|
13
|
+
container: "flex flex-col justify-between gap-xl lg:flex-row",
|
|
14
|
+
left: "order-last flex flex-col items-center justify-between gap-xl lg:order-1 lg:items-start",
|
|
15
|
+
center: "flex flex-col items-start lg:order-2",
|
|
16
|
+
right: "order-first flex flex-col items-center justify-between gap-xl lg:order-3 lg:flex-1 lg:items-end"
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const { root, container, left, center, right } = footerStyles();
|
|
20
|
+
</script>
|
|
2
21
|
|
|
3
22
|
<template>
|
|
4
|
-
<footer class="
|
|
5
|
-
<UContainer class="
|
|
6
|
-
<div
|
|
7
|
-
class="order-last flex flex-col items-center justify-between gap-xl lg:order-1 lg:items-start"
|
|
8
|
-
>
|
|
23
|
+
<footer :class="root({ class: rc.root })">
|
|
24
|
+
<UContainer :class="container({ class: rc.container })">
|
|
25
|
+
<div :class="left({ class: rc.left })">
|
|
9
26
|
<slot name="left" />
|
|
10
27
|
</div>
|
|
11
|
-
<div class="
|
|
28
|
+
<div :class="center({ class: rc.center })">
|
|
12
29
|
<slot name="center" />
|
|
13
30
|
</div>
|
|
14
|
-
<div
|
|
15
|
-
class="order-first flex flex-col items-center justify-between gap-xl lg:order-3 lg:flex-1 lg:items-end"
|
|
16
|
-
>
|
|
31
|
+
<div :class="right({ class: rc.right })">
|
|
17
32
|
<slot name="right" />
|
|
18
33
|
</div>
|
|
19
34
|
</UContainer>
|
|
20
35
|
</footer>
|
|
21
36
|
</template>
|
|
22
|
-
|
|
23
|
-
<style scoped></style>
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
|
|
1
|
+
export interface FooterProps {
|
|
2
|
+
rc?: {
|
|
3
|
+
root?: string;
|
|
4
|
+
container?: string;
|
|
5
|
+
left?: string;
|
|
6
|
+
center?: string;
|
|
7
|
+
right?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface FooterEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface FooterSlots {
|
|
13
|
+
left: (props: {}) => any;
|
|
14
|
+
center: (props: {}) => any;
|
|
15
|
+
right: (props: {}) => any;
|
|
16
|
+
}
|
|
17
|
+
type __VLS_Slots = FooterSlots;
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<FooterProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<FooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
20
|
declare const _default: typeof __VLS_export;
|
|
12
21
|
export default _default;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
1
|
+
export interface HeaderProps {
|
|
2
|
+
rc?: {
|
|
3
|
+
root?: string;
|
|
4
|
+
container?: string;
|
|
5
|
+
left?: string;
|
|
6
|
+
center?: string;
|
|
7
|
+
right?: string;
|
|
8
|
+
collapsedLeft?: string;
|
|
9
|
+
collapsedCenter?: string;
|
|
10
|
+
collapsedRight?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface HeaderEmits {
|
|
14
|
+
}
|
|
15
|
+
export interface HeaderSlots {
|
|
16
|
+
left: (props: {}) => any;
|
|
17
|
+
center: (props: {}) => any;
|
|
18
|
+
right: (props: {}) => any;
|
|
19
|
+
"collapsed-left": (props: {}) => any;
|
|
20
|
+
"collapsed-center": (props: {}) => any;
|
|
21
|
+
"collapsed-right": (props: {}) => any;
|
|
22
|
+
}
|
|
23
|
+
type __VLS_Slots = HeaderSlots;
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
26
|
declare const _default: typeof __VLS_export;
|
|
18
27
|
export default _default;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { tv } from "
|
|
3
|
-
|
|
2
|
+
import { tv } from "../../utils/tv";
|
|
3
|
+
import { useRC } from "../../composables/useRC";
|
|
4
|
+
const { rc: rcProp } = defineProps({
|
|
5
|
+
rc: { type: Object, required: false }
|
|
6
|
+
});
|
|
7
|
+
const emit = defineEmits([]);
|
|
8
|
+
const slots = defineSlots();
|
|
9
|
+
const { rc } = useRC("Header", rcProp);
|
|
10
|
+
const headerStyles = tv({
|
|
4
11
|
slots: {
|
|
5
12
|
root: "h-(--ui-header-height)",
|
|
6
13
|
container: "h-full flex flex-row items-center p-sm",
|
|
@@ -21,18 +28,18 @@ const {
|
|
|
21
28
|
collapsedLeft,
|
|
22
29
|
collapsedCenter,
|
|
23
30
|
collapsedRight
|
|
24
|
-
} =
|
|
31
|
+
} = headerStyles();
|
|
25
32
|
</script>
|
|
26
33
|
|
|
27
34
|
<template>
|
|
28
|
-
<header :class="root()">
|
|
29
|
-
<UContainer :class="container()">
|
|
30
|
-
<div :class="left()"><slot name="left" /></div>
|
|
31
|
-
<div :class="center()"><slot name="center" /></div>
|
|
32
|
-
<div :class="right()"><slot name="right" /></div>
|
|
33
|
-
<div :class="collapsedLeft()"><slot name="collapsed-left" /></div>
|
|
34
|
-
<div :class="collapsedCenter()"><slot name="collapsed-center" /></div>
|
|
35
|
-
<div :class="collapsedRight()"><slot name="collapsed-right" /></div>
|
|
35
|
+
<header :class="root({ class: rc.root })">
|
|
36
|
+
<UContainer :class="container({ class: rc.container })">
|
|
37
|
+
<div :class="left({ class: rc.left })"><slot name="left" /></div>
|
|
38
|
+
<div :class="center({ class: rc.center })"><slot name="center" /></div>
|
|
39
|
+
<div :class="right({ class: rc.right })"><slot name="right" /></div>
|
|
40
|
+
<div :class="collapsedLeft({ class: rc.collapsedLeft })"><slot name="collapsed-left" /></div>
|
|
41
|
+
<div :class="collapsedCenter({ class: rc.collapsedCenter })"><slot name="collapsed-center" /></div>
|
|
42
|
+
<div :class="collapsedRight({ class: rc.collapsedRight })"><slot name="collapsed-right" /></div>
|
|
36
43
|
</UContainer>
|
|
37
44
|
</header>
|
|
38
45
|
</template>
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
1
|
+
export interface HeaderProps {
|
|
2
|
+
rc?: {
|
|
3
|
+
root?: string;
|
|
4
|
+
container?: string;
|
|
5
|
+
left?: string;
|
|
6
|
+
center?: string;
|
|
7
|
+
right?: string;
|
|
8
|
+
collapsedLeft?: string;
|
|
9
|
+
collapsedCenter?: string;
|
|
10
|
+
collapsedRight?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface HeaderEmits {
|
|
14
|
+
}
|
|
15
|
+
export interface HeaderSlots {
|
|
16
|
+
left: (props: {}) => any;
|
|
17
|
+
center: (props: {}) => any;
|
|
18
|
+
right: (props: {}) => any;
|
|
19
|
+
"collapsed-left": (props: {}) => any;
|
|
20
|
+
"collapsed-center": (props: {}) => any;
|
|
21
|
+
"collapsed-right": (props: {}) => any;
|
|
22
|
+
}
|
|
23
|
+
type __VLS_Slots = HeaderSlots;
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
25
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
26
|
declare const _default: typeof __VLS_export;
|
|
18
27
|
export default _default;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
export interface HeaderLayerProps {
|
|
2
2
|
id: string;
|
|
3
3
|
order?: number;
|
|
4
4
|
hideOnScroll?: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
5
|
+
rc?: {
|
|
6
|
+
root?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface HeaderLayerEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface HeaderLayerSlots {
|
|
13
|
+
default: (props: {}) => any;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Slots = HeaderLayerSlots;
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderLayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderLayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
18
|
declare const _default: typeof __VLS_export;
|
|
13
19
|
export default _default;
|
|
@@ -1,21 +1,33 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, onMounted, onUnmounted, watch, computed, nextTick } from "vue";
|
|
3
|
-
import { useHeaderStack } from "../../composables";
|
|
3
|
+
import { useHeaderStack, useRC } from "../../composables";
|
|
4
4
|
import { useWindowScroll } from "@vueuse/core";
|
|
5
|
-
|
|
5
|
+
import { tv } from "../../utils/tv";
|
|
6
|
+
const { id, order, hideOnScroll = false, rc: rcProp } = defineProps({
|
|
6
7
|
id: { type: String, required: true },
|
|
7
8
|
order: { type: Number, required: false },
|
|
8
|
-
hideOnScroll: { type: Boolean, required: false }
|
|
9
|
+
hideOnScroll: { type: Boolean, required: false },
|
|
10
|
+
rc: { type: Object, required: false }
|
|
9
11
|
});
|
|
12
|
+
const emit = defineEmits([]);
|
|
13
|
+
const slots = defineSlots();
|
|
14
|
+
const { rc } = useRC("HeaderLayer", rcProp);
|
|
15
|
+
const headerLayerStyles = tv({
|
|
16
|
+
slots: {
|
|
17
|
+
root: "fixed left-0 right-0 z-50 overflow-hidden transition-[top,height,opacity] duration-200 ease-in-out",
|
|
18
|
+
content: "w-full"
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
const { root, content } = headerLayerStyles();
|
|
10
22
|
const { registerHeader, unregisterHeader, getOffsetFor } = useHeaderStack();
|
|
11
23
|
const { y: scrollY } = useWindowScroll();
|
|
12
24
|
const contentRef = ref(null);
|
|
13
25
|
const isVisible = ref(true);
|
|
14
26
|
const lastScrollY = ref(0);
|
|
15
27
|
const naturalHeight = ref(0);
|
|
16
|
-
const topOffset = computed(() => getOffsetFor(
|
|
28
|
+
const topOffset = computed(() => getOffsetFor(id));
|
|
17
29
|
watch(scrollY, (current) => {
|
|
18
|
-
if (!
|
|
30
|
+
if (!hideOnScroll) return;
|
|
19
31
|
const diff = current - lastScrollY.value;
|
|
20
32
|
if (Math.abs(diff) < 10) return;
|
|
21
33
|
if (current <= 50) {
|
|
@@ -25,7 +37,7 @@ watch(scrollY, (current) => {
|
|
|
25
37
|
});
|
|
26
38
|
const updateStack = () => {
|
|
27
39
|
const heightToRegister = isVisible.value ? naturalHeight.value : 0;
|
|
28
|
-
registerHeader(
|
|
40
|
+
registerHeader(id, heightToRegister, order);
|
|
29
41
|
};
|
|
30
42
|
watch(isVisible, updateStack);
|
|
31
43
|
let observer = null;
|
|
@@ -49,14 +61,14 @@ onMounted(() => {
|
|
|
49
61
|
});
|
|
50
62
|
});
|
|
51
63
|
onUnmounted(() => {
|
|
52
|
-
unregisterHeader(
|
|
64
|
+
unregisterHeader(id);
|
|
53
65
|
observer?.disconnect();
|
|
54
66
|
});
|
|
55
67
|
</script>
|
|
56
68
|
|
|
57
69
|
<template>
|
|
58
70
|
<div
|
|
59
|
-
class="
|
|
71
|
+
:class="root({ class: rc.root })"
|
|
60
72
|
:style="{
|
|
61
73
|
top: `${topOffset}px`,
|
|
62
74
|
height: isVisible ? `${naturalHeight}px` : '0px',
|
|
@@ -64,7 +76,7 @@ onUnmounted(() => {
|
|
|
64
76
|
pointerEvents: isVisible ? 'auto' : 'none'
|
|
65
77
|
}"
|
|
66
78
|
>
|
|
67
|
-
<div ref="contentRef" class="
|
|
79
|
+
<div ref="contentRef" :class="content({ class: rc.content })">
|
|
68
80
|
<slot />
|
|
69
81
|
</div>
|
|
70
82
|
</div>
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
export interface HeaderLayerProps {
|
|
2
2
|
id: string;
|
|
3
3
|
order?: number;
|
|
4
4
|
hideOnScroll?: boolean;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
5
|
+
rc?: {
|
|
6
|
+
root?: string;
|
|
7
|
+
content?: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export interface HeaderLayerEmits {
|
|
11
|
+
}
|
|
12
|
+
export interface HeaderLayerSlots {
|
|
13
|
+
default: (props: {}) => any;
|
|
14
|
+
}
|
|
15
|
+
type __VLS_Slots = HeaderLayerSlots;
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<HeaderLayerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<HeaderLayerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
17
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
12
18
|
declare const _default: typeof __VLS_export;
|
|
13
19
|
export default _default;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ImageProps {
|
|
2
2
|
src: string;
|
|
3
3
|
alt?: string;
|
|
4
4
|
height?: string | number;
|
|
5
5
|
width?: string | number;
|
|
6
|
-
loading?:
|
|
7
|
-
fit?:
|
|
6
|
+
loading?: "lazy" | "eager";
|
|
7
|
+
fit?: "cover" | "contain" | "fill" | "inside" | "outside";
|
|
8
|
+
rc?: {
|
|
9
|
+
base?: string;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
|
-
|
|
12
|
+
export interface ImageEmits {
|
|
13
|
+
}
|
|
14
|
+
export interface ImageSlots {
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Slots = ImageSlots;
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<ImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
19
|
declare const _default: typeof __VLS_export;
|
|
11
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,18 +1,45 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, reactive, onMounted, useTemplateRef, watch, nextTick } from "vue";
|
|
3
|
-
import { tv } from "
|
|
4
|
-
import {
|
|
5
|
-
const {
|
|
3
|
+
import { tv } from "../../utils/tv";
|
|
4
|
+
import { useRC } from "../../composables/useRC";
|
|
5
|
+
const {
|
|
6
|
+
src,
|
|
7
|
+
alt = "Image",
|
|
8
|
+
height,
|
|
9
|
+
width,
|
|
10
|
+
loading = "lazy",
|
|
11
|
+
fit = "cover",
|
|
12
|
+
rc: rcProp
|
|
13
|
+
} = defineProps({
|
|
6
14
|
src: { type: String, required: true },
|
|
7
15
|
alt: { type: String, required: false },
|
|
8
16
|
height: { type: [String, Number], required: false },
|
|
9
17
|
width: { type: [String, Number], required: false },
|
|
10
18
|
loading: { type: String, required: false },
|
|
11
|
-
fit: { type: String, required: false }
|
|
19
|
+
fit: { type: String, required: false },
|
|
20
|
+
rc: { type: Object, required: false }
|
|
12
21
|
});
|
|
22
|
+
const emit = defineEmits([]);
|
|
23
|
+
const slots = defineSlots();
|
|
24
|
+
const { rc } = useRC("Image", rcProp);
|
|
25
|
+
const imageStyles = tv({
|
|
26
|
+
slots: {
|
|
27
|
+
base: "cursor-pointer transition-transform duration-300"
|
|
28
|
+
},
|
|
29
|
+
variants: {
|
|
30
|
+
isExpanded: {
|
|
31
|
+
true: {
|
|
32
|
+
base: "w-full h-full object-contain mx-auto block rounded-lg"
|
|
33
|
+
},
|
|
34
|
+
false: {
|
|
35
|
+
base: "w-full h-full object-cover hover:scale-[1.02] active:scale-95"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const { base } = imageStyles();
|
|
13
41
|
const img = useImage();
|
|
14
42
|
const isOpen = ref(false);
|
|
15
|
-
const imgRef = ref(null);
|
|
16
43
|
const imgElement = useTemplateRef("imgRef");
|
|
17
44
|
const metadata = reactive({
|
|
18
45
|
width: 0,
|
|
@@ -21,15 +48,6 @@ const metadata = reactive({
|
|
|
21
48
|
format: "",
|
|
22
49
|
mimeType: ""
|
|
23
50
|
});
|
|
24
|
-
const imageStyles = tv({
|
|
25
|
-
base: "cursor-pointer transition-transform duration-300",
|
|
26
|
-
variants: {
|
|
27
|
-
isExpanded: {
|
|
28
|
-
true: "w-full h-full object-contain mx-auto block rounded-lg",
|
|
29
|
-
false: "w-full h-full object-cover hover:scale-[1.02] active:scale-95"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
51
|
function formatBytes(bytes) {
|
|
34
52
|
if (bytes === 0) return "0 Bytes";
|
|
35
53
|
const k = 1024;
|
|
@@ -123,7 +141,7 @@ watch(() => imgElement.value, (newVal) => {
|
|
|
123
141
|
:height="height"
|
|
124
142
|
:width="width"
|
|
125
143
|
:loading="loading"
|
|
126
|
-
:class="
|
|
144
|
+
:class="base({ isExpanded: false, class: rc.base })"
|
|
127
145
|
@click="isOpen = true"
|
|
128
146
|
@load="handleImageLoad"
|
|
129
147
|
/>
|
|
@@ -136,7 +154,7 @@ watch(() => imgElement.value, (newVal) => {
|
|
|
136
154
|
<NuxtImg
|
|
137
155
|
:src="src"
|
|
138
156
|
:alt="alt"
|
|
139
|
-
:class="
|
|
157
|
+
:class="base({ isExpanded: true, class: rc.base })"
|
|
140
158
|
/>
|
|
141
159
|
</div>
|
|
142
160
|
|
|
@@ -1,11 +1,25 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface ImageProps {
|
|
2
2
|
src: string;
|
|
3
3
|
alt?: string;
|
|
4
4
|
height?: string | number;
|
|
5
5
|
width?: string | number;
|
|
6
|
-
loading?:
|
|
7
|
-
fit?:
|
|
6
|
+
loading?: "lazy" | "eager";
|
|
7
|
+
fit?: "cover" | "contain" | "fill" | "inside" | "outside";
|
|
8
|
+
rc?: {
|
|
9
|
+
base?: string;
|
|
10
|
+
};
|
|
8
11
|
}
|
|
9
|
-
|
|
12
|
+
export interface ImageEmits {
|
|
13
|
+
}
|
|
14
|
+
export interface ImageSlots {
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Slots = ImageSlots;
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<ImageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ImageProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
10
19
|
declare const _default: typeof __VLS_export;
|
|
11
20
|
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
export interface LogoProps {
|
|
2
2
|
variant?: "mark" | "type";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface LogoEmits {
|
|
8
|
+
}
|
|
9
|
+
export interface LogoSlots {
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = LogoSlots;
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<LogoProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LogoProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
14
|
declare const _default: typeof __VLS_export;
|
|
6
15
|
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useAppConfig } from "nuxt/app";
|
|
3
3
|
import { computed } from "#imports";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { tv } from "../../utils/tv";
|
|
5
|
+
import { useRC } from "../../composables/useRC";
|
|
6
|
+
const { variant = "mark", rc: rcProp } = defineProps({
|
|
7
|
+
variant: { type: String, required: false },
|
|
8
|
+
rc: { type: Object, required: false }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits([]);
|
|
11
|
+
const slots = defineSlots();
|
|
12
|
+
const { rc } = useRC("Logo", rcProp);
|
|
13
|
+
const logoStyles = tv({
|
|
14
|
+
slots: {
|
|
15
|
+
root: ""
|
|
16
|
+
}
|
|
7
17
|
});
|
|
18
|
+
const { root } = logoStyles();
|
|
19
|
+
const appConfig = useAppConfig();
|
|
8
20
|
const logoSrc = computed(() => {
|
|
9
21
|
switch (variant) {
|
|
10
22
|
case "type":
|
|
@@ -17,7 +29,7 @@ const logoSrc = computed(() => {
|
|
|
17
29
|
</script>
|
|
18
30
|
|
|
19
31
|
<template>
|
|
20
|
-
<NuxtLink to="/">
|
|
32
|
+
<NuxtLink to="/" :class="root({ class: rc.root })">
|
|
21
33
|
<UIcon :name="logoSrc" v-bind="$attrs" />
|
|
22
34
|
</NuxtLink>
|
|
23
35
|
</template>
|
|
@@ -1,6 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
export interface LogoProps {
|
|
2
2
|
variant?: "mark" | "type";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
rc?: {
|
|
4
|
+
root?: string;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface LogoEmits {
|
|
8
|
+
}
|
|
9
|
+
export interface LogoSlots {
|
|
10
|
+
}
|
|
11
|
+
type __VLS_Slots = LogoSlots;
|
|
12
|
+
declare const __VLS_base: import("vue").DefineComponent<LogoProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LogoProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
5
14
|
declare const _default: typeof __VLS_export;
|
|
6
15
|
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|