ag-common 0.0.548 → 0.0.549
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.
|
@@ -16,7 +16,7 @@ export declare const Timeline: ({ lineColour, items, onClick, maxCircleSize, cla
|
|
|
16
16
|
items: ITimelineItem[];
|
|
17
17
|
onClick?: ((p: ITimelineItem) => void) | undefined;
|
|
18
18
|
className?: string | undefined;
|
|
19
|
-
/** used for behind icons. default
|
|
19
|
+
/** used for behind icons. default inherit */
|
|
20
20
|
bgColour?: string | undefined;
|
|
21
21
|
/** if true, will show titles under timeline. default true */
|
|
22
22
|
showTitles?: boolean | undefined;
|
|
@@ -14,6 +14,7 @@ const Icon_1 = require("../Icon");
|
|
|
14
14
|
const Base = styled_1.default.div `
|
|
15
15
|
width: 100%;
|
|
16
16
|
overflow: hidden;
|
|
17
|
+
background-color: inherit;
|
|
17
18
|
`;
|
|
18
19
|
const Row = styled_1.default.div `
|
|
19
20
|
display: flex;
|
|
@@ -24,6 +25,8 @@ const Row = styled_1.default.div `
|
|
|
24
25
|
position: relative;
|
|
25
26
|
width: 100%;
|
|
26
27
|
height: 100%;
|
|
28
|
+
background-color: inherit;
|
|
29
|
+
z-index: 0;
|
|
27
30
|
`;
|
|
28
31
|
const Line = styled_1.default.div `
|
|
29
32
|
position: absolute;
|
|
@@ -34,7 +37,7 @@ const Line = styled_1.default.div `
|
|
|
34
37
|
z-index: -1;
|
|
35
38
|
`;
|
|
36
39
|
const Item = styled_1.default.div `
|
|
37
|
-
background-color:
|
|
40
|
+
background-color: inherit;
|
|
38
41
|
width: fit-content;
|
|
39
42
|
height: 100%;
|
|
40
43
|
display: flex;
|
|
@@ -43,7 +46,7 @@ const Item = styled_1.default.div `
|
|
|
43
46
|
const Title = styled_1.default.span `
|
|
44
47
|
text-align: center;
|
|
45
48
|
`;
|
|
46
|
-
const Timeline = ({ lineColour = '#ccc', items, onClick, maxCircleSize = 'min(5vw,3rem)', className, bgColour = '
|
|
49
|
+
const Timeline = ({ lineColour = '#ccc', items, onClick, maxCircleSize = 'min(5vw,3rem)', className, bgColour = 'inherit', showTitles = true, }) => {
|
|
47
50
|
const firstFalse = items.findIndex((i) => !i.checked && !i.disabled);
|
|
48
51
|
const lastTrue = (0, array_1.findLastIndex)(items, (i) => i.checked);
|
|
49
52
|
return (react_1.default.createElement(Base, { className: className },
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
type Event = MouseEvent | TouchEvent;
|
|
3
3
|
export declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(p: {
|
|
4
|
+
ref: RefObject<T>;
|
|
4
5
|
/**
|
|
5
6
|
* default false
|
|
6
7
|
*/
|
|
7
8
|
disabled?: boolean;
|
|
8
|
-
|
|
9
|
+
/** if true, will also consider moving mouse outside div. default false */
|
|
9
10
|
moveMouseOutside?: boolean;
|
|
10
11
|
}, handler: (event: Event) => void): void;
|
|
11
12
|
export {};
|
package/package.json
CHANGED