@dative-gpi/foundation-shared-components 1.0.189-update-fs-card → 1.0.190-feat-time-normalization
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 +89 -43
- package/components/FSCard.vue +100 -201
- package/components/FSCardPlaceholder.vue +25 -29
- package/components/FSChip.vue +127 -54
- package/components/FSChipGroup.vue +3 -3
- package/components/FSClickable.vue +326 -24
- package/components/FSDialogContent.vue +28 -35
- package/components/FSDialogFormBody.vue +1 -0
- package/components/FSEditImageUI.vue +30 -19
- package/components/FSImageCard.vue +4 -4
- package/components/FSLink.vue +13 -1
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +6 -6
- package/components/FSPlayButtons.vue +8 -8
- package/components/FSRouterLink.vue +14 -84
- package/components/agenda/FSAgendaHorizontalEvent.vue +4 -4
- package/components/agenda/FSAgendaVerticalEvent.vue +4 -4
- package/components/deviceOrganisations/FSStatusRichCard.vue +7 -2
- package/components/lists/FSFilterButton.vue +8 -11
- package/components/lists/FSHeaderButton.vue +3 -6
- package/components/tiles/FSTile.vue +65 -31
- package/models/index.ts +1 -2
- package/package.json +4 -4
- package/styles/components/fs_button.scss +7 -2
- package/styles/components/fs_card.scss +4 -75
- package/styles/components/fs_chip.scss +29 -0
- package/styles/components/fs_clickable.scss +69 -0
- package/styles/components/index.scss +1 -0
- package/models/variants.ts +0 -7
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<component
|
|
3
|
+
:is="$attrs.onClick ? FSClickable : FSCard"
|
|
3
4
|
borderStyle="dashed"
|
|
4
5
|
padding="24px"
|
|
5
6
|
:height="$props.height"
|
|
6
|
-
:variant="CardVariants.Standard"
|
|
7
|
-
:color="ColorEnum.Light"
|
|
8
7
|
:width="$props.width"
|
|
9
8
|
:border="true"
|
|
10
9
|
v-bind="$attrs"
|
|
11
10
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
11
|
+
<FSRow
|
|
12
|
+
align="center-center"
|
|
14
13
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{{ $props.label }}
|
|
32
|
-
</FSText>
|
|
33
|
-
</FSRow>
|
|
34
|
-
</slot>
|
|
35
|
-
</template>
|
|
36
|
-
</FSCard>
|
|
14
|
+
<FSIcon
|
|
15
|
+
v-if="$props.icon"
|
|
16
|
+
:color="ColorEnum.Light"
|
|
17
|
+
variant="dark"
|
|
18
|
+
>
|
|
19
|
+
{{ $props.icon }}
|
|
20
|
+
</FSIcon>
|
|
21
|
+
<FSText
|
|
22
|
+
v-if="$props.label"
|
|
23
|
+
:color="ColorEnum.Light"
|
|
24
|
+
variant="dark"
|
|
25
|
+
>
|
|
26
|
+
{{ $props.label }}
|
|
27
|
+
</FSText>
|
|
28
|
+
</FSRow>
|
|
29
|
+
</component>
|
|
37
30
|
</template>
|
|
38
31
|
|
|
39
32
|
<script lang="ts">
|
|
40
33
|
import { defineComponent, type PropType } from "vue";
|
|
41
34
|
|
|
42
|
-
import {
|
|
35
|
+
import { ColorEnum } from "../models";
|
|
43
36
|
|
|
37
|
+
import FSClickable from "./FSClickable.vue";
|
|
44
38
|
import FSCard from "./FSCard.vue";
|
|
45
39
|
import FSIcon from "./FSIcon.vue";
|
|
46
40
|
import FSText from "./FSText.vue";
|
|
@@ -49,6 +43,7 @@ import FSRow from "./FSRow.vue";
|
|
|
49
43
|
export default defineComponent({
|
|
50
44
|
name: "FSCardPlaceholder",
|
|
51
45
|
components: {
|
|
46
|
+
FSClickable,
|
|
52
47
|
FSCard,
|
|
53
48
|
FSIcon,
|
|
54
49
|
FSText,
|
|
@@ -79,7 +74,8 @@ export default defineComponent({
|
|
|
79
74
|
setup() {
|
|
80
75
|
return {
|
|
81
76
|
ColorEnum,
|
|
82
|
-
|
|
77
|
+
FSClickable,
|
|
78
|
+
FSCard,
|
|
83
79
|
};
|
|
84
80
|
}
|
|
85
81
|
});
|
package/components/FSChip.vue
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
:color="$props.color"
|
|
7
|
-
:variant="$props.variant"
|
|
8
|
-
:height="$props.height"
|
|
2
|
+
<component
|
|
3
|
+
:is="$props.to && $props.clickable ? 'FSRouterLink' : 'div'"
|
|
4
|
+
class="fs-chip-container"
|
|
5
|
+
v-bind="$props.to ? { to: $props.to } : {}"
|
|
9
6
|
@click="$emit('click', $event)"
|
|
10
|
-
v-bind="$attrs"
|
|
11
7
|
>
|
|
12
|
-
<
|
|
13
|
-
|
|
8
|
+
<FSRow
|
|
9
|
+
:align="$props.align"
|
|
10
|
+
:width="$props.width"
|
|
11
|
+
:class="classes"
|
|
12
|
+
:style="style"
|
|
13
|
+
:wrap="false"
|
|
14
|
+
v-bind="$attrs"
|
|
14
15
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
<slot
|
|
17
|
+
name="prepend"
|
|
18
|
+
v-bind="{ color: $props.color, colors }"
|
|
18
19
|
>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
<FSIcon
|
|
21
|
+
v-if="$props.prependIcon"
|
|
22
|
+
size="s"
|
|
22
23
|
>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
{{ $props.prependIcon }}
|
|
25
|
+
</FSIcon>
|
|
26
|
+
</slot>
|
|
27
|
+
<slot
|
|
28
|
+
v-bind="{ color: $props.color, colors }"
|
|
29
|
+
>
|
|
30
|
+
<FSSpan
|
|
31
|
+
v-if="$props.label"
|
|
32
|
+
font="text-overline"
|
|
33
|
+
class="fs-chip-label"
|
|
32
34
|
>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
{{ $props.label }}
|
|
36
|
+
</FSSpan>
|
|
37
|
+
</slot>
|
|
38
|
+
<slot
|
|
39
|
+
name="append"
|
|
40
|
+
v-bind="{ color: $props.color, colors }"
|
|
41
|
+
>
|
|
42
|
+
<FSIcon
|
|
43
|
+
v-if="$props.appendIcon"
|
|
44
|
+
size="s"
|
|
43
45
|
>
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</FSIcon>
|
|
50
|
-
</slot>
|
|
51
|
-
</FSRow>
|
|
52
|
-
</template>
|
|
53
|
-
</FSCard>
|
|
46
|
+
{{ $props.appendIcon }}
|
|
47
|
+
</FSIcon>
|
|
48
|
+
</slot>
|
|
49
|
+
</FSRow>
|
|
50
|
+
</component>
|
|
54
51
|
</template>
|
|
55
52
|
|
|
56
53
|
<script lang="ts">
|
|
57
|
-
import { defineComponent, type PropType } from "vue";
|
|
54
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
55
|
+
import { type RouteLocation } from "vue-router";
|
|
58
56
|
|
|
59
|
-
import { type
|
|
57
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
59
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
60
60
|
|
|
61
61
|
import FSIcon from "./FSIcon.vue";
|
|
62
62
|
import FSSpan from "./FSSpan.vue";
|
|
63
63
|
import FSRow from "./FSRow.vue";
|
|
64
|
-
import
|
|
64
|
+
import FSRouterLink from '@dative-gpi/foundation-shared-components/components/FSRouterLink.vue';
|
|
65
65
|
|
|
66
66
|
export default defineComponent({
|
|
67
67
|
name: "FSChip",
|
|
68
68
|
components: {
|
|
69
|
-
|
|
69
|
+
FSRouterLink,
|
|
70
70
|
FSIcon,
|
|
71
71
|
FSSpan,
|
|
72
72
|
FSRow
|
|
@@ -92,27 +92,100 @@ export default defineComponent({
|
|
|
92
92
|
required: false,
|
|
93
93
|
default: () => [24, 20]
|
|
94
94
|
},
|
|
95
|
+
width: {
|
|
96
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
97
|
+
required: false,
|
|
98
|
+
default: "hug"
|
|
99
|
+
},
|
|
95
100
|
variant: {
|
|
96
|
-
type: String as PropType<
|
|
101
|
+
type: String as PropType<"standard" | "full" | "borderless">,
|
|
97
102
|
required: false,
|
|
98
|
-
default:
|
|
103
|
+
default: "full"
|
|
99
104
|
},
|
|
100
105
|
color: {
|
|
101
106
|
type: String as PropType<ColorBase>,
|
|
102
107
|
required: false,
|
|
103
108
|
default: ColorEnum.Primary
|
|
104
109
|
},
|
|
110
|
+
clickable: {
|
|
111
|
+
type: Boolean,
|
|
112
|
+
required: false,
|
|
113
|
+
default: false
|
|
114
|
+
},
|
|
105
115
|
align: {
|
|
106
|
-
type: String as PropType<"
|
|
116
|
+
type: String as PropType<"center-center" | "center-left">,
|
|
107
117
|
required: false,
|
|
108
118
|
default: "center-center"
|
|
109
|
-
}
|
|
119
|
+
},
|
|
120
|
+
to: {
|
|
121
|
+
type: Object as PropType<RouteLocation | null>,
|
|
122
|
+
required: false,
|
|
123
|
+
default: null
|
|
124
|
+
},
|
|
110
125
|
},
|
|
111
126
|
inheritsAttrs: false,
|
|
112
127
|
emits: ['click'],
|
|
113
|
-
setup() {
|
|
128
|
+
setup(props) {
|
|
129
|
+
const { getColors } = useColors();
|
|
130
|
+
|
|
131
|
+
const colors = computed(() => getColors(props.color));
|
|
132
|
+
const backgrounds = getColors(ColorEnum.Background);
|
|
133
|
+
const darks = getColors(ColorEnum.Dark);
|
|
134
|
+
|
|
135
|
+
const style = computed((): StyleValue => {
|
|
136
|
+
switch (props.variant) {
|
|
137
|
+
case "standard": return {
|
|
138
|
+
"--fs-chip-height" : sizeToVar(props.height),
|
|
139
|
+
"--fs-chip-background-color" : backgrounds.base,
|
|
140
|
+
"--fs-chip-border-color" : colors.value.base,
|
|
141
|
+
"--fs-chip-color" : colors.value.base,
|
|
142
|
+
"--fs-chip-hover-background-color" : colors.value.base,
|
|
143
|
+
"--fs-chip-hover-border-color" : colors.value.base,
|
|
144
|
+
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
145
|
+
"--fs-chip-active-background-color": backgrounds.base,
|
|
146
|
+
"--fs-chip-active-border-color" : colors.value.dark,
|
|
147
|
+
"--fs-chip-active-color" : colors.value.dark
|
|
148
|
+
};
|
|
149
|
+
case "full": return {
|
|
150
|
+
"--fs-chip-height" : sizeToVar(props.height),
|
|
151
|
+
"--fs-chip-background-color" : colors.value.base,
|
|
152
|
+
"--fs-chip-border-color" : colors.value.base,
|
|
153
|
+
"--fs-chip-color" : colors.value.baseContrast!,
|
|
154
|
+
"--fs-chip-hover-background-color" : colors.value.soft,
|
|
155
|
+
"--fs-chip-hover-border-color" : colors.value.soft,
|
|
156
|
+
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
157
|
+
"--fs-chip-active-background-color": colors.value.dark,
|
|
158
|
+
"--fs-chip-active-border-color" : colors.value.darkContrast!,
|
|
159
|
+
"--fs-chip-active-color" : colors.value.darkContrast!
|
|
160
|
+
};
|
|
161
|
+
case "borderless": return {
|
|
162
|
+
"--fs-chip-height" : sizeToVar(props.height),
|
|
163
|
+
"--fs-chip-background-color" : backgrounds.base,
|
|
164
|
+
"--fs-chip-border-color" : backgrounds.base,
|
|
165
|
+
"--fs-chip-color" : darks.base,
|
|
166
|
+
"--fs-chip-hover-background-color" : colors.value.light,
|
|
167
|
+
"--fs-chip-hover-border-color" : colors.value.light,
|
|
168
|
+
"--fs-chip-hover-color" : colors.value.base,
|
|
169
|
+
"--fs-chip-active-background-color": colors.value.light,
|
|
170
|
+
"--fs-chip-active-border-color" : colors.value.light,
|
|
171
|
+
"--fs-chip-active-color" : colors.value.base
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
const classes = computed((): string[] => {
|
|
177
|
+
const classNames: string[] = ["fs-chip"];
|
|
178
|
+
if (props.clickable) {
|
|
179
|
+
classNames.push("fs-chip-clickable");
|
|
180
|
+
}
|
|
181
|
+
return classNames;
|
|
182
|
+
});
|
|
114
183
|
|
|
115
184
|
return {
|
|
185
|
+
FSRouterLink,
|
|
186
|
+
classes,
|
|
187
|
+
colors,
|
|
188
|
+
style
|
|
116
189
|
};
|
|
117
190
|
}
|
|
118
191
|
});
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<script lang="ts">
|
|
31
31
|
import { defineComponent, type PropType } from "vue";
|
|
32
32
|
|
|
33
|
-
import { type
|
|
33
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
34
34
|
|
|
35
35
|
import FSSlideGroup from "./FSSlideGroup.vue";
|
|
36
36
|
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
@@ -55,9 +55,9 @@ export default defineComponent({
|
|
|
55
55
|
default: "wrap"
|
|
56
56
|
},
|
|
57
57
|
chipVariant: {
|
|
58
|
-
type: String as PropType<
|
|
58
|
+
type: String as PropType<"standard" | "full" | "borderless">,
|
|
59
59
|
required: false,
|
|
60
|
-
default:
|
|
60
|
+
default: "full"
|
|
61
61
|
},
|
|
62
62
|
color: {
|
|
63
63
|
type: String as PropType<ColorBase>,
|