@dative-gpi/foundation-shared-components 0.0.229 → 0.1.68
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 +9 -10
- package/components/FSButton.vue +81 -31
- package/components/FSCalendar.vue +35 -33
- package/components/FSCalendarTwin.vue +77 -84
- package/components/FSCard.vue +29 -16
- package/components/FSCardPlaceholder.vue +1 -2
- package/components/FSCheckbox.vue +5 -7
- package/components/FSChip.vue +9 -11
- package/components/FSClickable.vue +67 -57
- package/components/FSClock.vue +4 -4
- package/components/FSCol.vue +2 -3
- package/components/FSColor.vue +13 -31
- package/components/FSColorIcon.vue +25 -9
- package/components/FSDialog.vue +1 -2
- package/components/FSDialogFormBody.vue +4 -4
- package/components/FSDialogMenu.vue +2 -4
- package/components/FSDialogMultiFormBody.vue +63 -50
- package/components/FSDialogRemove.vue +1 -0
- package/components/FSDialogSubmit.vue +5 -7
- package/components/FSDivider.vue +7 -9
- package/components/FSEditImage.vue +27 -274
- package/components/FSEditImageUI.vue +303 -0
- package/components/FSErrorToast.vue +3 -4
- package/components/FSFadeOut.vue +18 -13
- package/components/FSGrid.vue +6 -9
- package/components/FSGridMosaic.vue +1 -2
- package/components/FSIcon.vue +7 -8
- package/components/FSIconCard.vue +23 -30
- package/components/FSIconCheck.vue +1 -2
- package/components/FSImage.vue +21 -193
- package/components/FSImageCard.vue +2 -2
- package/components/FSImageUI.vue +212 -0
- package/components/FSLabel.vue +18 -20
- package/components/FSLink.vue +19 -21
- package/components/FSLoader.vue +10 -14
- package/components/FSOptionGroup.vue +58 -12
- package/components/FSPagination.vue +3 -5
- package/components/FSRadio.vue +5 -7
- package/components/FSRadioGroup.vue +2 -4
- package/components/FSRow.vue +3 -4
- package/components/FSSlideGroup.vue +15 -4
- package/components/FSSlider.vue +9 -11
- package/components/FSSpan.vue +11 -9
- package/components/FSSwitch.vue +65 -37
- package/components/FSTab.vue +2 -4
- package/components/FSTabs.vue +36 -16
- package/components/FSTag.vue +23 -14
- package/components/FSTagGroup.vue +3 -5
- package/components/FSText.vue +8 -12
- package/components/FSWindow.vue +11 -5
- package/components/FSWrapGroup.vue +15 -4
- package/components/agenda/FSAgenda.vue +204 -0
- package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
- package/components/agenda/FSAgendaHeader.vue +190 -0
- package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
- package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
- package/components/agenda/FSAgendaHoursCol.vue +103 -0
- package/components/agenda/FSAgendaHoursRow.vue +124 -0
- package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
- package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
- package/components/agenda/FSDayAgenda.vue +200 -0
- package/components/agenda/FSMonthAgenda.vue +257 -0
- package/components/agenda/FSSelectAgendaMode.vue +54 -0
- package/components/agenda/FSWeekAgenda.vue +328 -0
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
- package/components/autocompletes/FSAutocompleteTimeZone.vue +20 -38
- package/components/buttons/FSButtonCancelMini.vue +1 -0
- package/components/buttons/FSButtonCopy.vue +28 -0
- package/components/buttons/FSButtonCopyIcon.vue +28 -0
- package/components/buttons/FSButtonCopyLabel.vue +27 -0
- package/components/buttons/FSButtonCopyMini.vue +28 -0
- package/components/buttons/FSButtonDragIcon.vue +27 -0
- package/components/buttons/FSButtonDuplicateMini.vue +1 -0
- package/components/buttons/FSButtonEditMini.vue +1 -0
- package/components/buttons/FSButtonFileMini.vue +1 -0
- package/components/buttons/FSButtonNextMini.vue +1 -0
- package/components/buttons/FSButtonPreviousMini.vue +1 -0
- package/components/buttons/FSButtonRedoMini.vue +1 -0
- package/components/buttons/FSButtonRemoveMini.vue +1 -0
- package/components/buttons/FSButtonSaveMini.vue +1 -0
- package/components/buttons/FSButtonSearchMini.vue +1 -0
- package/components/buttons/FSButtonUndoMini.vue +1 -0
- package/components/buttons/FSButtonUpdateMini.vue +1 -0
- package/components/buttons/FSButtonValidateMini.vue +1 -0
- package/components/deviceOrganisations/FSConnectivity.vue +11 -1
- package/components/deviceOrganisations/FSConnectivityCard.vue +20 -49
- package/components/deviceOrganisations/FSStatus.vue +11 -1
- package/components/deviceOrganisations/FSStatusCard.vue +40 -60
- package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
- package/components/deviceOrganisations/FSStatusesRow.vue +10 -5
- package/components/deviceOrganisations/FSWorstAlert.vue +19 -13
- package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -47
- package/components/fields/FSAutocompleteField.vue +501 -323
- package/components/fields/FSAutocompleteTag.vue +100 -0
- package/components/fields/FSBaseField.vue +26 -16
- package/components/fields/FSColorField.vue +63 -55
- package/components/fields/FSCommentField.vue +93 -0
- package/components/fields/FSDateField.vue +2 -2
- package/components/fields/FSDateRangeField.vue +2 -2
- package/components/fields/FSDateTimeField.vue +4 -3
- package/components/fields/FSDateTimeRangeField.vue +7 -6
- package/components/fields/FSEntityFieldUI.vue +271 -0
- package/components/fields/FSGradientField.vue +27 -33
- package/components/fields/FSIconField.vue +2 -3
- package/components/fields/FSMagicConfigField.vue +28 -19
- package/components/fields/FSMagicField.vue +25 -17
- package/components/fields/FSNumberField.vue +9 -7
- package/components/fields/FSPasswordField.vue +2 -3
- package/components/fields/FSRichTextField.vue +32 -5
- package/components/fields/FSSearchField.vue +2 -2
- package/components/fields/FSSelectField.vue +483 -251
- package/components/fields/FSTagField.vue +4 -6
- package/components/fields/FSTermField.vue +25 -13
- package/components/fields/FSTextArea.vue +18 -6
- package/components/fields/FSTextField.vue +13 -10
- package/components/fields/FSTimeField.vue +1 -1
- package/components/fields/FSTimeSlotField.vue +3 -4
- package/components/fields/FSTimeStepField.vue +157 -0
- package/components/fields/FSTranslateField.vue +3 -2
- package/components/fields/FSTranslateRichTextField.vue +4 -3
- package/components/fields/FSTranslateTextArea.vue +233 -0
- package/components/fields/FSTreeViewField.vue +7 -9
- package/components/fields/periodicField/FSPeriodicDailyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicField.vue +131 -0
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +222 -0
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +120 -0
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +144 -0
- package/components/lists/FSDataIteratorItem.vue +8 -10
- package/components/lists/FSDataTableUI.vue +47 -39
- package/components/lists/FSFilterButton.vue +20 -22
- package/components/lists/FSHiddenButton.vue +10 -12
- package/components/lists/FSLoadDataTable.vue +4 -6
- package/components/lists/FSSimpleList.vue +229 -0
- package/components/map/FSMap.vue +256 -405
- package/components/map/FSMapFeatureGroup.vue +51 -0
- package/components/map/FSMapLayerButton.vue +6 -3
- package/components/map/FSMapMarker.vue +116 -0
- package/components/map/FSMapMarkerClusterGroup.vue +72 -0
- package/components/map/FSMapOverlay.vue +69 -83
- package/components/map/FSMapPolygon.vue +81 -0
- package/components/map/FSMapTileLayer.vue +50 -0
- package/components/map/keys.ts +4 -0
- package/components/selects/FSSelectAutoRefresh.vue +1 -1
- package/components/selects/FSSelectDashboardVariableType.vue +1 -1
- package/components/selects/FSSelectDateSetting.vue +3 -3
- package/components/selects/FSSelectDays.vue +1 -1
- package/components/selects/FSSelectListMode.vue +51 -0
- package/components/selects/FSSelectMonths.vue +67 -0
- package/components/tiles/FSChartTileUI.vue +116 -0
- package/components/tiles/FSCommentTileUI.vue +149 -0
- package/components/tiles/FSDashboardOrganisationTileUI.vue +6 -8
- package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +6 -8
- package/components/tiles/FSDashboardShallowTileUI.vue +6 -8
- package/components/tiles/FSDeviceOrganisationTileUI.vue +30 -18
- package/components/tiles/FSFolderTileUI.vue +6 -6
- package/components/tiles/FSGroupTileUI.vue +31 -22
- package/components/tiles/FSLoadTile.vue +5 -7
- package/components/tiles/FSLocationTileUI.vue +157 -0
- package/components/tiles/FSModelTileUI.vue +18 -0
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
- package/components/tiles/FSSimpleTileUI.vue +57 -36
- package/components/tiles/FSTile.vue +115 -55
- package/components/tiles/FSUserOrganisationTileUI.vue +25 -35
- package/components/toggleSets/FSToggleSetPosition.vue +1 -1
- package/components/views/FSEntityHeader.vue +343 -0
- package/components/views/FSEntityView.vue +163 -0
- package/components/views/FSListHeader.vue +83 -0
- package/components/views/FSListView.vue +83 -0
- package/components/views/FSSkeletonView.vue +100 -0
- package/composables/useAddress.ts +2 -2
- package/composables/useColors.ts +15 -5
- package/composables/useMagicFieldProvider.ts +7 -6
- package/composables/useSlots.ts +51 -28
- package/models/agenda.ts +9 -0
- package/models/deviceAlerts.ts +1 -1
- package/models/deviceConnectivities.ts +1 -1
- package/models/index.ts +1 -0
- package/models/magicFields.ts +1 -0
- package/models/map.ts +2 -2
- package/models/rules.ts +10 -5
- package/models/tables.ts +3 -1
- package/package.json +4 -4
- package/styles/components/fs_agenda.scss +32 -0
- package/styles/components/fs_agenda_event.scss +41 -0
- package/styles/components/fs_agenda_hours_col.scss +4 -0
- package/styles/components/fs_agenda_hours_row.scss +13 -0
- package/styles/components/fs_agenda_time_line_marker.scss +19 -0
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_clickable.scss +5 -3
- package/styles/components/fs_color_field.scss +1 -0
- package/styles/components/fs_data_table.scss +2 -0
- package/styles/components/fs_dialog.scss +11 -15
- package/styles/components/fs_edit_image.scss +8 -0
- package/styles/components/fs_fade_out.scss +2 -1
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_gradient_field.scss +11 -11
- package/styles/components/fs_magic_config_field.scss +2 -2
- package/styles/components/fs_map.scss +36 -30
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_radio.scss +11 -0
- package/styles/components/fs_rich_text_field.scss +2 -1
- package/styles/components/fs_search_field.scss +3 -0
- package/styles/components/fs_select_date_settings.scss +3 -0
- package/styles/components/fs_slide_group.scss +5 -0
- package/styles/components/fs_span.scss +2 -1
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +9 -0
- package/styles/components/fs_text_area.scss +15 -1
- package/styles/components/fs_tile.scss +22 -6
- package/styles/components/fs_window.scss +5 -0
- package/styles/components/fs_wrap_group.scss +4 -0
- package/styles/components/index.scss +6 -1
- package/styles/globals/overrides.scss +22 -19
- package/styles/globals/text_fonts.scss +17 -55
- package/tools/alertsTools.ts +54 -0
- package/tools/chartsTools.ts +300 -0
- package/tools/index.ts +2 -0
- package/utils/badge.ts +9 -0
- package/utils/filter.ts +18 -0
- package/utils/index.ts +2 -0
- package/utils/leafletMarkers.ts +8 -2
- package/utils/statuses.ts +1 -1
- package/utils/time.ts +27 -1
- package/components/autocompletes/FSAutocompleteTag.vue +0 -138
- package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
- package/styles/components/fs_map_overlay.scss +0 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSWrapGroup
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="props.variant === 'wrap'"
|
|
4
4
|
class="fs-option-group"
|
|
5
5
|
:padding="props.padding"
|
|
6
6
|
:gap="props.gap"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
/>
|
|
47
47
|
</FSWrapGroup>
|
|
48
48
|
<FSSlideGroup
|
|
49
|
-
v-else
|
|
49
|
+
v-else-if="props.variant === 'slide'"
|
|
50
50
|
class="fs-option-group"
|
|
51
51
|
:padding="props.padding"
|
|
52
52
|
:gap="props.gap"
|
|
@@ -91,10 +91,58 @@
|
|
|
91
91
|
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
92
92
|
/>
|
|
93
93
|
</FSSlideGroup>
|
|
94
|
+
<FSRow
|
|
95
|
+
v-else
|
|
96
|
+
class="fs-option-group-full-width"
|
|
97
|
+
width="100%"
|
|
98
|
+
:padding="props.padding"
|
|
99
|
+
:gap="props.gap"
|
|
100
|
+
:style="style"
|
|
101
|
+
:wrap="false"
|
|
102
|
+
>
|
|
103
|
+
<template
|
|
104
|
+
v-if="props.values.length"
|
|
105
|
+
>
|
|
106
|
+
<template
|
|
107
|
+
v-if="!$slots.item"
|
|
108
|
+
>
|
|
109
|
+
<FSOptionItem
|
|
110
|
+
v-for="(item, index) in props.values"
|
|
111
|
+
:padding="props.optionPadding"
|
|
112
|
+
:editable="props.editable"
|
|
113
|
+
:prependIcon="item.prependIcon"
|
|
114
|
+
:appendIcon="item.appendIcon"
|
|
115
|
+
:variant="getVariant(item)"
|
|
116
|
+
:color="getColor(item)"
|
|
117
|
+
:class="getClass(item)"
|
|
118
|
+
:label="item.label"
|
|
119
|
+
:icon="item.icon"
|
|
120
|
+
:key="index"
|
|
121
|
+
@click="toggle(item)"
|
|
122
|
+
/>
|
|
123
|
+
</template>
|
|
124
|
+
<template
|
|
125
|
+
v-else
|
|
126
|
+
>
|
|
127
|
+
<template
|
|
128
|
+
v-for="item in props.values"
|
|
129
|
+
>
|
|
130
|
+
<slot
|
|
131
|
+
name="item"
|
|
132
|
+
v-bind="{ item, toggle, getVariant, getColor, getClass }"
|
|
133
|
+
/>
|
|
134
|
+
</template>
|
|
135
|
+
</template>
|
|
136
|
+
</template>
|
|
137
|
+
<slot
|
|
138
|
+
v-else
|
|
139
|
+
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
140
|
+
/>
|
|
141
|
+
</FSRow>
|
|
94
142
|
</template>
|
|
95
143
|
|
|
96
144
|
<script lang="ts">
|
|
97
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
145
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
98
146
|
|
|
99
147
|
import { type ColorBase, ColorEnum, type FSToggle } from "@dative-gpi/foundation-shared-components/models";
|
|
100
148
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -128,7 +176,7 @@ export default defineComponent({
|
|
|
128
176
|
default: "4px"
|
|
129
177
|
},
|
|
130
178
|
variant: {
|
|
131
|
-
type: String as PropType<"wrap" | "slide">,
|
|
179
|
+
type: String as PropType<"wrap" | "slide" | "fullwidth">,
|
|
132
180
|
required: false,
|
|
133
181
|
default: "wrap"
|
|
134
182
|
},
|
|
@@ -211,14 +259,12 @@ export default defineComponent({
|
|
|
211
259
|
const backgrounds = getColors(ColorEnum.Background);
|
|
212
260
|
const colors = getColors(props.optionColor);
|
|
213
261
|
|
|
214
|
-
const style = computed(():
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
};
|
|
221
|
-
});
|
|
262
|
+
const style = computed((): StyleValue => ({
|
|
263
|
+
"--fs-option-group-background-color": backgrounds.base,
|
|
264
|
+
"--fs-option-group-border-size" : props.border ? "1px" : "0",
|
|
265
|
+
"--fs-option-group-border-radius" : sizeToVar(props.borderRadius),
|
|
266
|
+
"--fs-option-group-border-color" : lights.base
|
|
267
|
+
}));
|
|
222
268
|
|
|
223
269
|
const getVariant = (value: FSToggle): "standard" | "background" | "full" => {
|
|
224
270
|
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
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<FSSpan
|
|
50
50
|
v-if="$props.description"
|
|
51
51
|
class="fs-radio-description"
|
|
52
|
-
font="text-
|
|
52
|
+
font="text-overline"
|
|
53
53
|
:style="style"
|
|
54
54
|
>
|
|
55
55
|
{{ $props.description }}
|
|
@@ -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";
|
|
@@ -60,6 +59,16 @@ export default defineComponent({
|
|
|
60
59
|
FSButton
|
|
61
60
|
},
|
|
62
61
|
props: {
|
|
62
|
+
height: {
|
|
63
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
|
+
required: false,
|
|
65
|
+
default: "fit-content"
|
|
66
|
+
},
|
|
67
|
+
width: {
|
|
68
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
69
|
+
required: false,
|
|
70
|
+
default: "fit-content"
|
|
71
|
+
},
|
|
63
72
|
padding: {
|
|
64
73
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
65
74
|
required: false,
|
|
@@ -89,11 +98,13 @@ export default defineComponent({
|
|
|
89
98
|
|
|
90
99
|
const elementId = `id${uuidv4()}`;
|
|
91
100
|
|
|
92
|
-
const style = computed(():
|
|
101
|
+
const style = computed((): StyleValue => ({
|
|
93
102
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
94
103
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
95
104
|
"--fs-group-color" : darks.soft,
|
|
96
|
-
"--fs-group-hover-color" : darks.dark
|
|
105
|
+
"--fs-group-hover-color" : darks.dark,
|
|
106
|
+
"--fs-group-width" : sizeToVar(props.width),
|
|
107
|
+
"--fs-group-height" : sizeToVar(props.height)
|
|
97
108
|
}));
|
|
98
109
|
|
|
99
110
|
const nextClasses = computed((): string[] => {
|
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
|
>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<FSSpan
|
|
55
55
|
v-if="$props.description"
|
|
56
56
|
class="fs-slider-description"
|
|
57
|
-
font="text-
|
|
57
|
+
font="text-overline"
|
|
58
58
|
:style="style"
|
|
59
59
|
>
|
|
60
60
|
{{ $props.description }}
|
|
@@ -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
|
|
|
@@ -25,7 +24,7 @@ export default defineComponent({
|
|
|
25
24
|
default: null
|
|
26
25
|
},
|
|
27
26
|
font: {
|
|
28
|
-
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline"
|
|
27
|
+
type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline">,
|
|
29
28
|
required: false,
|
|
30
29
|
default: "text-body"
|
|
31
30
|
},
|
|
@@ -38,11 +37,20 @@ export default defineComponent({
|
|
|
38
37
|
type: Boolean,
|
|
39
38
|
required: false,
|
|
40
39
|
default: true
|
|
40
|
+
},
|
|
41
|
+
align: {
|
|
42
|
+
type: String as PropType<"left" | "center" | "right">,
|
|
43
|
+
required: false,
|
|
44
|
+
default: "left"
|
|
41
45
|
}
|
|
42
46
|
},
|
|
43
47
|
setup(props) {
|
|
44
48
|
const { slots } = useSlots();
|
|
45
49
|
|
|
50
|
+
const style = computed((): StyleValue => ({
|
|
51
|
+
"--fs-span-line-clamp": props.lineClamp.toString()
|
|
52
|
+
}));
|
|
53
|
+
|
|
46
54
|
const classes = computed((): string[] => {
|
|
47
55
|
const classNames = ["fs-span", props.font];
|
|
48
56
|
if (!slots.default) {
|
|
@@ -57,12 +65,6 @@ export default defineComponent({
|
|
|
57
65
|
return classNames;
|
|
58
66
|
});
|
|
59
67
|
|
|
60
|
-
const style = computed((): { [key: string] : string | null | undefined } => {
|
|
61
|
-
return {
|
|
62
|
-
"--fs-span-line-clamp": props.lineClamp.toString()
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
|
|
66
68
|
return {
|
|
67
69
|
classes,
|
|
68
70
|
style
|
package/components/FSSwitch.vue
CHANGED
|
@@ -1,57 +1,80 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSRow
|
|
3
3
|
width="hug"
|
|
4
|
+
align="top-left"
|
|
5
|
+
gap="16px"
|
|
6
|
+
padding="8px 0px"
|
|
7
|
+
:wrap="false"
|
|
4
8
|
>
|
|
9
|
+
<v-switch
|
|
10
|
+
v-if="variant == 'left'"
|
|
11
|
+
class="fs-switch"
|
|
12
|
+
hide-details
|
|
13
|
+
inset
|
|
14
|
+
:validateOn="validateOn"
|
|
15
|
+
:rules="$props.rules"
|
|
16
|
+
:ripple="false"
|
|
17
|
+
:style="style"
|
|
18
|
+
:modelValue="$props.modelValue"
|
|
19
|
+
@update:modelValue="onToggle"
|
|
20
|
+
v-bind="$attrs"
|
|
21
|
+
/>
|
|
22
|
+
<slot>
|
|
23
|
+
<FSCol
|
|
24
|
+
width="hug"
|
|
25
|
+
v-if="$props.label || $props.description || $slots.description"
|
|
26
|
+
>
|
|
27
|
+
<FSSpan
|
|
28
|
+
v-if="$props.label"
|
|
29
|
+
class="fs-switch-label"
|
|
30
|
+
:style="style"
|
|
31
|
+
:font="font"
|
|
32
|
+
@click.stop="onToggle"
|
|
33
|
+
>
|
|
34
|
+
{{ $props.label }}
|
|
35
|
+
</FSSpan>
|
|
36
|
+
<slot
|
|
37
|
+
name="description"
|
|
38
|
+
>
|
|
39
|
+
<FSSpan
|
|
40
|
+
v-if="$props.description"
|
|
41
|
+
class="fs-switch-description"
|
|
42
|
+
font="text-overline"
|
|
43
|
+
:style="style"
|
|
44
|
+
>
|
|
45
|
+
{{ $props.description }}
|
|
46
|
+
</FSSpan>
|
|
47
|
+
</slot>
|
|
48
|
+
<slot
|
|
49
|
+
name="footer"
|
|
50
|
+
/>
|
|
51
|
+
</FSCol>
|
|
52
|
+
</slot>
|
|
5
53
|
<FSRow
|
|
6
|
-
|
|
7
|
-
align="center-
|
|
54
|
+
v-if="variant == 'right'"
|
|
55
|
+
align="center-right"
|
|
8
56
|
>
|
|
9
57
|
<v-switch
|
|
10
58
|
class="fs-switch"
|
|
11
59
|
hide-details
|
|
12
60
|
inset
|
|
13
|
-
:style="style"
|
|
14
|
-
:ripple="false"
|
|
15
|
-
:rules="$props.rules"
|
|
16
61
|
:validateOn="validateOn"
|
|
62
|
+
:rules="$props.rules"
|
|
63
|
+
:ripple="false"
|
|
64
|
+
:style="style"
|
|
17
65
|
:modelValue="$props.modelValue"
|
|
18
66
|
@update:modelValue="onToggle"
|
|
19
67
|
v-bind="$attrs"
|
|
20
68
|
/>
|
|
21
|
-
<slot>
|
|
22
|
-
<FSSpan
|
|
23
|
-
v-if="$props.label"
|
|
24
|
-
class="fs-switch-label"
|
|
25
|
-
:style="style"
|
|
26
|
-
:font="font"
|
|
27
|
-
@click.stop="onToggle"
|
|
28
|
-
>
|
|
29
|
-
{{ $props.label }}
|
|
30
|
-
</FSSpan>
|
|
31
|
-
</slot>
|
|
32
69
|
</FSRow>
|
|
33
|
-
|
|
34
|
-
name="description"
|
|
35
|
-
>
|
|
36
|
-
<FSSpan
|
|
37
|
-
v-if="$props.description"
|
|
38
|
-
class="fs-switch-description"
|
|
39
|
-
font="text-underline"
|
|
40
|
-
:style="style"
|
|
41
|
-
>
|
|
42
|
-
{{ $props.description }}
|
|
43
|
-
</FSSpan>
|
|
44
|
-
</slot>
|
|
45
|
-
</FSCol>
|
|
70
|
+
</FSRow>
|
|
46
71
|
</template>
|
|
47
72
|
|
|
48
73
|
<script lang="ts">
|
|
49
|
-
import type
|
|
50
|
-
import { computed, defineComponent } from "vue";
|
|
74
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
51
75
|
|
|
76
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
52
77
|
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
78
|
|
|
56
79
|
import FSSpan from "./FSSpan.vue";
|
|
57
80
|
import FSCol from "./FSCol.vue";
|
|
@@ -76,10 +99,15 @@ export default defineComponent({
|
|
|
76
99
|
default: null
|
|
77
100
|
},
|
|
78
101
|
modelValue: {
|
|
79
|
-
type: Boolean
|
|
102
|
+
type: Boolean as PropType<boolean | null>,
|
|
80
103
|
required: false,
|
|
81
104
|
default: false
|
|
82
105
|
},
|
|
106
|
+
variant: {
|
|
107
|
+
type: String as PropType<"left" | "right">,
|
|
108
|
+
required: false,
|
|
109
|
+
default: "left"
|
|
110
|
+
},
|
|
83
111
|
color: {
|
|
84
112
|
type: String as PropType<ColorBase>,
|
|
85
113
|
required: false,
|
|
@@ -112,7 +140,7 @@ export default defineComponent({
|
|
|
112
140
|
const lights = getColors(ColorEnum.Light);
|
|
113
141
|
const darks = getColors(ColorEnum.Dark);
|
|
114
142
|
|
|
115
|
-
const style = computed(():
|
|
143
|
+
const style = computed((): StyleValue => {
|
|
116
144
|
if (!props.editable) {
|
|
117
145
|
return {
|
|
118
146
|
"--fs-switch-translate-x": props.modelValue ? "8px" : "-8px",
|
|
@@ -140,7 +168,7 @@ export default defineComponent({
|
|
|
140
168
|
};
|
|
141
169
|
});
|
|
142
170
|
|
|
143
|
-
const font = computed(():
|
|
171
|
+
const font = computed((): "text-button" | "text-body" => props.modelValue ? "text-button" : "text-body");
|
|
144
172
|
|
|
145
173
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
146
174
|
|
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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:style="style"
|
|
8
8
|
:grow="true"
|
|
9
9
|
:modelValue="$props.tab"
|
|
10
|
-
@update:modelValue="
|
|
10
|
+
@update:modelValue="onUpdateTab($event)"
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
>
|
|
13
13
|
<slot/>
|
|
@@ -15,18 +15,17 @@
|
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import type
|
|
19
|
-
import {
|
|
18
|
+
import { computed, defineComponent, onMounted, type PropType, type StyleValue } from "vue";
|
|
19
|
+
import { useRouter } from "vue-router";
|
|
20
20
|
|
|
21
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
22
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
22
|
-
import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
|
|
23
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
24
23
|
|
|
25
24
|
export default defineComponent({
|
|
26
25
|
name: "FSTabs",
|
|
27
26
|
props: {
|
|
28
27
|
tab: {
|
|
29
|
-
type: Number,
|
|
28
|
+
type: [String, Number, Object] as PropType<any>,
|
|
30
29
|
required: false,
|
|
31
30
|
default: 0
|
|
32
31
|
},
|
|
@@ -34,27 +33,48 @@ export default defineComponent({
|
|
|
34
33
|
type: String as PropType<ColorBase>,
|
|
35
34
|
required: false,
|
|
36
35
|
default: ColorEnum.Primary
|
|
36
|
+
},
|
|
37
|
+
recordNavigation: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
required: false,
|
|
40
|
+
default: false
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
|
-
|
|
43
|
+
emits: ["update:tab"],
|
|
44
|
+
setup(props, { emit }) {
|
|
40
45
|
const { getColors } = useColors();
|
|
46
|
+
const router = useRouter();
|
|
41
47
|
|
|
42
48
|
const colors = computed(() => getColors(props.color));
|
|
43
49
|
const lights = getColors(ColorEnum.Light);
|
|
44
50
|
const darks = getColors(ColorEnum.Dark);
|
|
45
51
|
|
|
46
|
-
const style = computed(():
|
|
47
|
-
"--fs-group-color"
|
|
48
|
-
"--fs-group-hover-color"
|
|
49
|
-
"--fs-tab-border-color"
|
|
50
|
-
"--fs-tab-hover-border-color"
|
|
51
|
-
"--fs-tab-active-background-color"
|
|
52
|
-
"--fs-tab-tag-background-color"
|
|
53
|
-
"--fs-tab-tag-color"
|
|
52
|
+
const style = computed((): StyleValue => ({
|
|
53
|
+
"--fs-group-color" : darks.soft,
|
|
54
|
+
"--fs-group-hover-color" : darks.dark,
|
|
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
|
+
"--fs-tab-tag-background-color" : colors.value.base,
|
|
59
|
+
"--fs-tab-tag-color" : colors.value.baseContrast!
|
|
54
60
|
}));
|
|
55
61
|
|
|
62
|
+
const onUpdateTab = (tab: number): void => {
|
|
63
|
+
if (props.recordNavigation) {
|
|
64
|
+
router.replace({ query: { tab: tab.toString() } });
|
|
65
|
+
}
|
|
66
|
+
emit("update:tab", tab);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
onMounted((): void => {
|
|
70
|
+
if (props.recordNavigation && router.currentRoute.value.query.tab) {
|
|
71
|
+
emit("update:tab", router.currentRoute.value.query.tab);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
56
75
|
return {
|
|
57
|
-
style
|
|
76
|
+
style,
|
|
77
|
+
onUpdateTab
|
|
58
78
|
};
|
|
59
79
|
}
|
|
60
80
|
});
|