@dative-gpi/foundation-shared-components 0.0.11 → 0.0.13

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 (98) hide show
  1. package/aliases/FSButton.ts +8 -6
  2. package/components/FSBreadcrumbs.vue +3 -1
  3. package/components/FSButton.vue +13 -10
  4. package/components/FSCalendar.vue +4 -3
  5. package/components/FSCalendarTwin.vue +4 -3
  6. package/components/FSCarousel.vue +3 -1
  7. package/components/FSCheckbox.vue +8 -6
  8. package/components/FSChip.vue +5 -3
  9. package/components/FSClock.vue +50 -34
  10. package/components/FSColor.vue +3 -1
  11. package/components/FSColorIcon.vue +3 -1
  12. package/components/FSContainer.vue +4 -2
  13. package/components/FSDivider.vue +49 -8
  14. package/components/FSFadeOut.vue +3 -1
  15. package/components/FSFileButton.vue +4 -3
  16. package/components/FSForm.vue +52 -0
  17. package/components/FSImage.vue +42 -33
  18. package/components/FSLabel.vue +105 -0
  19. package/components/FSLink.vue +95 -0
  20. package/components/FSPagination.vue +96 -0
  21. package/components/FSPermissions.vue +0 -0
  22. package/components/FSRadio.vue +8 -6
  23. package/components/FSRemoveDialog.vue +1 -1
  24. package/components/FSSlideGroup.vue +2 -1
  25. package/components/FSSlider.vue +5 -3
  26. package/components/FSSubmitDialog.vue +2 -2
  27. package/components/FSSwitch.vue +9 -7
  28. package/components/FSTabs.vue +4 -3
  29. package/components/FSTag.vue +4 -2
  30. package/components/FSText.vue +3 -2
  31. package/components/FSWrapGroup.vue +2 -1
  32. package/components/deviceOrganisations/FSConnectivity.vue +2 -1
  33. package/components/deviceOrganisations/FSWorstAlert.vue +2 -1
  34. package/components/{FSAutocompleteField.vue → fields/FSAutocompleteField.vue} +25 -22
  35. package/components/fields/FSColorField.vue +194 -0
  36. package/components/{FSDateField.vue → fields/FSDateField.vue} +18 -52
  37. package/components/{FSDateRangeField.vue → fields/FSDateRangeField.vue} +22 -67
  38. package/components/{FSDateTimeField.vue → fields/FSDateTimeField.vue} +20 -54
  39. package/components/{FSDateTimeRangeField.vue → fields/FSDateTimeRangeField.vue} +27 -70
  40. package/components/{FSIconField.vue → fields/FSIconField.vue} +20 -53
  41. package/components/{FSNumberField.vue → fields/FSNumberField.vue} +0 -24
  42. package/components/{FSPasswordField.vue → fields/FSPasswordField.vue} +9 -31
  43. package/components/{FSRichTextField.vue → fields/FSRichTextField.vue} +10 -9
  44. package/components/{FSSearchField.vue → fields/FSSearchField.vue} +47 -14
  45. package/components/{FSSelectField.vue → fields/FSSelectField.vue} +22 -24
  46. package/components/{FSTagField.vue → fields/FSTagField.vue} +19 -53
  47. package/components/{FSTextArea.vue → fields/FSTextArea.vue} +28 -27
  48. package/components/{FSTextField.vue → fields/FSTextField.vue} +23 -21
  49. package/components/fields/FSTimeField.vue +104 -0
  50. package/components/fields/FSTimeSlotField.vue +263 -0
  51. package/components/lists/FSDataTableUI.vue +7 -6
  52. package/components/lists/FSFilterButton.vue +25 -17
  53. package/components/lists/FSHiddenButton.vue +1 -0
  54. package/components/lists/FSLoadDataTable.vue +88 -0
  55. package/components/tiles/FSDeviceOrganisationTileUI.vue +5 -10
  56. package/components/tiles/FSGroupTileUI.vue +5 -10
  57. package/components/{FSLoadTile.vue → tiles/FSLoadTile.vue} +9 -7
  58. package/components/{FSTile.vue → tiles/FSTile.vue} +5 -4
  59. package/composables/index.ts +2 -0
  60. package/composables/useBreakpoints.ts +7 -5
  61. package/composables/useDebounce.ts +22 -0
  62. package/composables/useRules.ts +72 -0
  63. package/elements/FSFormElement.ts +17 -0
  64. package/icons/flags/France.vue +9 -0
  65. package/icons/flags/Germany.vue +7 -0
  66. package/icons/flags/GreatBritain.vue +9 -0
  67. package/icons/flags/Italy.vue +9 -0
  68. package/icons/flags/Portugal.vue +59 -0
  69. package/icons/flags/Spain.vue +546 -0
  70. package/icons/flags/UnitedStates.vue +12 -0
  71. package/icons/sets.ts +17 -0
  72. package/models/rules.ts +10 -1
  73. package/package.json +6 -4
  74. package/pages/FSExternalIdentityButton.vue +64 -0
  75. package/pages/FSLanguageSetter.vue +140 -0
  76. package/pages/FSLoginPage.vue +253 -0
  77. package/styles/components/fs_clock.scss +4 -0
  78. package/styles/components/fs_color_field.scss +17 -0
  79. package/styles/components/fs_divider.scss +5 -0
  80. package/styles/components/fs_image.scss +12 -1
  81. package/styles/components/fs_label.scss +86 -0
  82. package/styles/components/fs_link.scss +6 -0
  83. package/styles/components/fs_load_data_table.scss +77 -0
  84. package/styles/components/fs_pagination.scss +11 -0
  85. package/styles/components/fs_time_field.scss +3 -0
  86. package/styles/components/fs_timeslot_field.scss +75 -0
  87. package/styles/components/index.scss +7 -0
  88. package/styles/globals/text_fonts.scss +18 -0
  89. package/styles/main.scss +3 -1
  90. package/styles/pages/fs_language_setter.scss +55 -0
  91. package/styles/pages/index.scss +1 -0
  92. package/utils/color.ts +7 -0
  93. package/utils/css.ts +2 -1
  94. package/utils/index.ts +3 -1
  95. package/utils/time.ts +29 -0
  96. package/components/FSHeaderButton.vue +0 -17
  97. package/components/lists/FSDataIteratorGroup.vue +0 -7
  98. package/index.ts +0 -6
