@dative-gpi/foundation-shared-components 1.0.17 → 1.0.19
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/FSButton.vue +37 -20
- package/components/FSCheckbox.vue +1 -1
- package/components/FSDivider.vue +1 -1
- package/components/FSLabel.vue +1 -1
- package/components/FSLink.vue +1 -1
- package/components/FSLoader.vue +2 -2
- package/components/FSRadio.vue +1 -1
- package/components/FSSlider.vue +1 -1
- package/components/FSSpan.vue +1 -1
- package/components/FSSwitch.vue +1 -1
- package/components/FSText.vue +1 -1
- package/components/buttons/FSButtonAddMini.vue +0 -1
- package/components/buttons/FSButtonCancelMini.vue +1 -1
- package/components/buttons/FSButtonDuplicateMini.vue +1 -1
- package/components/buttons/FSButtonEditMini.vue +1 -1
- package/components/buttons/FSButtonFileMini.vue +1 -1
- package/components/buttons/FSButtonNextMini.vue +1 -1
- package/components/buttons/FSButtonPreviousMini.vue +1 -1
- package/components/buttons/FSButtonRedoMini.vue +1 -1
- package/components/buttons/FSButtonRemoveMini.vue +1 -1
- package/components/buttons/FSButtonSaveMini.vue +1 -1
- package/components/buttons/FSButtonSearchMini.vue +1 -1
- package/components/buttons/FSButtonUndoMini.vue +1 -1
- package/components/buttons/FSButtonUpdateMini.vue +1 -1
- package/components/buttons/FSButtonValidateMini.vue +1 -1
- package/components/fields/FSBaseField.vue +1 -1
- package/components/views/FSEntityHeader.vue +9 -9
- package/components/views/FSEntityView.vue +12 -123
- package/components/views/FSEntityViewUI.vue +148 -0
- package/package.json +4 -4
- package/styles/globals/text_fonts.scss +17 -55
package/components/FSButton.vue
CHANGED
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
<FSClickable
|
|
3
3
|
v-if="$props.variant !== 'icon'"
|
|
4
4
|
:editable="$props.editable"
|
|
5
|
-
:padding="
|
|
5
|
+
:padding="padding"
|
|
6
6
|
:variant="$props.variant"
|
|
7
|
-
:height="$props.height"
|
|
8
7
|
:color="$props.color"
|
|
9
|
-
:width="$props.width"
|
|
10
8
|
:load="$props.load"
|
|
11
9
|
:href="$props.href"
|
|
12
10
|
:to="$props.to"
|
|
@@ -15,7 +13,7 @@
|
|
|
15
13
|
v-bind="$attrs"
|
|
16
14
|
>
|
|
17
15
|
<FSRow
|
|
18
|
-
v-if="$props.
|
|
16
|
+
v-if="$props.direction === 'row'"
|
|
19
17
|
align="center-center"
|
|
20
18
|
width="fill"
|
|
21
19
|
:wrap="false"
|
|
@@ -166,7 +164,7 @@
|
|
|
166
164
|
</template>
|
|
167
165
|
|
|
168
166
|
<script lang="ts">
|
|
169
|
-
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
167
|
+
import { computed, defineComponent, type PropType, type StyleValue, useSlots } from "vue";
|
|
170
168
|
import { type RouteLocation } from "vue-router";
|
|
171
169
|
|
|
172
170
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -178,6 +176,12 @@ import FSIcon from "./FSIcon.vue";
|
|
|
178
176
|
import FSCol from "./FSCol.vue";
|
|
179
177
|
import FSRow from "./FSRow.vue";
|
|
180
178
|
|
|
179
|
+
const PADDING_ICON_ONLY = "7px";
|
|
180
|
+
const PADDING_LABEL_ONLY = ["9px 16px", "9px 12px"];
|
|
181
|
+
const PADDING_ICON_LABEL = ["7px 16px", "7px 12px"];
|
|
182
|
+
|
|
183
|
+
const DEFAULT_PADDING = PADDING_ICON_LABEL;
|
|
184
|
+
|
|
181
185
|
export default defineComponent({
|
|
182
186
|
name: "FSButton",
|
|
183
187
|
components: {
|
|
@@ -188,20 +192,10 @@ export default defineComponent({
|
|
|
188
192
|
FSRow
|
|
189
193
|
},
|
|
190
194
|
props: {
|
|
191
|
-
height: {
|
|
192
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
193
|
-
required: false,
|
|
194
|
-
default: () => ["40px", "36px"]
|
|
195
|
-
},
|
|
196
|
-
width: {
|
|
197
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
198
|
-
required: false,
|
|
199
|
-
default: "fit-content"
|
|
200
|
-
},
|
|
201
195
|
padding: {
|
|
202
196
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
203
197
|
required: false,
|
|
204
|
-
default:
|
|
198
|
+
default: DEFAULT_PADDING
|
|
205
199
|
},
|
|
206
200
|
to: {
|
|
207
201
|
type: [String, Object] as PropType<string | RouteLocation | null>,
|
|
@@ -236,17 +230,17 @@ export default defineComponent({
|
|
|
236
230
|
iconSize: {
|
|
237
231
|
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
238
232
|
required: false,
|
|
239
|
-
default: "
|
|
233
|
+
default: () => ["24", "20"]
|
|
240
234
|
},
|
|
241
235
|
variant: {
|
|
242
236
|
type: String as PropType<"standard" | "full" | "icon">,
|
|
243
237
|
required: false,
|
|
244
238
|
default: "standard"
|
|
245
239
|
},
|
|
246
|
-
|
|
247
|
-
type: String as PropType<"
|
|
240
|
+
direction: {
|
|
241
|
+
type: String as PropType<"row" | "column">,
|
|
248
242
|
required: false,
|
|
249
|
-
default: "
|
|
243
|
+
default: "row"
|
|
250
244
|
},
|
|
251
245
|
color: {
|
|
252
246
|
type: String as PropType<ColorBase>,
|
|
@@ -271,6 +265,7 @@ export default defineComponent({
|
|
|
271
265
|
const colors = computed(() => getColors(props.color));
|
|
272
266
|
const lights = getColors(ColorEnum.Light);
|
|
273
267
|
const darks = getColors(ColorEnum.Dark);
|
|
268
|
+
const slots = useSlots();
|
|
274
269
|
|
|
275
270
|
const style = computed((): StyleValue => {
|
|
276
271
|
if (!props.editable) {
|
|
@@ -314,6 +309,27 @@ export default defineComponent({
|
|
|
314
309
|
}
|
|
315
310
|
});
|
|
316
311
|
|
|
312
|
+
const padding = computed(() => {
|
|
313
|
+
if(props.padding !== DEFAULT_PADDING){
|
|
314
|
+
return props.padding;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
const hasIcon = props.prependIcon || props.appendIcon || props.icon
|
|
318
|
+
|| !!slots.prepend || !!slots.append;
|
|
319
|
+
|
|
320
|
+
const hasLabel = props.label || !!slots.default;
|
|
321
|
+
|
|
322
|
+
if(!hasLabel && hasIcon){
|
|
323
|
+
return PADDING_ICON_ONLY;
|
|
324
|
+
}
|
|
325
|
+
else if(hasLabel && !hasIcon)
|
|
326
|
+
{
|
|
327
|
+
return PADDING_LABEL_ONLY;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
return DEFAULT_PADDING;
|
|
331
|
+
})
|
|
332
|
+
|
|
317
333
|
const onClick = (event: MouseEvent) => {
|
|
318
334
|
if (!props.to && !props.href && props.editable && !props.load) {
|
|
319
335
|
emit("click", event);
|
|
@@ -325,6 +341,7 @@ export default defineComponent({
|
|
|
325
341
|
loadColor,
|
|
326
342
|
colors,
|
|
327
343
|
style,
|
|
344
|
+
padding,
|
|
328
345
|
onClick
|
|
329
346
|
};
|
|
330
347
|
}
|
package/components/FSDivider.vue
CHANGED
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
default: "100%"
|
|
60
60
|
},
|
|
61
61
|
font: {
|
|
62
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline"
|
|
62
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline">,
|
|
63
63
|
required: false,
|
|
64
64
|
default: "text-body"
|
|
65
65
|
},
|
package/components/FSLabel.vue
CHANGED
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
default: null
|
|
36
36
|
},
|
|
37
37
|
font: {
|
|
38
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline"
|
|
38
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline">,
|
|
39
39
|
required: false,
|
|
40
40
|
default: "text-body"
|
|
41
41
|
},
|
package/components/FSLink.vue
CHANGED
|
@@ -50,7 +50,7 @@ export default defineComponent({
|
|
|
50
50
|
default: null
|
|
51
51
|
},
|
|
52
52
|
font: {
|
|
53
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline"
|
|
53
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline">,
|
|
54
54
|
required: false,
|
|
55
55
|
default: "text-body"
|
|
56
56
|
},
|
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-h4" | "text-body" | "text-button" | "text-overline"
|
|
35
|
+
type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline">,
|
|
36
36
|
required: false,
|
|
37
37
|
default: "standard"
|
|
38
38
|
},
|
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
case "text-body" :
|
|
71
71
|
case "text-button" : return isMobileSized.value ? "14px" : "16px";
|
|
72
72
|
case "text-overline" :
|
|
73
|
-
case "text-
|
|
73
|
+
case "text-overline": return "16px";
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
|
package/components/FSRadio.vue
CHANGED
package/components/FSSlider.vue
CHANGED
package/components/FSSpan.vue
CHANGED
|
@@ -24,7 +24,7 @@ export default defineComponent({
|
|
|
24
24
|
default: null
|
|
25
25
|
},
|
|
26
26
|
font: {
|
|
27
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline"
|
|
27
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline">,
|
|
28
28
|
required: false,
|
|
29
29
|
default: "text-body"
|
|
30
30
|
},
|
package/components/FSSwitch.vue
CHANGED
package/components/FSText.vue
CHANGED
|
@@ -25,7 +25,7 @@ export default defineComponent({
|
|
|
25
25
|
default: null
|
|
26
26
|
},
|
|
27
27
|
font: {
|
|
28
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline"
|
|
28
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline">,
|
|
29
29
|
required: false,
|
|
30
30
|
default: "text-body"
|
|
31
31
|
},
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
:height="imageSize"
|
|
15
15
|
:wrap="false"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
18
|
-
v-if="$props.
|
|
19
|
-
:
|
|
17
|
+
<FSImageUI
|
|
18
|
+
v-if="$props.imageSource"
|
|
19
|
+
:source="$props.imageSource"
|
|
20
20
|
:cover="imageCover"
|
|
21
21
|
:height="imageSize"
|
|
22
22
|
:width="imageSize"
|
|
@@ -136,9 +136,9 @@
|
|
|
136
136
|
:height="imageSize"
|
|
137
137
|
:wrap="false"
|
|
138
138
|
>
|
|
139
|
-
<
|
|
140
|
-
v-if="$props.
|
|
141
|
-
:
|
|
139
|
+
<FSImageUI
|
|
140
|
+
v-if="$props.imageSource"
|
|
141
|
+
:source="$props.imageSource"
|
|
142
142
|
:cover="imageCover"
|
|
143
143
|
:height="imageSize"
|
|
144
144
|
:width="imageSize"
|
|
@@ -220,7 +220,7 @@ import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-componen
|
|
|
220
220
|
import FSBreadcrumbs from "../FSBreadcrumbs.vue";
|
|
221
221
|
import FSSlideGroup from "../FSSlideGroup.vue";
|
|
222
222
|
import FSIconCard from "../FSIconCard.vue";
|
|
223
|
-
import
|
|
223
|
+
import FSImageUI from "../FSImageUI.vue";
|
|
224
224
|
import FSIcon from "../FSIcon.vue";
|
|
225
225
|
import FSText from "../FSText.vue";
|
|
226
226
|
import FSCol from "../FSCol.vue";
|
|
@@ -232,14 +232,14 @@ export default defineComponent({
|
|
|
232
232
|
FSBreadcrumbs,
|
|
233
233
|
FSSlideGroup,
|
|
234
234
|
FSIconCard,
|
|
235
|
-
|
|
235
|
+
FSImageUI,
|
|
236
236
|
FSIcon,
|
|
237
237
|
FSText,
|
|
238
238
|
FSCol,
|
|
239
239
|
FSRow
|
|
240
240
|
},
|
|
241
241
|
props: {
|
|
242
|
-
|
|
242
|
+
imageSource: {
|
|
243
243
|
type: String as PropType<string | null>,
|
|
244
244
|
required: false,
|
|
245
245
|
default: null
|
|
@@ -1,147 +1,36 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<FSEntityHeader
|
|
7
|
-
ref="headerRef"
|
|
8
|
-
:breadcrumbs="$props.breadcrumbs"
|
|
9
|
-
:description="$props.description"
|
|
10
|
-
:subtitle="$props.subtitle"
|
|
11
|
-
:imageId="$props.imageId"
|
|
12
|
-
:title="$props.title"
|
|
13
|
-
:light="lightHeader"
|
|
14
|
-
:icon="$props.icon"
|
|
15
|
-
:color="$props.color"
|
|
16
|
-
:iconBackgroundColors="$props.iconBackgroundColors"
|
|
17
|
-
:imageCover="$props.imageCover"
|
|
18
|
-
>
|
|
19
|
-
<template
|
|
20
|
-
#title-append
|
|
21
|
-
>
|
|
22
|
-
<slot
|
|
23
|
-
name="title-append"
|
|
24
|
-
/>
|
|
25
|
-
</template>
|
|
26
|
-
<template
|
|
27
|
-
#toolbar
|
|
28
|
-
v-if="slots['toolbar']"
|
|
29
|
-
>
|
|
30
|
-
<slot
|
|
31
|
-
name="toolbar"
|
|
32
|
-
/>
|
|
33
|
-
</template>
|
|
34
|
-
</FSEntityHeader>
|
|
35
|
-
</template>
|
|
36
|
-
<template
|
|
37
|
-
#default
|
|
38
|
-
>
|
|
39
|
-
<!-- <FSFadeOut
|
|
40
|
-
padding="0 8px 0 0"
|
|
41
|
-
:height="height"
|
|
42
|
-
@scroll="onScroll"
|
|
43
|
-
> -->
|
|
44
|
-
<slot
|
|
45
|
-
name="default"
|
|
46
|
-
/>
|
|
47
|
-
<!-- </FSFadeOut> -->
|
|
48
|
-
</template>
|
|
49
|
-
</FSSkeletonView>
|
|
2
|
+
<FSEntityViewUI
|
|
3
|
+
:imageSource="source"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
/>
|
|
50
6
|
</template>
|
|
51
7
|
|
|
52
8
|
<script lang="ts">
|
|
53
|
-
import { computed, defineComponent, type PropType
|
|
9
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
54
10
|
|
|
55
|
-
import {
|
|
56
|
-
import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
11
|
+
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config";
|
|
57
12
|
|
|
58
|
-
import
|
|
59
|
-
import FSSkeletonView from "./FSSkeletonView.vue";
|
|
60
|
-
// import FSFadeOut from "../FSFadeOut.vue";
|
|
13
|
+
import FSEntityViewUI from "./FSEntityViewUI.vue";
|
|
61
14
|
|
|
62
15
|
export default defineComponent({
|
|
63
16
|
name: "FSEntityView",
|
|
64
17
|
components: {
|
|
65
|
-
|
|
66
|
-
FSSkeletonView
|
|
67
|
-
// FSFadeOut
|
|
18
|
+
FSEntityViewUI
|
|
68
19
|
},
|
|
69
20
|
props: {
|
|
70
21
|
imageId: {
|
|
71
22
|
type: String as PropType<string | null>,
|
|
72
23
|
required: false,
|
|
73
24
|
default: null
|
|
74
|
-
},
|
|
75
|
-
imageCover: {
|
|
76
|
-
type: Boolean,
|
|
77
|
-
required: false,
|
|
78
|
-
default: true
|
|
79
|
-
},
|
|
80
|
-
icon: {
|
|
81
|
-
type: String as PropType<string | null>,
|
|
82
|
-
required: false,
|
|
83
|
-
default: null
|
|
84
|
-
},
|
|
85
|
-
color : {
|
|
86
|
-
type: Object as PropType<ColorEnum | null>,
|
|
87
|
-
required: false,
|
|
88
|
-
default: null
|
|
89
|
-
},
|
|
90
|
-
iconBackgroundColors: {
|
|
91
|
-
type: Array as PropType<string[]>,
|
|
92
|
-
required: false,
|
|
93
|
-
default: () => []
|
|
94
|
-
},
|
|
95
|
-
title: {
|
|
96
|
-
type: String as PropType<string | null>,
|
|
97
|
-
required: false,
|
|
98
|
-
default: null
|
|
99
|
-
},
|
|
100
|
-
subtitle: {
|
|
101
|
-
type: String as PropType<string | null>,
|
|
102
|
-
required: false,
|
|
103
|
-
default: null
|
|
104
|
-
},
|
|
105
|
-
description: {
|
|
106
|
-
type: String as PropType<string | null>,
|
|
107
|
-
required: false,
|
|
108
|
-
default: null
|
|
109
|
-
},
|
|
110
|
-
breadcrumbs: {
|
|
111
|
-
type: Array as PropType<FSBreadcrumbItem[]>,
|
|
112
|
-
required: false,
|
|
113
|
-
default: () => []
|
|
114
25
|
}
|
|
115
26
|
},
|
|
116
|
-
setup() {
|
|
117
|
-
const
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const headerRef = ref<HTMLElement | null>(null);
|
|
121
|
-
|
|
122
|
-
const lightHeader = ref(false);
|
|
123
|
-
|
|
124
|
-
const height = computed((): string => {
|
|
125
|
-
let other = isExtraSmall.value ? 16 + 16 : 24 + 24; // Paddings
|
|
126
|
-
|
|
127
|
-
return `${windowHeight.value - other}px`;
|
|
27
|
+
setup(props) {
|
|
28
|
+
const source = computed(() => {
|
|
29
|
+
return props.imageId ? IMAGE_RAW_URL(props.imageId) : null;
|
|
128
30
|
});
|
|
129
31
|
|
|
130
|
-
// const onScroll = (event: any): void => {
|
|
131
|
-
// if (event.onTop) {
|
|
132
|
-
// lightHeader.value = false;
|
|
133
|
-
// }
|
|
134
|
-
// else if (event.target.scrollTop > (headerRef.value as any)?.$el.clientHeight) {
|
|
135
|
-
// lightHeader.value = true;
|
|
136
|
-
// }
|
|
137
|
-
// };
|
|
138
|
-
|
|
139
32
|
return {
|
|
140
|
-
|
|
141
|
-
headerRef,
|
|
142
|
-
height,
|
|
143
|
-
slots
|
|
144
|
-
// onScroll
|
|
33
|
+
source
|
|
145
34
|
};
|
|
146
35
|
}
|
|
147
36
|
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSkeletonView>
|
|
3
|
+
<template
|
|
4
|
+
#header
|
|
5
|
+
>
|
|
6
|
+
<FSEntityHeader
|
|
7
|
+
ref="headerRef"
|
|
8
|
+
:breadcrumbs="$props.breadcrumbs"
|
|
9
|
+
:description="$props.description"
|
|
10
|
+
:subtitle="$props.subtitle"
|
|
11
|
+
:imageSource="$props.imageSource"
|
|
12
|
+
:title="$props.title"
|
|
13
|
+
:light="lightHeader"
|
|
14
|
+
:icon="$props.icon"
|
|
15
|
+
:color="$props.color"
|
|
16
|
+
:iconBackgroundColors="$props.iconBackgroundColors"
|
|
17
|
+
:imageCover="$props.imageCover"
|
|
18
|
+
>
|
|
19
|
+
<template
|
|
20
|
+
#title-append
|
|
21
|
+
>
|
|
22
|
+
<slot
|
|
23
|
+
name="title-append"
|
|
24
|
+
/>
|
|
25
|
+
</template>
|
|
26
|
+
<template
|
|
27
|
+
#toolbar
|
|
28
|
+
v-if="slots['toolbar']"
|
|
29
|
+
>
|
|
30
|
+
<slot
|
|
31
|
+
name="toolbar"
|
|
32
|
+
/>
|
|
33
|
+
</template>
|
|
34
|
+
</FSEntityHeader>
|
|
35
|
+
</template>
|
|
36
|
+
<template
|
|
37
|
+
#default
|
|
38
|
+
>
|
|
39
|
+
<!-- <FSFadeOut
|
|
40
|
+
padding="0 8px 0 0"
|
|
41
|
+
:height="height"
|
|
42
|
+
@scroll="onScroll"
|
|
43
|
+
> -->
|
|
44
|
+
<slot
|
|
45
|
+
name="default"
|
|
46
|
+
/>
|
|
47
|
+
<!-- </FSFadeOut> -->
|
|
48
|
+
</template>
|
|
49
|
+
</FSSkeletonView>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script lang="ts">
|
|
53
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
54
|
+
|
|
55
|
+
import { type ColorEnum, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
56
|
+
import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
57
|
+
|
|
58
|
+
import FSEntityHeader from "./FSEntityHeader.vue";
|
|
59
|
+
import FSSkeletonView from "./FSSkeletonView.vue";
|
|
60
|
+
// import FSFadeOut from "../FSFadeOut.vue";
|
|
61
|
+
|
|
62
|
+
export default defineComponent({
|
|
63
|
+
name: "FSEntityViewUI",
|
|
64
|
+
components: {
|
|
65
|
+
FSEntityHeader,
|
|
66
|
+
FSSkeletonView
|
|
67
|
+
// FSFadeOut
|
|
68
|
+
},
|
|
69
|
+
props: {
|
|
70
|
+
imageSource: {
|
|
71
|
+
type: String as PropType<string | null>,
|
|
72
|
+
required: false,
|
|
73
|
+
default: null
|
|
74
|
+
},
|
|
75
|
+
imageCover: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: false,
|
|
78
|
+
default: true
|
|
79
|
+
},
|
|
80
|
+
icon: {
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: null
|
|
84
|
+
},
|
|
85
|
+
color : {
|
|
86
|
+
type: Object as PropType<ColorEnum | null>,
|
|
87
|
+
required: false,
|
|
88
|
+
default: null
|
|
89
|
+
},
|
|
90
|
+
iconBackgroundColors: {
|
|
91
|
+
type: Array as PropType<string[]>,
|
|
92
|
+
required: false,
|
|
93
|
+
default: () => []
|
|
94
|
+
},
|
|
95
|
+
title: {
|
|
96
|
+
type: String as PropType<string | null>,
|
|
97
|
+
required: false,
|
|
98
|
+
default: null
|
|
99
|
+
},
|
|
100
|
+
subtitle: {
|
|
101
|
+
type: String as PropType<string | null>,
|
|
102
|
+
required: false,
|
|
103
|
+
default: null
|
|
104
|
+
},
|
|
105
|
+
description: {
|
|
106
|
+
type: String as PropType<string | null>,
|
|
107
|
+
required: false,
|
|
108
|
+
default: null
|
|
109
|
+
},
|
|
110
|
+
breadcrumbs: {
|
|
111
|
+
type: Array as PropType<FSBreadcrumbItem[]>,
|
|
112
|
+
required: false,
|
|
113
|
+
default: () => []
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
setup() {
|
|
117
|
+
const { isExtraSmall, windowHeight } = useBreakpoints();
|
|
118
|
+
const { slots } = useSlots();
|
|
119
|
+
|
|
120
|
+
const headerRef = ref<HTMLElement | null>(null);
|
|
121
|
+
|
|
122
|
+
const lightHeader = ref(false);
|
|
123
|
+
|
|
124
|
+
const height = computed((): string => {
|
|
125
|
+
let other = isExtraSmall.value ? 16 + 16 : 24 + 24; // Paddings
|
|
126
|
+
|
|
127
|
+
return `${windowHeight.value - other}px`;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// const onScroll = (event: any): void => {
|
|
131
|
+
// if (event.onTop) {
|
|
132
|
+
// lightHeader.value = false;
|
|
133
|
+
// }
|
|
134
|
+
// else if (event.target.scrollTop > (headerRef.value as any)?.$el.clientHeight) {
|
|
135
|
+
// lightHeader.value = true;
|
|
136
|
+
// }
|
|
137
|
+
// };
|
|
138
|
+
|
|
139
|
+
return {
|
|
140
|
+
lightHeader,
|
|
141
|
+
headerRef,
|
|
142
|
+
height,
|
|
143
|
+
slots
|
|
144
|
+
// onScroll
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
</script>
|
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.19",
|
|
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.19",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.19"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "83051b0eadf10f38806ce7a4ab9f9adfcc1bb32e"
|
|
39
39
|
}
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@include mobile {
|
|
17
|
-
font-size:
|
|
17
|
+
font-size: 28px !important;
|
|
18
18
|
line-height: 32px !important;
|
|
19
|
-
letter-spacing: -1.
|
|
19
|
+
letter-spacing: -1.4px !important;
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
font-weight: 600 !important;
|
|
27
27
|
|
|
28
28
|
@include web {
|
|
29
|
-
font-size:
|
|
29
|
+
font-size: 26px !important;
|
|
30
30
|
line-height: 32px !important;
|
|
31
|
-
letter-spacing: -0.
|
|
31
|
+
letter-spacing: -0.78px !important;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@include mobile {
|
|
@@ -44,34 +44,16 @@
|
|
|
44
44
|
font-weight: 600 !important;
|
|
45
45
|
|
|
46
46
|
@include web {
|
|
47
|
-
font-size:
|
|
47
|
+
font-size: 20px !important;
|
|
48
48
|
line-height: 24px !important;
|
|
49
|
-
letter-spacing: -0.
|
|
49
|
+
letter-spacing: -0.6px !important;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
@include mobile {
|
|
53
|
-
font-size: 17px !important;
|
|
54
|
-
line-height: 20px !important;
|
|
55
|
-
letter-spacing: -0.51px !important;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.text-h4 {
|
|
60
|
-
font-family: 'Montserrat', sans-serif !important;
|
|
61
|
-
font-style: normal !important;
|
|
62
|
-
font-weight: 500 !important;
|
|
63
|
-
|
|
64
|
-
@include web {
|
|
65
53
|
font-size: 16px !important;
|
|
66
54
|
line-height: 20px !important;
|
|
67
55
|
letter-spacing: -0.48px !important;
|
|
68
56
|
}
|
|
69
|
-
|
|
70
|
-
@include mobile {
|
|
71
|
-
font-size: 14px !important;
|
|
72
|
-
line-height: 16px !important;
|
|
73
|
-
letter-spacing: -0.41px !important;
|
|
74
|
-
}
|
|
75
57
|
}
|
|
76
58
|
|
|
77
59
|
.text-body {
|
|
@@ -82,14 +64,14 @@
|
|
|
82
64
|
|
|
83
65
|
@include web {
|
|
84
66
|
font-size: 14px !important;
|
|
85
|
-
line-height:
|
|
86
|
-
letter-spacing: -0.
|
|
67
|
+
line-height: 20px !important;
|
|
68
|
+
letter-spacing: -0.42px !important;
|
|
87
69
|
}
|
|
88
70
|
|
|
89
71
|
@include mobile {
|
|
90
72
|
font-size: 12px !important;
|
|
91
|
-
line-height:
|
|
92
|
-
letter-spacing: -0.
|
|
73
|
+
line-height: 16px !important;
|
|
74
|
+
letter-spacing: -0.36px !important;
|
|
93
75
|
}
|
|
94
76
|
}
|
|
95
77
|
|
|
@@ -101,52 +83,32 @@
|
|
|
101
83
|
|
|
102
84
|
@include web {
|
|
103
85
|
font-size: 14px !important;
|
|
104
|
-
line-height:
|
|
105
|
-
letter-spacing: -0.
|
|
86
|
+
line-height: 20px !important;
|
|
87
|
+
letter-spacing: -0.42px !important;
|
|
106
88
|
}
|
|
107
89
|
|
|
108
90
|
@include mobile {
|
|
109
|
-
font-size: 12px !important;
|
|
110
|
-
line-height: 14px !important;
|
|
111
|
-
letter-spacing: -0.39px !important;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.text-overline {
|
|
116
|
-
font-family: 'Montserrat', sans-serif !important;
|
|
117
|
-
font-style: normal !important;
|
|
118
|
-
text-transform: none !important;
|
|
119
|
-
|
|
120
|
-
@include web {
|
|
121
|
-
font-weight: 600 !important;
|
|
122
91
|
font-size: 12px !important;
|
|
123
92
|
line-height: 16px !important;
|
|
124
|
-
letter-spacing: 0.
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
@include mobile {
|
|
128
|
-
font-weight: 500 !important;
|
|
129
|
-
font-size: 10px !important;
|
|
130
|
-
line-height: 16px !important;
|
|
131
|
-
letter-spacing: 0.19px !important;
|
|
93
|
+
letter-spacing: -0.36px !important;
|
|
132
94
|
}
|
|
133
95
|
}
|
|
134
96
|
|
|
135
|
-
.text-
|
|
97
|
+
.text-overline {
|
|
136
98
|
font-family: 'Montserrat', sans-serif !important;
|
|
137
99
|
font-style: normal !important;
|
|
138
|
-
font-weight: 500 !important;
|
|
139
100
|
text-transform: none !important;
|
|
101
|
+
font-weight: 600 !important;
|
|
140
102
|
|
|
141
103
|
@include web {
|
|
142
104
|
font-size: 12px !important;
|
|
143
105
|
line-height: 16px !important;
|
|
144
|
-
letter-spacing: 0
|
|
106
|
+
letter-spacing: 0 !important;
|
|
145
107
|
}
|
|
146
108
|
|
|
147
109
|
@include mobile {
|
|
148
110
|
font-size: 10px !important;
|
|
149
111
|
line-height: 16px !important;
|
|
150
|
-
letter-spacing: 0
|
|
112
|
+
letter-spacing: 0 !important;
|
|
151
113
|
}
|
|
152
114
|
}
|