@xqmsg/ui-core 0.19.0 → 0.19.1

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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.19.0",
2
+ "version": "0.19.1",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -34,6 +34,7 @@ export const Breadcrumbs: React.FC<BreadcrumbsProps> = ({
34
34
  <Flex flexDir={orientation === 'horizontal' ? 'row' : 'column'}>
35
35
  {steps.map((step, idx) => (
36
36
  <Flex
37
+ key={idx}
37
38
  alignItems="center"
38
39
  pr={orientation === 'horizontal' ? '16px' : 0}
39
40
  py="4px"
@@ -62,6 +62,7 @@ export function FormSection<
62
62
  defaultValue,
63
63
  }: FormInput) => (
64
64
  <Input<U>
65
+ key={name}
65
66
  control={form.control}
66
67
  label={label}
67
68
  inputType={inputType}
@@ -298,8 +298,14 @@ const StackedMultiSelect = React.forwardRef<
298
298
  ref={scrollRef}
299
299
  >
300
300
  {localValues.length ? (
301
- localValues.map(option => (
302
- <Box mr="4px" width="fit-content" h="16px" borderRadius="full">
301
+ localValues.map((option, idx) => (
302
+ <Box
303
+ key={idx}
304
+ mr="4px"
305
+ width="fit-content"
306
+ h="16px"
307
+ borderRadius="full"
308
+ >
303
309
  <Token
304
310
  label={option.label}
305
311
  onDelete={() => handleDelete(option)}
@@ -278,6 +278,7 @@ const StackedPilledInput = React.forwardRef<
278
278
  {lastestFormValueToArray.length
279
279
  ? lastestFormValueToArray.map((label, index) => (
280
280
  <Box
281
+ key={index}
281
282
  mr="4px"
282
283
  border={
283
284
  tokenIndex === index
@@ -23,14 +23,14 @@ export const Dropdown: React.FC<DropdownProps> = ({
23
23
  }) => {
24
24
  const DropdownContent = useMemo(() => {
25
25
  return options.map((option, idx) => (
26
- <>
26
+ <Box key={idx} width="100%">
27
27
  {option.value === 'section_header' &&
28
28
  options[idx + 1] &&
29
29
  options[idx + 1].value !== 'section_header' && (
30
30
  <Box
31
31
  color={colors.label.secondary.light}
32
32
  fontSize="13px"
33
- width="fit-content"
33
+ width="100%"
34
34
  fontWeight="bold"
35
35
  px="8px"
36
36
  bg="inherit"
@@ -75,7 +75,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
75
75
  {option.label}
76
76
  </Box>
77
77
  )}
78
- </>
78
+ </Box>
79
79
  ));
80
80
  }, [onSelectItem, optionIndex, options]);
81
81
 
@@ -48,14 +48,15 @@ export const NavigationMenu: React.FC<NavigationMenuProps> = ({
48
48
  overflowY="auto"
49
49
  width="220px"
50
50
  >
51
- {sortedGroupedMenuItems?.map(menuItemGroup => (
52
- <Box _notLast={{ paddingBottom: '8px' }}>
51
+ {sortedGroupedMenuItems?.map((menuItemGroup, idx) => (
52
+ <Box key={idx} _notLast={{ paddingBottom: '8px' }}>
53
53
  {menuItemGroup.groupHeader && (
54
54
  <NavigationMenuHeader label={menuItemGroup.groupHeader} />
55
55
  )}
56
- {menuItemGroup.groupMenuItems.map(item => (
56
+ {menuItemGroup.groupMenuItems.map((item, idx) => (
57
57
  <NavigationMenuItem
58
58
  {...item}
59
+ key={idx}
59
60
  isSelected={selectedMenuItem === item.label}
60
61
  onClick={() => setSelectedMenuItem(item.label)}
61
62
  />
@@ -37,7 +37,7 @@ export const EmptyTable: React.FC = () => {
37
37
  >
38
38
  <Tbody>
39
39
  {Array.from({ length: 14 }, (_, i) => i + 1).map(i => (
40
- <Tr>
40
+ <Tr key={i}>
41
41
  <Td height="26px" opacity={getOpacity(i)}></Td>
42
42
  </Tr>
43
43
  ))}
@@ -55,19 +55,19 @@ export function Table<T extends ReadonlyTableColumns>({
55
55
  {headers && (
56
56
  <Thead>
57
57
  <Tr _odd={{ bg: colors.label.primary.dark }}>
58
- {columnsAsConst.map(column => (
58
+ {columnsAsConst.map((column, idx) => (
59
59
  // @ts-ignore
60
- <Th>{headers[column]}</Th>
60
+ <Th key={idx}>{headers[column]}</Th>
61
61
  ))}
62
62
  </Tr>
63
63
  </Thead>
64
64
  )}
65
65
  <Tbody>
66
- {body.map(row => (
67
- <Tr>
68
- {columnsAsConst.map(column => (
66
+ {body.map((row, idx) => (
67
+ <Tr key={idx}>
68
+ {columnsAsConst.map((column, idx) => (
69
69
  // @ts-ignore
70
- <Td>{row[column]}</Td>
70
+ <Td key={idx}>{row[column]}</Td>
71
71
  ))}
72
72
  </Tr>
73
73
  ))}
@@ -29,8 +29,8 @@ export const TabsWrapper: React.FC<TabsWrapperProps> = ({
29
29
  borderBottomLeftRadius={0}
30
30
  borderBottomRightRadius={0}
31
31
  >
32
- {navItems.map(navItem => (
33
- <Tab>{navItem}</Tab>
32
+ {navItems.map((navItem, idx) => (
33
+ <Tab key={idx}>{navItem}</Tab>
34
34
  ))}
35
35
  </TabList>
36
36
  {children}
@@ -45,7 +45,7 @@ export const ToolbarBreadcrumbs: React.FC<ToolbarBreadcrumbsProps> = ({
45
45
  return (
46
46
  <Flex height="26px">
47
47
  {filteredPageList.map((page, i) => (
48
- <Flex alignItems="center">
48
+ <Flex alignItems="center" key={i}>
49
49
  <ToolbarBreadcrumbItem
50
50
  page={getPageType(i)}
51
51
  pageLabel={page.label}
@@ -26,7 +26,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
26
26
  }) => {
27
27
  const DropdownContent = useMemo(() => {
28
28
  return options.map((option, idx) => (
29
- <>
29
+ <Box key={idx}>
30
30
  {option.value === 'section_header' &&
31
31
  options[idx + 1] &&
32
32
  options[idx + 1].value !== 'section_header' && (
@@ -74,7 +74,7 @@ export const Dropdown: React.FC<DropdownProps> = ({
74
74
  {option.label}
75
75
  </Flex>
76
76
  )}
77
- </>
77
+ </Box>
78
78
  ));
79
79
  }, [onSelectItem, optionIndex, options, setOptionIndex]);
80
80