cja-phoenix 1.2.51 → 1.2.53

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,95 +0,0 @@
1
- <template>
2
- <div
3
- v-if="active"
4
- ref="fixedContainer"
5
- class="fixed-container"
6
- :style="{ height: fixedContainerHeight }"
7
- >
8
- <div
9
- ref="fixedWrapper"
10
- class="fixed-wrapper"
11
- :class="{ 'position-fixed': positionFixed }"
12
- :style="{
13
- ...size,
14
- ...position,
15
- transform: limitOffset,
16
- maxWidth: fixedWrapperWidth
17
- }"
18
- >
19
- <slot />
20
- </div>
21
- </div>
22
- <slot v-else />
23
- </template>
24
-
25
- <script setup>
26
- import { onMounted, onUnmounted, ref, watch } from "vue";
27
- const props = defineProps({
28
- active: { type: Boolean, required: false, default: true },
29
- scrollThreshold: { type: Number, required: false, default: 0 },
30
- scrollLimitEl: { type: null, required: false },
31
- fixWidth: { type: Boolean, required: false, default: true },
32
- size: { type: Object, required: false },
33
- position: { type: Object, required: false }
34
- });
35
- const positionFixed = ref(false);
36
- const fixedContainer = ref();
37
- const fixedContainerHeight = ref("");
38
- const fixedWrapper = ref();
39
- const fixedWrapperWidth = ref("");
40
- const limitOffset = ref();
41
- const setScrollLimit = () => {
42
- if (props.scrollLimitEl) {
43
- const scrollLimitValue = props.scrollLimitEl.offsetTop + props.scrollLimitEl.clientHeight - fixedWrapper.value.clientHeight + props.scrollThreshold;
44
- if (window.scrollY >= scrollLimitValue) {
45
- limitOffset.value = `translateY(${scrollLimitValue - window.scrollY}px)`;
46
- } else {
47
- limitOffset.value = null;
48
- }
49
- }
50
- };
51
- const fixPosition = () => {
52
- if (fixedContainer.value && props.active) {
53
- positionFixed.value = window.scrollY > fixedContainer.value.offsetTop + props.scrollThreshold;
54
- const fixedWrapperHeight = fixedWrapper.value.clientHeight;
55
- fixedContainerHeight.value = positionFixed.value ? `${fixedWrapperHeight}px` : "";
56
- setScrollLimit();
57
- } else {
58
- positionFixed.value = false;
59
- fixedContainerHeight.value = "";
60
- }
61
- };
62
- const setWidth = () => {
63
- fixedWrapperWidth.value = props.active && fixedContainer.value ? `${fixedContainer.value.offsetWidth}px` : "";
64
- };
65
- watch(
66
- () => props.active,
67
- () => {
68
- if (props.fixWidth) {
69
- setWidth();
70
- }
71
- }
72
- );
73
- onMounted(() => {
74
- window.addEventListener("scroll", fixPosition);
75
- fixPosition();
76
- if (props.fixWidth) {
77
- window.addEventListener("resize", setWidth);
78
- setWidth();
79
- }
80
- });
81
- onUnmounted(() => {
82
- window.removeEventListener("scroll", fixPosition);
83
- window.removeEventListener("resize", setWidth);
84
- });
85
- defineExpose({ positionFixed });
86
- </script>
87
-
88
- <style lang="scss" scoped>
89
- .fixed-wrapper {
90
- &.position-fixed {
91
- position: fixed;
92
- width: 100%;
93
- }
94
- }
95
- </style>
@@ -1,37 +0,0 @@
1
- type __VLS_Props = {
2
- active?: boolean;
3
- scrollThreshold?: number;
4
- scrollLimitEl?: HTMLElement;
5
- fixWidth?: boolean;
6
- size?: {
7
- height?: string;
8
- width?: string;
9
- };
10
- position?: {
11
- left?: string;
12
- top?: string;
13
- right?: string;
14
- bottom?: string;
15
- };
16
- };
17
- declare var __VLS_1: {}, __VLS_3: {};
18
- type __VLS_Slots = {} & {
19
- default?: (props: typeof __VLS_1) => any;
20
- } & {
21
- default?: (props: typeof __VLS_3) => any;
22
- };
23
- declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
24
- positionFixed: import("vue").Ref<boolean, boolean>;
25
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
26
- active: boolean;
27
- scrollThreshold: number;
28
- fixWidth: boolean;
29
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
- declare const _default: typeof __VLS_export;
32
- export default _default;
33
- type __VLS_WithSlots<T, S> = T & {
34
- new (): {
35
- $slots: S;
36
- };
37
- };
@@ -1,3 +0,0 @@
1
- import '@angelblanco/v-calendar/style.css';
2
- declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
3
- export default _default;
@@ -1,6 +0,0 @@
1
- import { defineNuxtPlugin } from "#app";
2
- import Vcalendar from "@angelblanco/v-calendar";
3
- import "@angelblanco/v-calendar/style.css";
4
- export default defineNuxtPlugin((nuxtApp) => {
5
- nuxtApp.vueApp.use(Vcalendar, {});
6
- });