@sphereon/ui-components.ssi-react 0.1.3-unstable.111 → 0.1.3-unstable.112
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/components/lists/DropDownList/index.d.ts +1 -0
- package/dist/components/lists/DropDownList/index.js +3 -2
- package/dist/components/lists/DropDownListItem/index.js +2 -2
- package/dist/components/views/SSITableView/index.js +1 -1
- package/dist/styles/components/components/DropDownList/index.js +1 -2
- package/package.json +3 -3
|
@@ -3,8 +3,9 @@ import { useState, useRef, useEffect } from 'react';
|
|
|
3
3
|
import { DropDownListContainerStyled as Container, DropDownContainerStyled as DropDownContainer, DropDownListButtonStyled as ListButton, } from '../../../styles/components';
|
|
4
4
|
import DropDownListItem from '../DropDownListItem';
|
|
5
5
|
import { SSIIconButton } from '../../../index';
|
|
6
|
+
import { borderColors } from '@sphereon/ui-components.core';
|
|
6
7
|
const DropDownList = (props) => {
|
|
7
|
-
const { icon, buttons, opts } = props;
|
|
8
|
+
const { icon, buttons, showBorder = false, opts } = props;
|
|
8
9
|
const [showActionsMenu, setShowActionsMenu] = useState(false);
|
|
9
10
|
const dropdownRef = useRef(null);
|
|
10
11
|
const onMore = (event) => {
|
|
@@ -28,6 +29,6 @@ const DropDownList = (props) => {
|
|
|
28
29
|
return (_jsx(DropDownListItem, { showBorder: showBorder, label: item.caption, onClick: item.onClick, icon: item.icon, fontColor: item.fontColor, opts: opts }, index));
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
|
-
return (_jsxs(Container, { ref: dropdownRef, children: [_jsx(ListButton, { children: _jsx(SSIIconButton, { icon: icon, color: 'black', onClick: onMore }) }), showActionsMenu && _jsx(DropDownContainer, { children: getItems() })] }));
|
|
32
|
+
return (_jsxs(Container, { ref: dropdownRef, children: [_jsx(ListButton, { children: _jsx(SSIIconButton, { icon: icon, color: 'black', onClick: onMore }) }), showActionsMenu && _jsx(DropDownContainer, { style: { ...(showBorder && { borderWidth: 2, borderColor: borderColors.silverGrey, borderStyle: 'solid' }) }, children: getItems() })] }));
|
|
32
33
|
};
|
|
33
34
|
export default DropDownList;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DropDownListItemContainerStyled as Container, DropDownListItemIconContainerStyled as IconContainer, DropDownListItemCaptionContainerStyled as ListItemCaption, } from '../../../styles/components';
|
|
3
3
|
import DeleteIcon from '../../assets/icons/DeleteIcon';
|
|
4
|
-
import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
|
|
4
|
+
import { borderColors, ButtonIcon, fontColors } from '@sphereon/ui-components.core';
|
|
5
5
|
const DropDownListItem = (props) => {
|
|
6
|
-
const { disabled, label, icon, showBorder = false, fontColor = fontColors.dark, borderColor =
|
|
6
|
+
const { disabled, label, icon, showBorder = false, fontColor = fontColors.dark, borderColor = borderColors.light, opts, onClick } = props;
|
|
7
7
|
const getIcon = (icon) => {
|
|
8
8
|
switch (icon) {
|
|
9
9
|
case ButtonIcon.DELETE:
|
|
@@ -35,7 +35,7 @@ const getCellFormatting = (type, value, row, opts) => {
|
|
|
35
35
|
case TableCellType.ACTION_GROUP: {
|
|
36
36
|
const { actionGroup } = opts ?? {};
|
|
37
37
|
if (actionGroup) {
|
|
38
|
-
return _jsx(DropDownList, { icon: actionGroup.icon ?? ButtonIcon.MEATBALLS, buttons: actionGroup.actions, opts: { rowData: row } });
|
|
38
|
+
return _jsx(DropDownList, { icon: actionGroup.icon ?? ButtonIcon.MEATBALLS, buttons: actionGroup.actions, opts: { rowData: row }, showBorder: true });
|
|
39
39
|
}
|
|
40
40
|
return _jsx("div", {});
|
|
41
41
|
}
|
|
@@ -19,9 +19,8 @@ export const DropDownListButtonStyled = styled.div `
|
|
|
19
19
|
export const DropDownContainerStyled = styled.div `
|
|
20
20
|
position: absolute;
|
|
21
21
|
top: 100%;
|
|
22
|
-
|
|
22
|
+
right: 0;
|
|
23
23
|
width: 250px;
|
|
24
24
|
background-color: ${backgroundColors.primaryLight};
|
|
25
|
-
border-radius: 8px;
|
|
26
25
|
z-index: 1000;
|
|
27
26
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.3-unstable.
|
|
4
|
+
"version": "0.1.3-unstable.112+d26225f",
|
|
5
5
|
"description": "SSI UI components for React",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sphereon/ui-components.core": "0.1.3-unstable.
|
|
31
|
+
"@sphereon/ui-components.core": "0.1.3-unstable.112+d26225f",
|
|
32
32
|
"@tanstack/react-table": "^8.9.3",
|
|
33
33
|
"react-loader-spinner": "^5.4.5",
|
|
34
34
|
"react-toastify": "^9.1.3",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"react": ">= 16.8.0"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "d26225f3345937e3307b0bb25f0bc580338462bc"
|
|
46
46
|
}
|