@dative-gpi/foundation-shared-components 0.1.120 → 1.0.0

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.
Files changed (196) hide show
  1. package/assets/images/map/imagery.png +0 -0
  2. package/assets/images/map/map.png +0 -0
  3. package/components/FSAccordion.vue +2 -1
  4. package/components/FSAccordionPanel.vue +20 -1
  5. package/components/FSBadge.vue +7 -3
  6. package/components/FSBreadcrumbs.vue +4 -2
  7. package/components/FSButton.vue +15 -8
  8. package/components/FSCalendar.vue +5 -2
  9. package/components/FSCalendarTwin.vue +6 -3
  10. package/components/FSCard.vue +4 -2
  11. package/components/FSCardPlaceholder.vue +80 -0
  12. package/components/FSCheckbox.vue +10 -7
  13. package/components/FSChip.vue +4 -2
  14. package/components/FSClickable.vue +5 -3
  15. package/components/FSClock.vue +18 -4
  16. package/components/FSCol.vue +12 -5
  17. package/components/FSColor.vue +4 -2
  18. package/components/FSColorIcon.vue +5 -3
  19. package/components/FSDialog.vue +28 -87
  20. package/components/FSDialogContent.vue +133 -0
  21. package/components/FSDialogForm.vue +25 -236
  22. package/components/FSDialogFormBody.vue +273 -0
  23. package/components/FSDialogMenu.vue +5 -2
  24. package/components/FSDialogMultiForm.vue +21 -197
  25. package/components/FSDialogMultiFormBody.vue +231 -0
  26. package/components/FSDialogSubmit.vue +4 -2
  27. package/components/FSDivider.vue +6 -4
  28. package/components/FSEditImage.vue +16 -9
  29. package/components/FSErrorToast.vue +2 -1
  30. package/components/FSFadeOut.vue +1 -1
  31. package/components/FSForm.vue +7 -7
  32. package/components/FSGrid.vue +4 -2
  33. package/components/FSGridMosaic.vue +3 -2
  34. package/components/FSIcon.vue +3 -2
  35. package/components/FSIconCard.vue +10 -3
  36. package/components/FSIconCheck.vue +2 -1
  37. package/components/FSIconFlag.vue +2 -1
  38. package/components/FSImage.vue +2 -1
  39. package/components/FSImageCard.vue +72 -0
  40. package/components/FSLabel.vue +4 -2
  41. package/components/FSLink.vue +5 -3
  42. package/components/FSLoader.vue +2 -1
  43. package/components/FSOptionGroup.vue +28 -20
  44. package/components/FSOptionItem.vue +8 -18
  45. package/components/FSPagination.vue +4 -2
  46. package/components/FSRadio.vue +23 -11
  47. package/components/FSRadioGroup.vue +23 -10
  48. package/components/FSRow.vue +8 -1
  49. package/components/FSSlideGroup.vue +27 -6
  50. package/components/FSSlider.vue +4 -2
  51. package/components/FSSpan.vue +2 -1
  52. package/components/FSSwitch.vue +13 -10
  53. package/components/FSTab.vue +4 -2
  54. package/components/FSTabs.vue +5 -14
  55. package/components/FSTag.vue +11 -4
  56. package/components/FSTagGroup.vue +4 -2
  57. package/components/FSText.vue +4 -2
  58. package/components/FSToggleSet.vue +30 -17
  59. package/components/FSTooltip.vue +15 -4
  60. package/components/FSWindow.vue +2 -2
  61. package/components/FSWrapGroup.vue +2 -1
  62. package/components/autocompletes/FSAutoCompleteAddress.vue +104 -0
  63. package/components/autocompletes/FSAutocompleteLanguage.vue +18 -26
  64. package/components/autocompletes/FSAutocompleteTag.vue +138 -0
  65. package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -30
  66. package/components/buttons/FSButtonAdd.vue +28 -0
  67. package/components/buttons/FSButtonAddIcon.vue +28 -0
  68. package/components/buttons/FSButtonAddLabel.vue +27 -0
  69. package/components/buttons/FSButtonAddMini.vue +27 -0
  70. package/components/buttons/FSButtonFile.vue +4 -4
  71. package/components/buttons/FSButtonFileIcon.vue +4 -4
  72. package/components/buttons/FSButtonFileLabel.vue +4 -4
  73. package/components/buttons/FSButtonFileMini.vue +4 -4
  74. package/components/deviceOrganisations/FSConnectivity.vue +3 -2
  75. package/components/deviceOrganisations/FSConnectivityCard.vue +3 -2
  76. package/components/deviceOrganisations/FSStatus.vue +3 -2
  77. package/components/deviceOrganisations/FSStatusCard.vue +3 -2
  78. package/components/deviceOrganisations/FSStatusesCarousel.vue +3 -2
  79. package/components/deviceOrganisations/FSStatusesRow.vue +3 -2
  80. package/components/deviceOrganisations/FSWorstAlert.vue +5 -4
  81. package/components/deviceOrganisations/FSWorstAlertCard.vue +4 -2
  82. package/components/fields/FSAutocompleteField.vue +210 -97
  83. package/components/fields/FSBaseField.vue +2 -1
  84. package/components/fields/FSColorField.vue +65 -94
  85. package/components/fields/FSDateField.vue +12 -25
  86. package/components/fields/FSDateRangeField.vue +15 -27
  87. package/components/fields/FSDateTimeField.vue +22 -32
  88. package/components/fields/FSDateTimeRangeField.vue +43 -51
  89. package/components/fields/FSGradientField.vue +143 -0
  90. package/components/fields/FSIconField.vue +9 -6
  91. package/components/fields/FSMagicConfigField.vue +154 -0
  92. package/components/fields/FSMagicField.vue +185 -0
  93. package/components/fields/FSNumberField.vue +3 -1
  94. package/components/fields/FSPasswordField.vue +10 -10
  95. package/components/fields/FSRichTextField.vue +136 -50
  96. package/components/fields/FSSearchField.vue +41 -62
  97. package/components/fields/FSSelectField.vue +148 -53
  98. package/components/fields/FSTagField.vue +19 -16
  99. package/components/fields/FSTermField.vue +192 -186
  100. package/components/fields/FSTextArea.vue +4 -4
  101. package/components/fields/FSTextField.vue +29 -6
  102. package/components/fields/FSTimeField.vue +55 -20
  103. package/components/fields/FSTimeSlotField.vue +6 -5
  104. package/components/fields/FSTranslateField.vue +234 -0
  105. package/components/fields/FSTranslateRichTextField.vue +185 -0
  106. package/components/fields/FSTreeViewField.vue +520 -0
  107. package/components/lists/FSDataIteratorItem.vue +18 -3
  108. package/components/lists/FSDataTableUI.vue +138 -51
  109. package/components/lists/FSFilterButton.vue +4 -2
  110. package/components/lists/FSHiddenButton.vue +4 -2
  111. package/components/map/FSMap.vue +598 -0
  112. package/components/map/FSMapEditPointAddressOverlay.vue +164 -0
  113. package/components/map/FSMapLayerButton.vue +77 -0
  114. package/components/map/FSMapOverlay.vue +150 -0
  115. package/components/selects/FSSelectAutoRefresh.vue +62 -0
  116. package/components/selects/FSSelectDashboardVariableType.vue +47 -0
  117. package/components/selects/FSSelectDateSetting.vue +39 -37
  118. package/components/selects/FSSelectDays.vue +62 -0
  119. package/components/tiles/FSDashboardOrganisationTileUI.vue +7 -5
  120. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +7 -5
  121. package/components/tiles/FSDashboardShallowTileUI.vue +7 -5
  122. package/components/tiles/FSDeviceOrganisationTileUI.vue +11 -12
  123. package/components/tiles/FSFolderTileUI.vue +8 -6
  124. package/components/tiles/FSGroupTileUI.vue +13 -15
  125. package/components/tiles/{FSSimpleIconTileUI.vue → FSSimpleTileUI.vue} +29 -15
  126. package/components/tiles/FSTile.vue +5 -11
  127. package/components/tiles/FSUserOrganisationTileUI.vue +2 -1
  128. package/components/toggleSets/FSToggleSetPosition.vue +61 -0
  129. package/composables/index.ts +5 -1
  130. package/composables/useAddress.ts +158 -0
  131. package/composables/useAutocomplete.ts +4 -3
  132. package/composables/useColors.ts +8 -25
  133. package/composables/useDebounce.ts +2 -1
  134. package/composables/useMagicFieldProvider.ts +22 -0
  135. package/composables/useRules.ts +4 -12
  136. package/composables/useSlots.ts +46 -26
  137. package/composables/useTables.ts +29 -0
  138. package/composables/useTreeView.ts +48 -0
  139. package/elements/FSFormElement.ts +2 -1
  140. package/icons/flags/France.vue +21 -5
  141. package/icons/flags/Germany.vue +16 -4
  142. package/icons/flags/GreatBritain.vue +25 -6
  143. package/icons/flags/Italy.vue +21 -5
  144. package/icons/flags/Portugal.vue +225 -51
  145. package/icons/flags/Spain.vue +2781 -543
  146. package/icons/flags/UnitedStates.vue +31 -7
  147. package/icons/widgetTemplates/DevicesWidget.vue +189 -189
  148. package/icons/widgetTemplates/ProfileWidget.vue +9 -9
  149. package/icons/widgetTemplates/TextWidget.vue +6 -6
  150. package/models/breadcrumbs.ts +1 -1
  151. package/models/deviceAlerts.ts +1 -1
  152. package/models/deviceConnectivities.ts +1 -1
  153. package/models/index.ts +2 -0
  154. package/models/magicFields.ts +9 -0
  155. package/models/map.ts +18 -0
  156. package/models/richTextVariable.ts +5 -0
  157. package/models/rules.ts +11 -2
  158. package/models/tables.ts +30 -21
  159. package/models/variableNode.ts +104 -0
  160. package/package.json +21 -18
  161. package/plugins/colorPlugin.ts +2 -2
  162. package/plugins/index.ts +2 -1
  163. package/plugins/mapsPlugin.ts +37 -0
  164. package/shims-plugin.d.ts +2 -2
  165. package/shims-window.d.ts +3 -0
  166. package/styles/components/fs_button.scss +5 -0
  167. package/styles/components/fs_card.scss +0 -1
  168. package/styles/components/fs_col.scss +1 -0
  169. package/styles/components/fs_color_field.scss +12 -2
  170. package/styles/components/fs_data_iterator_item.scss +19 -6
  171. package/styles/components/fs_dialog.scss +12 -22
  172. package/styles/components/fs_gradient_field.scss +16 -0
  173. package/styles/components/fs_image_card.scss +18 -0
  174. package/styles/components/fs_magic_config_field.scss +13 -0
  175. package/styles/components/fs_map.scss +129 -0
  176. package/styles/components/fs_map_overlay.scss +38 -0
  177. package/styles/components/fs_meta_field.scss +6 -0
  178. package/styles/components/fs_option_group.scss +1 -0
  179. package/styles/components/fs_radio.scss +1 -1
  180. package/styles/components/fs_rich_text_field.scss +17 -5
  181. package/styles/components/fs_row.scss +1 -1
  182. package/styles/components/fs_select_field.scss +9 -14
  183. package/styles/components/fs_text.scss +1 -1
  184. package/styles/components/fs_time_field.scss +0 -4
  185. package/styles/components/fs_translate_field.scss +3 -0
  186. package/styles/components/fs_tree_view_field.scss +53 -0
  187. package/styles/components/index.scss +8 -1
  188. package/styles/globals/overrides.scss +54 -8
  189. package/styles/globals/scrollbars.scss +2 -2
  190. package/themes/default.ts +1 -1
  191. package/utils/gradient.ts +1601 -0
  192. package/utils/index.ts +3 -1
  193. package/utils/leafletMarkers.ts +23 -0
  194. package/utils/lexical.ts +3 -1
  195. package/components/selects/FSSelectTimeZone.vue +0 -67
  196. package/styles/components/fs_date_field.scss +0 -8
