cja-phoenix 1.2.39 → 1.2.41
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.d.mts +6 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -16
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.svg +94 -0
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
- package/dist/runtime/assets/iconia/fonts/CGG-icomoon.woff +0 -0
- package/dist/runtime/assets/iconia/selection.json +1 -0
- package/dist/runtime/assets/iconia/style.css +281 -0
- package/dist/runtime/assets/scss/main.scss +6 -0
- package/dist/runtime/assets/scss/mixins/_funnel.scss +15 -0
- package/dist/runtime/assets/scss/mixins/_index.scss +46 -0
- package/dist/runtime/assets/scss/mixins/_media-queries.scss +109 -0
- package/dist/runtime/assets/scss/mixins/_results.scss +235 -0
- package/dist/runtime/assets/scss/tippy.scss +31 -0
- package/dist/runtime/assets/scss/variables/_breakpoints.scss +18 -0
- package/dist/runtime/assets/scss/variables/_colors.scss +100 -0
- package/dist/runtime/assets/scss/variables/_forms.scss +121 -0
- package/dist/runtime/assets/scss/variables/_grid.scss +12 -0
- package/dist/runtime/assets/scss/variables/_index.scss +6 -0
- package/dist/runtime/assets/scss/variables/_shadows.scss +7 -0
- package/dist/runtime/assets/scss/variables/_z-index.scss +6 -0
- package/dist/runtime/components/CjaButton.d.vue.ts +33 -0
- package/dist/runtime/components/CjaButton.vue +437 -0
- package/dist/runtime/components/CjaButton.vue.d.ts +33 -0
- package/dist/runtime/components/CollapseContainer.d.vue.ts +35 -0
- package/dist/runtime/components/CollapseContainer.vue +112 -0
- package/dist/runtime/components/CollapseContainer.vue.d.ts +35 -0
- package/dist/runtime/components/ContentTabs.d.vue.ts +23 -0
- package/dist/runtime/components/ContentTabs.vue +103 -0
- package/dist/runtime/components/ContentTabs.vue.d.ts +23 -0
- package/dist/runtime/components/Drawer.d.vue.ts +52 -0
- package/dist/runtime/components/Drawer.vue +169 -0
- package/dist/runtime/components/Drawer.vue.d.ts +52 -0
- package/dist/runtime/components/FixedContainer.d.vue.ts +37 -0
- package/dist/runtime/components/FixedContainer.vue +95 -0
- package/dist/runtime/components/FixedContainer.vue.d.ts +37 -0
- package/dist/runtime/components/GridContainer.d.vue.ts +13 -0
- package/dist/runtime/components/GridContainer.vue +37 -0
- package/dist/runtime/components/GridContainer.vue.d.ts +13 -0
- package/dist/runtime/components/GridItem.d.vue.ts +29 -0
- package/dist/runtime/components/GridItem.vue +93 -0
- package/dist/runtime/components/GridItem.vue.d.ts +29 -0
- package/dist/runtime/components/InfoMessage.d.vue.ts +28 -0
- package/dist/runtime/components/InfoMessage.vue +141 -0
- package/dist/runtime/components/InfoMessage.vue.d.ts +28 -0
- package/dist/runtime/components/LoadingSpinner.d.vue.ts +10 -0
- package/dist/runtime/components/LoadingSpinner.vue +39 -0
- package/dist/runtime/components/LoadingSpinner.vue.d.ts +10 -0
- package/dist/runtime/components/Modal.d.vue.ts +39 -0
- package/dist/runtime/components/Modal.vue +195 -0
- package/dist/runtime/components/Modal.vue.d.ts +39 -0
- package/dist/runtime/components/Scaffold.d.vue.ts +13 -0
- package/dist/runtime/components/Scaffold.vue +3 -0
- package/dist/runtime/components/Scaffold.vue.d.ts +13 -0
- package/dist/runtime/components/StickyContainer.d.vue.ts +21 -0
- package/dist/runtime/components/StickyContainer.vue +57 -0
- package/dist/runtime/components/StickyContainer.vue.d.ts +21 -0
- package/dist/runtime/components/form/CheckboxInput.d.vue.ts +42 -0
- package/dist/runtime/components/form/CheckboxInput.vue +163 -0
- package/dist/runtime/components/form/CheckboxInput.vue.d.ts +42 -0
- package/dist/runtime/components/form/CheckboxInputList.d.vue.ts +37 -0
- package/dist/runtime/components/form/CheckboxInputList.vue +84 -0
- package/dist/runtime/components/form/CheckboxInputList.vue.d.ts +37 -0
- package/dist/runtime/components/form/CurrencyInput.d.vue.ts +37 -0
- package/dist/runtime/components/form/CurrencyInput.vue +134 -0
- package/dist/runtime/components/form/CurrencyInput.vue.d.ts +37 -0
- package/dist/runtime/components/form/DateInput.d.vue.ts +40 -0
- package/dist/runtime/components/form/DateInput.vue +325 -0
- package/dist/runtime/components/form/DateInput.vue.d.ts +40 -0
- package/dist/runtime/components/form/FileInput.d.vue.ts +46 -0
- package/dist/runtime/components/form/FileInput.vue +202 -0
- package/dist/runtime/components/form/FileInput.vue.d.ts +46 -0
- package/dist/runtime/components/form/NumberInput.d.vue.ts +41 -0
- package/dist/runtime/components/form/NumberInput.vue +162 -0
- package/dist/runtime/components/form/NumberInput.vue.d.ts +41 -0
- package/dist/runtime/components/form/PhoneInput.d.vue.ts +44 -0
- package/dist/runtime/components/form/PhoneInput.vue +143 -0
- package/dist/runtime/components/form/PhoneInput.vue.d.ts +44 -0
- package/dist/runtime/components/form/RadioInput.d.vue.ts +42 -0
- package/dist/runtime/components/form/RadioInput.vue +181 -0
- package/dist/runtime/components/form/RadioInput.vue.d.ts +42 -0
- package/dist/runtime/components/form/RadioInputList.d.vue.ts +57 -0
- package/dist/runtime/components/form/RadioInputList.vue +130 -0
- package/dist/runtime/components/form/RadioInputList.vue.d.ts +57 -0
- package/dist/runtime/components/form/SelectInput.d.vue.ts +46 -0
- package/dist/runtime/components/form/SelectInput.vue +362 -0
- package/dist/runtime/components/form/SelectInput.vue.d.ts +46 -0
- package/dist/runtime/components/form/SelectionTiles.d.vue.ts +44 -0
- package/dist/runtime/components/form/SelectionTiles.vue +329 -0
- package/dist/runtime/components/form/SelectionTiles.vue.d.ts +44 -0
- package/dist/runtime/components/form/SliderInput.d.vue.ts +51 -0
- package/dist/runtime/components/form/SliderInput.vue +175 -0
- package/dist/runtime/components/form/SliderInput.vue.d.ts +51 -0
- package/dist/runtime/components/form/TextInput.d.vue.ts +56 -0
- package/dist/runtime/components/form/TextInput.vue +227 -0
- package/dist/runtime/components/form/TextInput.vue.d.ts +56 -0
- package/dist/runtime/components/form/TextareaInput.d.vue.ts +37 -0
- package/dist/runtime/components/form/TextareaInput.vue +76 -0
- package/dist/runtime/components/form/TextareaInput.vue.d.ts +37 -0
- package/dist/runtime/components/form/TileCheckboxInput.d.vue.ts +40 -0
- package/dist/runtime/components/form/TileCheckboxInput.vue +108 -0
- package/dist/runtime/components/form/TileCheckboxInput.vue.d.ts +40 -0
- package/dist/runtime/components/form/ToggleInput.d.vue.ts +43 -0
- package/dist/runtime/components/form/ToggleInput.vue +119 -0
- package/dist/runtime/components/form/ToggleInput.vue.d.ts +43 -0
- package/dist/runtime/components/form/structure/Container.d.vue.ts +16 -0
- package/dist/runtime/components/form/structure/Container.vue +31 -0
- package/dist/runtime/components/form/structure/Container.vue.d.ts +16 -0
- package/dist/runtime/components/form/structure/Description.d.vue.ts +9 -0
- package/dist/runtime/components/form/structure/Description.vue +26 -0
- package/dist/runtime/components/form/structure/Description.vue.d.ts +9 -0
- package/dist/runtime/components/form/structure/Error.d.vue.ts +9 -0
- package/dist/runtime/components/form/structure/Error.vue +23 -0
- package/dist/runtime/components/form/structure/Error.vue.d.ts +9 -0
- package/dist/runtime/components/form/structure/Title.d.vue.ts +12 -0
- package/dist/runtime/components/form/structure/Title.vue +43 -0
- package/dist/runtime/components/form/structure/Title.vue.d.ts +12 -0
- package/dist/runtime/components/funnel/Header.d.vue.ts +18 -0
- package/dist/runtime/components/funnel/Header.vue +62 -0
- package/dist/runtime/components/funnel/Header.vue.d.ts +18 -0
- package/dist/runtime/composables/useCjaGtm.d.ts +19 -0
- package/dist/runtime/composables/useCjaGtm.js +164 -0
- package/dist/runtime/composables/useFunnelConfig.d.ts +11 -0
- package/dist/runtime/composables/useFunnelConfig.js +51 -0
- package/dist/runtime/composables/useFunnelSummary.d.ts +14 -0
- package/dist/runtime/composables/useFunnelSummary.js +16 -0
- package/dist/runtime/composables/useHeaderHeight.d.ts +3 -0
- package/dist/runtime/composables/useHeaderHeight.js +24 -0
- package/dist/runtime/composables/useJourneyConfig.d.ts +11 -0
- package/dist/runtime/composables/useJourneyConfig.js +13 -0
- package/dist/runtime/composables/useValidateForm.d.ts +11 -0
- package/dist/runtime/composables/useValidateForm.js +33 -0
- package/dist/runtime/data/dialCodes.d.ts +7 -0
- package/dist/runtime/data/dialCodes.js +1466 -0
- package/dist/runtime/data/phoneDigits.d.ts +2 -0
- package/dist/runtime/data/phoneDigits.js +231 -0
- package/dist/runtime/plugins/tippy.d.ts +4 -0
- package/dist/runtime/plugins/tippy.js +12 -0
- package/dist/runtime/plugins/v-calendar.d.ts +3 -0
- package/dist/runtime/plugins/v-calendar.js +6 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/runtime/types/Form.d.ts +34 -0
- package/dist/runtime/types/Form.js +20 -0
- package/dist/runtime/types/Grid.d.ts +4 -0
- package/dist/runtime/types/Grid.js +0 -0
- package/dist/runtime/types/Icon.d.ts +2 -0
- package/dist/runtime/types/Icon.js +85 -0
- package/dist/runtime/types/JourneyConfig.d.ts +9 -0
- package/dist/runtime/types/JourneyConfig.js +0 -0
- package/dist/runtime/types/index.d.ts +4 -0
- package/dist/runtime/types/index.js +4 -0
- package/dist/runtime/utils/applyProductData.d.ts +10 -0
- package/dist/runtime/utils/applyProductData.js +22 -0
- package/dist/runtime/utils/convertDate.d.ts +5 -0
- package/dist/runtime/utils/convertDate.js +17 -0
- package/dist/runtime/utils/findScrollAncestor.d.ts +1 -0
- package/dist/runtime/utils/findScrollAncestor.js +14 -0
- package/dist/runtime/utils/formValidations.d.ts +78 -0
- package/dist/runtime/utils/formValidations.js +180 -0
- package/dist/runtime/utils/formatValue.d.ts +4 -0
- package/dist/runtime/utils/formatValue.js +20 -0
- package/dist/runtime/utils/getAbTestVersion.d.ts +9 -0
- package/dist/runtime/utils/getAbTestVersion.js +48 -0
- package/dist/runtime/utils/getCalendarUrl.d.ts +8 -0
- package/dist/runtime/utils/getCalendarUrl.js +24 -0
- package/dist/runtime/utils/getFromUrl.d.ts +2 -0
- package/dist/runtime/utils/getFromUrl.js +25 -0
- package/dist/runtime/utils/getStoryblokUrl.d.ts +71 -0
- package/dist/runtime/utils/getStoryblokUrl.js +35 -0
- package/dist/runtime/utils/jsonReviver.d.ts +1 -0
- package/dist/runtime/utils/jsonReviver.js +18 -0
- package/dist/runtime/utils/mediaBreakpoints.d.ts +28 -0
- package/dist/runtime/utils/mediaBreakpoints.js +28 -0
- package/dist/runtime/utils/toggleScroll.d.ts +1 -0
- package/dist/runtime/utils/toggleScroll.js +6 -0
- package/dist/runtime/utils/updateForm.d.ts +11 -0
- package/dist/runtime/utils/updateForm.js +74 -0
- package/dist/runtime/utils/updateMarketingConsent.d.ts +4 -0
- package/dist/runtime/utils/updateMarketingConsent.js +13 -0
- package/dist/runtime/utils/uploadFile.d.ts +8 -0
- package/dist/runtime/utils/uploadFile.js +13 -0
- package/dist/types.d.mts +6 -10
- package/package.json +9 -8
- package/dist/module.d.cts +0 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="content-tabs">
|
|
3
|
+
<div class="control-container">
|
|
4
|
+
<button
|
|
5
|
+
v-for="(tab, i) in tabs"
|
|
6
|
+
:key="i"
|
|
7
|
+
:class="{ active: activeTab == i }"
|
|
8
|
+
@click="activeTab = i;
|
|
9
|
+
$emit('tab:changed', i)"
|
|
10
|
+
>
|
|
11
|
+
{{ tab }}
|
|
12
|
+
</button>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="content-container">
|
|
15
|
+
<TransitionGroup name="fade">
|
|
16
|
+
<div
|
|
17
|
+
v-for="(tab, i) in tabs"
|
|
18
|
+
v-show="activeTab == i"
|
|
19
|
+
:key="i"
|
|
20
|
+
:class="`tab-${i}`"
|
|
21
|
+
>
|
|
22
|
+
<slot :name="i" />
|
|
23
|
+
</div>
|
|
24
|
+
</TransitionGroup>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup>
|
|
30
|
+
import { ref } from "vue";
|
|
31
|
+
const props = defineProps({
|
|
32
|
+
defaultTab: { type: Number, required: true },
|
|
33
|
+
tabs: { type: Array, required: true }
|
|
34
|
+
});
|
|
35
|
+
const activeTab = ref(props.defaultTab);
|
|
36
|
+
defineEmits(["tab:changed"]);
|
|
37
|
+
defineExpose({ activeTab });
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<style lang="scss" scoped>
|
|
41
|
+
.content-tabs {
|
|
42
|
+
.control-container {
|
|
43
|
+
display: flex;
|
|
44
|
+
flex-direction: row;
|
|
45
|
+
flex-wrap: nowrap;
|
|
46
|
+
margin-bottom: 30px;
|
|
47
|
+
|
|
48
|
+
button {
|
|
49
|
+
flex-grow: 1;
|
|
50
|
+
outline: none;
|
|
51
|
+
background: none;
|
|
52
|
+
padding: 0 5px 7px;
|
|
53
|
+
font-size: 16px;
|
|
54
|
+
line-height: 19px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
border: none;
|
|
57
|
+
color: $extra-dark-blue;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
border-bottom: 1px solid $light-grey;
|
|
60
|
+
transition: all 0.2s ease-in-out;
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
font-weight: 700;
|
|
64
|
+
padding: 0 5px 5px;
|
|
65
|
+
border-bottom-width: 3px;
|
|
66
|
+
color: $main-blue;
|
|
67
|
+
border-color: $main-blue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:focus {
|
|
71
|
+
outline: none;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.content-container {
|
|
77
|
+
position: relative;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
|
|
80
|
+
.fade-leave-active {
|
|
81
|
+
position: absolute;
|
|
82
|
+
left: 0;
|
|
83
|
+
top: 0;
|
|
84
|
+
width: 100%;
|
|
85
|
+
transition: all 0.3s ease-in-out;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.fade-enter-active {
|
|
89
|
+
transition: all 0.3s ease-in-out 0.3s;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.fade-enter-from,
|
|
93
|
+
.fade-leave-to {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.fade-enter-to,
|
|
98
|
+
.fade-leave-from {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
defaultTab: number;
|
|
3
|
+
tabs: string[];
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_8: number, __VLS_9: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
[K in NonNullable<typeof __VLS_8>]?: (props: typeof __VLS_9) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
10
|
+
activeTab: import("vue").Ref<number, number>;
|
|
11
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"tab:changed": (...args: any[]) => void;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
"onTab:changed"?: ((...args: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
defaultActive?: boolean;
|
|
3
|
+
type?: "vertical-top" | "vertical-bottom" | "horizontal-left" | "horizontal-right";
|
|
4
|
+
maxWidth?: {
|
|
5
|
+
md?: string;
|
|
6
|
+
lg?: string;
|
|
7
|
+
xl?: string;
|
|
8
|
+
};
|
|
9
|
+
position?: {
|
|
10
|
+
left?: string;
|
|
11
|
+
top?: string;
|
|
12
|
+
right?: string;
|
|
13
|
+
bottom?: string;
|
|
14
|
+
};
|
|
15
|
+
height?: string;
|
|
16
|
+
backdrop?: boolean;
|
|
17
|
+
disableDocumentScroll?: boolean;
|
|
18
|
+
overlapMenu?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare var __VLS_19: {};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
default?: (props: typeof __VLS_19) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
25
|
+
active: import("vue").Ref<boolean, boolean>;
|
|
26
|
+
openDrawer: () => void;
|
|
27
|
+
closeDrawer: () => void;
|
|
28
|
+
toggleDrawer: () => void;
|
|
29
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
open: (...args: any[]) => void;
|
|
31
|
+
close: (...args: any[]) => void;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
type: "vertical-top" | "vertical-bottom" | "horizontal-left" | "horizontal-right";
|
|
37
|
+
defaultActive: boolean;
|
|
38
|
+
maxWidth: {
|
|
39
|
+
md?: string;
|
|
40
|
+
lg?: string;
|
|
41
|
+
xl?: string;
|
|
42
|
+
};
|
|
43
|
+
backdrop: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<Transition name="fade">
|
|
4
|
+
<div
|
|
5
|
+
v-if="backdrop && active"
|
|
6
|
+
class="drawer-backdrop"
|
|
7
|
+
:class="{ 'overlap-menu': overlapMenu }"
|
|
8
|
+
@click="closeDrawer"
|
|
9
|
+
/>
|
|
10
|
+
</Transition>
|
|
11
|
+
<Transition name="slide">
|
|
12
|
+
<div
|
|
13
|
+
v-if="active"
|
|
14
|
+
class="drawer-container"
|
|
15
|
+
:class="[
|
|
16
|
+
`drawer-${type}`,
|
|
17
|
+
{ active, 'overlap-menu': overlapMenu }
|
|
18
|
+
]"
|
|
19
|
+
:style="{ height, ...position, ...cssVars }"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</div>
|
|
23
|
+
</Transition>
|
|
24
|
+
</Teleport>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup>
|
|
28
|
+
import { toggleScroll } from "../utils/toggleScroll";
|
|
29
|
+
import { computed, ref, watch } from "vue";
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
defaultActive: { type: Boolean, required: false, default: false },
|
|
32
|
+
type: { type: String, required: false, default: "vertical-bottom" },
|
|
33
|
+
maxWidth: { type: Object, required: false, default: () => ({
|
|
34
|
+
md: "min(calc(100% - 48px), 768px)",
|
|
35
|
+
lg: "min(calc(100% - 48px), 1024px)",
|
|
36
|
+
xl: "1024px"
|
|
37
|
+
}) },
|
|
38
|
+
position: { type: Object, required: false },
|
|
39
|
+
height: { type: String, required: false },
|
|
40
|
+
backdrop: { type: Boolean, required: false, default: false },
|
|
41
|
+
disableDocumentScroll: { type: Boolean, required: false },
|
|
42
|
+
overlapMenu: { type: Boolean, required: false }
|
|
43
|
+
});
|
|
44
|
+
const cssVars = computed(() => ({
|
|
45
|
+
"--md-max-width": props.maxWidth.md,
|
|
46
|
+
"--lg-max-width": props.maxWidth.lg,
|
|
47
|
+
"--xl-max-width": props.maxWidth.xl
|
|
48
|
+
}));
|
|
49
|
+
const active = ref(props.defaultActive);
|
|
50
|
+
const emit = defineEmits(["close", "open"]);
|
|
51
|
+
const openDrawer = () => {
|
|
52
|
+
active.value = true;
|
|
53
|
+
emit("open");
|
|
54
|
+
};
|
|
55
|
+
const closeDrawer = () => {
|
|
56
|
+
active.value = false;
|
|
57
|
+
emit("close");
|
|
58
|
+
};
|
|
59
|
+
const toggleDrawer = () => {
|
|
60
|
+
active.value = !active.value;
|
|
61
|
+
emit(active.value ? "open" : "close");
|
|
62
|
+
};
|
|
63
|
+
defineExpose({ active, openDrawer, closeDrawer, toggleDrawer });
|
|
64
|
+
watch(active, () => {
|
|
65
|
+
if (props.disableDocumentScroll) {
|
|
66
|
+
toggleScroll();
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.drawer-backdrop {
|
|
73
|
+
@include backdrop;
|
|
74
|
+
z-index: $level-drawer;
|
|
75
|
+
|
|
76
|
+
&.overlap-menu {
|
|
77
|
+
z-index: $level-modal;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.fade-enter-from,
|
|
81
|
+
&.fade-leave-to {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.fade-enter-to,
|
|
86
|
+
&.fade-leave-from {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.drawer-container {
|
|
92
|
+
position: fixed;
|
|
93
|
+
width: 100%;
|
|
94
|
+
transition: all 0.6s ease-out;
|
|
95
|
+
z-index: $level-drawer;
|
|
96
|
+
|
|
97
|
+
&.overlap-menu {
|
|
98
|
+
z-index: $level-modal;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@include screen-md-min {
|
|
102
|
+
max-width: var(--md-max-width);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@include screen-lg-min {
|
|
106
|
+
max-width: var(--lg-max-width);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@include screen-xl-min {
|
|
110
|
+
max-width: var(--xl-max-width);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.drawer-vertical-top {
|
|
114
|
+
top: 0;
|
|
115
|
+
|
|
116
|
+
&.slide-enter-from,
|
|
117
|
+
&.slide-leave-to {
|
|
118
|
+
transform: translateY(-100%);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&.slide-enter-to,
|
|
122
|
+
&.slide-leave-from {
|
|
123
|
+
transform: translateY(0);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.drawer-vertical-bottom {
|
|
128
|
+
bottom: 0;
|
|
129
|
+
|
|
130
|
+
&.slide-enter-from,
|
|
131
|
+
&.slide-leave-to {
|
|
132
|
+
transform: translateY(100%);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.slide-enter-to,
|
|
136
|
+
&.slide-leave-from {
|
|
137
|
+
transform: translateY(0);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.drawer-horizontal-left {
|
|
142
|
+
left: 0;
|
|
143
|
+
|
|
144
|
+
&.slide-enter-from,
|
|
145
|
+
&.slide-leave-to {
|
|
146
|
+
transform: translateX(-100%);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&.slide-enter-to,
|
|
150
|
+
&.slide-leave-from {
|
|
151
|
+
transform: translateX(0);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&.drawer-horizontal-right {
|
|
156
|
+
right: 0;
|
|
157
|
+
|
|
158
|
+
&.slide-enter-from,
|
|
159
|
+
&.slide-leave-to {
|
|
160
|
+
transform: translateX(100%);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.slide-enter-to,
|
|
164
|
+
&.slide-leave-from {
|
|
165
|
+
transform: translateX(0);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
defaultActive?: boolean;
|
|
3
|
+
type?: "vertical-top" | "vertical-bottom" | "horizontal-left" | "horizontal-right";
|
|
4
|
+
maxWidth?: {
|
|
5
|
+
md?: string;
|
|
6
|
+
lg?: string;
|
|
7
|
+
xl?: string;
|
|
8
|
+
};
|
|
9
|
+
position?: {
|
|
10
|
+
left?: string;
|
|
11
|
+
top?: string;
|
|
12
|
+
right?: string;
|
|
13
|
+
bottom?: string;
|
|
14
|
+
};
|
|
15
|
+
height?: string;
|
|
16
|
+
backdrop?: boolean;
|
|
17
|
+
disableDocumentScroll?: boolean;
|
|
18
|
+
overlapMenu?: boolean;
|
|
19
|
+
};
|
|
20
|
+
declare var __VLS_19: {};
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
default?: (props: typeof __VLS_19) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
25
|
+
active: import("vue").Ref<boolean, boolean>;
|
|
26
|
+
openDrawer: () => void;
|
|
27
|
+
closeDrawer: () => void;
|
|
28
|
+
toggleDrawer: () => void;
|
|
29
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
30
|
+
open: (...args: any[]) => void;
|
|
31
|
+
close: (...args: any[]) => void;
|
|
32
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
33
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
34
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
35
|
+
}>, {
|
|
36
|
+
type: "vertical-top" | "vertical-bottom" | "horizontal-left" | "horizontal-right";
|
|
37
|
+
defaultActive: boolean;
|
|
38
|
+
maxWidth: {
|
|
39
|
+
md?: string;
|
|
40
|
+
lg?: string;
|
|
41
|
+
xl?: string;
|
|
42
|
+
};
|
|
43
|
+
backdrop: boolean;
|
|
44
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
export default _default;
|
|
48
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
49
|
+
new (): {
|
|
50
|
+
$slots: S;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
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>
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid-container">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<style lang="scss" scoped>
|
|
8
|
+
.grid-container {
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: $grid-columns-sm;
|
|
11
|
+
column-gap: $grid-column-gap-sm;
|
|
12
|
+
padding-left: $grid-side-padding-sm;
|
|
13
|
+
padding-right: $grid-side-padding-sm;
|
|
14
|
+
|
|
15
|
+
@include screen-md-min {
|
|
16
|
+
grid-template-columns: $grid-columns-md;
|
|
17
|
+
column-gap: $grid-column-gap-md;
|
|
18
|
+
padding-left: $grid-side-padding-md;
|
|
19
|
+
padding-right: $grid-side-padding-md;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include screen-lg-min {
|
|
23
|
+
grid-template-columns: $grid-columns-lg;
|
|
24
|
+
column-gap: $grid-column-gap-lg;
|
|
25
|
+
padding-left: $grid-side-padding-lg;
|
|
26
|
+
padding-right: $grid-side-padding-lg;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include screen-xl-min {
|
|
30
|
+
padding-left: $grid-side-padding-xl;
|
|
31
|
+
padding-right: $grid-side-padding-xl;
|
|
32
|
+
max-width: 1440px;
|
|
33
|
+
margin-left: auto;
|
|
34
|
+
margin-right: auto;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
declare var __VLS_1: {};
|
|
2
|
+
type __VLS_Slots = {} & {
|
|
3
|
+
default?: (props: typeof __VLS_1) => any;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_base: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
9
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
10
|
+
new (): {
|
|
11
|
+
$slots: S;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { GridItemOffsetDesktop, GridItemOffsetMobile, GridItemSizeDesktop, GridItemSizeMobile } from "../types/Grid.js";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
sizeSm?: GridItemSizeMobile;
|
|
4
|
+
offsetSm?: GridItemOffsetMobile;
|
|
5
|
+
sizeMd?: GridItemSizeMobile;
|
|
6
|
+
offsetMd?: GridItemOffsetMobile;
|
|
7
|
+
sizeLg?: GridItemSizeDesktop;
|
|
8
|
+
offsetLg?: GridItemOffsetDesktop;
|
|
9
|
+
sizeXl?: GridItemSizeDesktop;
|
|
10
|
+
offsetXl?: GridItemOffsetDesktop;
|
|
11
|
+
};
|
|
12
|
+
declare var __VLS_1: {};
|
|
13
|
+
type __VLS_Slots = {} & {
|
|
14
|
+
default?: (props: typeof __VLS_1) => any;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
sizeSm: GridItemSizeMobile;
|
|
18
|
+
sizeMd: GridItemSizeMobile;
|
|
19
|
+
sizeLg: GridItemSizeDesktop;
|
|
20
|
+
sizeXl: GridItemSizeDesktop;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|