@dative-gpi/foundation-shared-components 0.0.53 → 0.0.54
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/FSCard.vue +21 -21
- package/components/FSClickable.vue +31 -15
- package/components/FSCol.vue +11 -11
- package/components/FSDialog.vue +27 -24
- package/components/FSDivider.vue +7 -7
- package/components/FSEditImage.vue +11 -11
- package/components/FSFadeOut.vue +11 -57
- package/components/FSImage.vue +23 -23
- package/components/FSLoader.vue +10 -10
- package/components/FSOptionGroup.vue +2 -2
- package/components/FSPagination.vue +6 -6
- package/components/FSRow.vue +14 -14
- package/components/FSSlideGroup.vue +3 -3
- package/components/FSSubmitDialog.vue +10 -10
- package/components/FSToggleSet.vue +2 -2
- package/components/FSWrapGroup.vue +3 -3
- package/components/fields/FSAutocompleteField.vue +15 -3
- package/components/fields/FSSelectField.vue +13 -1
- package/components/fields/FSTextField.vue +0 -1
- package/components/lists/FSDataTableUI.vue +3 -3
- package/composables/useSlots.ts +2 -2
- package/package.json +4 -4
- package/styles/components/fs_autocomplete_field.scss +16 -0
- package/styles/components/fs_fade_out.scss +4 -2
- package/styles/components/fs_select_field.scss +18 -0
- package/styles/globals/overrides.scss +0 -4
- package/utils/css.ts +30 -1
- package/utils/time.ts +1 -1
package/components/FSCard.vue
CHANGED
|
@@ -44,25 +44,25 @@ export default defineComponent({
|
|
|
44
44
|
FSRow
|
|
45
45
|
},
|
|
46
46
|
props: {
|
|
47
|
-
|
|
48
|
-
type: [String, Number]
|
|
47
|
+
height: {
|
|
48
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
49
49
|
required: false,
|
|
50
|
-
default:
|
|
50
|
+
default: null
|
|
51
51
|
},
|
|
52
|
-
|
|
53
|
-
type:
|
|
52
|
+
width: {
|
|
53
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
54
54
|
required: false,
|
|
55
|
-
default:
|
|
55
|
+
default: null
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
type: [String, Number]
|
|
57
|
+
padding: {
|
|
58
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
59
59
|
required: false,
|
|
60
|
-
default: "
|
|
60
|
+
default: "0"
|
|
61
61
|
},
|
|
62
|
-
|
|
63
|
-
type:
|
|
62
|
+
gap: {
|
|
63
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
64
|
required: false,
|
|
65
|
-
default:
|
|
65
|
+
default: "8px"
|
|
66
66
|
},
|
|
67
67
|
variant: {
|
|
68
68
|
type: String as PropType<"background" | "standard">,
|
|
@@ -74,20 +74,20 @@ export default defineComponent({
|
|
|
74
74
|
required: false,
|
|
75
75
|
default: ColorEnum.Background
|
|
76
76
|
},
|
|
77
|
-
|
|
78
|
-
type:
|
|
77
|
+
border: {
|
|
78
|
+
type: Boolean,
|
|
79
79
|
required: false,
|
|
80
|
-
default:
|
|
80
|
+
default: true
|
|
81
81
|
},
|
|
82
|
-
|
|
83
|
-
type: [
|
|
82
|
+
borderRadius: {
|
|
83
|
+
type: [String, Number],
|
|
84
84
|
required: false,
|
|
85
|
-
default:
|
|
85
|
+
default: "4px"
|
|
86
86
|
},
|
|
87
|
-
|
|
88
|
-
type:
|
|
87
|
+
elevation: {
|
|
88
|
+
type: Boolean,
|
|
89
89
|
required: false,
|
|
90
|
-
default:
|
|
90
|
+
default: false
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
setup(props) {
|
|
@@ -70,23 +70,23 @@ export default defineComponent({
|
|
|
70
70
|
FSCard
|
|
71
71
|
},
|
|
72
72
|
props: {
|
|
73
|
-
|
|
74
|
-
type: [String,
|
|
73
|
+
height: {
|
|
74
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
75
75
|
required: false,
|
|
76
76
|
default: null
|
|
77
77
|
},
|
|
78
|
-
|
|
79
|
-
type:
|
|
78
|
+
width: {
|
|
79
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
80
80
|
required: false,
|
|
81
|
-
default:
|
|
81
|
+
default: null
|
|
82
82
|
},
|
|
83
|
-
|
|
84
|
-
type: [String,
|
|
83
|
+
to: {
|
|
84
|
+
type: [String, Object] as PropType<string | RouteLocation>,
|
|
85
85
|
required: false,
|
|
86
|
-
default:
|
|
86
|
+
default: null
|
|
87
87
|
},
|
|
88
88
|
variant: {
|
|
89
|
-
type: String as PropType<"standard" | "full">,
|
|
89
|
+
type: String as PropType<"standard" | "background" | "full">,
|
|
90
90
|
required: false,
|
|
91
91
|
default: "standard"
|
|
92
92
|
},
|
|
@@ -100,15 +100,15 @@ export default defineComponent({
|
|
|
100
100
|
required: false,
|
|
101
101
|
default: ColorEnum.Light
|
|
102
102
|
},
|
|
103
|
-
|
|
104
|
-
type:
|
|
103
|
+
border: {
|
|
104
|
+
type: Boolean,
|
|
105
105
|
required: false,
|
|
106
|
-
default:
|
|
106
|
+
default: true
|
|
107
107
|
},
|
|
108
|
-
|
|
109
|
-
type: [
|
|
108
|
+
borderRadius: {
|
|
109
|
+
type: [String, Number],
|
|
110
110
|
required: false,
|
|
111
|
-
default:
|
|
111
|
+
default: "4px"
|
|
112
112
|
},
|
|
113
113
|
load: {
|
|
114
114
|
type: Boolean,
|
|
@@ -127,6 +127,7 @@ export default defineComponent({
|
|
|
127
127
|
const router = useRouter();
|
|
128
128
|
|
|
129
129
|
const colors = computed(() => getColors(props.color));
|
|
130
|
+
const backgrounds = getColors(ColorEnum.Background);
|
|
130
131
|
const lights = getColors(ColorEnum.Light);
|
|
131
132
|
const darks = getColors(ColorEnum.Dark);
|
|
132
133
|
|
|
@@ -158,6 +159,21 @@ export default defineComponent({
|
|
|
158
159
|
"--fs-clickable-height" : sizeToVar(props.height),
|
|
159
160
|
"--fs-clickable-width" : sizeToVar(props.width)
|
|
160
161
|
};
|
|
162
|
+
case "background": return {
|
|
163
|
+
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
164
|
+
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
165
|
+
"--fs-clickable-background-color" : backgrounds.base,
|
|
166
|
+
"--fs-clickable-border-color" : lights.dark,
|
|
167
|
+
"--fs-clickable-color" : darks.base,
|
|
168
|
+
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
169
|
+
"--fs-clickable-hover-border-color" : colors.value.baseContrast,
|
|
170
|
+
"--fs-clickable-hover-color" : colors.value.baseContrast,
|
|
171
|
+
"--fs-clickable-active-background-color": colors.value.dark,
|
|
172
|
+
"--fs-clickable-active-border-color" : colors.value.darkContrast,
|
|
173
|
+
"--fs-clickable-active-color" : colors.value.darkContrast,
|
|
174
|
+
"--fs-clickable-height" : sizeToVar(props.height),
|
|
175
|
+
"--fs-clickable-width" : sizeToVar(props.width)
|
|
176
|
+
};
|
|
161
177
|
case "full": return {
|
|
162
178
|
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
163
179
|
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
package/components/FSCol.vue
CHANGED
|
@@ -16,30 +16,30 @@ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSCol",
|
|
18
18
|
props: {
|
|
19
|
-
width: {
|
|
20
|
-
type: [String, Number] as PropType<"hug" | "fill" | string | number>,
|
|
21
|
-
required: false,
|
|
22
|
-
default: "fill"
|
|
23
|
-
},
|
|
24
19
|
height: {
|
|
25
|
-
type: [String, Number] as PropType<"hug" | "fill" | string | number>,
|
|
20
|
+
type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
|
|
26
21
|
required: false,
|
|
27
22
|
default: "hug"
|
|
28
23
|
},
|
|
29
|
-
|
|
30
|
-
type: String as PropType<"
|
|
24
|
+
width: {
|
|
25
|
+
type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
|
|
31
26
|
required: false,
|
|
32
|
-
default: "
|
|
27
|
+
default: "fill"
|
|
33
28
|
},
|
|
34
29
|
padding: {
|
|
35
|
-
type: [String, Number]
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
36
31
|
required: false,
|
|
37
32
|
default: "0"
|
|
38
33
|
},
|
|
39
34
|
gap: {
|
|
40
|
-
type: [String, Number]
|
|
35
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
41
36
|
required: false,
|
|
42
37
|
default: "8px"
|
|
38
|
+
},
|
|
39
|
+
align: {
|
|
40
|
+
type: String as PropType<"top-left" | "top-center" | "top-right" | "center-left" | "center-center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right">,
|
|
41
|
+
required: false,
|
|
42
|
+
default: "top-left"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
setup(props) {
|
package/components/FSDialog.vue
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<FSCard
|
|
10
10
|
padding="24px"
|
|
11
11
|
gap="24px"
|
|
12
|
-
:width="width"
|
|
13
|
-
:class="classes"
|
|
14
|
-
:color="$props.color"
|
|
15
12
|
:border="!isExtraSmall"
|
|
13
|
+
:color="$props.color"
|
|
14
|
+
:class="classes"
|
|
15
|
+
:width="width"
|
|
16
16
|
>
|
|
17
17
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
18
18
|
<slot :name="name" v-bind="slotData" />
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
</FSCard>
|
|
21
21
|
<FSButton
|
|
22
22
|
class="fs-dialog-close-button"
|
|
23
|
-
variant="icon"
|
|
24
23
|
icon="mdi-close"
|
|
24
|
+
variant="icon"
|
|
25
25
|
:color="ColorEnum.Dark"
|
|
26
26
|
@click="$emit('update:modelValue', false)"
|
|
27
27
|
/>
|
|
@@ -37,6 +37,7 @@ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composa
|
|
|
37
37
|
import FSButton from "./FSButton.vue";
|
|
38
38
|
import FSCard from "./FSCard.vue";
|
|
39
39
|
import FSCol from "./FSCol.vue";
|
|
40
|
+
import { sizeToVar } from "../utils";
|
|
40
41
|
|
|
41
42
|
export default defineComponent({
|
|
42
43
|
name: "FSDialog",
|
|
@@ -46,25 +47,25 @@ export default defineComponent({
|
|
|
46
47
|
FSCol
|
|
47
48
|
},
|
|
48
49
|
props: {
|
|
50
|
+
width: {
|
|
51
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
52
|
+
required: false,
|
|
53
|
+
default: "auto"
|
|
54
|
+
},
|
|
55
|
+
cardClasses: {
|
|
56
|
+
type: [Array, String] as PropType<string[] | string | null>,
|
|
57
|
+
required: false,
|
|
58
|
+
default: null
|
|
59
|
+
},
|
|
49
60
|
modelValue: {
|
|
50
61
|
type: Boolean,
|
|
51
62
|
required: false,
|
|
52
63
|
default: false
|
|
53
64
|
},
|
|
54
|
-
width: {
|
|
55
|
-
type: [String, Number],
|
|
56
|
-
required: false,
|
|
57
|
-
default: "auto"
|
|
58
|
-
},
|
|
59
65
|
color: {
|
|
60
66
|
type: String as PropType<ColorBase>,
|
|
61
67
|
required: false,
|
|
62
68
|
default: ColorEnum.Dark
|
|
63
|
-
},
|
|
64
|
-
cardClasses: {
|
|
65
|
-
type: [Array, String] as PropType<string[] | string>,
|
|
66
|
-
required: false,
|
|
67
|
-
default: null
|
|
68
69
|
}
|
|
69
70
|
},
|
|
70
71
|
emits: ["update:modelValue"],
|
|
@@ -72,24 +73,26 @@ export default defineComponent({
|
|
|
72
73
|
const { isExtraSmall } = useBreakpoints();
|
|
73
74
|
|
|
74
75
|
const classes = computed((): string[] => {
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
const classNames = ["fs-dialog"];
|
|
77
|
+
if (props.cardClasses) {
|
|
78
|
+
if (Array.isArray(props.cardClasses)) {
|
|
79
|
+
classNames.push(...props.cardClasses);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
classNames.push(props.cardClasses);
|
|
83
|
+
}
|
|
81
84
|
}
|
|
82
85
|
if (isExtraSmall.value) {
|
|
83
|
-
|
|
86
|
+
classNames.push("fs-dialog-mobile");
|
|
84
87
|
}
|
|
85
|
-
return
|
|
88
|
+
return classNames;
|
|
86
89
|
});
|
|
87
90
|
|
|
88
|
-
const width = computed((): string
|
|
91
|
+
const width = computed((): string => {
|
|
89
92
|
if (isExtraSmall.value) {
|
|
90
93
|
return "100%";
|
|
91
94
|
}
|
|
92
|
-
return props.width;
|
|
95
|
+
return sizeToVar(props.width);
|
|
93
96
|
});
|
|
94
97
|
|
|
95
98
|
return {
|
package/components/FSDivider.vue
CHANGED
|
@@ -49,7 +49,7 @@ export default defineComponent({
|
|
|
49
49
|
default: null
|
|
50
50
|
},
|
|
51
51
|
width: {
|
|
52
|
-
type: [String, Number]
|
|
52
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
53
53
|
required: false,
|
|
54
54
|
default: "100%"
|
|
55
55
|
},
|
|
@@ -58,15 +58,15 @@ export default defineComponent({
|
|
|
58
58
|
required: false,
|
|
59
59
|
default: "text-body"
|
|
60
60
|
},
|
|
61
|
-
color: {
|
|
62
|
-
type: String as PropType<ColorBase>,
|
|
63
|
-
required: false,
|
|
64
|
-
default: ColorEnum.Light
|
|
65
|
-
},
|
|
66
61
|
variant: {
|
|
67
62
|
type: String as PropType<"base" | "light" | "dark">,
|
|
68
63
|
required: false,
|
|
69
64
|
default: "dark"
|
|
65
|
+
},
|
|
66
|
+
color: {
|
|
67
|
+
type: String as PropType<ColorBase>,
|
|
68
|
+
required: false,
|
|
69
|
+
default: ColorEnum.Light
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
setup(props) {
|
|
@@ -99,7 +99,7 @@ export default defineComponent({
|
|
|
99
99
|
return {
|
|
100
100
|
style,
|
|
101
101
|
isEmpty
|
|
102
|
-
}
|
|
102
|
+
};
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
105
|
</script>
|
|
@@ -62,18 +62,23 @@ export default defineComponent({
|
|
|
62
62
|
FSText
|
|
63
63
|
},
|
|
64
64
|
props: {
|
|
65
|
-
|
|
66
|
-
type: [String, Number]
|
|
65
|
+
height: {
|
|
66
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
67
67
|
required: false,
|
|
68
|
-
default:
|
|
68
|
+
default: null
|
|
69
69
|
},
|
|
70
70
|
width: {
|
|
71
|
-
type: [String, Number]
|
|
71
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
72
72
|
required: false,
|
|
73
73
|
default: null
|
|
74
74
|
},
|
|
75
|
-
|
|
76
|
-
type: [String, Number]
|
|
75
|
+
padding: {
|
|
76
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
77
|
+
required: false,
|
|
78
|
+
default: "8px"
|
|
79
|
+
},
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: String as PropType<string | null>,
|
|
77
82
|
required: false,
|
|
78
83
|
default: null
|
|
79
84
|
},
|
|
@@ -86,11 +91,6 @@ export default defineComponent({
|
|
|
86
91
|
type: [String, Number],
|
|
87
92
|
required: false,
|
|
88
93
|
default: "4px"
|
|
89
|
-
},
|
|
90
|
-
modelValue: {
|
|
91
|
-
type: String as PropType<string | null>,
|
|
92
|
-
required: false,
|
|
93
|
-
default: null
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
emits: ["update:modelValue"],
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -22,21 +22,21 @@ export default defineComponent({
|
|
|
22
22
|
name: "FSFadeOut",
|
|
23
23
|
props: {
|
|
24
24
|
height: {
|
|
25
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number>,
|
|
25
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
26
26
|
required: true
|
|
27
27
|
},
|
|
28
28
|
width: {
|
|
29
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number>,
|
|
29
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
30
30
|
required: false,
|
|
31
31
|
default: "100%"
|
|
32
32
|
},
|
|
33
33
|
padding: {
|
|
34
|
-
type: [String, Number]
|
|
34
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
35
35
|
required: false,
|
|
36
36
|
default: "0"
|
|
37
37
|
},
|
|
38
38
|
maskHeight: {
|
|
39
|
-
type: [String, Number]
|
|
39
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
40
40
|
required: false,
|
|
41
41
|
default: "64px"
|
|
42
42
|
}
|
|
@@ -59,56 +59,10 @@ export default defineComponent({
|
|
|
59
59
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
60
60
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
61
61
|
"--fs-fade-out-top-mask-height" : topMaskHeight.value,
|
|
62
|
-
"--fs-fade-out-top-mask-top" : topPadding.value,
|
|
63
62
|
"--fs-fade-out-bottom-mask-height" : bottomMaskHeight.value,
|
|
64
|
-
"--fs-fade-out-bottom-mask-bottom" : bottomPadding.value
|
|
65
63
|
};
|
|
66
64
|
});
|
|
67
65
|
|
|
68
|
-
const topPadding = computed((): string => {
|
|
69
|
-
switch (typeof props.padding) {
|
|
70
|
-
case "number": return sizeToVar(props.padding);
|
|
71
|
-
default:
|
|
72
|
-
const paddings = props.padding.split(" ");
|
|
73
|
-
let tempPadding = "0px";
|
|
74
|
-
switch (paddings.length) {
|
|
75
|
-
case 0 :
|
|
76
|
-
break;
|
|
77
|
-
default:
|
|
78
|
-
tempPadding = "-" + sizeToVar(paddings[0]);
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
if (tempPadding === "0px") {
|
|
82
|
-
return "-1px";
|
|
83
|
-
}
|
|
84
|
-
return tempPadding;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const bottomPadding = computed((): string => {
|
|
89
|
-
switch (typeof props.padding) {
|
|
90
|
-
case "number": return sizeToVar(props.padding);
|
|
91
|
-
default:
|
|
92
|
-
const paddings = props.padding.split(" ");
|
|
93
|
-
let tempPadding = "0px";
|
|
94
|
-
switch (paddings.length) {
|
|
95
|
-
case 0 :
|
|
96
|
-
break;
|
|
97
|
-
case 1 :
|
|
98
|
-
case 2 :
|
|
99
|
-
tempPadding = "-" + sizeToVar(paddings[0]);
|
|
100
|
-
break;
|
|
101
|
-
default:
|
|
102
|
-
tempPadding = "-" + sizeToVar(paddings[2]);
|
|
103
|
-
break;
|
|
104
|
-
}
|
|
105
|
-
if (tempPadding === "0px") {
|
|
106
|
-
return "-1px";
|
|
107
|
-
}
|
|
108
|
-
return tempPadding;
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
|
|
112
66
|
const onScroll = ({ target }): void => debounce(() => {
|
|
113
67
|
const currentTopMaskHeight = target.children[0].clientHeight;
|
|
114
68
|
const currentBottomMaskHeight = target.children[target.children.length - 1].clientHeight;
|
|
@@ -135,15 +89,15 @@ export default defineComponent({
|
|
|
135
89
|
|
|
136
90
|
const onResize = (): void => debounce(() => {
|
|
137
91
|
if (fadeOutRef.value) {
|
|
138
|
-
const currentTopMaskHeight = fadeOutRef.value.children[0].clientHeight;
|
|
139
|
-
const currentBottomMaskHeight = fadeOutRef.value.children[fadeOutRef.value.children.length - 1].clientHeight;
|
|
140
|
-
const contentHeight = fadeOutRef.value.scrollHeight - currentTopMaskHeight - currentBottomMaskHeight;
|
|
92
|
+
const currentTopMaskHeight = (fadeOutRef.value as any).children[0].clientHeight;
|
|
93
|
+
const currentBottomMaskHeight = (fadeOutRef.value as any).children[(fadeOutRef.value as any).children.length - 1].clientHeight;
|
|
94
|
+
const contentHeight = (fadeOutRef.value as any).scrollHeight - currentTopMaskHeight - currentBottomMaskHeight;
|
|
141
95
|
|
|
142
|
-
if (fadeOutRef.value.clientHeight < contentHeight) {
|
|
143
|
-
if (fadeOutRef.value.scrollHeight - fadeOutRef.value.scrollTop - fadeOutRef.value.clientHeight > 0) {
|
|
96
|
+
if ((fadeOutRef.value as any).clientHeight < contentHeight) {
|
|
97
|
+
if ((fadeOutRef.value as any).scrollHeight - (fadeOutRef.value as any).scrollTop - (fadeOutRef.value as any).clientHeight > 0) {
|
|
144
98
|
bottomMaskHeight.value = sizeToVar(props.maskHeight);
|
|
145
99
|
}
|
|
146
|
-
if (fadeOutRef.value.scrollTop > 0) {
|
|
100
|
+
if ((fadeOutRef.value as any).scrollTop > 0) {
|
|
147
101
|
topMaskHeight.value = sizeToVar(props.maskHeight);
|
|
148
102
|
}
|
|
149
103
|
}
|
|
@@ -156,7 +110,7 @@ export default defineComponent({
|
|
|
156
110
|
|
|
157
111
|
onMounted((): void => {
|
|
158
112
|
if (fadeOutRef.value) {
|
|
159
|
-
if (fadeOutRef.value.clientHeight < fadeOutRef.value.scrollHeight) {
|
|
113
|
+
if ((fadeOutRef.value as any).clientHeight < (fadeOutRef.value as any).scrollHeight) {
|
|
160
114
|
bottomMaskHeight.value = sizeToVar(props.maskHeight);
|
|
161
115
|
}
|
|
162
116
|
}
|
package/components/FSImage.vue
CHANGED
|
@@ -39,7 +39,7 @@ import { decode, isBlurhashValid } from "blurhash";
|
|
|
39
39
|
|
|
40
40
|
import { useImageBlurHash } from "@dative-gpi/foundation-shared-services/composables";
|
|
41
41
|
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
42
|
-
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
42
|
+
import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
|
|
43
43
|
|
|
44
44
|
import FSLoader from "./FSLoader.vue";
|
|
45
45
|
|
|
@@ -49,28 +49,23 @@ export default defineComponent({
|
|
|
49
49
|
FSLoader
|
|
50
50
|
},
|
|
51
51
|
props: {
|
|
52
|
-
|
|
53
|
-
type: String as PropType<string | null>,
|
|
52
|
+
height: {
|
|
53
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
54
54
|
required: false,
|
|
55
55
|
default: null
|
|
56
56
|
},
|
|
57
|
-
|
|
58
|
-
type: String as PropType<string | null>,
|
|
57
|
+
width: {
|
|
58
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
59
59
|
required: false,
|
|
60
60
|
default: null
|
|
61
61
|
},
|
|
62
|
-
|
|
63
|
-
type:
|
|
64
|
-
required: false,
|
|
65
|
-
default: true
|
|
66
|
-
},
|
|
67
|
-
width: {
|
|
68
|
-
type: [String, Number],
|
|
62
|
+
imageId: {
|
|
63
|
+
type: String as PropType<string | null>,
|
|
69
64
|
required: false,
|
|
70
65
|
default: null
|
|
71
66
|
},
|
|
72
|
-
|
|
73
|
-
type:
|
|
67
|
+
imageB64: {
|
|
68
|
+
type: String as PropType<string | null>,
|
|
74
69
|
required: false,
|
|
75
70
|
default: null
|
|
76
71
|
},
|
|
@@ -83,10 +78,15 @@ export default defineComponent({
|
|
|
83
78
|
type: [String, Number],
|
|
84
79
|
required: false,
|
|
85
80
|
default: "4px"
|
|
81
|
+
},
|
|
82
|
+
cover: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: true
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
setup(props) {
|
|
89
|
-
const {
|
|
89
|
+
const { fetch: fetchBlurHash, entity: blurHash } = useImageBlurHash();
|
|
90
90
|
|
|
91
91
|
const imageRef = ref<HTMLFormElement | null>(null);
|
|
92
92
|
const canvasRef = ref<HTMLCanvasElement | null>(null);
|
|
@@ -106,9 +106,9 @@ export default defineComponent({
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
const computedHeight = computed(():
|
|
109
|
+
const computedHeight = computed((): string | undefined => {
|
|
110
110
|
if (props.height) {
|
|
111
|
-
return props.height;
|
|
111
|
+
return sizeToVar(props.height);
|
|
112
112
|
}
|
|
113
113
|
if (props.width) {
|
|
114
114
|
if (typeof (props.width) === "string") {
|
|
@@ -117,17 +117,17 @@ export default defineComponent({
|
|
|
117
117
|
if (props.aspectRatio) {
|
|
118
118
|
const split = props.aspectRatio.split('/');
|
|
119
119
|
if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
|
|
120
|
-
return props.width * (parseFloat(split[1]) / parseFloat(split[0]));
|
|
120
|
+
return sizeToVar(varToSize(props.width) * (parseFloat(split[1]) / parseFloat(split[0])));
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
return props.width;
|
|
123
|
+
return sizeToVar(props.width);
|
|
124
124
|
}
|
|
125
125
|
return undefined;
|
|
126
126
|
});
|
|
127
127
|
|
|
128
|
-
const computedWidth = computed(():
|
|
128
|
+
const computedWidth = computed((): string | undefined => {
|
|
129
129
|
if (props.width) {
|
|
130
|
-
return props.width;
|
|
130
|
+
return sizeToVar(props.width);
|
|
131
131
|
}
|
|
132
132
|
if (props.height) {
|
|
133
133
|
if (typeof (props.height) === "string") {
|
|
@@ -136,10 +136,10 @@ export default defineComponent({
|
|
|
136
136
|
if (props.aspectRatio) {
|
|
137
137
|
const split = props.aspectRatio.split('/');
|
|
138
138
|
if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
|
|
139
|
-
return props.height * (parseFloat(split[0]) / parseFloat(split[1]));
|
|
139
|
+
return sizeToVar(varToSize(props.height) * (parseFloat(split[0]) / parseFloat(split[1])));
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
return props.height;
|
|
142
|
+
return sizeToVar(props.height);
|
|
143
143
|
}
|
|
144
144
|
return undefined;
|
|
145
145
|
});
|
package/components/FSLoader.vue
CHANGED
|
@@ -16,30 +16,30 @@ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSLoader",
|
|
18
18
|
props: {
|
|
19
|
-
|
|
20
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number>,
|
|
19
|
+
height: {
|
|
20
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
21
21
|
required: false,
|
|
22
22
|
default: null
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number>,
|
|
24
|
+
width: {
|
|
25
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
26
26
|
required: false,
|
|
27
27
|
default: null
|
|
28
28
|
},
|
|
29
29
|
padding: {
|
|
30
|
-
type: [String, Number]
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
31
31
|
required: false,
|
|
32
32
|
default: "0"
|
|
33
33
|
},
|
|
34
|
-
borderRadius: {
|
|
35
|
-
type: [String, Number],
|
|
36
|
-
required: false,
|
|
37
|
-
default: "4px"
|
|
38
|
-
},
|
|
39
34
|
variant: {
|
|
40
35
|
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
|
|
41
36
|
required: false,
|
|
42
37
|
default: "standard"
|
|
38
|
+
},
|
|
39
|
+
borderRadius: {
|
|
40
|
+
type: [String, Number],
|
|
41
|
+
required: false,
|
|
42
|
+
default: "4px"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
setup(props) {
|
|
@@ -161,12 +161,12 @@ export default defineComponent({
|
|
|
161
161
|
default: ColorEnum.Primary
|
|
162
162
|
},
|
|
163
163
|
padding: {
|
|
164
|
-
type: [String, Number]
|
|
164
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
165
165
|
required: false,
|
|
166
166
|
default: "3px"
|
|
167
167
|
},
|
|
168
168
|
gap: {
|
|
169
|
-
type: [String, Number]
|
|
169
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
170
170
|
required: false,
|
|
171
171
|
default: "0"
|
|
172
172
|
},
|
|
@@ -31,14 +31,14 @@ export default defineComponent({
|
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
33
|
width: {
|
|
34
|
-
type: [String, Number]
|
|
34
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
35
35
|
required: false,
|
|
36
36
|
default: null
|
|
37
37
|
},
|
|
38
38
|
gap: {
|
|
39
|
-
type: [String, Number]
|
|
39
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
40
40
|
required: false,
|
|
41
|
-
default:
|
|
41
|
+
default: "4px"
|
|
42
42
|
},
|
|
43
43
|
pages: {
|
|
44
44
|
type: Number,
|
|
@@ -80,11 +80,11 @@ export default defineComponent({
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
const classes = (page: number): string[] => {
|
|
83
|
-
const
|
|
83
|
+
const classNames = ["fs-pagination-page"];
|
|
84
84
|
if (page <= props.modelValue) {
|
|
85
|
-
|
|
85
|
+
classNames.push("fs-pagination-active-page");
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return classNames;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
return {
|
package/components/FSRow.vue
CHANGED
|
@@ -16,15 +16,25 @@ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
|
16
16
|
export default defineComponent({
|
|
17
17
|
name: "FSRow",
|
|
18
18
|
props: {
|
|
19
|
+
height: {
|
|
20
|
+
type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
|
|
21
|
+
required: false,
|
|
22
|
+
default: "hug"
|
|
23
|
+
},
|
|
19
24
|
width: {
|
|
20
|
-
type: [String, Number] as PropType<"hug" | "fill" | string | number>,
|
|
25
|
+
type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
|
|
21
26
|
required: false,
|
|
22
27
|
default: "fill"
|
|
23
28
|
},
|
|
24
|
-
|
|
25
|
-
type: [String, Number] as PropType<
|
|
29
|
+
padding: {
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
26
31
|
required: false,
|
|
27
|
-
default: "
|
|
32
|
+
default: "0"
|
|
33
|
+
},
|
|
34
|
+
gap: {
|
|
35
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "8px"
|
|
28
38
|
},
|
|
29
39
|
align: {
|
|
30
40
|
type: String as PropType<"top-left" | "top-center" | "top-right" | "center-left" | "center-center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right">,
|
|
@@ -35,16 +45,6 @@ export default defineComponent({
|
|
|
35
45
|
type: Boolean,
|
|
36
46
|
required: false,
|
|
37
47
|
default: true
|
|
38
|
-
},
|
|
39
|
-
padding: {
|
|
40
|
-
type: [String, Number],
|
|
41
|
-
required: false,
|
|
42
|
-
default: "0"
|
|
43
|
-
},
|
|
44
|
-
gap: {
|
|
45
|
-
type: [String, Number],
|
|
46
|
-
required: false,
|
|
47
|
-
default: "8px"
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
setup(props) {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script lang="ts">
|
|
44
|
-
import { computed, defineComponent, ref } from "vue";
|
|
44
|
+
import { computed, defineComponent, PropType, ref } from "vue";
|
|
45
45
|
|
|
46
46
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
47
47
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -60,12 +60,12 @@ export default defineComponent({
|
|
|
60
60
|
},
|
|
61
61
|
props: {
|
|
62
62
|
padding: {
|
|
63
|
-
type: [String, Number]
|
|
63
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
64
|
required: false,
|
|
65
65
|
default: "0"
|
|
66
66
|
},
|
|
67
67
|
gap: {
|
|
68
|
-
type: [String, Number]
|
|
68
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
69
69
|
required: false,
|
|
70
70
|
default: "8px"
|
|
71
71
|
},
|
|
@@ -67,16 +67,6 @@ export default defineComponent({
|
|
|
67
67
|
FSRow
|
|
68
68
|
},
|
|
69
69
|
props: {
|
|
70
|
-
modelValue: {
|
|
71
|
-
type: Boolean,
|
|
72
|
-
required: false,
|
|
73
|
-
default: false
|
|
74
|
-
},
|
|
75
|
-
width: {
|
|
76
|
-
type: [String, Number],
|
|
77
|
-
required: false,
|
|
78
|
-
default: "auto"
|
|
79
|
-
},
|
|
80
70
|
title: {
|
|
81
71
|
type: String as PropType<string | null>,
|
|
82
72
|
required: false,
|
|
@@ -87,6 +77,16 @@ export default defineComponent({
|
|
|
87
77
|
required: false,
|
|
88
78
|
default: null
|
|
89
79
|
},
|
|
80
|
+
width: {
|
|
81
|
+
type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: "auto"
|
|
84
|
+
},
|
|
85
|
+
modelValue: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
required: false,
|
|
88
|
+
default: false
|
|
89
|
+
},
|
|
90
90
|
leftButtonPrependIcon: {
|
|
91
91
|
type: String as PropType<string | null>,
|
|
92
92
|
required: false,
|
|
@@ -148,12 +148,12 @@ export default defineComponent({
|
|
|
148
148
|
default: ColorEnum.Primary
|
|
149
149
|
},
|
|
150
150
|
padding: {
|
|
151
|
-
type: [String, Number]
|
|
151
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
152
152
|
required: false,
|
|
153
153
|
default: "0"
|
|
154
154
|
},
|
|
155
155
|
gap: {
|
|
156
|
-
type: [String, Number]
|
|
156
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
157
157
|
required: false,
|
|
158
158
|
default: "8px"
|
|
159
159
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script lang="ts">
|
|
19
|
-
import { computed, defineComponent, ref } from "vue";
|
|
19
|
+
import { computed, defineComponent, PropType, ref } from "vue";
|
|
20
20
|
|
|
21
21
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
22
22
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -26,12 +26,12 @@ export default defineComponent({
|
|
|
26
26
|
name: "FSWrapGroup",
|
|
27
27
|
props: {
|
|
28
28
|
padding: {
|
|
29
|
-
type: [String, Number]
|
|
29
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
30
30
|
required: false,
|
|
31
31
|
default: "0"
|
|
32
32
|
},
|
|
33
33
|
gap: {
|
|
34
|
-
type: [String, Number]
|
|
34
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
35
35
|
required: false,
|
|
36
36
|
default: "8px"
|
|
37
37
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol>
|
|
3
3
|
<slot v-if="!$props.hideHeader" name="label">
|
|
4
|
-
<FSRow
|
|
4
|
+
<FSRow
|
|
5
|
+
:wrap="false"
|
|
6
|
+
>
|
|
5
7
|
<FSSpan
|
|
6
8
|
v-if="$props.label"
|
|
7
9
|
class="fs-autocomplete-field-label"
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
clearIcon="mdi-close"
|
|
37
39
|
variant="outlined"
|
|
38
40
|
:style="style"
|
|
41
|
+
:listProps="listStyle"
|
|
39
42
|
:class="classes"
|
|
40
43
|
:hideDetails="true"
|
|
41
44
|
:items="$props.items"
|
|
@@ -163,6 +166,7 @@ export default defineComponent({
|
|
|
163
166
|
delete slots.label;
|
|
164
167
|
delete slots.description;
|
|
165
168
|
|
|
169
|
+
const backgrounds = getColors(ColorEnum.Background);
|
|
166
170
|
const errors = getColors(ColorEnum.Error);
|
|
167
171
|
const lights = getColors(ColorEnum.Light);
|
|
168
172
|
const darks = getColors(ColorEnum.Dark);
|
|
@@ -180,6 +184,7 @@ export default defineComponent({
|
|
|
180
184
|
}
|
|
181
185
|
return {
|
|
182
186
|
"--fs-autocomplete-field-cursor" : "text",
|
|
187
|
+
"--fs-autocomplete-field-background-color" : backgrounds.base,
|
|
183
188
|
"--fs-autocomplete-field-border-color" : lights.dark,
|
|
184
189
|
"--fs-autocomplete-field-color" : darks.base,
|
|
185
190
|
"--fs-autocomplete-field-active-border-color": darks.dark,
|
|
@@ -188,6 +193,12 @@ export default defineComponent({
|
|
|
188
193
|
};
|
|
189
194
|
});
|
|
190
195
|
|
|
196
|
+
const listStyle = computed((): any => {
|
|
197
|
+
return {
|
|
198
|
+
style: style.value
|
|
199
|
+
};
|
|
200
|
+
});
|
|
201
|
+
|
|
191
202
|
const classes = computed((): string[] => {
|
|
192
203
|
const classNames = ["fs-autocomplete-field"];
|
|
193
204
|
if (props.multiple) {
|
|
@@ -208,13 +219,14 @@ export default defineComponent({
|
|
|
208
219
|
});
|
|
209
220
|
|
|
210
221
|
return {
|
|
222
|
+
innerSearch,
|
|
211
223
|
validateOn,
|
|
224
|
+
listStyle,
|
|
212
225
|
messages,
|
|
213
226
|
blurred,
|
|
227
|
+
classes,
|
|
214
228
|
slots,
|
|
215
229
|
style,
|
|
216
|
-
classes,
|
|
217
|
-
innerSearch,
|
|
218
230
|
onUpdate
|
|
219
231
|
};
|
|
220
232
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol>
|
|
3
3
|
<slot v-if="!$props.hideHeader" name="label">
|
|
4
|
-
<FSRow
|
|
4
|
+
<FSRow
|
|
5
|
+
:wrap="false"
|
|
6
|
+
>
|
|
5
7
|
<FSSpan
|
|
6
8
|
v-if="$props.label"
|
|
7
9
|
class="fs-select-field-label"
|
|
@@ -37,6 +39,7 @@
|
|
|
37
39
|
clearIcon="mdi-close"
|
|
38
40
|
variant="outlined"
|
|
39
41
|
:style="style"
|
|
42
|
+
:listProps="listStyle"
|
|
40
43
|
:hideDetails="true"
|
|
41
44
|
:items="$props.items"
|
|
42
45
|
:itemTitle="$props.itemTitle"
|
|
@@ -155,6 +158,7 @@ export default defineComponent({
|
|
|
155
158
|
delete slots.label;
|
|
156
159
|
delete slots.description;
|
|
157
160
|
|
|
161
|
+
const backgrounds = getColors(ColorEnum.Background);
|
|
158
162
|
const errors = getColors(ColorEnum.Error);
|
|
159
163
|
const lights = getColors(ColorEnum.Light);
|
|
160
164
|
const darks = getColors(ColorEnum.Dark);
|
|
@@ -170,6 +174,7 @@ export default defineComponent({
|
|
|
170
174
|
}
|
|
171
175
|
return {
|
|
172
176
|
"--fs-select-field-cursor" : "pointer",
|
|
177
|
+
"--fs-select-field-background-color" : backgrounds.base,
|
|
173
178
|
"--fs-select-field-border-color" : lights.dark,
|
|
174
179
|
"--fs-select-field-color" : darks.base,
|
|
175
180
|
"--fs-select-field-active-border-color": darks.dark,
|
|
@@ -178,10 +183,17 @@ export default defineComponent({
|
|
|
178
183
|
};
|
|
179
184
|
});
|
|
180
185
|
|
|
186
|
+
const listStyle = computed((): any => {
|
|
187
|
+
return {
|
|
188
|
+
style: style.value
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
|
|
181
192
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
182
193
|
|
|
183
194
|
return {
|
|
184
195
|
validateOn,
|
|
196
|
+
listStyle,
|
|
185
197
|
messages,
|
|
186
198
|
blurred,
|
|
187
199
|
slots,
|
|
@@ -751,11 +751,11 @@ export default defineComponent({
|
|
|
751
751
|
});
|
|
752
752
|
|
|
753
753
|
const classes = computed((): string[] => {
|
|
754
|
-
const
|
|
754
|
+
const classNames = ["fs-data-table"];
|
|
755
755
|
if (props.groupBy) {
|
|
756
|
-
|
|
756
|
+
classNames.push("fs-data-table-grouped");
|
|
757
757
|
}
|
|
758
|
-
return
|
|
758
|
+
return classNames;
|
|
759
759
|
});
|
|
760
760
|
|
|
761
761
|
const extraHeaders = computed((): any[] => {
|
package/composables/useSlots.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useSlots as useVueSlots } from "vue"
|
|
1
|
+
import { Slot, useSlots as useVueSlots } from "vue"
|
|
2
2
|
|
|
3
3
|
export const useSlots = () => {
|
|
4
4
|
const getChildren = (name: string | undefined = undefined): any => {
|
|
@@ -36,7 +36,7 @@ export const useSlots = () => {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
return {
|
|
39
|
-
slots: { ...useVueSlots() },
|
|
39
|
+
slots: { ...useVueSlots() } as { [label: string]: Slot<any> },
|
|
40
40
|
getChildren,
|
|
41
41
|
getFirstChild
|
|
42
42
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.54",
|
|
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": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.54",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.54",
|
|
15
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
16
|
"@lexical/clipboard": "^0.12.5",
|
|
17
17
|
"@lexical/history": "^0.12.5",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sass": "^1.69.5",
|
|
33
33
|
"sass-loader": "^13.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "391503e595cd9d731fca14b5bb2d3a10b6efee95"
|
|
36
36
|
}
|
|
@@ -33,4 +33,20 @@
|
|
|
33
33
|
|
|
34
34
|
.fs-autocomplete-field-description {
|
|
35
35
|
color: var(--fs-autocomplete-field-color);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.v-overlay-container > .v-overlay > .v-autocomplete__content {
|
|
39
|
+
box-shadow: 0px 5px 8px 0px #00000029;
|
|
40
|
+
border-radius: 4px;
|
|
41
|
+
|
|
42
|
+
& .v-list {
|
|
43
|
+
background-color: var(--fs-autocomplete-field-background-color);
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
margin-top: 4px;
|
|
46
|
+
padding: 2px;
|
|
47
|
+
|
|
48
|
+
& .v-list-item {
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
36
52
|
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
max-height: var(--fs-fade-out-height);
|
|
5
5
|
padding: var(--fs-fade-out-padding);
|
|
6
6
|
width: var(--fs-fade-out-width);
|
|
7
|
+
padding-bottom: 0 !important;
|
|
8
|
+
padding-top: 0 !important;
|
|
7
9
|
flex-direction: column;
|
|
8
10
|
position: relative;
|
|
9
11
|
display: flex;
|
|
@@ -15,7 +17,7 @@
|
|
|
15
17
|
z-index: 10;
|
|
16
18
|
min-height: var(--fs-fade-out-top-mask-height);
|
|
17
19
|
width: 100%;
|
|
18
|
-
top:
|
|
20
|
+
top: 0;
|
|
19
21
|
transition: all 0.14s cubic-bezier(0.4, 0, 0.2, 1);
|
|
20
22
|
background: linear-gradient(to top, transparent 0, var(--fs-fade-out-mask-color) var(--fs-fade-out-top-mask-height));
|
|
21
23
|
}
|
|
@@ -26,7 +28,7 @@
|
|
|
26
28
|
z-index: 10;
|
|
27
29
|
min-height: var(--fs-fade-out-bottom-mask-height);
|
|
28
30
|
width: 100%;
|
|
29
|
-
bottom:
|
|
31
|
+
bottom: 0;
|
|
30
32
|
transition: all 0.14s cubic-bezier(0.4, 0, 0.2, 1);
|
|
31
33
|
background: linear-gradient(to bottom, transparent 0, var(--fs-fade-out-mask-color) var(--fs-fade-out-bottom-mask-height));
|
|
32
34
|
}
|
|
@@ -31,4 +31,22 @@
|
|
|
31
31
|
|
|
32
32
|
.fs-select-field-description {
|
|
33
33
|
color: var(--fs-select-field-color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.v-overlay-container > .v-overlay > .v-select__content {
|
|
37
|
+
box-shadow: 0px 5px 8px 0px #00000029;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
|
|
40
|
+
& > .v-list {
|
|
41
|
+
@extend .fs-hide-y-scrollbar;
|
|
42
|
+
|
|
43
|
+
background-color: var(--fs-select-field-background-color);
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
margin-top: 4px;
|
|
46
|
+
padding: 2px;
|
|
47
|
+
|
|
48
|
+
& .v-list-item {
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
34
52
|
}
|
package/utils/css.ts
CHANGED
|
@@ -20,7 +20,36 @@ export const sizeToVar = (value: string[] | number[] | string | number | null, n
|
|
|
20
20
|
return typeof value === 'string' && isNaN(+value) ? value : `${value}${unit}`;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
export const varToSize = (value: string): number => {
|
|
23
|
+
export const varToSize = (value: string[] | number[] | string | number | null): number => {
|
|
24
|
+
if (value == null) {
|
|
25
|
+
return 0;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(value)) {
|
|
28
|
+
if (isExtraSmall.value) {
|
|
29
|
+
const extraSmallValue = value[2] ?? value[1] ?? value[0];
|
|
30
|
+
if (typeof extraSmallValue === 'number') {
|
|
31
|
+
return extraSmallValue;
|
|
32
|
+
}
|
|
33
|
+
const parsed = parseInt(extraSmallValue.replace(/[^0-9.]/g, ''));
|
|
34
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
35
|
+
}
|
|
36
|
+
if (isMobileSized.value) {
|
|
37
|
+
const mobileValue = value[1] ?? value[0];
|
|
38
|
+
if (typeof mobileValue === 'number') {
|
|
39
|
+
return mobileValue;
|
|
40
|
+
}
|
|
41
|
+
const parsed = parseInt(mobileValue.replace(/[^0-9.]/g, ''));
|
|
42
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
43
|
+
}
|
|
44
|
+
if (typeof value[0] === 'number') {
|
|
45
|
+
return value[0];
|
|
46
|
+
}
|
|
47
|
+
const parsed = parseInt(value[0].replace(/[^0-9.]/g, ''));
|
|
48
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
49
|
+
}
|
|
50
|
+
if (typeof value === 'number') {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
24
53
|
const parsed = parseInt(value.replace(/[^0-9.]/g, ''));
|
|
25
54
|
return isNaN(parsed) ? 0 : parsed;
|
|
26
55
|
}
|
package/utils/time.ts
CHANGED
|
@@ -25,5 +25,5 @@ export const getTimeScaleIndex = (value: number): number => {
|
|
|
25
25
|
export const getTimeBestString = (value: number): string => {
|
|
26
26
|
const unit = getTimeScaleIndex(value);
|
|
27
27
|
const figure = value / timeScale[unit].id;
|
|
28
|
-
return `${figure} ${figure === 1 ? timeScale[unit].label.toLowerCase() : timeScale[unit].plural.
|
|
28
|
+
return `${figure} ${figure === 1 ? timeScale[unit].label.toLowerCase() : timeScale[unit].plural.toLowerCase()}`;
|
|
29
29
|
}
|