@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
@@ -1,22 +1,23 @@
1
1
  <template>
2
2
  <FSWrapGroup
3
- v-if="['wrap'].includes($props.variant)"
3
+ v-if="['wrap'].includes(props.variant)"
4
4
  class="fs-option-group"
5
- :padding="$props.padding"
6
- :gap="$props.gap"
5
+ :padding="props.padding"
6
+ :gap="props.gap"
7
7
  :style="style"
8
8
  >
9
9
  <template
10
- v-if="$props.values.length"
10
+ v-if="props.values.length"
11
11
  >
12
12
  <template
13
13
  v-if="!$slots.item"
14
14
  >
15
15
  <FSOptionItem
16
- v-for="(item, index) in $props.values"
16
+ v-for="(item, index) in props.values"
17
+ :padding="props.optionPadding"
18
+ :editable="props.editable"
17
19
  :prependIcon="item.prependIcon"
18
20
  :appendIcon="item.appendIcon"
19
- :editable="$props.editable"
20
21
  :variant="getVariant(item)"
21
22
  :color="getColor(item)"
22
23
  :class="getClass(item)"
@@ -30,7 +31,7 @@
30
31
  v-else
31
32
  >
32
33
  <template
33
- v-for="item in $props.values"
34
+ v-for="item in props.values"
34
35
  >
35
36
  <slot
36
37
  name="item"
@@ -47,21 +48,22 @@
47
48
  <FSSlideGroup
48
49
  v-else
49
50
  class="fs-option-group"
50
- :padding="$props.padding"
51
- :gap="$props.gap"
51
+ :padding="props.padding"
52
+ :gap="props.gap"
52
53
  :style="style"
53
54
  >
54
55
  <template
55
- v-if="$props.values.length"
56
+ v-if="props.values.length"
56
57
  >
57
58
  <template
58
59
  v-if="!$slots.item"
59
60
  >
60
61
  <FSOptionItem
61
- v-for="(item, index) in $props.values"
62
+ v-for="(item, index) in props.values"
63
+ :padding="props.optionPadding"
64
+ :editable="props.editable"
62
65
  :prependIcon="item.prependIcon"
63
66
  :appendIcon="item.appendIcon"
64
- :editable="$props.editable"
65
67
  :variant="getVariant(item)"
66
68
  :color="getColor(item)"
67
69
  :class="getClass(item)"
@@ -75,7 +77,7 @@
75
77
  v-else
76
78
  >
77
79
  <template
78
- v-for="item in $props.values"
80
+ v-for="item in props.values"
79
81
  >
80
82
  <slot
81
83
  name="item"
@@ -92,12 +94,11 @@
92
94
  </template>
93
95
 
94
96
  <script lang="ts">
95
- import { computed, defineComponent, PropType } from "vue";
97
+ import { computed, defineComponent, type PropType } from "vue";
96
98
 
97
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
99
+ import { type ColorBase, ColorEnum, type FSToggle } from "@dative-gpi/foundation-shared-components/models";
98
100
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
99
101
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
100
- import { FSToggle } from "@dative-gpi/foundation-shared-components/models";
101
102
 
102
103
  import FSOptionItem from "./FSOptionItem.vue";
103
104
  import FSSlideGroup from "./FSSlideGroup.vue";
