cja-phoenix 0.0.13 → 0.0.14
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 +2234 -2251
- package/dist/style.css +1 -1
- package/dist/types/components/forms/InputTitle.vue.d.ts +17 -0
- package/dist/types/components/forms/PhoneInput.vue.d.ts +50 -53
- package/dist/types/components/forms/SelectInput.vue.d.ts +1 -1
- package/dist/types/components/forms/TextInput.vue.d.ts +4 -2
- package/package.json +5 -5
- package/src/assets/forms.scss +0 -12
- package/src/assets/iconia/fonts/CGG-icomoon.eot +0 -0
- package/src/assets/iconia/fonts/CGG-icomoon.svg +1 -1
- 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 +5 -5
- package/src/assets/iconia/style.scss +5 -5
- package/src/components/composite/ProductDetails.vue +27 -38
- package/src/components/forms/InputTitle.vue +43 -0
- package/src/components/forms/PhoneInput.vue +26 -28
- package/src/components/forms/SelectInput.vue +2 -4
- package/src/components/forms/TextInput.vue +7 -3
- package/src/index.ts +0 -2
|
@@ -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?cjnnpy');
|
|
4
|
+
src: url('fonts/CGG-icomoon.eot?cjnnpy#iefix') format('embedded-opentype'),
|
|
5
|
+
url('fonts/CGG-icomoon.ttf?cjnnpy') format('truetype'),
|
|
6
|
+
url('fonts/CGG-icomoon.woff?cjnnpy') format('woff'),
|
|
7
|
+
url('fonts/CGG-icomoon.svg?cjnnpy#CGG-icomoon') format('svg');
|
|
8
8
|
font-weight: normal;
|
|
9
9
|
font-style: normal;
|
|
10
10
|
font-display: block;
|
|
@@ -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?cjnnpy');
|
|
6
|
+
src: url('#{$icomoon-font-path}/#{$icomoon-font-family}.eot?cjnnpy#iefix') format('embedded-opentype'),
|
|
7
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.ttf?cjnnpy') format('truetype'),
|
|
8
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.woff?cjnnpy') format('woff'),
|
|
9
|
+
url('#{$icomoon-font-path}/#{$icomoon-font-family}.svg?cjnnpy##{$icomoon-font-family}') format('svg');
|
|
10
10
|
font-weight: normal;
|
|
11
11
|
font-style: normal;
|
|
12
12
|
font-display: block;
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="body">
|
|
3
3
|
<Transition name="details">
|
|
4
|
-
<div
|
|
5
|
-
class="overlay"
|
|
6
|
-
v-if="active"
|
|
7
|
-
:style="{ height: overlayHeight }"
|
|
8
|
-
@click.self="closeDetails"
|
|
9
|
-
>
|
|
4
|
+
<div class="overlay" v-if="active" @click.self="closeDetails">
|
|
10
5
|
<div ref="detailsEl" class="details-container">
|
|
11
6
|
<div class="details-header">
|
|
12
7
|
<slot name="header"></slot>
|
|
@@ -15,7 +10,7 @@
|
|
|
15
10
|
<span class="m-cgg-icon--cross2"></span>
|
|
16
11
|
</div>
|
|
17
12
|
</div>
|
|
18
|
-
<div class="details-
|
|
13
|
+
<div class="details-body">
|
|
19
14
|
<slot name="body"></slot>
|
|
20
15
|
</div>
|
|
21
16
|
<div class="details-footer" v-if="$slots.footer">
|
|
@@ -28,37 +23,18 @@
|
|
|
28
23
|
</template>
|
|
29
24
|
|
|
30
25
|
<script lang="ts" setup>
|
|
31
|
-
import { ref, watch } from "vue";
|
|
26
|
+
import { ref, watch, computed } from "vue";
|
|
32
27
|
|
|
33
28
|
const active = ref();
|
|
34
29
|
const detailsEl = ref();
|
|
35
|
-
const
|
|
30
|
+
const headerEl = ref();
|
|
31
|
+
const bodyEl = ref();
|
|
32
|
+
const footerEl = ref();
|
|
36
33
|
|
|
37
34
|
watch(active, () => {
|
|
38
35
|
if (active.value) {
|
|
39
36
|
document.body.style.overflow = "hidden";
|
|
40
37
|
document.documentElement.style.overflow = "hidden";
|
|
41
|
-
|
|
42
|
-
if (window.outerWidth >= 992) {
|
|
43
|
-
requestAnimationFrame(() => {
|
|
44
|
-
const pageHeader = document.querySelector(".header") as HTMLElement;
|
|
45
|
-
const appHeader = document.querySelector("#app header") as HTMLElement;
|
|
46
|
-
const comboOffset = appHeader
|
|
47
|
-
? pageHeader.clientHeight + appHeader.clientHeight
|
|
48
|
-
: pageHeader.clientHeight;
|
|
49
|
-
const headerOffset = appHeader?.clientHeight;
|
|
50
|
-
|
|
51
|
-
if (appHeader?.classList.contains("position-fixed")) {
|
|
52
|
-
overlayHeight.value = `calc(100% - ${headerOffset}px)`;
|
|
53
|
-
} else if (window.pageYOffset < comboOffset) {
|
|
54
|
-
overlayHeight.value = `calc(100% - ${
|
|
55
|
-
comboOffset - window.pageYOffset
|
|
56
|
-
}px)`;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
} else {
|
|
60
|
-
overlayHeight.value = "";
|
|
61
|
-
}
|
|
62
38
|
} else {
|
|
63
39
|
document.body.style.overflow = "";
|
|
64
40
|
document.documentElement.style.overflow = "";
|
|
@@ -90,23 +66,31 @@ defineExpose({ openDetails, closeDetails });
|
|
|
90
66
|
}
|
|
91
67
|
|
|
92
68
|
.details-container {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
93
71
|
position: absolute;
|
|
94
72
|
top: 0;
|
|
95
73
|
right: 0;
|
|
96
74
|
background-color: #fff;
|
|
97
|
-
height:
|
|
75
|
+
height: 100%;
|
|
98
76
|
transition: all 0.3s linear;
|
|
99
77
|
|
|
100
78
|
@media screen and (min-width: 992px) {
|
|
101
|
-
|
|
79
|
+
width: 620px;
|
|
102
80
|
}
|
|
103
81
|
|
|
104
82
|
.details-header {
|
|
105
83
|
display: flex;
|
|
106
84
|
justify-content: space-between;
|
|
85
|
+
gap: 15px;
|
|
107
86
|
align-items: center;
|
|
108
87
|
background-color: #fff;
|
|
109
|
-
padding:
|
|
88
|
+
padding: 15px;
|
|
89
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
|
90
|
+
|
|
91
|
+
@media screen and (min-width: 992px) {
|
|
92
|
+
padding: 20px 50px;
|
|
93
|
+
}
|
|
110
94
|
|
|
111
95
|
.btn-close {
|
|
112
96
|
display: flex;
|
|
@@ -121,19 +105,24 @@ defineExpose({ openDetails, closeDetails });
|
|
|
121
105
|
}
|
|
122
106
|
}
|
|
123
107
|
|
|
124
|
-
.details-
|
|
108
|
+
.details-body {
|
|
109
|
+
flex-grow: 1;
|
|
125
110
|
position: relative;
|
|
126
|
-
max-height: 100%;
|
|
127
111
|
overflow-y: auto;
|
|
128
|
-
padding:
|
|
112
|
+
padding: 15px 15px 30px;
|
|
129
113
|
|
|
130
114
|
@media screen and (min-width: 992px) {
|
|
131
|
-
|
|
115
|
+
padding: 20px 50px 50px;
|
|
132
116
|
}
|
|
133
117
|
}
|
|
134
118
|
|
|
135
119
|
.details-footer {
|
|
136
|
-
padding:
|
|
120
|
+
padding: 15px;
|
|
121
|
+
box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
|
|
122
|
+
|
|
123
|
+
@media screen and (min-width: 992px) {
|
|
124
|
+
padding: 20px 50px;
|
|
125
|
+
}
|
|
137
126
|
}
|
|
138
127
|
}
|
|
139
128
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="input-title" v-if="title">
|
|
3
|
+
<span>{{ title }}</span>
|
|
4
|
+
<span
|
|
5
|
+
v-if="tooltip"
|
|
6
|
+
class="tooltip m-cgg-icon--help"
|
|
7
|
+
v-tippy="tooltip"
|
|
8
|
+
></span>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts" setup>
|
|
13
|
+
const props = defineProps<{
|
|
14
|
+
title: string;
|
|
15
|
+
tooltip?: string;
|
|
16
|
+
}>();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
|
+
.input-title {
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
gap: 10px;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
line-height: 18px;
|
|
26
|
+
font-weight: bold;
|
|
27
|
+
margin-bottom: 10px;
|
|
28
|
+
|
|
29
|
+
@media screen and (min-width: 768px) {
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
line-height: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tooltip {
|
|
35
|
+
font-size: 18px;
|
|
36
|
+
color: #076b9c;
|
|
37
|
+
|
|
38
|
+
@media screen and (min-width: 768px) {
|
|
39
|
+
font-size: 20px;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="form-group">
|
|
3
|
-
<
|
|
3
|
+
<InputTitle v-bind="{ title, tooltip }" v-if="title" />
|
|
4
4
|
|
|
5
5
|
<div class="input-container" :class="{ error: errorMessage }">
|
|
6
6
|
<input
|
|
7
7
|
ref="inputEl"
|
|
8
8
|
:id="id"
|
|
9
|
-
v-maska
|
|
9
|
+
v-maska
|
|
10
|
+
data-maska="#########"
|
|
10
11
|
:placeholder="placeholder && placeholder"
|
|
11
12
|
type="tel"
|
|
12
13
|
:value="value"
|
|
@@ -26,34 +27,31 @@
|
|
|
26
27
|
<script lang="ts" setup>
|
|
27
28
|
import { useField } from "vee-validate";
|
|
28
29
|
import intlTelInput from "intl-tel-input";
|
|
29
|
-
import { ref, onMounted, watch } from "vue";
|
|
30
|
+
import { ref, onMounted, watch, InputHTMLAttributes } from "vue";
|
|
31
|
+
import { vMaska } from "maska";
|
|
32
|
+
import InputTitle from "./InputTitle.vue";
|
|
30
33
|
|
|
31
34
|
const inputEl = ref();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
validation: Object,
|
|
54
|
-
autocomplete: String,
|
|
55
|
-
id: String,
|
|
56
|
-
});
|
|
35
|
+
|
|
36
|
+
const props = withDefaults(
|
|
37
|
+
defineProps<{
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
title?: string;
|
|
40
|
+
tooltip?: string;
|
|
41
|
+
modelValue: InputHTMLAttributes["value"];
|
|
42
|
+
phoneCountryCode: number;
|
|
43
|
+
errorDisplay?: boolean;
|
|
44
|
+
validation?: any;
|
|
45
|
+
autocomplete?: InputHTMLAttributes["autocomplete"];
|
|
46
|
+
id?: InputHTMLAttributes["id"];
|
|
47
|
+
}>(),
|
|
48
|
+
{
|
|
49
|
+
placeholder: "",
|
|
50
|
+
modelValue: "",
|
|
51
|
+
errorDisplay: true,
|
|
52
|
+
phoneCountryCode: 351,
|
|
53
|
+
}
|
|
54
|
+
);
|
|
57
55
|
|
|
58
56
|
const { value, errorMessage, meta, validate, setValue } = useField(
|
|
59
57
|
"input",
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="form-group">
|
|
3
|
-
<
|
|
4
|
-
<span>{{ title }}</span>
|
|
5
|
-
<span v-if="tooltip" class="tooltip" v-tippy="tooltip">?</span>
|
|
6
|
-
</div>
|
|
3
|
+
<InputTitle v-bind="{ title, tooltip }" v-if="title" />
|
|
7
4
|
|
|
8
5
|
<div
|
|
9
6
|
ref="inputEl"
|
|
@@ -73,6 +70,7 @@ import {
|
|
|
73
70
|
SelectHTMLAttributes,
|
|
74
71
|
} from "vue";
|
|
75
72
|
import { SelectOption } from "../../types/SelectOption";
|
|
73
|
+
import InputTitle from "./InputTitle.vue";
|
|
76
74
|
|
|
77
75
|
const open = ref(false);
|
|
78
76
|
const search = ref("");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="form-group">
|
|
3
|
-
<
|
|
3
|
+
<InputTitle v-bind="{ title, tooltip }" v-if="title" />
|
|
4
4
|
|
|
5
5
|
<div
|
|
6
6
|
class="input-container"
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
}"
|
|
10
10
|
>
|
|
11
11
|
<input
|
|
12
|
-
v-maska
|
|
12
|
+
v-maska
|
|
13
|
+
:data-maska="mask"
|
|
13
14
|
:id="id"
|
|
14
15
|
:inputmode="inputmode"
|
|
15
16
|
:placeholder="placeholder && placeholder"
|
|
@@ -42,13 +43,16 @@ import {
|
|
|
42
43
|
onMounted,
|
|
43
44
|
ref,
|
|
44
45
|
} from "vue";
|
|
46
|
+
import { vMaska } from "maska";
|
|
47
|
+
import InputTitle from "./InputTitle.vue";
|
|
45
48
|
|
|
46
49
|
const props = withDefaults(
|
|
47
50
|
defineProps<{
|
|
51
|
+
title?: string;
|
|
52
|
+
tooltip?: string;
|
|
48
53
|
mask?: string;
|
|
49
54
|
placeholder?: InputHTMLAttributes["placeholder"];
|
|
50
55
|
icon?: string;
|
|
51
|
-
title?: string;
|
|
52
56
|
inputmode?: HTMLAttributes["inputmode"];
|
|
53
57
|
type?: InputHTMLAttributes["type"];
|
|
54
58
|
error?: string;
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { App } from "vue";
|
|
2
2
|
import * as components from "./components";
|
|
3
|
-
import Maska from "maska";
|
|
4
3
|
import VueTippy from "vue-tippy";
|
|
5
4
|
|
|
6
5
|
function install(app: App) {
|
|
@@ -9,7 +8,6 @@ function install(app: App) {
|
|
|
9
8
|
app.component(key, components[key]);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
app.use(Maska);
|
|
13
11
|
app.use(VueTippy, {
|
|
14
12
|
defaultProps: { theme: "light-border", allowHTML: true },
|
|
15
13
|
});
|