@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.
Files changed (228) hide show
  1. package/components/FSAccordionPanel.vue +8 -10
  2. package/components/FSBadge.vue +2 -4
  3. package/components/FSBreadcrumbs.vue +9 -10
  4. package/components/FSButton.vue +81 -31
  5. package/components/FSCalendar.vue +35 -33
  6. package/components/FSCalendarTwin.vue +77 -84
  7. package/components/FSCard.vue +29 -16
  8. package/components/FSCardPlaceholder.vue +1 -2
  9. package/components/FSCheckbox.vue +5 -7
  10. package/components/FSChip.vue +9 -11
  11. package/components/FSClickable.vue +67 -57
  12. package/components/FSClock.vue +4 -4
  13. package/components/FSCol.vue +2 -3
  14. package/components/FSColor.vue +13 -31
  15. package/components/FSColorIcon.vue +25 -9
  16. package/components/FSDialog.vue +1 -2
  17. package/components/FSDialogFormBody.vue +4 -4
  18. package/components/FSDialogMenu.vue +2 -4
  19. package/components/FSDialogMultiFormBody.vue +63 -50
  20. package/components/FSDialogRemove.vue +1 -0
  21. package/components/FSDialogSubmit.vue +5 -7
  22. package/components/FSDivider.vue +7 -9
  23. package/components/FSEditImage.vue +27 -274
  24. package/components/FSEditImageUI.vue +303 -0
  25. package/components/FSErrorToast.vue +3 -4
  26. package/components/FSFadeOut.vue +18 -13
  27. package/components/FSGrid.vue +6 -9
  28. package/components/FSGridMosaic.vue +1 -2
  29. package/components/FSIcon.vue +7 -8
  30. package/components/FSIconCard.vue +23 -30
  31. package/components/FSIconCheck.vue +1 -2
  32. package/components/FSImage.vue +21 -193
  33. package/components/FSImageCard.vue +2 -2
  34. package/components/FSImageUI.vue +212 -0
  35. package/components/FSLabel.vue +18 -20
  36. package/components/FSLink.vue +19 -21
  37. package/components/FSLoader.vue +10 -14
  38. package/components/FSOptionGroup.vue +58 -12
  39. package/components/FSPagination.vue +3 -5
  40. package/components/FSRadio.vue +5 -7
  41. package/components/FSRadioGroup.vue +2 -4
  42. package/components/FSRow.vue +3 -4
  43. package/components/FSSlideGroup.vue +15 -4
  44. package/components/FSSlider.vue +9 -11
  45. package/components/FSSpan.vue +11 -9
  46. package/components/FSSwitch.vue +65 -37
  47. package/components/FSTab.vue +2 -4
  48. package/components/FSTabs.vue +36 -16
  49. package/components/FSTag.vue +23 -14
  50. package/components/FSTagGroup.vue +3 -5
  51. package/components/FSText.vue +8 -12
  52. package/components/FSWindow.vue +11 -5
  53. package/components/FSWrapGroup.vue +15 -4
  54. package/components/agenda/FSAgenda.vue +204 -0
  55. package/components/agenda/FSAgendaDialogCalendar.vue +76 -0
  56. package/components/agenda/FSAgendaHeader.vue +190 -0
  57. package/components/agenda/FSAgendaHorizontalEvent.vue +162 -0
  58. package/components/agenda/FSAgendaHorizontalTimeLineMarker.vue +46 -0
  59. package/components/agenda/FSAgendaHoursCol.vue +103 -0
  60. package/components/agenda/FSAgendaHoursRow.vue +124 -0
  61. package/components/agenda/FSAgendaVerticalEvent.vue +160 -0
  62. package/components/agenda/FSAgendaVerticalTimeLineMarker.vue +46 -0
  63. package/components/agenda/FSDayAgenda.vue +200 -0
  64. package/components/agenda/FSMonthAgenda.vue +257 -0
  65. package/components/agenda/FSSelectAgendaMode.vue +54 -0
  66. package/components/agenda/FSWeekAgenda.vue +328 -0
  67. package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
  68. package/components/autocompletes/FSAutocompleteTimeZone.vue +20 -38
  69. package/components/buttons/FSButtonCancelMini.vue +1 -0
  70. package/components/buttons/FSButtonCopy.vue +28 -0
  71. package/components/buttons/FSButtonCopyIcon.vue +28 -0
  72. package/components/buttons/FSButtonCopyLabel.vue +27 -0
  73. package/components/buttons/FSButtonCopyMini.vue +28 -0
  74. package/components/buttons/FSButtonDragIcon.vue +27 -0
  75. package/components/buttons/FSButtonDuplicateMini.vue +1 -0
  76. package/components/buttons/FSButtonEditMini.vue +1 -0
  77. package/components/buttons/FSButtonFileMini.vue +1 -0
  78. package/components/buttons/FSButtonNextMini.vue +1 -0
  79. package/components/buttons/FSButtonPreviousMini.vue +1 -0
  80. package/components/buttons/FSButtonRedoMini.vue +1 -0
  81. package/components/buttons/FSButtonRemoveMini.vue +1 -0
  82. package/components/buttons/FSButtonSaveMini.vue +1 -0
  83. package/components/buttons/FSButtonSearchMini.vue +1 -0
  84. package/components/buttons/FSButtonUndoMini.vue +1 -0
  85. package/components/buttons/FSButtonUpdateMini.vue +1 -0
  86. package/components/buttons/FSButtonValidateMini.vue +1 -0
  87. package/components/deviceOrganisations/FSConnectivity.vue +11 -1
  88. package/components/deviceOrganisations/FSConnectivityCard.vue +20 -49
  89. package/components/deviceOrganisations/FSStatus.vue +11 -1
  90. package/components/deviceOrganisations/FSStatusCard.vue +40 -60
  91. package/components/deviceOrganisations/FSStatusesCarousel.vue +1 -0
  92. package/components/deviceOrganisations/FSStatusesRow.vue +10 -5
  93. package/components/deviceOrganisations/FSWorstAlert.vue +19 -13
  94. package/components/deviceOrganisations/FSWorstAlertCard.vue +36 -47
  95. package/components/fields/FSAutocompleteField.vue +501 -323
  96. package/components/fields/FSAutocompleteTag.vue +100 -0
  97. package/components/fields/FSBaseField.vue +26 -16
  98. package/components/fields/FSColorField.vue +63 -55
  99. package/components/fields/FSCommentField.vue +93 -0
  100. package/components/fields/FSDateField.vue +2 -2
  101. package/components/fields/FSDateRangeField.vue +2 -2
  102. package/components/fields/FSDateTimeField.vue +4 -3
  103. package/components/fields/FSDateTimeRangeField.vue +7 -6
  104. package/components/fields/FSEntityFieldUI.vue +271 -0
  105. package/components/fields/FSGradientField.vue +27 -33
  106. package/components/fields/FSIconField.vue +2 -3
  107. package/components/fields/FSMagicConfigField.vue +28 -19
  108. package/components/fields/FSMagicField.vue +25 -17
  109. package/components/fields/FSNumberField.vue +9 -7
  110. package/components/fields/FSPasswordField.vue +2 -3
  111. package/components/fields/FSRichTextField.vue +32 -5
  112. package/components/fields/FSSearchField.vue +2 -2
  113. package/components/fields/FSSelectField.vue +483 -251
  114. package/components/fields/FSTagField.vue +4 -6
  115. package/components/fields/FSTermField.vue +25 -13
  116. package/components/fields/FSTextArea.vue +18 -6
  117. package/components/fields/FSTextField.vue +13 -10
  118. package/components/fields/FSTimeField.vue +1 -1
  119. package/components/fields/FSTimeSlotField.vue +3 -4
  120. package/components/fields/FSTimeStepField.vue +157 -0
  121. package/components/fields/FSTranslateField.vue +3 -2
  122. package/components/fields/FSTranslateRichTextField.vue +4 -3
  123. package/components/fields/FSTranslateTextArea.vue +233 -0
  124. package/components/fields/FSTreeViewField.vue +7 -9
  125. package/components/fields/periodicField/FSPeriodicDailyField.vue +120 -0
  126. package/components/fields/periodicField/FSPeriodicField.vue +131 -0
  127. package/components/fields/periodicField/FSPeriodicMonthlyField.vue +222 -0
  128. package/components/fields/periodicField/FSPeriodicWeeklyField.vue +120 -0
  129. package/components/fields/periodicField/FSPeriodicYearlyField.vue +144 -0
  130. package/components/lists/FSDataIteratorItem.vue +8 -10
  131. package/components/lists/FSDataTableUI.vue +47 -39
  132. package/components/lists/FSFilterButton.vue +20 -22
  133. package/components/lists/FSHiddenButton.vue +10 -12
  134. package/components/lists/FSLoadDataTable.vue +4 -6
  135. package/components/lists/FSSimpleList.vue +229 -0
  136. package/components/map/FSMap.vue +256 -405
  137. package/components/map/FSMapFeatureGroup.vue +51 -0
  138. package/components/map/FSMapLayerButton.vue +6 -3
  139. package/components/map/FSMapMarker.vue +116 -0
  140. package/components/map/FSMapMarkerClusterGroup.vue +72 -0
  141. package/components/map/FSMapOverlay.vue +69 -83
  142. package/components/map/FSMapPolygon.vue +81 -0
  143. package/components/map/FSMapTileLayer.vue +50 -0
  144. package/components/map/keys.ts +4 -0
  145. package/components/selects/FSSelectAutoRefresh.vue +1 -1
  146. package/components/selects/FSSelectDashboardVariableType.vue +1 -1
  147. package/components/selects/FSSelectDateSetting.vue +3 -3
  148. package/components/selects/FSSelectDays.vue +1 -1
  149. package/components/selects/FSSelectListMode.vue +51 -0
  150. package/components/selects/FSSelectMonths.vue +67 -0
  151. package/components/tiles/FSChartTileUI.vue +116 -0
  152. package/components/tiles/FSCommentTileUI.vue +149 -0
  153. package/components/tiles/FSDashboardOrganisationTileUI.vue +6 -8
  154. package/components/tiles/FSDashboardOrganisationTypeTileUI.vue +6 -8
  155. package/components/tiles/FSDashboardShallowTileUI.vue +6 -8
  156. package/components/tiles/FSDeviceOrganisationTileUI.vue +30 -18
  157. package/components/tiles/FSFolderTileUI.vue +6 -6
  158. package/components/tiles/FSGroupTileUI.vue +31 -22
  159. package/components/tiles/FSLoadTile.vue +5 -7
  160. package/components/tiles/FSLocationTileUI.vue +157 -0
  161. package/components/tiles/FSModelTileUI.vue +18 -0
  162. package/components/tiles/FSServiceAccountOrganisationTileUI.vue +142 -0
  163. package/components/tiles/FSSimpleTileUI.vue +57 -36
  164. package/components/tiles/FSTile.vue +115 -55
  165. package/components/tiles/FSUserOrganisationTileUI.vue +25 -35
  166. package/components/toggleSets/FSToggleSetPosition.vue +1 -1
  167. package/components/views/FSEntityHeader.vue +343 -0
  168. package/components/views/FSEntityView.vue +163 -0
  169. package/components/views/FSListHeader.vue +83 -0
  170. package/components/views/FSListView.vue +83 -0
  171. package/components/views/FSSkeletonView.vue +100 -0
  172. package/composables/useAddress.ts +2 -2
  173. package/composables/useColors.ts +15 -5
  174. package/composables/useMagicFieldProvider.ts +7 -6
  175. package/composables/useSlots.ts +51 -28
  176. package/models/agenda.ts +9 -0
  177. package/models/deviceAlerts.ts +1 -1
  178. package/models/deviceConnectivities.ts +1 -1
  179. package/models/index.ts +1 -0
  180. package/models/magicFields.ts +1 -0
  181. package/models/map.ts +2 -2
  182. package/models/rules.ts +10 -5
  183. package/models/tables.ts +3 -1
  184. package/package.json +4 -4
  185. package/styles/components/fs_agenda.scss +32 -0
  186. package/styles/components/fs_agenda_event.scss +41 -0
  187. package/styles/components/fs_agenda_hours_col.scss +4 -0
  188. package/styles/components/fs_agenda_hours_row.scss +13 -0
  189. package/styles/components/fs_agenda_time_line_marker.scss +19 -0
  190. package/styles/components/fs_card.scss +0 -1
  191. package/styles/components/fs_clickable.scss +5 -3
  192. package/styles/components/fs_color_field.scss +1 -0
  193. package/styles/components/fs_data_table.scss +2 -0
  194. package/styles/components/fs_dialog.scss +11 -15
  195. package/styles/components/fs_edit_image.scss +8 -0
  196. package/styles/components/fs_fade_out.scss +2 -1
  197. package/styles/components/fs_filter_button.scss +1 -6
  198. package/styles/components/fs_gradient_field.scss +11 -11
  199. package/styles/components/fs_magic_config_field.scss +2 -2
  200. package/styles/components/fs_map.scss +36 -30
  201. package/styles/components/fs_option_group.scss +15 -5
  202. package/styles/components/fs_radio.scss +11 -0
  203. package/styles/components/fs_rich_text_field.scss +2 -1
  204. package/styles/components/fs_search_field.scss +3 -0
  205. package/styles/components/fs_select_date_settings.scss +3 -0
  206. package/styles/components/fs_slide_group.scss +5 -0
  207. package/styles/components/fs_span.scss +2 -1
  208. package/styles/components/fs_switch.scss +1 -0
  209. package/styles/components/fs_tabs.scss +9 -0
  210. package/styles/components/fs_text_area.scss +15 -1
  211. package/styles/components/fs_tile.scss +22 -6
  212. package/styles/components/fs_window.scss +5 -0
  213. package/styles/components/fs_wrap_group.scss +4 -0
  214. package/styles/components/index.scss +6 -1
  215. package/styles/globals/overrides.scss +22 -19
  216. package/styles/globals/text_fonts.scss +17 -55
  217. package/tools/alertsTools.ts +54 -0
  218. package/tools/chartsTools.ts +300 -0
  219. package/tools/index.ts +2 -0
  220. package/utils/badge.ts +9 -0
  221. package/utils/filter.ts +18 -0
  222. package/utils/index.ts +2 -0
  223. package/utils/leafletMarkers.ts +8 -2
  224. package/utils/statuses.ts +1 -1
  225. package/utils/time.ts +27 -1
  226. package/components/autocompletes/FSAutocompleteTag.vue +0 -138
  227. package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
  228. package/styles/components/fs_map_overlay.scss +0 -38
