cja-phoenix 0.2.14 → 0.2.16
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 +1690 -1656
- package/dist/style.css +1 -1
- package/dist/types/components/composite/CjaMenuBar.vue.d.ts +4 -1
- package/dist/types/components/forms/RadioInput.vue.d.ts +2 -0
- package/dist/types/components/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/assets/iconia/demo.html +29 -1
- package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.svg +2 -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 -1
- package/src/assets/iconia/style.css +11 -5
- package/src/assets/iconia/style.scss +15 -5
- package/src/assets/iconia/variables.scss +2 -0
- package/src/components/composite/CjaMenuBar.vue +48 -30
- package/src/components/composite/JourneyMacroSteps.vue +2 -2
- package/src/components/composite/ResultsLayout.vue +94 -5
- package/src/components/composite/ResultsSidebar.vue +8 -2
- package/src/components/forms/RadioInput.vue +10 -3
- package/src/components/forms/{InputToggle.vue → ToggleInput.vue} +0 -4
- package/src/components/index.ts +2 -2
- package/src/components/structural/FixedContainer.vue +2 -0
- /package/dist/types/components/forms/{InputToggle.vue.d.ts → ToggleInput.vue.d.ts} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
@font-face {
|
|
2
2
|
font-family: 'CGG-icomoon';
|
|
3
|
-
src: url('fonts/CGG-icomoon.eot?
|
|
4
|
-
src: url('fonts/CGG-icomoon.eot?
|
|
5
|
-
url('fonts/CGG-icomoon.ttf?
|
|
6
|
-
url('fonts/CGG-icomoon.woff?
|
|
7
|
-
url('fonts/CGG-icomoon.svg?
|
|
3
|
+
src: url('fonts/CGG-icomoon.eot?581rb2');
|
|
4
|
+
src: url('fonts/CGG-icomoon.eot?581rb2#iefix') format('embedded-opentype'),
|
|
5
|
+
url('fonts/CGG-icomoon.ttf?581rb2') format('truetype'),
|
|
6
|
+
url('fonts/CGG-icomoon.woff?581rb2') format('woff'),
|
|
7
|
+
url('fonts/CGG-icomoon.svg?581rb2#CGG-icomoon') format('svg');
|
|
8
8
|
font-weight: normal;
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-display: block;
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
-moz-osx-font-smoothing: grayscale;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.m-cgg-icon--filters:before {
|
|
29
|
+
content: "\ea31";
|
|
30
|
+
}
|
|
31
|
+
.m-cgg-icon--search:before {
|
|
32
|
+
content: "\ea32";
|
|
33
|
+
}
|
|
28
34
|
.m-cgg-icon--macro-step-contact:before {
|
|
29
35
|
content: "\ea24";
|
|
30
36
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
@font-face {
|
|
4
4
|
font-family: '#{$icomoon-font-family}';
|
|
5
|
-
src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?
|
|
6
|
-
src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?
|
|
7
|
-
url('#{$icomoon-font-path}/#{$icomoon-font-family}.ttf?
|
|
8
|
-
url('#{$icomoon-font-path}/#{$icomoon-font-family}.woff?
|
|
9
|
-
url('#{$icomoon-font-path}/#{$icomoon-font-family}.svg?
|
|
5
|
+
src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?581rb2');
|
|
6
|
+
src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?581rb2#iefix') format('embedded-opentype'),
|
|
7
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.ttf?581rb2') format('truetype'),
|
|
8
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.woff?581rb2') format('woff'),
|
|
9
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.svg?581rb2##{$icomoon-font-family}') format('svg');
|
|
10
10
|
font-weight: normal;
|
|
11
11
|
font-style: normal;
|
|
12
12
|
font-display: block;
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
-moz-osx-font-smoothing: grayscale;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
.m-cgg-icon--filters {
|
|
31
|
+
&:before {
|
|
32
|
+
content: $m-cgg-icon--filters;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
.m-cgg-icon--search {
|
|
36
|
+
&:before {
|
|
37
|
+
content: $m-cgg-icon--search;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
30
40
|
.m-cgg-icon--macro-step-contact {
|
|
31
41
|
&:before {
|
|
32
42
|
content: $m-cgg-icon--macro-step-contact;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
$icomoon-font-family: "CGG-icomoon" !default;
|
|
2
2
|
$icomoon-font-path: "fonts" !default;
|
|
3
3
|
|
|
4
|
+
$m-cgg-icon--filters: "\ea31";
|
|
5
|
+
$m-cgg-icon--search: "\ea32";
|
|
4
6
|
$m-cgg-icon--macro-step-contact: "\ea24";
|
|
5
7
|
$m-cgg-icon--macro-step-checkout: "\ea2e";
|
|
6
8
|
$m-cgg-icon--macro-step-results: "\ea2f";
|
|
@@ -1,49 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<header class="main-header-container" id="page-header">
|
|
3
|
-
<
|
|
4
|
-
<div class="
|
|
5
|
-
<div class="
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<img :src="baseImgUrl + 'CPJ-logo-header.svg'" v-else />
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
<div
|
|
13
|
-
class="content-container macro-steps"
|
|
14
|
-
v-if="activeViewport.lg && $slots['macro-steps']"
|
|
15
|
-
>
|
|
16
|
-
<slot name="macro-steps"></slot>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="side-info" v-if="sideInfo">
|
|
19
|
-
<slot name="side">
|
|
20
|
-
<div class="contact-container">
|
|
21
|
-
<a class="contact" href="tel:211165765">
|
|
22
|
-
<span class="m-cgg-icon--phone"></span>
|
|
23
|
-
<span class="number">211 165 765</span>
|
|
3
|
+
<FixedContainer :active="activeViewport.lg" :size="{ width: '100%' }">
|
|
4
|
+
<div class="main-header">
|
|
5
|
+
<div class="logo-container">
|
|
6
|
+
<div class="log-wrapper">
|
|
7
|
+
<a href="/" v-if="homeNavigationEnabled">
|
|
8
|
+
<img :src="baseImgUrl + 'CPJ-logo-header.svg'" />
|
|
24
9
|
</a>
|
|
25
|
-
<
|
|
10
|
+
<img :src="baseImgUrl + 'CPJ-logo-header.svg'" v-else />
|
|
26
11
|
</div>
|
|
27
|
-
</
|
|
12
|
+
</div>
|
|
13
|
+
<div
|
|
14
|
+
class="content-container macro-steps"
|
|
15
|
+
v-if="activeViewport.lg && macroStepList"
|
|
16
|
+
>
|
|
17
|
+
<JourneyMacroSteps :stepList="macroStepList" />
|
|
18
|
+
</div>
|
|
19
|
+
<div
|
|
20
|
+
class="content-container"
|
|
21
|
+
v-else-if="activeViewport.lg && $slots.content"
|
|
22
|
+
>
|
|
23
|
+
<slot name="content"></slot>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="side-info" v-if="sideInfo">
|
|
26
|
+
<slot name="side">
|
|
27
|
+
<div class="contact-container">
|
|
28
|
+
<a class="contact" href="tel:211165765">
|
|
29
|
+
<span class="m-cgg-icon--phone"></span>
|
|
30
|
+
<span class="number">211 165 765</span>
|
|
31
|
+
</a>
|
|
32
|
+
<div class="time">Seg - Sex: 10h às 19h</div>
|
|
33
|
+
</div>
|
|
34
|
+
</slot>
|
|
35
|
+
</div>
|
|
28
36
|
</div>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
<FixedContainer
|
|
38
|
+
v-if="!activeViewport.lg && macroStepList"
|
|
39
|
+
:size="{ width: '100%' }"
|
|
40
|
+
:position="{ left: '0', top: '0' }"
|
|
41
|
+
>
|
|
42
|
+
<div class="content-container macro-steps">
|
|
43
|
+
<JourneyMacroSteps :stepList="macroStepList" />
|
|
44
|
+
</div>
|
|
45
|
+
</FixedContainer>
|
|
46
|
+
</FixedContainer>
|
|
36
47
|
</header>
|
|
37
48
|
</template>
|
|
38
49
|
|
|
39
50
|
<script lang="ts" setup>
|
|
40
51
|
import { inject } from "vue";
|
|
52
|
+
import FixedContainer from "../structural/FixedContainer.vue";
|
|
53
|
+
import { MacroStep } from "../../types";
|
|
54
|
+
import JourneyMacroSteps from "./JourneyMacroSteps.vue";
|
|
41
55
|
|
|
42
56
|
const activeViewport: any = inject("activeViewport");
|
|
43
57
|
withDefaults(
|
|
44
58
|
defineProps<{
|
|
45
59
|
homeNavigationEnabled?: boolean;
|
|
46
60
|
sideInfo?: boolean;
|
|
61
|
+
macroStepList?: MacroStep[];
|
|
47
62
|
}>(),
|
|
48
63
|
{
|
|
49
64
|
homeNavigationEnabled: true,
|
|
@@ -58,6 +73,9 @@ const baseImgUrl = process.env.VUE_APP_IMG_URL;
|
|
|
58
73
|
@import "../../assets/shadows.scss";
|
|
59
74
|
|
|
60
75
|
header.main-header-container {
|
|
76
|
+
position: relative;
|
|
77
|
+
z-index: 1;
|
|
78
|
+
|
|
61
79
|
.main-header {
|
|
62
80
|
position: relative;
|
|
63
81
|
z-index: 1;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="results-container">
|
|
3
|
-
<
|
|
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>
|
|
4
11
|
<GridContainer class="results-grid">
|
|
5
12
|
<GridItem :size-lg="3" v-if="activeViewport.lg">
|
|
6
13
|
<div class="back-container">
|
|
@@ -9,9 +16,24 @@
|
|
|
9
16
|
<span>Voltar</span>
|
|
10
17
|
</button>
|
|
11
18
|
</div>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
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>
|
|
15
37
|
</GridItem>
|
|
16
38
|
<GridItem :size-sm="2" :size-md="4" :size-lg="9">
|
|
17
39
|
<slot name="content"></slot>
|
|
@@ -24,10 +46,57 @@
|
|
|
24
46
|
import { inject } from "vue";
|
|
25
47
|
import GridContainer from "../structural/GridContainer.vue";
|
|
26
48
|
import GridItem from "../structural/GridItem.vue";
|
|
27
|
-
import
|
|
49
|
+
import { ref } from "vue";
|
|
50
|
+
import { onMounted } from "vue";
|
|
51
|
+
import { onUnmounted } from "vue";
|
|
52
|
+
import FixedContainer from "../structural/FixedContainer.vue";
|
|
53
|
+
|
|
54
|
+
const fixedContainer = ref();
|
|
55
|
+
const sidebarContainer = ref();
|
|
56
|
+
const sidebarMaxHeight = ref("0px");
|
|
57
|
+
|
|
58
|
+
const headerHeight = ref(0);
|
|
28
59
|
|
|
29
60
|
const activeViewport: any = inject("activeViewport");
|
|
30
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
|
+
|
|
31
100
|
defineEmits(["btn:previous"]);
|
|
32
101
|
</script>
|
|
33
102
|
|
|
@@ -64,4 +133,24 @@ defineEmits(["btn:previous"]);
|
|
|
64
133
|
}
|
|
65
134
|
}
|
|
66
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
|
+
}
|
|
67
156
|
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FixedContainer
|
|
3
3
|
ref="fixedContainer"
|
|
4
|
-
:scrollThreshold="-16"
|
|
5
|
-
:position="{ top:
|
|
4
|
+
:scrollThreshold="-headerHeight - 16"
|
|
5
|
+
:position="{ top: `${headerHeight + 16}px`, bottom: '16px' }"
|
|
6
6
|
>
|
|
7
7
|
<div
|
|
8
8
|
ref="sidebarContainer"
|
|
@@ -29,10 +29,16 @@ const fixedContainer = ref();
|
|
|
29
29
|
const sidebarContainer = ref();
|
|
30
30
|
const sidebarMaxHeight = ref();
|
|
31
31
|
|
|
32
|
+
const headerHeight = ref(0);
|
|
33
|
+
|
|
32
34
|
const setSidebarHeight = () => {
|
|
33
35
|
sidebarMaxHeight.value = `${
|
|
34
36
|
window.innerHeight - sidebarContainer.value.offsetTop - 16 + window.scrollY
|
|
35
37
|
}px`;
|
|
38
|
+
|
|
39
|
+
headerHeight.value = (
|
|
40
|
+
document.querySelector("#page-header .main-header") as HTMLElement
|
|
41
|
+
).offsetHeight;
|
|
36
42
|
};
|
|
37
43
|
|
|
38
44
|
onMounted(() => {
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
@change="handleChange"
|
|
10
10
|
/>
|
|
11
11
|
<div class="radio-icon"></div>
|
|
12
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
class="text-container"
|
|
14
|
+
:class="[`size-${size}`]"
|
|
15
|
+
v-html="label"
|
|
16
|
+
></div>
|
|
13
17
|
</label>
|
|
14
18
|
</div>
|
|
15
19
|
|
|
@@ -26,6 +30,7 @@ const props = withDefaults(
|
|
|
26
30
|
value: any;
|
|
27
31
|
label: string;
|
|
28
32
|
modelValue?: any;
|
|
33
|
+
size?: "sm" | "md" | "lg";
|
|
29
34
|
error?: string;
|
|
30
35
|
errorDisplay?: boolean;
|
|
31
36
|
}>(),
|
|
@@ -44,6 +49,8 @@ const emit = defineEmits(["update:modelValue"]);
|
|
|
44
49
|
</script>
|
|
45
50
|
|
|
46
51
|
<style lang="scss" scoped>
|
|
52
|
+
@import "../../assets/forms.scss";
|
|
53
|
+
|
|
47
54
|
.input-container-radio {
|
|
48
55
|
label {
|
|
49
56
|
display: flex;
|
|
@@ -71,8 +78,8 @@ const emit = defineEmits(["update:modelValue"]);
|
|
|
71
78
|
}
|
|
72
79
|
|
|
73
80
|
.text-container {
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
@include input-title;
|
|
82
|
+
|
|
76
83
|
user-select: none;
|
|
77
84
|
|
|
78
85
|
a {
|
package/src/components/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ import TileCheckboxInput from "./forms/TileCheckboxInput.vue";
|
|
|
17
17
|
import SelectInput from "./forms/SelectInput.vue";
|
|
18
18
|
import FileInput from "./forms/FileInput.vue";
|
|
19
19
|
import NumberInput from "./forms/NumberInput.vue";
|
|
20
|
-
import
|
|
20
|
+
import ToggleInput from "./forms/ToggleInput.vue";
|
|
21
21
|
import SelectionTiles from "./forms/SelectionTiles.vue";
|
|
22
22
|
|
|
23
23
|
import JourneyMacroSteps from "./composite/JourneyMacroSteps.vue";
|
|
@@ -47,7 +47,7 @@ export {
|
|
|
47
47
|
LoadingSpinner,
|
|
48
48
|
Scaffold,
|
|
49
49
|
ProductDetails,
|
|
50
|
-
|
|
50
|
+
ToggleInput,
|
|
51
51
|
FileInput,
|
|
52
52
|
ContentTabs,
|
|
53
53
|
CollapseContainer,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
class="fixed-container"
|
|
4
4
|
:style="{ height: fixedContainerHeight }"
|
|
5
5
|
ref="fixedContainer"
|
|
6
|
+
v-if="active"
|
|
6
7
|
>
|
|
7
8
|
<div
|
|
8
9
|
class="fixed-wrapper"
|
|
@@ -13,6 +14,7 @@
|
|
|
13
14
|
<slot></slot>
|
|
14
15
|
</div>
|
|
15
16
|
</div>
|
|
17
|
+
<slot v-else></slot>
|
|
16
18
|
</template>
|
|
17
19
|
|
|
18
20
|
<script lang="ts" setup>
|
|
File without changes
|