@ultraviolet/ui 1.35.0 → 1.36.0
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/dist/index.d.ts
CHANGED
|
@@ -2690,12 +2690,13 @@ declare const Table: react.ForwardRefExoticComponent<TableProps & react.RefAttri
|
|
|
2690
2690
|
Body: ({ children }: {
|
|
2691
2691
|
children: ReactNode;
|
|
2692
2692
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2693
|
-
Row: ({ children, className, id, selectDisabled, "data-testid": dataTestid, }: {
|
|
2693
|
+
Row: ({ children, className, id, selectDisabled, highlightAnimation, "data-testid": dataTestid, }: {
|
|
2694
2694
|
children: ReactNode;
|
|
2695
2695
|
className?: string | undefined;
|
|
2696
2696
|
id: string;
|
|
2697
2697
|
'data-testid'?: string | undefined;
|
|
2698
2698
|
selectDisabled?: string | boolean | undefined;
|
|
2699
|
+
highlightAnimation?: boolean | undefined;
|
|
2699
2700
|
}) => _emotion_react_jsx_runtime.JSX.Element;
|
|
2700
2701
|
Cell: ({ children, className, colSpan, rowSpan }: {
|
|
2701
2702
|
children?: ReactNode;
|
|
@@ -13,11 +13,11 @@ const contractString = str => {
|
|
|
13
13
|
const StyledOl = /*#__PURE__*/_styled("ol", {
|
|
14
14
|
target: "ej0p0s41"
|
|
15
15
|
})(process.env.NODE_ENV === "production" ? {
|
|
16
|
-
name: "
|
|
17
|
-
styles: "list-style:none;margin:0;padding:0;display:flex;align-items:center"
|
|
16
|
+
name: "105zz11",
|
|
17
|
+
styles: "list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center"
|
|
18
18
|
} : {
|
|
19
|
-
name: "
|
|
20
|
-
styles: "list-style:none;margin:0;padding:0;display:flex;align-items:center",
|
|
19
|
+
name: "105zz11",
|
|
20
|
+
styles: "list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;align-items:center",
|
|
21
21
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
22
22
|
});
|
|
23
23
|
const ItemContainer = /*#__PURE__*/_styled("li", {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
|
+
import { keyframes } from '@emotion/react';
|
|
2
3
|
import { useEffect } from 'react';
|
|
3
4
|
import { Checkbox } from '../Checkbox/index.js';
|
|
4
5
|
import { Tooltip } from '../Tooltip/index.js';
|
|
@@ -6,16 +7,41 @@ import { Cell } from './Cell.js';
|
|
|
6
7
|
import { useTableContext } from './TableContext.js';
|
|
7
8
|
import { jsxs, jsx } from '@emotion/react/jsx-runtime';
|
|
8
9
|
|
|
10
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
9
11
|
const StyledCheckboxContainer = /*#__PURE__*/_styled("div", {
|
|
12
|
+
target: "e1qvrbgq1"
|
|
13
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
14
|
+
name: "zjik7",
|
|
15
|
+
styles: "display:flex"
|
|
16
|
+
} : {
|
|
17
|
+
name: "zjik7",
|
|
18
|
+
styles: "display:flex",
|
|
19
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// We start at 5% and finish at 80% to leave the original background color
|
|
23
|
+
// as we can't know if the table will be stripped or not
|
|
24
|
+
const colorChange = theme => keyframes`
|
|
25
|
+
5% {
|
|
26
|
+
background-color: ${theme.colors.primary.background};
|
|
27
|
+
}
|
|
28
|
+
80% {
|
|
29
|
+
background-color: ${theme.colors.primary.background};
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
const StyledTr = /*#__PURE__*/_styled('tr', {
|
|
33
|
+
shouldForwardProp: prop => !['highlightAnimation'].includes(prop),
|
|
10
34
|
target: "e1qvrbgq0"
|
|
11
|
-
})("
|
|
35
|
+
})("animation:", ({
|
|
36
|
+
highlightAnimation,
|
|
12
37
|
theme
|
|
13
|
-
}) => theme
|
|
38
|
+
}) => highlightAnimation ? colorChange(theme) : undefined, " 3s linear;");
|
|
14
39
|
const Row = ({
|
|
15
40
|
children,
|
|
16
41
|
className,
|
|
17
42
|
id,
|
|
18
43
|
selectDisabled,
|
|
44
|
+
highlightAnimation,
|
|
19
45
|
'data-testid': dataTestid
|
|
20
46
|
}) => {
|
|
21
47
|
const {
|
|
@@ -33,9 +59,10 @@ const Row = ({
|
|
|
33
59
|
}
|
|
34
60
|
return undefined;
|
|
35
61
|
}, [id, registerSelectableRow, selectDisabled]);
|
|
36
|
-
return jsxs(
|
|
62
|
+
return jsxs(StyledTr, {
|
|
37
63
|
className: className,
|
|
38
64
|
"data-testid": dataTestid,
|
|
65
|
+
highlightAnimation: highlightAnimation,
|
|
39
66
|
children: [selectable ? jsx(Cell, {
|
|
40
67
|
children: jsx(StyledCheckboxContainer, {
|
|
41
68
|
"data-visibility": allRowSelectValue === false ? 'hover' : undefined,
|