@dative-gpi/foundation-shared-components 1.0.88 → 1.0.91
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/FSClickable.vue +1 -0
- package/components/FSDialogFormBody.vue +12 -0
- package/components/FSDialogMultiFormBody.vue +12 -0
- package/components/FSDialogSubmit.vue +12 -0
- package/components/FSFadeOut.vue +9 -2
- package/components/FSLoader.vue +26 -8
- package/components/FSWindow.vue +27 -4
- package/components/lists/FSDataTableUI.vue +1 -0
- package/package.json +4 -4
- package/styles/components/fs_fade_out.scss +5 -1
- package/styles/components/fs_window.scss +3 -1
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
:wrap="false"
|
|
29
29
|
>
|
|
30
30
|
<FSButton
|
|
31
|
+
v-if="$props.showCancelButton"
|
|
31
32
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
32
33
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
33
34
|
:variant="$props.cancelButtonVariant"
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
@click="() => $emit('click:cancelButton', false)"
|
|
37
38
|
/>
|
|
38
39
|
<FSButton
|
|
40
|
+
v-if="$props.showSubmitButton"
|
|
39
41
|
type="submit"
|
|
40
42
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
41
43
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
@@ -122,6 +124,11 @@ export default defineComponent({
|
|
|
122
124
|
required: false,
|
|
123
125
|
default: null
|
|
124
126
|
},
|
|
127
|
+
showCancelButton: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
required: false,
|
|
130
|
+
default: true
|
|
131
|
+
},
|
|
125
132
|
cancelButtonPrependIcon: {
|
|
126
133
|
type: String as PropType<string | null>,
|
|
127
134
|
required: false,
|
|
@@ -147,6 +154,11 @@ export default defineComponent({
|
|
|
147
154
|
required: false,
|
|
148
155
|
default: ColorEnum.Light
|
|
149
156
|
},
|
|
157
|
+
showSubmitButton: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
required: false,
|
|
160
|
+
default: true
|
|
161
|
+
},
|
|
150
162
|
submitButtonPrependIcon: {
|
|
151
163
|
type: String as PropType<string | null>,
|
|
152
164
|
required: false,
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
:wrap="false"
|
|
39
39
|
>
|
|
40
40
|
<FSButton
|
|
41
|
+
v-if="$props.showCancelButton || currentStep > 1"
|
|
41
42
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
42
43
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
43
44
|
:variant="$props.cancelButtonVariant"
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
@click="onPrevious()"
|
|
47
48
|
/>
|
|
48
49
|
<FSButton
|
|
50
|
+
v-if="$props.showSubmitButton || currentStep < $props.steps"
|
|
49
51
|
type="submit"
|
|
50
52
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
51
53
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
@@ -107,6 +109,11 @@ export default defineComponent({
|
|
|
107
109
|
type: Number,
|
|
108
110
|
required: true
|
|
109
111
|
},
|
|
112
|
+
showCancelButton: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
},
|
|
110
117
|
cancelButtonPrependIcon: {
|
|
111
118
|
type: String as PropType<string | null>,
|
|
112
119
|
required: false,
|
|
@@ -132,6 +139,11 @@ export default defineComponent({
|
|
|
132
139
|
required: false,
|
|
133
140
|
default: ColorEnum.Light
|
|
134
141
|
},
|
|
142
|
+
showSubmitButton: {
|
|
143
|
+
type: Boolean,
|
|
144
|
+
required: false,
|
|
145
|
+
default: true
|
|
146
|
+
},
|
|
135
147
|
submitButtonPrependIcon: {
|
|
136
148
|
type: String as PropType<string | null>,
|
|
137
149
|
required: false,
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
:wrap="false"
|
|
34
34
|
>
|
|
35
35
|
<FSButton
|
|
36
|
+
v-if="$props.showCancelButton"
|
|
36
37
|
:prependIcon="$props.cancelButtonPrependIcon"
|
|
37
38
|
:appendIcon="$props.cancelButtonAppendIcon"
|
|
38
39
|
:variant="$props.cancelButtonVariant"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
@click="$emit('update:modelValue', false)"
|
|
42
43
|
/>
|
|
43
44
|
<FSButton
|
|
45
|
+
v-if="$props.showSubmitButton"
|
|
44
46
|
:prependIcon="$props.submitButtonPrependIcon"
|
|
45
47
|
:appendIcon="$props.submitButtonAppendIcon"
|
|
46
48
|
:variant="$props.submitButtonVariant"
|
|
@@ -98,6 +100,11 @@ export default defineComponent({
|
|
|
98
100
|
required: false,
|
|
99
101
|
default: false
|
|
100
102
|
},
|
|
103
|
+
showCancelButton: {
|
|
104
|
+
type: Boolean,
|
|
105
|
+
required: false,
|
|
106
|
+
default: true
|
|
107
|
+
},
|
|
101
108
|
cancelButtonPrependIcon: {
|
|
102
109
|
type: String as PropType<string | null>,
|
|
103
110
|
required: false,
|
|
@@ -123,6 +130,11 @@ export default defineComponent({
|
|
|
123
130
|
required: false,
|
|
124
131
|
default: ColorEnum.Light
|
|
125
132
|
},
|
|
133
|
+
showSubmitButton: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
126
138
|
submitButtonPrependIcon: {
|
|
127
139
|
type: String as PropType<string | null>,
|
|
128
140
|
required: false,
|
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,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-window
|
|
3
3
|
class="fs-window"
|
|
4
|
-
:style="style"
|
|
5
4
|
:touch="false"
|
|
5
|
+
:style="style"
|
|
6
|
+
:modelValue="$props.modelValue"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
6
8
|
v-bind="$attrs"
|
|
7
9
|
>
|
|
8
10
|
<template
|
|
@@ -28,7 +30,7 @@
|
|
|
28
30
|
</template>
|
|
29
31
|
|
|
30
32
|
<script lang="ts">
|
|
31
|
-
import { computed, defineComponent, type PropType, type StyleValue, type VNode } from "vue";
|
|
33
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, type VNode, watch } from "vue";
|
|
32
34
|
|
|
33
35
|
import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
34
36
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
@@ -45,22 +47,43 @@ export default defineComponent({
|
|
|
45
47
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
46
48
|
required: false,
|
|
47
49
|
default: null
|
|
50
|
+
},
|
|
51
|
+
modelValue: {
|
|
52
|
+
type: [String, Number, Object] as PropType<any>,
|
|
53
|
+
required: false,
|
|
54
|
+
default: 0
|
|
48
55
|
}
|
|
49
56
|
},
|
|
57
|
+
emits: ["update:modelValue"],
|
|
50
58
|
setup(props) {
|
|
51
59
|
const { slots, getChildren } = useSlots();
|
|
52
60
|
|
|
53
61
|
delete slots.default;
|
|
62
|
+
|
|
63
|
+
const showOverflow = ref(true);
|
|
64
|
+
const overflowTimeout = ref<NodeJS.Timeout | null>(null);
|
|
54
65
|
|
|
55
66
|
const style = computed((): StyleValue => ({
|
|
56
|
-
"--fs-window-
|
|
57
|
-
"--fs-window-height": sizeToVar(props.height)
|
|
67
|
+
"--fs-window-overflow": showOverflow.value ? "visible" : "hidden",
|
|
68
|
+
"--fs-window-height" : sizeToVar(props.height),
|
|
69
|
+
"--fs-window-width" : sizeToVar(props.width)
|
|
58
70
|
}));
|
|
59
71
|
|
|
60
72
|
const value = (component: VNode, index: number): any => {
|
|
61
73
|
return component?.props?.value ?? index;
|
|
62
74
|
};
|
|
63
75
|
|
|
76
|
+
// Hide horizontal overflow when switching windows, otherwise let it visible for the FSFadeOut scrollbar
|
|
77
|
+
watch(() => props.modelValue, (): void => {
|
|
78
|
+
showOverflow.value = false;
|
|
79
|
+
if (overflowTimeout.value) {
|
|
80
|
+
clearTimeout(overflowTimeout.value);
|
|
81
|
+
}
|
|
82
|
+
overflowTimeout.value = setTimeout(() => {
|
|
83
|
+
showOverflow.value = true;
|
|
84
|
+
}, 560);
|
|
85
|
+
});
|
|
86
|
+
|
|
64
87
|
return {
|
|
65
88
|
slots,
|
|
66
89
|
style,
|
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.91",
|
|
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.91",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.91"
|
|
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": "996da7085e717a1b1c0a9e58d6d3cc40b4aadb2b"
|
|
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;
|