@dative-gpi/foundation-shared-components 1.0.88 → 1.0.89
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/components/FSFadeOut.vue
CHANGED
|
@@ -51,6 +51,11 @@ export default defineComponent({
|
|
|
51
51
|
required: false,
|
|
52
52
|
default: true
|
|
53
53
|
},
|
|
54
|
+
hideHorizontalOverflow: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
required: false,
|
|
57
|
+
default: true
|
|
58
|
+
},
|
|
54
59
|
disableTopMask: {
|
|
55
60
|
type: Boolean,
|
|
56
61
|
required: false,
|
|
@@ -84,11 +89,13 @@ export default defineComponent({
|
|
|
84
89
|
"--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : undefined,
|
|
85
90
|
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
86
91
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
87
|
-
"--fs-fade-out-width-offset"
|
|
92
|
+
"--fs-fade-out-width-offset" : props.scrollOutside ? '12px' : '0px',
|
|
88
93
|
"--fs-fade-out-padding-offset" : props.scrollOutside ? '4px' : '0px',
|
|
94
|
+
"--fs-fade-out-margin-right" : props.scrollOutside ? '-12px' : '0px',
|
|
89
95
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
90
96
|
"--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
|
|
91
|
-
"--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value
|
|
97
|
+
"--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value,
|
|
98
|
+
"--fs-fade-out-x-overflow" : props.hideHorizontalOverflow ? 'hidden' : 'auto'
|
|
92
99
|
}));
|
|
93
100
|
|
|
94
101
|
const handleMasks = () => {
|
package/components/FSLoader.vue
CHANGED
|
@@ -32,7 +32,7 @@ export default defineComponent({
|
|
|
32
32
|
default: "0"
|
|
33
33
|
},
|
|
34
34
|
variant: {
|
|
35
|
-
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-
|
|
35
|
+
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline">,
|
|
36
36
|
required: false,
|
|
37
37
|
default: "standard"
|
|
38
38
|
},
|
|
@@ -51,7 +51,7 @@ export default defineComponent({
|
|
|
51
51
|
const style = computed((): StyleValue => ({
|
|
52
52
|
"--fs-loader-background-color": backgrounds.base,
|
|
53
53
|
"--fs-loader-border-radius" : ["chip"].includes(props.variant) ? "50px" : sizeToVar(props.borderRadius),
|
|
54
|
-
"--fs-loader-padding" : sizeToVar(
|
|
54
|
+
"--fs-loader-padding" : sizeToVar(getPadding.value),
|
|
55
55
|
"--fs-loader-height" : sizeToVar(getHeight.value),
|
|
56
56
|
"--fs-loader-width" : sizeToVar(getWidth.value)
|
|
57
57
|
}));
|
|
@@ -63,17 +63,20 @@ export default defineComponent({
|
|
|
63
63
|
case "input" :
|
|
64
64
|
case "field" : return isMobileSized.value ? "36px" : "40px";
|
|
65
65
|
case "chip" : return isMobileSized.value ? "20px" : "24px";
|
|
66
|
-
|
|
67
|
-
case "text-
|
|
68
|
-
case "text-
|
|
69
|
-
case "text-
|
|
66
|
+
|
|
67
|
+
case "text-h1" : return isMobileSized.value ? "28px" : "36px";
|
|
68
|
+
case "text-h2" : return isMobileSized.value ? "22px" : "26px";
|
|
69
|
+
case "text-h3" : return isMobileSized.value ? "16px" : "20px";
|
|
70
70
|
case "text-body" :
|
|
71
|
-
case "text-button" : return isMobileSized.value ? "
|
|
72
|
-
case "text-overline" : return "
|
|
71
|
+
case "text-button" : return isMobileSized.value ? "12px" : "14px";
|
|
72
|
+
case "text-overline" : return isMobileSized.value ? "10px" : "12px";
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
const getWidth = computed((): string | number => {
|
|
77
|
+
if (props.width != null) {
|
|
78
|
+
return sizeToVar(props.width);
|
|
79
|
+
}
|
|
77
80
|
switch (props.variant) {
|
|
78
81
|
case "standard": return sizeToVar(props.width);
|
|
79
82
|
case "button" : return isMobileSized.value ? "36px" : "40px";
|
|
@@ -87,6 +90,21 @@ export default defineComponent({
|
|
|
87
90
|
}
|
|
88
91
|
});
|
|
89
92
|
|
|
93
|
+
const getPadding = computed((): string | number => {
|
|
94
|
+
if (props.padding !== "0") {
|
|
95
|
+
return sizeToVar(props.padding);
|
|
96
|
+
}
|
|
97
|
+
switch (props.variant) {
|
|
98
|
+
case "text-h1" : return "2px 0";
|
|
99
|
+
case "text-h2" : return isMobileSized.value ? "1px 0" : "3px 0";
|
|
100
|
+
case "text-h3" : return "2px 0";
|
|
101
|
+
case "text-body" :
|
|
102
|
+
case "text-button" : return isMobileSized.value ? "2px 0" : "3px 0";;
|
|
103
|
+
case "text-overline" : return isMobileSized.value ? "3px 0" : "2px 0";
|
|
104
|
+
default : return sizeToVar(props.padding);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
90
108
|
return {
|
|
91
109
|
style
|
|
92
110
|
};
|
package/components/FSWindow.vue
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-window
|
|
3
|
+
ref="windowRoot"
|
|
3
4
|
class="fs-window"
|
|
4
|
-
:style="style"
|
|
5
5
|
:touch="false"
|
|
6
|
+
:style="style"
|
|
7
|
+
:modelValue="$props.modelValue"
|
|
8
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
6
9
|
v-bind="$attrs"
|
|
7
10
|
>
|
|
8
11
|
<template
|
|
@@ -28,7 +31,7 @@
|
|
|
28
31
|
</template>
|
|
29
32
|
|
|
30
33
|
<script lang="ts">
|
|
31
|
-
import { computed, defineComponent, type PropType, type StyleValue, type VNode } from "vue";
|
|
34
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, type VNode, watch } from "vue";
|
|
32
35
|
|
|
33
36
|
import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
34
37
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
@@ -45,23 +48,43 @@ export default defineComponent({
|
|
|
45
48
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
46
49
|
required: false,
|
|
47
50
|
default: null
|
|
51
|
+
},
|
|
52
|
+
modelValue: {
|
|
53
|
+
type: [String, Number, Object] as PropType<any>,
|
|
54
|
+
required: false,
|
|
55
|
+
default: 0
|
|
48
56
|
}
|
|
49
57
|
},
|
|
58
|
+
emits: ["update:modelValue"],
|
|
50
59
|
setup(props) {
|
|
51
60
|
const { slots, getChildren } = useSlots();
|
|
52
61
|
|
|
53
62
|
delete slots.default;
|
|
54
63
|
|
|
64
|
+
const windowRoot = ref<HTMLElement | null>(null);
|
|
65
|
+
|
|
55
66
|
const style = computed((): StyleValue => ({
|
|
56
|
-
"--fs-window-width": sizeToVar(props.width),
|
|
57
|
-
"--fs-window-height": sizeToVar(props.height)
|
|
67
|
+
"--fs-window-width" : sizeToVar(props.width),
|
|
68
|
+
"--fs-window-height" : sizeToVar(props.height)
|
|
58
69
|
}));
|
|
59
70
|
|
|
60
71
|
const value = (component: VNode, index: number): any => {
|
|
61
72
|
return component?.props?.value ?? index;
|
|
62
73
|
};
|
|
63
74
|
|
|
75
|
+
// Hide horizontal overflow when switching windows, otherwise let it visible for the FSFadeOut scrollbar
|
|
76
|
+
watch(() => props.modelValue, (): void => {
|
|
77
|
+
if (windowRoot.value == null) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
(windowRoot.value as any).$el.style.setProperty("overflow", "hidden", "important");
|
|
81
|
+
setTimeout(() => {
|
|
82
|
+
(windowRoot.value as any).$el.style.setProperty("overflow", "visible", "important");
|
|
83
|
+
}, 1120);
|
|
84
|
+
});
|
|
85
|
+
|
|
64
86
|
return {
|
|
87
|
+
windowRoot,
|
|
65
88
|
slots,
|
|
66
89
|
style,
|
|
67
90
|
getChildren,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.89",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.89",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.89"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "9744715fd11929d7cd01e09aebe822283a6214e5"
|
|
39
39
|
}
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
@extend .fs-hide-y-scrollbar;
|
|
3
3
|
|
|
4
4
|
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
5
|
+
overflow-x: var(--fs-fade-out-x-overflow);
|
|
5
6
|
max-height: var(--fs-fade-out-max-height);
|
|
7
|
+
min-height: var(--fs-fade-out-height);
|
|
8
|
+
height: var(--fs-fade-out-height);
|
|
6
9
|
padding: var(--fs-fade-out-padding);
|
|
7
10
|
|
|
8
11
|
// Petit hack pour que la barre de scroll elle soit à droite du container
|
|
9
12
|
padding-right: calc(var(--fs-fade-out-padding) + var(--fs-fade-out-padding-offset));
|
|
10
13
|
width: calc(var(--fs-fade-out-width) + var(--fs-fade-out-width-offset));
|
|
14
|
+
margin-right: var(--fs-fade-out-margin-right);
|
|
15
|
+
|
|
11
16
|
|
|
12
|
-
height: var(--fs-fade-out-height);
|
|
13
17
|
flex-direction: column;
|
|
14
18
|
position: relative;
|
|
15
19
|
display: flex;
|