@dative-gpi/foundation-shared-components 1.0.7 → 1.0.10
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 +4 -6
- 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/models/rules.ts +1 -1
- package/package.json +4 -4
- package/utils/badge.ts +9 -0
- package/utils/index.ts +1 -0
package/components/FSLoader.vue
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
</template>
|
|
8
8
|
|
|
9
9
|
<script lang="ts">
|
|
10
|
-
import type
|
|
11
|
-
import { computed, defineComponent } from "vue";
|
|
10
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
12
11
|
|
|
13
12
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
14
13
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -49,15 +48,13 @@ export default defineComponent({
|
|
|
49
48
|
|
|
50
49
|
const backgrounds = getColors(ColorEnum.Background);
|
|
51
50
|
|
|
52
|
-
const style = computed(():
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
};
|
|
60
|
-
});
|
|
51
|
+
const style = computed((): StyleValue => ({
|
|
52
|
+
"--fs-loader-background-color": backgrounds.base,
|
|
53
|
+
"--fs-loader-border-radius" : ["chip"].includes(props.variant) ? "50px" : sizeToVar(props.borderRadius),
|
|
54
|
+
"--fs-loader-padding" : sizeToVar(props.padding),
|
|
55
|
+
"--fs-loader-height" : sizeToVar(getHeight.value),
|
|
56
|
+
"--fs-loader-width" : sizeToVar(getWidth.value)
|
|
57
|
+
}));
|
|
61
58
|
|
|
62
59
|
const getHeight = computed((): string | number => {
|
|
63
60
|
switch (props.variant) {
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
</template>
|
|
95
95
|
|
|
96
96
|
<script lang="ts">
|
|
97
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
97
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
98
98
|
|
|
99
99
|
import { type ColorBase, ColorEnum, type FSToggle } from "@dative-gpi/foundation-shared-components/models";
|
|
100
100
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -211,14 +211,12 @@ export default defineComponent({
|
|
|
211
211
|
const backgrounds = getColors(ColorEnum.Background);
|
|
212
212
|
const colors = getColors(props.optionColor);
|
|
213
213
|
|
|
214
|
-
const style = computed(():
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
};
|
|
221
|
-
});
|
|
214
|
+
const style = computed((): StyleValue => ({
|
|
215
|
+
"--fs-option-group-background-color": backgrounds.base,
|
|
216
|
+
"--fs-option-group-border-size" : props.border ? "1px" : "0",
|
|
217
|
+
"--fs-option-group-border-radius" : sizeToVar(props.borderRadius),
|
|
218
|
+
"--fs-option-group-border-color" : lights.base
|
|
219
|
+
}));
|
|
222
220
|
|
|
223
221
|
const getVariant = (value: FSToggle): "standard" | "background" | "full" => {
|
|
224
222
|
if (Array.isArray(props.modelValue) && props.modelValue.some(v => v === value.id)) {
|
|
@@ -16,11 +16,9 @@
|
|
|
16
16
|
</template>
|
|
17
17
|
|
|
18
18
|
<script lang="ts">
|
|
19
|
-
import type
|
|
20
|
-
import { computed, defineComponent } from "vue";
|
|
19
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
21
20
|
|
|
22
|
-
import type
|
|
23
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
24
22
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
25
23
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
26
24
|
|
|
@@ -65,7 +63,7 @@ export default defineComponent({
|
|
|
65
63
|
const lights = getColors(ColorEnum.Light);
|
|
66
64
|
const darks = getColors(ColorEnum.Dark);
|
|
67
65
|
|
|
68
|
-
const style = computed(():
|
|
66
|
+
const style = computed((): StyleValue => {
|
|
69
67
|
switch (props.color) {
|
|
70
68
|
case ColorEnum.Light:
|
|
71
69
|
case ColorEnum.Dark: return {
|
package/components/FSRadio.vue
CHANGED
|
@@ -59,12 +59,10 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script lang="ts">
|
|
62
|
-
import type
|
|
63
|
-
import { computed, defineComponent } from "vue";
|
|
62
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
64
63
|
|
|
65
64
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
66
|
-
import type
|
|
67
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
68
66
|
|
|
69
67
|
import FSIcon from "./FSIcon.vue";
|
|
70
68
|
import FSSpan from "./FSSpan.vue";
|
|
@@ -135,7 +133,7 @@ export default defineComponent({
|
|
|
135
133
|
const lights = getColors(ColorEnum.Light);
|
|
136
134
|
const darks = getColors(ColorEnum.Dark);
|
|
137
135
|
|
|
138
|
-
const style = computed(():
|
|
136
|
+
const style = computed((): StyleValue => {
|
|
139
137
|
if (!props.editable) {
|
|
140
138
|
return {
|
|
141
139
|
"--fs-radio-cursor" : "default",
|
|
@@ -159,7 +157,7 @@ export default defineComponent({
|
|
|
159
157
|
|
|
160
158
|
const icon = computed((): string => props.selected ? "mdi-radiobox-marked" : "mdi-radiobox-blank");
|
|
161
159
|
|
|
162
|
-
const font = computed(():
|
|
160
|
+
const font = computed((): "text-button" | "text-body" => props.selected ? "text-button" : "text-body");
|
|
163
161
|
|
|
164
162
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
165
163
|
|
|
@@ -29,11 +29,9 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script lang="ts">
|
|
32
|
-
import type
|
|
33
|
-
import { defineComponent } from "vue";
|
|
32
|
+
import { defineComponent, type PropType } from "vue";
|
|
34
33
|
|
|
35
|
-
import type
|
|
36
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
34
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
37
35
|
|
|
38
36
|
import FSRadio from "./FSRadio.vue";
|
|
39
37
|
import FSCol from "./FSCol.vue";
|
package/components/FSRow.vue
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
:style="style"
|
|
4
3
|
:class="classes"
|
|
4
|
+
:style="style"
|
|
5
5
|
v-bind="$attrs"
|
|
6
6
|
>
|
|
7
7
|
<slot />
|
|
@@ -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
|
|
|
@@ -54,7 +53,7 @@ export default defineComponent({
|
|
|
54
53
|
}
|
|
55
54
|
},
|
|
56
55
|
setup(props) {
|
|
57
|
-
const style = computed(():
|
|
56
|
+
const style = computed((): StyleValue => ({
|
|
58
57
|
"--fs-row-flex-wrap": props.wrap ? "wrap" : "nowrap",
|
|
59
58
|
"--fs-row-overflow" : props.overflow,
|
|
60
59
|
"--fs-row-padding" : sizeToVar(props.padding),
|
|
@@ -40,8 +40,7 @@
|
|
|
40
40
|
</template>
|
|
41
41
|
|
|
42
42
|
<script lang="ts">
|
|
43
|
-
import type
|
|
44
|
-
import { computed, defineComponent, onMounted, onUnmounted, ref } from "vue";
|
|
43
|
+
import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, type StyleValue } from "vue";
|
|
45
44
|
|
|
46
45
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
47
46
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -89,7 +88,7 @@ export default defineComponent({
|
|
|
89
88
|
|
|
90
89
|
const elementId = `id${uuidv4()}`;
|
|
91
90
|
|
|
92
|
-
const style = computed(():
|
|
91
|
+
const style = computed((): StyleValue => ({
|
|
93
92
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
94
93
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
95
94
|
"--fs-group-color" : darks.soft,
|
package/components/FSSlider.vue
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
</FSSpan>
|
|
17
17
|
<FSSpan
|
|
18
18
|
v-if="$props.label && $props.required"
|
|
19
|
-
class="fs-slider-label"
|
|
20
19
|
style="margin-left: -8px;"
|
|
20
|
+
class="fs-slider-label"
|
|
21
21
|
font="text-overline"
|
|
22
22
|
:ellipsis="false"
|
|
23
23
|
:style="style"
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
<v-slider
|
|
30
30
|
class="fs-slider"
|
|
31
31
|
hide-details
|
|
32
|
-
:
|
|
32
|
+
:disabled="!$props.editable"
|
|
33
|
+
:ripple="false"
|
|
33
34
|
:style="style"
|
|
34
35
|
:elevation="0"
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:modelValue="$props.modelValue"
|
|
36
|
+
:tickSize="4"
|
|
37
|
+
:modelValue="$props.modelValue ?? undefined"
|
|
38
38
|
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
39
39
|
v-bind="$attrs"
|
|
40
40
|
>
|
|
@@ -64,11 +64,9 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
|
|
66
66
|
<script lang="ts">
|
|
67
|
-
import type
|
|
68
|
-
import { computed, defineComponent } from "vue";
|
|
67
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
69
68
|
|
|
70
|
-
import type
|
|
71
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
69
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
72
70
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
73
71
|
|
|
74
72
|
import FSSpan from "./FSSpan.vue";
|
|
@@ -121,7 +119,7 @@ export default defineComponent({
|
|
|
121
119
|
const lights = getColors(ColorEnum.Light);
|
|
122
120
|
const darks = getColors(ColorEnum.Dark);
|
|
123
121
|
|
|
124
|
-
const style = computed(():
|
|
122
|
+
const style = computed((): StyleValue => {
|
|
125
123
|
if (!props.editable) {
|
|
126
124
|
return {
|
|
127
125
|
"--fs-slider-cursor" : "default",
|
package/components/FSSpan.vue
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import type
|
|
15
|
-
import { computed, defineComponent } from "vue";
|
|
14
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
16
15
|
|
|
17
16
|
import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
18
17
|
|
|
@@ -43,6 +42,10 @@ export default defineComponent({
|
|
|
43
42
|
setup(props) {
|
|
44
43
|
const { slots } = useSlots();
|
|
45
44
|
|
|
45
|
+
const style = computed((): StyleValue => ({
|
|
46
|
+
"--fs-span-line-clamp": props.lineClamp.toString()
|
|
47
|
+
}));
|
|
48
|
+
|
|
46
49
|
const classes = computed((): string[] => {
|
|
47
50
|
const classNames = ["fs-span", props.font];
|
|
48
51
|
if (!slots.default) {
|
|
@@ -57,12 +60,6 @@ export default defineComponent({
|
|
|
57
60
|
return classNames;
|
|
58
61
|
});
|
|
59
62
|
|
|
60
|
-
const style = computed((): { [key: string] : string | null | undefined } => {
|
|
61
|
-
return {
|
|
62
|
-
"--fs-span-line-clamp": props.lineClamp.toString()
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
|
|
66
63
|
return {
|
|
67
64
|
classes,
|
|
68
65
|
style
|
package/components/FSSwitch.vue
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
class="fs-switch"
|
|
11
11
|
hide-details
|
|
12
12
|
inset
|
|
13
|
-
:style="style"
|
|
14
|
-
:ripple="false"
|
|
15
|
-
:rules="$props.rules"
|
|
16
13
|
:validateOn="validateOn"
|
|
14
|
+
:rules="$props.rules"
|
|
15
|
+
:ripple="false"
|
|
16
|
+
:style="style"
|
|
17
17
|
:modelValue="$props.modelValue"
|
|
18
18
|
@update:modelValue="onToggle"
|
|
19
19
|
v-bind="$attrs"
|
|
@@ -46,12 +46,10 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script lang="ts">
|
|
49
|
-
import type
|
|
50
|
-
import { computed, defineComponent } from "vue";
|
|
49
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
51
50
|
|
|
51
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
52
52
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
53
|
-
import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
|
|
54
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
55
53
|
|
|
56
54
|
import FSSpan from "./FSSpan.vue";
|
|
57
55
|
import FSCol from "./FSCol.vue";
|
|
@@ -112,7 +110,7 @@ export default defineComponent({
|
|
|
112
110
|
const lights = getColors(ColorEnum.Light);
|
|
113
111
|
const darks = getColors(ColorEnum.Dark);
|
|
114
112
|
|
|
115
|
-
const style = computed(():
|
|
113
|
+
const style = computed((): StyleValue => {
|
|
116
114
|
if (!props.editable) {
|
|
117
115
|
return {
|
|
118
116
|
"--fs-switch-translate-x": props.modelValue ? "8px" : "-8px",
|
|
@@ -140,7 +138,7 @@ export default defineComponent({
|
|
|
140
138
|
};
|
|
141
139
|
});
|
|
142
140
|
|
|
143
|
-
const font = computed(():
|
|
141
|
+
const font = computed((): "text-button" | "text-body" => props.modelValue ? "text-button" : "text-body");
|
|
144
142
|
|
|
145
143
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
146
144
|
|
package/components/FSTab.vue
CHANGED
|
@@ -55,11 +55,9 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script lang="ts">
|
|
58
|
-
import type
|
|
59
|
-
import { defineComponent } from "vue";
|
|
58
|
+
import { defineComponent, type PropType } from "vue";
|
|
60
59
|
|
|
61
|
-
import type
|
|
62
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
60
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
63
61
|
|
|
64
62
|
import FSSpan from "./FSSpan.vue";
|
|
65
63
|
import FSIcon from "./FSIcon.vue";
|
package/components/FSTabs.vue
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
18
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
19
19
|
|
|
20
20
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
21
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -41,14 +41,14 @@ export default defineComponent({
|
|
|
41
41
|
const lights = getColors(ColorEnum.Light);
|
|
42
42
|
const darks = getColors(ColorEnum.Dark);
|
|
43
43
|
|
|
44
|
-
const style = computed(():
|
|
45
|
-
"--fs-group-color"
|
|
46
|
-
"--fs-group-hover-color"
|
|
47
|
-
"--fs-tab-border-color"
|
|
48
|
-
"--fs-tab-hover-border-color"
|
|
49
|
-
"--fs-tab-active-background-color"
|
|
50
|
-
"--fs-tab-tag-background-color"
|
|
51
|
-
"--fs-tab-tag-color"
|
|
44
|
+
const style = computed((): StyleValue => ({
|
|
45
|
+
"--fs-group-color" : darks.soft,
|
|
46
|
+
"--fs-group-hover-color" : darks.dark,
|
|
47
|
+
"--fs-tab-border-color" : lights.dark,
|
|
48
|
+
"--fs-tab-hover-border-color" : darks.dark,
|
|
49
|
+
"--fs-tab-active-background-color": colors.value.light,
|
|
50
|
+
"--fs-tab-tag-background-color" : colors.value.base,
|
|
51
|
+
"--fs-tab-tag-color" : colors.value.baseContrast!
|
|
52
52
|
}));
|
|
53
53
|
|
|
54
54
|
return {
|
package/components/FSTag.vue
CHANGED
|
@@ -38,11 +38,9 @@
|
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<script lang="ts">
|
|
41
|
-
import type
|
|
42
|
-
import { computed, defineComponent } from "vue";
|
|
41
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
43
42
|
|
|
44
|
-
import type
|
|
45
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
43
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
46
44
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
47
45
|
|
|
48
46
|
import FSIcon from "./FSIcon.vue";
|
|
@@ -84,23 +82,23 @@ export default defineComponent({
|
|
|
84
82
|
|
|
85
83
|
const colors = computed(() => getColors(props.color));
|
|
86
84
|
|
|
87
|
-
const style = computed(():
|
|
85
|
+
const style = computed((): StyleValue => {
|
|
88
86
|
switch (props.variant) {
|
|
89
87
|
case "standard": return {
|
|
90
88
|
"--fs-tag-background-color" : colors.value.light,
|
|
91
|
-
"--fs-tag-color" : colors.value.lightContrast
|
|
89
|
+
"--fs-tag-color" : colors.value.lightContrast!,
|
|
92
90
|
"--fs-tag-hover-background-color" : colors.value.base,
|
|
93
|
-
"--fs-tag-hover-color" : colors.value.baseContrast
|
|
91
|
+
"--fs-tag-hover-color" : colors.value.baseContrast!,
|
|
94
92
|
"--fs-tag-active-background-color": colors.value.dark,
|
|
95
|
-
"--fs-tag-active-color" : colors.value.darkContrast
|
|
93
|
+
"--fs-tag-active-color" : colors.value.darkContrast!
|
|
96
94
|
};
|
|
97
95
|
case "full": return {
|
|
98
96
|
"--fs-tag-background-color" : colors.value.base,
|
|
99
|
-
"--fs-tag-color" : colors.value.baseContrast
|
|
97
|
+
"--fs-tag-color" : colors.value.baseContrast!,
|
|
100
98
|
"--fs-tag-hover-background-color" : colors.value.base,
|
|
101
|
-
"--fs-tag-hover-color" : colors.value.baseContrast
|
|
99
|
+
"--fs-tag-hover-color" : colors.value.baseContrast!,
|
|
102
100
|
"--fs-tag-active-background-color": colors.value.dark,
|
|
103
|
-
"--fs-tag-active-color" : colors.value.darkContrast
|
|
101
|
+
"--fs-tag-active-color" : colors.value.darkContrast!
|
|
104
102
|
};
|
|
105
103
|
}
|
|
106
104
|
});
|
|
@@ -32,11 +32,9 @@
|
|
|
32
32
|
</template>
|
|
33
33
|
|
|
34
34
|
<script lang="ts">
|
|
35
|
-
import type
|
|
36
|
-
import { defineComponent } from "vue";
|
|
35
|
+
import { defineComponent, type PropType } from "vue";
|
|
37
36
|
|
|
38
|
-
import type
|
|
39
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
37
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
40
38
|
|
|
41
39
|
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
42
40
|
import FSTag from "./FSTag.vue";
|
package/components/FSText.vue
CHANGED
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script lang="ts">
|
|
14
|
-
import type
|
|
15
|
-
import { computed, defineComponent } from "vue";
|
|
14
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
16
15
|
|
|
16
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
17
17
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
18
|
-
import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
|
|
19
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
20
18
|
|
|
21
19
|
export default defineComponent({
|
|
22
20
|
name: "FSText",
|
|
@@ -58,6 +56,11 @@ export default defineComponent({
|
|
|
58
56
|
|
|
59
57
|
const colors = computed(() => getColors(props.color));
|
|
60
58
|
|
|
59
|
+
const style = computed((): StyleValue => ({
|
|
60
|
+
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
61
|
+
"--fs-text-color" : colors.value[props.variant]!
|
|
62
|
+
}));
|
|
63
|
+
|
|
61
64
|
const classes = computed((): string[] => {
|
|
62
65
|
const classNames = ["fs-text", props.font];
|
|
63
66
|
if (!slots.default) {
|
|
@@ -72,13 +75,6 @@ export default defineComponent({
|
|
|
72
75
|
return classNames;
|
|
73
76
|
});
|
|
74
77
|
|
|
75
|
-
const style = computed((): { [key: string] : string | null | undefined } => {
|
|
76
|
-
return {
|
|
77
|
-
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
78
|
-
"--fs-text-color" : colors.value[props.variant]
|
|
79
|
-
};
|
|
80
|
-
});
|
|
81
|
-
|
|
82
78
|
return {
|
|
83
79
|
classes,
|
|
84
80
|
style
|
package/components/FSWindow.vue
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
|
-
import { computed, defineComponent, type PropType, type VNode } from "vue";
|
|
30
|
+
import { computed, defineComponent, type PropType, type StyleValue, type VNode } from "vue";
|
|
31
31
|
|
|
32
32
|
import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
33
33
|
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
@@ -46,7 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
|
|
47
47
|
delete slots.default;
|
|
48
48
|
|
|
49
|
-
const style = computed(():
|
|
49
|
+
const style = computed((): StyleValue => ({
|
|
50
50
|
"--fs-window-width": sizeToVar(props.width)
|
|
51
51
|
}));
|
|
52
52
|
|
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import type
|
|
23
|
-
import { computed, defineComponent, onMounted, onUnmounted, ref } from "vue";
|
|
22
|
+
import { computed, defineComponent, onMounted, onUnmounted, type PropType, type StyleValue, ref } from "vue";
|
|
24
23
|
|
|
25
24
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
26
25
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -52,7 +51,7 @@ export default defineComponent({
|
|
|
52
51
|
|
|
53
52
|
const elementId = `id${uuidv4()}`;
|
|
54
53
|
|
|
55
|
-
const style = computed(():
|
|
54
|
+
const style = computed((): StyleValue => ({
|
|
56
55
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
57
56
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
58
57
|
"--fs-group-color" : darks.soft,
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script lang="ts">
|
|
58
|
-
import type
|
|
59
|
-
import { computed, defineComponent } from "vue";
|
|
58
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
60
59
|
|
|
61
60
|
import type { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
|
|
62
61
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -67,8 +67,7 @@
|
|
|
67
67
|
</template>
|
|
68
68
|
|
|
69
69
|
<script lang="ts">
|
|
70
|
-
import type
|
|
71
|
-
import { computed, defineComponent } from "vue";
|
|
70
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
72
71
|
|
|
73
72
|
import type { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
|
|
74
73
|
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
29
|
<script lang="ts">
|
|
30
|
-
import type
|
|
31
|
-
import { defineComponent } from "vue";
|
|
30
|
+
import { defineComponent, type PropType } from "vue";
|
|
32
31
|
|
|
33
32
|
import type { FSDeviceAlert, FSDeviceConnectivity, FSDeviceStatus, FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
|
|
34
33
|
import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script lang="ts">
|
|
32
|
-
import type
|
|
33
|
-
import { computed, defineComponent, ref } from "vue";
|
|
32
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
34
33
|
|
|
35
34
|
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
36
35
|
import type { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -55,8 +55,7 @@
|
|
|
55
55
|
</template>
|
|
56
56
|
|
|
57
57
|
<script lang="ts">
|
|
58
|
-
import type
|
|
59
|
-
import { computed, defineComponent } from "vue";
|
|
58
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
60
59
|
|
|
61
60
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
62
61
|
import type { FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -313,8 +313,7 @@
|
|
|
313
313
|
</template>
|
|
314
314
|
|
|
315
315
|
<script lang="ts">
|
|
316
|
-
import type
|
|
317
|
-
import { computed, defineComponent, ref } from "vue";
|
|
316
|
+
import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
|
|
318
317
|
|
|
319
318
|
import { useBreakpoints, useColors, useRules, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
320
319
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -450,7 +449,7 @@ export default defineComponent({
|
|
|
450
449
|
const dialog = ref(false);
|
|
451
450
|
const search = ref("");
|
|
452
451
|
|
|
453
|
-
const style = computed(():
|
|
452
|
+
const style = computed((): StyleValue => {
|
|
454
453
|
if (!props.editable) {
|
|
455
454
|
return {
|
|
456
455
|
"--fs-autocomplete-field-cursor": "default",
|
|
@@ -27,14 +27,18 @@
|
|
|
27
27
|
<v-spacer
|
|
28
28
|
style="min-width: 40px;"
|
|
29
29
|
/>
|
|
30
|
-
<
|
|
31
|
-
v-if="$props.messages
|
|
32
|
-
class="fs-base-field-messages"
|
|
33
|
-
font="text-overline"
|
|
34
|
-
:style="style"
|
|
30
|
+
<template
|
|
31
|
+
v-if="$props.messages"
|
|
35
32
|
>
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
<FSSpan
|
|
34
|
+
v-if="$props.messages.length > 0"
|
|
35
|
+
class="fs-base-field-messages"
|
|
36
|
+
font="text-overline"
|
|
37
|
+
:style="style"
|
|
38
|
+
>
|
|
39
|
+
{{ $props.messages.join(", ") }}
|
|
40
|
+
</FSSpan>
|
|
41
|
+
</template>
|
|
38
42
|
</FSRow>
|
|
39
43
|
</slot>
|
|
40
44
|
<slot />
|
|
@@ -54,8 +58,7 @@
|
|
|
54
58
|
</template>
|
|
55
59
|
|
|
56
60
|
<script lang="ts">
|
|
57
|
-
import type
|
|
58
|
-
import { computed, defineComponent } from "vue";
|
|
61
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
59
62
|
|
|
60
63
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
61
64
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -114,7 +117,7 @@ export default defineComponent({
|
|
|
114
117
|
const lights = getColors(ColorEnum.Light);
|
|
115
118
|
const darks = getColors(ColorEnum.Dark);
|
|
116
119
|
|
|
117
|
-
const style = computed(():
|
|
120
|
+
const style = computed((): StyleValue => {
|
|
118
121
|
if (!props.editable) {
|
|
119
122
|
return {
|
|
120
123
|
"--fs-base-field-color": lights.dark
|