@@ -2,6 +2,7 @@
2
2
  <v-img
3
3
  class="fs-image"
4
4
  :src="source"
5
+ :style="style"
5
6
  :cover="$props.cover"
6
7
  :width="computedWidth"
7
8
  :height="computedHeight"
@@ -9,23 +10,27 @@
9
10
  >
10
11
  <template #placeholder>
11
12
  <v-skeleton-loader
13
+ class="fs-load-image"
12
14
  type="image"
15
+ :style="style"
13
16
  />
14
17
  </template>
15
18
  </v-img>
16
19
  </template>
17
20
 
18
21
  <script lang="ts">
19
- import { computed, defineComponent, onMounted } from "vue";
22
+ import { computed, defineComponent, onMounted, watch } from "vue";
20
23
 
21
- import { useImageRaw, useImageBlurHash } from "@dative-gpi/foundation-shared-services";
24
+ import { useImageRaw, useImageBlurHash } from "@dative-gpi/foundation-shared-services/composables";
25
+ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
22
26
 
23
27
  export default defineComponent({
24
28
  name: "FSImage",
25
29
  props: {
26
30
  imageId: {
27
- type: String,
28
- required: true
31
+ type: [String, null, undefined],
32
+ required: false,
33
+ default: null
29
34
  },
30
35
  cover: {
31
36
  type: Boolean,
@@ -33,12 +38,12 @@ export default defineComponent({
33
38
  default: true
34
39
  },
35
40
  width: {
36
- type: Number,
41
+ type: [String, Number],
37
42
  required: false,
38
43
  default: null
39
44
  },
40
45
  height: {
41
- type: Number,
46
+ type: [String, Number],
42
47
  required: false,
43
48
  default: null
44
49
  },
@@ -46,17 +51,31 @@ export default defineComponent({
46
51
  type: String,
47
52
  required: false,
48
53
  default: null
54
+ },
55
+ borderRadius: {
56
+ type: [String, Number],
57
+ required: false,
58
+ default: "4px"
49
59
  }
50
60
  },
51
61
  setup(props) {
52
- const { fetching: fetchingRaw, fetch: fetchRaw, fetched: image } = useImageRaw();
53
- const { fetching: fetchingBlurHash, fetch: fetchBlurHash, fetched: blurHash } = useImageBlurHash();
62
+ const { getting: fetchingRaw, get: fetchRaw, entity: image } = useImageRaw();
63
+ const { getting: fetchingBlurHash, get: fetchBlurHash, entity: blurHash } = useImageBlurHash();
54
64
 
55
- const computedWidth = computed((): number => {
65
+ const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
66
+ return {
67
+ "--fs-image-border-radius": sizeToVar(props.borderRadius)
68
+ }
69
+ });
70
+
71
+ const computedWidth = computed((): number | string | undefined => {
56
72
  if (props.width) {
57
73
  return props.width;
58
74
  }
59
75
  if (props.height) {
76
+ if (typeof(props.height) === "string") {
77
+ return undefined;
78
+ }
60
79
  if (props.aspectRatio) {
61
80
  const split = props.aspectRatio.split('/');
62
81
  if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
@@ -65,14 +84,17 @@ export default defineComponent({
65
84
  }
66
85
  return props.height;
67
86
  }
68
- return 0;
87
+ return undefined;
69
88
  });
70
89
 
71
- const computedHeight = computed((): number => {
90
+ const computedHeight = computed((): number | string | undefined => {
72
91
  if (props.height) {
73
92
  return props.height;
74
93
  }
75
94
  if (props.width) {
95
+ if (typeof(props.width) === "string") {
96
+ return undefined;
97
+ }
76
98
  if (props.aspectRatio) {
77
99
  const split = props.aspectRatio.split('/');
78
100
  if (split.length === 2 && !isNaN(parseFloat(split[0])) && !isNaN(parseFloat(split[1]))) {
@@ -81,7 +103,7 @@ export default defineComponent({
81
103
  }
82
104
  return props.width;
83
105
  }
84
- return 0;
106
+ return undefined;
85
107
  });
86
108
 
87
109
  const source = computed((): string | null => {
@@ -100,32 +122,18 @@ export default defineComponent({
100
122
  return null;
101
123
  });
102
124
 
103
- // const pixels = () => {
104
- // if (this.value && this.isValid)
105
- // return decode(this.value, this.width, this.height, this.punch);
106
- // return [];
107
- // }
108
-
109
- // const isValid = () => {
110
- // return this.value && isBlurhashValid(this.value).result;
111
- // }
112
-
113
- // const reset = () => {
114
- // const ctx = (this.$el as HTMLCanvasElement).getContext("2d");
115
- // this.$nextTick(() => {
116
- // if (this.pixels.length) {
117
- // const imageData = ctx!.createImageData(this.width, this.height);
118
- // imageData.data.set(this.pixels);
119
- // ctx!.putImageData(imageData, 0, 0);
120
- // }
121
- // });
122
- // }
123
-
124
125
  onMounted(() => {
125
126
  fetch();
126
127
  });
127
128
 
129
+ watch(() => props.imageId, () => {
130
+ fetch();
131
+ });
132
+
128
133
  const fetch = async () => {
134
+ if (!props.imageId) {
135
+ return;
136
+ }
129
137
  await fetchRaw(props.imageId);
130
138
  if (!image.value) {
131
139
  await fetchBlurHash(props.imageId);
@@ -133,6 +141,7 @@ export default defineComponent({
133
141
  }
134
142
 
135
143
  return {
144
+ style,
136
145
  source,
137
146
  computedWidth,
138
147
  computedHeight
@@ -0,0 +1,105 @@
1
+ <template>
2
+ <span
3
+ v-if="$props.label"
4
+ :class="classes"
5
+ :style="style"
6
+ v-bind="$attrs"
7
+ >
8
+ {{ $props.label }}
9
+ </span>
10
+ <v-skeleton-loader
11
+ v-else
12
+ type="text"
13
+ :class="loadClasses"
14
+ />
15
+ </template>
16
+
17
+ <script lang="ts">
18
+ import { computed, defineComponent, PropType } from "vue";
19
+
20
+ import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
21
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
22
+
23
+ export default defineComponent({
24
+ name: "FSLabel",
25
+ props: {
26
+ label: {
27
+ type: [String, null, undefined],
28
+ required: false,
29
+ default: null
30
+ },
31
+ font: {
32
+ type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
33
+ required: false,
34
+ default: "text-body"
35
+ },
36
+ lineClamp: {
37
+ type: Number,
38
+ required: false,
39
+ default: 1
40
+ },
41
+ ellipsis: {
42
+ type: Boolean,
43
+ required: false,
44
+ default: true
45
+ },
46
+ color: {
47
+ type: String as PropType<ColorBase>,
48
+ required: false,
49
+ default: ColorEnum.Dark
50
+ },
51
+ variant: {
52
+ type: String as PropType<"base" | "light" | "dark">,
53
+ required: false,
54
+ default: "dark"
55
+ }
56
+ },
57
+ setup(props) {
58
+ const { getColors } = useColors();
59
+ const { slots } = useSlots();
60
+
61
+ const colors = computed(() => getColors(props.color));
62
+
63
+ const classes = computed((): string[] => {
64
+ const classNames = ["fs-label", props.font];
65
+ if (!slots.default) {
66
+ classNames.push("fs-span-pre-wrap");
67
+ }
68
+ if (props.lineClamp > 1) {
69
+ classNames.push("fs-span-line-clamp");
70
+ }
71
+ else if (props.ellipsis) {
72
+ classNames.push("fs-span-ellipsis");
73
+ }
74
+ return classNames;
75
+ });
76
+
77
+ const loadClasses = computed((): string[] => {
78
+ return ["fs-load-label", props.font];
79
+ });
80
+
81
+ const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
82
+ switch (props.variant) {
83
+ case "base": return {
84
+ "--fs-span-line-clamp": props.lineClamp.toString(),
85
+ "--fs-label-color" : colors.value.base
86
+ };
87
+ case "light": return {
88
+ "--fs-span-line-clamp": props.lineClamp.toString(),
89
+ "--fs-label-color" : colors.value.light
90
+ };
91
+ case "dark": return {
92
+ "--fs-span-line-clamp": props.lineClamp.toString(),
93
+ "--fs-label-color" : colors.value.dark
94
+ };
95
+ }
96
+ });
97
+
98
+ return {
99
+ classes,
100
+ loadClasses,
101
+ style
102
+ };
103
+ }
104
+ });
105
+ </script>
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <a
3
+ :href="$props.to"
4
+ :class="classes"
5
+ :style="style"
6
+ v-bind="$attrs"
7
+ >
8
+ <slot />
9
+ </a>
10
+ </template>
11
+
12
+ <script lang="ts">
13
+ import { computed, defineComponent, PropType } from "vue";
14
+
15
+ import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
16
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
17
+
18
+ export default defineComponent({
19
+ name: "FSLink",
20
+ props: {
21
+ to: {
22
+ type: String,
23
+ required: false,
24
+ default: "_blank"
25
+ },
26
+ font: {
27
+ type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline" | "text-underline">,
28
+ required: false,
29
+ default: "text-body"
30
+ },
31
+ lineClamp: {
32
+ type: Number,
33
+ required: false,
34
+ default: 1
35
+ },
36
+ ellipsis: {
37
+ type: Boolean,
38
+ required: false,
39
+ default: true
40
+ },
41
+ color: {
42
+ type: String as PropType<ColorBase>,
43
+ required: false,
44
+ default: ColorEnum.Primary
45
+ },
46
+ variant: {
47
+ type: String as PropType<"base" | "light" | "dark">,
48
+ required: false,
49
+ default: "dark"
50
+ }
51
+ },
52
+ setup(props) {
53
+ const { getColors } = useColors();
54
+ const { slots } = useSlots();
55
+
56
+ const colors = computed(() => getColors(props.color));
57
+
58
+ const classes = computed((): string[] => {
59
+ const classNames = ["fs-link", props.font];
60
+ if (!slots.default) {
61
+ classNames.push("fs-span-pre-wrap");
62
+ }
63
+ if (props.lineClamp > 1) {
64
+ classNames.push("fs-span-line-clamp");
65
+ }
66
+ else if (props.ellipsis) {
67
+ classNames.push("fs-span-ellipsis");
68
+ }
69
+ return classNames;
70
+ });
71
+
72
+ const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
73
+ switch (props.variant) {
74
+ case "base": return {
75
+ "--fs-span-line-clamp": props.lineClamp.toString(),
76
+ "--fs-link-color" : colors.value.base
77
+ };
78
+ case "light": return {
79
+ "--fs-span-line-clamp": props.lineClamp.toString(),
80
+ "--fs-link-color" : colors.value.light
81
+ };
82
+ case "dark": return {
83
+ "--fs-span-line-clamp": props.lineClamp.toString(),
84
+ "--fs-link-color" : colors.value.dark
85
+ };
86
+ }
87
+ });
88
+
89
+ return {
90
+ classes,
91
+ style
92
+ };
93
+ }
94
+ });
95
+ </script>
@@ -0,0 +1,96 @@
1
+ <template>
2
+ <FSRow
3
+ class="fs-pagination"
4
+ align="center-center"
5
+ :width="$props.width"
6
+ :gap="$props.gap"
7
+ :style="style"
8
+ >
9
+ <div
10
+ v-for="(_, index) in $props.pages"
11
+ :class="classes(index)"
12
+ :style="style"
13
+ :key="index"
14
+ />
15
+ </FSRow>
16
+ </template>
17
+
18
+ <script lang="ts">
19
+ import { computed, defineComponent, PropType } from "vue";
20
+
21
+ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
22
+ import { useColors } from "@dative-gpi/foundation-shared-components/composables";
23
+ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
24
+
25
+ import FSRow from "./FSRow.vue";
26
+
27
+ export default defineComponent({
28
+ name: "FSPagination",
29
+ components: {
30
+ FSRow
31
+ },
32
+ props: {
33
+ width: {
34
+ type: [String, Number],
35
+ required: false,
36
+ default: null
37
+ },
38
+ gap: {
39
+ type: [String, Number],
40
+ required: false,
41
+ default: 4
42
+ },
43
+ pages: {
44
+ type: Number,
45
+ required: false,
46
+ default: 1
47
+ },
48
+ modelValue: {
49
+ type: Number,
50
+ required: false,
51
+ default: 0
52
+ },
53
+ color: {
54
+ type: String as PropType<ColorBase>,
55
+ required: false,
56
+ default: ColorEnum.Dark
57
+ }
58
+ },
59
+ setup(props) {
60
+ const { getColors } = useColors();
61
+
62
+ const colors = computed(() => getColors(props.color));
63
+ const lights = getColors(ColorEnum.Light);
64
+ const darks = getColors(ColorEnum.Dark);
65
+
66
+ const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
67
+ switch (props.color) {
68
+ case ColorEnum.Light:
69
+ case ColorEnum.Dark: return {
70
+ "--fs-pagination-page-width" : `calc(100% / ${props.pages} - ${sizeToVar(props.gap)}`,
71
+ "--fs-pagination-background-color" : lights.dark,
72
+ "--fs-pagination-active-background-color": darks.base
73
+ }
74
+ default: return {
75
+ "--fs-pagination-page-width" : `calc(100% / ${props.pages} - ${sizeToVar(props.gap)}`,
76
+ "--fs-pagination-background-color" : colors.value.light,
77
+ "--fs-pagination-active-background-color": colors.value.base
78
+ }
79
+ }
80
+ });
81
+
82
+ const classes = (page: number): string[] => {
83
+ const innerClasses = ["fs-pagination-page"];
84
+ if (page <= props.modelValue) {
85
+ innerClasses.push("fs-pagination-active-page");
86
+ }
87
+ return innerClasses;
88
+ };
89
+
90
+ return {
91
+ style,
92
+ classes
93
+ };
94
+ }
95
+ });
96
+ </script>
File without changes
@@ -42,16 +42,16 @@ import { useColors } from "@dative-gpi/foundation-shared-components/composables"
42
42
 
43
43
  import FSIcon from "./FSIcon.vue";
44
44
  import FSSpan from "./FSSpan.vue";
45
- import FSRow from "./FSRow.vue";
46
45
  import FSCol from "./FSCol.vue";
46
+ import FSRow from "./FSRow.vue";
47
47
 
48
48
  export default defineComponent({
49
49
  name: "FSRadio",
50
50
  components: {
51
51
  FSIcon,
52
52
  FSSpan,
53
- FSRow,
54
- FSCol
53
+ FSCol,
54
+ FSRow
55
55
  },
56
56
  props: {
57
57
  label: {
@@ -86,9 +86,11 @@ export default defineComponent({
86
86
  },
87
87
  emits: ["update:modelValue"],
88
88
  setup(props, { emit }) {
89
- const colors = computed(() => useColors().getColors(props.color));
90
- const lights = useColors().getColors(ColorEnum.Light);
91
- const darks = useColors().getColors(ColorEnum.Dark);
89
+ const { getColors } = useColors();
90
+
91
+ const colors = computed(() => getColors(props.color));
92
+ const lights = getColors(ColorEnum.Light);
93
+ const darks = getColors(ColorEnum.Dark);
92
94
 
93
95
  const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
94
96
  if (!props.editable) {
@@ -55,7 +55,7 @@
55
55
  <script lang="ts">
56
56
  import { computed, defineComponent } from "vue";
57
57
 
58
- import { useTranslationsProvider } from "@dative-gpi/foundation-shared-services/composables";
58
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
59
59
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
60
60
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
61
61
 
@@ -36,8 +36,9 @@ export default defineComponent({
36
36
  },
37
37
  setup(props) {
38
38
  const { getChildren } = useSlots();
39
+ const { getColors } = useColors();
39
40
 
40
- const darks = useColors().getColors(ColorEnum.Dark);
41
+ const darks = getColors(ColorEnum.Dark);
41
42
 
42
43
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
43
44
  return {
@@ -101,9 +101,11 @@ export default defineComponent({
101
101
  }
102
102
  },
103
103
  setup(props) {
104
- const colors = computed(() => useColors().getColors(props.color));
105
- const lights = useColors().getColors(ColorEnum.Light);
106
- const darks = useColors().getColors(ColorEnum.Dark);
104
+ const { getColors } = useColors();
105
+
106
+ const colors = computed(() => getColors(props.color));
107
+ const lights = getColors(ColorEnum.Light);
108
+ const darks = getColors(ColorEnum.Dark);
107
109
 
108
110
  const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
109
111
  if (!props.editable) {
@@ -54,8 +54,8 @@
54
54
  <script lang="ts">
55
55
  import { computed, defineComponent, PropType } from "vue";
56
56
 
57
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
57
58
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
58
- import { useTranslationsProvider } from "@dative-gpi/foundation-shared-services";
59
59
 
60
60
  import FSDialog from "./FSDialog.vue";
61
61
  import FSRow from "./FSRow.vue";
@@ -143,7 +143,7 @@ export default defineComponent({
143
143
  default: true
144
144
  }
145
145
  },
146
- emits: ["update:modelValue"],
146
+ emits: ["update:modelValue", "click:rightButton"],
147
147
  setup(props) {
148
148
  const { $tr } = useTranslationsProvider();
149
149
 
@@ -48,15 +48,15 @@ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/m
48
48
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
49
49
 
50
50
  import FSSpan from "./FSSpan.vue";
51
- import FSRow from "./FSRow.vue";
52
51
  import FSCol from "./FSCol.vue";
52
+ import FSRow from "./FSRow.vue";
53
53
 
54
54
  export default defineComponent({
55
55
  name: "FSSwitch",
56
56
  components: {
57
57
  FSSpan,
58
- FSRow,
59
- FSCol
58
+ FSCol,
59
+ FSRow
60
60
  },
61
61
  props: {
62
62
  label: {
@@ -87,10 +87,12 @@ export default defineComponent({
87
87
  },
88
88
  emits: ["update:modelValue"],
89
89
  setup(props, { emit }) {
90
- const colors = computed(() => useColors().getColors(props.color));
91
- const backgrounds = useColors().getColors(ColorEnum.Background);
92
- const lights = useColors().getColors(ColorEnum.Light);
93
- const darks = useColors().getColors(ColorEnum.Dark);
90
+ const { getColors } = useColors();
91
+
92
+ const colors = computed(() => getColors(props.color));
93
+ const backgrounds = getColors(ColorEnum.Background);
94
+ const lights = getColors(ColorEnum.Light);
95
+ const darks = getColors(ColorEnum.Dark);
94
96
 
95
97
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
96
98
  if (!props.editable) {
@@ -40,11 +40,12 @@ export default defineComponent({
40
40
  }
41
41
  },
42
42
  setup(props) {
43
+ const { getColors, getContrasts } = useColors();
43
44
  const { getChildren } = useSlots();
44
45
 
45
- const textColors = computed(() => useColors().getContrasts(props.color));
46
- const colors = computed(() => useColors().getColors(props.color));
47
- const darks = useColors().getColors(ColorEnum.Dark);
46
+ const textColors = computed(() => getContrasts(props.color));
47
+ const colors = computed(() => getColors(props.color));
48
+ const darks = getColors(ColorEnum.Dark);
48
49
 
49
50
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => ({
50
51
  "--fs-group-color" : darks.base,
@@ -73,8 +73,10 @@ export default defineComponent({
73
73
  },
74
74
  emits: ["remove"],
75
75
  setup(props) {
76
- const textColors = computed(() => useColors().getContrasts(props.color));
77
- const colors = computed(() => useColors().getColors(props.color));
76
+ const { getColors, getContrasts } = useColors();
77
+
78
+ const textColors = computed(() => getContrasts(props.color));
79
+ const colors = computed(() => getColors(props.color));
78
80
 
79
81
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
80
82
  switch (props.variant) {
@@ -18,7 +18,7 @@ export default defineComponent({
18
18
  name: "FSText",
19
19
  props: {
20
20
  font: {
21
- type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline" | "text-underline">,
21
+ type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
22
22
  required: false,
23
23
  default: "text-body"
24
24
  },
@@ -44,9 +44,10 @@ export default defineComponent({
44
44
  }
45
45
  },
46
46
  setup(props) {
47
+ const { getColors } = useColors();
47
48
  const { slots } = useSlots();
48
49
 
49
- const colors = computed(() => useColors().getColors(props.color));
50
+ const colors = computed(() => getColors(props.color));
50
51
 
51
52
  const classes = computed((): string[] => {
52
53
  const classNames = ["fs-text", props.font];
@@ -35,8 +35,9 @@ export default defineComponent({
35
35
  },
36
36
  setup(props) {
37
37
  const { getChildren } = useSlots();
38
+ const { getColors } = useColors();
38
39
 
39
- const darks = useColors().getColors(ColorEnum.Dark);
40
+ const darks = getColors(ColorEnum.Dark);
40
41
 
41
42
  const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
42
43
  return {
@@ -57,9 +57,10 @@
57
57
  <script lang="ts">
58
58
  import { computed, defineComponent, PropType, ref } from "vue";
59
59
 
60
- import { useTimeZone, useTranslationsProvider } from "@dative-gpi/foundation-shared-services/composables";
60
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
61
61
  import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
62
62
  import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
63
+ import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
63
64
 
64
65
  import FSColorIcon from "../FSColorIcon.vue";
65
66
  import FSCard from "../FSCard.vue";
@@ -62,8 +62,9 @@
62
62
  <script lang="ts">
63
63
  import { computed, defineComponent, PropType, ref } from "vue";
64
64
 
65
- import { useTimeZone, useTranslationsProvider } from "@dative-gpi/foundation-shared-services/composables";
65
+ import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
66
66
  import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
67
+ import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables";
67
68
  import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
68
69
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
69
70