@conduction/components 2.2.8 → 2.2.10
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/README.md +2 -0
- package/lib/components/tableWrapper/TableWrapper.d.ts +1 -5
- package/lib/components/tableWrapper/TableWrapper.js +2 -3
- package/lib/components/toolTip/ToolTip.d.ts +1 -0
- package/lib/components/toolTip/ToolTip.js +3 -2
- package/lib/components/toolTip/ToolTip.module.css +2 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/src/components/tableWrapper/TableWrapper.tsx +4 -16
- package/src/components/toolTip/ToolTip.module.css +2 -0
- package/src/components/toolTip/ToolTip.tsx +4 -2
- package/src/index.ts +16 -2
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.2 (breaking changes from 2.1.x)**
|
|
6
6
|
|
|
7
|
+
- 2.2.10: Added z-index to tooltip.
|
|
8
|
+
- 2.2.9: Added CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate to index.
|
|
7
9
|
- 2.2.8:
|
|
8
10
|
- Updated Pagination to show current page.
|
|
9
11
|
- Updated Tabs component to have correct border-bottom length.
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useState, useEffect } from "react";
|
|
3
3
|
import * as styles from "./TableWrapper.module.css";
|
|
4
|
-
import clsx from "clsx";
|
|
5
4
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
5
|
import { faChevronLeft, faChevronRight } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
export const TableWrapper = ({ children
|
|
6
|
+
export const TableWrapper = ({ children }) => {
|
|
8
7
|
const [canScrollRight, setCanScrollRight] = useState(false);
|
|
9
8
|
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
|
10
9
|
const wrapperRef = React.useRef(null);
|
|
@@ -27,5 +26,5 @@ export const TableWrapper = ({ children, touchScreen, }) => {
|
|
|
27
26
|
setCanScrollRight(wrapperRef.current.scrollWidth > wrapperRef.current.clientWidth); // initiate scroll
|
|
28
27
|
}
|
|
29
28
|
}, []);
|
|
30
|
-
return (_jsx("div", { className: styles.container, children: _jsxs("div", { onScroll: handleScroll, ref: wrapperRef, className:
|
|
29
|
+
return (_jsx("div", { className: styles.container, children: _jsxs("div", { onScroll: handleScroll, ref: wrapperRef, className: styles.wrapper, children: [canScrollLeft && (_jsx("div", { onClick: handleScrollLeft, className: styles.scrollLeftButton, children: _jsx("div", { className: styles.scrollButton, children: _jsx(FontAwesomeIcon, { icon: faChevronLeft }) }) })), children, canScrollRight && (_jsx("div", { onClick: handleScrollRight, className: styles.scrollRightButton, children: _jsx("div", { className: styles.scrollButton, children: _jsx(FontAwesomeIcon, { icon: faChevronRight }) }) }))] }) }));
|
|
31
30
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./ToolTip.module.css";
|
|
3
3
|
import { Tooltip } from "react-tooltip";
|
|
4
|
+
import clsx from "clsx";
|
|
4
5
|
/**
|
|
5
6
|
* Implement this ToolTip only once, in a high-level wrapper.
|
|
6
7
|
* Use the ToolTip anywhere, in any element, by setting the following data props:
|
|
@@ -8,6 +9,6 @@ import { Tooltip } from "react-tooltip";
|
|
|
8
9
|
* data-tooltip-id="this-is-the-id-set-in-ToolTipProps"
|
|
9
10
|
* data-tooltip-content="Hello world!"
|
|
10
11
|
*/
|
|
11
|
-
export const ToolTip = ({ id }) => {
|
|
12
|
-
return _jsx(Tooltip, { className: styles.tooltip, ...{ id } });
|
|
12
|
+
export const ToolTip = ({ id, layoutClassName }) => {
|
|
13
|
+
return _jsx(Tooltip, { className: clsx(styles.tooltip, layoutClassName, layoutClassName), ...{ id } });
|
|
13
14
|
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
--conduction-tooltip-border-radius: 0px;
|
|
14
14
|
|
|
15
15
|
--conduction-tooltip-opacity: 1;
|
|
16
|
+
--conduction-tooltip-z-index: 9999;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.tooltip {
|
|
@@ -30,4 +31,5 @@
|
|
|
30
31
|
border-radius: var(--conduction-tooltip-border-radius) !important;
|
|
31
32
|
|
|
32
33
|
opacity: var(--conduction-tooltip-opacity);
|
|
34
|
+
z-index: var(--conduction-tooltip-z-index);
|
|
33
35
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard } from "./components/card";
|
|
2
|
+
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate } from "./components/card";
|
|
3
3
|
import { Container } from "./components/container/Container";
|
|
4
4
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
5
5
|
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, InputFile, SelectMultiple, SelectSingle } from "./components/formFields";
|
|
@@ -24,4 +24,4 @@ import { ToolTip } from "./components/toolTip/ToolTip";
|
|
|
24
24
|
import { Pagination } from "./components/Pagination/Pagination";
|
|
25
25
|
import { Tabs, TabList, Tab, TabPanel } from "./components/tabs/Tabs";
|
|
26
26
|
import { TableWrapper } from "./components/tableWrapper/TableWrapper";
|
|
27
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, Container, Breadcrumbs, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, Tabs, TabList, Tab, TabPanel, TableWrapper };
|
|
27
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, Container, Breadcrumbs, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate, Tabs, TabList, Tab, TabPanel, TableWrapper, };
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard } from "./components/card";
|
|
1
|
+
import { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate, } from "./components/card";
|
|
2
2
|
import { Container } from "./components/container/Container";
|
|
3
3
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
4
4
|
import { InputText, InputPassword, InputEmail, InputDate, InputNumber, Textarea, InputCheckbox, InputFile, SelectMultiple, SelectSingle, } from "./components/formFields";
|
|
@@ -17,4 +17,4 @@ import { ToolTip } from "./components/toolTip/ToolTip";
|
|
|
17
17
|
import { Pagination } from "./components/Pagination/Pagination";
|
|
18
18
|
import { Tabs, TabList, Tab, TabPanel } from "./components/tabs/Tabs";
|
|
19
19
|
import { TableWrapper } from "./components/tableWrapper/TableWrapper";
|
|
20
|
-
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, Container, Breadcrumbs, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, Tabs, TabList, Tab, TabPanel, TableWrapper };
|
|
20
|
+
export { DownloadCard, HorizontalImageCard, ImageAndDetailsCard, DetailsCard, InfoCard, Container, Breadcrumbs, InputText, InputPassword, InputEmail, InputDate, InputNumber, InputFile, Textarea, InputCheckbox, SelectMultiple, SelectSingle, ImageDivider, AuthenticatedLogo, UnauthenticatedLogo, MetaIcon, PrivateRoute, PrimaryTopNav, SecondaryTopNav, Tag, NotificationPopUp, QuoteWrapper, Pagination, BadgeCounter, CodeBlock, ToolTip, CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate, Tabs, TabList, Tab, TabPanel, TableWrapper, };
|
package/package.json
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react";
|
|
2
2
|
import * as styles from "./TableWrapper.module.css";
|
|
3
|
-
import clsx from "clsx";
|
|
4
3
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
5
4
|
import { faChevronLeft, faChevronRight } from "@fortawesome/free-solid-svg-icons";
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
touchScreen?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const TableWrapper: React.FC<{ children: React.ReactNode } & TableWrapperProps> = ({
|
|
12
|
-
children,
|
|
13
|
-
touchScreen,
|
|
14
|
-
}) => {
|
|
6
|
+
export const TableWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => {
|
|
15
7
|
const [canScrollRight, setCanScrollRight] = useState(false);
|
|
16
8
|
const [canScrollLeft, setCanScrollLeft] = useState(false);
|
|
17
9
|
|
|
@@ -42,12 +34,8 @@ export const TableWrapper: React.FC<{ children: React.ReactNode } & TableWrapper
|
|
|
42
34
|
|
|
43
35
|
return (
|
|
44
36
|
<div className={styles.container}>
|
|
45
|
-
<div
|
|
46
|
-
|
|
47
|
-
ref={wrapperRef}
|
|
48
|
-
className={clsx(touchScreen ? styles.wrapperTouchscreen : styles.wrapper)}
|
|
49
|
-
>
|
|
50
|
-
{canScrollLeft && !touchScreen && (
|
|
37
|
+
<div onScroll={handleScroll} ref={wrapperRef} className={styles.wrapper}>
|
|
38
|
+
{canScrollLeft && (
|
|
51
39
|
<div onClick={handleScrollLeft} className={styles.scrollLeftButton}>
|
|
52
40
|
<div className={styles.scrollButton}>
|
|
53
41
|
<FontAwesomeIcon icon={faChevronLeft} />
|
|
@@ -55,7 +43,7 @@ export const TableWrapper: React.FC<{ children: React.ReactNode } & TableWrapper
|
|
|
55
43
|
</div>
|
|
56
44
|
)}
|
|
57
45
|
{children}
|
|
58
|
-
{canScrollRight &&
|
|
46
|
+
{canScrollRight && (
|
|
59
47
|
<div onClick={handleScrollRight} className={styles.scrollRightButton}>
|
|
60
48
|
<div className={styles.scrollButton}>
|
|
61
49
|
<FontAwesomeIcon icon={faChevronRight} />
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
--conduction-tooltip-border-radius: 0px;
|
|
14
14
|
|
|
15
15
|
--conduction-tooltip-opacity: 1;
|
|
16
|
+
--conduction-tooltip-z-index: 9999;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.tooltip {
|
|
@@ -30,4 +31,5 @@
|
|
|
30
31
|
border-radius: var(--conduction-tooltip-border-radius) !important;
|
|
31
32
|
|
|
32
33
|
opacity: var(--conduction-tooltip-opacity);
|
|
34
|
+
z-index: var(--conduction-tooltip-z-index);
|
|
33
35
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./ToolTip.module.css";
|
|
3
3
|
import { Tooltip } from "react-tooltip";
|
|
4
|
+
import clsx from "clsx";
|
|
4
5
|
|
|
5
6
|
interface ToolTipProps {
|
|
6
7
|
id: string;
|
|
8
|
+
layoutClassName?: string;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
/**
|
|
@@ -14,6 +16,6 @@ interface ToolTipProps {
|
|
|
14
16
|
* data-tooltip-content="Hello world!"
|
|
15
17
|
*/
|
|
16
18
|
|
|
17
|
-
export const ToolTip: React.FC<ToolTipProps> = ({ id }) => {
|
|
18
|
-
return <Tooltip className={styles.tooltip} {...{ id }} />;
|
|
19
|
+
export const ToolTip: React.FC<ToolTipProps> = ({ id, layoutClassName }) => {
|
|
20
|
+
return <Tooltip className={clsx(styles.tooltip, layoutClassName, layoutClassName)} {...{ id }} />;
|
|
19
21
|
};
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
DownloadCard,
|
|
3
|
+
HorizontalImageCard,
|
|
4
|
+
ImageAndDetailsCard,
|
|
5
|
+
DetailsCard,
|
|
6
|
+
InfoCard,
|
|
7
|
+
CardWrapper,
|
|
8
|
+
CardHeader,
|
|
9
|
+
CardHeaderTitle,
|
|
10
|
+
CardHeaderDate,
|
|
11
|
+
} from "./components/card";
|
|
2
12
|
import { Container } from "./components/container/Container";
|
|
3
13
|
import { Breadcrumbs } from "./components/denhaag-wrappers/breadcrumbs/Breadcrumbs";
|
|
4
14
|
import {
|
|
@@ -64,9 +74,13 @@ export {
|
|
|
64
74
|
BadgeCounter,
|
|
65
75
|
CodeBlock,
|
|
66
76
|
ToolTip,
|
|
77
|
+
CardWrapper,
|
|
78
|
+
CardHeader,
|
|
79
|
+
CardHeaderTitle,
|
|
80
|
+
CardHeaderDate,
|
|
67
81
|
Tabs,
|
|
68
82
|
TabList,
|
|
69
83
|
Tab,
|
|
70
84
|
TabPanel,
|
|
71
|
-
TableWrapper
|
|
85
|
+
TableWrapper,
|
|
72
86
|
};
|