cja-phoenix 0.6.0 → 0.6.2
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/cja-phoenix.es.js +3816 -4306
- package/dist/style.css +1 -0
- package/dist/types/components/composite/CheckoutCrossSell.vue.d.ts +29 -0
- package/dist/types/components/composite/CheckoutLayout.vue.d.ts +23 -0
- package/dist/types/components/composite/CheckoutMilestones.vue.d.ts +16 -0
- package/dist/types/components/composite/CjaFooter.vue.d.ts +34 -0
- package/dist/types/components/composite/CjaMenuBar.vue.d.ts +52 -0
- package/dist/types/components/composite/FunnelLayout.vue.d.ts +35 -0
- package/dist/types/components/composite/FunnelSubmit.vue.d.ts +26 -0
- package/dist/types/components/composite/FunnelSummary.vue.d.ts +77 -0
- package/dist/types/components/composite/FunnelTitle.vue.d.ts +19 -0
- package/dist/types/components/composite/InfoShowcase.vue.d.ts +25 -0
- package/dist/types/components/composite/JourneyMacroSteps.vue.d.ts +16 -0
- package/dist/types/components/composite/ResultsSidebar.vue.d.ts +9 -0
- package/dist/types/components/forms/CheckboxInput.vue.d.ts +41 -0
- package/dist/types/components/forms/CurrencyInput.vue.d.ts +65 -0
- package/dist/types/components/forms/FileInput.vue.d.ts +89 -0
- package/dist/types/components/forms/NumberInput.vue.d.ts +58 -0
- package/dist/types/components/forms/PhoneInput.vue.d.ts +69 -0
- package/dist/types/components/forms/RadioInput.vue.d.ts +43 -0
- package/dist/types/components/forms/RadioInputList.vue.d.ts +65 -0
- package/dist/types/components/forms/SelectInput.vue.d.ts +80 -0
- package/dist/types/components/forms/SelectionTiles.vue.d.ts +51 -0
- package/dist/types/components/forms/TextInput.vue.d.ts +76 -0
- package/dist/types/components/forms/TileCheckboxInput.vue.d.ts +23 -0
- package/dist/types/components/forms/ToggleInput.vue.d.ts +51 -0
- package/dist/types/components/forms/structure/InputContainer.vue.d.ts +22 -0
- package/dist/types/components/forms/structure/InputError.vue.d.ts +15 -0
- package/dist/types/components/forms/structure/InputTitle.vue.d.ts +21 -0
- package/dist/types/components/structural/CjaButton.vue.d.ts +59 -0
- package/dist/types/components/structural/CollapseContainer.vue.d.ts +51 -0
- package/dist/{components → types/components}/structural/ContentTabs.vue.d.ts +17 -20
- package/dist/types/components/structural/FixedContainer.vue.d.ts +68 -0
- package/dist/types/components/structural/GridContainer.vue.d.ts +36 -0
- package/dist/types/components/structural/GridItem.vue.d.ts +26 -0
- package/dist/types/components/structural/InfoMessage.vue.d.ts +30 -0
- package/dist/types/components/structural/LoadingSpinner.vue.d.ts +17 -0
- package/dist/types/components/structural/Modal.vue.d.ts +65 -0
- package/dist/types/components/structural/Scaffold.vue.d.ts +9 -0
- package/dist/types/index.d.ts +16 -7
- package/dist/types/stories/CjaButton.story.vue.d.ts +2 -0
- package/dist/types/stories/ContentTabs.story.vue.d.ts +2 -0
- package/dist/types/stories/Modal.story.vue.d.ts +2 -0
- package/dist/types/stories/RadioInputList.story.vue.d.ts +2 -0
- package/dist/types/{Router.d.ts → types/Router.d.ts} +1 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/{utils → types/utils}/formValidations.d.ts +3 -0
- package/package.json +21 -30
- package/src/assets/backdrop.scss +10 -0
- package/src/assets/breakpoints.scss +12 -0
- package/src/assets/fonts.scss +1 -0
- package/src/assets/forms.scss +97 -0
- package/src/assets/grid.scss +14 -0
- package/src/assets/iconia/Read Me.txt +7 -0
- package/src/assets/iconia/demo-files/demo.css +155 -0
- package/src/assets/iconia/demo-files/demo.js +30 -0
- package/src/assets/iconia/demo.html +7055 -0
- package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.svg +513 -0
- package/src/assets/iconia/fonts/CGG-icomoon.ttf +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.woff +0 -0
- package/src/assets/iconia/selection.json +1 -0
- package/src/assets/iconia/style.css +1547 -0
- package/src/assets/iconia/style.scss +2556 -0
- package/src/assets/iconia/variables.scss +507 -0
- package/src/assets/main.scss +30 -0
- package/src/assets/radioOld.scss +52 -0
- package/src/assets/shadows.scss +3 -0
- package/src/assets/tippy.scss +45 -0
- package/src/assets/vars/development.scss +4 -0
- package/src/assets/vars/production.scss +4 -0
- package/src/components/composite/CheckoutCrossSell.vue +478 -0
- package/src/components/composite/CheckoutLayout.vue +59 -0
- package/src/components/composite/CheckoutMilestones.vue +161 -0
- package/src/components/composite/CjaFooter.vue +223 -0
- package/src/components/composite/CjaMenuBar.vue +543 -0
- package/src/components/composite/FunnelLayout.vue +197 -0
- package/src/components/composite/FunnelSubmit.vue +53 -0
- package/src/components/composite/FunnelSummary.vue +198 -0
- package/src/components/composite/FunnelTitle.vue +59 -0
- package/src/components/composite/InfoShowcase.vue +87 -0
- package/src/components/composite/JourneyMacroSteps.vue +104 -0
- package/src/components/composite/ProductDetails.vue +149 -0
- package/src/components/composite/ResultsLayout.vue +156 -0
- package/src/components/composite/ResultsSidebar.vue +74 -0
- package/src/components/forms/CheckboxInput.vue +103 -0
- package/src/components/forms/CurrencyInput.vue +126 -0
- package/src/components/forms/FileInput.vue +250 -0
- package/src/components/forms/NumberInput.vue +165 -0
- package/src/components/forms/PhoneInput.vue +122 -0
- package/src/components/forms/RadioInput.vue +98 -0
- package/src/components/forms/RadioInputList.vue +156 -0
- package/src/components/forms/SelectInput.vue +392 -0
- package/src/components/forms/SelectionTiles.vue +196 -0
- package/src/components/forms/TextInput.vue +144 -0
- package/src/components/forms/TileCheckboxInput.vue +96 -0
- package/src/components/forms/ToggleInput.vue +88 -0
- package/src/components/forms/structure/InputContainer.vue +28 -0
- package/src/components/forms/structure/InputError.vue +26 -0
- package/src/components/forms/structure/InputTitle.vue +52 -0
- package/src/components/index.ts +73 -0
- package/src/components/structural/CjaButton.vue +332 -0
- package/src/components/structural/CollapseContainer.vue +141 -0
- package/src/components/structural/ContentTabs.vue +105 -0
- package/src/components/structural/FixedContainer.vue +107 -0
- package/src/components/structural/GridContainer.vue +70 -0
- package/src/components/structural/GridItem.vue +47 -0
- package/src/components/structural/InfoMessage.vue +105 -0
- package/src/components/structural/LoadingSpinner.vue +39 -0
- package/src/components/structural/Modal.vue +209 -0
- package/src/components/structural/Scaffold.vue +3 -0
- package/src/constants/MyConstants.ts +1 -0
- package/src/constants/index.ts +5 -0
- package/src/env.d.ts +11 -0
- package/src/index.ts +31 -0
- package/src/stories/CjaButton.story.vue +192 -0
- package/src/stories/ContentTabs.story.vue +59 -0
- package/src/stories/Modal.story.vue +127 -0
- package/src/stories/RadioInputList.story.vue +61 -0
- package/src/types/CheckoutMilestone.ts +5 -0
- package/src/types/Footer.ts +17 -0
- package/src/types/Menu.ts +19 -0
- package/src/types/RadioOption.ts +7 -0
- package/src/types/Router.ts +19 -0
- package/src/types/SelectOption.ts +6 -0
- package/src/types/StoreDataValue.ts +12 -0
- package/src/types/Storyblok.ts +10 -0
- package/src/types/TileOption.ts +8 -0
- package/src/types/index.ts +19 -0
- package/src/utils/cjaRouter.ts +74 -0
- package/src/utils/cjaStore.ts +43 -0
- package/src/utils/findScrollAncestor.ts +16 -0
- package/src/utils/formValidations.ts +192 -0
- package/src/utils/generateRoutes.ts +36 -0
- package/src/utils/getFromUrl.ts +25 -0
- package/src/utils/getMessages.ts +23 -0
- package/src/utils/gtm.ts +158 -0
- package/src/utils/index.ts +31 -0
- package/src/utils/jsonReviver.ts +20 -0
- package/src/utils/storyblokLink.ts +4 -0
- package/src/utils/updateForm.ts +40 -0
- package/src/utils/uploadFile.ts +25 -0
- package/src/utils/useGlobalProperties.ts +11 -0
- package/src/utils/useViewportDetector.ts +35 -0
- package/dist/cja-phoenix.cjs.js +0 -44
- package/dist/cja-phoenix.d.ts +0 -3
- package/dist/cja-phoenix.umd.js +0 -45
- package/dist/components/composite/CheckoutCrossSell.vue.d.ts +0 -36
- package/dist/components/composite/CheckoutLayout.vue.d.ts +0 -20
- package/dist/components/composite/CheckoutMilestones.vue.d.ts +0 -13
- package/dist/components/composite/CjaFooter.vue.d.ts +0 -29
- package/dist/components/composite/CjaMenuBar.vue.d.ts +0 -53
- package/dist/components/composite/FunnelLayout.vue.d.ts +0 -38
- package/dist/components/composite/FunnelSubmit.vue.d.ts +0 -25
- package/dist/components/composite/FunnelSummary.vue.d.ts +0 -76
- package/dist/components/composite/FunnelTitle.vue.d.ts +0 -24
- package/dist/components/composite/InfoShowcase.vue.d.ts +0 -28
- package/dist/components/composite/JourneyMacroSteps.vue.d.ts +0 -13
- package/dist/components/forms/CheckboxInput.vue.d.ts +0 -38
- package/dist/components/forms/CurrencyInput.vue.d.ts +0 -92
- package/dist/components/forms/FileInput.vue.d.ts +0 -118
- package/dist/components/forms/NumberInput.vue.d.ts +0 -73
- package/dist/components/forms/PhoneInput.vue.d.ts +0 -104
- package/dist/components/forms/RadioInputList.vue.d.ts +0 -96
- package/dist/components/forms/SelectInput.vue.d.ts +0 -121
- package/dist/components/forms/SelectionTiles.vue.d.ts +0 -64
- package/dist/components/forms/TextInput.vue.d.ts +0 -127
- package/dist/components/forms/TileCheckboxInput.vue.d.ts +0 -34
- package/dist/components/forms/ToggleInput.vue.d.ts +0 -70
- package/dist/components/forms/structure/InputContainer.vue.d.ts +0 -17
- package/dist/components/forms/structure/InputError.vue.d.ts +0 -12
- package/dist/components/forms/structure/InputTitle.vue.d.ts +0 -30
- package/dist/components/structural/CjaButton.vue.d.ts +0 -66
- package/dist/components/structural/CollapseContainer.vue.d.ts +0 -40
- package/dist/components/structural/FixedContainer.vue.d.ts +0 -69
- package/dist/components/structural/GridContainer.vue.d.ts +0 -21
- package/dist/components/structural/GridItem.vue.d.ts +0 -29
- package/dist/components/structural/InfoMessage.vue.d.ts +0 -39
- package/dist/components/structural/LoadingSpinner.vue.d.ts +0 -16
- package/dist/components/structural/Modal.vue.d.ts +0 -50
- package/dist/components/structural/Scaffold.vue.d.ts +0 -3
- package/dist/components/structural/Scaffold.vue.d.ts.map +0 -1
- package/dist/index.d.ts +0 -14
- package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutCrossSell.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CheckoutLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutLayout.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CheckoutMilestones.vue.d.ts +0 -5
- package/dist/src/components/composite/CheckoutMilestones.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CjaFooter.vue.d.ts +0 -5
- package/dist/src/components/composite/CjaFooter.vue.d.ts.map +0 -1
- package/dist/src/components/composite/CjaMenuBar.vue.d.ts +0 -5
- package/dist/src/components/composite/CjaMenuBar.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelLayout.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelSubmit.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelSubmit.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelSummary.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelSummary.vue.d.ts.map +0 -1
- package/dist/src/components/composite/FunnelTitle.vue.d.ts +0 -5
- package/dist/src/components/composite/FunnelTitle.vue.d.ts.map +0 -1
- package/dist/src/components/composite/InfoShowcase.vue.d.ts +0 -5
- package/dist/src/components/composite/InfoShowcase.vue.d.ts.map +0 -1
- package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts +0 -5
- package/dist/src/components/composite/JourneyMacroSteps.vue.d.ts.map +0 -1
- package/dist/src/components/composite/ProductDetails.vue.d.ts +0 -5
- package/dist/src/components/composite/ProductDetails.vue.d.ts.map +0 -1
- package/dist/src/components/composite/ResultsLayout.vue.d.ts +0 -5
- package/dist/src/components/composite/ResultsLayout.vue.d.ts.map +0 -1
- package/dist/src/components/forms/CheckboxInput.vue.d.ts +0 -5
- package/dist/src/components/forms/CheckboxInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/CurrencyInput.vue.d.ts +0 -5
- package/dist/src/components/forms/CurrencyInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/FileInput.vue.d.ts +0 -5
- package/dist/src/components/forms/FileInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/NumberInput.vue.d.ts +0 -5
- package/dist/src/components/forms/NumberInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/PhoneInput.vue.d.ts +0 -5
- package/dist/src/components/forms/PhoneInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/RadioInputList.vue.d.ts +0 -5
- package/dist/src/components/forms/RadioInputList.vue.d.ts.map +0 -1
- package/dist/src/components/forms/SelectInput.vue.d.ts +0 -5
- package/dist/src/components/forms/SelectInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/SelectionTiles.vue.d.ts +0 -5
- package/dist/src/components/forms/SelectionTiles.vue.d.ts.map +0 -1
- package/dist/src/components/forms/TextInput.vue.d.ts +0 -5
- package/dist/src/components/forms/TextInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/TileCheckboxInput.vue.d.ts +0 -5
- package/dist/src/components/forms/TileCheckboxInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/ToggleInput.vue.d.ts +0 -5
- package/dist/src/components/forms/ToggleInput.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputContainer.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputContainer.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputError.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputError.vue.d.ts.map +0 -1
- package/dist/src/components/forms/structure/InputTitle.vue.d.ts +0 -5
- package/dist/src/components/forms/structure/InputTitle.vue.d.ts.map +0 -1
- package/dist/src/components/structural/CjaButton.vue.d.ts +0 -5
- package/dist/src/components/structural/CjaButton.vue.d.ts.map +0 -1
- package/dist/src/components/structural/CollapseContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/CollapseContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/ContentTabs.vue.d.ts +0 -5
- package/dist/src/components/structural/ContentTabs.vue.d.ts.map +0 -1
- package/dist/src/components/structural/FixedContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/FixedContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/GridContainer.vue.d.ts +0 -5
- package/dist/src/components/structural/GridContainer.vue.d.ts.map +0 -1
- package/dist/src/components/structural/GridItem.vue.d.ts +0 -5
- package/dist/src/components/structural/GridItem.vue.d.ts.map +0 -1
- package/dist/src/components/structural/InfoMessage.vue.d.ts +0 -5
- package/dist/src/components/structural/InfoMessage.vue.d.ts.map +0 -1
- package/dist/src/components/structural/LoadingSpinner.vue.d.ts +0 -5
- package/dist/src/components/structural/LoadingSpinner.vue.d.ts.map +0 -1
- package/dist/src/components/structural/Modal.vue.d.ts +0 -5
- package/dist/src/components/structural/Modal.vue.d.ts.map +0 -1
- package/dist/styles.css +0 -1
- /package/dist/{components → types/components}/composite/ProductDetails.vue.d.ts +0 -0
- /package/dist/{components → types/components}/composite/ResultsLayout.vue.d.ts +0 -0
- /package/dist/{components → types/components}/index.d.ts +0 -0
- /package/dist/{constants → types/constants}/MyConstants.d.ts +0 -0
- /package/dist/{constants → types/constants}/index.d.ts +0 -0
- /package/dist/types/{CheckoutMilestone.d.ts → types/CheckoutMilestone.d.ts} +0 -0
- /package/dist/types/{Footer.d.ts → types/Footer.d.ts} +0 -0
- /package/dist/types/{Menu.d.ts → types/Menu.d.ts} +0 -0
- /package/dist/types/{RadioOption.d.ts → types/RadioOption.d.ts} +0 -0
- /package/dist/types/{SelectOption.d.ts → types/SelectOption.d.ts} +0 -0
- /package/dist/types/{StoreDataValue.d.ts → types/StoreDataValue.d.ts} +0 -0
- /package/dist/types/{Storyblok.d.ts → types/Storyblok.d.ts} +0 -0
- /package/dist/types/{TileOption.d.ts → types/TileOption.d.ts} +0 -0
- /package/dist/{utils → types/utils}/cjaRouter.d.ts +0 -0
- /package/dist/{utils → types/utils}/cjaStore.d.ts +0 -0
- /package/dist/{utils → types/utils}/findScrollAncestor.d.ts +0 -0
- /package/dist/{utils → types/utils}/generateRoutes.d.ts +0 -0
- /package/dist/{utils → types/utils}/getFromUrl.d.ts +0 -0
- /package/dist/{utils → types/utils}/getMessages.d.ts +0 -0
- /package/dist/{utils → types/utils}/gtm.d.ts +0 -0
- /package/dist/{utils → types/utils}/index.d.ts +0 -0
- /package/dist/{utils → types/utils}/jsonReviver.d.ts +0 -0
- /package/dist/{utils → types/utils}/storyblokLink.d.ts +0 -0
- /package/dist/{utils → types/utils}/updateForm.d.ts +0 -0
- /package/dist/{utils → types/utils}/uploadFile.d.ts +0 -0
- /package/dist/{utils → types/utils}/useGlobalProperties.d.ts +0 -0
- /package/dist/{utils → types/utils}/useViewportDetector.d.ts +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<Transition name="details">
|
|
4
|
+
<div class="overlay" v-if="active" @click.self="closeDetails">
|
|
5
|
+
<div ref="detailsEl" class="details-container">
|
|
6
|
+
<div class="details-header">
|
|
7
|
+
<slot name="header"></slot>
|
|
8
|
+
|
|
9
|
+
<div class="btn-close" @click="closeDetails">
|
|
10
|
+
<span class="m-cgg-icon--cross2"></span>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="details-body">
|
|
14
|
+
<slot name="body"></slot>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="details-footer" v-if="$slots.footer">
|
|
17
|
+
<slot name="footer"></slot>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</Transition>
|
|
22
|
+
</Teleport>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import { ref, watch, computed } from "vue";
|
|
27
|
+
|
|
28
|
+
const active = ref();
|
|
29
|
+
const detailsEl = ref();
|
|
30
|
+
const headerEl = ref();
|
|
31
|
+
const bodyEl = ref();
|
|
32
|
+
const footerEl = ref();
|
|
33
|
+
|
|
34
|
+
watch(active, () => {
|
|
35
|
+
if (active.value) {
|
|
36
|
+
document.body.style.overflow = "hidden";
|
|
37
|
+
document.documentElement.style.overflow = "hidden";
|
|
38
|
+
} else {
|
|
39
|
+
document.body.style.overflow = "";
|
|
40
|
+
document.documentElement.style.overflow = "";
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const openDetails = () => {
|
|
45
|
+
active.value = true;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const closeDetails = () => {
|
|
49
|
+
active.value = false;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
defineExpose({ openDetails, closeDetails });
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped lang="scss">
|
|
56
|
+
@import "../../assets/shadows.scss";
|
|
57
|
+
|
|
58
|
+
.overlay {
|
|
59
|
+
position: fixed;
|
|
60
|
+
bottom: 0;
|
|
61
|
+
left: 0;
|
|
62
|
+
height: 100%;
|
|
63
|
+
width: 100%;
|
|
64
|
+
z-index: 100;
|
|
65
|
+
|
|
66
|
+
@media screen and (min-width: 992px) {
|
|
67
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.details-container {
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
background-color: #fff;
|
|
77
|
+
height: 100%;
|
|
78
|
+
transition: all 0.3s linear;
|
|
79
|
+
|
|
80
|
+
@media screen and (min-width: 992px) {
|
|
81
|
+
width: 620px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.details-header {
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: space-between;
|
|
87
|
+
gap: 15px;
|
|
88
|
+
align-items: center;
|
|
89
|
+
background-color: #fff;
|
|
90
|
+
padding: 15px;
|
|
91
|
+
box-shadow: $box-shadow-m;
|
|
92
|
+
|
|
93
|
+
@media screen and (min-width: 992px) {
|
|
94
|
+
padding: 20px 50px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.btn-close {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
align-items: center;
|
|
101
|
+
margin-left: auto;
|
|
102
|
+
width: 20px;
|
|
103
|
+
height: 20px;
|
|
104
|
+
font-size: 20px;
|
|
105
|
+
line-height: 20px;
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.details-body {
|
|
111
|
+
flex-grow: 1;
|
|
112
|
+
position: relative;
|
|
113
|
+
overflow-y: auto;
|
|
114
|
+
padding: 15px 15px 30px;
|
|
115
|
+
|
|
116
|
+
@media screen and (min-width: 992px) {
|
|
117
|
+
padding: 20px 50px 50px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.details-footer {
|
|
122
|
+
padding: 15px;
|
|
123
|
+
box-shadow: $box-shadow-m;
|
|
124
|
+
|
|
125
|
+
@media screen and (min-width: 992px) {
|
|
126
|
+
padding: 20px 50px;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.details-enter-to .details-container,
|
|
133
|
+
.details-leave-from .details-container {
|
|
134
|
+
transform: translateY(0);
|
|
135
|
+
|
|
136
|
+
@media screen and (min-width: 992px) {
|
|
137
|
+
transform: translateX(0%);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.details-enter-from .details-container,
|
|
142
|
+
.details-leave-to .details-container {
|
|
143
|
+
transform: translateY(100%);
|
|
144
|
+
|
|
145
|
+
@media screen and (min-width: 992px) {
|
|
146
|
+
transform: translateX(100%);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="results-container">
|
|
3
|
+
<FixedContainer
|
|
4
|
+
v-if="!activeViewport.lg"
|
|
5
|
+
:size="{ width: '100%' }"
|
|
6
|
+
:scrollThreshold="-headerHeight"
|
|
7
|
+
:position="{ left: '0', top: `${headerHeight}px` }"
|
|
8
|
+
>
|
|
9
|
+
<slot name="mobile-controls"></slot>
|
|
10
|
+
</FixedContainer>
|
|
11
|
+
<GridContainer class="results-grid">
|
|
12
|
+
<GridItem :size-lg="3" v-if="activeViewport.lg">
|
|
13
|
+
<div class="back-container">
|
|
14
|
+
<button @click="$emit('btn:previous')">
|
|
15
|
+
<span class="m-cgg-icon--chevron-left"></span>
|
|
16
|
+
<span>Voltar</span>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
<FixedContainer
|
|
20
|
+
ref="fixedContainer"
|
|
21
|
+
:scrollThreshold="-headerHeight - 16"
|
|
22
|
+
:position="{ top: `${headerHeight + 16}px`, bottom: '16px' }"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
ref="sidebarContainer"
|
|
26
|
+
class="sidebar-container"
|
|
27
|
+
:class="{ 'position-fixed': fixedContainer?.positionFixed }"
|
|
28
|
+
:style="{
|
|
29
|
+
maxHeight: !fixedContainer?.positionFixed ? sidebarMaxHeight : '',
|
|
30
|
+
}"
|
|
31
|
+
>
|
|
32
|
+
<div class="sidebar-body">
|
|
33
|
+
<slot name="sidebar"></slot>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</FixedContainer>
|
|
37
|
+
</GridItem>
|
|
38
|
+
<GridItem :size-sm="2" :size-md="4" :size-lg="9">
|
|
39
|
+
<slot name="content"></slot>
|
|
40
|
+
</GridItem>
|
|
41
|
+
</GridContainer>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script lang="ts" setup>
|
|
46
|
+
import GridContainer from "../structural/GridContainer.vue";
|
|
47
|
+
import GridItem from "../structural/GridItem.vue";
|
|
48
|
+
import { ref } from "vue";
|
|
49
|
+
import { onMounted } from "vue";
|
|
50
|
+
import { onUnmounted } from "vue";
|
|
51
|
+
import FixedContainer from "../structural/FixedContainer.vue";
|
|
52
|
+
import { useViewportDetector } from "../../utils";
|
|
53
|
+
|
|
54
|
+
const fixedContainer = ref();
|
|
55
|
+
const sidebarContainer = ref();
|
|
56
|
+
const sidebarMaxHeight = ref("0px");
|
|
57
|
+
|
|
58
|
+
const headerHeight = ref(0);
|
|
59
|
+
|
|
60
|
+
const { activeViewport } = useViewportDetector();
|
|
61
|
+
|
|
62
|
+
const setSidebarHeight = () => {
|
|
63
|
+
if (sidebarContainer.value)
|
|
64
|
+
sidebarMaxHeight.value = `${
|
|
65
|
+
window.innerHeight -
|
|
66
|
+
sidebarContainer.value.offsetTop -
|
|
67
|
+
16 +
|
|
68
|
+
window.scrollY
|
|
69
|
+
}px`;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const setHeaderHeight = () => {
|
|
73
|
+
headerHeight.value =
|
|
74
|
+
(
|
|
75
|
+
document.querySelector(
|
|
76
|
+
`#page-header ${
|
|
77
|
+
activeViewport.value.lg
|
|
78
|
+
? ".main-header"
|
|
79
|
+
: ".content-container.macro-steps"
|
|
80
|
+
}`
|
|
81
|
+
) as HTMLElement
|
|
82
|
+
)?.offsetHeight || 0;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
onMounted(() => {
|
|
86
|
+
setHeaderHeight();
|
|
87
|
+
window.addEventListener("resize", setHeaderHeight);
|
|
88
|
+
|
|
89
|
+
if (activeViewport.value.lg) {
|
|
90
|
+
setSidebarHeight();
|
|
91
|
+
window.addEventListener("scroll", setSidebarHeight);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
onUnmounted(() => {
|
|
96
|
+
window.removeEventListener("scroll", setSidebarHeight);
|
|
97
|
+
window.removeEventListener("resize", setHeaderHeight);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
defineEmits(["btn:previous"]);
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style lang="scss" scoped>
|
|
104
|
+
.results-container {
|
|
105
|
+
.results-grid {
|
|
106
|
+
padding-top: 24px;
|
|
107
|
+
padding-bottom: 16px;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.back-container {
|
|
111
|
+
margin-bottom: 24px;
|
|
112
|
+
|
|
113
|
+
button {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: 5px;
|
|
117
|
+
font-weight: 700;
|
|
118
|
+
font-size: 15px;
|
|
119
|
+
line-height: 29px;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
border: none;
|
|
122
|
+
padding: 0;
|
|
123
|
+
background: none;
|
|
124
|
+
|
|
125
|
+
&:focus {
|
|
126
|
+
outline: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[class*="m-cgg-icon-"] {
|
|
130
|
+
font-size: 11px;
|
|
131
|
+
font-weight: 700;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.sidebar-container {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
padding: 24px 16px;
|
|
141
|
+
background: #ffffff;
|
|
142
|
+
border: 1px solid #dedede;
|
|
143
|
+
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
|
|
144
|
+
border-radius: 16px;
|
|
145
|
+
|
|
146
|
+
&.position-fixed {
|
|
147
|
+
max-height: 100%;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.sidebar-body {
|
|
151
|
+
overflow-y: auto;
|
|
152
|
+
overflow-x: hidden;
|
|
153
|
+
flex-grow: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FixedContainer
|
|
3
|
+
ref="fixedContainer"
|
|
4
|
+
:scrollThreshold="-headerHeight - 16"
|
|
5
|
+
:position="{ top: `${headerHeight + 16}px`, bottom: '16px' }"
|
|
6
|
+
>
|
|
7
|
+
<div
|
|
8
|
+
ref="sidebarContainer"
|
|
9
|
+
class="sidebar-container"
|
|
10
|
+
:class="{ 'position-fixed': fixedContainer?.positionFixed }"
|
|
11
|
+
:style="{
|
|
12
|
+
maxHeight: !fixedContainer?.positionFixed ? sidebarMaxHeight : '',
|
|
13
|
+
}"
|
|
14
|
+
>
|
|
15
|
+
<div class="sidebar-body">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</FixedContainer>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts" setup>
|
|
23
|
+
import { ref } from "vue";
|
|
24
|
+
import { onMounted } from "vue";
|
|
25
|
+
import { onUnmounted } from "vue";
|
|
26
|
+
import FixedContainer from "../structural/FixedContainer.vue";
|
|
27
|
+
|
|
28
|
+
const fixedContainer = ref();
|
|
29
|
+
const sidebarContainer = ref();
|
|
30
|
+
const sidebarMaxHeight = ref();
|
|
31
|
+
|
|
32
|
+
const headerHeight = ref(0);
|
|
33
|
+
|
|
34
|
+
const setSidebarHeight = () => {
|
|
35
|
+
sidebarMaxHeight.value = `${
|
|
36
|
+
window.innerHeight - sidebarContainer.value.offsetTop - 16 + window.scrollY
|
|
37
|
+
}px`;
|
|
38
|
+
|
|
39
|
+
headerHeight.value = (
|
|
40
|
+
document.querySelector("#page-header .main-header") as HTMLElement
|
|
41
|
+
).offsetHeight;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
onMounted(() => {
|
|
45
|
+
setSidebarHeight();
|
|
46
|
+
window.addEventListener("scroll", setSidebarHeight);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
onUnmounted(() => {
|
|
50
|
+
window.removeEventListener("scroll", setSidebarHeight);
|
|
51
|
+
});
|
|
52
|
+
</script>
|
|
53
|
+
|
|
54
|
+
<style lang="scss" scoped>
|
|
55
|
+
.sidebar-container {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
padding: 24px 16px;
|
|
59
|
+
background: #ffffff;
|
|
60
|
+
border: 1px solid #dedede;
|
|
61
|
+
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
|
|
62
|
+
border-radius: 16px;
|
|
63
|
+
|
|
64
|
+
&.position-fixed {
|
|
65
|
+
max-height: 100%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.sidebar-body {
|
|
69
|
+
overflow-y: auto;
|
|
70
|
+
overflow-x: hidden;
|
|
71
|
+
flex-grow: 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<InputContainer :layout="'vertical'">
|
|
3
|
+
<div class="input-container-checkbox">
|
|
4
|
+
<label>
|
|
5
|
+
<input
|
|
6
|
+
type="checkbox"
|
|
7
|
+
:checked="value"
|
|
8
|
+
@change="(event) => $emit('update:modelValue', (<HTMLInputElement>event.target).checked)"
|
|
9
|
+
/>
|
|
10
|
+
<div class="checkbox-icon m-cgg-icon--check2"></div>
|
|
11
|
+
<div class="text-container" v-html="label"></div>
|
|
12
|
+
</label>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<InputError :error="errorMessage" v-if="errorMessage && errorDisplay" />
|
|
16
|
+
</InputContainer>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import { useField } from "vee-validate";
|
|
21
|
+
import InputError from "./structure/InputError.vue";
|
|
22
|
+
import InputContainer from "./structure/InputContainer.vue";
|
|
23
|
+
|
|
24
|
+
const props = withDefaults(
|
|
25
|
+
defineProps<{
|
|
26
|
+
label: string;
|
|
27
|
+
modelValue: HTMLInputElement["checked"] | undefined;
|
|
28
|
+
errorDisplay?: boolean;
|
|
29
|
+
validation?: any;
|
|
30
|
+
}>(),
|
|
31
|
+
{
|
|
32
|
+
errorDisplay: true,
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const { value, errorMessage, meta, validate } = useField(
|
|
37
|
+
"input",
|
|
38
|
+
props.validation,
|
|
39
|
+
{ initialValue: props.modelValue }
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
defineExpose({ errorMessage, meta, validate });
|
|
43
|
+
|
|
44
|
+
defineEmits(["update:modelValue"]);
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="scss" scoped>
|
|
48
|
+
.input-container-checkbox {
|
|
49
|
+
label {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
flex-wrap: nowrap;
|
|
53
|
+
gap: 15px;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
margin: 0;
|
|
56
|
+
font-weight: 400;
|
|
57
|
+
|
|
58
|
+
input {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.checkbox-icon {
|
|
63
|
+
position: relative;
|
|
64
|
+
|
|
65
|
+
&:after {
|
|
66
|
+
content: "";
|
|
67
|
+
display: block;
|
|
68
|
+
width: 22px;
|
|
69
|
+
height: 22px;
|
|
70
|
+
border-radius: 3px;
|
|
71
|
+
border: 1px solid #cccbc8;
|
|
72
|
+
color: #77aa43;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:before {
|
|
76
|
+
position: absolute;
|
|
77
|
+
opacity: 0;
|
|
78
|
+
font-size: 20px;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
input:checked + .checkbox-icon:before {
|
|
83
|
+
opacity: 1;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.text-container {
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
line-height: 14px;
|
|
89
|
+
user-select: none;
|
|
90
|
+
|
|
91
|
+
:deep(a) {
|
|
92
|
+
color: inherit;
|
|
93
|
+
font-weight: 700;
|
|
94
|
+
text-decoration: underline;
|
|
95
|
+
|
|
96
|
+
&:hover {
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<InputContainer v-bind="{ layout }">
|
|
3
|
+
<InputTitle v-bind="{ title, tooltip, size, disabled }" v-if="title" />
|
|
4
|
+
|
|
5
|
+
<div
|
|
6
|
+
class="input-wrapper"
|
|
7
|
+
:class="{
|
|
8
|
+
error: errorMessage,
|
|
9
|
+
}"
|
|
10
|
+
>
|
|
11
|
+
<input
|
|
12
|
+
:class="[`size-${size}`]"
|
|
13
|
+
type="text"
|
|
14
|
+
:id="id"
|
|
15
|
+
:placeholder="placeholder && placeholder"
|
|
16
|
+
:disabled="disabled"
|
|
17
|
+
ref="inputRef"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<span class="input-currency">
|
|
21
|
+
{{ currency }}
|
|
22
|
+
</span>
|
|
23
|
+
</div>
|
|
24
|
+
|
|
25
|
+
<InputError :error="errorMessage" v-if="errorMessage && errorDisplay" />
|
|
26
|
+
</InputContainer>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import { useField } from "vee-validate";
|
|
31
|
+
import { InputHTMLAttributes, watch } from "vue";
|
|
32
|
+
import { CurrencyDisplay, useCurrencyInput } from "vue-currency-input";
|
|
33
|
+
import InputContainer from "./structure/InputContainer.vue";
|
|
34
|
+
import InputTitle from "./structure/InputTitle.vue";
|
|
35
|
+
import InputError from "./structure/InputError.vue";
|
|
36
|
+
|
|
37
|
+
const props = withDefaults(
|
|
38
|
+
defineProps<{
|
|
39
|
+
title?: string;
|
|
40
|
+
tooltip?: string;
|
|
41
|
+
placeholder?: InputHTMLAttributes["placeholder"];
|
|
42
|
+
layout?: "vertical" | "horizontal";
|
|
43
|
+
size?: "sm" | "md" | "lg";
|
|
44
|
+
validation?: any;
|
|
45
|
+
errorDisplay?: boolean;
|
|
46
|
+
modelValue: InputHTMLAttributes["value"];
|
|
47
|
+
id?: InputHTMLAttributes["id"];
|
|
48
|
+
disabled?: InputHTMLAttributes["disabled"];
|
|
49
|
+
currency?: string;
|
|
50
|
+
}>(),
|
|
51
|
+
{
|
|
52
|
+
layout: "vertical",
|
|
53
|
+
size: "md",
|
|
54
|
+
currency: "€",
|
|
55
|
+
errorDisplay: true,
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const { inputRef, setValue: setCurrency } = useCurrencyInput({
|
|
60
|
+
currency: "EUR",
|
|
61
|
+
locale: "de-DE",
|
|
62
|
+
hideCurrencySymbolOnFocus: false,
|
|
63
|
+
hideGroupingSeparatorOnFocus: false,
|
|
64
|
+
currencyDisplay: CurrencyDisplay.hidden,
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const { errorMessage, meta, validate, setValue } = useField(
|
|
68
|
+
"input",
|
|
69
|
+
props.validation,
|
|
70
|
+
{ initialValue: props.modelValue }
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
watch(
|
|
74
|
+
() => props.modelValue,
|
|
75
|
+
(newVal) => {
|
|
76
|
+
setValue(newVal);
|
|
77
|
+
setCurrency(newVal);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const emit = defineEmits(["update:modelValue", "change"]);
|
|
82
|
+
|
|
83
|
+
defineExpose({ errorMessage, meta, validate });
|
|
84
|
+
</script>
|
|
85
|
+
|
|
86
|
+
<style lang="scss" scoped>
|
|
87
|
+
@import "../../assets/forms.scss";
|
|
88
|
+
|
|
89
|
+
.input-wrapper {
|
|
90
|
+
position: relative;
|
|
91
|
+
|
|
92
|
+
input {
|
|
93
|
+
@include input-template;
|
|
94
|
+
padding-right: 24px;
|
|
95
|
+
|
|
96
|
+
&:focus {
|
|
97
|
+
+ .input-currency {
|
|
98
|
+
color: #0d2745;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&:disabled {
|
|
103
|
+
+ .input-currency {
|
|
104
|
+
color: $input-disabled-color;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.error {
|
|
110
|
+
input {
|
|
111
|
+
@include input-error;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.input-currency {
|
|
116
|
+
position: absolute;
|
|
117
|
+
top: 50%;
|
|
118
|
+
transform: translateY(-50%);
|
|
119
|
+
right: 8px;
|
|
120
|
+
line-height: 16px;
|
|
121
|
+
font-size: 16px;
|
|
122
|
+
color: #9fabbc;
|
|
123
|
+
transition: color 0.1s ease-in;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
</style>
|