@dative-gpi/foundation-shared-components 1.0.6 → 1.0.9
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/FSAccordionPanel.vue +8 -10
- package/components/FSBadge.vue +2 -4
- package/components/FSBreadcrumbs.vue +6 -6
- package/components/FSButton.vue +4 -4
- package/components/FSCalendar.vue +33 -31
- package/components/FSCalendarTwin.vue +75 -82
- package/components/FSCard.vue +7 -7
- package/components/FSCardPlaceholder.vue +1 -2
- package/components/FSCheckbox.vue +4 -6
- package/components/FSChip.vue +9 -11
- package/components/FSClickable.vue +44 -48
- package/components/FSClock.vue +2 -2
- package/components/FSCol.vue +2 -3
- package/components/FSColorIcon.vue +2 -4
- package/components/FSDialog.vue +1 -2
- package/components/FSDialogMenu.vue +2 -4
- package/components/FSDialogSubmit.vue +2 -4
- package/components/FSDivider.vue +6 -8
- package/components/FSEditImage.vue +6 -8
- package/components/FSErrorToast.vue +3 -4
- package/components/FSFadeOut.vue +9 -11
- package/components/FSGrid.vue +5 -9
- package/components/FSGridMosaic.vue +1 -2
- package/components/FSIcon.vue +5 -7
- package/components/FSIconCard.vue +20 -25
- package/components/FSIconCheck.vue +1 -2
- package/components/FSImage.vue +9 -10
- package/components/FSImageCard.vue +2 -2
- package/components/FSLabel.vue +17 -19
- package/components/FSLink.vue +18 -20
- package/components/FSLoader.vue +8 -11
- package/components/FSOptionGroup.vue +7 -9
- package/components/FSPagination.vue +3 -5
- package/components/FSRadio.vue +4 -6
- package/components/FSRadioGroup.vue +2 -4
- package/components/FSRow.vue +3 -4
- package/components/FSSlideGroup.vue +2 -3
- package/components/FSSlider.vue +8 -10
- package/components/FSSpan.vue +5 -8
- package/components/FSSwitch.vue +7 -9
- package/components/FSTab.vue +2 -4
- package/components/FSTabs.vue +9 -9
- package/components/FSTag.vue +9 -11
- package/components/FSTagGroup.vue +2 -4
- package/components/FSText.vue +7 -11
- package/components/FSWindow.vue +2 -2
- package/components/FSWrapGroup.vue +2 -3
- package/components/deviceOrganisations/FSConnectivityCard.vue +1 -2
- package/components/deviceOrganisations/FSStatusCard.vue +1 -2
- package/components/deviceOrganisations/FSStatusesRow.vue +1 -2
- package/components/deviceOrganisations/FSWorstAlert.vue +1 -2
- package/components/deviceOrganisations/FSWorstAlertCard.vue +1 -2
- package/components/fields/FSAutocompleteField.vue +2 -3
- package/components/fields/FSBaseField.vue +13 -10
- package/components/fields/FSColorField.vue +16 -16
- package/components/fields/FSDateTimeField.vue +2 -2
- package/components/fields/FSDateTimeRangeField.vue +4 -4
- package/components/fields/FSIconField.vue +2 -3
- package/components/fields/FSMagicConfigField.vue +1 -2
- package/components/fields/FSMagicField.vue +1 -2
- package/components/fields/FSNumberField.vue +1 -2
- package/components/fields/FSPasswordField.vue +2 -3
- package/components/fields/FSRichTextField.vue +3 -4
- package/components/fields/FSSearchField.vue +1 -2
- package/components/fields/FSSelectField.vue +2 -3
- package/components/fields/FSTagField.vue +3 -5
- package/components/fields/FSTermField.vue +6 -5
- package/components/fields/FSTextArea.vue +2 -3
- package/components/fields/FSTextField.vue +2 -3
- package/components/fields/FSTimeField.vue +1 -1
- package/components/fields/FSTimeSlotField.vue +2 -3
- package/components/fields/FSTranslateField.vue +2 -2
- package/components/fields/FSTreeViewField.vue +4 -6
- package/components/lists/FSDataIteratorItem.vue +8 -10
- package/components/lists/FSDataTableUI.vue +7 -11
- package/components/lists/FSFilterButton.vue +1 -2
- package/components/lists/FSLoadDataTable.vue +4 -6
- package/components/map/FSMap.vue +11 -14
- package/components/map/FSMapOverlay.vue +10 -10
- package/components/selects/FSSelectDateSetting.vue +1 -2
- package/components/tiles/FSLoadTile.vue +5 -7
- package/components/views/FSEntityHeader.vue +4 -4
- package/components/views/FSListHeader.vue +83 -0
- package/components/views/FSListView.vue +83 -0
- package/models/rules.ts +1 -1
- package/package.json +4 -4
- package/utils/badge.ts +9 -0
- package/utils/index.ts +1 -0
|
@@ -123,12 +123,10 @@
|
|
|
123
123
|
</template>
|
|
124
124
|
|
|
125
125
|
<script lang="ts">
|
|
126
|
-
import type
|
|
127
|
-
import {
|
|
128
|
-
import type { RouteLocation } from "vue-router";
|
|
126
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
127
|
+
import { type RouteLocation } from "vue-router";
|
|
129
128
|
|
|
130
|
-
import type
|
|
131
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
129
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
132
130
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
133
131
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
134
132
|
|
|
@@ -213,7 +211,7 @@ export default defineComponent({
|
|
|
213
211
|
const hover = ref(false);
|
|
214
212
|
const active = ref(false);
|
|
215
213
|
|
|
216
|
-
const style = computed(():
|
|
214
|
+
const style = computed((): StyleValue => {
|
|
217
215
|
if (!props.editable) {
|
|
218
216
|
return {
|
|
219
217
|
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
@@ -229,41 +227,39 @@ export default defineComponent({
|
|
|
229
227
|
switch (props.variant) {
|
|
230
228
|
case "standard":
|
|
231
229
|
switch (props.color) {
|
|
232
|
-
case ColorEnum.Dark:
|
|
233
|
-
case ColorEnum.Light:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
"--fs-clickable-width" : sizeToVar(props.width)
|
|
266
|
-
};
|
|
230
|
+
case ColorEnum.Dark :
|
|
231
|
+
case ColorEnum.Light: return {
|
|
232
|
+
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
233
|
+
"--fs-clickable-border-style" : props.borderStyle,
|
|
234
|
+
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
235
|
+
"--fs-clickable-background-color" : backgrounds.base,
|
|
236
|
+
"--fs-clickable-border-color" : lights.dark,
|
|
237
|
+
"--fs-clickable-color" : lights.lightContrast!,
|
|
238
|
+
"--fs-clickable-hover-background-color" : lights.base,
|
|
239
|
+
"--fs-clickable-hover-border-color" : lights.dark,
|
|
240
|
+
"--fs-clickable-hover-color" : lights.baseContrast!,
|
|
241
|
+
"--fs-clickable-active-background-color": lights.dark,
|
|
242
|
+
"--fs-clickable-active-border-color" : lights.dark,
|
|
243
|
+
"--fs-clickable-active-color" : lights.darkContrast!,
|
|
244
|
+
"--fs-clickable-height" : sizeToVar(props.height),
|
|
245
|
+
"--fs-clickable-width" : sizeToVar(props.width)
|
|
246
|
+
};
|
|
247
|
+
default: 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" : colors.value.light,
|
|
252
|
+
"--fs-clickable-border-color" : colors.value.lightContrast!,
|
|
253
|
+
"--fs-clickable-color" : colors.value.lightContrast!,
|
|
254
|
+
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
255
|
+
"--fs-clickable-hover-border-color" : colors.value.base,
|
|
256
|
+
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
257
|
+
"--fs-clickable-active-background-color": colors.value.dark,
|
|
258
|
+
"--fs-clickable-active-border-color" : colors.value.darkContrast!,
|
|
259
|
+
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
260
|
+
"--fs-clickable-height" : sizeToVar(props.height),
|
|
261
|
+
"--fs-clickable-width" : sizeToVar(props.width)
|
|
262
|
+
};
|
|
267
263
|
}
|
|
268
264
|
case "background": return {
|
|
269
265
|
"--fs-clickable-border-size" : props.border ? "1px" : "0",
|
|
@@ -273,11 +269,11 @@ export default defineComponent({
|
|
|
273
269
|
"--fs-clickable-border-color" : lights.dark,
|
|
274
270
|
"--fs-clickable-color" : darks.base,
|
|
275
271
|
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
276
|
-
"--fs-clickable-hover-border-color" : colors.value.baseContrast
|
|
277
|
-
"--fs-clickable-hover-color" : colors.value.baseContrast
|
|
272
|
+
"--fs-clickable-hover-border-color" : colors.value.baseContrast!,
|
|
273
|
+
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
278
274
|
"--fs-clickable-active-background-color": colors.value.dark,
|
|
279
|
-
"--fs-clickable-active-border-color" : colors.value.darkContrast
|
|
280
|
-
"--fs-clickable-active-color" : colors.value.darkContrast
|
|
275
|
+
"--fs-clickable-active-border-color" : colors.value.darkContrast!,
|
|
276
|
+
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
281
277
|
"--fs-clickable-height" : sizeToVar(props.height),
|
|
282
278
|
"--fs-clickable-width" : sizeToVar(props.width)
|
|
283
279
|
};
|
|
@@ -287,13 +283,13 @@ export default defineComponent({
|
|
|
287
283
|
"--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
|
|
288
284
|
"--fs-clickable-background-color" : colors.value.base,
|
|
289
285
|
"--fs-clickable-border-color" : colors.value.base,
|
|
290
|
-
"--fs-clickable-color" : colors.value.baseContrast
|
|
286
|
+
"--fs-clickable-color" : colors.value.baseContrast!,
|
|
291
287
|
"--fs-clickable-hover-background-color" : colors.value.base,
|
|
292
288
|
"--fs-clickable-hover-border-color" : colors.value.base,
|
|
293
|
-
"--fs-clickable-hover-color" : colors.value.baseContrast
|
|
289
|
+
"--fs-clickable-hover-color" : colors.value.baseContrast!,
|
|
294
290
|
"--fs-clickable-active-background-color": colors.value.dark,
|
|
295
291
|
"--fs-clickable-active-border-color" : colors.value.dark,
|
|
296
|
-
"--fs-clickable-active-color" : colors.value.darkContrast
|
|
292
|
+
"--fs-clickable-active-color" : colors.value.darkContrast!,
|
|
297
293
|
"--fs-clickable-height" : sizeToVar(props.height),
|
|
298
294
|
"--fs-clickable-width" : sizeToVar(props.width)
|
|
299
295
|
};
|
package/components/FSClock.vue
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script lang="ts">
|
|
55
|
-
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
55
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
56
56
|
|
|
57
57
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
58
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -109,7 +109,7 @@ export default defineComponent({
|
|
|
109
109
|
const innerHours = ref(0);
|
|
110
110
|
const innerMinutes = ref(0);
|
|
111
111
|
|
|
112
|
-
const style = computed(():
|
|
112
|
+
const style = computed((): StyleValue => {
|
|
113
113
|
if (!props.editable) {
|
|
114
114
|
return {
|
|
115
115
|
"--fs-clock-field-cursor" : "default",
|
package/components/FSCol.vue
CHANGED
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
11
|
<script lang="ts">
|
|
12
|
-
import type
|
|
13
|
-
import { computed, defineComponent } from "vue";
|
|
12
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
14
13
|
|
|
15
14
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
16
15
|
|
|
@@ -49,7 +48,7 @@ export default defineComponent({
|
|
|
49
48
|
}
|
|
50
49
|
},
|
|
51
50
|
setup(props) {
|
|
52
|
-
const style = computed(():
|
|
51
|
+
const style = computed((): StyleValue => ({
|
|
53
52
|
"--fs-col-overflow": props.overflow,
|
|
54
53
|
"--fs-col-padding" : sizeToVar(props.padding),
|
|
55
54
|
"--fs-col-gap" : sizeToVar(props.gap),
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
|
-
import type
|
|
24
|
-
import { computed, defineComponent } from "vue";
|
|
23
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
25
24
|
|
|
26
|
-
import type
|
|
27
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
25
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
28
26
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
29
27
|
|
|
30
28
|
import FSColor from "./FSColor.vue";
|
package/components/FSDialog.vue
CHANGED
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script lang="ts">
|
|
32
|
-
import type
|
|
33
|
-
import { computed, defineComponent } from "vue";
|
|
32
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
34
33
|
|
|
35
34
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
36
35
|
|
|
@@ -25,11 +25,9 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script lang="ts">
|
|
28
|
-
import type
|
|
29
|
-
import { computed, defineComponent } from "vue";
|
|
28
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
30
29
|
|
|
31
|
-
import type
|
|
32
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
30
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
33
31
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
34
32
|
|
|
35
33
|
import FSCard from "./FSCard.vue";
|
|
@@ -61,12 +61,10 @@
|
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
<script lang="ts">
|
|
64
|
-
import type
|
|
65
|
-
import { computed, defineComponent } from "vue";
|
|
64
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
66
65
|
|
|
67
66
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
68
|
-
import type
|
|
69
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
67
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
70
68
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
71
69
|
|
|
72
70
|
import FSFadeOut from "./FSFadeOut.vue";
|
package/components/FSDivider.vue
CHANGED
|
@@ -34,12 +34,10 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
|
-
import type
|
|
38
|
-
import { computed, defineComponent } from "vue";
|
|
37
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
39
38
|
|
|
39
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
40
40
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
41
|
-
import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
|
|
42
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
43
41
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
44
42
|
|
|
45
43
|
import FSText from "./FSText.vue";
|
|
@@ -87,7 +85,7 @@ export default defineComponent({
|
|
|
87
85
|
|
|
88
86
|
const colors = computed(() => getColors(props.color));
|
|
89
87
|
|
|
90
|
-
const style = computed(():
|
|
88
|
+
const style = computed((): StyleValue => {
|
|
91
89
|
switch (props.variant) {
|
|
92
90
|
case "base": return {
|
|
93
91
|
"--fs-divider-size" : sizeToVar(props.size),
|
|
@@ -109,9 +107,9 @@ export default defineComponent({
|
|
|
109
107
|
});
|
|
110
108
|
|
|
111
109
|
return {
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
isEmpty,
|
|
111
|
+
style
|
|
114
112
|
};
|
|
115
113
|
}
|
|
116
114
|
});
|
|
117
|
-
</script>
|
|
115
|
+
</script>
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
</template>
|
|
166
166
|
|
|
167
167
|
<script lang="ts">
|
|
168
|
-
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
168
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
169
169
|
|
|
170
170
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
171
171
|
import { ColorEnum, type FileImage } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -252,13 +252,11 @@ export default defineComponent({
|
|
|
252
252
|
const lights = getColors(ColorEnum.Light);
|
|
253
253
|
const darks = getColors(ColorEnum.Dark);
|
|
254
254
|
|
|
255
|
-
const style = computed(():
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
};
|
|
261
|
-
});
|
|
255
|
+
const style = computed((): StyleValue => ({
|
|
256
|
+
"--fs-edit-image-overline-text-color": lights.dark,
|
|
257
|
+
"--fs-edit-image-color" : darks.base,
|
|
258
|
+
"--fs-edit-image-error-color" : errors.base
|
|
259
|
+
}));
|
|
262
260
|
|
|
263
261
|
const onUpload = async (payload: File) => {
|
|
264
262
|
const content = (await readFile(payload)) as string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
-
padding="18px 32px"
|
|
4
3
|
class="fs-error-toast"
|
|
5
4
|
align="center-center"
|
|
5
|
+
padding="18px 32px"
|
|
6
6
|
gap="24px"
|
|
7
7
|
:style="style"
|
|
8
8
|
>
|
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
</template>
|
|
29
29
|
|
|
30
30
|
<script lang="ts">
|
|
31
|
-
import type
|
|
32
|
-
import { computed, defineComponent } from "vue";
|
|
31
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
33
32
|
|
|
34
33
|
import { getError, sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
35
34
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -69,7 +68,7 @@ export default defineComponent({
|
|
|
69
68
|
|
|
70
69
|
const errors = getColors(ColorEnum.Error);
|
|
71
70
|
|
|
72
|
-
const style = computed(():
|
|
71
|
+
const style = computed((): StyleValue => {
|
|
73
72
|
switch (props.variant) {
|
|
74
73
|
case "standard": return {
|
|
75
74
|
"--fs-error-toast-border-radius": sizeToVar(props.borderRadius),
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
|
|
14
|
+
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, type StyleValue, watch } from "vue";
|
|
15
15
|
|
|
16
16
|
import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
|
|
17
17
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -58,16 +58,14 @@ export default defineComponent({
|
|
|
58
58
|
|
|
59
59
|
const elementId = `id${uuidv4()}`;
|
|
60
60
|
|
|
61
|
-
const style = computed(():
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
});
|
|
61
|
+
const style = computed((): StyleValue => ({
|
|
62
|
+
"--fs-fade-out-height" : sizeToVar(props.height),
|
|
63
|
+
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
64
|
+
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
65
|
+
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
66
|
+
"--fs-fade-out-top-mask-height" : topMaskHeight.value,
|
|
67
|
+
"--fs-fade-out-bottom-mask-height": bottomMaskHeight.value
|
|
68
|
+
}));
|
|
71
69
|
|
|
72
70
|
const handleMasks = () => {
|
|
73
71
|
if (fadeOutRef.value) {
|
package/components/FSGrid.vue
CHANGED
|
@@ -66,12 +66,10 @@
|
|
|
66
66
|
</template>
|
|
67
67
|
|
|
68
68
|
<script lang="ts">
|
|
69
|
-
import type
|
|
70
|
-
import { computed, defineComponent } from "vue";
|
|
69
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
71
70
|
|
|
71
|
+
import { ColorEnum, type FSGridItem } from "@dative-gpi/foundation-shared-components/models";
|
|
72
72
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
73
|
-
import type { FSGridItem } from "@dative-gpi/foundation-shared-components/models";
|
|
74
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
75
73
|
|
|
76
74
|
import FSText from "./FSText.vue";
|
|
77
75
|
import FSCol from "./FSCol.vue";
|
|
@@ -97,11 +95,9 @@ export default defineComponent({
|
|
|
97
95
|
|
|
98
96
|
const lights = getColors(ColorEnum.Light);
|
|
99
97
|
|
|
100
|
-
const style = computed(():
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
});
|
|
98
|
+
const style = computed((): StyleValue => ({
|
|
99
|
+
"--fs-grid-border-color": lights.dark
|
|
100
|
+
}));
|
|
105
101
|
|
|
106
102
|
const headerSlot = (code: string) => {
|
|
107
103
|
if (slots[`header.${code}`]) {
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
|
-
import type
|
|
38
|
-
import { computed, defineComponent } from "vue";
|
|
37
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
39
38
|
|
|
40
39
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
41
40
|
import type { FSGridMosaic } from "@dative-gpi/foundation-shared-components/models";
|
package/components/FSIcon.vue
CHANGED
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script lang="ts">
|
|
13
|
-
import type
|
|
14
|
-
import { computed, defineComponent } from "vue";
|
|
13
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
15
14
|
|
|
16
15
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
17
|
-
import type
|
|
16
|
+
import { type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
18
17
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
19
18
|
|
|
20
19
|
export default defineComponent({
|
|
@@ -31,7 +30,7 @@ export default defineComponent({
|
|
|
31
30
|
default: null
|
|
32
31
|
},
|
|
33
32
|
variant: {
|
|
34
|
-
type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
33
|
+
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
35
34
|
required: false,
|
|
36
35
|
default: "base"
|
|
37
36
|
}
|
|
@@ -40,14 +39,13 @@ export default defineComponent({
|
|
|
40
39
|
const { isMobileSized } = useBreakpoints();
|
|
41
40
|
const { getColors } = useColors();
|
|
42
41
|
|
|
43
|
-
const color = computed((): string |
|
|
42
|
+
const color = computed((): string | undefined => {
|
|
44
43
|
if (props.color) {
|
|
45
44
|
return getColors(props.color)[props.variant]!;
|
|
46
45
|
}
|
|
47
|
-
return null;
|
|
48
46
|
});
|
|
49
47
|
|
|
50
|
-
const style = computed(():
|
|
48
|
+
const style = computed((): StyleValue => {
|
|
51
49
|
switch(props.size) {
|
|
52
50
|
case "s": return {
|
|
53
51
|
"--fs-icon-font-size": isMobileSized.value ? "14px" : "16px"
|
|
@@ -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>
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
<script lang="ts">
|
|
10
10
|
import { computed, defineComponent } from "vue";
|
|
11
11
|
|
|
12
|
-
import type
|
|
13
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
12
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
14
13
|
|
|
15
14
|
import FSIcon from "./FSIcon.vue";
|
|
16
15
|
|
package/components/FSImage.vue
CHANGED
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script lang="ts">
|
|
42
|
-
import type
|
|
43
|
-
import { computed, defineComponent, ref, watch } from "vue";
|
|
42
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
|
|
44
43
|
import { decode, isBlurhashValid } from "blurhash";
|
|
45
44
|
|
|
46
45
|
import { IMAGE_RAW_EXTENSION_URL, IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
@@ -111,12 +110,10 @@ export default defineComponent({
|
|
|
111
110
|
"/9j/" : "image/jpg",
|
|
112
111
|
});
|
|
113
112
|
|
|
114
|
-
const style = computed(():
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
});
|
|
113
|
+
const style = computed((): StyleValue => ({
|
|
114
|
+
"--fs-image-border-radius" : sizeToVar(props.borderRadius),
|
|
115
|
+
"--fs-image-blurhash-opacity": blurHash.value ? "1" : "0"
|
|
116
|
+
}));
|
|
120
117
|
|
|
121
118
|
const computedHeight = computed((): string | undefined => {
|
|
122
119
|
if (props.height) {
|
|
@@ -156,7 +153,7 @@ export default defineComponent({
|
|
|
156
153
|
return undefined;
|
|
157
154
|
});
|
|
158
155
|
|
|
159
|
-
const realSource = computed((): string |
|
|
156
|
+
const realSource = computed((): string | undefined => {
|
|
160
157
|
if (props.imageB64) {
|
|
161
158
|
if (imageType.value && imageData.value) {
|
|
162
159
|
return `${imageType.value},${imageData.value}`;
|
|
@@ -168,7 +165,9 @@ export default defineComponent({
|
|
|
168
165
|
}
|
|
169
166
|
return IMAGE_RAW_URL(props.imageId);
|
|
170
167
|
}
|
|
171
|
-
|
|
168
|
+
else if (props.source) {
|
|
169
|
+
return props.source;
|
|
170
|
+
}
|
|
172
171
|
});
|
|
173
172
|
|
|
174
173
|
const imageData = computed((): string | null => {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</template>
|
|
27
27
|
|
|
28
28
|
<script lang="ts">
|
|
29
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
29
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
30
30
|
|
|
31
31
|
import FSClickable from "./FSClickable.vue";
|
|
32
32
|
import FSSpan from "./FSSpan.vue";
|
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
setup(props) {
|
|
63
|
-
const style = computed(() => ({
|
|
63
|
+
const style = computed((): StyleValue => ({
|
|
64
64
|
"--fs-image-card-background": `url(${props.src})`
|
|
65
65
|
}));
|
|
66
66
|
|