@dative-gpi/foundation-shared-components 1.1.23-fs-chart → 1.1.24-unit-formatter
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 +0 -2
- package/components/FSButton.vue +87 -43
- package/components/FSCard.vue +100 -208
- package/components/FSCardPlaceholder.vue +25 -29
- package/components/FSChip.vue +127 -54
- package/components/FSChipGroup.vue +23 -141
- package/components/FSClickable.vue +326 -24
- package/components/FSColor.vue +3 -3
- package/components/FSColorIcon.vue +0 -1
- package/components/FSDialogContent.vue +28 -39
- package/components/FSDialogFormBody.vue +0 -2
- package/components/FSDialogMenu.vue +1 -8
- package/components/FSDialogMultiFormBody.vue +5 -6
- package/components/FSDivider.vue +1 -5
- package/components/FSEditImageUI.vue +30 -21
- package/components/FSGridMosaic.vue +0 -2
- package/components/FSIconCard.vue +1 -3
- package/components/FSIconCheck.vue +0 -8
- package/components/FSImageCard.vue +4 -4
- package/components/FSInstantPicker.vue +0 -2
- package/components/FSLink.vue +13 -1
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +6 -6
- package/components/FSPlayButtons.vue +9 -11
- package/components/FSProgressBar.vue +28 -142
- package/components/FSRangePicker.vue +0 -2
- package/components/FSRouterLink.vue +14 -84
- package/components/FSSlideGroup.vue +1 -5
- package/components/FSWindow.vue +0 -2
- package/components/agenda/FSAgendaHorizontalEvent.vue +4 -4
- package/components/agenda/FSAgendaVerticalEvent.vue +4 -4
- package/components/deviceOrganisations/FSStatusRichCard.vue +7 -4
- package/components/fields/FSAutocompleteField.vue +0 -1
- package/components/fields/FSEntityFieldUI.vue +0 -12
- package/components/fields/FSRichTextField.vue +0 -2
- package/components/lists/FSDataIteratorItem.vue +0 -2
- package/components/lists/FSDataTableUI.vue +0 -12
- package/components/lists/FSFilterButton.vue +23 -34
- package/components/lists/FSHeaderButton.vue +3 -6
- package/components/lists/FSTileList.vue +6 -23
- package/components/map/FSMap.vue +1 -1
- package/components/map/FSMapMarker.vue +3 -4
- package/components/selects/FSSelectMapLayer.vue +0 -5
- package/components/tiles/FSChartTileUI.vue +0 -2
- package/components/tiles/FSFolderTileUI.vue +2 -2
- package/components/tiles/FSLocationTileUI.vue +0 -2
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -2
- package/components/tiles/FSTile.vue +64 -32
- package/components/tiles/FSUserOrganisationTileUI.vue +0 -2
- package/components/toggleSets/FSToggleSetPosition.vue +0 -5
- package/composables/useMapLayers.ts +0 -12
- package/models/index.ts +1 -2
- package/models/map.ts +1 -2
- package/models/tables.ts +0 -1
- package/package.json +4 -4
- package/styles/components/fs_button.scss +7 -1
- 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/fs_color_icon.scss +3 -0
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_map.scss +1 -7
- package/styles/components/fs_progress_bar.scss +6 -62
- package/styles/components/index.scss +2 -1
- package/styles/globals/overrides.scss +1 -1
- package/assets/images/map/open-street-map.png +0 -0
- package/components/FSGroupingChip.vue +0 -115
- package/components/FSSnackbar.vue +0 -146
- package/components/FSSubgroupingChip.vue +0 -138
- package/components/fields/FSDurationField.vue +0 -184
- package/components/tiles/FSPlaylistTileUI.vue +0 -149
- package/components/tiles/FSSubgroupingTileUI.vue +0 -97
- package/models/variants.ts +0 -33
- package/styles/components/fs_snackbar.scss +0 -7
|
@@ -77,7 +77,6 @@ import FSRichTextField from "./fields/FSRichTextField.vue";
|
|
|
77
77
|
import FSIcon from "./FSIcon.vue";
|
|
78
78
|
import FSSpan from "./FSSpan.vue";
|
|
79
79
|
import FSText from "./FSText.vue";
|
|
80
|
-
import FSCol from "./FSCol.vue";
|
|
81
80
|
import FSRow from "./FSRow.vue";
|
|
82
81
|
|
|
83
82
|
export default defineComponent({
|
|
@@ -87,7 +86,6 @@ export default defineComponent({
|
|
|
87
86
|
FSIcon,
|
|
88
87
|
FSSpan,
|
|
89
88
|
FSText,
|
|
90
|
-
FSCol,
|
|
91
89
|
FSRow
|
|
92
90
|
},
|
|
93
91
|
props: {
|
package/components/FSButton.vue
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSClickable
|
|
3
3
|
v-if="$props.variant !== 'icon'"
|
|
4
|
-
:clickable="true"
|
|
5
4
|
:disabled="$props.disabled"
|
|
6
5
|
:padding="padding"
|
|
7
6
|
:variant="$props.variant"
|
|
@@ -9,6 +8,7 @@
|
|
|
9
8
|
:load="$props.load"
|
|
10
9
|
:href="$props.href"
|
|
11
10
|
:to="$props.to"
|
|
11
|
+
:style="style"
|
|
12
12
|
@click.stop="onClick"
|
|
13
13
|
v-bind="$attrs"
|
|
14
14
|
>
|
|
@@ -87,63 +87,93 @@
|
|
|
87
87
|
</FSIcon>
|
|
88
88
|
</slot>
|
|
89
89
|
</FSCol>
|
|
90
|
-
</
|
|
91
|
-
<
|
|
90
|
+
</FSClickable>
|
|
91
|
+
<FSRow
|
|
92
92
|
v-else
|
|
93
|
-
|
|
94
|
-
:href="$props.href"
|
|
93
|
+
width="hug"
|
|
95
94
|
:class="iconClasses"
|
|
95
|
+
:style="style"
|
|
96
96
|
@click.stop="onClick"
|
|
97
|
+
v-bind="$attrs"
|
|
97
98
|
>
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
align="center-left"
|
|
101
|
-
v-bind="$attrs"
|
|
99
|
+
<template
|
|
100
|
+
v-if="$props.load"
|
|
102
101
|
>
|
|
103
|
-
<
|
|
104
|
-
|
|
102
|
+
<v-progress-circular
|
|
103
|
+
class="fs-button-load"
|
|
104
|
+
width="2"
|
|
105
|
+
size="20"
|
|
106
|
+
:indeterminate="true"
|
|
107
|
+
:color="loadColor"
|
|
108
|
+
/>
|
|
109
|
+
</template>
|
|
110
|
+
<template
|
|
111
|
+
v-else-if="$props.href"
|
|
112
|
+
>
|
|
113
|
+
<a
|
|
114
|
+
:href="$props.href"
|
|
105
115
|
>
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
<FSIcon
|
|
117
|
+
v-if="$props.icon"
|
|
118
|
+
:size="$props.iconSize"
|
|
119
|
+
>
|
|
120
|
+
{{ $props.icon }}
|
|
121
|
+
</FSIcon>
|
|
122
|
+
<FSSpan
|
|
123
|
+
v-if="$props.label"
|
|
124
|
+
>
|
|
125
|
+
{{ $props.label }}
|
|
126
|
+
</FSSpan>
|
|
127
|
+
</a>
|
|
128
|
+
</template>
|
|
129
|
+
<template
|
|
130
|
+
v-else-if="$props.to"
|
|
131
|
+
>
|
|
132
|
+
<FSRouterLink
|
|
133
|
+
:to="$props.to"
|
|
116
134
|
>
|
|
117
135
|
<FSIcon
|
|
118
136
|
v-if="$props.icon"
|
|
119
|
-
:color="iconVariantColor"
|
|
120
137
|
:size="$props.iconSize"
|
|
121
138
|
>
|
|
122
139
|
{{ $props.icon }}
|
|
123
140
|
</FSIcon>
|
|
124
|
-
<
|
|
141
|
+
<FSSpan
|
|
125
142
|
v-if="$props.label"
|
|
126
|
-
:color="iconVariantColor"
|
|
127
143
|
>
|
|
128
144
|
{{ $props.label }}
|
|
129
|
-
</
|
|
130
|
-
</
|
|
131
|
-
</
|
|
132
|
-
|
|
145
|
+
</FSSpan>
|
|
146
|
+
</FSRouterLink>
|
|
147
|
+
</template>
|
|
148
|
+
<template
|
|
149
|
+
v-else
|
|
150
|
+
>
|
|
151
|
+
<FSIcon
|
|
152
|
+
v-if="$props.icon"
|
|
153
|
+
:size="$props.iconSize"
|
|
154
|
+
>
|
|
155
|
+
{{ $props.icon }}
|
|
156
|
+
</FSIcon>
|
|
157
|
+
<FSSpan
|
|
158
|
+
v-if="$props.label"
|
|
159
|
+
>
|
|
160
|
+
{{ $props.label }}
|
|
161
|
+
</FSSpan>
|
|
162
|
+
</template>
|
|
163
|
+
</FSRow>
|
|
133
164
|
</template>
|
|
134
165
|
|
|
135
166
|
<script lang="ts">
|
|
136
|
-
import { computed, defineComponent, type PropType, useSlots } from "vue";
|
|
167
|
+
import { computed, defineComponent, type PropType, type StyleValue, useSlots } from "vue";
|
|
137
168
|
import { type RouteLocation } from "vue-router";
|
|
138
169
|
|
|
139
170
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
140
171
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
141
172
|
|
|
142
|
-
import FSRouterLink from
|
|
143
|
-
import
|
|
173
|
+
import FSRouterLink from "./FSRouterLink.vue";
|
|
174
|
+
import FSClickable from "./FSClickable.vue";
|
|
144
175
|
import FSSpan from "./FSSpan.vue";
|
|
145
176
|
import FSIcon from "./FSIcon.vue";
|
|
146
|
-
import FSCard from './FSCard.vue';
|
|
147
177
|
import FSCol from "./FSCol.vue";
|
|
148
178
|
import FSRow from "./FSRow.vue";
|
|
149
179
|
|
|
@@ -157,8 +187,7 @@ export default defineComponent({
|
|
|
157
187
|
name: "FSButton",
|
|
158
188
|
components: {
|
|
159
189
|
FSRouterLink,
|
|
160
|
-
|
|
161
|
-
FSText,
|
|
190
|
+
FSClickable,
|
|
162
191
|
FSSpan,
|
|
163
192
|
FSIcon,
|
|
164
193
|
FSCol,
|
|
@@ -236,17 +265,32 @@ export default defineComponent({
|
|
|
236
265
|
const { getColors } = useColors();
|
|
237
266
|
|
|
238
267
|
const colors = computed(() => getColors(props.color));
|
|
268
|
+
const lights = getColors(ColorEnum.Light);
|
|
239
269
|
const darks = getColors(ColorEnum.Dark);
|
|
240
270
|
const slots = useSlots();
|
|
241
271
|
|
|
242
|
-
const
|
|
272
|
+
const style = computed((): StyleValue => {
|
|
243
273
|
if (props.disabled) {
|
|
244
|
-
|
|
274
|
+
switch (props.variant) {
|
|
275
|
+
case "icon": return {
|
|
276
|
+
"--fs-button-color": lights.dark,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
245
279
|
}
|
|
246
|
-
|
|
247
|
-
|
|
280
|
+
switch (props.variant) {
|
|
281
|
+
case "icon": switch (props.color) {
|
|
282
|
+
case ColorEnum.Dark:
|
|
283
|
+
case ColorEnum.Light: return {
|
|
284
|
+
"--fs-button-color" : darks.base,
|
|
285
|
+
"--fs-button-hover-color": darks.dark,
|
|
286
|
+
};
|
|
287
|
+
default: return {
|
|
288
|
+
"--fs-button-color" : colors.value.base,
|
|
289
|
+
"--fs-button-hover-color": colors.value.dark,
|
|
290
|
+
};
|
|
291
|
+
}
|
|
248
292
|
}
|
|
249
|
-
return
|
|
293
|
+
return {};
|
|
250
294
|
});
|
|
251
295
|
|
|
252
296
|
const iconClasses = computed((): string[] => {
|
|
@@ -293,11 +337,11 @@ export default defineComponent({
|
|
|
293
337
|
};
|
|
294
338
|
|
|
295
339
|
return {
|
|
340
|
+
iconClasses,
|
|
341
|
+
loadColor,
|
|
296
342
|
colors,
|
|
343
|
+
style,
|
|
297
344
|
padding,
|
|
298
|
-
loadColor,
|
|
299
|
-
iconClasses,
|
|
300
|
-
iconVariantColor,
|
|
301
345
|
onClick
|
|
302
346
|
};
|
|
303
347
|
}
|
package/components/FSCard.vue
CHANGED
|
@@ -1,191 +1,142 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div
|
|
3
|
+
:class="classes"
|
|
3
4
|
:style="style"
|
|
4
|
-
:to="$props.to"
|
|
5
|
-
:href="$props.href"
|
|
6
|
-
:type="actualWrapperType"
|
|
7
|
-
:passive="actualClickable ? false : true"
|
|
8
|
-
:class="['fs-card-wrapper', $props.class]"
|
|
9
|
-
v-on="wrapperListeners"
|
|
10
5
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
6
|
+
<slot>
|
|
7
|
+
<FSCol
|
|
8
|
+
:gap="$props.gap"
|
|
9
|
+
>
|
|
10
|
+
<FSRow
|
|
11
|
+
v-if="$slots.header"
|
|
12
|
+
>
|
|
13
|
+
<slot
|
|
14
|
+
name="header"
|
|
15
|
+
/>
|
|
16
|
+
</FSRow>
|
|
17
|
+
<FSRow
|
|
18
|
+
v-if="$slots.body"
|
|
19
|
+
>
|
|
20
|
+
<slot
|
|
21
|
+
name="body"
|
|
22
|
+
/>
|
|
23
|
+
</FSRow>
|
|
24
|
+
<FSRow
|
|
25
|
+
v-if="$slots.footer"
|
|
26
|
+
>
|
|
27
|
+
<slot
|
|
28
|
+
name="footer"
|
|
29
|
+
/>
|
|
30
|
+
</FSRow>
|
|
31
|
+
</FSCol>
|
|
32
|
+
</slot>
|
|
33
|
+
<FSRow
|
|
34
|
+
v-if="$slots['top-right']"
|
|
35
|
+
class="fs-card-top-right"
|
|
13
36
|
>
|
|
14
37
|
<slot
|
|
15
|
-
name="
|
|
16
|
-
v-bind="{ contentVariant }"
|
|
17
|
-
/>
|
|
18
|
-
<v-progress-circular
|
|
19
|
-
v-if="$props.load"
|
|
20
|
-
class="fs-card-load__spinner"
|
|
21
|
-
width="2"
|
|
22
|
-
size="24"
|
|
23
|
-
:indeterminate="true"
|
|
24
|
-
:color="loadColor"
|
|
38
|
+
name="top-right"
|
|
25
39
|
/>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class="fs-card-top-right"
|
|
29
|
-
>
|
|
30
|
-
<slot
|
|
31
|
-
name="top-right"
|
|
32
|
-
/>
|
|
33
|
-
</FSRow>
|
|
34
|
-
</div>
|
|
35
|
-
</FSRouterLink>
|
|
40
|
+
</FSRow>
|
|
41
|
+
</div>
|
|
36
42
|
</template>
|
|
37
43
|
|
|
38
44
|
<script lang="ts">
|
|
39
|
-
import { computed, defineComponent,
|
|
40
|
-
import { type RouteLocation } from "vue-router";
|
|
45
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
41
46
|
|
|
42
|
-
import {
|
|
47
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
43
48
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
44
|
-
import {
|
|
49
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
45
50
|
|
|
51
|
+
import FSCol from "./FSCol.vue";
|
|
46
52
|
import FSRow from "./FSRow.vue";
|
|
47
|
-
import FSRouterLink from "./FSRouterLink.vue";
|
|
48
53
|
|
|
49
54
|
export default defineComponent({
|
|
50
55
|
name: "FSCard",
|
|
51
56
|
components: {
|
|
52
|
-
|
|
57
|
+
FSCol,
|
|
53
58
|
FSRow
|
|
54
59
|
},
|
|
55
60
|
props: {
|
|
56
61
|
height: {
|
|
57
62
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
63
|
+
required: false,
|
|
58
64
|
default: null
|
|
59
65
|
},
|
|
60
66
|
width: {
|
|
61
67
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
68
|
+
required: false,
|
|
62
69
|
default: null
|
|
63
70
|
},
|
|
64
71
|
maxWidth: {
|
|
65
72
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
73
|
+
required: false,
|
|
66
74
|
default: null
|
|
67
75
|
},
|
|
68
76
|
padding: {
|
|
69
77
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
78
|
+
required: false,
|
|
70
79
|
default: "0"
|
|
71
80
|
},
|
|
72
|
-
|
|
73
|
-
type: [String,
|
|
74
|
-
default: null
|
|
75
|
-
},
|
|
76
|
-
to: {
|
|
77
|
-
type: Object as PropType<RouteLocation | null>,
|
|
78
|
-
default: null
|
|
79
|
-
},
|
|
80
|
-
href: {
|
|
81
|
-
type: String as PropType<string | null>,
|
|
82
|
-
default: null
|
|
83
|
-
},
|
|
84
|
-
onClick: {
|
|
85
|
-
type: Function as PropType<(event: MouseEvent) => void | null>,
|
|
81
|
+
gap: {
|
|
82
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
86
83
|
required: false,
|
|
87
|
-
default:
|
|
84
|
+
default: "8px"
|
|
88
85
|
},
|
|
89
86
|
variant: {
|
|
90
|
-
type: String as PropType<
|
|
87
|
+
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
91
88
|
required: false,
|
|
92
|
-
default:
|
|
93
|
-
},
|
|
94
|
-
clickable: {
|
|
95
|
-
type: Boolean as PropType<boolean | null>,
|
|
96
|
-
default: null
|
|
89
|
+
default: "background"
|
|
97
90
|
},
|
|
98
91
|
color: {
|
|
99
92
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
|
93
|
+
required: false,
|
|
100
94
|
default: ColorEnum.Background
|
|
101
95
|
},
|
|
102
96
|
border: {
|
|
103
97
|
type: Boolean,
|
|
98
|
+
required: false,
|
|
104
99
|
default: true
|
|
105
100
|
},
|
|
106
101
|
borderRadius: {
|
|
107
102
|
type: [String, Number],
|
|
103
|
+
required: false,
|
|
108
104
|
default: "4px"
|
|
109
105
|
},
|
|
110
106
|
borderStyle: {
|
|
111
107
|
type: String as PropType<"solid" | "dashed" | "dotted" | "double" | "groove" | "ridge" | "inset" | "outset" | "none">,
|
|
108
|
+
required: false,
|
|
112
109
|
default: "solid"
|
|
113
110
|
},
|
|
114
111
|
borderColor: {
|
|
115
112
|
type: [Array, String] as PropType<ColorBase | null | string>,
|
|
113
|
+
required: false,
|
|
116
114
|
default: null
|
|
117
115
|
},
|
|
118
116
|
elevation: {
|
|
119
117
|
type: Boolean,
|
|
118
|
+
required: false,
|
|
120
119
|
default: false
|
|
121
120
|
},
|
|
122
121
|
topRightPadding: {
|
|
123
122
|
type: [String, Number],
|
|
123
|
+
required: false,
|
|
124
124
|
default: "4px"
|
|
125
|
-
},
|
|
126
|
-
type: {
|
|
127
|
-
type: String as PropType<"button" | "submit" | "reset" | null>,
|
|
128
|
-
default: null
|
|
129
|
-
},
|
|
130
|
-
load: {
|
|
131
|
-
type: Boolean,
|
|
132
|
-
default: false
|
|
133
|
-
},
|
|
134
|
-
disabled: {
|
|
135
|
-
type: Boolean,
|
|
136
|
-
default: false
|
|
137
|
-
},
|
|
138
|
-
disableHoverStyle: {
|
|
139
|
-
type: Boolean,
|
|
140
|
-
default: false
|
|
141
125
|
}
|
|
142
126
|
},
|
|
143
|
-
setup(props
|
|
127
|
+
setup(props) {
|
|
144
128
|
const { getColors, getGradients } = useColors();
|
|
145
129
|
|
|
146
|
-
const active = ref(false);
|
|
147
|
-
const hover = ref(false);
|
|
148
|
-
|
|
149
|
-
const backgrounds = getColors(ColorEnum.Background);
|
|
150
|
-
const lights = getColors(ColorEnum.Light);
|
|
151
|
-
|
|
152
130
|
const colors = computed(() => {
|
|
153
131
|
if (Array.isArray(props.color)) {
|
|
154
132
|
return getColors(props.color[0]);
|
|
155
133
|
}
|
|
156
134
|
return getColors(props.color);
|
|
157
135
|
});
|
|
158
|
-
|
|
159
136
|
const gradients = computed(() => getGradients(props.color, 135));
|
|
160
|
-
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
return false;
|
|
164
|
-
}
|
|
165
|
-
return props.clickable || !!props.to || !!props.href || !!props.onClick;
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
const actualWrapperType = computed(() => {
|
|
169
|
-
if (props.type) {
|
|
170
|
-
return props.type;
|
|
171
|
-
}
|
|
172
|
-
return "button";
|
|
173
|
-
});
|
|
174
|
-
|
|
175
|
-
const contentVariant = computed((): ColorBaseVariations => {
|
|
176
|
-
if (active.value) {
|
|
177
|
-
return "darkContrast";
|
|
178
|
-
}
|
|
179
|
-
if (hover.value) {
|
|
180
|
-
return "baseContrast";
|
|
181
|
-
}
|
|
182
|
-
switch (props.variant) {
|
|
183
|
-
case "standard" : return "lightContrast";
|
|
184
|
-
case "background": return "base";
|
|
185
|
-
case "full" : return "baseContrast";
|
|
186
|
-
}
|
|
187
|
-
return "base";
|
|
188
|
-
});
|
|
137
|
+
const backgrounds = getColors(ColorEnum.Background);
|
|
138
|
+
const lights = getColors(ColorEnum.Light);
|
|
139
|
+
const darks = getColors(ColorEnum.Dark);
|
|
189
140
|
|
|
190
141
|
const borderColor = computed((): ColorBase => {
|
|
191
142
|
if (props.borderColor) {
|
|
@@ -208,76 +159,59 @@ export default defineComponent({
|
|
|
208
159
|
}
|
|
209
160
|
});
|
|
210
161
|
|
|
211
|
-
const loadColor = computed((): string => {
|
|
212
|
-
return colors.value[contentVariant.value] ?? colors.value.baseContrast!;
|
|
213
|
-
});
|
|
214
|
-
|
|
215
162
|
const style = computed((): StyleValue => {
|
|
216
|
-
const baseStyle = {
|
|
217
|
-
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
218
|
-
"--fs-card-border-style" : props.borderStyle,
|
|
219
|
-
"--fs-card-border-radius" : sizeToVar(props.borderRadius),
|
|
220
|
-
"--fs-card-padding" : sizeToVar(props.padding),
|
|
221
|
-
"--fs-card-height" : sizeToVar(props.height),
|
|
222
|
-
"--fs-card-width" : sizeToVar(props.width),
|
|
223
|
-
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
224
|
-
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
225
|
-
};
|
|
226
|
-
if (props.disabled) {
|
|
227
|
-
return {
|
|
228
|
-
...baseStyle,
|
|
229
|
-
"--fs-card-background-color": lights.light,
|
|
230
|
-
"--fs-card-border-color" : lights.dark,
|
|
231
|
-
"--fs-card-color" : props.clickable ? lights.dark : lights.lightContrast!
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
|
|
235
163
|
switch (props.variant) {
|
|
236
164
|
case "background": return {
|
|
237
|
-
|
|
165
|
+
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
166
|
+
"--fs-card-border-style" : props.borderStyle,
|
|
167
|
+
"--fs-card-border-radius" : sizeToVar(props.borderRadius),
|
|
168
|
+
"--fs-card-padding" : sizeToVar(props.padding),
|
|
169
|
+
"--fs-card-height" : sizeToVar(props.height),
|
|
170
|
+
"--fs-card-width" : sizeToVar(props.width),
|
|
171
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
238
172
|
"--fs-card-background-color": backgrounds.base,
|
|
239
173
|
"--fs-card-border-color" : borderColor.value,
|
|
240
|
-
"--fs-card-color" :
|
|
241
|
-
"--fs-card-
|
|
242
|
-
"--fs-card-hover-border-color" : colors.value.baseContrast!,
|
|
243
|
-
"--fs-card-hover-color" : colors.value.baseContrast!
|
|
174
|
+
"--fs-card-color" : darks.base,
|
|
175
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
244
176
|
}
|
|
245
|
-
case "standard": {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
return {
|
|
258
|
-
...baseStyle,
|
|
259
|
-
"--fs-card-background-color": colors.value.light,
|
|
260
|
-
"--fs-card-border-color" : borderColor.value,
|
|
261
|
-
"--fs-card-color" : colors.value.lightContrast!,
|
|
262
|
-
"--fs-card-hover-background-color" : colors.value.base,
|
|
263
|
-
"--fs-card-hover-border-color" : colors.value.base,
|
|
264
|
-
"--fs-card-hover-color" : colors.value.baseContrast!
|
|
265
|
-
};
|
|
177
|
+
case "standard": return {
|
|
178
|
+
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
179
|
+
"--fs-card-border-style" : props.borderStyle,
|
|
180
|
+
"--fs-card-border-radius" : sizeToVar(props.borderRadius),
|
|
181
|
+
"--fs-card-padding" : sizeToVar(props.padding),
|
|
182
|
+
"--fs-card-height" : sizeToVar(props.height),
|
|
183
|
+
"--fs-card-width" : sizeToVar(props.width),
|
|
184
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
185
|
+
"--fs-card-background-color": colors.value.light,
|
|
186
|
+
"--fs-card-border-color" : borderColor.value,
|
|
187
|
+
"--fs-card-color" : colors.value.lightContrast!,
|
|
188
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
266
189
|
}
|
|
267
190
|
case "full": return {
|
|
268
|
-
|
|
191
|
+
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
192
|
+
"--fs-card-border-style" : props.borderStyle,
|
|
193
|
+
"--fs-card-border-radius" : sizeToVar(props.borderRadius),
|
|
194
|
+
"--fs-card-padding" : sizeToVar(props.padding),
|
|
195
|
+
"--fs-card-height" : sizeToVar(props.height),
|
|
196
|
+
"--fs-card-width" : sizeToVar(props.width),
|
|
197
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
269
198
|
"--fs-card-background-color": colors.value.base,
|
|
270
199
|
"--fs-card-border-color" : borderColor.value,
|
|
271
200
|
"--fs-card-color" : colors.value.baseContrast!,
|
|
272
|
-
"--fs-card-
|
|
273
|
-
"--fs-card-hover-border-color" : colors.value.base,
|
|
274
|
-
"--fs-card-hover-color" : colors.value.baseContrast!
|
|
201
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
275
202
|
}
|
|
276
203
|
case "gradient": return {
|
|
277
|
-
|
|
204
|
+
"--fs-card-border-size" : props.border ? "1px" : "0",
|
|
205
|
+
"--fs-card-border-style" : props.borderStyle,
|
|
206
|
+
"--fs-card-border-radius" : sizeToVar(props.borderRadius),
|
|
207
|
+
"--fs-card-padding" : sizeToVar(props.padding),
|
|
208
|
+
"--fs-card-height" : sizeToVar(props.height),
|
|
209
|
+
"--fs-card-width" : sizeToVar(props.width),
|
|
210
|
+
"--fs-card-max-width" : sizeToVar(props.maxWidth, "unset"),
|
|
278
211
|
"--fs-card-background-color": gradients.value.base,
|
|
279
212
|
"--fs-card-border-color" : borderColor.value,
|
|
280
|
-
"--fs-card-color" : colors.value.lightContrast
|
|
213
|
+
"--fs-card-color" : colors.value.lightContrast!,
|
|
214
|
+
"--fs-card-top-right-padding": sizeToVar(props.topRightPadding)
|
|
281
215
|
}
|
|
282
216
|
}
|
|
283
217
|
});
|
|
@@ -290,63 +224,21 @@ export default defineComponent({
|
|
|
290
224
|
break;
|
|
291
225
|
case "background":
|
|
292
226
|
classNames.push("fs-card-background");
|
|
227
|
+
classNames.push("fs-card-clickable");
|
|
293
228
|
break;
|
|
294
229
|
default:
|
|
295
230
|
classNames.push("fs-card-background");
|
|
296
231
|
break;
|
|
297
232
|
}
|
|
298
|
-
|
|
299
|
-
if (actualClickable.value) {
|
|
300
|
-
classNames.push("fs-card-clickable");
|
|
301
|
-
}
|
|
302
|
-
if (props.disableHoverStyle) {
|
|
303
|
-
classNames.push("fs-card-disable-hover-style");
|
|
304
|
-
}
|
|
305
|
-
if (props.disabled) {
|
|
306
|
-
classNames.push("fs-card-disabled");
|
|
307
|
-
}
|
|
308
|
-
if (props.load) {
|
|
309
|
-
classNames.push("fs-card-load");
|
|
310
|
-
}
|
|
311
233
|
if (props.elevation) {
|
|
312
234
|
classNames.push("fs-card-elevation");
|
|
313
235
|
}
|
|
314
|
-
|
|
315
236
|
return classNames;
|
|
316
237
|
});
|
|
317
|
-
|
|
318
|
-
const wrapperListeners = computed(() => {
|
|
319
|
-
if (actualClickable.value && !props.disabled) {
|
|
320
|
-
return {
|
|
321
|
-
mouseover: () => { hover.value = true },
|
|
322
|
-
mouseleave: () => { hover.value = false },
|
|
323
|
-
mousedown: () => { active.value = true },
|
|
324
|
-
mouseup: () => { active.value = false },
|
|
325
|
-
"click": onClick
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
return {};
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
const onClick = (event: MouseEvent) => {
|
|
332
|
-
if (!actualClickable.value || props.disabled || props.load || props.href || props.to) {
|
|
333
|
-
return;
|
|
334
|
-
}
|
|
335
|
-
emit("click", event);
|
|
336
|
-
};
|
|
337
238
|
|
|
338
239
|
return {
|
|
339
|
-
actualWrapperType,
|
|
340
|
-
actualClickable,
|
|
341
|
-
contentVariant,
|
|
342
|
-
FSRouterLink,
|
|
343
|
-
loadColor,
|
|
344
240
|
classes,
|
|
345
|
-
|
|
346
|
-
hover,
|
|
347
|
-
style,
|
|
348
|
-
onClick,
|
|
349
|
-
wrapperListeners
|
|
241
|
+
style
|
|
350
242
|
};
|
|
351
243
|
}
|
|
352
244
|
});
|