@dative-gpi/foundation-shared-components 0.0.118 → 0.1.120
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/FSBreadcrumbs.vue +1 -1
- package/components/FSButton.vue +1 -1
- package/components/FSChip.vue +1 -1
- package/components/FSClickable.vue +2 -2
- package/components/FSClock.vue +1 -7
- package/components/FSCol.vue +1 -1
- package/components/FSDialogForm.vue +141 -52
- package/components/FSDialogMultiForm.vue +39 -40
- package/components/FSDialogRemove.vue +2 -2
- package/components/FSDialogSubmit.vue +44 -39
- package/components/FSDivider.vue +1 -1
- package/components/FSSlideGroup.vue +1 -1
- package/components/FSTabs.vue +12 -12
- package/components/FSTagGroup.vue +28 -5
- package/components/FSText.vue +1 -1
- package/components/FSWrapGroup.vue +1 -1
- package/components/deviceOrganisations/FSStatusCard.vue +0 -1
- package/components/fields/FSAutocompleteField.vue +284 -106
- package/components/fields/FSDateRangeField.vue +2 -2
- package/components/fields/FSDateTimeRangeField.vue +5 -11
- package/components/fields/FSSelectField.vue +11 -3
- package/components/fields/FSTagField.vue +2 -2
- package/components/fields/FSTermField.vue +3 -1
- package/components/lists/FSDataTableUI.vue +1 -0
- package/components/tiles/FSDeviceOrganisationTileUI.vue +1 -1
- package/components/tiles/FSGroupTileUI.vue +1 -1
- package/components/tiles/FSSimpleIconTileUI.vue +1 -1
- package/components/tiles/FSUserOrganisationTileUI.vue +2 -2
- package/composables/useColors.ts +39 -49
- package/package.json +4 -4
- package/styles/components/fs_data_table.scss +100 -94
- package/styles/components/fs_dialog.scss +4 -3
- package/styles/components/fs_dialog_menu.scss +2 -2
- package/styles/components/fs_slider.scss +9 -1
- package/styles/components/fs_tabs.scss +5 -4
- package/styles/globals/overrides.scss +2 -2
- package/styles/globals/scrollbars.scss +46 -36
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDialog
|
|
3
|
-
:title="$props.title"
|
|
4
3
|
:subtitle="$props.subtitle"
|
|
4
|
+
:title="$props.title"
|
|
5
5
|
:width="$props.width"
|
|
6
6
|
:modelValue="$props.modelValue"
|
|
7
7
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -36,21 +36,22 @@
|
|
|
36
36
|
:wrap="false"
|
|
37
37
|
>
|
|
38
38
|
<FSButton
|
|
39
|
-
:prependIcon="$props.
|
|
40
|
-
:
|
|
41
|
-
:
|
|
42
|
-
:
|
|
43
|
-
:
|
|
44
|
-
@click="
|
|
39
|
+
:prependIcon="$props.cancelButtonPrependIcon"
|
|
40
|
+
:appendIcon="$props.cancelButtonAppendIcon"
|
|
41
|
+
:variant="$props.cancelButtonVariant"
|
|
42
|
+
:color="$props.cancelButtonColor"
|
|
43
|
+
:label="cancelLabel"
|
|
44
|
+
@click="$emit('update:modelValue', false)"
|
|
45
45
|
/>
|
|
46
46
|
<FSButton
|
|
47
|
-
:prependIcon="$props.
|
|
48
|
-
:
|
|
49
|
-
:
|
|
50
|
-
:
|
|
51
|
-
:color="$props.rightButtonColor"
|
|
47
|
+
:prependIcon="$props.submitButtonPrependIcon"
|
|
48
|
+
:appendIcon="$props.submitButtonAppendIcon"
|
|
49
|
+
:variant="$props.submitButtonVariant"
|
|
50
|
+
:color="$props.submitButtonColor"
|
|
52
51
|
:editable="$props.editable"
|
|
53
|
-
|
|
52
|
+
:label="submitLabel"
|
|
53
|
+
:load="$props.load"
|
|
54
|
+
@click="$emit('click:submitButton')"
|
|
54
55
|
/>
|
|
55
56
|
</FSRow>
|
|
56
57
|
</FSRow>
|
|
@@ -100,55 +101,60 @@ export default defineComponent({
|
|
|
100
101
|
required: false,
|
|
101
102
|
default: false
|
|
102
103
|
},
|
|
103
|
-
|
|
104
|
+
cancelButtonPrependIcon: {
|
|
104
105
|
type: String as PropType<string | null>,
|
|
105
106
|
required: false,
|
|
106
107
|
default: null
|
|
107
108
|
},
|
|
108
|
-
|
|
109
|
+
cancelButtonLabel: {
|
|
109
110
|
type: String as PropType<string | null>,
|
|
110
111
|
required: false,
|
|
111
112
|
default: null
|
|
112
113
|
},
|
|
113
|
-
|
|
114
|
+
cancelButtonAppendIcon: {
|
|
114
115
|
type: String as PropType<string | null>,
|
|
115
116
|
required: false,
|
|
116
117
|
default: null
|
|
117
118
|
},
|
|
118
|
-
|
|
119
|
+
cancelButtonVariant: {
|
|
119
120
|
type: String as PropType<"standard" | "full" | "icon">,
|
|
120
121
|
required: false,
|
|
121
122
|
default: "standard"
|
|
122
123
|
},
|
|
123
|
-
|
|
124
|
+
cancelButtonColor: {
|
|
125
|
+
type: String as PropType<ColorBase>,
|
|
126
|
+
required: false,
|
|
127
|
+
default: ColorEnum.Light
|
|
128
|
+
},
|
|
129
|
+
submitButtonPrependIcon: {
|
|
124
130
|
type: String as PropType<string | null>,
|
|
125
131
|
required: false,
|
|
126
132
|
default: null
|
|
127
133
|
},
|
|
128
|
-
|
|
134
|
+
submitButtonLabel: {
|
|
129
135
|
type: String as PropType<string | null>,
|
|
130
136
|
required: false,
|
|
131
137
|
default: null
|
|
132
138
|
},
|
|
133
|
-
|
|
139
|
+
submitButtonAppendIcon: {
|
|
134
140
|
type: String as PropType<string | null>,
|
|
135
141
|
required: false,
|
|
136
142
|
default: null
|
|
137
143
|
},
|
|
138
|
-
|
|
144
|
+
submitButtonVariant: {
|
|
139
145
|
type: String as PropType<"standard" | "full" | "icon">,
|
|
140
146
|
required: false,
|
|
141
147
|
default: "full"
|
|
142
148
|
},
|
|
143
|
-
|
|
149
|
+
submitButtonColor: {
|
|
144
150
|
type: String as PropType<ColorBase>,
|
|
145
151
|
required: false,
|
|
146
|
-
default: ColorEnum.
|
|
152
|
+
default: ColorEnum.Primary
|
|
147
153
|
},
|
|
148
|
-
|
|
149
|
-
type:
|
|
154
|
+
load: {
|
|
155
|
+
type: Boolean,
|
|
150
156
|
required: false,
|
|
151
|
-
default:
|
|
157
|
+
default: false
|
|
152
158
|
},
|
|
153
159
|
editable: {
|
|
154
160
|
type: Boolean,
|
|
@@ -156,31 +162,30 @@ export default defineComponent({
|
|
|
156
162
|
default: true
|
|
157
163
|
}
|
|
158
164
|
},
|
|
159
|
-
emits: ["update:modelValue", "click:
|
|
165
|
+
emits: ["update:modelValue", "click:submitButton"],
|
|
160
166
|
setup(props) {
|
|
161
167
|
const { isMobileSized } = useBreakpoints();
|
|
162
168
|
const { $tr } = useTranslationsProvider();
|
|
163
169
|
|
|
164
170
|
const height = computed(() => {
|
|
165
|
-
const other = 24 + 24
|
|
166
|
-
+ (
|
|
167
|
-
+ (props.subtitle ? isMobileSized.value ? 14
|
|
168
|
-
+ (isMobileSized.value ? 36 : 40)
|
|
169
|
-
|
|
170
|
-
return `calc(90vh - ${other}px)`;
|
|
171
|
+
const other = 24 + 24 // Paddings
|
|
172
|
+
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
173
|
+
+ (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
|
|
174
|
+
+ (isMobileSized.value ? 36 : 40) + 24; // Footer
|
|
175
|
+
return `calc(100vh - 40px - ${other}px)`;
|
|
171
176
|
});
|
|
172
177
|
|
|
173
|
-
const
|
|
174
|
-
return props.
|
|
178
|
+
const cancelLabel = computed(() => {
|
|
179
|
+
return props.cancelButtonLabel ?? $tr("ui.button.cancel", "Cancel");
|
|
175
180
|
});
|
|
176
181
|
|
|
177
|
-
const
|
|
178
|
-
return props.
|
|
182
|
+
const submitLabel = computed(() => {
|
|
183
|
+
return props.submitButtonLabel ?? $tr("ui.button.validate", "Validate");
|
|
179
184
|
});
|
|
180
185
|
|
|
181
186
|
return {
|
|
182
|
-
|
|
183
|
-
|
|
187
|
+
cancelLabel,
|
|
188
|
+
submitLabel,
|
|
184
189
|
ColorEnum,
|
|
185
190
|
height
|
|
186
191
|
};
|
package/components/FSDivider.vue
CHANGED
|
@@ -91,7 +91,7 @@ export default defineComponent({
|
|
|
91
91
|
const style = computed((): { [key: string] : string | null | undefined } => ({
|
|
92
92
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
93
93
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
94
|
-
"--fs-group-color" : darks.
|
|
94
|
+
"--fs-group-color" : darks.soft,
|
|
95
95
|
"--fs-group-hover-color" : darks.dark
|
|
96
96
|
}));
|
|
97
97
|
|
package/components/FSTabs.vue
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-tabs
|
|
3
|
-
class="fs-tabs"
|
|
4
3
|
selectedClass="fs-tab-active"
|
|
5
|
-
|
|
6
|
-
:style="style"
|
|
7
|
-
:showArrows="true"
|
|
4
|
+
class="fs-tabs"
|
|
8
5
|
:sliderColor="$props.color"
|
|
6
|
+
:showArrows="true"
|
|
7
|
+
:style="style"
|
|
8
|
+
:grow="true"
|
|
9
9
|
:modelValue="$props.tab"
|
|
10
|
-
@update:modelValue="
|
|
10
|
+
@update:modelValue="$emit('update:tab', $event)"
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
>
|
|
13
13
|
<template
|
|
14
|
-
v-for="component in getChildren()"
|
|
14
|
+
v-for="(component, index) in getChildren()"
|
|
15
|
+
:key="index"
|
|
15
16
|
>
|
|
16
17
|
<component
|
|
17
18
|
:is="component"
|
|
@@ -45,16 +46,15 @@ export default defineComponent({
|
|
|
45
46
|
const { getColors } = useColors();
|
|
46
47
|
|
|
47
48
|
const colors = computed(() => getColors(props.color));
|
|
49
|
+
const lights = getColors(ColorEnum.Light);
|
|
48
50
|
const darks = getColors(ColorEnum.Dark);
|
|
49
51
|
|
|
50
52
|
const style = computed((): { [key: string] : string | null | undefined } => ({
|
|
51
|
-
"--fs-group-color" : darks.
|
|
52
|
-
"--fs-group-disabled-color" : darks.light,
|
|
53
|
-
"--fs-group-hover-background-color": colors.value.light,
|
|
53
|
+
"--fs-group-color" : darks.soft,
|
|
54
54
|
"--fs-group-hover-color" : darks.dark,
|
|
55
|
-
"--fs-
|
|
56
|
-
"--fs-
|
|
57
|
-
"--fs-
|
|
55
|
+
"--fs-tab-border-color" : lights.dark,
|
|
56
|
+
"--fs-tab-hover-border-color" : darks.dark,
|
|
57
|
+
"--fs-tab-active-background-color" : colors.value.light,
|
|
58
58
|
"--fs-tab-tag-background-color" : colors.value.base,
|
|
59
59
|
"--fs-tab-tag-color" : colors.value.baseContrast
|
|
60
60
|
}));
|
|
@@ -1,16 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FSWrapGroup
|
|
2
|
+
<FSWrapGroup
|
|
3
|
+
v-if="$props.variant === 'wrap'"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
>
|
|
3
6
|
<FSTag
|
|
4
7
|
v-for="(tag, index) in $props.tags"
|
|
5
|
-
:
|
|
6
|
-
:label="tag"
|
|
7
|
-
:variant="$props.variant"
|
|
8
|
-
:color="$props.color"
|
|
8
|
+
:variant="$props.tagVariant"
|
|
9
9
|
:editable="$props.editable"
|
|
10
|
+
:color="$props.color"
|
|
11
|
+
:label="tag"
|
|
12
|
+
:key="index"
|
|
10
13
|
@remove="() => $emit('remove', tag)"
|
|
11
14
|
/>
|
|
12
15
|
<slot />
|
|
13
16
|
</FSWrapGroup>
|
|
17
|
+
<FSSlideGroup
|
|
18
|
+
v-if="$props.variant === 'slide'"
|
|
19
|
+
v-bind="$attrs"
|
|
20
|
+
>
|
|
21
|
+
<FSTag
|
|
22
|
+
v-for="(tag, index) in $props.tags"
|
|
23
|
+
:variant="$props.tagVariant"
|
|
24
|
+
:editable="$props.editable"
|
|
25
|
+
:color="$props.color"
|
|
26
|
+
:label="tag"
|
|
27
|
+
:key="index"
|
|
28
|
+
@remove="() => $emit('remove', tag)"
|
|
29
|
+
/>
|
|
30
|
+
<slot />
|
|
31
|
+
</FSSlideGroup>
|
|
14
32
|
</template>
|
|
15
33
|
|
|
16
34
|
<script lang="ts">
|
|
@@ -34,6 +52,11 @@ export default defineComponent({
|
|
|
34
52
|
default: () => []
|
|
35
53
|
},
|
|
36
54
|
variant: {
|
|
55
|
+
type: String as PropType<"wrap" | "slide">,
|
|
56
|
+
required: false,
|
|
57
|
+
default: "wrap"
|
|
58
|
+
},
|
|
59
|
+
tagVariant: {
|
|
37
60
|
type: String as PropType<"standard" | "full">,
|
|
38
61
|
required: false,
|
|
39
62
|
default: "full"
|
package/components/FSText.vue
CHANGED
|
@@ -45,7 +45,7 @@ export default defineComponent({
|
|
|
45
45
|
default: ColorEnum.Dark
|
|
46
46
|
},
|
|
47
47
|
variant: {
|
|
48
|
-
type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
48
|
+
type: String as PropType<"base" | "baseContrast" | "light" | "lightContrast" | "dark" | "darkContrast" | "soft" | "softContrast">,
|
|
49
49
|
required: false,
|
|
50
50
|
default: "base"
|
|
51
51
|
}
|
|
@@ -54,7 +54,7 @@ export default defineComponent({
|
|
|
54
54
|
const style = computed((): { [key: string] : string | null | undefined } => ({
|
|
55
55
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
56
56
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
57
|
-
"--fs-group-color" : darks.
|
|
57
|
+
"--fs-group-color" : darks.soft,
|
|
58
58
|
"--fs-group-hover-color": darks.dark
|
|
59
59
|
}));
|
|
60
60
|
|