@dative-gpi/foundation-shared-components 0.0.74 → 0.0.76

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.
@@ -148,7 +148,7 @@ export default defineComponent({
148
148
  });
149
149
 
150
150
  const classes = computed((): string[] => {
151
- const classNames = ["fs-card"];
151
+ const classNames = ["fs-card", "fs-background"];
152
152
  switch(props.variant) {
153
153
  case "gradient":
154
154
  classNames.push("fs-card-gradient");
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <v-carousel
3
- class="fs-carousel"
4
3
  :hideDelimiters="true"
4
+ :class="classes"
5
5
  :style="style"
6
6
  v-bind="$attrs"
7
7
  >
@@ -51,14 +51,20 @@ export default defineComponent({
51
51
  };
52
52
  });
53
53
 
54
+ const classes = computed((): string[] => {
55
+ const classNames = ["fs-carousel", "fs-background"];
56
+ return classNames;
57
+ });
58
+
54
59
  const value = (component: VNode, index: number): any => {
55
60
  return component?.props?.value ?? index;
56
61
  };
57
62
 
58
63
  return {
59
- getChildren,
64
+ classes,
60
65
  slots,
61
66
  style,
67
+ getChildren,
62
68
  value
63
69
  };
64
70
  }
@@ -3,6 +3,7 @@
3
3
  width="hug"
4
4
  >
5
5
  <v-checkbox
6
+ class="fs-stopclick"
6
7
  hide-details
7
8
  :ripple="false"
8
9
  :rules="$props.rules"
@@ -10,7 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script lang="ts">
13
- import { computed, defineComponent, PropType, ref, Ref } from "vue";
13
+ import { computed, defineComponent, PropType } from "vue";
14
14
 
15
15
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
16
16
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
@@ -1,33 +1,47 @@
1
1
  <template>
2
- <v-icon
2
+ <FSColor
3
+ class="fs-color-icon"
3
4
  :color="$props.color"
4
- :class="classes"
5
- :style="style"
6
- v-bind="$attrs"
5
+ :border="false"
6
+ :height="size"
7
+ :width="size"
7
8
  >
8
- <slot />
9
- </v-icon>
9
+ <FSRow
10
+ align="center-center"
11
+ >
12
+ <FSIcon
13
+ :color="$props.color"
14
+ :size="$props.size"
15
+ >
16
+ <slot />
17
+ </FSIcon>
18
+ </FSRow>
19
+ </FSColor>
10
20
  </template>
11
21
 
12
22
  <script lang="ts">
13
23
  import { computed, defineComponent, PropType } from "vue";
14
24
 
15
25
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
16
- import { useColors } from "@dative-gpi/foundation-shared-components/composables";
26
+ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
27
+
28
+ import FSColor from "./FSColor.vue";
29
+ import FSIcon from "./FSIcon.vue";
30
+ import FSRow from "./FSRow.vue";
17
31
 
18
32
  export default defineComponent({
19
33
  name: "FSColorIcon",
34
+ components: {
35
+ FSColor,
36
+ FSIcon,
37
+ FSRow
38
+ },
20
39
  props: {
21
40
  size: {
22
- type: String as PropType<"s" | "m" | "l">,
41
+ type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
23
42
  required: false,
24
43
  default: "m"
25
44
  },
26
- variant: {
27
- type: String as PropType<"standard" | "full">,
28
- required: false,
29
- default: "standard"
30
- },
31
45
  color: {
32
46
  type: String as PropType<ColorBase>,
33
47
  required: false,
@@ -35,34 +49,19 @@ export default defineComponent({
35
49
  }
36
50
  },
37
51
  setup(props) {
38
- const { getColors } = useColors();
39
-
40
- const colors = computed(() => getColors(props.color));
41
-
42
- const style = computed((): { [key: string] : string | undefined } => {
43
- switch (props.variant) {
44
- case "full": return {
45
- "--fs-icon-background-color": colors.value.light
46
- };
47
- default: return {
48
- "--fs-icon-background-color": "transparent"
49
- };
50
- }
51
- });
52
+ const { isMobileSized } = useBreakpoints();
52
53
 
53
- const classes = computed((): string[] => {
54
- const classNames = [`fs-icon-${props.size}`];
55
- switch (props.variant) {
56
- case "full":
57
- classNames.push("fs-color-icon");
58
- break;
54
+ const size = computed((): string[] | number[] | string | number | null => {
55
+ switch(props.size) {
56
+ case "s": return isMobileSized.value ? "18px" : "20px";
57
+ case "m": return isMobileSized.value ? "20px" : "26px";
58
+ case "l": return isMobileSized.value ? "36px" : "40px";
59
+ default: return props.size;
59
60
  }
60
- return classNames;
61
61
  });
62
62
 
63
63
  return {
64
- style,
65
- classes
64
+ size
66
65
  };
67
66
  }
68
67
  });
@@ -8,11 +8,11 @@
8
8
  >
9
9
  <FSCard
10
10
  padding="24px"
11
+ width="100%"
11
12
  gap="24px"
12
13
  :border="!isExtraSmall"
13
14
  :color="$props.color"
14
15
  :class="classes"
15
- :width="width"
16
16
  >
17
17
  <template v-for="(_, name) in $slots" v-slot:[name]="slotData">
18
18
  <slot :name="name" v-bind="slotData" />
@@ -33,11 +33,11 @@ import { computed, defineComponent, PropType } from "vue";
33
33
 
34
34
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
35
35
  import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
36
+ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
36
37
 
37
38
  import FSButton from "./FSButton.vue";
38
39
  import FSCard from "./FSCard.vue";
39
40
  import FSCol from "./FSCol.vue";
40
- import { sizeToVar } from "../utils";
41
41
 
42
42
  export default defineComponent({
43
43
  name: "FSDialog",
@@ -1,19 +1,21 @@
1
1
  <template>
2
2
  <FSRow
3
+ width="hug"
3
4
  gap="24px"
4
5
  >
5
6
  <FSImage
6
7
  class="fs-edit-image"
7
8
  :aspectRatio="$props.aspectRatio"
8
- :imageId="$props.imageId"
9
9
  :height="$props.height"
10
- :imageB64="realSource"
11
10
  :width="$props.width"
11
+ :imageId="$props.imageId"
12
+ :imageB64="realSource"
12
13
  :style="style"
13
14
  />
14
15
  <FSCol
15
- height="fill"
16
16
  align="bottom-left"
17
+ height="fill"
18
+ width="hug"
17
19
  >
18
20
  <FSText
19
21
  v-if="fileSelected"
@@ -14,7 +14,7 @@ import { computed, defineComponent, PropType } from "vue";
14
14
 
15
15
  import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
16
16
  import { ColorBase } from "@dative-gpi/foundation-shared-components/models";
17
- import { sizeToVar } from "../utils";
17
+ import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
18
18
 
19
19
  export default defineComponent({
20
20
  name: "FSIcon",
@@ -37,8 +37,7 @@
37
37
  import { computed, defineComponent, PropType, ref, watch } from "vue";
38
38
  import { decode, isBlurhashValid } from "blurhash";
39
39
 
40
- import { useImageBlurHash } from "@dative-gpi/foundation-shared-services/composables";
41
- import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
40
+ import { useImageBlurHash, useRawImage } from "@dative-gpi/foundation-shared-services/composables";
42
41
  import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
43
42
 
44
43
  import FSLoader from "./FSLoader.vue";
@@ -87,6 +86,7 @@ export default defineComponent({
87
86
  },
88
87
  setup(props) {
89
88
  const { fetch: fetchBlurHash, entity: blurHash } = useImageBlurHash();
89
+ const { fetch: fetchRawImage, entity: image } = useRawImage();
90
90
 
91
91
  const imageRef = ref<HTMLFormElement | null>(null);
92
92
  const canvasRef = ref<HTMLCanvasElement | null>(null);
@@ -150,8 +150,10 @@ export default defineComponent({
150
150
  return `${imageType.value},${imageData.value}`;
151
151
  }
152
152
  }
153
- else if (props.imageId) {
154
- return IMAGE_RAW_URL(props.imageId);
153
+ if (props.imageId) {
154
+ if (image.value) {
155
+ return image.value;
156
+ }
155
157
  }
156
158
  });
157
159
 
@@ -182,6 +184,12 @@ export default defineComponent({
182
184
  }
183
185
  };
184
186
 
187
+ watch(() => props.imageId, () => {
188
+ if (props.imageId) {
189
+ fetchRawImage(props.imageId);
190
+ }
191
+ }, { immediate: true });
192
+
185
193
  watch(() => blurHash.value, () => {
186
194
  if (canvasRef.value && imageRef.value) {
187
195
  if (blurHash.value && isBlurhashValid(blurHash.value.blurHash).result) {
@@ -5,9 +5,10 @@
5
5
  >
6
6
  <template #activator="{ props }">
7
7
  <FSColorIcon
8
+ class="fs-stopclick"
8
9
  size="m"
9
- variant="full"
10
10
  :color="$props.deviceConnectivity.color"
11
+ @click.prevent.stop
11
12
  v-bind="props"
12
13
  >
13
14
  {{ $props.deviceConnectivity.icon }}
@@ -5,9 +5,10 @@
5
5
  >
6
6
  <template #activator="{ props }">
7
7
  <FSColorIcon
8
+ class="fs-stopclick"
8
9
  size="m"
9
- variant="full"
10
10
  :color="$props.statusGroup.color"
11
+ @click.prevent.stop
11
12
  v-bind="props"
12
13
  >
13
14
  {{ $props.statusGroup.icon }}
@@ -5,19 +5,21 @@
5
5
  <template #prev="{ props }">
6
6
  <FSButton
7
7
  v-if="$props.modelStatuses.length > 1"
8
- variant="icon"
9
8
  icon="mdi-chevron-left"
9
+ class="fs-stopclick"
10
+ variant="icon"
10
11
  :color="ColorEnum.Dark"
11
- @click="props.onClick"
12
+ @click.prevent.stop="props.onClick"
12
13
  />
13
14
  </template>
14
15
  <template #next="{ props }">
15
16
  <FSButton
16
17
  v-if="$props.modelStatuses.length > 1"
17
- variant="icon"
18
18
  icon="mdi-chevron-right"
19
+ class="fs-stopclick"
20
+ variant="icon"
19
21
  :color="ColorEnum.Dark"
20
- @click="props.onClick"
22
+ @click.prevent.stop="props.onClick"
21
23
  />
22
24
  </template>
23
25
  <FSRow
@@ -9,9 +9,10 @@
9
9
  :color="criticityColor"
10
10
  >
11
11
  <FSColorIcon
12
+ class="fs-stopclick"
12
13
  size="m"
13
- variant="full"
14
14
  :color="criticityColor"
15
+ @click.prevent.stop
15
16
  v-bind="props"
16
17
  >
17
18
  {{ statusIcon }}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.74",
4
+ "version": "0.0.76",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "0.0.74",
14
- "@dative-gpi/foundation-shared-services": "0.0.74",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.76",
14
+ "@dative-gpi/foundation-shared-services": "0.0.76",
15
15
  "@fontsource/montserrat": "^5.0.16",
16
16
  "@lexical/clipboard": "^0.12.5",
17
17
  "@lexical/history": "^0.12.5",
@@ -32,5 +32,5 @@
32
32
  "sass": "^1.69.5",
33
33
  "sass-loader": "^13.3.2"
34
34
  },
35
- "gitHead": "f52cb04f253d357a3cbb09881718d2cdea09917d"
35
+ "gitHead": "9c5e93b2a6a8017981f2d3d1c13fc34c1aa0a0fe"
36
36
  }
@@ -1,4 +1,9 @@
1
1
  .fs-carousel {
2
2
  background-color: var(--fs-carousel-background-color);
3
+ transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
3
4
  height: var(--fs-carousel-height) !important;
5
+
6
+ & > .v-window__container > .v-window-item {
7
+ cursor: inherit !important;
8
+ }
4
9
  }
@@ -8,37 +8,27 @@
8
8
  border-color: var(--fs-clickable-border-color) !important;
9
9
  color: var(--fs-clickable-color) !important;
10
10
 
11
- & .fs-card {
12
- background-color: var(--fs-clickable-background-color) !important;
13
- border-color: var(--fs-clickable-border-color) !important;
14
- color: var(--fs-clickable-color) !important;
15
- }
16
-
17
11
  &.fs-clickable-disabled {
18
12
  cursor: default;
19
13
  }
20
14
 
21
- &:not(.fs-clickable-disabled):hover {
15
+ &:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
22
16
  background-color: var(--fs-clickable-hover-background-color) !important;
23
17
  border-color: var(--fs-clickable-hover-border-color) !important;
24
18
  color: var(--fs-clickable-hover-color) !important;
25
19
 
26
- & .fs-card {
27
- background-color: var(--fs-clickable-hover-background-color) !important;
28
- border-color: var(--fs-clickable-hover-border-color) !important;
29
- color: var(--fs-clickable-hover-color) !important;
20
+ & .fs-background {
21
+ background-color: var(--fs-clickable-hover-background-color);
30
22
  }
31
23
  }
32
24
 
33
- &:not(.fs-clickable-disabled):active {
25
+ &:not(.fs-clickable-disabled):active:not(:has( .fs-stopclick:hover)) {
34
26
  background-color: var(--fs-clickable-active-background-color) !important;
35
27
  border-color: var(--fs-clickable-active-border-color) !important;
36
28
  color: var(--fs-clickable-active-color) !important;
37
29
 
38
- & .fs-card {
39
- background-color: var(--fs-clickable-active-background-color) !important;
40
- border-color: var(--fs-clickable-active-border-color) !important;
41
- color: var(--fs-clickable-active-color) !important;
30
+ & .fs-background {
31
+ background-color: var(--fs-clickable-active-background-color);
42
32
  }
43
33
  }
44
34
  }
@@ -1,37 +1,3 @@
1
1
  .fs-color-icon {
2
- background-color: var(--fs-icon-background-color);
3
- border-radius: 4px;
4
-
5
- &.fs-icon-s {
6
- @include web {
7
- width: 20px;
8
- height: 20px;
9
- }
10
- @include mobile {
11
- width: 18px;
12
- height: 18px;
13
- }
14
- }
15
-
16
- &.fs-icon-m {
17
- @include web {
18
- width: 26px;
19
- height: 26px;
20
- }
21
- @include mobile {
22
- width: 20px;
23
- height: 20px;
24
- }
25
- }
26
-
27
- &.fs-icon-l {
28
- @include web {
29
- width: 40px;
30
- height: 40px;
31
- }
32
- @include mobile {
33
- width: 36px;
34
- height: 36px;
35
- }
36
- }
2
+ cursor: pointer;
37
3
  }