@dative-gpi/foundation-shared-components 1.1.24-unit-formatter → 1.1.24-unit-formatter-2
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/assets/images/map/open-street-map.png +0 -0
- package/components/FSAccordionPanel.vue +2 -0
- package/components/FSButton.vue +43 -87
- package/components/FSCard.vue +208 -100
- package/components/FSCardPlaceholder.vue +29 -25
- package/components/FSChip.vue +54 -127
- package/components/FSChipGroup.vue +141 -23
- package/components/FSClickable.vue +24 -326
- package/components/FSColor.vue +3 -3
- package/components/FSColorIcon.vue +1 -0
- package/components/FSDialogContent.vue +39 -28
- package/components/FSDialogFormBody.vue +2 -0
- package/components/FSDialogMenu.vue +8 -1
- package/components/FSDialogMultiFormBody.vue +6 -5
- package/components/FSDivider.vue +5 -1
- package/components/FSEditImageUI.vue +21 -30
- package/components/FSGridMosaic.vue +2 -0
- package/components/FSGroupingChip.vue +115 -0
- package/components/FSIconCard.vue +3 -1
- package/components/FSIconCheck.vue +8 -0
- package/components/FSImageCard.vue +4 -4
- package/components/FSInstantPicker.vue +2 -0
- package/components/FSLink.vue +1 -13
- package/components/FSOptionItem.vue +4 -4
- package/components/FSOptionsMenu.vue +6 -6
- package/components/FSPlayButtons.vue +11 -9
- package/components/FSProgressBar.vue +142 -28
- package/components/FSRangePicker.vue +2 -0
- package/components/FSRouterLink.vue +84 -14
- package/components/FSSlideGroup.vue +5 -1
- package/components/FSSnackbar.vue +146 -0
- package/components/FSSubgroupingChip.vue +138 -0
- package/components/FSWindow.vue +2 -0
- package/components/agenda/FSAgendaHorizontalEvent.vue +4 -4
- package/components/agenda/FSAgendaVerticalEvent.vue +4 -4
- package/components/deviceOrganisations/FSStatusRichCard.vue +4 -7
- package/components/fields/FSAutocompleteField.vue +1 -0
- package/components/fields/FSDurationField.vue +184 -0
- package/components/fields/FSEntityFieldUI.vue +12 -0
- package/components/fields/FSRichTextField.vue +2 -0
- package/components/lists/FSDataIteratorItem.vue +2 -0
- package/components/lists/FSDataTableUI.vue +12 -0
- package/components/lists/FSFilterButton.vue +34 -23
- package/components/lists/FSHeaderButton.vue +6 -3
- package/components/lists/FSTileList.vue +23 -6
- package/components/map/FSMap.vue +1 -1
- package/components/map/FSMapMarker.vue +4 -3
- package/components/selects/FSSelectMapLayer.vue +5 -0
- package/components/tiles/FSChartTileUI.vue +2 -0
- package/components/tiles/FSFolderTileUI.vue +2 -2
- package/components/tiles/FSLocationTileUI.vue +2 -0
- package/components/tiles/FSPlaylistTileUI.vue +149 -0
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +2 -0
- package/components/tiles/FSSubgroupingTileUI.vue +97 -0
- package/components/tiles/FSTile.vue +32 -64
- package/components/tiles/FSUserOrganisationTileUI.vue +2 -0
- package/components/toggleSets/FSToggleSetPosition.vue +5 -0
- package/composables/useMapLayers.ts +12 -0
- package/models/index.ts +2 -1
- package/models/map.ts +2 -1
- package/models/tables.ts +1 -0
- package/models/variants.ts +33 -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/fs_filter_button.scss +6 -1
- package/styles/components/fs_map.scss +7 -1
- package/styles/components/fs_progress_bar.scss +62 -6
- package/styles/components/fs_snackbar.scss +7 -0
- package/styles/components/index.scss +1 -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,40 +1,46 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
:is="$attrs.onClick ? FSClickable : FSCard"
|
|
2
|
+
<FSCard
|
|
4
3
|
borderStyle="dashed"
|
|
5
4
|
padding="24px"
|
|
6
5
|
:height="$props.height"
|
|
6
|
+
:variant="CardVariants.Standard"
|
|
7
|
+
:color="ColorEnum.Light"
|
|
7
8
|
:width="$props.width"
|
|
8
9
|
:border="true"
|
|
9
10
|
v-bind="$attrs"
|
|
10
11
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
12
|
+
<template
|
|
13
|
+
#default
|
|
13
14
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
<slot>
|
|
16
|
+
<FSRow
|
|
17
|
+
align="center-center"
|
|
18
|
+
>
|
|
19
|
+
<FSIcon
|
|
20
|
+
v-if="$props.icon"
|
|
21
|
+
:color="ColorEnum.Light"
|
|
22
|
+
variant="dark"
|
|
23
|
+
>
|
|
24
|
+
{{ $props.icon }}
|
|
25
|
+
</FSIcon>
|
|
26
|
+
<FSText
|
|
27
|
+
v-if="$props.label"
|
|
28
|
+
:color="ColorEnum.Light"
|
|
29
|
+
variant="dark"
|
|
30
|
+
>
|
|
31
|
+
{{ $props.label }}
|
|
32
|
+
</FSText>
|
|
33
|
+
</FSRow>
|
|
34
|
+
</slot>
|
|
35
|
+
</template>
|
|
36
|
+
</FSCard>
|
|
30
37
|
</template>
|
|
31
38
|
|
|
32
39
|
<script lang="ts">
|
|
33
40
|
import { defineComponent, type PropType } from "vue";
|
|
34
41
|
|
|
35
|
-
import { ColorEnum } from "../models";
|
|
42
|
+
import { CardVariants, ColorEnum } from "../models";
|
|
36
43
|
|
|
37
|
-
import FSClickable from "./FSClickable.vue";
|
|
38
44
|
import FSCard from "./FSCard.vue";
|
|
39
45
|
import FSIcon from "./FSIcon.vue";
|
|
40
46
|
import FSText from "./FSText.vue";
|
|
@@ -43,7 +49,6 @@ import FSRow from "./FSRow.vue";
|
|
|
43
49
|
export default defineComponent({
|
|
44
50
|
name: "FSCardPlaceholder",
|
|
45
51
|
components: {
|
|
46
|
-
FSClickable,
|
|
47
52
|
FSCard,
|
|
48
53
|
FSIcon,
|
|
49
54
|
FSText,
|
|
@@ -74,8 +79,7 @@ export default defineComponent({
|
|
|
74
79
|
setup() {
|
|
75
80
|
return {
|
|
76
81
|
ColorEnum,
|
|
77
|
-
|
|
78
|
-
FSCard,
|
|
82
|
+
CardVariants
|
|
79
83
|
};
|
|
80
84
|
}
|
|
81
85
|
});
|
package/components/FSChip.vue
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<FSCard
|
|
3
|
+
class="fs-chip"
|
|
4
|
+
padding="2px 20px"
|
|
5
|
+
:borderRadius="50"
|
|
6
|
+
:color="$props.color"
|
|
7
|
+
:variant="$props.variant"
|
|
8
|
+
:height="$props.height"
|
|
6
9
|
@click="$emit('click', $event)"
|
|
10
|
+
v-bind="$attrs"
|
|
7
11
|
>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
:width="$props.width"
|
|
11
|
-
:class="classes"
|
|
12
|
-
:style="style"
|
|
13
|
-
:wrap="false"
|
|
14
|
-
v-bind="$attrs"
|
|
12
|
+
<template
|
|
13
|
+
#default="{ contentVariant }"
|
|
15
14
|
>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
<FSRow
|
|
16
|
+
:align="$props.align"
|
|
17
|
+
:wrap="false"
|
|
19
18
|
>
|
|
20
|
-
<
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
<slot
|
|
20
|
+
name="prepend"
|
|
21
|
+
v-bind="{ color: $props.color, contentVariant }"
|
|
23
22
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class="fs-chip-label"
|
|
23
|
+
<FSIcon
|
|
24
|
+
v-if="$props.prependIcon"
|
|
25
|
+
size="s"
|
|
26
|
+
>
|
|
27
|
+
{{ $props.prependIcon }}
|
|
28
|
+
</FSIcon>
|
|
29
|
+
</slot>
|
|
30
|
+
<slot
|
|
31
|
+
v-bind="{ color: $props.color, contentVariant }"
|
|
34
32
|
>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
33
|
+
<FSSpan
|
|
34
|
+
v-if="$props.label"
|
|
35
|
+
font="text-overline"
|
|
36
|
+
>
|
|
37
|
+
{{ $props.label }}
|
|
38
|
+
</FSSpan>
|
|
39
|
+
</slot>
|
|
40
|
+
<slot
|
|
41
|
+
name="append"
|
|
42
|
+
v-bind="{ color: $props.color, contentVariant }"
|
|
45
43
|
>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
<FSIcon
|
|
45
|
+
v-if="$props.appendIcon"
|
|
46
|
+
size="s"
|
|
47
|
+
>
|
|
48
|
+
{{ $props.appendIcon }}
|
|
49
|
+
</FSIcon>
|
|
50
|
+
</slot>
|
|
51
|
+
</FSRow>
|
|
52
|
+
</template>
|
|
53
|
+
</FSCard>
|
|
51
54
|
</template>
|
|
52
55
|
|
|
53
56
|
<script lang="ts">
|
|
54
|
-
import {
|
|
55
|
-
import { type RouteLocation } from "vue-router";
|
|
57
|
+
import { defineComponent, type PropType } from "vue";
|
|
56
58
|
|
|
57
|
-
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
58
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
59
|
-
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
59
|
+
import { type CardVariant, CardVariants, type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
60
60
|
|
|
61
61
|
import FSIcon from "./FSIcon.vue";
|
|
62
62
|
import FSSpan from "./FSSpan.vue";
|
|
63
63
|
import FSRow from "./FSRow.vue";
|
|
64
|
-
import
|
|
64
|
+
import FSCard from './FSCard.vue';
|
|
65
65
|
|
|
66
66
|
export default defineComponent({
|
|
67
67
|
name: "FSChip",
|
|
68
68
|
components: {
|
|
69
|
-
|
|
69
|
+
FSCard,
|
|
70
70
|
FSIcon,
|
|
71
71
|
FSSpan,
|
|
72
72
|
FSRow
|
|
@@ -92,100 +92,27 @@ export default defineComponent({
|
|
|
92
92
|
required: false,
|
|
93
93
|
default: () => [24, 20]
|
|
94
94
|
},
|
|
95
|
-
width: {
|
|
96
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
97
|
-
required: false,
|
|
98
|
-
default: "hug"
|
|
99
|
-
},
|
|
100
95
|
variant: {
|
|
101
|
-
type: String as PropType<
|
|
96
|
+
type: String as PropType<CardVariant>,
|
|
102
97
|
required: false,
|
|
103
|
-
default:
|
|
98
|
+
default: CardVariants.Full
|
|
104
99
|
},
|
|
105
100
|
color: {
|
|
106
101
|
type: String as PropType<ColorBase>,
|
|
107
102
|
required: false,
|
|
108
103
|
default: ColorEnum.Primary
|
|
109
104
|
},
|
|
110
|
-
clickable: {
|
|
111
|
-
type: Boolean,
|
|
112
|
-
required: false,
|
|
113
|
-
default: false
|
|
114
|
-
},
|
|
115
105
|
align: {
|
|
116
|
-
type: String as PropType<"center-center" | "center-left">,
|
|
106
|
+
type: String as PropType<"top-left" | "top-center" | "top-right" | "center-left" | "center-center" | "center-right" | "bottom-left" | "bottom-center" | "bottom-right">,
|
|
117
107
|
required: false,
|
|
118
108
|
default: "center-center"
|
|
119
|
-
}
|
|
120
|
-
to: {
|
|
121
|
-
type: Object as PropType<RouteLocation | null>,
|
|
122
|
-
required: false,
|
|
123
|
-
default: null
|
|
124
|
-
},
|
|
109
|
+
}
|
|
125
110
|
},
|
|
126
111
|
inheritsAttrs: false,
|
|
127
112
|
emits: ['click'],
|
|
128
|
-
setup(
|
|
129
|
-
const { getColors } = useColors();
|
|
130
|
-
|
|
131
|
-
const colors = computed(() => getColors(props.color));
|
|
132
|
-
const backgrounds = getColors(ColorEnum.Background);
|
|
133
|
-
const darks = getColors(ColorEnum.Dark);
|
|
134
|
-
|
|
135
|
-
const style = computed((): StyleValue => {
|
|
136
|
-
switch (props.variant) {
|
|
137
|
-
case "standard": return {
|
|
138
|
-
"--fs-chip-height" : sizeToVar(props.height),
|
|
139
|
-
"--fs-chip-background-color" : backgrounds.base,
|
|
140
|
-
"--fs-chip-border-color" : colors.value.base,
|
|
141
|
-
"--fs-chip-color" : colors.value.base,
|
|
142
|
-
"--fs-chip-hover-background-color" : colors.value.base,
|
|
143
|
-
"--fs-chip-hover-border-color" : colors.value.base,
|
|
144
|
-
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
145
|
-
"--fs-chip-active-background-color": backgrounds.base,
|
|
146
|
-
"--fs-chip-active-border-color" : colors.value.dark,
|
|
147
|
-
"--fs-chip-active-color" : colors.value.dark
|
|
148
|
-
};
|
|
149
|
-
case "full": return {
|
|
150
|
-
"--fs-chip-height" : sizeToVar(props.height),
|
|
151
|
-
"--fs-chip-background-color" : colors.value.base,
|
|
152
|
-
"--fs-chip-border-color" : colors.value.base,
|
|
153
|
-
"--fs-chip-color" : colors.value.baseContrast!,
|
|
154
|
-
"--fs-chip-hover-background-color" : colors.value.soft,
|
|
155
|
-
"--fs-chip-hover-border-color" : colors.value.soft,
|
|
156
|
-
"--fs-chip-hover-color" : colors.value.baseContrast!,
|
|
157
|
-
"--fs-chip-active-background-color": colors.value.dark,
|
|
158
|
-
"--fs-chip-active-border-color" : colors.value.darkContrast!,
|
|
159
|
-
"--fs-chip-active-color" : colors.value.darkContrast!
|
|
160
|
-
};
|
|
161
|
-
case "borderless": return {
|
|
162
|
-
"--fs-chip-height" : sizeToVar(props.height),
|
|
163
|
-
"--fs-chip-background-color" : backgrounds.base,
|
|
164
|
-
"--fs-chip-border-color" : backgrounds.base,
|
|
165
|
-
"--fs-chip-color" : darks.base,
|
|
166
|
-
"--fs-chip-hover-background-color" : colors.value.light,
|
|
167
|
-
"--fs-chip-hover-border-color" : colors.value.light,
|
|
168
|
-
"--fs-chip-hover-color" : colors.value.base,
|
|
169
|
-
"--fs-chip-active-background-color": colors.value.light,
|
|
170
|
-
"--fs-chip-active-border-color" : colors.value.light,
|
|
171
|
-
"--fs-chip-active-color" : colors.value.base
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
const classes = computed((): string[] => {
|
|
177
|
-
const classNames: string[] = ["fs-chip"];
|
|
178
|
-
if (props.clickable) {
|
|
179
|
-
classNames.push("fs-chip-clickable");
|
|
180
|
-
}
|
|
181
|
-
return classNames;
|
|
182
|
-
});
|
|
113
|
+
setup() {
|
|
183
114
|
|
|
184
115
|
return {
|
|
185
|
-
FSRouterLink,
|
|
186
|
-
classes,
|
|
187
|
-
colors,
|
|
188
|
-
style
|
|
189
116
|
};
|
|
190
117
|
}
|
|
191
118
|
});
|
|
@@ -1,69 +1,187 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSWrapGroup
|
|
3
|
-
v-if="$props.variant
|
|
3
|
+
v-if="$props.variant == ChipGroupVariants.Wrap"
|
|
4
4
|
v-bind="$attrs"
|
|
5
5
|
>
|
|
6
|
-
<
|
|
7
|
-
v-for="(
|
|
6
|
+
<template
|
|
7
|
+
v-for="(item, index) in $props.items"
|
|
8
8
|
:key="index"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
>
|
|
10
|
+
<slot
|
|
11
|
+
name="item.chip"
|
|
12
|
+
v-bind="{ index, item }"
|
|
13
|
+
>
|
|
14
|
+
<FSChip
|
|
15
|
+
:variant="$props.chipVariant"
|
|
16
|
+
:color="$props.color"
|
|
17
|
+
:label="item.label ?? item"
|
|
18
|
+
/>
|
|
19
|
+
</slot>
|
|
20
|
+
</template>
|
|
13
21
|
<slot />
|
|
14
22
|
</FSWrapGroup>
|
|
15
23
|
<FSSlideGroup
|
|
16
|
-
v-if="$props.variant
|
|
24
|
+
v-else-if="$props.variant == ChipGroupVariants.Slide"
|
|
17
25
|
v-bind="$attrs"
|
|
18
26
|
>
|
|
19
|
-
<
|
|
20
|
-
v-for="(
|
|
27
|
+
<template
|
|
28
|
+
v-for="(item, index) in $props.items"
|
|
21
29
|
:key="index"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
>
|
|
31
|
+
<slot
|
|
32
|
+
name="item.chip"
|
|
33
|
+
v-bind="{ index, item }"
|
|
34
|
+
>
|
|
35
|
+
<FSChip
|
|
36
|
+
:variant="$props.chipVariant"
|
|
37
|
+
:color="$props.color"
|
|
38
|
+
:label="item.label ?? item"
|
|
39
|
+
/>
|
|
40
|
+
</slot>
|
|
41
|
+
</template>
|
|
26
42
|
<slot />
|
|
27
43
|
</FSSlideGroup>
|
|
44
|
+
<FSRow
|
|
45
|
+
v-else-if="$props.variant == ChipGroupVariants.Menu && $props.items"
|
|
46
|
+
:wrap="false"
|
|
47
|
+
>
|
|
48
|
+
<template
|
|
49
|
+
v-for="(item, index) in $props.items.slice(0, $props.maxItems ?? $props.items.length)"
|
|
50
|
+
:key="index"
|
|
51
|
+
>
|
|
52
|
+
<slot
|
|
53
|
+
name="item.chip"
|
|
54
|
+
v-bind="{ index, item }"
|
|
55
|
+
>
|
|
56
|
+
<FSChip
|
|
57
|
+
:variant="$props.chipVariant"
|
|
58
|
+
:color="$props.color"
|
|
59
|
+
:label="item.label ?? item"
|
|
60
|
+
/>
|
|
61
|
+
</slot>
|
|
62
|
+
</template>
|
|
63
|
+
<FSMenu
|
|
64
|
+
v-if="$props.maxItems && $props.items.length > $props.maxItems"
|
|
65
|
+
location="bottom end"
|
|
66
|
+
v-model="menuOpen"
|
|
67
|
+
>
|
|
68
|
+
<template
|
|
69
|
+
#activator="{ props: activatorProps }"
|
|
70
|
+
>
|
|
71
|
+
<FSChip
|
|
72
|
+
v-bind="activatorProps"
|
|
73
|
+
variant="full"
|
|
74
|
+
:label="`+${$props.items.length - $props.maxItems}`"
|
|
75
|
+
:color="menuActivatorColor"
|
|
76
|
+
:clickable="true"
|
|
77
|
+
/>
|
|
78
|
+
</template>
|
|
79
|
+
<FSCard
|
|
80
|
+
padding="16px 24px"
|
|
81
|
+
>
|
|
82
|
+
<template
|
|
83
|
+
#top-right
|
|
84
|
+
>
|
|
85
|
+
<FSButton
|
|
86
|
+
icon="mdi-close"
|
|
87
|
+
variant="icon"
|
|
88
|
+
iconSize="18px"
|
|
89
|
+
:color="ColorEnum.Dark"
|
|
90
|
+
@click="menuOpen = false"
|
|
91
|
+
/>
|
|
92
|
+
</template>
|
|
93
|
+
<FSCol
|
|
94
|
+
gap="12px"
|
|
95
|
+
>
|
|
96
|
+
<template
|
|
97
|
+
v-for="(item, index) in $props.items"
|
|
98
|
+
:key="index"
|
|
99
|
+
>
|
|
100
|
+
<slot
|
|
101
|
+
name="item.chip"
|
|
102
|
+
v-bind="{ index, item }"
|
|
103
|
+
>
|
|
104
|
+
<FSChip
|
|
105
|
+
:variant="$props.chipVariant"
|
|
106
|
+
:color="$props.color"
|
|
107
|
+
:label="item.label ?? item"
|
|
108
|
+
/>
|
|
109
|
+
</slot>
|
|
110
|
+
</template>
|
|
111
|
+
</FSCol>
|
|
112
|
+
</FSCard>
|
|
113
|
+
</FSMenu>
|
|
114
|
+
<slot />
|
|
115
|
+
</FSRow>
|
|
28
116
|
</template>
|
|
29
117
|
|
|
30
118
|
<script lang="ts">
|
|
31
|
-
import { defineComponent, type PropType } from "vue";
|
|
119
|
+
import { defineComponent, ref, type PropType, computed } from "vue";
|
|
32
120
|
|
|
33
|
-
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
121
|
+
import { type CardVariant, CardVariants, type ChipGroupVariant, ChipGroupVariants, type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
34
122
|
|
|
35
123
|
import FSSlideGroup from "./FSSlideGroup.vue";
|
|
36
124
|
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
125
|
+
import FSButton from "./FSButton.vue";
|
|
37
126
|
import FSChip from "./FSChip.vue";
|
|
127
|
+
import FSCard from "./FSCard.vue";
|
|
128
|
+
import FSMenu from "./FSMenu.vue";
|
|
129
|
+
import FSCol from "./FSCol.vue";
|
|
130
|
+
|
|
131
|
+
import { useColors } from "../composables";
|
|
38
132
|
|
|
39
133
|
export default defineComponent({
|
|
40
134
|
name: "FSChipGroup",
|
|
41
135
|
components: {
|
|
42
136
|
FSSlideGroup,
|
|
43
137
|
FSWrapGroup,
|
|
44
|
-
|
|
138
|
+
FSButton,
|
|
139
|
+
FSChip,
|
|
140
|
+
FSCard,
|
|
141
|
+
FSMenu,
|
|
142
|
+
FSCol
|
|
45
143
|
},
|
|
46
144
|
props: {
|
|
47
|
-
|
|
48
|
-
type: Array as PropType<string[]>,
|
|
145
|
+
items: {
|
|
146
|
+
type: Array as PropType<any[] | string[]>,
|
|
49
147
|
required: false,
|
|
50
148
|
default: () => []
|
|
51
149
|
},
|
|
52
150
|
variant: {
|
|
53
|
-
type: String as PropType<
|
|
151
|
+
type: String as PropType<ChipGroupVariant>,
|
|
54
152
|
required: false,
|
|
55
|
-
default:
|
|
153
|
+
default: ChipGroupVariants.Wrap
|
|
56
154
|
},
|
|
57
155
|
chipVariant: {
|
|
58
|
-
type: String as PropType<
|
|
156
|
+
type: String as PropType<CardVariant>,
|
|
59
157
|
required: false,
|
|
60
|
-
default:
|
|
158
|
+
default: CardVariants.Full
|
|
61
159
|
},
|
|
62
160
|
color: {
|
|
63
161
|
type: String as PropType<ColorBase>,
|
|
64
162
|
required: false,
|
|
65
163
|
default: ColorEnum.Light
|
|
164
|
+
},
|
|
165
|
+
maxItems: {
|
|
166
|
+
type: Number as PropType<number | null>,
|
|
167
|
+
required: false,
|
|
168
|
+
default: null
|
|
66
169
|
}
|
|
170
|
+
},
|
|
171
|
+
setup(props) {
|
|
172
|
+
const { getColors } = useColors();
|
|
173
|
+
const menuOpen = ref(false);
|
|
174
|
+
|
|
175
|
+
const menuActivatorColor = computed((): string => {
|
|
176
|
+
return getColors(props.color).dark;
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
return {
|
|
180
|
+
menuActivatorColor,
|
|
181
|
+
ChipGroupVariants,
|
|
182
|
+
ColorEnum,
|
|
183
|
+
menuOpen
|
|
184
|
+
};
|
|
67
185
|
}
|
|
68
186
|
});
|
|
69
187
|
</script>
|