@@ -34,11 +34,9 @@
34
34
  </template>
35
35
 
36
36
  <script lang="ts">
37
- import type { PropType } from "vue";
38
- import { computed, defineComponent } from "vue";
37
+ import { computed, defineComponent, type PropType, type StyleValue } from "vue";
39
38
 
40
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
41
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
39
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
42
40
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
43
41
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
44
42
 
@@ -73,7 +71,7 @@ export default defineComponent({
73
71
  default: "8px"
74
72
  },
75
73
  variant: {
76
- type: String as PropType<"background" | "standard" | "gradient">,
74
+ type: String as PropType<"background" | "standard" | "full" | "gradient">,
77
75
  required: false,
78
76
  default: "background"
79
77
  },
@@ -117,8 +115,19 @@ export default defineComponent({
117
115
  const lights = getColors(ColorEnum.Light);
118
116
  const darks = getColors(ColorEnum.Dark);
119
117
 
120
- const style = computed((): { [key: string] : string | null | undefined } => {
118
+ const style = computed((): StyleValue => {
121
119
  switch (props.variant) {
120
+ case "background": return {
121
+ "--fs-card-border-size" : props.border ? "1px" : "0",
122
+ "--fs-card-border-style" : props.borderStyle,
123
+ "--fs-card-border-radius" : sizeToVar(props.borderRadius),
124
+ "--fs-card-padding" : sizeToVar(props.padding),
125
+ "--fs-card-height" : sizeToVar(props.height),
126
+ "--fs-card-width" : sizeToVar(props.width),
127
+ "--fs-card-background-color": backgrounds.base,
128
+ "--fs-card-border-color" : lights.dark,
129
+ "--fs-card-color" : darks.base
130
+ }
122
131
  case "standard": return {
123
132
  "--fs-card-border-size" : props.border ? "1px" : "0",
124
133
  "--fs-card-border-style" : props.borderStyle,
@@ -127,19 +136,19 @@ export default defineComponent({
127
136
  "--fs-card-height" : sizeToVar(props.height),
128
137
  "--fs-card-width" : sizeToVar(props.width),
129
138
  "--fs-card-background-color": colors.value.light,
130
- "--fs-card-border-color" : colors.value.lightContrast,
131
- "--fs-card-color" : colors.value.lightContrast
139
+ "--fs-card-border-color" : colors.value.lightContrast!,
140
+ "--fs-card-color" : colors.value.lightContrast!
132
141
  }
133
- case "background": return {
142
+ case "full": return {
134
143
  "--fs-card-border-size" : props.border ? "1px" : "0",
135
144
  "--fs-card-border-style" : props.borderStyle,
136
145
  "--fs-card-border-radius" : sizeToVar(props.borderRadius),
137
146
  "--fs-card-padding" : sizeToVar(props.padding),
138
147
  "--fs-card-height" : sizeToVar(props.height),
139
148
  "--fs-card-width" : sizeToVar(props.width),
140
- "--fs-card-background-color": backgrounds.base,
141
- "--fs-card-border-color" : lights.dark,
142
- "--fs-card-color" : darks.base
149
+ "--fs-card-background-color": colors.value.base,
150
+ "--fs-card-border-color" : colors.value.base,
151
+ "--fs-card-color" : colors.value.baseContrast!
143
152
  }
144
153
  case "gradient": return {
145
154
  "--fs-card-border-size" : props.border ? "1px" : "0",
@@ -149,19 +158,23 @@ export default defineComponent({
149
158
  "--fs-card-height" : sizeToVar(props.height),
150
159
  "--fs-card-width" : sizeToVar(props.width),
151
160
  "--fs-card-background-color": gradients.value.base,
152
- "--fs-card-border-color" : colors.value.lightContrast,
153
- "--fs-card-color" : colors.value.lightContrast
161
+ "--fs-card-border-color" : colors.value.lightContrast!,
162
+ "--fs-card-color" : colors.value.lightContrast!
154
163
  }
155
164
  }
156
165
  });
157
166
 
158
167
  const classes = computed((): string[] => {
159
- const classNames = ["fs-card", "fs-background"];
168
+ const classNames = ["fs-card"];
160
169
  switch(props.variant) {
161
170
  case "gradient":
162
171
  classNames.push("fs-card-gradient");
163
172
  break;
164
- default:
173
+ case "background":
174
+ classNames.push("fs-card-background");
175
+ classNames.push("fs-card-clickable");
176
+ break;
177
+ default:
165
178
  classNames.push("fs-card-background");
166
179
  break;
167
180
  }
@@ -30,8 +30,7 @@
30
30
  </template>
31
31
 
32
32
  <script lang="ts">
33
- import type { PropType } from "vue";
34
- import { defineComponent } from "vue";
33
+ import { defineComponent, type PropType } from "vue";
35
34
 
36
35
  import { ColorEnum } from "../models";
37
36
 
@@ -49,7 +49,7 @@
49
49
  <FSSpan
50
50
  v-if="$props.description"
51
51
  class="fs-checkbox-description"
52
- font="text-underline"
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 { PropType } from "vue";
63
- import { computed, defineComponent } from "vue";
62
+ import { computed, defineComponent, type PropType, type StyleValue } from "vue";
64
63
 
64
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
65
65
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
66
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
67
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
68
66
 
69
67
  import FSIcon from "./FSIcon.vue";
70
68
  import FSSpan from "./FSSpan.vue";
@@ -131,7 +129,7 @@ export default defineComponent({
131
129
  const lights = getColors(ColorEnum.Light);
132
130
  const darks = getColors(ColorEnum.Dark);
133
131
 
134
- const style = computed((): { [key: string] : string | null | undefined } => {
132
+ const style = computed((): StyleValue => {
135
133
  if (!props.editable) {
136
134
  return {
137
135
  "--fs-checkbox-cursor" : "default",
@@ -155,7 +153,7 @@ export default defineComponent({
155
153
 
156
154
  const icon = computed((): string => props.modelValue ? "mdi-checkbox-marked" : props.indeterminate ? "mdi-minus-box" : "mdi-checkbox-blank-outline");
157
155
 
158
- const font = computed((): string => props.modelValue ? "text-button" : "text-body");
156
+ const font = computed((): "text-button" | "text-body" => props.modelValue ? "text-button" : "text-body");
159
157
 
160
158
  const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
161
159
 
@@ -44,11 +44,9 @@
44
44
  </template>
45
45
 
46
46
  <script lang="ts">
47
- import type { PropType } from "vue";
48
- import { computed, defineComponent } from "vue";
47
+ import { computed, defineComponent, type PropType, type StyleValue } from "vue";
49
48
 
50
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
51
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
49
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
52
50
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
53
51
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
54
52
 
@@ -107,7 +105,7 @@ export default defineComponent({
107
105
  const backgrounds = getColors(ColorEnum.Background);
108
106
  const darks = getColors(ColorEnum.Dark);
109
107
 
110
- const style = computed((): { [key: string] : string | null | undefined } => {
108
+ const style = computed((): StyleValue => {
111
109
  switch (props.variant) {
112
110
  case "standard": return {
113
111
  "--fs-chip-height" : sizeToVar(props.height),
@@ -125,13 +123,13 @@ export default defineComponent({
125
123
  "--fs-chip-height" : sizeToVar(props.height),
126
124
  "--fs-chip-background-color" : colors.value.base,
127
125
  "--fs-chip-border-color" : colors.value.base,
128
- "--fs-chip-color" : colors.value.baseContrast,
126
+ "--fs-chip-color" : colors.value.baseContrast!,
129
127
  "--fs-chip-hover-background-color" : colors.value.base,
130
128
  "--fs-chip-hover-border-color" : colors.value.base,
131
- "--fs-chip-hover-color" : colors.value.baseContrast,
129
+ "--fs-chip-hover-color" : colors.value.baseContrast!,
132
130
  "--fs-chip-active-background-color": colors.value.dark,
133
- "--fs-chip-active-border-color" : colors.value.darkContrast,
134
- "--fs-chip-active-color" : colors.value.darkContrast
131
+ "--fs-chip-active-border-color" : colors.value.darkContrast!,
132
+ "--fs-chip-active-color" : colors.value.darkContrast!
135
133
  };
136
134
  case "borderless": return {
137
135
  "--fs-chip-height" : sizeToVar(props.height),
@@ -157,9 +155,9 @@ export default defineComponent({
157
155
  });
158
156
 
159
157
  return {
158
+ classes,
160
159
  colors,
161
- style,
162
- classes
160
+ style
163
161
  };
164
162
  }
165
163
  });
@@ -3,18 +3,19 @@
3
3
  v-if="$props.href"
4
4
  :href="$props.href"
5
5
  :style="style"
6
+ :class="$props.class"
6
7
  @mouseover="hover = true"
7
8
  @mouseleave="hover = false"
8
9
  @mousedown="active = true"
9
10
  @mouseup="active = false"
10
11
  >
11
12
  <FSCard
13
+ height="100%"
14
+ width="100%"
12
15
  :borderRadius="$props.borderRadius"
13
16
  :borderStyle="$props.borderStyle"
14
- :height="$props.height"
15
- :width="$props.width"
17
+ :padding="$props.padding"
16
18
  :class="classes"
17
- :style="style"
18
19
  v-bind="$attrs"
19
20
  >
20
21
  <template
@@ -43,18 +44,19 @@
43
44
  v-else-if="$props.to"
44
45
  :style="style"
45
46
  :to="$props.to"
47
+ :class="$props.class"
46
48
  @mouseover="hover = true"
47
49
  @mouseleave="hover = false"
48
50
  @mousedown="active = true"
49
51
  @mouseup="active = false"
50
52
  >
51
53
  <FSCard
54
+ height="100%"
55
+ width="100%"
52
56
  :borderRadius="$props.borderRadius"
53
57
  :borderStyle="$props.borderStyle"
54
- :height="$props.height"
55
- :width="$props.width"
58
+ :padding="$props.padding"
56
59
  :class="classes"
57
- :style="style"
58
60
  v-bind="$attrs"
59
61
  >
60
62
  <template
@@ -83,6 +85,7 @@
83
85
  v-else
84
86
  :type="$props.type"
85
87
  :style="style"
88
+ :class="$props.class"
86
89
  @click.stop="onClick"
87
90
  @mouseover="hover = true"
88
91
  @mouseleave="hover = false"
@@ -90,12 +93,12 @@
90
93
  @mouseup="active = false"
91
94
  >
92
95
  <FSCard
96
+ height="100%"
97
+ width="100%"
93
98
  :borderRadius="$props.borderRadius"
94
99
  :borderStyle="$props.borderStyle"
95
- :height="$props.height"
96
- :width="$props.width"
100
+ :padding="$props.padding"
97
101
  :class="classes"
98
- :style="style"
99
102
  v-bind="$attrs"
100
103
  >
101
104
  <template
@@ -112,6 +115,7 @@
112
115
  v-if="$props.load"
113
116
  >
114
117
  <v-progress-circular
118
+ :class="$props.class"
115
119
  class="fs-clickable-load"
116
120
  width="2"
117
121
  size="24"
@@ -123,12 +127,10 @@
123
127
  </template>
124
128
 
125
129
  <script lang="ts">
126
- import type { PropType} from "vue";
127
- import { computed, defineComponent, ref } from "vue";
128
- import type { RouteLocation } from "vue-router";
130
+ import { computed, defineComponent, type PropType, ref, type StyleValue } from "vue";
131
+ import { type RouteLocation } from "vue-router";
129
132
 
130
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
131
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
133
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
132
134
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
133
135
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
134
136
 
@@ -150,6 +152,16 @@ export default defineComponent({
150
152
  required: false,
151
153
  default: null
152
154
  },
155
+ padding: {
156
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
157
+ required: false,
158
+ default: "0"
159
+ },
160
+ class: {
161
+ type: [String, Array] as PropType<string | string[] | null>,
162
+ required: false,
163
+ default: null
164
+ },
153
165
  to: {
154
166
  type: [String, Object] as PropType<string | RouteLocation | null>,
155
167
  required: false,
@@ -213,7 +225,7 @@ export default defineComponent({
213
225
  const hover = ref(false);
214
226
  const active = ref(false);
215
227
 
216
- const style = computed((): { [key: string] : string | null | undefined } => {
228
+ const style = computed((): StyleValue => {
217
229
  if (!props.editable) {
218
230
  return {
219
231
  "--fs-clickable-border-size" : props.border ? "1px" : "0",
@@ -229,41 +241,39 @@ export default defineComponent({
229
241
  switch (props.variant) {
230
242
  case "standard":
231
243
  switch (props.color) {
232
- case ColorEnum.Dark:
233
- case ColorEnum.Light:
234
- return {
235
- "--fs-clickable-border-size" : props.border ? "1px" : "0",
236
- "--fs-clickable-border-style" : props.borderStyle,
237
- "--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
238
- "--fs-clickable-background-color" : backgrounds.base,
239
- "--fs-clickable-border-color" : lights.dark,
240
- "--fs-clickable-color" : lights.lightContrast,
241
- "--fs-clickable-hover-background-color" : lights.base,
242
- "--fs-clickable-hover-border-color" : lights.dark,
243
- "--fs-clickable-hover-color" : lights.baseContrast,
244
- "--fs-clickable-active-background-color": lights.dark,
245
- "--fs-clickable-active-border-color" : lights.dark,
246
- "--fs-clickable-active-color" : lights.darkContrast,
247
- "--fs-clickable-height" : sizeToVar(props.height),
248
- "--fs-clickable-width" : sizeToVar(props.width)
249
- };
250
- default:
251
- return {
252
- "--fs-clickable-border-size" : props.border ? "1px" : "0",
253
- "--fs-clickable-border-style" : props.borderStyle,
254
- "--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
255
- "--fs-clickable-background-color" : colors.value.light,
256
- "--fs-clickable-border-color" : colors.value.lightContrast,
257
- "--fs-clickable-color" : colors.value.lightContrast,
258
- "--fs-clickable-hover-background-color" : colors.value.base,
259
- "--fs-clickable-hover-border-color" : colors.value.base,
260
- "--fs-clickable-hover-color" : colors.value.baseContrast,
261
- "--fs-clickable-active-background-color": colors.value.dark,
262
- "--fs-clickable-active-border-color" : colors.value.darkContrast,
263
- "--fs-clickable-active-color" : colors.value.darkContrast,
264
- "--fs-clickable-height" : sizeToVar(props.height),
265
- "--fs-clickable-width" : sizeToVar(props.width)
266
- };
244
+ case ColorEnum.Dark :
245
+ case ColorEnum.Light: return {
246
+ "--fs-clickable-border-size" : props.border ? "1px" : "0",
247
+ "--fs-clickable-border-style" : props.borderStyle,
248
+ "--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
249
+ "--fs-clickable-background-color" : backgrounds.base,
250
+ "--fs-clickable-border-color" : lights.dark,
251
+ "--fs-clickable-color" : lights.lightContrast!,
252
+ "--fs-clickable-hover-background-color" : lights.base,
253
+ "--fs-clickable-hover-border-color" : lights.dark,
254
+ "--fs-clickable-hover-color" : lights.baseContrast!,
255
+ "--fs-clickable-active-background-color": lights.dark,
256
+ "--fs-clickable-active-border-color" : lights.dark,
257
+ "--fs-clickable-active-color" : lights.darkContrast!,
258
+ "--fs-clickable-height" : sizeToVar(props.height),
259
+ "--fs-clickable-width" : sizeToVar(props.width)
260
+ };
261
+ default: return {
262
+ "--fs-clickable-border-size" : props.border ? "1px" : "0",
263
+ "--fs-clickable-border-style" : props.borderStyle,
264
+ "--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
265
+ "--fs-clickable-background-color" : colors.value.light,
266
+ "--fs-clickable-border-color" : colors.value.lightContrast!,
267
+ "--fs-clickable-color" : colors.value.lightContrast!,
268
+ "--fs-clickable-hover-background-color" : colors.value.base,
269
+ "--fs-clickable-hover-border-color" : colors.value.base,
270
+ "--fs-clickable-hover-color" : colors.value.baseContrast!,
271
+ "--fs-clickable-active-background-color": colors.value.dark,
272
+ "--fs-clickable-active-border-color" : colors.value.darkContrast!,
273
+ "--fs-clickable-active-color" : colors.value.darkContrast!,
274
+ "--fs-clickable-height" : sizeToVar(props.height),
275
+ "--fs-clickable-width" : sizeToVar(props.width)
276
+ };
267
277
  }
268
278
  case "background": return {
269
279
  "--fs-clickable-border-size" : props.border ? "1px" : "0",
@@ -273,11 +283,11 @@ export default defineComponent({
273
283
  "--fs-clickable-border-color" : lights.dark,
274
284
  "--fs-clickable-color" : darks.base,
275
285
  "--fs-clickable-hover-background-color" : colors.value.base,
276
- "--fs-clickable-hover-border-color" : colors.value.baseContrast,
277
- "--fs-clickable-hover-color" : colors.value.baseContrast,
286
+ "--fs-clickable-hover-border-color" : colors.value.baseContrast!,
287
+ "--fs-clickable-hover-color" : colors.value.baseContrast!,
278
288
  "--fs-clickable-active-background-color": colors.value.dark,
279
- "--fs-clickable-active-border-color" : colors.value.darkContrast,
280
- "--fs-clickable-active-color" : colors.value.darkContrast,
289
+ "--fs-clickable-active-border-color" : colors.value.darkContrast!,
290
+ "--fs-clickable-active-color" : colors.value.darkContrast!,
281
291
  "--fs-clickable-height" : sizeToVar(props.height),
282
292
  "--fs-clickable-width" : sizeToVar(props.width)
283
293
  };
@@ -287,13 +297,13 @@ export default defineComponent({
287
297
  "--fs-clickable-border-radius" : sizeToVar(props.borderRadius),
288
298
  "--fs-clickable-background-color" : colors.value.base,
289
299
  "--fs-clickable-border-color" : colors.value.base,
290
- "--fs-clickable-color" : colors.value.baseContrast,
300
+ "--fs-clickable-color" : colors.value.baseContrast!,
291
301
  "--fs-clickable-hover-background-color" : colors.value.base,
292
302
  "--fs-clickable-hover-border-color" : colors.value.base,
293
- "--fs-clickable-hover-color" : colors.value.baseContrast,
303
+ "--fs-clickable-hover-color" : colors.value.baseContrast!,
294
304
  "--fs-clickable-active-background-color": colors.value.dark,
295
305
  "--fs-clickable-active-border-color" : colors.value.dark,
296
- "--fs-clickable-active-color" : colors.value.darkContrast,
306
+ "--fs-clickable-active-color" : colors.value.darkContrast!,
297
307
  "--fs-clickable-height" : sizeToVar(props.height),
298
308
  "--fs-clickable-width" : sizeToVar(props.width)
299
309
  };
@@ -52,10 +52,10 @@
52
52
  </template>
53
53
 
54
54
  <script lang="ts">
55
- import { computed, defineComponent, type PropType, ref, watch } from "vue";
55
+ import { computed, defineComponent, type PropType, ref, type StyleValue, watch } from "vue";
56
56
 
57
57
  import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
58
- import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
58
+ import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
59
59
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
60
60
 
61
61
  import FSSlider from "./FSSlider.vue";
@@ -98,7 +98,7 @@ export default defineComponent({
98
98
  },
99
99
  emits: ["update:modelValue"],
100
100
  setup(props, { emit }) {
101
- const { epochToLongDateFormat } = useAppTimeZone();
101
+ const { epochToLongDateFormat } = useDateFormat();
102
102
  const { getColors } = useColors();
103
103
 
104
104
  const colors = computed(() => getColors(props.color));
@@ -109,7 +109,7 @@ export default defineComponent({
109
109
  const innerHours = ref(0);
110
110
  const innerMinutes = ref(0);
111
111
 
112
- const style = computed((): { [key: string] : string | null | undefined } => {
112
+ const style = computed((): StyleValue => {
113
113
  if (!props.editable) {
114
114
  return {
115
115
  "--fs-clock-field-cursor" : "default",
@@ -9,8 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script lang="ts">
12
- import type { PropType } from "vue";
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
 
@@ -49,7 +48,7 @@ export default defineComponent({
49
48
  }
50
49
  },
51
50
  setup(props) {
52
- const style = computed((): { [key: string] : string | null | undefined } => ({
51
+ const style = computed((): StyleValue => ({
53
52
  "--fs-col-overflow": props.overflow,
54
53
  "--fs-col-padding" : sizeToVar(props.padding),
55
54
  "--fs-col-gap" : sizeToVar(props.gap),
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <FSCard
3
+ :variant="$props.variant"
3
4
  :border="$props.border"
4
- :class="classes"
5
- :style="style"
5
+ :color="$props.color"
6
6
  v-bind="$attrs"
7
7
  >
8
8
  <slot
@@ -12,11 +12,9 @@
12
12
  </template>
13
13
 
14
14
  <script lang="ts">
15
- import type { PropType } from "vue";
16
- import { computed, defineComponent } from "vue";
15
+ import { computed, defineComponent, type PropType } from "vue";
17
16
 
18
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
19
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
17
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
20
18
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
21
19
 
22
20
  import FSCard from "./FSCard.vue";
@@ -27,15 +25,20 @@ export default defineComponent({
27
25
  FSCard
28
26
  },
29
27
  props: {
30
- border: {
31
- type: Boolean,
28
+ variant: {
29
+ type: String as PropType<"standard" | "full">,
32
30
  required: false,
33
- default: true
31
+ default: "standard"
34
32
  },
35
33
  color: {
36
34
  type: String as PropType<ColorBase>,
37
35
  required: false,
38
36
  default: ColorEnum.Primary
37
+ },
38
+ border: {
39
+ type: Boolean,
40
+ required: false,
41
+ default: true
39
42
  }
40
43
  },
41
44
  setup(props) {
@@ -43,29 +46,8 @@ export default defineComponent({
43
46
 
44
47
  const colors = computed(() => getColors(props.color));
45
48
 
46
- const style = computed((): { [key: string] : string | null | undefined } => {
47
- return {
48
- "--fs-color-background-color": colors.value.light,
49
- "--fs-color-border-color" : colors.value.lightContrast,
50
- "--fs-color-color" : colors.value.lightContrast,
51
- "--fs-color-light" : colors.value.light,
52
- "--fs-color-base" : colors.value.base,
53
- "--fs-color-dark" : colors.value.dark
54
- };
55
- });
56
-
57
- const classes = computed((): string[] => {
58
- const classNames = ["fs-color"];
59
- if (props.border) {
60
- classNames.push("fs-color-border");
61
- }
62
- return classNames;
63
- });
64
-
65
49
  return {
66
- classes,
67
- colors,
68
- style
50
+ colors
69
51
  };
70
52
  }
71
53
  });
@@ -3,15 +3,15 @@
3
3
  class="fs-color-icon"
4
4
  :color="$props.color"
5
5
  :border="false"
6
- :height="size"
7
- :width="size"
6
+ :height="actualSize"
7
+ :width="actualSize"
8
8
  >
9
9
  <FSRow
10
10
  align="center-center"
11
11
  >
12
12
  <FSIcon
13
13
  :color="$props.color"
14
- :size="$props.size"
14
+ :size="iconSize"
15
15
  >
16
16
  <slot />
17
17
  </FSIcon>
@@ -20,13 +20,13 @@
20
20
  </template>
21
21
 
22
22
  <script lang="ts">
23
- import type { PropType } from "vue";
24
- import { computed, defineComponent } from "vue";
23
+ import { computed, defineComponent, type PropType } from "vue";
25
24
 
26
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
27
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
25
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
28
26
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
29
27
 
28
+ import { sizeToVar } from "../utils";
29
+
30
30
  import FSColor from "./FSColor.vue";
31
31
  import FSIcon from "./FSIcon.vue";
32
32
  import FSRow from "./FSRow.vue";
@@ -48,12 +48,17 @@ export default defineComponent({
48
48
  type: String as PropType<ColorBase>,
49
49
  required: false,
50
50
  default: ColorEnum.Dark
51
+ },
52
+ padding: {
53
+ type: [String, Number] as PropType<string | number>,
54
+ required: false,
55
+ default: "8px"
51
56
  }
52
57
  },
53
58
  setup(props) {
54
59
  const { isMobileSized } = useBreakpoints();
55
60
 
56
- const size = computed((): string[] | number[] | string | number | null => {
61
+ const actualSize = computed((): string[] | number[] | string | number | null => {
57
62
  switch(props.size) {
58
63
  case "s": return isMobileSized.value ? "18px" : "20px";
59
64
  case "m": return isMobileSized.value ? "20px" : "26px";
@@ -62,8 +67,19 @@ export default defineComponent({
62
67
  }
63
68
  });
64
69
 
70
+ const iconSize = computed((): string => {
71
+ switch(props.size) {
72
+ case "s":
73
+ case "m":
74
+ case "l":
75
+ return props.size;
76
+ default: return `calc(${sizeToVar(props.size)} - ${sizeToVar(props.padding)})`;
77
+ }
78
+ });
79
+
65
80
  return {
66
- size
81
+ actualSize,
82
+ iconSize
67
83
  };
68
84
  }
69
85
  });
@@ -29,8 +29,7 @@
29
29
  </template>
30
30
 
31
31
  <script lang="ts">
32
- import type { PropType } from "vue";
33
- import { computed, defineComponent } from "vue";
32
+ import { computed, defineComponent, type PropType } from "vue";
34
33
 
35
34
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
36
35