@@ -176,6 +177,11 @@ export default defineComponent({
176
177
  required: false,
177
178
  default: "3px"
178
179
  },
180
+ optionPadding: {
181
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
182
+ required: false,
183
+ default: "4px"
184
+ },
179
185
  gap: {
180
186
  type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
181
187
  required: false,
@@ -202,14 +208,15 @@ export default defineComponent({
202
208
  const { getColors } = useColors();
203
209
 
204
210
  const lights = getColors(ColorEnum.Light);
205
-
211
+ const backgrounds = getColors(ColorEnum.Background);
206
212
  const colors = getColors(props.optionColor);
207
213
 
208
214
  const style = computed((): { [key: string] : string | null | undefined } => {
209
215
  return {
210
- "--fs-option-group-border-size" : props.border ? "1px" : "0",
211
- "--fs-option-group-border-radius": sizeToVar(props.borderRadius),
212
- "--fs-option-group-border-color" : lights.base
216
+ "--fs-option-group-background-color": backgrounds.base,
217
+ "--fs-option-group-border-size" : props.border ? "1px" : "0",
218
+ "--fs-option-group-border-radius" : sizeToVar(props.borderRadius),
219
+ "--fs-option-group-border-color" : lights.base
213
220
  };
214
221
  });
215
222
 
@@ -289,6 +296,7 @@ export default defineComponent({
289
296
  };
290
297
 
291
298
  return {
299
+ props,
292
300
  style,
293
301
  getVariant,
294
302
  getColor,
@@ -1,13 +1,12 @@
1
1
  <template>
2
2
  <FSClickable
3
- padding="4px"
4
3
  :editable="$props.editable"
5
4
  :height="['32px', '28px']"
5
+ :padding="$props.padding"
6
6
  :variant="$props.variant"
7
7
  :color="$props.color"
8
8
  :load="$props.load"
9
9
  :border="false"
10
- :width="width"
11
10
  @click.stop="onClick"
12
11
  v-bind="$attrs"
13
12
  >
@@ -52,10 +51,9 @@
52
51
  </template>
53
52
 
54
53
  <script lang="ts">
55
- import { computed, defineComponent, PropType } from "vue";
54
+ import { computed, defineComponent, type PropType } from "vue";
56
55
 
57
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
58
- import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
56
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
59
57
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
60
58
 
61
59
  import FSClickable from "./FSClickable.vue";
@@ -97,16 +95,16 @@ export default defineComponent({
97
95
  required: false,
98
96
  default: "standard"
99
97
  },
100
- ItemWidth: {
101
- type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
102
- required: false,
103
- default: () => ["32px","28px"]
104
- },
105
98
  color: {
106
99
  type: String as PropType<ColorBase>,
107
100
  required: false,
108
101
  default: ColorEnum.Primary
109
102
  },
103
+ padding: {
104
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
105
+ required: false,
106
+ default: "4px"
107
+ },
110
108
  load: {
111
109
  type: Boolean,
112
110
  required: false,
@@ -124,13 +122,6 @@ export default defineComponent({
124
122
 
125
123
  const colors = computed(() => getColors(props.color));
126
124
 
127
- const width = computed((): string => {
128
- if (props.label) {
129
- return "fit-content";
130
- }
131
- return sizeToVar(varToSize(props.ItemWidth));
132
- });
133
-
134
125
  const onClick = (event: MouseEvent) => {
135
126
  if (props.editable && !props.load) {
136
127
  emit("click", event);
@@ -139,7 +130,6 @@ export default defineComponent({
139
130
 
140
131
  return {
141
132
  colors,
142
- width,
143
133
  onClick
144
134
  };
145
135
  }
@@ -16,9 +16,11 @@
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
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
22
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
23
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
22
24
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
23
25
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
24
26
 
@@ -8,16 +8,18 @@
8
8
  :rules="$props.rules"
9
9
  :validateOn="validateOn"
10
10
  :modelValue="$props.selected"
11
- @click.prevent
12
- @blur="blurred = true"
11
+ @click.prevent.stop
13
12
  v-bind="$attrs"
14
13
  >
15
- <template #input>
14
+ <template
15
+ #input
16
+ >
16
17
  <FSRow
18
+ class="fs-radio-label"
17
19
  align="center-left"
18
20
  width="hug"
19
21
  :style="style"
20
- @click.stop="onToggle"
22
+ @click.prevent.stop="onToggle"
21
23
  >
22
24
  <FSIcon
23
25
  class="fs-radio"
@@ -26,10 +28,12 @@
26
28
  >
27
29
  {{ icon }}
28
30
  </FSIcon>
29
- <slot>
31
+ <slot
32
+ name="label"
33
+ v-bind="{ item: $props.item, font }"
34
+ >
30
35
  <FSSpan
31
36
  v-if="$props.label"
32
- class="fs-radio-label"
33
37
  :style="style"
34
38
  :font="font"
35
39
  >
@@ -39,7 +43,9 @@
39
43
  </FSRow>
40
44
  </template>
41
45
  </v-radio>
42
- <slot name="description">
46
+ <slot
47
+ name="description"
48
+ >
43
49
  <FSSpan
44
50
  v-if="$props.description"
45
51
  class="fs-radio-description"
@@ -53,10 +59,12 @@
53
59
  </template>
54
60
 
55
61
  <script lang="ts">
56
- import { computed, defineComponent, PropType } from "vue";
62
+ import type { PropType } from "vue";
63
+ import { computed, defineComponent } from "vue";
57
64
 
58
65
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
59
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
66
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
67
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
60
68
 
61
69
  import FSIcon from "./FSIcon.vue";
62
70
  import FSSpan from "./FSSpan.vue";
@@ -72,6 +80,11 @@ export default defineComponent({
72
80
  FSRow
73
81
  },
74
82
  props: {
83
+ item: {
84
+ type: Object as PropType<object | null>,
85
+ required: false,
86
+ default: null
87
+ },
75
88
  label: {
76
89
  type: String as PropType<string | null>,
77
90
  required: false,
@@ -114,7 +127,7 @@ export default defineComponent({
114
127
  },
115
128
  emits: ["update:modelValue"],
116
129
  setup(props, { emit }) {
117
- const { validateOn, blurred, getMessages } = useRules();
130
+ const { validateOn, getMessages } = useRules();
118
131
  const { getColors } = useColors();
119
132
 
120
133
  const colors = computed(() => getColors(props.color));
@@ -162,7 +175,6 @@ export default defineComponent({
162
175
  return {
163
176
  validateOn,
164
177
  messages,
165
- blurred,
166
178
  style,
167
179
  icon,
168
180
  font,
@@ -5,22 +5,35 @@
5
5
  >
6
6
  <FSRadio
7
7
  v-for="(item, index) in $props.values"
8
- :key="index"
9
- :label="item.label"
10
- :description="item.description"
11
8
  :selected="isSelected(item.value)"
12
- :color="$props.color"
9
+ :description="item.description"
13
10
  :editable="$props.editable"
11
+ :color="$props.color"
12
+ :label="item.label"
13
+ :item="item.item"
14
+ :key="index"
14
15
  :modelValue="item.value"
15
16
  @update:modelValue="onToggle"
16
- />
17
+ >
18
+ <template
19
+ v-for="(_, name) in $slots"
20
+ v-slot:[name]="slotData"
21
+ >
22
+ <slot
23
+ :name="name"
24
+ v-bind="slotData"
25
+ />
26
+ </template>
27
+ </FSRadio>
17
28
  </FSCol>
18
29
  </template>
19
30
 
20
31
  <script lang="ts">
21
- import { defineComponent, PropType } from "vue";
32
+ import type { PropType } from "vue";
33
+ import { defineComponent } from "vue";
22
34
 
23
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
35
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
36
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
24
37
 
25
38
  import FSRadio from "./FSRadio.vue";
26
39
  import FSCol from "./FSCol.vue";
@@ -38,7 +51,7 @@ export default defineComponent({
38
51
  default: "8px"
39
52
  },
40
53
  values: {
41
- type: Array as PropType<{ value: string | boolean | number, label?: string, description?: string }[]>,
54
+ type: Array as PropType<{ value: string | boolean | number, label?: string, description?: string, item: any | null }[]>,
42
55
  required: true,
43
56
  default: null
44
57
  },
@@ -60,11 +73,11 @@ export default defineComponent({
60
73
  },
61
74
  emits: ["update:modelValue"],
62
75
  setup(props, { emit }) {
63
- const isSelected = (item: String | Boolean | Number): boolean => {
76
+ const isSelected = (item: string | boolean | number): boolean => {
64
77
  return item == props.modelValue;
65
78
  };
66
79
 
67
- const onToggle = (item: String | Boolean | Number): void => {
80
+ const onToggle = (item: string | boolean | number): void => {
68
81
  if (item != props.modelValue) {
69
82
  emit("update:modelValue", item);
70
83
  }
@@ -9,7 +9,8 @@
9
9
  </template>
10
10
 
11
11
  <script lang="ts">
12
- import { computed, defineComponent, PropType } from "vue";
12
+ import type { PropType } from "vue";
13
+ import { computed, defineComponent } from "vue";
13
14
 
14
15
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
15
16
 
@@ -41,6 +42,11 @@ export default defineComponent({
41
42
  required: false,
42
43
  default: "top-left"
43
44
  },
45
+ overflow: {
46
+ type: String as PropType<"visible" | "hidden" | "scroll" | "auto" | "inherit" | "initial" | "unset">,
47
+ required: false,
48
+ default: "visible"
49
+ },
44
50
  wrap: {
45
51
  type: Boolean,
46
52
  required: false,
@@ -50,6 +56,7 @@ export default defineComponent({
50
56
  setup(props) {
51
57
  const style = computed((): { [key: string] : string | null | undefined } => ({
52
58
  "--fs-row-flex-wrap": props.wrap ? "wrap" : "nowrap",
59
+ "--fs-row-overflow" : props.overflow,
53
60
  "--fs-row-padding" : sizeToVar(props.padding),
54
61
  "--fs-row-gap" : sizeToVar(props.gap),
55
62
  "--fs-row-width" : sizeToVar(props.width),
@@ -12,7 +12,7 @@
12
12
  >
13
13
  <FSButtonPreviousIcon
14
14
  :color="ColorEnum.Dark"
15
- @click="goToPrev"
15
+ @click.prevent.stop="goToPrev"
16
16
  />
17
17
  </template>
18
18
  <template
@@ -33,14 +33,15 @@
33
33
  <FSButtonNextIcon
34
34
  :color="ColorEnum.Dark"
35
35
  :class="nextClasses"
36
- @click="goToNext"
36
+ @click.prevent.stop="goToNext"
37
37
  />
38
38
  </template>
39
39
  </v-slide-group>
40
40
  </template>
41
41
 
42
42
  <script lang="ts">
43
- import { computed, defineComponent, onMounted, onUnmounted, PropType, ref } from "vue";
43
+ import type { PropType} from "vue";
44
+ import { computed, defineComponent, onMounted, onUnmounted, ref } from "vue";
44
45
 
45
46
  import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
46
47
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -105,14 +106,32 @@ export default defineComponent({
105
106
  return classes;
106
107
  });
107
108
 
108
- const goToPrev = () => {
109
+ const goToStart = () => {
110
+ if (slideGroupRef.value) {
111
+ const scrollElement = (slideGroupRef.value as any).$el.children[1];
112
+ if (scrollElement && scrollElement.scrollTo) {
113
+ scrollElement.scrollTo({ left: -scrollElement.scrollLeft, behavior: "smooth" });
114
+ }
115
+ }
116
+ };
117
+
118
+ const goToEnd = () => {
109
119
  if (slideGroupRef.value) {
120
+ const scrollElement = (slideGroupRef.value as any).$el.children[1];
121
+ if (scrollElement && scrollElement.scrollTo) {
122
+ scrollElement.scrollTo({ left: scrollElement.scrollWidth - scrollElement.scrollLeft, behavior: "smooth" });
123
+ }
124
+ }
125
+ };
126
+
127
+ const goToPrev = () => {
128
+ if (slideGroupRef.value && (slideGroupRef.value as any).scrollTo) {
110
129
  (slideGroupRef.value as any).scrollTo("prev");
111
130
  }
112
131
  };
113
132
 
114
133
  const goToNext = () => {
115
- if (slideGroupRef.value) {
134
+ if (slideGroupRef.value && (slideGroupRef.value as any).scrollTo) {
116
135
  (slideGroupRef.value as any).scrollTo("next");
117
136
  forceActive.value = false;
118
137
  }
@@ -143,8 +162,10 @@ export default defineComponent({
143
162
  elementId,
144
163
  style,
145
164
  getChildren,
165
+ goToStart,
166
+ goToNext,
146
167
  goToPrev,
147
- goToNext
168
+ goToEnd
148
169
  };
149
170
  }
150
171
  });
@@ -64,9 +64,11 @@
64
64
  </template>
65
65
 
66
66
  <script lang="ts">
67
- import { computed, defineComponent, PropType } from "vue";
67
+ import type { PropType } from "vue";
68
+ import { computed, defineComponent } from "vue";
68
69
 
69
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
70
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
71
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
70
72
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
71
73
 
72
74
  import FSSpan from "./FSSpan.vue";
@@ -11,7 +11,8 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
- import { computed, defineComponent, PropType } from "vue";
14
+ import type { PropType } from "vue";
15
+ import { computed, defineComponent } from "vue";
15
16
 
16
17
  import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
17
18
 
@@ -20,17 +20,19 @@
20
20
  />
21
21
  <slot>
22
22
  <FSSpan
23
- v-if="$props.label"
24
- class="fs-switch-label"
25
- :style="style"
26
- :font="font"
27
- @click.stop="onToggle"
23
+ v-if="$props.label"
24
+ class="fs-switch-label"
25
+ :style="style"
26
+ :font="font"
27
+ @click.stop="onToggle"
28
28
  >
29
29
  {{ $props.label }}
30
30
  </FSSpan>
31
31
  </slot>
32
32
  </FSRow>
33
- <slot name="description">
33
+ <slot
34
+ name="description"
35
+ >
34
36
  <FSSpan
35
37
  v-if="$props.description"
36
38
  class="fs-switch-description"
@@ -44,10 +46,12 @@
44
46
  </template>
45
47
 
46
48
  <script lang="ts">
47
- import { computed, defineComponent, PropType } from "vue";
49
+ import type { PropType } from "vue";
50
+ import { computed, defineComponent } from "vue";
48
51
 
49
52
  import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
50
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
53
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
54
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
51
55
 
52
56
  import FSSpan from "./FSSpan.vue";
53
57
  import FSCol from "./FSCol.vue";
@@ -99,7 +103,7 @@ export default defineComponent({
99
103
  },
100
104
  emits: ["update:modelValue"],
101
105
  setup(props, { emit }) {
102
- const { validateOn, blurred, getMessages } = useRules();
106
+ const { validateOn, getMessages } = useRules();
103
107
  const { getColors } = useColors();
104
108
 
105
109
  const colors = computed(() => getColors(props.color));
@@ -150,7 +154,6 @@ export default defineComponent({
150
154
  return {
151
155
  validateOn,
152
156
  messages,
153
- blurred,
154
157
  style,
155
158
  font,
156
159
  onToggle
@@ -55,9 +55,11 @@
55
55
  </template>
56
56
 
57
57
  <script lang="ts">
58
- import { defineComponent, PropType } from "vue";
58
+ import type { PropType } from "vue";
59
+ import { defineComponent } from "vue";
59
60
 
60
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
61
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
62
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
61
63
 
62
64
  import FSSpan from "./FSSpan.vue";
63
65
  import FSIcon from "./FSIcon.vue";
@@ -10,22 +10,15 @@
10
10
  @update:modelValue="$emit('update:tab', $event)"
11
11
  v-bind="$attrs"
12
12
  >
13
- <template
14
- v-for="(component, index) in getChildren()"
15
- :key="index"
16
- >
17
- <component
18
- :is="component"
19
- />
20
- </template>
13
+ <slot/>
21
14
  </v-tabs>
22
15
  </template>
23
16
 
24
17
  <script lang="ts">
25
- import { computed, defineComponent, PropType } from "vue";
18
+ import { computed, defineComponent, type PropType } from "vue";
26
19
 
27
- import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
28
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
20
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
21
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
29
22
 
30
23
  export default defineComponent({
31
24
  name: "FSTabs",
@@ -42,7 +35,6 @@ export default defineComponent({
42
35
  }
43
36
  },
44
37
  setup(props) {
45
- const { getChildren } = useSlots();
46
38
  const { getColors } = useColors();
47
39
 
48
40
  const colors = computed(() => getColors(props.color));
@@ -60,8 +52,7 @@ export default defineComponent({
60
52
  }));
61
53
 
62
54
  return {
63
- style,
64
- getChildren
55
+ style
65
56
  };
66
57
  }
67
58
  });
@@ -7,7 +7,9 @@
7
7
  :wrap="false"
8
8
  v-bind="$attrs"
9
9
  >
10
- <slot v-bind="{ color: $props.color, colors }">
10
+ <slot
11
+ v-bind="{ color: $props.color, colors }"
12
+ >
11
13
  <FSSpan
12
14
  v-if="$props.label"
13
15
  class="fs-tag-label"
@@ -15,7 +17,10 @@
15
17
  {{ $props.label }}
16
18
  </FSSpan>
17
19
  </slot>
18
- <slot name="button" v-bind="{ color: $props.color, colors }">
20
+ <slot
21
+ name="button"
22
+ v-bind="{ color: $props.color, colors }"
23
+ >
19
24
  <v-btn
20
25
  v-if="$props.editable"
21
26
  class="fs-tag-button"
@@ -33,9 +38,11 @@
33
38
  </template>
34
39
 
35
40
  <script lang="ts">
36
- import { computed, defineComponent, PropType } from "vue";
41
+ import type { PropType } from "vue";
42
+ import { computed, defineComponent } from "vue";
37
43
 
38
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
44
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
45
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
39
46
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
40
47
 
41
48
  import FSIcon from "./FSIcon.vue";
@@ -32,9 +32,11 @@
32
32
  </template>
33
33
 
34
34
  <script lang="ts">
35
- import { defineComponent, PropType } from "vue";
35
+ import type { PropType } from "vue";
36
+ import { defineComponent } from "vue";
36
37
 
37
- import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
38
+ import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
39
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
38
40
 
39
41
  import FSWrapGroup from "./FSWrapGroup.vue";
40
42
  import FSTag from "./FSTag.vue";