@dative-gpi/foundation-shared-components 1.0.6 → 1.0.7
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/FSIcon.vue
CHANGED
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
default: null
|
|
32
32
|
},
|
|
33
33
|
variant: {
|
|
34
|
-
type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
34
|
+
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
35
35
|
required: false,
|
|
36
36
|
default: "base"
|
|
37
37
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
+
:variant="$props.backgroundVariant"
|
|
3
4
|
:color="$props.backgroundColor"
|
|
5
|
+
:border="$props.border"
|
|
4
6
|
:height="$props.size"
|
|
5
7
|
:width="$props.size"
|
|
6
|
-
:variant="variant"
|
|
7
|
-
:border="border"
|
|
8
8
|
>
|
|
9
9
|
<FSRow
|
|
10
10
|
align="center-center"
|
|
11
11
|
>
|
|
12
12
|
<FSIcon
|
|
13
|
-
variant="
|
|
14
|
-
:size="$props.iconSize"
|
|
13
|
+
:variant="$props.iconVariant"
|
|
15
14
|
:color="$props.iconColor"
|
|
15
|
+
:size="$props.iconSize"
|
|
16
16
|
>
|
|
17
17
|
{{ $props.icon }}
|
|
18
18
|
</FSIcon>
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</template>
|
|
22
22
|
|
|
23
23
|
<script lang="ts">
|
|
24
|
-
import {
|
|
24
|
+
import { defineComponent, type PropType } from "vue";
|
|
25
25
|
|
|
26
26
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
27
27
|
|
|
@@ -45,6 +45,11 @@ export default defineComponent({
|
|
|
45
45
|
required: false,
|
|
46
46
|
default: null
|
|
47
47
|
},
|
|
48
|
+
backgroundVariant: {
|
|
49
|
+
type: String as PropType<"background" | "gradient">,
|
|
50
|
+
required: false,
|
|
51
|
+
default: "background"
|
|
52
|
+
},
|
|
48
53
|
icon: {
|
|
49
54
|
type: String as PropType<string>,
|
|
50
55
|
required: false,
|
|
@@ -55,31 +60,21 @@ export default defineComponent({
|
|
|
55
60
|
required: false,
|
|
56
61
|
default: ColorEnum.Dark
|
|
57
62
|
},
|
|
63
|
+
iconVariant: {
|
|
64
|
+
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
65
|
+
required: false,
|
|
66
|
+
default: "base"
|
|
67
|
+
},
|
|
58
68
|
iconSize: {
|
|
59
69
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
60
70
|
required: false,
|
|
61
71
|
default: "56px"
|
|
72
|
+
},
|
|
73
|
+
border: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: false,
|
|
76
|
+
default: true
|
|
62
77
|
}
|
|
63
|
-
},
|
|
64
|
-
setup(props) {
|
|
65
|
-
const variant = computed((): "background" | "gradient" => {
|
|
66
|
-
switch (props.backgroundColor) {
|
|
67
|
-
case ColorEnum.Background: return "background";
|
|
68
|
-
default : return "gradient";
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
const border = computed((): boolean => {
|
|
73
|
-
switch (props.backgroundColor) {
|
|
74
|
-
case ColorEnum.Background: return true;
|
|
75
|
-
default : return false;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
return {
|
|
80
|
-
variant,
|
|
81
|
-
border
|
|
82
|
-
};
|
|
83
78
|
}
|
|
84
79
|
});
|
|
85
80
|
</script>
|
|
@@ -150,9 +150,9 @@
|
|
|
150
150
|
/>
|
|
151
151
|
<FSIcon
|
|
152
152
|
v-else-if="$props.icon"
|
|
153
|
+
:color="$props.color"
|
|
153
154
|
:icon="$props.icon"
|
|
154
155
|
:size="imageSize"
|
|
155
|
-
:color="$props.color"
|
|
156
156
|
/>
|
|
157
157
|
<FSCol
|
|
158
158
|
align="center-left"
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
<script lang="ts">
|
|
211
211
|
import { computed, defineComponent, type PropType } from "vue";
|
|
212
212
|
|
|
213
|
-
import { type
|
|
213
|
+
import { type ColorBase, type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
214
214
|
import { useBreakpoints, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
215
215
|
|
|
216
216
|
import FSBreadcrumbs from "../FSBreadcrumbs.vue";
|
|
@@ -245,8 +245,8 @@ export default defineComponent({
|
|
|
245
245
|
required: false,
|
|
246
246
|
default: null
|
|
247
247
|
},
|
|
248
|
-
color
|
|
249
|
-
type:
|
|
248
|
+
color: {
|
|
249
|
+
type: String as PropType<ColorBase>,
|
|
250
250
|
required: false,
|
|
251
251
|
default: null
|
|
252
252
|
},
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<template
|
|
3
|
+
v-if="isExtraSmall"
|
|
4
|
+
>
|
|
5
|
+
<FSCol
|
|
6
|
+
gap="12px"
|
|
7
|
+
>
|
|
8
|
+
<FSText
|
|
9
|
+
font="text-h3"
|
|
10
|
+
>
|
|
11
|
+
{{ $props.title }}
|
|
12
|
+
</FSText>
|
|
13
|
+
<FSBreadcrumbs
|
|
14
|
+
:items="$props.breadcrumbs"
|
|
15
|
+
/>
|
|
16
|
+
</FSCol>
|
|
17
|
+
</template>
|
|
18
|
+
<template
|
|
19
|
+
v-else
|
|
20
|
+
>
|
|
21
|
+
<FSCol
|
|
22
|
+
gap="16px"
|
|
23
|
+
>
|
|
24
|
+
<FSText
|
|
25
|
+
font="text-h2"
|
|
26
|
+
>
|
|
27
|
+
{{ $props.title }}
|
|
28
|
+
</FSText>
|
|
29
|
+
<FSBreadcrumbs
|
|
30
|
+
:items="$props.breadcrumbs"
|
|
31
|
+
/>
|
|
32
|
+
<FSSlideGroup
|
|
33
|
+
v-if="$slots['toolbar']"
|
|
34
|
+
style="min-width: 100%;"
|
|
35
|
+
>
|
|
36
|
+
<slot
|
|
37
|
+
name="toolbar"
|
|
38
|
+
/>
|
|
39
|
+
</FSSlideGroup>
|
|
40
|
+
</FSCol>
|
|
41
|
+
</template>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script lang="ts">
|
|
45
|
+
import { defineComponent, type PropType } from "vue";
|
|
46
|
+
|
|
47
|
+
import { type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
48
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
49
|
+
|
|
50
|
+
import FSBreadcrumbs from "../FSBreadcrumbs.vue";
|
|
51
|
+
import FSSlideGroup from "../FSSlideGroup.vue";
|
|
52
|
+
import FSText from "../FSText.vue";
|
|
53
|
+
import FSCol from "../FSCol.vue";
|
|
54
|
+
|
|
55
|
+
export default defineComponent({
|
|
56
|
+
name: "FSListHeader",
|
|
57
|
+
components: {
|
|
58
|
+
FSBreadcrumbs,
|
|
59
|
+
FSSlideGroup,
|
|
60
|
+
FSText,
|
|
61
|
+
FSCol
|
|
62
|
+
},
|
|
63
|
+
props: {
|
|
64
|
+
title: {
|
|
65
|
+
type: String as PropType<string | null>,
|
|
66
|
+
required: false,
|
|
67
|
+
default: null
|
|
68
|
+
},
|
|
69
|
+
breadcrumbs: {
|
|
70
|
+
type: Array as PropType<Array<FSBreadcrumbItem>>,
|
|
71
|
+
required: false,
|
|
72
|
+
default: () => []
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
setup() {
|
|
76
|
+
const { isExtraSmall } = useBreakpoints();
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
isExtraSmall
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSkeletonView>
|
|
3
|
+
<template
|
|
4
|
+
#header
|
|
5
|
+
>
|
|
6
|
+
<FSListHeader
|
|
7
|
+
ref="headerRef"
|
|
8
|
+
:breadcrumbs="$props.breadcrumbs"
|
|
9
|
+
:title="$props.title"
|
|
10
|
+
padding="0 14px 0 0"
|
|
11
|
+
>
|
|
12
|
+
<template
|
|
13
|
+
#toolbar
|
|
14
|
+
>
|
|
15
|
+
<slot
|
|
16
|
+
name="toolbar"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
</FSListHeader>
|
|
20
|
+
</template>
|
|
21
|
+
<template
|
|
22
|
+
#default
|
|
23
|
+
>
|
|
24
|
+
<FSFadeOut
|
|
25
|
+
padding="0 8px 0 0"
|
|
26
|
+
:height="height"
|
|
27
|
+
>
|
|
28
|
+
<slot
|
|
29
|
+
name="default"
|
|
30
|
+
/>
|
|
31
|
+
</FSFadeOut>
|
|
32
|
+
</template>
|
|
33
|
+
</FSSkeletonView>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
38
|
+
|
|
39
|
+
import { type FSBreadcrumbItem } from "@dative-gpi/foundation-shared-components/models";
|
|
40
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
41
|
+
|
|
42
|
+
import FSSkeletonView from "./FSSkeletonView.vue";
|
|
43
|
+
import FSListHeader from "./FSListHeader.vue";
|
|
44
|
+
import FSFadeOut from "../FSFadeOut.vue";
|
|
45
|
+
|
|
46
|
+
export default defineComponent({
|
|
47
|
+
name: "FSListView",
|
|
48
|
+
components: {
|
|
49
|
+
FSSkeletonView,
|
|
50
|
+
FSListHeader,
|
|
51
|
+
FSFadeOut
|
|
52
|
+
},
|
|
53
|
+
props: {
|
|
54
|
+
title: {
|
|
55
|
+
type: String as PropType<string | null>,
|
|
56
|
+
required: false,
|
|
57
|
+
default: null
|
|
58
|
+
},
|
|
59
|
+
breadcrumbs: {
|
|
60
|
+
type: Array as PropType<FSBreadcrumbItem[]>,
|
|
61
|
+
required: false,
|
|
62
|
+
default: () => []
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
setup() {
|
|
66
|
+
const { isExtraSmall, windowHeight } = useBreakpoints();
|
|
67
|
+
|
|
68
|
+
const headerRef = ref<HTMLElement | null>(null);
|
|
69
|
+
|
|
70
|
+
const height = computed((): string => {
|
|
71
|
+
let other = isExtraSmall.value ? 16 + 16 : 24 + 24 // Paddings
|
|
72
|
+
+ (headerRef.value?.clientHeight ?? 0); // Header
|
|
73
|
+
|
|
74
|
+
return `${windowHeight.value - other}px`;
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
headerRef,
|
|
79
|
+
height
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</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.7",
|
|
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.7",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.7"
|
|
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": "d0380d86664f9d28f757a4f2c0d06bf5cd9ca5e9"
|
|
39
39
|
}
|