@dative-gpi/foundation-shared-components 1.0.194 → 1.1.0-fix01
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 +43 -89
- package/components/FSCard.vue +208 -100
- package/components/FSCardPlaceholder.vue +29 -25
- package/components/FSChip.vue +54 -127
- package/components/FSChipGroup.vue +3 -3
- package/components/FSClickable.vue +24 -326
- package/components/FSColor.vue +3 -3
- package/components/FSColorIcon.vue +1 -0
- package/components/FSDialogContent.vue +37 -28
- package/components/FSEditImageUI.vue +19 -30
- package/components/FSIconCheck.vue +8 -0
- package/components/FSImageCard.vue +4 -4
- package/components/FSLink.vue +1 -13
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +6 -6
- package/components/FSPlayButtons.vue +8 -8
- package/components/FSRouterLink.vue +84 -14
- package/components/FSSlideGroup.vue +5 -1
- package/components/agenda/FSAgendaHorizontalEvent.vue +4 -4
- package/components/agenda/FSAgendaVerticalEvent.vue +4 -4
- package/components/deviceOrganisations/FSStatusRichCard.vue +2 -7
- package/components/lists/FSFilterButton.vue +11 -8
- package/components/lists/FSHeaderButton.vue +6 -3
- package/components/tiles/FSTile.vue +31 -65
- package/models/index.ts +2 -1
- package/models/variants.ts +7 -0
- package/package.json +4 -4
- package/styles/components/fs_button.scss +1 -7
- package/styles/components/fs_card.scss +75 -4
- package/styles/components/fs_chip.scss +0 -29
- package/styles/components/index.scss +0 -2
- package/styles/globals/overrides.scss +1 -1
- package/styles/components/fs_clickable.scss +0 -69
- package/styles/components/fs_color_icon.scss +0 -3
|
@@ -1,363 +1,61 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
|
|
7
|
-
@mouseover="hover = true"
|
|
8
|
-
@mouseleave="hover = false"
|
|
9
|
-
@mousedown="active = true"
|
|
10
|
-
@mouseup="active = false"
|
|
2
|
+
<FSCard
|
|
3
|
+
:variant="$props.variant"
|
|
4
|
+
:color="$props.color"
|
|
5
|
+
:clickable="$props.clickable"
|
|
6
|
+
v-bind="$attrs"
|
|
11
7
|
>
|
|
12
|
-
<FSCard
|
|
13
|
-
height="100%"
|
|
14
|
-
width="100%"
|
|
15
|
-
:borderRadius="$props.borderRadius"
|
|
16
|
-
:borderStyle="$props.borderStyle"
|
|
17
|
-
:padding="$props.padding"
|
|
18
|
-
:class="classes"
|
|
19
|
-
v-bind="$attrs"
|
|
20
|
-
>
|
|
21
|
-
<template
|
|
22
|
-
v-for="(_, name) in $slots"
|
|
23
|
-
v-slot:[name]="slotData"
|
|
24
|
-
>
|
|
25
|
-
<slot
|
|
26
|
-
:name="name"
|
|
27
|
-
v-bind="{ ...slotData, contentVariant }"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
</FSCard>
|
|
31
|
-
<template
|
|
32
|
-
v-if="$props.load"
|
|
33
|
-
>
|
|
34
|
-
<v-progress-circular
|
|
35
|
-
class="fs-clickable-load"
|
|
36
|
-
width="2"
|
|
37
|
-
size="24"
|
|
38
|
-
:indeterminate="true"
|
|
39
|
-
:color="loadColor"
|
|
40
|
-
/>
|
|
41
|
-
</template>
|
|
42
|
-
</a>
|
|
43
|
-
<FSRouterLink
|
|
44
|
-
v-else-if="$props.to"
|
|
45
|
-
:style="style"
|
|
46
|
-
:to="$props.to"
|
|
47
|
-
:class="$props.class"
|
|
48
|
-
@mouseover="hover = true"
|
|
49
|
-
@mouseleave="hover = false"
|
|
50
|
-
@mousedown="active = true"
|
|
51
|
-
@mouseup="active = false"
|
|
52
|
-
>
|
|
53
|
-
<FSCard
|
|
54
|
-
height="100%"
|
|
55
|
-
width="100%"
|
|
56
|
-
:borderRadius="$props.borderRadius"
|
|
57
|
-
:borderStyle="$props.borderStyle"
|
|
58
|
-
:padding="$props.padding"
|
|
59
|
-
:class="classes"
|
|
60
|
-
v-bind="$attrs"
|
|
61
|
-
>
|
|
62
|
-
<template
|
|
63
|
-
v-for="(_, name) in $slots"
|
|
64
|
-
v-slot:[name]="slotData"
|
|
65
|
-
>
|
|
66
|
-
<slot
|
|
67
|
-
:name="name"
|
|
68
|
-
v-bind="{ ...slotData, contentVariant }"
|
|
69
|
-
/>
|
|
70
|
-
</template>
|
|
71
|
-
</FSCard>
|
|
72
|
-
<template
|
|
73
|
-
v-if="$props.load"
|
|
74
|
-
>
|
|
75
|
-
<v-progress-circular
|
|
76
|
-
class="fs-clickable-load"
|
|
77
|
-
width="2"
|
|
78
|
-
size="24"
|
|
79
|
-
:indeterminate="true"
|
|
80
|
-
:color="loadColor"
|
|
81
|
-
/>
|
|
82
|
-
</template>
|
|
83
|
-
</FSRouterLink>
|
|
84
|
-
<button
|
|
85
|
-
v-else
|
|
86
|
-
:type="$props.type"
|
|
87
|
-
:style="style"
|
|
88
|
-
:class="$props.class"
|
|
89
|
-
:disabled="$props.load || $props.disabled"
|
|
90
|
-
@click.stop="onClick"
|
|
91
|
-
@mouseover="hover = true"
|
|
92
|
-
@mouseleave="hover = false"
|
|
93
|
-
@mousedown="active = true"
|
|
94
|
-
@mouseup="active = false"
|
|
95
|
-
>
|
|
96
|
-
<FSCard
|
|
97
|
-
height="100%"
|
|
98
|
-
width="100%"
|
|
99
|
-
:borderRadius="$props.borderRadius"
|
|
100
|
-
:borderStyle="$props.borderStyle"
|
|
101
|
-
:padding="$props.padding"
|
|
102
|
-
:class="classes"
|
|
103
|
-
v-bind="$attrs"
|
|
104
|
-
>
|
|
105
|
-
<template
|
|
106
|
-
v-for="(_, name) in $slots"
|
|
107
|
-
v-slot:[name]="slotData"
|
|
108
|
-
>
|
|
109
|
-
<slot
|
|
110
|
-
:name="name"
|
|
111
|
-
v-bind="{ ...slotData, contentVariant }"
|
|
112
|
-
/>
|
|
113
|
-
</template>
|
|
114
|
-
</FSCard>
|
|
115
8
|
<template
|
|
116
|
-
v-
|
|
9
|
+
v-for="(_, name) in $slots"
|
|
10
|
+
v-slot:[name]="slotData"
|
|
117
11
|
>
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
size="24"
|
|
122
|
-
:indeterminate="true"
|
|
123
|
-
:color="loadColor"
|
|
12
|
+
<slot
|
|
13
|
+
:name="name"
|
|
14
|
+
v-bind="{ ...slotData }"
|
|
124
15
|
/>
|
|
125
16
|
</template>
|
|
126
|
-
</
|
|
17
|
+
</FSCard>
|
|
127
18
|
</template>
|
|
128
19
|
|
|
129
20
|
<script lang="ts">
|
|
130
|
-
|
|
131
|
-
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated FSClickable is deprecated. Please use <FSCard :clickable="true" :variant="CardVariants.Standard" :color="ColorEnum.Light" ... /> instead.
|
|
23
|
+
* Clickable prop to true is not necessary as it is will listen to any click listener or href, to prop.
|
|
24
|
+
* This component will be removed in a future release.
|
|
25
|
+
*/
|
|
26
|
+
import { defineComponent, type PropType, onMounted } from "vue";
|
|
132
27
|
|
|
133
|
-
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
134
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
135
|
-
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
28
|
+
import { type CardVariant, CardVariants, type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
136
29
|
|
|
137
|
-
import FSRouterLink from "./FSRouterLink.vue";
|
|
138
30
|
import FSCard from "./FSCard.vue";
|
|
139
31
|
|
|
140
32
|
export default defineComponent({
|
|
141
33
|
name: "FSClickable",
|
|
142
34
|
components: {
|
|
143
|
-
FSRouterLink,
|
|
144
35
|
FSCard
|
|
145
36
|
},
|
|
146
37
|
props: {
|
|
147
|
-
height: {
|
|
148
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
149
|
-
required: false,
|
|
150
|
-
default: null
|
|
151
|
-
},
|
|
152
|
-
width: {
|
|
153
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
154
|
-
required: false,
|
|
155
|
-
default: null
|
|
156
|
-
},
|
|
157
|
-
padding: {
|
|
158
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
159
|
-
required: false,
|
|
160
|
-
default: "0"
|
|
161
|
-
},
|
|
162
|
-
class: {
|
|
163
|
-
type: [String, Array] as PropType<string | string[] | null>,
|
|
164
|
-
required: false,
|
|
165
|
-
default: null
|
|
166
|
-
},
|
|
167
|
-
to: {
|
|
168
|
-
type: Object as PropType<RouteLocation | null>,
|
|
169
|
-
required: false,
|
|
170
|
-
default: null
|
|
171
|
-
},
|
|
172
|
-
href: {
|
|
173
|
-
type: String as PropType<string | null>,
|
|
174
|
-
required: false,
|
|
175
|
-
default: null
|
|
176
|
-
},
|
|
177
38
|
variant: {
|
|
178
|
-
type: String as PropType<
|
|
39
|
+
type: String as PropType<CardVariant>,
|
|
179
40
|
required: false,
|
|
180
|
-
default:
|
|
181
|
-
},
|
|
182
|
-
type: {
|
|
183
|
-
type: String as PropType<"button" | "submit">,
|
|
184
|
-
required: false,
|
|
185
|
-
default: "button"
|
|
41
|
+
default: CardVariants.Standard
|
|
186
42
|
},
|
|
187
43
|
color: {
|
|
188
44
|
type: String as PropType<ColorBase>,
|
|
189
45
|
required: false,
|
|
190
46
|
default: ColorEnum.Light
|
|
191
47
|
},
|
|
192
|
-
|
|
48
|
+
clickable: {
|
|
193
49
|
type: Boolean,
|
|
194
50
|
required: false,
|
|
195
51
|
default: true
|
|
196
|
-
},
|
|
197
|
-
borderRadius: {
|
|
198
|
-
type: [String, Number],
|
|
199
|
-
required: false,
|
|
200
|
-
default: "4px"
|
|
201
|
-
},
|
|
202
|
-
borderStyle: {
|
|
203
|
-
type: String as PropType<"solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset" | "none">,
|
|
204
|
-
required: false,
|
|
205
|
-
default: "solid"
|
|
206
|
-
},
|
|
207
|
-
load: {
|
|
208
|
-
type: Boolean,
|
|
209
|
-
required: false,
|
|
210
|
-
default: false
|
|
211
|
-
},
|
|
212
|
-
disabled: {
|
|
213
|
-
type: Boolean,
|
|
214
|
-
required: false,
|
|
215
|
-
default: false
|
|
216
52
|
}
|
|
217
53
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
const colors = computed(() => getColors(props.color));
|
|
223
|
-
const backgrounds = getColors(ColorEnum.Background);
|
|
224
|
-
const lights = getColors(ColorEnum.Light);
|
|
225
|
-
const darks = getColors(ColorEnum.Dark);
|
|
226
|
-
|
|
227
|
-
const hover = ref(false);
|
|
228
|
-
const active = ref(false);
|
|
229
|
-
|
|
230
|
-
const style = computed((): StyleValue => {
|
|
231
|
-
if (props.disabled) {
|
|
232
|
-
return {
|
|
233
|
-
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
234
|
-
"--fs-clickable-border-style" : props.borderStyle,
|
|
235
|
-
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
236
|
-
"--fs-clickable-background-color": lights.light,
|
|
237
|
-
"--fs-clickable-border-color" : lights.dark,
|
|
238
|
-
"--fs-clickable-color" : lights.dark,
|
|
239
|
-
"--fs-clickable-height" : sizeToVar(props.height),
|
|
240
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
switch (props.variant) {
|
|
244
|
-
case "standard":
|
|
245
|
-
switch (props.color) {
|
|
246
|
-
case ColorEnum.Dark :
|
|
247
|
-
case ColorEnum.Light: return {
|
|
248
|
-
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
249
|
-
"--fs-clickable-border-style" : props.borderStyle,
|
|
250
|
-
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
251
|
-
"--fs-clickable-background-color" : backgrounds.base,
|
|
252
|
-
"--fs-clickable-border-color" : lights.dark,
|
|
253
|
-
"--fs-clickable-color" : lights.lightContrast!,
|
|
254
|
-
"--fs-clickable-hover-background-color" : lights.base,
|
|
255
|
-
"--fs-clickable-hover-border-color" : lights.dark,
|
|
256
|
-
"--fs-clickable-hover-color" : lights.baseContrast!,
|
|
257
|
-
"--fs-clickable-active-background-color": lights.dark,
|
|
258
|
-
"--fs-clickable-active-border-color" : lights.dark,
|
|
259
|
-
"--fs-clickable-active-color" : lights.darkContrast!,
|
|
260
|
-
"--fs-clickable-height" : sizeToVar(props.height),
|
|
261
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
262
|
-
};
|
|
263
|
-
default: return {
|
|
264
|
-
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
265
|
-
"--fs-clickable-border-style" : props.borderStyle,
|
|
266
|
-
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
267
|
-
"--fs-clickable-background-color" : colors.value.light,
|
|
268
|
-
"--fs-clickable-border-color" : colors.value.lightContrast!,
|
|
269
|
-
"--fs-clickable-color" : colors.value.lightContrast!,
|
|
270
|
-
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
271
|
-
"--fs-clickable-hover-border-color" : colors.value.base,
|
|
272
|
-
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
273
|
-
"--fs-clickable-active-background-color": colors.value.dark,
|
|
274
|
-
"--fs-clickable-active-border-color" : colors.value.darkContrast!,
|
|
275
|
-
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
276
|
-
"--fs-clickable-height" : sizeToVar(props.height),
|
|
277
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
278
|
-
};
|
|
279
|
-
}
|
|
280
|
-
case "background": return {
|
|
281
|
-
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
282
|
-
"--fs-clickable-border-style" : props.borderStyle,
|
|
283
|
-
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
284
|
-
"--fs-clickable-background-color" : backgrounds.base,
|
|
285
|
-
"--fs-clickable-border-color" : lights.dark,
|
|
286
|
-
"--fs-clickable-color" : darks.base,
|
|
287
|
-
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
288
|
-
"--fs-clickable-hover-border-color" : colors.value.baseContrast!,
|
|
289
|
-
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
290
|
-
"--fs-clickable-active-background-color": colors.value.dark,
|
|
291
|
-
"--fs-clickable-active-border-color" : colors.value.darkContrast!,
|
|
292
|
-
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
293
|
-
"--fs-clickable-height" : sizeToVar(props.height),
|
|
294
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
295
|
-
};
|
|
296
|
-
case "full": return {
|
|
297
|
-
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
298
|
-
"--fs-clickable-border-style" : props.borderStyle,
|
|
299
|
-
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
300
|
-
"--fs-clickable-background-color" : colors.value.base,
|
|
301
|
-
"--fs-clickable-border-color" : colors.value.base,
|
|
302
|
-
"--fs-clickable-color" : colors.value.baseContrast!,
|
|
303
|
-
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
304
|
-
"--fs-clickable-hover-border-color" : colors.value.base,
|
|
305
|
-
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
306
|
-
"--fs-clickable-active-background-color": colors.value.dark,
|
|
307
|
-
"--fs-clickable-active-border-color" : colors.value.dark,
|
|
308
|
-
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
309
|
-
"--fs-clickable-height" : sizeToVar(props.height),
|
|
310
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
311
|
-
};
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
const contentVariant = computed((): "base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast" => {
|
|
316
|
-
if (active.value) {
|
|
317
|
-
return "darkContrast";
|
|
318
|
-
}
|
|
319
|
-
if (hover.value) {
|
|
320
|
-
return "baseContrast";
|
|
321
|
-
}
|
|
322
|
-
switch (props.variant) {
|
|
323
|
-
case "standard" : return "lightContrast";
|
|
324
|
-
case "background": return "base";
|
|
325
|
-
case "full" : return "baseContrast";
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
const classes = computed((): string[] => {
|
|
330
|
-
const classNames: string[] = ["fs-clickable"];
|
|
331
|
-
if (props.disabled) {
|
|
332
|
-
classNames.push("fs-clickable-disabled");
|
|
333
|
-
}
|
|
334
|
-
return classNames;
|
|
335
|
-
});
|
|
336
|
-
|
|
337
|
-
const loadColor = computed((): string => {
|
|
338
|
-
switch (props.color) {
|
|
339
|
-
case ColorEnum.Primary:
|
|
340
|
-
case ColorEnum.Success:
|
|
341
|
-
case ColorEnum.Warning:
|
|
342
|
-
case ColorEnum.Error : return ["full"].includes(props.variant) ? colors.value.light : colors.value.dark;
|
|
343
|
-
default : return ["full"].includes(props.variant) ? darks.soft : darks.dark;
|
|
344
|
-
}
|
|
54
|
+
setup() {
|
|
55
|
+
onMounted(() => {
|
|
56
|
+
console.warn('[DEPRECATED] <FSClickable> is deprecated. Please use <FSCard :clickable="true" :variant="CardVariants.Standard" :color="ColorEnum.Light" ... /> instead. Clickable prop to true is not necessary as it is will listen to any click listener or href, to prop. This component will be removed in a future release.');
|
|
345
57
|
});
|
|
346
|
-
|
|
347
|
-
const onClick = (event: MouseEvent) => {
|
|
348
|
-
if (!props.to && !props.href && !props.disabled && !props.load) {
|
|
349
|
-
emit("click", event);
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
|
|
353
58
|
return {
|
|
354
|
-
contentVariant,
|
|
355
|
-
loadColor,
|
|
356
|
-
classes,
|
|
357
|
-
active,
|
|
358
|
-
hover,
|
|
359
|
-
style,
|
|
360
|
-
onClick
|
|
361
59
|
};
|
|
362
60
|
}
|
|
363
61
|
});
|
package/components/FSColor.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<script lang="ts">
|
|
15
15
|
import { computed, defineComponent, type PropType } from "vue";
|
|
16
16
|
|
|
17
|
-
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
17
|
+
import { type CardVariant, CardVariants, type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
18
18
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
19
19
|
|
|
20
20
|
import FSCard from "./FSCard.vue";
|
|
@@ -26,9 +26,9 @@ export default defineComponent({
|
|
|
26
26
|
},
|
|
27
27
|
props: {
|
|
28
28
|
variant: {
|
|
29
|
-
type: String as PropType<
|
|
29
|
+
type: String as PropType<CardVariant>,
|
|
30
30
|
required: false,
|
|
31
|
-
default:
|
|
31
|
+
default: CardVariants.Standard
|
|
32
32
|
},
|
|
33
33
|
color: {
|
|
34
34
|
type: String as PropType<ColorBase>,
|
|
@@ -6,37 +6,46 @@
|
|
|
6
6
|
:color="$props.color"
|
|
7
7
|
:width="cardWidth"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:wrap="false"
|
|
16
|
-
>
|
|
17
|
-
<FSText
|
|
18
|
-
font="text-h2"
|
|
19
|
-
>
|
|
20
|
-
{{ $props.title }}
|
|
21
|
-
</FSText>
|
|
9
|
+
<FSCol>
|
|
10
|
+
<slot
|
|
11
|
+
name="header"
|
|
12
|
+
v-bind="{ title: $props.title, subtitle: $props.subtitle }"
|
|
13
|
+
>
|
|
14
|
+
<FSCol>
|
|
22
15
|
<FSRow
|
|
23
|
-
align="center-
|
|
16
|
+
align="center-left"
|
|
17
|
+
:wrap="false"
|
|
24
18
|
>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
<FSText
|
|
20
|
+
font="text-h2"
|
|
21
|
+
>
|
|
22
|
+
{{ $props.title }}
|
|
23
|
+
</FSText>
|
|
24
|
+
<FSRow
|
|
25
|
+
align="center-right"
|
|
26
|
+
>
|
|
27
|
+
<FSButton
|
|
28
|
+
icon="mdi-close"
|
|
29
|
+
variant="icon"
|
|
30
|
+
:color="ColorEnum.Dark"
|
|
31
|
+
@click="$emit('update:modelValue', false)"
|
|
32
|
+
/>
|
|
33
|
+
</FSRow>
|
|
31
34
|
</FSRow>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</
|
|
38
|
-
</
|
|
39
|
-
|
|
35
|
+
<FSText
|
|
36
|
+
v-if="$props.subtitle"
|
|
37
|
+
>
|
|
38
|
+
{{ $props.subtitle }}
|
|
39
|
+
</FSText>
|
|
40
|
+
</FSCol>
|
|
41
|
+
</slot>
|
|
42
|
+
<slot
|
|
43
|
+
name="body"
|
|
44
|
+
/>
|
|
45
|
+
<slot
|
|
46
|
+
name="footer"
|
|
47
|
+
/>
|
|
48
|
+
</FSCol>
|
|
40
49
|
<template
|
|
41
50
|
v-for="(_, name) in $slots"
|
|
42
51
|
v-slot:[name]="slotData"
|
|
@@ -135,36 +135,25 @@
|
|
|
135
135
|
/>
|
|
136
136
|
</FSRow>
|
|
137
137
|
</FSRow>
|
|
138
|
-
<
|
|
138
|
+
<template
|
|
139
139
|
v-else
|
|
140
|
-
borderStyle="dashed"
|
|
141
|
-
variant="background"
|
|
142
|
-
:height="$props.height"
|
|
143
|
-
:width="$props.width"
|
|
144
|
-
@click="() => invisibleButtonRef.input.click()"
|
|
145
140
|
>
|
|
146
|
-
<
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
accept=".jpg,.jpeg,.png"
|
|
163
|
-
:readFile="false"
|
|
164
|
-
@update:metadata="onUpload"
|
|
165
|
-
/>
|
|
166
|
-
</FSRow>
|
|
167
|
-
</FSClickable>
|
|
141
|
+
<FSButtonFileMini
|
|
142
|
+
class="fs-edit-image-hidden-button"
|
|
143
|
+
ref="invisibleButtonRef"
|
|
144
|
+
accept=".jpg,.jpeg,.png"
|
|
145
|
+
:readFile="false"
|
|
146
|
+
@update:metadata="onUpload"
|
|
147
|
+
/>
|
|
148
|
+
<FSCardPlaceholder
|
|
149
|
+
v-if="invisibleButtonRef"
|
|
150
|
+
:height="$props.height"
|
|
151
|
+
:width="$props.width"
|
|
152
|
+
icon="mdi-plus-box-outline"
|
|
153
|
+
:label="$tr('edit-image.add-image', 'Add an image.')"
|
|
154
|
+
@click="() => invisibleButtonRef!.input.click()"
|
|
155
|
+
/>
|
|
156
|
+
</template>
|
|
168
157
|
</FSCol>
|
|
169
158
|
</template>
|
|
170
159
|
|
|
@@ -177,7 +166,7 @@ import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
|
177
166
|
|
|
178
167
|
import FSButtonRemoveMini from "./buttons/FSButtonRemoveMini.vue";
|
|
179
168
|
import FSButtonFileMini from "./buttons/FSButtonFileMini.vue";
|
|
180
|
-
import
|
|
169
|
+
import FSCardPlaceholder from "./FSCardPlaceholder.vue";
|
|
181
170
|
import FSImageUI from "./FSImageUI.vue";
|
|
182
171
|
import FSCard from "./FSCard.vue";
|
|
183
172
|
import FSText from "./FSText.vue";
|
|
@@ -188,8 +177,8 @@ export default defineComponent({
|
|
|
188
177
|
name: "FSEditImageUI",
|
|
189
178
|
components: {
|
|
190
179
|
FSButtonRemoveMini,
|
|
180
|
+
FSCardPlaceholder,
|
|
191
181
|
FSButtonFileMini,
|
|
192
|
-
FSClickable,
|
|
193
182
|
FSImageUI,
|
|
194
183
|
FSCard,
|
|
195
184
|
FSText,
|
|
@@ -28,10 +28,18 @@ export default defineComponent({
|
|
|
28
28
|
type: Boolean,
|
|
29
29
|
required: false,
|
|
30
30
|
default: true
|
|
31
|
+
},
|
|
32
|
+
variant: {
|
|
33
|
+
type: String as () => "fill" | "outline",
|
|
34
|
+
required: false,
|
|
35
|
+
default: "outline"
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
setup(props) {
|
|
34
39
|
const icon = computed((): string => {
|
|
40
|
+
if (props.variant === "fill") {
|
|
41
|
+
return props.value ? "mdi-check-circle" : "mdi-close-circle";
|
|
42
|
+
}
|
|
35
43
|
return props.value ? "mdi-check-circle-outline" : "mdi-close-circle-outline";
|
|
36
44
|
});
|
|
37
45
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSCard
|
|
3
3
|
class="fs-image-card"
|
|
4
4
|
:height="height"
|
|
5
5
|
:width="width"
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
</FSSpan>
|
|
23
23
|
</FSRow>
|
|
24
24
|
</FSRow>
|
|
25
|
-
</
|
|
25
|
+
</FSCard>
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script lang="ts">
|
|
29
29
|
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
30
30
|
|
|
31
|
-
import
|
|
31
|
+
import FSCard from "./FSCard.vue";
|
|
32
32
|
import FSSpan from "./FSSpan.vue";
|
|
33
33
|
import FSRow from "./FSRow.vue";
|
|
34
34
|
|
|
35
35
|
export default defineComponent({
|
|
36
36
|
name: "FSImageCard",
|
|
37
37
|
components: {
|
|
38
|
-
|
|
38
|
+
FSCard,
|
|
39
39
|
FSSpan,
|
|
40
40
|
FSRow
|
|
41
41
|
},
|
package/components/FSLink.vue
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a
|
|
3
|
-
v-if="$props.href"
|
|
4
|
-
:href="$props.href"
|
|
5
|
-
:class="classes"
|
|
6
|
-
:style="style"
|
|
7
|
-
>
|
|
8
|
-
<slot>
|
|
9
|
-
<FSSpan>
|
|
10
|
-
{{ $props.label }}
|
|
11
|
-
</FSSpan>
|
|
12
|
-
</slot>
|
|
13
|
-
</a>
|
|
14
2
|
<FSRouterLink
|
|
15
|
-
v-else-if="$props.to"
|
|
16
3
|
:to="$props.to"
|
|
4
|
+
:href="$props.href"
|
|
17
5
|
:class="classes"
|
|
18
6
|
:style="style"
|
|
19
7
|
v-bind="$attrs"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSCard
|
|
3
3
|
:disabled="$props.disabled"
|
|
4
4
|
:height="['32px', '28px']"
|
|
5
5
|
:padding="$props.padding"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
</FSIcon>
|
|
48
48
|
</slot>
|
|
49
49
|
</FSRow>
|
|
50
|
-
</
|
|
50
|
+
</FSCard>
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script lang="ts">
|
|
@@ -56,7 +56,7 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
56
56
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
57
57
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
58
58
|
|
|
59
|
-
import
|
|
59
|
+
import FSCard from "./FSCard.vue";
|
|
60
60
|
import FSSpan from "./FSSpan.vue";
|
|
61
61
|
import FSIcon from "./FSIcon.vue";
|
|
62
62
|
import FSRow from "./FSRow.vue";
|
|
@@ -64,7 +64,7 @@ import FSRow from "./FSRow.vue";
|
|
|
64
64
|
export default defineComponent({
|
|
65
65
|
name: "FSOptionItem",
|
|
66
66
|
components: {
|
|
67
|
-
|
|
67
|
+
FSCard,
|
|
68
68
|
FSSpan,
|
|
69
69
|
FSIcon,
|
|
70
70
|
FSRow
|