@conduction/components 2.2.3 → 2.2.5
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/formFields/createKeyValue/CreateKeyValue.js +1 -2
- package/lib/components/tabs/Tabs.d.ts +5 -14
- package/lib/components/tabs/Tabs.js +14 -6
- package/lib/components/tabs/Tabs.module.css +116 -76
- package/lib/components/toolTip/ToolTip.d.ts +10 -6
- package/lib/components/toolTip/ToolTip.js +11 -6
- package/lib/components/toolTip/ToolTip.module.css +26 -10
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/package.json +3 -8
- package/src/components/formFields/createKeyValue/CreateKeyValue.tsx +11 -16
- package/src/components/tabs/Tabs.module.css +116 -76
- package/src/components/tabs/Tabs.tsx +45 -35
- package/src/components/toolTip/ToolTip.module.css +26 -10
- package/src/components/toolTip/ToolTip.tsx +11 -15
- package/src/index.ts +5 -2
package/README.md
CHANGED
|
@@ -3,7 +3,6 @@ import * as React from "react";
|
|
|
3
3
|
import * as styles from "./CreateKeyValue.module.css";
|
|
4
4
|
import { Controller } from "react-hook-form";
|
|
5
5
|
import { Table, TableBody, TableCell, TableHeaderCell, TableHeader, TableRow, Textbox, Button, } from "@utrecht/component-library-react/dist/css-module";
|
|
6
|
-
import { ToolTip } from "../../toolTip/ToolTip";
|
|
7
6
|
import clsx from "clsx";
|
|
8
7
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
9
8
|
import { faCopy, faTrash } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -37,5 +36,5 @@ const KeyValueComponent = ({ defaultValue, handleChange, disabled, copyValue, })
|
|
|
37
36
|
React.useEffect(() => {
|
|
38
37
|
handleChange(keyValues);
|
|
39
38
|
}, [keyValues]);
|
|
40
|
-
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHeader, { className: styles.tableHeader, children: _jsxs(TableRow, { children: [_jsx(TableHeaderCell, { children: "Key" }), _jsx(TableHeaderCell, { children: "Value" }), _jsx(TableHeaderCell, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { children: _jsxs("div", { className: styles.buttonsContainer, children: [copyValue && (_jsx(
|
|
39
|
+
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHeader, { className: styles.tableHeader, children: _jsxs(TableRow, { children: [_jsx(TableHeaderCell, { children: "Key" }), _jsx(TableHeaderCell, { children: "Value" }), _jsx(TableHeaderCell, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { children: _jsxs("div", { className: styles.buttonsContainer, children: [copyValue && (_jsx(Button, { ...{ disabled }, onClick: () => handleCopyToClipboard(keyValue.value, idx), appearance: currentCopyIdx === idx ? "secondary-action-button" : "primary-action-button", children: _jsx(FontAwesomeIcon, { icon: faCopy }) })), _jsx(Button, { ...{ disabled }, onClick: () => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue)), className: clsx(styles.deleteButton), children: _jsx(FontAwesomeIcon, { icon: faTrash }) })] }) })] }, `${keyValue.key}${keyValue.value}${idx}`))) })] })), _jsxs("div", { className: styles.form, children: [_jsx(Textbox, { type: "text", placeholder: "Key", value: currentKey, ref: currentKeyRef, onChange: (e) => setCurrentKey(e.target.value), ...{ disabled } }), _jsx(Textbox, { type: "text", placeholder: "Value", value: currentValue, ref: currentValueRef, onChange: (e) => setCurrentValue(e.target.value), ...{ disabled } }), _jsx(Button, { onClick: handleCreate, disabled: !currentKey || !currentValue || disabled, children: "Add" })] })] }));
|
|
41
40
|
};
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
interface ITabProps {
|
|
7
|
-
name: string;
|
|
8
|
-
badge?: string;
|
|
9
|
-
}
|
|
10
|
-
interface ITabPanelProps {
|
|
11
|
-
content: JSX.Element;
|
|
12
|
-
}
|
|
13
|
-
export declare const TabContext: React.FC<testProps>;
|
|
14
|
-
export {};
|
|
1
|
+
import { ReactTabsFunctionComponent, TabProps, TabPanelProps, TabListProps, TabsProps } from "react-tabs";
|
|
2
|
+
export declare const Tabs: ReactTabsFunctionComponent<TabsProps>;
|
|
3
|
+
export declare const TabList: ReactTabsFunctionComponent<TabListProps>;
|
|
4
|
+
export declare const Tab: ReactTabsFunctionComponent<TabProps>;
|
|
5
|
+
export declare const TabPanel: ReactTabsFunctionComponent<TabPanelProps>;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as styles from "./Tabs.module.css";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export const
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
import { Tabs as RTabs, TabList as RTabList, Tab as RTab, TabPanel as RTabPanel, } from "react-tabs";
|
|
4
|
+
// Tabs
|
|
5
|
+
export const Tabs = ({ children, ...otherProps }) => (_jsx(RTabs, { className: styles.tabs, ...otherProps, children: children }));
|
|
6
|
+
Tabs.tabsRole = "Tabs";
|
|
7
|
+
// TabList
|
|
8
|
+
export const TabList = ({ children, ...otherProps }) => (_jsx(RTabList, { className: styles.tabList, ...otherProps, children: children }));
|
|
9
|
+
TabList.tabsRole = "TabList";
|
|
10
|
+
// Tab
|
|
11
|
+
export const Tab = ({ children, ...otherProps }) => (_jsx(RTab, { className: styles.tab, ...otherProps, children: children }));
|
|
12
|
+
Tab.tabsRole = "Tab";
|
|
13
|
+
// TabPanel
|
|
14
|
+
export const TabPanel = ({ children, ...otherProps }) => (_jsx(RTabPanel, { ...otherProps, children: children }));
|
|
15
|
+
TabPanel.tabsRole = "TabPanel";
|
|
@@ -1,42 +1,61 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--conduction-tab-
|
|
3
|
-
--conduction-tab-
|
|
4
|
-
--conduction-tab-
|
|
5
|
-
--conduction-tab-
|
|
2
|
+
--conduction-tabs-tab-background-color: #ffffff;
|
|
3
|
+
--conduction-tabs-tab-color: #4a4a4a;
|
|
4
|
+
/* --conduction-tabs-tab-border-width: 0px; */
|
|
5
|
+
/* --conduction-tabs-tab-border-style: solid; */
|
|
6
|
+
/* --conduction-tabs-tab-border-color: #ffffff; */
|
|
7
|
+
/* --conduction-tabs-tab-border-bottom: 0px; */
|
|
8
|
+
/* --conduction-tabs-tab-border-bottom-width: var(--skeleton-size-3xs); */
|
|
9
|
+
/* --conduction-tabs-tab-border-bottom-style: solid; */
|
|
10
|
+
/* --conduction-tabs-tab-border-bottom-color: #d1d1d1; */
|
|
11
|
+
--conduction-tabs-tab-bottom: -2px;
|
|
12
|
+
--conduction-tabs-tab-padding-block-start: var(--skeleton-size-xs);
|
|
13
|
+
--conduction-tabs-tab-padding-block-end: var(--skeleton-size-xs);
|
|
14
|
+
--conduction-tabs-tab-padding-inline-start: var(--skeleton-size-sm);
|
|
15
|
+
--conduction-tabs-tab-padding-inline-end: var(--skeleton-size-sm);
|
|
16
|
+
/* --conduction-tabs-tab-margin-inline-end: var(--skeleton-size-xs); */
|
|
17
|
+
--conduction-tabs-tab-font-size: var(--skeleton-font-size-sm: );
|
|
18
|
+
--conduction-tabs-tab-font-weight: var(--skeleton-font-weight-normal);
|
|
19
|
+
--conduction-tabs-tab-font-family: "Noto Sans", Arial, sans-serif;
|
|
20
|
+
--conduction-tabs-tab-max-width: unset;
|
|
21
|
+
/* --conduction-tabs-tab-letter-spacing: 0.02857em; */
|
|
22
|
+
/* --conduction-tabs-tab-text-transform: uppercase; */
|
|
6
23
|
|
|
7
|
-
--conduction-tab-
|
|
8
|
-
--conduction-tab-
|
|
9
|
-
--conduction-tab-
|
|
10
|
-
--conduction-tab-
|
|
11
|
-
--conduction-tab-
|
|
12
|
-
--conduction-tab-
|
|
13
|
-
--conduction-tab-
|
|
14
|
-
--conduction-tab-
|
|
15
|
-
--conduction-tab-
|
|
16
|
-
--conduction-tab-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--conduction-tab-color: #
|
|
24
|
+
--conduction-tabs-tab-selected-background-color: #ffffff;
|
|
25
|
+
--conduction-tabs-tab-selected-color: #4a4a4a;
|
|
26
|
+
/* --conduction-tabs-tab-selected-box-shadow: 0px 1px 0px 1px #ffffff; */
|
|
27
|
+
/* --conduction-tabs-tab-selected-border-width: 0px; */
|
|
28
|
+
/* --conduction-tabs-tab-selected-border-style: solid; */
|
|
29
|
+
/* --conduction-tabs-tab-selected-border-color: #ffffff; */
|
|
30
|
+
/* --conduction-tabs-tab-selected-border-bottom: 0; */
|
|
31
|
+
--conduction-tabs-tab-selected-border-bottom-width: var(--skeleton-size-3xs);
|
|
32
|
+
--conduction-tabs-tab-selected-border-bottom-style: solid;
|
|
33
|
+
--conduction-tabs-tab-selected-border-bottom-color: #4376fc;
|
|
34
|
+
--conduction-tabs-tab-selected-font-weight: var(--skeleton-font-weight-bold);
|
|
35
|
+
--conduction-tabs-tab-selected-font-family: "Noto Sans", Arial, sans-serif;
|
|
36
|
+
/* --conduction-tabs-tab-selected-hover-background-color: #ffffff; */
|
|
37
|
+
/* --conduction-tabs-tab-selected-hover-color: #4a4a4a; */
|
|
38
|
+
/* --conduction-tabs-tab-selected-hover-text-decoration: underline; */
|
|
20
39
|
|
|
21
|
-
--conduction-tab-
|
|
22
|
-
--conduction-tab-
|
|
23
|
-
--conduction-tab-
|
|
24
|
-
--conduction-tab-selected-border-bottom-color: #4376fc;
|
|
25
|
-
--conduction-tab-selected-font-weight: var(--skeleton-font-weight-bold);
|
|
40
|
+
/* --conduction-tabs-tab-hover-background-color: #ffffff; */
|
|
41
|
+
/* --conduction-tabs-tab-hover-color: #4a4a4a; */
|
|
42
|
+
/* --conduction-tabs-tab-hover-text-decoration: underline; */
|
|
26
43
|
|
|
27
|
-
--conduction-tab-
|
|
28
|
-
--conduction-tab-
|
|
29
|
-
--conduction-tab-
|
|
30
|
-
--conduction-tab-
|
|
44
|
+
--conduction-tabs-tab-list-padding-inline-start: 0px;
|
|
45
|
+
--conduction-tabs-tab-list-margin-block-end: 16px;
|
|
46
|
+
--conduction-tabs-tab-list-border-bottom-width: var(--skeleton-size-3xs);
|
|
47
|
+
--conduction-tabs-tab-list-border-bottom-style: solid;
|
|
48
|
+
--conduction-tabs-tab-list-border-bottom-color: #d1d1d1;
|
|
31
49
|
|
|
32
|
-
--conduction-tab-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
padding-inline-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
/* --conduction-tabs-tab-panel-background-color: #ffffff; */
|
|
51
|
+
--conduction-tabs-tab-panel-padding-block-start: var(--skeleton-size-lg);
|
|
52
|
+
--conduction-tabs-tab-panel-padding-block-end: var(--skeleton-size-lg);
|
|
53
|
+
--conduction-tabs-tab-panel-padding-inline-start: var(--skeleton-size-lg);
|
|
54
|
+
--conduction-tabs-tab-panel-padding-inline-end: var(--skeleton-size-lg);
|
|
55
|
+
/* --conduction-tabs-tab-panel-border-width: 0px; */
|
|
56
|
+
/* --conduction-tabs-tab-panel-border-style: solid; */
|
|
57
|
+
/* --conduction-tabs-tab-panel-border-color: #ffffff; */
|
|
58
|
+
/* --conduction-tabs-tab-panel-border-top: 0; */
|
|
40
59
|
}
|
|
41
60
|
|
|
42
61
|
.tab {
|
|
@@ -49,54 +68,75 @@
|
|
|
49
68
|
box-sizing: border-box;
|
|
50
69
|
text-align: center;
|
|
51
70
|
white-space: normal;
|
|
52
|
-
bottom: -2px;
|
|
53
71
|
|
|
54
|
-
color: var(--conduction-tab-color);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
background-color: var(--conduction-tabs-tab-background-color);
|
|
73
|
+
color: var(--conduction-tabs-tab-color);
|
|
74
|
+
border-width: var(--conduction-tabs-tab-border-width);
|
|
75
|
+
border-style: var(--conduction-tabs-tab-border-style);
|
|
76
|
+
border-color: var(--conduction-tabs-tab-border-color);
|
|
77
|
+
border-bottom: var(--conduction-tabs-tab-border-bottom);
|
|
78
|
+
border-bottom-width: var(--conduction-tabs-tab-border-bottom-width);
|
|
79
|
+
border-bottom-style: var(--conduction-tabs-tab-border-bottom-style);
|
|
80
|
+
border-bottom-color: var(--conduction-tabs-tab-border-bottom-color);
|
|
81
|
+
bottom: var(--conduction-tabs-tab-bottom);
|
|
82
|
+
padding-block-start: var(--conduction-tabs-tab-padding-block-start);
|
|
83
|
+
padding-block-end: var(--conduction-tabs-tab-padding-block-end);
|
|
84
|
+
padding-inline-start: var(--conduction-tabs-tab-padding-inline-start);
|
|
85
|
+
padding-inline-end: var(--conduction-tabs-tab-padding-inline-end);
|
|
86
|
+
margin-inline-end: var(--conduction-tabs-tab-margin-inline-end);
|
|
87
|
+
font-size: var(--conduction-tabs-tab-font-size);
|
|
88
|
+
font-weight: var(--conduction-tabs-tab-font-weight);
|
|
89
|
+
font-family: var(--conduction-tabs-tab-font-family);
|
|
90
|
+
min-height: var(--conduction-tabs-tab-min-height);
|
|
91
|
+
letter-spacing: var(--conduction-tabs-tab-letter-spacing);
|
|
92
|
+
text-transform: var(--conduction-tabs-tab-text-transform);
|
|
71
93
|
}
|
|
72
94
|
|
|
95
|
+
/* TabSelected */
|
|
73
96
|
.tab[aria-selected="true"] {
|
|
74
|
-
color: var(--conduction-tab-selected-color);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
border-
|
|
78
|
-
|
|
97
|
+
background-color: var(--conduction-tabs-tab-selected-background-color);
|
|
98
|
+
color: var(--conduction-tabs-tab-selected-color);
|
|
99
|
+
box-shadow: var(--conduction-tabs-tab-selected-box-shadow);
|
|
100
|
+
border-width: var(--conduction-tabs-tab-selected-border-width);
|
|
101
|
+
border-style: var(--conduction-tabs-tab-selected-border-style);
|
|
102
|
+
border-color: var(--conduction-tabs-tab-selected-border-color);
|
|
103
|
+
border-bottom: var(--conduction-tabs-tab-selected-border-bottom);
|
|
104
|
+
border-bottom-width: var(--conduction-tabs-tab-selected-border-bottom-width);
|
|
105
|
+
border-bottom-style: var(--conduction-tabs-tab-selected-border-bottom-style);
|
|
106
|
+
border-bottom-color: var(--conduction-tabs-tab-selected-border-bottom-color);
|
|
107
|
+
font-weight: var(--conduction-tabs-tab-selected-font-weight);
|
|
108
|
+
font-family: var(--conduction-tabs-tab-selected-font-family);
|
|
79
109
|
}
|
|
80
110
|
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
111
|
+
.tab[aria-selected="true"]:hover {
|
|
112
|
+
background-color: var(--conduction-tabs-tab-selected-hover-background-color);
|
|
113
|
+
color: var(--conduction-tabs-tab-selected-hover-color);
|
|
114
|
+
text-decoration: var(--conduction-tabs-tab-selected-hover-text-decoration);
|
|
115
|
+
}
|
|
116
|
+
.tab:hover {
|
|
117
|
+
background-color: var(--conduction-tabs-tab-hover-background-color);
|
|
118
|
+
color: var(--conduction-tabs-tab-hover-color);
|
|
119
|
+
text-decoration: var(--conduction-tabs-tab-hover-text-decoration);
|
|
86
120
|
}
|
|
87
121
|
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
padding-
|
|
101
|
-
|
|
122
|
+
.tabList {
|
|
123
|
+
display: flex;
|
|
124
|
+
padding-inline-start: var(--conduction-tabs-tab-list-padding-inline-start);
|
|
125
|
+
margin-block-end: var(--conduction-tabs-tab-list-margin-block-end);
|
|
126
|
+
border-bottom-width: var(--conduction-tabs-tab-list-border-bottom-width);
|
|
127
|
+
border-bottom-style: var(--conduction-tabs-tab-list-border-bottom-style);
|
|
128
|
+
border-bottom-color: var(--conduction-tabs-tab-list-border-bottom-color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* TabPanel */
|
|
132
|
+
.tabs [class*="react-tabs__tab-panel--selected"] {
|
|
133
|
+
background-color: var(--conduction-tabs-tab-panel-background-color);
|
|
134
|
+
padding-block-start: var(--conduction-tabs-tab-panel-padding-block-start);
|
|
135
|
+
padding-block-end: var(--conduction-tabs-tab-panel-padding-block-end);
|
|
136
|
+
padding-inline-start: var(--conduction-tabs-tab-panel-padding-inline-start);
|
|
137
|
+
padding-inline-end: var(--conduction-tabs-tab-panel-padding-inline-end);
|
|
138
|
+
border-width: var(--conduction-tabs-tab-panel-border-width);
|
|
139
|
+
border-style: var(--conduction-tabs-tab-panel-border-style);
|
|
140
|
+
border-color: var(--conduction-tabs-tab-panel-border-color);
|
|
141
|
+
border-top: var(--conduction-tabs-tab-panel-border-top);
|
|
102
142
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import ReactTooltip from "react-tooltip";
|
|
3
2
|
interface ToolTipProps {
|
|
4
|
-
|
|
5
|
-
tooltip: string;
|
|
6
|
-
layoutClassName?: string;
|
|
3
|
+
id: string;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Implement this ToolTip only once, in a high-level wrapper.
|
|
7
|
+
* Use the ToolTip anywhere, in any element, by setting the following data props:
|
|
8
|
+
*
|
|
9
|
+
* data-tooltip-id="this-is-the-id-set-in-ToolTipProps"
|
|
10
|
+
* data-tooltip-content="Hello world!"
|
|
11
|
+
*/
|
|
12
|
+
export declare const ToolTip: React.FC<ToolTipProps>;
|
|
13
|
+
export {};
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import clsx from "clsx";
|
|
3
|
-
import ReactTooltip from "react-tooltip";
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
import * as styles from "./ToolTip.module.css";
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { Tooltip } from "react-tooltip";
|
|
4
|
+
/**
|
|
5
|
+
* Implement this ToolTip only once, in a high-level wrapper.
|
|
6
|
+
* Use the ToolTip anywhere, in any element, by setting the following data props:
|
|
7
|
+
*
|
|
8
|
+
* data-tooltip-id="this-is-the-id-set-in-ToolTipProps"
|
|
9
|
+
* data-tooltip-content="Hello world!"
|
|
10
|
+
*/
|
|
11
|
+
export const ToolTip = ({ id }) => {
|
|
12
|
+
return _jsx(Tooltip, { className: styles.tooltip, ...{ id } });
|
|
7
13
|
};
|
|
8
|
-
export { ReactTooltip };
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--conduction-tooltip-
|
|
3
|
-
|
|
2
|
+
--conduction-tooltip-padding-inline-start: 0px;
|
|
3
|
+
--conduction-tooltip-padding-inline-end: 0px;
|
|
4
|
+
--conduction-tooltip-padding-block-start: 0px;
|
|
5
|
+
--conduction-tooltip-padding-block-end: 0px;
|
|
6
|
+
|
|
7
|
+
--conduction-tooltip-background-color: var(--skeleton-color-black);
|
|
8
|
+
--conduction-tooltip-color: var(--skeleton-color-white);
|
|
9
|
+
|
|
10
|
+
--conduction-tooltip-border-width: 0px;
|
|
11
|
+
--conduction-tooltip-border-color: unset;
|
|
12
|
+
--conduction-tooltip-border-style: unset;
|
|
13
|
+
--conduction-tooltip-border-radius: 0px;
|
|
4
14
|
|
|
5
|
-
|
|
6
|
-
display: inline-block;
|
|
7
|
-
position: relative;
|
|
15
|
+
--conduction-tooltip-opacity: 1;
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
.tooltip {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
padding-inline-start: var(--conduction-tooltip-padding-inline-start);
|
|
20
|
+
padding-inline-end: var(--conduction-tooltip-padding-inline-end);
|
|
21
|
+
padding-block-start: var(--conduction-tooltip-padding-block-start);
|
|
22
|
+
padding-block-end: var(--conduction-tooltip-padding-block-end);
|
|
23
|
+
|
|
24
|
+
background-color: var(--conduction-tooltip-background-color) !important;
|
|
25
|
+
color: var(--conduction-tooltip-color) !important;
|
|
26
|
+
|
|
27
|
+
border-width: var(--conductino-tooltip-border-width);
|
|
28
|
+
border-color: var(--conduction-tooltip-border-color);
|
|
29
|
+
border-style: var(--conduction-tooltip-border-style);
|
|
30
|
+
border-radius: var(--conduction-tooltip-border-radius) !important;
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
all: unset !important;
|
|
32
|
+
opacity: var(--conduction-tooltip-opacity);
|
|
17
33
|
}
|
package/lib/index.d.ts
CHANGED
|
@@ -22,5 +22,5 @@ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
|
|
|
22
22
|
import { CodeBlock } from "./components/codeBlock/CodeBlock";
|
|
23
23
|
import { ToolTip } from "./components/toolTip/ToolTip";
|
|
24
24
|
import { Pagination } from "./components/Pagination/Pagination";
|
|
25
|
-
import {
|
|
26
|
-
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,
|
|
25
|
+
import { Tabs, TabList, Tab, TabPanel } from "./components/tabs/Tabs";
|
|
26
|
+
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, };
|
package/lib/index.js
CHANGED
|
@@ -15,5 +15,5 @@ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
|
|
|
15
15
|
import { CodeBlock } from "./components/codeBlock/CodeBlock";
|
|
16
16
|
import { ToolTip } from "./components/toolTip/ToolTip";
|
|
17
17
|
import { Pagination } from "./components/Pagination/Pagination";
|
|
18
|
-
import {
|
|
19
|
-
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,
|
|
18
|
+
import { Tabs, TabList, Tab, TabPanel } from "./components/tabs/Tabs";
|
|
19
|
+
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, };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.5",
|
|
4
4
|
"description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,12 +12,7 @@
|
|
|
12
12
|
"type": "git",
|
|
13
13
|
"url": "git+https://github.com/ConductionNL/conduction-components.git"
|
|
14
14
|
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"React",
|
|
17
|
-
"Gatsby",
|
|
18
|
-
"Conduction",
|
|
19
|
-
"Components"
|
|
20
|
-
],
|
|
15
|
+
"keywords": ["React", "Gatsby", "Conduction", "Components"],
|
|
21
16
|
"author": "Conduction B.V.",
|
|
22
17
|
"license": "ISC",
|
|
23
18
|
"bugs": {
|
|
@@ -37,7 +32,7 @@
|
|
|
37
32
|
"react-paginate": "^8.2.0",
|
|
38
33
|
"react-select": "5.3.2",
|
|
39
34
|
"react-tabs": "^6.0.2",
|
|
40
|
-
"react-tooltip": "^
|
|
35
|
+
"react-tooltip": "^5.21.3"
|
|
41
36
|
},
|
|
42
37
|
"devDependencies": {
|
|
43
38
|
"@types/node": "^17.0.23",
|
|
@@ -12,7 +12,6 @@ import {
|
|
|
12
12
|
Textbox,
|
|
13
13
|
Button,
|
|
14
14
|
} from "@utrecht/component-library-react/dist/css-module";
|
|
15
|
-
import { ToolTip } from "../../toolTip/ToolTip";
|
|
16
15
|
import clsx from "clsx";
|
|
17
16
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
18
17
|
import { faCopy, faTrash } from "@fortawesome/free-solid-svg-icons";
|
|
@@ -133,25 +132,21 @@ const KeyValueComponent = ({
|
|
|
133
132
|
<TableCell>
|
|
134
133
|
<div className={styles.buttonsContainer}>
|
|
135
134
|
{copyValue && (
|
|
136
|
-
<ToolTip tooltip="Copy value">
|
|
137
|
-
<Button
|
|
138
|
-
{...{ disabled }}
|
|
139
|
-
onClick={() => handleCopyToClipboard(keyValue.value, idx)}
|
|
140
|
-
appearance={currentCopyIdx === idx ? "secondary-action-button" : "primary-action-button"}
|
|
141
|
-
>
|
|
142
|
-
<FontAwesomeIcon icon={faCopy} />
|
|
143
|
-
</Button>
|
|
144
|
-
</ToolTip>
|
|
145
|
-
)}
|
|
146
|
-
<ToolTip tooltip="Delete value">
|
|
147
135
|
<Button
|
|
148
136
|
{...{ disabled }}
|
|
149
|
-
onClick={() =>
|
|
150
|
-
|
|
137
|
+
onClick={() => handleCopyToClipboard(keyValue.value, idx)}
|
|
138
|
+
appearance={currentCopyIdx === idx ? "secondary-action-button" : "primary-action-button"}
|
|
151
139
|
>
|
|
152
|
-
<FontAwesomeIcon icon={
|
|
140
|
+
<FontAwesomeIcon icon={faCopy} />
|
|
153
141
|
</Button>
|
|
154
|
-
|
|
142
|
+
)}
|
|
143
|
+
<Button
|
|
144
|
+
{...{ disabled }}
|
|
145
|
+
onClick={() => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue))}
|
|
146
|
+
className={clsx(styles.deleteButton)}
|
|
147
|
+
>
|
|
148
|
+
<FontAwesomeIcon icon={faTrash} />
|
|
149
|
+
</Button>
|
|
155
150
|
</div>
|
|
156
151
|
</TableCell>
|
|
157
152
|
</TableRow>
|
|
@@ -1,42 +1,61 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--conduction-tab-
|
|
3
|
-
--conduction-tab-
|
|
4
|
-
--conduction-tab-
|
|
5
|
-
--conduction-tab-
|
|
2
|
+
--conduction-tabs-tab-background-color: #ffffff;
|
|
3
|
+
--conduction-tabs-tab-color: #4a4a4a;
|
|
4
|
+
/* --conduction-tabs-tab-border-width: 0px; */
|
|
5
|
+
/* --conduction-tabs-tab-border-style: solid; */
|
|
6
|
+
/* --conduction-tabs-tab-border-color: #ffffff; */
|
|
7
|
+
/* --conduction-tabs-tab-border-bottom: 0px; */
|
|
8
|
+
/* --conduction-tabs-tab-border-bottom-width: var(--skeleton-size-3xs); */
|
|
9
|
+
/* --conduction-tabs-tab-border-bottom-style: solid; */
|
|
10
|
+
/* --conduction-tabs-tab-border-bottom-color: #d1d1d1; */
|
|
11
|
+
--conduction-tabs-tab-bottom: -2px;
|
|
12
|
+
--conduction-tabs-tab-padding-block-start: var(--skeleton-size-xs);
|
|
13
|
+
--conduction-tabs-tab-padding-block-end: var(--skeleton-size-xs);
|
|
14
|
+
--conduction-tabs-tab-padding-inline-start: var(--skeleton-size-sm);
|
|
15
|
+
--conduction-tabs-tab-padding-inline-end: var(--skeleton-size-sm);
|
|
16
|
+
/* --conduction-tabs-tab-margin-inline-end: var(--skeleton-size-xs); */
|
|
17
|
+
--conduction-tabs-tab-font-size: var(--skeleton-font-size-sm: );
|
|
18
|
+
--conduction-tabs-tab-font-weight: var(--skeleton-font-weight-normal);
|
|
19
|
+
--conduction-tabs-tab-font-family: "Noto Sans", Arial, sans-serif;
|
|
20
|
+
--conduction-tabs-tab-max-width: unset;
|
|
21
|
+
/* --conduction-tabs-tab-letter-spacing: 0.02857em; */
|
|
22
|
+
/* --conduction-tabs-tab-text-transform: uppercase; */
|
|
6
23
|
|
|
7
|
-
--conduction-tab-
|
|
8
|
-
--conduction-tab-
|
|
9
|
-
--conduction-tab-
|
|
10
|
-
--conduction-tab-
|
|
11
|
-
--conduction-tab-
|
|
12
|
-
--conduction-tab-
|
|
13
|
-
--conduction-tab-
|
|
14
|
-
--conduction-tab-
|
|
15
|
-
--conduction-tab-
|
|
16
|
-
--conduction-tab-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--conduction-tab-color: #
|
|
24
|
+
--conduction-tabs-tab-selected-background-color: #ffffff;
|
|
25
|
+
--conduction-tabs-tab-selected-color: #4a4a4a;
|
|
26
|
+
/* --conduction-tabs-tab-selected-box-shadow: 0px 1px 0px 1px #ffffff; */
|
|
27
|
+
/* --conduction-tabs-tab-selected-border-width: 0px; */
|
|
28
|
+
/* --conduction-tabs-tab-selected-border-style: solid; */
|
|
29
|
+
/* --conduction-tabs-tab-selected-border-color: #ffffff; */
|
|
30
|
+
/* --conduction-tabs-tab-selected-border-bottom: 0; */
|
|
31
|
+
--conduction-tabs-tab-selected-border-bottom-width: var(--skeleton-size-3xs);
|
|
32
|
+
--conduction-tabs-tab-selected-border-bottom-style: solid;
|
|
33
|
+
--conduction-tabs-tab-selected-border-bottom-color: #4376fc;
|
|
34
|
+
--conduction-tabs-tab-selected-font-weight: var(--skeleton-font-weight-bold);
|
|
35
|
+
--conduction-tabs-tab-selected-font-family: "Noto Sans", Arial, sans-serif;
|
|
36
|
+
/* --conduction-tabs-tab-selected-hover-background-color: #ffffff; */
|
|
37
|
+
/* --conduction-tabs-tab-selected-hover-color: #4a4a4a; */
|
|
38
|
+
/* --conduction-tabs-tab-selected-hover-text-decoration: underline; */
|
|
20
39
|
|
|
21
|
-
--conduction-tab-
|
|
22
|
-
--conduction-tab-
|
|
23
|
-
--conduction-tab-
|
|
24
|
-
--conduction-tab-selected-border-bottom-color: #4376fc;
|
|
25
|
-
--conduction-tab-selected-font-weight: var(--skeleton-font-weight-bold);
|
|
40
|
+
/* --conduction-tabs-tab-hover-background-color: #ffffff; */
|
|
41
|
+
/* --conduction-tabs-tab-hover-color: #4a4a4a; */
|
|
42
|
+
/* --conduction-tabs-tab-hover-text-decoration: underline; */
|
|
26
43
|
|
|
27
|
-
--conduction-tab-
|
|
28
|
-
--conduction-tab-
|
|
29
|
-
--conduction-tab-
|
|
30
|
-
--conduction-tab-
|
|
44
|
+
--conduction-tabs-tab-list-padding-inline-start: 0px;
|
|
45
|
+
--conduction-tabs-tab-list-margin-block-end: 16px;
|
|
46
|
+
--conduction-tabs-tab-list-border-bottom-width: var(--skeleton-size-3xs);
|
|
47
|
+
--conduction-tabs-tab-list-border-bottom-style: solid;
|
|
48
|
+
--conduction-tabs-tab-list-border-bottom-color: #d1d1d1;
|
|
31
49
|
|
|
32
|
-
--conduction-tab-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
padding-inline-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
/* --conduction-tabs-tab-panel-background-color: #ffffff; */
|
|
51
|
+
--conduction-tabs-tab-panel-padding-block-start: var(--skeleton-size-lg);
|
|
52
|
+
--conduction-tabs-tab-panel-padding-block-end: var(--skeleton-size-lg);
|
|
53
|
+
--conduction-tabs-tab-panel-padding-inline-start: var(--skeleton-size-lg);
|
|
54
|
+
--conduction-tabs-tab-panel-padding-inline-end: var(--skeleton-size-lg);
|
|
55
|
+
/* --conduction-tabs-tab-panel-border-width: 0px; */
|
|
56
|
+
/* --conduction-tabs-tab-panel-border-style: solid; */
|
|
57
|
+
/* --conduction-tabs-tab-panel-border-color: #ffffff; */
|
|
58
|
+
/* --conduction-tabs-tab-panel-border-top: 0; */
|
|
40
59
|
}
|
|
41
60
|
|
|
42
61
|
.tab {
|
|
@@ -49,54 +68,75 @@
|
|
|
49
68
|
box-sizing: border-box;
|
|
50
69
|
text-align: center;
|
|
51
70
|
white-space: normal;
|
|
52
|
-
bottom: -2px;
|
|
53
71
|
|
|
54
|
-
color: var(--conduction-tab-color);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
background-color: var(--conduction-tabs-tab-background-color);
|
|
73
|
+
color: var(--conduction-tabs-tab-color);
|
|
74
|
+
border-width: var(--conduction-tabs-tab-border-width);
|
|
75
|
+
border-style: var(--conduction-tabs-tab-border-style);
|
|
76
|
+
border-color: var(--conduction-tabs-tab-border-color);
|
|
77
|
+
border-bottom: var(--conduction-tabs-tab-border-bottom);
|
|
78
|
+
border-bottom-width: var(--conduction-tabs-tab-border-bottom-width);
|
|
79
|
+
border-bottom-style: var(--conduction-tabs-tab-border-bottom-style);
|
|
80
|
+
border-bottom-color: var(--conduction-tabs-tab-border-bottom-color);
|
|
81
|
+
bottom: var(--conduction-tabs-tab-bottom);
|
|
82
|
+
padding-block-start: var(--conduction-tabs-tab-padding-block-start);
|
|
83
|
+
padding-block-end: var(--conduction-tabs-tab-padding-block-end);
|
|
84
|
+
padding-inline-start: var(--conduction-tabs-tab-padding-inline-start);
|
|
85
|
+
padding-inline-end: var(--conduction-tabs-tab-padding-inline-end);
|
|
86
|
+
margin-inline-end: var(--conduction-tabs-tab-margin-inline-end);
|
|
87
|
+
font-size: var(--conduction-tabs-tab-font-size);
|
|
88
|
+
font-weight: var(--conduction-tabs-tab-font-weight);
|
|
89
|
+
font-family: var(--conduction-tabs-tab-font-family);
|
|
90
|
+
min-height: var(--conduction-tabs-tab-min-height);
|
|
91
|
+
letter-spacing: var(--conduction-tabs-tab-letter-spacing);
|
|
92
|
+
text-transform: var(--conduction-tabs-tab-text-transform);
|
|
71
93
|
}
|
|
72
94
|
|
|
95
|
+
/* TabSelected */
|
|
73
96
|
.tab[aria-selected="true"] {
|
|
74
|
-
color: var(--conduction-tab-selected-color);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
border-
|
|
78
|
-
|
|
97
|
+
background-color: var(--conduction-tabs-tab-selected-background-color);
|
|
98
|
+
color: var(--conduction-tabs-tab-selected-color);
|
|
99
|
+
box-shadow: var(--conduction-tabs-tab-selected-box-shadow);
|
|
100
|
+
border-width: var(--conduction-tabs-tab-selected-border-width);
|
|
101
|
+
border-style: var(--conduction-tabs-tab-selected-border-style);
|
|
102
|
+
border-color: var(--conduction-tabs-tab-selected-border-color);
|
|
103
|
+
border-bottom: var(--conduction-tabs-tab-selected-border-bottom);
|
|
104
|
+
border-bottom-width: var(--conduction-tabs-tab-selected-border-bottom-width);
|
|
105
|
+
border-bottom-style: var(--conduction-tabs-tab-selected-border-bottom-style);
|
|
106
|
+
border-bottom-color: var(--conduction-tabs-tab-selected-border-bottom-color);
|
|
107
|
+
font-weight: var(--conduction-tabs-tab-selected-font-weight);
|
|
108
|
+
font-family: var(--conduction-tabs-tab-selected-font-family);
|
|
79
109
|
}
|
|
80
110
|
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
111
|
+
.tab[aria-selected="true"]:hover {
|
|
112
|
+
background-color: var(--conduction-tabs-tab-selected-hover-background-color);
|
|
113
|
+
color: var(--conduction-tabs-tab-selected-hover-color);
|
|
114
|
+
text-decoration: var(--conduction-tabs-tab-selected-hover-text-decoration);
|
|
115
|
+
}
|
|
116
|
+
.tab:hover {
|
|
117
|
+
background-color: var(--conduction-tabs-tab-hover-background-color);
|
|
118
|
+
color: var(--conduction-tabs-tab-hover-color);
|
|
119
|
+
text-decoration: var(--conduction-tabs-tab-hover-text-decoration);
|
|
86
120
|
}
|
|
87
121
|
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
padding-
|
|
101
|
-
|
|
122
|
+
.tabList {
|
|
123
|
+
display: flex;
|
|
124
|
+
padding-inline-start: var(--conduction-tabs-tab-list-padding-inline-start);
|
|
125
|
+
margin-block-end: var(--conduction-tabs-tab-list-margin-block-end);
|
|
126
|
+
border-bottom-width: var(--conduction-tabs-tab-list-border-bottom-width);
|
|
127
|
+
border-bottom-style: var(--conduction-tabs-tab-list-border-bottom-style);
|
|
128
|
+
border-bottom-color: var(--conduction-tabs-tab-list-border-bottom-color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* TabPanel */
|
|
132
|
+
.tabs [class*="react-tabs__tab-panel--selected"] {
|
|
133
|
+
background-color: var(--conduction-tabs-tab-panel-background-color);
|
|
134
|
+
padding-block-start: var(--conduction-tabs-tab-panel-padding-block-start);
|
|
135
|
+
padding-block-end: var(--conduction-tabs-tab-panel-padding-block-end);
|
|
136
|
+
padding-inline-start: var(--conduction-tabs-tab-panel-padding-inline-start);
|
|
137
|
+
padding-inline-end: var(--conduction-tabs-tab-panel-padding-inline-end);
|
|
138
|
+
border-width: var(--conduction-tabs-tab-panel-border-width);
|
|
139
|
+
border-style: var(--conduction-tabs-tab-panel-border-style);
|
|
140
|
+
border-color: var(--conduction-tabs-tab-panel-border-color);
|
|
141
|
+
border-top: var(--conduction-tabs-tab-panel-border-top);
|
|
102
142
|
}
|
|
@@ -1,37 +1,47 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as styles from "./Tabs.module.css";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
3
|
+
import {
|
|
4
|
+
Tabs as RTabs,
|
|
5
|
+
TabList as RTabList,
|
|
6
|
+
Tab as RTab,
|
|
7
|
+
TabPanel as RTabPanel,
|
|
8
|
+
ReactTabsFunctionComponent,
|
|
9
|
+
TabProps,
|
|
10
|
+
TabPanelProps,
|
|
11
|
+
TabListProps,
|
|
12
|
+
TabsProps,
|
|
13
|
+
} from "react-tabs";
|
|
14
|
+
|
|
15
|
+
// Tabs
|
|
16
|
+
export const Tabs: ReactTabsFunctionComponent<TabsProps> = ({ children, ...otherProps }) => (
|
|
17
|
+
<RTabs className={styles.tabs} {...otherProps}>
|
|
18
|
+
{children}
|
|
19
|
+
</RTabs>
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
Tabs.tabsRole = "Tabs";
|
|
23
|
+
|
|
24
|
+
// TabList
|
|
25
|
+
export const TabList: ReactTabsFunctionComponent<TabListProps> = ({ children, ...otherProps }) => (
|
|
26
|
+
<RTabList className={styles.tabList} {...otherProps}>
|
|
27
|
+
{children}
|
|
28
|
+
</RTabList>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
TabList.tabsRole = "TabList";
|
|
32
|
+
|
|
33
|
+
// Tab
|
|
34
|
+
export const Tab: ReactTabsFunctionComponent<TabProps> = ({ children, ...otherProps }) => (
|
|
35
|
+
<RTab className={styles.tab} {...otherProps}>
|
|
36
|
+
{children}
|
|
37
|
+
</RTab>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
Tab.tabsRole = "Tab";
|
|
41
|
+
|
|
42
|
+
// TabPanel
|
|
43
|
+
export const TabPanel: ReactTabsFunctionComponent<TabPanelProps> = ({ children, ...otherProps }) => (
|
|
44
|
+
<RTabPanel {...otherProps}>{children}</RTabPanel>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
TabPanel.tabsRole = "TabPanel";
|
|
@@ -1,17 +1,33 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--conduction-tooltip-
|
|
3
|
-
|
|
2
|
+
--conduction-tooltip-padding-inline-start: 0px;
|
|
3
|
+
--conduction-tooltip-padding-inline-end: 0px;
|
|
4
|
+
--conduction-tooltip-padding-block-start: 0px;
|
|
5
|
+
--conduction-tooltip-padding-block-end: 0px;
|
|
6
|
+
|
|
7
|
+
--conduction-tooltip-background-color: var(--skeleton-color-black);
|
|
8
|
+
--conduction-tooltip-color: var(--skeleton-color-white);
|
|
9
|
+
|
|
10
|
+
--conduction-tooltip-border-width: 0px;
|
|
11
|
+
--conduction-tooltip-border-color: unset;
|
|
12
|
+
--conduction-tooltip-border-style: unset;
|
|
13
|
+
--conduction-tooltip-border-radius: 0px;
|
|
4
14
|
|
|
5
|
-
|
|
6
|
-
display: inline-block;
|
|
7
|
-
position: relative;
|
|
15
|
+
--conduction-tooltip-opacity: 1;
|
|
8
16
|
}
|
|
9
17
|
|
|
10
18
|
.tooltip {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
padding-inline-start: var(--conduction-tooltip-padding-inline-start);
|
|
20
|
+
padding-inline-end: var(--conduction-tooltip-padding-inline-end);
|
|
21
|
+
padding-block-start: var(--conduction-tooltip-padding-block-start);
|
|
22
|
+
padding-block-end: var(--conduction-tooltip-padding-block-end);
|
|
23
|
+
|
|
24
|
+
background-color: var(--conduction-tooltip-background-color) !important;
|
|
25
|
+
color: var(--conduction-tooltip-color) !important;
|
|
26
|
+
|
|
27
|
+
border-width: var(--conductino-tooltip-border-width);
|
|
28
|
+
border-color: var(--conduction-tooltip-border-color);
|
|
29
|
+
border-style: var(--conduction-tooltip-border-style);
|
|
30
|
+
border-radius: var(--conduction-tooltip-border-radius) !important;
|
|
14
31
|
|
|
15
|
-
|
|
16
|
-
all: unset !important;
|
|
32
|
+
opacity: var(--conduction-tooltip-opacity);
|
|
17
33
|
}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import _ from "lodash";
|
|
3
1
|
import * as React from "react";
|
|
4
|
-
import ReactTooltip from "react-tooltip";
|
|
5
2
|
import * as styles from "./ToolTip.module.css";
|
|
3
|
+
import { Tooltip } from "react-tooltip";
|
|
6
4
|
|
|
7
5
|
interface ToolTipProps {
|
|
8
|
-
|
|
9
|
-
tooltip: string;
|
|
10
|
-
layoutClassName?: string;
|
|
6
|
+
id: string;
|
|
11
7
|
}
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Implement this ToolTip only once, in a high-level wrapper.
|
|
11
|
+
* Use the ToolTip anywhere, in any element, by setting the following data props:
|
|
12
|
+
*
|
|
13
|
+
* data-tooltip-id="this-is-the-id-set-in-ToolTipProps"
|
|
14
|
+
* data-tooltip-content="Hello world!"
|
|
15
|
+
*/
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
);
|
|
17
|
+
export const ToolTip: React.FC<ToolTipProps> = ({ id }) => {
|
|
18
|
+
return <Tooltip className={styles.tooltip} {...{ id }} />;
|
|
21
19
|
};
|
|
22
|
-
|
|
23
|
-
export { ReactTooltip };
|
package/src/index.ts
CHANGED
|
@@ -29,7 +29,7 @@ import { BadgeCounter } from "./components/badgeCounter/BadgeCounter";
|
|
|
29
29
|
import { CodeBlock } from "./components/codeBlock/CodeBlock";
|
|
30
30
|
import { ToolTip } from "./components/toolTip/ToolTip";
|
|
31
31
|
import { Pagination } from "./components/Pagination/Pagination";
|
|
32
|
-
import {
|
|
32
|
+
import { Tabs, TabList, Tab, TabPanel } from "./components/tabs/Tabs";
|
|
33
33
|
|
|
34
34
|
export {
|
|
35
35
|
DownloadCard,
|
|
@@ -63,5 +63,8 @@ export {
|
|
|
63
63
|
BadgeCounter,
|
|
64
64
|
CodeBlock,
|
|
65
65
|
ToolTip,
|
|
66
|
-
|
|
66
|
+
Tabs,
|
|
67
|
+
TabList,
|
|
68
|
+
Tab,
|
|
69
|
+
TabPanel,
|
|
67
70
|
};
|