@trackunit/react-components 0.0.151 → 0.0.152
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.
|
@@ -20,7 +20,6 @@ export interface PopoverListItemProps extends CommonProps {
|
|
|
20
20
|
* The child nodes.
|
|
21
21
|
*/
|
|
22
22
|
children: React.ReactNode;
|
|
23
|
-
renderAs?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* The PopoverListItem component.
|
|
@@ -28,4 +27,4 @@ export interface PopoverListItemProps extends CommonProps {
|
|
|
28
27
|
* @param {PopoverListItemProps} props - The props for the PopoverListItem component
|
|
29
28
|
* @returns {JSX.Element} PopoverListItem component
|
|
30
29
|
*/
|
|
31
|
-
export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix,
|
|
30
|
+
export declare const PopoverListItem: ({ selected, children, disabled, ariaLabel, url, onClick, prefix, suffix, dataTestId, }: PopoverListItemProps) => JSX.Element;
|
package/index.js
CHANGED
|
@@ -10,10 +10,10 @@ import { format, formatDistance } from 'date-fns';
|
|
|
10
10
|
import { useSpring, animated } from '@react-spring/web';
|
|
11
11
|
import usePortal from 'react-useportal';
|
|
12
12
|
import { createPopper } from '@popperjs/core';
|
|
13
|
+
import { Link, UNSAFE_NavigationContext } from 'react-router-dom';
|
|
13
14
|
import { DayPicker as DayPicker$1 } from 'react-day-picker';
|
|
14
15
|
import { enGB, enUS, da, de, cs, nl, fr, fi, hu, it, nb, pl, pt, ru, ro, es, sv, ja, th } from 'date-fns/locale';
|
|
15
16
|
import { Helmet } from 'react-helmet';
|
|
16
|
-
import { UNSAFE_NavigationContext } from 'react-router-dom';
|
|
17
17
|
import ReactSelect, { components } from 'react-select';
|
|
18
18
|
export { default as ValueType } from 'react-select';
|
|
19
19
|
import ReactAsyncCreatableSelect from 'react-select/async-creatable';
|
|
@@ -2102,7 +2102,6 @@ const PopoverListItem = ({
|
|
|
2102
2102
|
onClick,
|
|
2103
2103
|
prefix,
|
|
2104
2104
|
suffix,
|
|
2105
|
-
renderAs,
|
|
2106
2105
|
dataTestId
|
|
2107
2106
|
}) => {
|
|
2108
2107
|
const content = jsxs("div", Object.assign({
|
|
@@ -2127,9 +2126,8 @@ const PopoverListItem = ({
|
|
|
2127
2126
|
"aria-label": ariaLabel,
|
|
2128
2127
|
"data-testid": dataTestId
|
|
2129
2128
|
}, {
|
|
2130
|
-
children: url ? jsx(
|
|
2131
|
-
|
|
2132
|
-
href: url
|
|
2129
|
+
children: url ? jsx(PopoverLink, Object.assign({
|
|
2130
|
+
to: url
|
|
2133
2131
|
}, {
|
|
2134
2132
|
children: content
|
|
2135
2133
|
})) : content
|
|
@@ -2144,7 +2142,7 @@ const ListItem = tw.li`
|
|
|
2144
2142
|
tu-popover-list-item
|
|
2145
2143
|
${p => p.disabled && tws`tu-popover-list-item--disabled`}
|
|
2146
2144
|
`;
|
|
2147
|
-
const
|
|
2145
|
+
const PopoverLink = twx(Link)`
|
|
2148
2146
|
tu-popover-list-item__anchor
|
|
2149
2147
|
`;
|
|
2150
2148
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.152",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"dependencies": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"react-useportal": "1.0.16",
|
|
19
19
|
"react-helmet": "^6.1.0",
|
|
20
20
|
"@react-spring/web": "9.5.2",
|
|
21
|
-
"@popperjs/core": "^2.11.6",
|
|
22
21
|
"react-router-dom": "6.4.1",
|
|
22
|
+
"@popperjs/core": "^2.11.6",
|
|
23
23
|
"react-select": "^5.4.0",
|
|
24
24
|
"jest-canvas-mock": "^2.4.0"
|
|
25
25
|
},
|