@conduction/components 2.1.10 → 2.1.12
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 -1
- package/lib/components/toolTip/ToolTip.js +1 -1
- package/lib/components/toolTip/ToolTip.module.css +9 -0
- package/package.json +1 -1
- package/src/components/formFields/createKeyValue/CreateKeyValue.tsx +4 -1
- package/src/components/toolTip/ToolTip.module.css +9 -0
- package/src/components/toolTip/ToolTip.tsx +1 -1
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- **Version 2.1 (breaking changes from 2.0.x)**
|
|
6
6
|
|
|
7
|
+
- 2.1.12: Added ToolTip max-width and break-word
|
|
8
|
+
- 2.1.11: Added CreateKeyValue component disabled state on delete buttons
|
|
7
9
|
- 2.1.10: PrimaryTopNav overflow scroll removed from desktop
|
|
8
10
|
- 2.1.8 & 2.1.9: PrimaryTopNav will always show subItems on mobile
|
|
9
11
|
- 2.1.7: Add disabled placholders to all Select elements.
|
|
@@ -27,5 +27,5 @@ const KeyValueComponent = ({ defaultValue, handleChange, disabled }) => {
|
|
|
27
27
|
React.useEffect(() => {
|
|
28
28
|
handleChange(keyValues);
|
|
29
29
|
}, [keyValues]);
|
|
30
|
-
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableHeader, { children: "Key" }), _jsx(TableHeader, { children: "Value" }), _jsx(TableHeader, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { className: styles.tdDelete, children: _jsx(Button, { onClick: () => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue)), children: "Delete" }) })] }, `${keyValue}${idx}`))) })] })), _jsxs("div", { className: styles.form, children: [_jsx("input", { type: "text", placeholder: "Key", value: currentKey, ref: currentKeyRef, className: "denhaag-textfield__input", onChange: (e) => setCurrentKey(e.target.value), ...{ disabled } }), _jsx("input", { type: "text", placeholder: "Value", value: currentValue, ref: currentValueRef, className: "denhaag-textfield__input", onChange: (e) => setCurrentValue(e.target.value), ...{ disabled } }), _jsx(Button, { onClick: handleCreate, disabled: !currentKey || !currentValue || disabled, children: "Add" })] })] }));
|
|
30
|
+
return (_jsxs("div", { className: styles.keyValue, children: [keyValues && (_jsxs(Table, { className: styles.table, children: [_jsx(TableHead, { children: _jsxs(TableRow, { children: [_jsx(TableHeader, { children: "Key" }), _jsx(TableHeader, { children: "Value" }), _jsx(TableHeader, {})] }) }), _jsx(TableBody, { children: keyValues.map((keyValue, idx) => (_jsxs(TableRow, { children: [_jsx(TableCell, { children: keyValue.key }), _jsx(TableCell, { children: keyValue.value }), _jsx(TableCell, { className: styles.tdDelete, children: _jsx(Button, { ...{ disabled }, onClick: () => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue)), children: "Delete" }) })] }, `${keyValue}${idx}`))) })] })), _jsxs("div", { className: styles.form, children: [_jsx("input", { type: "text", placeholder: "Key", value: currentKey, ref: currentKeyRef, className: "denhaag-textfield__input", onChange: (e) => setCurrentKey(e.target.value), ...{ disabled } }), _jsx("input", { type: "text", placeholder: "Value", value: currentValue, ref: currentValueRef, className: "denhaag-textfield__input", onChange: (e) => setCurrentValue(e.target.value), ...{ disabled } }), _jsx(Button, { onClick: handleCreate, disabled: !currentKey || !currentValue || disabled, children: "Add" })] })] }));
|
|
31
31
|
};
|
|
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import ReactTooltip from "react-tooltip";
|
|
3
3
|
import * as styles from "./ToolTip.module.css";
|
|
4
4
|
export const ToolTip = ({ children, layoutClassName, tooltip }) => {
|
|
5
|
-
return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip, className: layoutClassName && layoutClassName, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid" })] }));
|
|
5
|
+
return (_jsxs("div", { className: styles.wrapper, children: [_jsx("div", { "data-tip": tooltip, className: layoutClassName && layoutClassName, children: children }), _jsx(ReactTooltip, { place: "top", type: "dark", effect: "solid", className: styles.tooltip })] }));
|
|
6
6
|
};
|
|
7
7
|
export { ReactTooltip };
|
package/package.json
CHANGED
|
@@ -91,7 +91,10 @@ const KeyValueComponent: React.FC<CreateKeyValueComponentProps> = ({ defaultValu
|
|
|
91
91
|
<TableCell>{keyValue.key}</TableCell>
|
|
92
92
|
<TableCell>{keyValue.value}</TableCell>
|
|
93
93
|
<TableCell className={styles.tdDelete}>
|
|
94
|
-
<Button
|
|
94
|
+
<Button
|
|
95
|
+
{...{ disabled }}
|
|
96
|
+
onClick={() => setKeyValues(keyValues.filter((_keyValue) => _keyValue !== keyValue))}
|
|
97
|
+
>
|
|
95
98
|
Delete
|
|
96
99
|
</Button>
|
|
97
100
|
</TableCell>
|
|
@@ -16,7 +16,7 @@ export const ToolTip: React.FC<ToolTipProps> = ({ children, layoutClassName, too
|
|
|
16
16
|
{children}
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<ReactTooltip place={"top"} type={"dark"} effect={"solid"} />
|
|
19
|
+
<ReactTooltip place={"top"} type={"dark"} effect={"solid"} className={styles.tooltip} />
|
|
20
20
|
</div>
|
|
21
21
|
);
|
|
22
22
|
};
|