@dative-gpi/foundation-shared-components 0.0.22 → 0.0.23

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.
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <FSClickable
3
3
  v-if="!['icon'].includes($props.variant)"
4
+ :fullWidth="$props.fullWidth"
4
5
  :editable="$props.editable"
5
6
  :height="['40px', '36px']"
6
7
  :variant="$props.variant"
@@ -13,6 +13,7 @@
13
13
  </FSCard>
14
14
  <a
15
15
  v-else
16
+ :class="anchorClasses"
16
17
  :href="href"
17
18
  >
18
19
  <FSCard
@@ -69,6 +70,11 @@ export default defineComponent({
69
70
  required: false,
70
71
  default: ColorEnum.Primary
71
72
  },
73
+ fullWidth: {
74
+ type: Boolean,
75
+ required: false,
76
+ default: false
77
+ },
72
78
  editable: {
73
79
  type: Boolean,
74
80
  required: false,
@@ -132,6 +138,14 @@ export default defineComponent({
132
138
  return classNames;
133
139
  });
134
140
 
141
+ const anchorClasses = computed((): string[] => {
142
+ const classNames: string[] = [];
143
+ if (!props.fullWidth) {
144
+ classNames.push("fs-clickable-anchor-full-width");
145
+ }
146
+ return classNames;
147
+ });
148
+
135
149
  const href = computed((): string | null => {
136
150
  if (!props.to) {
137
151
  return null;
@@ -151,6 +165,7 @@ export default defineComponent({
151
165
  };
152
166
 
153
167
  return {
168
+ anchorClasses,
154
169
  classes,
155
170
  style,
156
171
  href,
@@ -11,9 +11,9 @@
11
11
  <template #placeholder>
12
12
  <FSLoader
13
13
  class="fs-load-image"
14
+ height="100%"
15
+ width="100%"
14
16
  :borderRadius="$props.borderRadius"
15
- :height="computedHeight"
16
- :width="computedWidth"
17
17
  />
18
18
  </template>
19
19
  </v-img>
@@ -18,7 +18,7 @@
18
18
  <script lang="ts">
19
19
  import { computed, defineComponent, PropType } from "vue";
20
20
 
21
- import { useBreakpoints, useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
21
+ import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
22
22
  import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
23
23
 
24
24
  import FSLoader from "./FSLoader.vue";
@@ -61,7 +61,6 @@ export default defineComponent({
61
61
  }
62
62
  },
63
63
  setup(props) {
64
- const { isMobileSized } = useBreakpoints();
65
64
  const { getColors } = useColors();
66
65
  const { slots } = useSlots();
67
66
 
@@ -31,13 +31,13 @@ export default defineComponent({
31
31
  default: "4px"
32
32
  },
33
33
  variant: {
34
- type: String as PropType<"standard" | "button" | "input" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
34
+ type: String as PropType<"standard" | "button" | "input" | "field" | "chip" | "text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
35
35
  required: false,
36
36
  default: "standard"
37
37
  }
38
38
  },
39
39
  setup(props) {
40
- const { isMobileSized, isExtraSmall } = useBreakpoints();
40
+ const { isMobileSized } = useBreakpoints();
41
41
 
42
42
  const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
43
43
  return {
@@ -51,16 +51,17 @@ export default defineComponent({
51
51
  switch (props.variant) {
52
52
  case "standard": return sizeToVar(props.height);
53
53
  case "button":
54
- case "input": return isMobileSized.value ? "36px" : "40px";
54
+ case "input":
55
+ case "field": return isMobileSized.value ? "36px" : "40px";
55
56
  case "chip": return isMobileSized.value ? "20px" : "24px";
56
- case "text-h1": return isMobileSized.value ? "29px" : "36px";
57
- case "text-h2": return isMobileSized.value ? "22px" : "27px";
58
- case "text-h3": return isMobileSized.value ? "17px" : "21px";
59
- case "text-h4": return isMobileSized.value ? "14px" : "16px";
57
+ case "text-h1": return isMobileSized.value ? "32px" : "40px";
58
+ case "text-h2": return isMobileSized.value ? "24px" : "32px";
59
+ case "text-h3": return isMobileSized.value ? "20px" : "24px";
60
+ case "text-h4": return isMobileSized.value ? "16px" : "20px";
60
61
  case "text-body":
61
- case "text-button": return isMobileSized.value ? "12px" : "14px";
62
+ case "text-button": return isMobileSized.value ? "14px" : "16px";
62
63
  case "text-overline":
63
- case "text-underline": return isMobileSized.value ? "10px" : "12px";
64
+ case "text-underline": return "16px";
64
65
  }
65
66
  });
66
67
 
@@ -69,6 +70,7 @@ export default defineComponent({
69
70
  case "standard": return sizeToVar(props.width);
70
71
  case "button": return isMobileSized ? "36px" : "40px";
71
72
  case "input": return isMobileSized ? "calc(50% - 124px)" : "calc(50% - 132px)";
73
+ case "field": return "100%";
72
74
  case "chip": return "8vw";
73
75
  case "text-h1": return "calc(50% - 32px)";
74
76
  case "text-h2": return "calc(60% - 32px)";
@@ -4,7 +4,9 @@
4
4
  :style="style"
5
5
  v-bind="$attrs"
6
6
  >
7
- <slot />
7
+ <slot>
8
+ {{ $props.label }}
9
+ </slot>
8
10
  </span>
9
11
  </template>
10
12
 
@@ -16,6 +18,11 @@ import { useSlots } from "@dative-gpi/foundation-shared-components/composables";
16
18
  export default defineComponent({
17
19
  name: "FSSpan",
18
20
  props: {
21
+ label: {
22
+ type: [String, null, undefined],
23
+ required: false,
24
+ default: null
25
+ },
19
26
  font: {
20
27
  type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-body" | "text-button" | "text-overline" | "text-underline">,
21
28
  required: false,
@@ -4,7 +4,9 @@
4
4
  :style="style"
5
5
  v-bind="$attrs"
6
6
  >
7
- <slot />
7
+ <slot>
8
+ {{ $props.label }}
9
+ </slot>
8
10
  </span>
9
11
  </template>
10
12
 
@@ -17,6 +19,11 @@ import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/m
17
19
  export default defineComponent({
18
20
  name: "FSText",
19
21
  props: {
22
+ label: {
23
+ type: [String, null, undefined],
24
+ required: false,
25
+ default: null
26
+ },
20
27
  font: {
21
28
  type: String as PropType<"text-h1" | "text-h2" | "text-h3" | "text-h4" | "text-body" | "text-button" | "text-overline" | "text-underline">,
22
29
  required: false,
@@ -23,7 +23,6 @@
23
23
  <template #prepend-inner>
24
24
  <slot name="prepend-inner">
25
25
  <FSIcon
26
- size="xl"
27
26
  :color="innerColor"
28
27
  >
29
28
  mdi-circle
@@ -51,12 +50,12 @@
51
50
  <template #prepend-inner>
52
51
  <slot name="prepend-inner">
53
52
  <FSIcon
54
- icon="mdi-circle"
55
- size="xl"
56
53
  :color="ColorEnum.Dark"
57
54
  :editable="$props.editable"
58
55
  :style="{ opacity: getPercentageFromHex(innerOpacity) }"
59
- />
56
+ >
57
+ mdi-circle
58
+ </FSIcon>
60
59
  </slot>
61
60
  </template>
62
61
  <template #append>
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.22",
4
+ "version": "0.0.23",
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.22",
14
- "@dative-gpi/foundation-shared-services": "0.0.22",
13
+ "@dative-gpi/foundation-shared-domain": "0.0.23",
14
+ "@dative-gpi/foundation-shared-services": "0.0.23",
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": "2186455ca7eff6f916918d62b02874df3dd58150"
35
+ "gitHead": "c0d661503cf9ffd8f585a696a7b0c1173d9c111c"
36
36
  }
@@ -28,4 +28,8 @@
28
28
  a:has(.fs-clickable) {
29
29
  text-decoration: none;
30
30
  padding: 0 !important;
31
+ }
32
+
33
+ .fs-clickable-achor-full-width {
34
+ width: 100%;
31
35
  }