@homefile/components-v2 2.23.8 → 2.23.9

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.
@@ -2,5 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Stack, Flex, Text } from '@chakra-ui/react';
3
3
  export const DetailsColumn = ({ align = 'left', details }) => {
4
4
  const isLeft = align === 'left';
5
- return (_jsx(Stack, { spacing: "0", flex: "auto", children: details.map((item, index) => (_jsxs(Flex, { justify: "space-between", children: [_jsx(Text, { fontSize: "xs", fontFamily: "secondary", lineHeight: "1.4", flex: isLeft ? '45%' : '', children: item.label }), _jsx(Text, { fontSize: "xs", fontFamily: "secondary", fontWeight: "medium", lineHeight: "1.4", flex: isLeft ? '55%' : '', children: String(item.value) })] }, index + index))) }));
5
+ return (_jsx(Stack, { spacing: "0", flex: "auto", children: details.map((item, index) => {
6
+ var _a;
7
+ const value = (_a = item.value) !== null && _a !== void 0 ? _a : '-';
8
+ return (_jsxs(Flex, { justify: "space-between", children: [_jsx(Text, { fontSize: "xs", fontFamily: "secondary", lineHeight: "1.4", flex: isLeft ? '45%' : '', children: item.label }), _jsx(Text, { fontSize: "xs", fontFamily: "secondary", fontWeight: "medium", lineHeight: "1.4", flex: isLeft ? '55%' : '', children: value })] }, index + index));
9
+ }) }));
6
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.23.8",
3
+ "version": "2.23.9",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",
@@ -5,27 +5,30 @@ export const DetailsColumn = ({ align = 'left', details }: DetailsColumnI) => {
5
5
  const isLeft = align === 'left'
6
6
  return (
7
7
  <Stack spacing="0" flex="auto">
8
- {details.map((item, index) => (
9
- <Flex key={index + index} justify="space-between">
10
- <Text
11
- fontSize="xs"
12
- fontFamily="secondary"
13
- lineHeight="1.4"
14
- flex={isLeft ? '45%' : ''}
15
- >
16
- {item.label}
17
- </Text>
18
- <Text
19
- fontSize="xs"
20
- fontFamily="secondary"
21
- fontWeight="medium"
22
- lineHeight="1.4"
23
- flex={isLeft ? '55%' : ''}
24
- >
25
- {String(item.value)}
26
- </Text>
27
- </Flex>
28
- ))}
8
+ {details.map((item, index) => {
9
+ const value = (item.value as string) ?? '-'
10
+ return (
11
+ <Flex key={index + index} justify="space-between">
12
+ <Text
13
+ fontSize="xs"
14
+ fontFamily="secondary"
15
+ lineHeight="1.4"
16
+ flex={isLeft ? '45%' : ''}
17
+ >
18
+ {item.label}
19
+ </Text>
20
+ <Text
21
+ fontSize="xs"
22
+ fontFamily="secondary"
23
+ fontWeight="medium"
24
+ lineHeight="1.4"
25
+ flex={isLeft ? '55%' : ''}
26
+ >
27
+ {value}
28
+ </Text>
29
+ </Flex>
30
+ )
31
+ })}
29
32
  </Stack>
30
33
  )
31
34
  }