@@ -0,0 +1,231 @@
1
+ <template>
2
+ <FSWindow
3
+ width="100%"
4
+ :modelValue="currentStep - 1"
5
+ >
6
+ <FSForm
7
+ v-for="(step, index) in $props.steps"
8
+ :variant="$props.variant"
9
+ :key="index"
10
+ @submit="onSubmit"
11
+ v-model="valid"
12
+ >
13
+ <FSCol
14
+ gap="24px"
15
+ >
16
+ <FSFadeOut
17
+ :height="height"
18
+ padding="0 8px 0 0"
19
+ >
20
+ <slot
21
+ :name="`step-${step}`"
22
+ />
23
+ </FSFadeOut>
24
+ <FSRow
25
+ padding="0 16px 0 0"
26
+ >
27
+ <slot
28
+ name="left-footer"
29
+ />
30
+ <FSRow
31
+ class="fs-dialog-actions"
32
+ align="top-right"
33
+ :wrap="false"
34
+ >
35
+ <FSButton
36
+ :prependIcon="$props.cancelButtonPrependIcon"
37
+ :appendIcon="$props.cancelButtonAppendIcon"
38
+ :variant="$props.cancelButtonVariant"
39
+ :color="$props.cancelButtonColor"
40
+ :label="previousButtonLabel"
41
+ @click="onPrevious()"
42
+ />
43
+ <FSButton
44
+ type="submit"
45
+ :prependIcon="$props.submitButtonPrependIcon"
46
+ :appendIcon="$props.submitButtonAppendIcon"
47
+ :color="$props.submitButtonColor"
48
+ :variant="nextButtonVariant"
49
+ :editable="$props.editable"
50
+ :label="nextButtonLabel"
51
+ :load="$props.load"
52
+ />
53
+ </FSRow>
54
+ </FSRow>
55
+ </FSCol>
56
+ </FSForm>
57
+ </FSWindow>
58
+ </template>
59
+
60
+ <script lang="ts">
61
+ import { computed, defineComponent, type PropType, ref } from "vue";
62
+
63
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
64
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
65
+ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
66
+
67
+ import FSFadeOut from "./FSFadeOut.vue";
68
+ import FSButton from "./FSButton.vue";
69
+ import FSForm from "./FSForm.vue";
70
+ import FSRow from "./FSRow.vue";
71
+
72
+ export default defineComponent({
73
+ name: "FSDialogMultiFormBody",
74
+ components: {
75
+ FSFadeOut,
76
+ FSButton,
77
+ FSForm,
78
+ FSRow
79
+ },
80
+ props: {
81
+ subtitle: {
82
+ type: String as PropType<string | null>,
83
+ required: false,
84
+ default: null
85
+ },
86
+ width: {
87
+ type: [Array, String, Number] as PropType<"hug" | "fill" | string[] | number[] | string | number | null>,
88
+ required: false,
89
+ default: "auto"
90
+ },
91
+ variant: {
92
+ type: String as PropType<"standard" | "submit">,
93
+ required: false,
94
+ default: "submit"
95
+ },
96
+ steps: {
97
+ type: Number,
98
+ required: true
99
+ },
100
+ cancelButtonPrependIcon: {
101
+ type: String as PropType<string | null>,
102
+ required: false,
103
+ default: null
104
+ },
105
+ cancelButtonLabel: {
106
+ type: String as PropType<string | null>,
107
+ required: false,
108
+ default: null
109
+ },
110
+ cancelButtonAppendIcon: {
111
+ type: String as PropType<string | null>,
112
+ required: false,
113
+ default: null
114
+ },
115
+ cancelButtonVariant: {
116
+ type: String as PropType<"standard" | "full" | "icon">,
117
+ required: false,
118
+ default: "standard"
119
+ },
120
+ cancelButtonColor: {
121
+ type: String as PropType<ColorBase>,
122
+ required: false,
123
+ default: ColorEnum.Light
124
+ },
125
+ submitButtonPrependIcon: {
126
+ type: String as PropType<string | null>,
127
+ required: false,
128
+ default: null
129
+ },
130
+ submitButtonLabel: {
131
+ type: String as PropType<string | null>,
132
+ required: false,
133
+ default: null
134
+ },
135
+ submitButtonAppendIcon: {
136
+ type: String as PropType<string | null>,
137
+ required: false,
138
+ default: null
139
+ },
140
+ submitButtonVariant: {
141
+ type: String as PropType<"standard" | "full" | "icon">,
142
+ required: false,
143
+ default: "full"
144
+ },
145
+ submitButtonColor: {
146
+ type: String as PropType<ColorBase>,
147
+ required: false,
148
+ default: ColorEnum.Primary
149
+ },
150
+ load: {
151
+ type: Boolean,
152
+ required: false,
153
+ default: false
154
+ },
155
+ editable: {
156
+ type: Boolean,
157
+ required: false,
158
+ default: true
159
+ }
160
+ },
161
+ emits: ["click:cancelButton", "click:submitButton"],
162
+ setup(props, { emit }) {
163
+ const { isMobileSized } = useBreakpoints();
164
+ const { $tr } = useTranslationsProvider();
165
+
166
+ const currentStep = ref(1);
167
+ const valid = ref(false);
168
+ const valids = ref(Array.from({ length: props.steps }, () => false));
169
+
170
+ const height = computed(() => {
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)`;
176
+ });
177
+
178
+ const previousButtonLabel = computed(() => {
179
+ return currentStep.value == 1
180
+ ? props.cancelButtonLabel ?? $tr("ui.button.cancel", "Cancel")
181
+ : $tr("ui.button.back", "Back");
182
+ });
183
+
184
+ const nextButtonLabel = computed(() => {
185
+ return currentStep.value == props.steps
186
+ ? props.submitButtonLabel ?? $tr("ui.button.validate", "Validate")
187
+ : $tr("ui.button.next", "Next");
188
+ });
189
+
190
+ const nextButtonVariant = computed(() => {
191
+ return currentStep.value == props.steps
192
+ ? props.submitButtonVariant ?? "full" : "standard";
193
+ });
194
+
195
+ const onPrevious = () => {
196
+ if (currentStep.value > 1) {
197
+ currentStep.value--;
198
+ }
199
+ else {
200
+ emit("click:cancelButton");
201
+ }
202
+ };
203
+
204
+ const onSubmit = () => {
205
+ if (valid.value) {
206
+ switch (currentStep.value) {
207
+ case props.steps:
208
+ emit("click:submitButton");
209
+ break;
210
+ default:
211
+ currentStep.value++;
212
+ break;
213
+ }
214
+ }
215
+ };
216
+
217
+ return {
218
+ previousButtonLabel,
219
+ nextButtonVariant,
220
+ nextButtonLabel,
221
+ currentStep,
222
+ ColorEnum,
223
+ height,
224
+ valids,
225
+ valid,
226
+ onPrevious,
227
+ onSubmit
228
+ };
229
+ }
230
+ });
231
+ </script>
@@ -61,10 +61,12 @@
61
61
  </template>
62
62
 
63
63
  <script lang="ts">
64
- import { computed, defineComponent, PropType } from "vue";
64
+ import type { PropType } from "vue";
65
+ import { computed, defineComponent } from "vue";
65
66
 
66
67
  import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
67
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
68
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
69
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
68
70
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
69
71
 
70
72
  import FSFadeOut from "./FSFadeOut.vue";
@@ -34,10 +34,12 @@
34
34
  </template>
35
35
 
36
36
  <script lang="ts">
37
- import { computed, defineComponent, PropType } from "vue";
37
+ import type { PropType } from "vue";
38
+ import { computed, defineComponent } from "vue";
38
39
 
39
40
  import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
40
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
41
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
42
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
41
43
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
42
44
 
43
45
  import FSText from "./FSText.vue";
@@ -66,7 +68,7 @@ export default defineComponent({
66
68
  variant: {
67
69
  type: String as PropType<"base" | "light" | "dark">,
68
70
  required: false,
69
- default: "dark"
71
+ default: "base"
70
72
  },
71
73
  vertical: {
72
74
  type: Boolean as PropType<boolean>,
@@ -112,4 +114,4 @@ export default defineComponent({
112
114
  };
113
115
  }
114
116
  });
115
- </script>
117
+ </script>
@@ -65,13 +65,13 @@
65
65
  >
66
66
  <FSText
67
67
  v-if="fileSelected && fileSelected.fileName"
68
- lineClamp="2"
69
68
  font="text-body"
69
+ :lineClamp="2"
70
70
  >
71
71
  {{ fileSelected.fileName }}
72
72
  </FSText>
73
73
  <FSCol
74
- gap="0"
74
+ gap="0px"
75
75
  >
76
76
  <FSText
77
77
  class="fs-edit-image-overline"
@@ -97,7 +97,7 @@
97
97
  <FSButtonFileMini
98
98
  accept="image/*"
99
99
  :readFile="false"
100
- @update:modelValue="onUpload"
100
+ @update:metadata="onUpload"
101
101
  />
102
102
  <FSButtonRemoveMini
103
103
  @click="onRemove"
@@ -124,7 +124,7 @@
124
124
  <FSButtonFileMini
125
125
  accept="image/*"
126
126
  :readFile="false"
127
- @update:modelValue="onUpload"
127
+ @update:metadata="onUpload"
128
128
  />
129
129
  <FSButtonRemoveMini
130
130
  @click="onRemove"
@@ -147,17 +147,17 @@
147
147
  mdi-plus-box-outline
148
148
  </FSIcon>
149
149
  <FSText
150
- lineClamp="2"
151
150
  font="text-body"
151
+ :lineClamp="2"
152
152
  >
153
153
  {{ $tr('ui.edit-image.add-image', 'Add an image.') }}
154
154
  </FSText>
155
155
  <FSButtonFileMini
156
- ref="invisibleButtonRef"
157
156
  class="fs-edit-image-hidden-button"
157
+ ref="invisibleButtonRef"
158
158
  accept="image/*"
159
159
  :readFile="false"
160
- @update:modelValue="onUpload"
160
+ @update:metadata="onUpload"
161
161
  />
162
162
  </FSRow>
163
163
  </FSClickable>
@@ -165,11 +165,11 @@
165
165
  </template>
166
166
 
167
167
  <script lang="ts">
168
- import { computed, defineComponent, PropType, ref } from "vue";
168
+ import { computed, defineComponent, type PropType, ref, watch } from "vue";
169
169
 
170
170
  import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
171
+ import { ColorEnum, type FileImage } from "@dative-gpi/foundation-shared-components/models";
171
172
  import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
172
- import { ColorEnum, FileImage } from "@dative-gpi/foundation-shared-components/models";
173
173
 
174
174
  import FSButtonRemoveMini from "./buttons/FSButtonRemoveMini.vue";
175
175
  import FSButtonFileMini from "./buttons/FSButtonFileMini.vue";
@@ -281,6 +281,13 @@ export default defineComponent({
281
281
  }
282
282
  };
283
283
 
284
+ watch(() => props.modelValue, () => {
285
+ if (!props.modelValue) {
286
+ fileSelected.value.fileName = "";
287
+ fileSelected.value.fileContent = null;
288
+ }
289
+ });
290
+
284
291
  return {
285
292
  invisibleButtonRef,
286
293
  fileSelected,
@@ -28,7 +28,8 @@
28
28
  </template>
29
29
 
30
30
  <script lang="ts">
31
- import { computed, defineComponent, PropType } from "vue";
31
+ import type { PropType } from "vue";
32
+ import { computed, defineComponent } from "vue";
32
33
 
33
34
  import { getError, sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
34
35
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
@@ -11,7 +11,7 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
- import { computed, defineComponent, onMounted, onUnmounted, PropType, ref, watch } from "vue";
14
+ import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
15
15
 
16
16
  import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
17
17
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -11,7 +11,8 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
- import { computed, defineComponent, PropType, provide, ref } from "vue";
14
+ import type { PropType} from "vue";
15
+ import { computed, defineComponent, provide, ref } from "vue";
15
16
 
16
17
  export default defineComponent({
17
18
  name: "FSForm",
@@ -22,7 +23,7 @@ export default defineComponent({
22
23
  default: null
23
24
  },
24
25
  variant: {
25
- type: String as PropType<"standard" | "lazy" | "submit">,
26
+ type: String as PropType<"standard" | "submit">,
26
27
  required: false,
27
28
  default: "submit"
28
29
  }
@@ -32,10 +33,9 @@ export default defineComponent({
32
33
  const formRef = ref<HTMLFormElement | null>(null);
33
34
  const submitted = ref(false);
34
35
 
35
- const validateOn = computed((): "submit" | "blur" | "input" => {
36
+ const validateOn = computed((): "submit" | "input" => {
36
37
  switch (props.variant) {
37
38
  case "standard": return "input";
38
- case "lazy": return "blur";
39
39
  default: return "submit";
40
40
  }
41
41
  });
@@ -72,10 +72,10 @@ export default defineComponent({
72
72
  validateOn,
73
73
  submitted,
74
74
  formRef,
75
- reset,
76
- validate,
75
+ resetValidation,
77
76
  onSubmit,
78
- resetValidation
77
+ validate,
78
+ reset
79
79
  };
80
80
  }
81
81
  });
@@ -66,10 +66,12 @@
66
66
  </template>
67
67
 
68
68
  <script lang="ts">
69
- import { computed, defineComponent, PropType } from "vue";
69
+ import type { PropType } from "vue";
70
+ import { computed, defineComponent } from "vue";
70
71
 
71
72
  import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
72
- import { ColorEnum, FSGridItem } from "@dative-gpi/foundation-shared-components/models";
73
+ import type { FSGridItem } from "@dative-gpi/foundation-shared-components/models";
74
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
73
75
 
74
76
  import FSText from "./FSText.vue";
75
77
  import FSCol from "./FSCol.vue";
@@ -34,10 +34,11 @@
34
34
  </template>
35
35
 
36
36
  <script lang="ts">
37
- import { computed, defineComponent, PropType } from "vue";
37
+ import type { PropType } from "vue";
38
+ import { computed, defineComponent } from "vue";
38
39
 
39
40
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
40
- import { FSGridMosaic } from "@dative-gpi/foundation-shared-components/models";
41
+ import type { FSGridMosaic } from "@dative-gpi/foundation-shared-components/models";
41
42
 
42
43
  import FSGrid from "./FSGrid.vue";
43
44
  import FSCol from "./FSCol.vue";
@@ -10,10 +10,11 @@
10
10
  </template>
11
11
 
12
12
  <script lang="ts">
13
- import { computed, defineComponent, PropType } from "vue";
13
+ import type { PropType } from "vue";
14
+ import { computed, defineComponent } from "vue";
14
15
 
15
16
  import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
16
- import { ColorBase } from "@dative-gpi/foundation-shared-components/models";
17
+ import type { ColorBase } from "@dative-gpi/foundation-shared-components/models";
17
18
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
18
19
 
19
20
  export default defineComponent({
@@ -11,7 +11,7 @@
11
11
  >
12
12
  <FSIcon
13
13
  variant="dark"
14
- size="56"
14
+ :size="$props.iconSize"
15
15
  :color="$props.iconColor"
16
16
  >
17
17
  {{ $props.icon }}
@@ -21,9 +21,11 @@
21
21
  </template>
22
22
 
23
23
  <script lang="ts">
24
- import { computed, defineComponent, PropType } from "vue";
24
+ import type { PropType } from "vue";
25
+ import { computed, defineComponent } from "vue";
25
26
 
26
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
27
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
28
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
27
29
 
28
30
  import FSCard from "./FSCard.vue";
29
31
  import FSIcon from "./FSIcon.vue";
@@ -54,6 +56,11 @@ export default defineComponent({
54
56
  type: String as PropType<ColorBase>,
55
57
  required: false,
56
58
  default: ColorEnum.Dark
59
+ },
60
+ iconSize: {
61
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
62
+ required: false,
63
+ default: "56px"
57
64
  }
58
65
  },
59
66
  setup(props) {
@@ -9,7 +9,8 @@
9
9
  <script lang="ts">
10
10
  import { computed, defineComponent } from "vue";
11
11
 
12
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
12
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
14
 
14
15
  import FSIcon from "./FSIcon.vue";
15
16
 
@@ -5,7 +5,8 @@
5
5
  </template>
6
6
 
7
7
  <script lang="ts">
8
- import { PropType, computed, defineComponent, onMounted } from "vue";
8
+ import type { PropType} from "vue";
9
+ import { computed, defineComponent, onMounted } from "vue";
9
10
 
10
11
  import { useLanguages } from "@dative-gpi/foundation-shared-services/composables";
11
12
 
@@ -39,7 +39,8 @@
39
39
  </template>
40
40
 
41
41
  <script lang="ts">
42
- import { computed, defineComponent, PropType, ref, watch } from "vue";
42
+ import type { PropType} from "vue";
43
+ import { computed, defineComponent, ref, watch } from "vue";
43
44
  import { decode, isBlurhashValid } from "blurhash";
44
45
 
45
46
  import { IMAGE_RAW_EXTENSION_URL, IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
@@ -0,0 +1,72 @@
1
+ <template>
2
+ <FSClickable
3
+ class="fs-image-card"
4
+ :height="height"
5
+ :width="width"
6
+ :style="style"
7
+ v-bind="$attrs"
8
+ >
9
+ <FSRow
10
+ align="bottom-left"
11
+ height="fill"
12
+ >
13
+ <FSRow
14
+ class="fs-image-card-label"
15
+ align="center-left"
16
+ padding="8px"
17
+ >
18
+ <FSSpan
19
+ font="text-overline"
20
+ >
21
+ {{ $props.label }}
22
+ </FSSpan>
23
+ </FSRow>
24
+ </FSRow>
25
+ </FSClickable>
26
+ </template>
27
+
28
+ <script lang="ts">
29
+ import { computed, defineComponent, type PropType } from "vue";
30
+
31
+ import FSClickable from "./FSClickable.vue";
32
+ import FSSpan from "./FSSpan.vue";
33
+ import FSRow from "./FSRow.vue";
34
+
35
+ export default defineComponent({
36
+ name: "FSImageCard",
37
+ components: {
38
+ FSClickable,
39
+ FSSpan,
40
+ FSRow
41
+ },
42
+ props: {
43
+ src: {
44
+ type: String,
45
+ required: true
46
+ },
47
+ label: {
48
+ type: String,
49
+ required: true
50
+ },
51
+ height: {
52
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
53
+ required: false,
54
+ default: '110px'
55
+ },
56
+ width: {
57
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
58
+ required: false,
59
+ default: '200px'
60
+ }
61
+ },
62
+ setup(props) {
63
+ const style = computed(() => ({
64
+ "--fs-image-card-background": `url(${props.src})`
65
+ }));
66
+
67
+ return {
68
+ style
69
+ };
70
+ }
71
+ });
72
+ </script>
@@ -16,10 +16,12 @@
16
16
  </template>
17
17
 
18
18
  <script lang="ts">
19
- import { computed, defineComponent, PropType } from "vue";
19
+ import type { PropType } from "vue";
20
+ import { computed, defineComponent } from "vue";
20
21
 
21
22
  import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
22
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
23
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
24
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
23
25
 
24
26
  import FSLoader from "./FSLoader.vue";
25
27
 
@@ -25,11 +25,13 @@
25
25
  </template>
26
26
 
27
27
  <script lang="ts">
28
- import { computed, defineComponent, PropType } from "vue";
29
- import { RouteLocation } from "vue-router";
28
+ import type { PropType } from "vue";
29
+ import { computed, defineComponent } from "vue";
30
+ import type { RouteLocation } from "vue-router";
30
31
 
31
32
  import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
32
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
33
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
34
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
33
35
 
34
36
  export default defineComponent({
35
37
  name: "FSLink",
@@ -7,7 +7,8 @@
7
7
  </template>
8
8
 
9
9
  <script lang="ts">
10
- import { computed, defineComponent, PropType } from "vue";
10
+ import type { PropType } from "vue";
11
+ import { computed, defineComponent } from "vue";
11
12
 
12
13
  import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
13
14
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";