@dative-gpi/foundation-shared-components 1.0.164 → 1.0.165

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.
@@ -0,0 +1,118 @@
1
+ <template>
2
+ <FSTile
3
+ :width="$props.width"
4
+ :modelValue="$props.modelValue"
5
+ v-bind="$attrs"
6
+ >
7
+ <FSRow
8
+ :wrap="false"
9
+ :width="infoWidth"
10
+ gap="24px"
11
+ height="fill"
12
+ align="center-left"
13
+ >
14
+ <FSCol>
15
+ <FSSpan
16
+ font="text-button"
17
+ >
18
+ {{ `${$props.firstName} ${$props.lastName}` }}
19
+ </FSSpan>
20
+ <FSSpan
21
+ font="text-overline"
22
+ >
23
+ {{ $props.email }}
24
+ </FSSpan>
25
+ <FSSpan
26
+ font="text-overline"
27
+ >
28
+ {{ $props.phoneNumber }}
29
+ </FSSpan>
30
+ </FSCol>
31
+ <FSImage
32
+ v-if="$props.imageId"
33
+ :imageId="$props.imageId"
34
+ :width="imageSize"
35
+ />
36
+ </FSRow>
37
+ </FSTile>
38
+ </template>
39
+
40
+ <script lang="ts">
41
+ import { computed, defineComponent, type PropType } from "vue";
42
+
43
+ import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
44
+
45
+ import FSImage from "../FSImage.vue";
46
+ import FSSpan from "../FSSpan.vue";
47
+ import FSTile from "./FSTile.vue";
48
+ import FSCol from "../FSCol.vue";
49
+ import FSRow from "../FSRow.vue";
50
+
51
+ export default defineComponent({
52
+ name: "FSUserTileUI",
53
+ components: {
54
+ FSImage,
55
+ FSSpan,
56
+ FSTile,
57
+ FSCol,
58
+ FSRow
59
+ },
60
+ props: {
61
+ imageId: {
62
+ type: String as PropType<string | null>,
63
+ required: false,
64
+ default: null
65
+ },
66
+ width: {
67
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
68
+ required: false,
69
+ default: () => [352, 336]
70
+ },
71
+ firstName: {
72
+ type: String,
73
+ required: true
74
+ },
75
+ lastName: {
76
+ type: String,
77
+ required: true
78
+ },
79
+ email: {
80
+ type: String,
81
+ required: true
82
+ },
83
+ phoneNumber: {
84
+ type: String,
85
+ required: false,
86
+ default: null
87
+ },
88
+ modelValue: {
89
+ type: Boolean,
90
+ required: false,
91
+ default: false
92
+ }
93
+ },
94
+ emits: ["update:modelValue"],
95
+ setup(props) {
96
+ const { isMobileSized } = useBreakpoints();
97
+
98
+ const imageSize = computed((): number => {
99
+ if (!props.imageId) {
100
+ return 0;
101
+ }
102
+ return isMobileSized.value ? 90 : 100;
103
+ });
104
+
105
+ const infoWidth = computed((): string => {
106
+ if (!props.imageId) {
107
+ return "100%";
108
+ }
109
+ return `calc(100% - ${imageSize.value}px - 24px)`;
110
+ });
111
+
112
+ return {
113
+ imageSize,
114
+ infoWidth
115
+ };
116
+ }
117
+ });
118
+ </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.164",
4
+ "version": "1.0.165",
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": "1.0.164",
14
- "@dative-gpi/foundation-shared-services": "1.0.164"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.165",
14
+ "@dative-gpi/foundation-shared-services": "1.0.165"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "b7ada7cfa0089e86a46fe34dae932e04289b62d5"
38
+ "gitHead": "0481543beb9ab42475891298793dc397c2428a19"
39
39
  }