@sphereon/ui-components.ssi-react 0.1.2-unstable.4 → 0.1.2
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/assets/icons/SSIAddIcon/index.d.ts +2 -1
- package/dist/components/assets/icons/SSIAddIcon/index.js +3 -2
- package/dist/components/assets/icons/SSIArrowDownIcon/index.d.ts +2 -1
- package/dist/components/assets/icons/SSIArrowDownIcon/index.js +3 -2
- package/dist/components/assets/icons/SSIFilterIcon/index.d.ts +2 -1
- package/dist/components/assets/icons/SSIFilterIcon/index.js +3 -2
- package/dist/components/assets/icons/SSIProfileIcon/index.d.ts +8 -0
- package/dist/components/assets/icons/SSIProfileIcon/index.js +9 -0
- package/dist/components/buttons/SSIIconButton/index.d.ts +2 -1
- package/dist/components/buttons/SSIIconButton/index.js +7 -6
- package/dist/components/buttons/SSIPrimaryButton/index.d.ts +4 -2
- package/dist/components/buttons/SSIPrimaryButton/index.js +17 -3
- package/dist/components/buttons/SSISecondaryButton/index.d.ts +11 -0
- package/dist/components/buttons/SSISecondaryButton/index.js +23 -0
- package/dist/components/labels/SSIText/index.d.ts +7 -0
- package/dist/components/labels/SSIText/index.js +13 -0
- package/dist/components/labels/SSITypeLabel/index.js +1 -1
- package/dist/components/lists/SSIDropDownList/index.js +2 -2
- package/dist/components/views/SSITabView/SSITabViewHeader/index.js +4 -5
- package/dist/components/views/SSITabView/index.js +2 -1
- package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +1 -0
- package/dist/components/views/SSITableView/SSITableViewHeader/index.js +4 -3
- package/dist/components/views/SSITableView/index.d.ts +3 -1
- package/dist/components/views/SSITableView/index.js +14 -7
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4 -1
- package/dist/styles/components/components/SSIDropDownList/index.d.ts +1 -1
- package/dist/styles/components/components/SSIDropDownList/index.js +4 -3
- package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +0 -1
- package/dist/styles/components/components/SSIPrimaryButton/index.js +3 -11
- package/dist/styles/components/components/SSIProfileIcon/index.d.ts +1 -0
- package/dist/styles/components/components/SSIProfileIcon/index.js +9 -0
- package/dist/styles/components/components/SSISecondaryButton/index.d.ts +2 -0
- package/dist/styles/components/components/SSISecondaryButton/index.js +37 -0
- package/dist/styles/components/components/SSITabView/index.d.ts +1 -0
- package/dist/styles/components/components/SSITabView/index.js +6 -0
- package/dist/styles/components/components/SSITabViewHeader/index.js +0 -3
- package/dist/styles/components/components/SSITableView/index.js +7 -6
- package/dist/styles/components/components/SSITableViewHeader/index.d.ts +0 -1
- package/dist/styles/components/components/SSITableViewHeader/index.js +1 -4
- package/dist/styles/components/components/SSIText/index.d.ts +3 -0
- package/dist/styles/components/components/SSIText/index.js +21 -0
- package/dist/styles/components/components/SSITypeLabel/index.js +1 -1
- package/dist/styles/components/components/index.d.ts +2 -0
- package/dist/styles/components/components/index.js +2 -0
- package/dist/styles/components/fonts/index.d.ts +4 -0
- package/dist/styles/components/fonts/index.js +17 -21
- package/dist/styles/css/index.d.ts +7 -0
- package/dist/styles/css/index.js +51 -0
- package/dist/styles/typography.js +6 -0
- package/dist/types/component/index.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fontColors } from '@sphereon/ui-components.core';
|
|
2
3
|
const SSIAddIcon = (props) => {
|
|
3
|
-
const { size = 16, color =
|
|
4
|
-
return (_jsx("div", { style: { width: size, aspectRatio: 1, display: 'flex' }, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color
|
|
4
|
+
const { size = 16, color = fontColors.dark, style } = props;
|
|
5
|
+
return (_jsx("div", { style: { ...style, width: size, aspectRatio: 1, display: 'flex' }, children: _jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color }) }) }));
|
|
5
6
|
};
|
|
6
7
|
export default SSIAddIcon;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
2
|
export interface IProps {
|
|
3
3
|
width?: number;
|
|
4
4
|
height?: number;
|
|
5
5
|
color?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
6
7
|
}
|
|
7
8
|
declare const SSIArrowDownIcon: FC<IProps>;
|
|
8
9
|
export default SSIArrowDownIcon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fontColors } from '@sphereon/ui-components.core';
|
|
2
3
|
const SSIArrowDownIcon = (props) => {
|
|
3
|
-
const { width = 16, height = 8, color =
|
|
4
|
-
return (_jsx("div", { style: { width, height, display: 'flex' }, children: _jsx("svg", { width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8.03265 7.74886C8.14951 7.74175 8.26065 7.69465 8.34825 7.61511L15.3133 1.19499C15.367 1.1489 15.411 1.09224 15.4429 1.02837C15.4747 0.964504 15.4937 0.894731 15.4987 0.823204C15.5037 0.751676 15.4946 0.67985 15.4719 0.611995C15.4493 0.54414 15.4135 0.481647 15.3668 0.428216C15.3201 0.374784 15.2634 0.331504 15.2001 0.300961C15.1367 0.270419 15.068 0.253238 14.9981 0.250423C14.9281 0.247608 14.8583 0.259221 14.7928 0.28458C14.7273 0.309939 14.6675 0.348517 14.6168 0.398032L8 6.49492L1.38317 0.398032C1.33252 0.348517 1.27268 0.309939 1.20718 0.28458C1.14169 0.259221 1.07189 0.247597 1.00193 0.250412C0.931963 0.253227 0.863266 0.270419 0.799918 0.300961C0.736569 0.331504 0.679861 0.374784 0.633164 0.428216C0.586466 0.481647 0.550732 0.54414 0.528085 0.611995C0.505437 0.67985 0.496338 0.751676 0.501329 0.823204C0.506319 0.894731 0.525297 0.964504 0.557135 1.02837C0.588973 1.09224 0.633022 1.1489 0.686663 1.19499L7.65174 7.61511C7.70344 7.6621 7.76372 7.69811 7.82911 7.72107C7.89449 7.74403 7.96367 7.75348 8.03265 7.74886Z", fill: color
|
|
4
|
+
const { width = 16, height = 8, color = fontColors.dark, style } = props;
|
|
5
|
+
return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M8.03265 7.74886C8.14951 7.74175 8.26065 7.69465 8.34825 7.61511L15.3133 1.19499C15.367 1.1489 15.411 1.09224 15.4429 1.02837C15.4747 0.964504 15.4937 0.894731 15.4987 0.823204C15.5037 0.751676 15.4946 0.67985 15.4719 0.611995C15.4493 0.54414 15.4135 0.481647 15.3668 0.428216C15.3201 0.374784 15.2634 0.331504 15.2001 0.300961C15.1367 0.270419 15.068 0.253238 14.9981 0.250423C14.9281 0.247608 14.8583 0.259221 14.7928 0.28458C14.7273 0.309939 14.6675 0.348517 14.6168 0.398032L8 6.49492L1.38317 0.398032C1.33252 0.348517 1.27268 0.309939 1.20718 0.28458C1.14169 0.259221 1.07189 0.247597 1.00193 0.250412C0.931963 0.253227 0.863266 0.270419 0.799918 0.300961C0.736569 0.331504 0.679861 0.374784 0.633164 0.428216C0.586466 0.481647 0.550732 0.54414 0.528085 0.611995C0.505437 0.67985 0.496338 0.751676 0.501329 0.823204C0.506319 0.894731 0.525297 0.964504 0.557135 1.02837C0.588973 1.09224 0.633022 1.1489 0.686663 1.19499L7.65174 7.61511C7.70344 7.6621 7.76372 7.69811 7.82911 7.72107C7.89449 7.74403 7.96367 7.75348 8.03265 7.74886Z", fill: color }) }) }));
|
|
5
6
|
};
|
|
6
7
|
export default SSIArrowDownIcon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fontColors } from '@sphereon/ui-components.core';
|
|
2
3
|
const SSIFilterIcon = (props) => {
|
|
3
|
-
const { height = 16, width = 18, color =
|
|
4
|
-
return (_jsx("div", { style: { width, height, display: 'flex' }, children: _jsx("svg", { width: "18", height: "16", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M16.5 1.5H1.5L7.5 8.33222V13.0556L10.5 14.5V8.33222L16.5 1.5Z", stroke: color, strokeOpacity: "0.8", strokeWidth: "1.29412", strokeLinecap: "round", strokeLinejoin: "round" }) }) }));
|
|
4
|
+
const { height = 16, width = 18, color = fontColors.dark, style } = props;
|
|
5
|
+
return (_jsx("div", { style: { ...style, width, height, display: 'flex' }, children: _jsx("svg", { width: "18", height: "16", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { d: "M16.5 1.5H1.5L7.5 8.33222V13.0556L10.5 14.5V8.33222L16.5 1.5Z", stroke: color, strokeOpacity: "0.8", strokeWidth: "1.29412", strokeLinecap: "round", strokeLinejoin: "round" }) }) }));
|
|
5
6
|
};
|
|
6
7
|
export default SSIFilterIcon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { fontColors, getInitials, profileColors } from '@sphereon/ui-components.core';
|
|
3
|
+
import { SSIProfileIconContainerStyled as Container } from '../../../../styles/components/components/SSIProfileIcon';
|
|
4
|
+
import { SSITextH2Styled as ProfileIconText } from '../../../../styles/components';
|
|
5
|
+
const ProfileIcon = (props) => {
|
|
6
|
+
const { fontColor = fontColors.light, backgroundColor = profileColors['100'], fullName } = props;
|
|
7
|
+
return (_jsx(Container, { style: { backgroundColor }, children: _jsx(ProfileIconText, { style: { color: fontColor }, children: getInitials(fullName) }) }));
|
|
8
|
+
};
|
|
9
|
+
export default ProfileIcon;
|
|
@@ -2,8 +2,9 @@ import { FC } from 'react';
|
|
|
2
2
|
import { ButtonIconsEnum } from '../../../types';
|
|
3
3
|
export type Props = {
|
|
4
4
|
icon: ButtonIconsEnum;
|
|
5
|
-
disabled?: boolean;
|
|
6
5
|
onClick: () => Promise<void>;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
color?: string;
|
|
7
8
|
};
|
|
8
9
|
declare const SSIIconButton: FC<Props>;
|
|
9
10
|
export default SSIIconButton;
|
|
@@ -4,18 +4,19 @@ import SSIFilterIcon from '../../assets/icons/SSIFilterIcon';
|
|
|
4
4
|
import SSIArrowDownIcon from '../../assets/icons/SSIArrowDownIcon';
|
|
5
5
|
import { ButtonIconsEnum } from '../../../types';
|
|
6
6
|
import { SSIIconButtonContainerStyled as Container } from '../../../styles/components';
|
|
7
|
+
import { fontColors } from '@sphereon/ui-components.core';
|
|
7
8
|
const SSIIconButton = (props) => {
|
|
8
|
-
const { icon, onClick, disabled = false } = props;
|
|
9
|
-
return _jsx(Container, { onClick: onClick, children: getIcon(icon) });
|
|
9
|
+
const { icon, onClick, disabled = false, color = fontColors.dark } = props;
|
|
10
|
+
return _jsx(Container, { onClick: onClick, children: getIcon(icon, color) });
|
|
10
11
|
};
|
|
11
|
-
const getIcon = (icon) => {
|
|
12
|
+
const getIcon = (icon, color) => {
|
|
12
13
|
switch (icon) {
|
|
13
14
|
case ButtonIconsEnum.ADD:
|
|
14
|
-
return _jsx(SSIAddIcon, {});
|
|
15
|
+
return _jsx(SSIAddIcon, { color: color });
|
|
15
16
|
case ButtonIconsEnum.FILTER:
|
|
16
|
-
return _jsx(SSIFilterIcon, {});
|
|
17
|
+
return _jsx(SSIFilterIcon, { color: color });
|
|
17
18
|
case ButtonIconsEnum.ARROW_DOWN:
|
|
18
|
-
return _jsx(SSIArrowDownIcon, {});
|
|
19
|
+
return _jsx(SSIArrowDownIcon, { color: color });
|
|
19
20
|
default:
|
|
20
21
|
return _jsx("div", {});
|
|
21
22
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { ButtonIconsEnum } from '../../../types';
|
|
2
3
|
export type Props = {
|
|
3
4
|
caption: string;
|
|
4
5
|
onClick: () => Promise<void>;
|
|
5
|
-
icon?:
|
|
6
|
+
icon?: ButtonIconsEnum;
|
|
6
7
|
disabled?: boolean;
|
|
8
|
+
style?: CSSProperties;
|
|
7
9
|
};
|
|
8
10
|
declare const SSIPrimaryButton: FC<Props>;
|
|
9
11
|
export default SSIPrimaryButton;
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { fontColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSIAddIcon from '../../assets/icons/SSIAddIcon';
|
|
4
|
-
import { SSIPrimaryButtonContainerStyled as Container,
|
|
4
|
+
import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles/components';
|
|
5
|
+
import { ButtonIconsEnum } from '../../../types';
|
|
5
6
|
const SSIPrimaryButton = (props) => {
|
|
6
|
-
const { caption, icon, onClick } = props;
|
|
7
|
-
|
|
7
|
+
const { caption, icon, onClick, disabled = false, style = {} } = props;
|
|
8
|
+
const getIcon = (icon, color) => {
|
|
9
|
+
switch (icon) {
|
|
10
|
+
case ButtonIconsEnum.ADD:
|
|
11
|
+
return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
|
|
12
|
+
default:
|
|
13
|
+
return _jsx("div", {});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const onClicked = async () => {
|
|
17
|
+
if (!disabled) {
|
|
18
|
+
await onClick();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: 0.5 }) }, onClick: onClicked, children: [icon && getIcon(icon, fontColors.light), _jsx(Caption, { style: { ...(disabled && { opacity: 0.5 }) }, children: caption })] }));
|
|
8
22
|
};
|
|
9
23
|
export default SSIPrimaryButton;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties, FC } from 'react';
|
|
2
|
+
import { ButtonIconsEnum } from '../../../types';
|
|
3
|
+
export type Props = {
|
|
4
|
+
caption: string;
|
|
5
|
+
onClick: () => Promise<void>;
|
|
6
|
+
icon?: ButtonIconsEnum;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
};
|
|
10
|
+
declare const SSISecondaryButton: FC<Props>;
|
|
11
|
+
export default SSISecondaryButton;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { gradientColors } from '@sphereon/ui-components.core';
|
|
3
|
+
import SSIAddIcon from '../../assets/icons/SSIAddIcon';
|
|
4
|
+
import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container, } from '../../../styles/components';
|
|
5
|
+
import { ButtonIconsEnum } from '../../../types';
|
|
6
|
+
const SSISecondaryButton = (props) => {
|
|
7
|
+
const { caption, icon, onClick, disabled = false, style = {} } = props;
|
|
8
|
+
const getIcon = (icon, color) => {
|
|
9
|
+
switch (icon) {
|
|
10
|
+
case ButtonIconsEnum.ADD:
|
|
11
|
+
return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
|
|
12
|
+
default:
|
|
13
|
+
return _jsx("div", {});
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const onClicked = async () => {
|
|
17
|
+
if (!disabled) {
|
|
18
|
+
await onClick();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: 0.5 }) }, onClick: onClicked, children: [icon && getIcon(icon, gradientColors['100']), _jsx(Caption, { style: { ...(disabled && { opacity: 0.5 }) }, children: caption })] }));
|
|
22
|
+
};
|
|
23
|
+
export default SSISecondaryButton;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SSITruncatedTextStyled, SSITruncatedContainerStyled, SSITruncatedFullTextStyled } from '../../../styles/components/components/SSIText';
|
|
3
|
+
const SSIText = (props) => {
|
|
4
|
+
const { value, truncationLength } = props;
|
|
5
|
+
if (truncationLength && value.length > truncationLength) {
|
|
6
|
+
const truncatedText = value.substring(0, truncationLength);
|
|
7
|
+
return (_jsxs(SSITruncatedContainerStyled, { children: [_jsx(SSITruncatedTextStyled, { children: truncatedText }), _jsx(SSITruncatedFullTextStyled, { children: value })] }));
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return _jsx("p", { children: value });
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default SSIText;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { LabelTypeEnum } from '../../../types';
|
|
3
3
|
import { SSITypeLabelContainerStyled as Container } from '../../../styles/components';
|
|
4
|
-
import { backgroundColors, gradientColors } from
|
|
4
|
+
import { backgroundColors, gradientColors } from '@sphereon/ui-components.core';
|
|
5
5
|
const getBackground = (type) => {
|
|
6
6
|
switch (type) {
|
|
7
7
|
case LabelTypeEnum.ISSUER:
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import SSIIconButton from '../../buttons/SSIIconButton';
|
|
4
4
|
import { ButtonIconsEnum } from '../../../types';
|
|
5
|
-
import { SSIDropDownListContainerStyled as Container, SSIDropDownListSelectedValueStyled as SelectedValue } from '../../../styles/components';
|
|
5
|
+
import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles/components';
|
|
6
6
|
const SSIDropDownList = (props) => {
|
|
7
7
|
const { initialValue, label } = props;
|
|
8
8
|
const [value, setValue] = React.useState(initialValue);
|
|
9
|
-
return (_jsxs(Container, { children: [label && _jsx(
|
|
9
|
+
return (_jsxs(Container, { children: [label && _jsx(LabelCaption, { children: label }), _jsx(SelectedValue, { children: value }), _jsx(SSIIconButton, { icon: ButtonIconsEnum.ARROW_DOWN, onClick: async () => console.log('drop down clicked') })] }));
|
|
10
10
|
};
|
|
11
11
|
export default SSIDropDownList;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, } from
|
|
2
|
+
import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITextH3Styled as TitleCaption, } from '../../../../styles/components';
|
|
3
3
|
const SSITabViewHeader = (props) => {
|
|
4
4
|
const { navigationState, onIndexChange } = props;
|
|
5
5
|
return (_jsx(Container, { children: navigationState.routes.map((value, index) => {
|
|
6
6
|
const tabIndex = index + 1;
|
|
7
7
|
const isActiveTab = tabIndex === navigationState.index;
|
|
8
|
-
return (_jsx(TitleContainer, { style: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, onClick: () => onIndexChange(tabIndex), children: value.title }, tabIndex));
|
|
8
|
+
return (_jsx(TitleContainer, { onClick: () => onIndexChange(tabIndex), style: {
|
|
9
|
+
...(isActiveTab && { borderBottom: `2px solid #7276F7`, alignSelf: 'stretch' }),
|
|
10
|
+
}, children: _jsx(TitleCaption, { style: { fontWeight: !isActiveTab ? '400' : '600' }, children: value.title }) }, tabIndex));
|
|
12
11
|
}) }));
|
|
13
12
|
};
|
|
14
13
|
export default SSITabViewHeader;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import SSITabViewHeader from './SSITabViewHeader';
|
|
4
|
+
import { SSITabViewContainerStyled as Container } from '../../../styles/components';
|
|
4
5
|
const Tab = (props) => {
|
|
5
6
|
return _jsx(React.Fragment, { children: props.children });
|
|
6
7
|
};
|
|
@@ -18,7 +19,7 @@ const SSITabView = (props) => {
|
|
|
18
19
|
const onTabChange = async (tabIndex) => {
|
|
19
20
|
setActiveTabIndex(tabIndex);
|
|
20
21
|
};
|
|
21
|
-
return (_jsxs(
|
|
22
|
+
return (_jsxs(Container, { children: [_jsx(SSITabViewHeader, { navigationState: {
|
|
22
23
|
routes: routes,
|
|
23
24
|
index: activeTabIndex,
|
|
24
25
|
}, onIndexChange: onTabChange }), _jsx(Tab, { children: content })] }));
|
|
@@ -4,9 +4,10 @@ import SSIIconButton from '../../../buttons/SSIIconButton';
|
|
|
4
4
|
import { ButtonIconsEnum } from '../../../../types';
|
|
5
5
|
import SSIDropDownList from '../../../lists/SSIDropDownList';
|
|
6
6
|
import SSIPrimaryButton from '../../../buttons/SSIPrimaryButton';
|
|
7
|
-
import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer,
|
|
7
|
+
import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, SSITableViewHeaderShowOptionContainerStyled as ShowOptionContainer, } from '../../../../styles/components';
|
|
8
8
|
const SSITableViewHeader = (props) => {
|
|
9
|
-
const { enableFiltering = false, actions = [] } = props;
|
|
10
|
-
return (_jsx(Container, { children: _jsx(ContentContainer, { children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(SSIIconButton, { icon: ButtonIconsEnum.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })),
|
|
9
|
+
const { enableFiltering = false, enableMostRecent = false, actions = [] } = props;
|
|
10
|
+
return (_jsx(Container, { children: _jsx(ContentContainer, { children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(SSIIconButton, { icon: ButtonIconsEnum.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), enableMostRecent &&
|
|
11
|
+
_jsx(ShowOptionContainer, { children: _jsx(SSIDropDownList, { label: Localization.translate('action_show_caption'), initialValue: 'Most recent' }) }), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) }) }));
|
|
11
12
|
};
|
|
12
13
|
export default SSITableViewHeader;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { ColumnResizeMode } from '@tanstack/react-table';
|
|
2
|
+
import { ColumnResizeMode, Row } from '@tanstack/react-table';
|
|
3
3
|
import { Button, ColumnHeader } from '../../../types';
|
|
4
4
|
export type Props<T> = {
|
|
5
5
|
data: Array<T>;
|
|
6
6
|
columns: Array<ColumnHeader<T>>;
|
|
7
|
+
onRowClick?: (data: Row<T>) => Promise<void>;
|
|
7
8
|
enableRowSelection?: boolean;
|
|
8
9
|
enableFiltering?: boolean;
|
|
10
|
+
enableMostRecent?: boolean;
|
|
9
11
|
columnResizeMode?: ColumnResizeMode;
|
|
10
12
|
actions?: Array<Button>;
|
|
11
13
|
};
|
|
@@ -4,7 +4,8 @@ import { createColumnHelper, flexRender, getCoreRowModel, useReactTable, } from
|
|
|
4
4
|
import { TableCellTypeEnum } from '../../../types';
|
|
5
5
|
import SSITableViewHeader from './SSITableViewHeader';
|
|
6
6
|
import SSITypeLabel from '../../labels/SSITypeLabel';
|
|
7
|
-
import
|
|
7
|
+
import SSIText from '../../labels/SSIText';
|
|
8
|
+
import { SSITableViewCellContainerStyled, SSITableViewContainerStyled, SSITableViewHeaderCellContainerStyled, SSITableViewLabelCellStyled, SSITableViewRowContainerStyled, SSITableViewTableContainerStyled, } from '../../../styles/components';
|
|
8
9
|
function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
|
|
9
10
|
const ref = React.useRef(null);
|
|
10
11
|
React.useEffect(() => {
|
|
@@ -14,10 +15,10 @@ function IndeterminateCheckbox({ indeterminate, className = '', ...rest }) {
|
|
|
14
15
|
}, [ref, indeterminate]);
|
|
15
16
|
return _jsx("input", { type: "checkbox", ref: ref, className: className + ' cursor-pointer', ...rest });
|
|
16
17
|
}
|
|
17
|
-
const getCellFormatting = (type, value) => {
|
|
18
|
+
const getCellFormatting = (type, value, truncationLength) => {
|
|
18
19
|
switch (type) {
|
|
19
20
|
case TableCellTypeEnum.TEXT:
|
|
20
|
-
return _jsx(
|
|
21
|
+
return _jsx(SSIText, { value: value, ...(truncationLength && { truncationLength }) });
|
|
21
22
|
case TableCellTypeEnum.LABEL: {
|
|
22
23
|
const labels = Array.isArray(value) ? value.map((label) => _jsx(SSITypeLabel, { type: label })) : _jsx(SSITypeLabel, { type: value });
|
|
23
24
|
return _jsx(SSITableViewLabelCellStyled, { children: labels });
|
|
@@ -27,13 +28,13 @@ const getCellFormatting = (type, value) => {
|
|
|
27
28
|
}
|
|
28
29
|
};
|
|
29
30
|
const SSITableView = (props) => {
|
|
30
|
-
const { columns, data, enableRowSelection = false, enableFiltering = false, columnResizeMode = 'onChange', actions = [] } = props;
|
|
31
|
+
const { columns, data, enableRowSelection = false, enableFiltering = false, enableMostRecent = false, columnResizeMode = 'onChange', actions = [], onRowClick } = props;
|
|
31
32
|
const [rowSelection, setRowSelection] = React.useState({});
|
|
32
33
|
const columnHelper = createColumnHelper();
|
|
33
34
|
let availableColumns = columns.map((header) => columnHelper.accessor(header.accessor, {
|
|
34
35
|
id: header.accessor,
|
|
35
36
|
header: header.label,
|
|
36
|
-
cell: (info) => getCellFormatting(header.type, info.getValue()),
|
|
37
|
+
cell: (info) => getCellFormatting(header.type, info.getValue(), header.truncationLength),
|
|
37
38
|
}));
|
|
38
39
|
if (enableRowSelection) {
|
|
39
40
|
availableColumns = [
|
|
@@ -65,10 +66,16 @@ const SSITableView = (props) => {
|
|
|
65
66
|
columnResizeMode,
|
|
66
67
|
getCoreRowModel: getCoreRowModel(),
|
|
67
68
|
});
|
|
68
|
-
|
|
69
|
+
const onRowClicked = async (row) => {
|
|
70
|
+
if (onRowClick) {
|
|
71
|
+
await onRowClick(row);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (_jsx(SSITableViewContainerStyled, { children: _jsxs("div", { className: "overflow-x-auto", children: [(enableFiltering || enableMostRecent || actions.length > 0) &&
|
|
75
|
+
_jsx(SSITableViewHeader, { actions: actions, enableFiltering: enableFiltering, enableMostRecent: enableMostRecent }), _jsxs(SSITableViewTableContainerStyled, { children: [_jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => (_jsx(SSITableViewRowContainerStyled, { children: headerGroup.headers.map((header) => (_jsxs(SSITableViewHeaderCellContainerStyled, { colSpan: header.colSpan, style: { width: header.getSize() }, children: [header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()), _jsx("div", { className: `resizer ${header.column.getIsResizing() ? 'isResizing' : ''}`, onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler(), style: {
|
|
69
76
|
transform: columnResizeMode === 'onEnd' && header.column.getIsResizing()
|
|
70
77
|
? `translateX(${table.getState().columnSizingInfo.deltaOffset}px)`
|
|
71
78
|
: '',
|
|
72
|
-
} })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(SSITableViewRowContainerStyled, { children: row.getVisibleCells().map((cell) => (_jsx(SSITableViewCellContainerStyled, { style: { width: cell.column.getSize() }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id))) })] })] }) }));
|
|
79
|
+
} })] }, header.id))) }, headerGroup.id))) }), _jsx("tbody", { children: table.getRowModel().rows.map((row) => (_jsx(SSITableViewRowContainerStyled, { onClick: () => onRowClicked(row), children: row.getVisibleCells().map((cell) => (_jsx(SSITableViewCellContainerStyled, { style: { width: cell.column.getSize() }, children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id))) })] })] }) }));
|
|
73
80
|
};
|
|
74
81
|
export default SSITableView;
|
package/dist/index.d.ts
CHANGED
|
@@ -15,5 +15,8 @@ import SSITableView from './components/views/SSITableView';
|
|
|
15
15
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
16
16
|
import SSITabView from './components/views/SSITabView';
|
|
17
17
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
18
|
+
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
19
|
+
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
18
20
|
export * from './types';
|
|
19
|
-
export
|
|
21
|
+
export * from './styles/components/fonts';
|
|
22
|
+
export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
|
package/dist/index.js
CHANGED
|
@@ -15,5 +15,8 @@ import SSITableView from './components/views/SSITableView';
|
|
|
15
15
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
16
16
|
import SSITabView from './components/views/SSITabView';
|
|
17
17
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
18
|
+
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
19
|
+
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
18
20
|
export * from './types';
|
|
19
|
-
export
|
|
21
|
+
export * from './styles/components/fonts';
|
|
22
|
+
export { SSICardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const SSIDropDownListContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const SSIDropDownListSelectedValueStyled: import("styled-components").StyledComponent<"
|
|
2
|
+
export declare const SSIDropDownListSelectedValueStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { SSIFlexDirectionRowViewStyled } from '../../containers';
|
|
3
|
-
import { gradientColors } from
|
|
3
|
+
import { gradientColors } from '@sphereon/ui-components.core';
|
|
4
|
+
import { SSITextH3Styled } from '../../fonts';
|
|
4
5
|
export const SSIDropDownListContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
|
|
5
6
|
text-align: left;
|
|
6
7
|
align-items: center;
|
|
7
8
|
gap: 2px;
|
|
8
9
|
`;
|
|
9
|
-
export const SSIDropDownListSelectedValueStyled = styled
|
|
10
|
-
background: ${gradientColors[
|
|
10
|
+
export const SSIDropDownListSelectedValueStyled = styled(SSITextH3Styled) `
|
|
11
|
+
background: ${gradientColors['100']};
|
|
11
12
|
background-clip: text;
|
|
12
13
|
-webkit-background-clip: text;
|
|
13
14
|
-webkit-text-fill-color: transparent;
|
|
@@ -1,21 +1,13 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { SSIRoundedContainerStyled } from '../../containers';
|
|
3
|
-
import {
|
|
3
|
+
import { gradientColors } from '@sphereon/ui-components.core';
|
|
4
4
|
export const SSIPrimaryButtonContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
5
|
-
|
|
6
|
-
background: ${gradientColors["100"]};
|
|
5
|
+
background: ${gradientColors['100']};
|
|
7
6
|
display: flex;
|
|
8
7
|
flex-direction: row;
|
|
9
8
|
justify-content: center;
|
|
10
9
|
align-items: center;
|
|
11
10
|
gap: 8px;
|
|
12
|
-
padding
|
|
13
|
-
padding-right: 8px;
|
|
14
|
-
color: ${fontColors.light};
|
|
11
|
+
padding: 9px 6px 9px 6px;
|
|
15
12
|
cursor: pointer;
|
|
16
13
|
`;
|
|
17
|
-
export const SSIPrimaryButtonCaptionStyled = styled.div `
|
|
18
|
-
font-style: normal;
|
|
19
|
-
font-size: 14px;
|
|
20
|
-
font-weight: 400;
|
|
21
|
-
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SSIProfileIconContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { SSIRoundedContainerStyled } from '../../containers';
|
|
3
|
+
import { gradientColors } from '@sphereon/ui-components.core';
|
|
4
|
+
import { SSITextH3Styled } from "../../fonts";
|
|
5
|
+
export const SSISecondaryButtonContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 8px;
|
|
12
|
+
padding: 9px 6px 9px 6px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
&::before {
|
|
16
|
+
content: '';
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
right: 0;
|
|
21
|
+
bottom: 0;
|
|
22
|
+
border-radius: 8px;
|
|
23
|
+
border: 1px solid transparent;
|
|
24
|
+
background: linear-gradient(135deg, #7276F7, #7C40E8) border-box;
|
|
25
|
+
-webkit-mask:
|
|
26
|
+
linear-gradient(#fff 0 0) padding-box,
|
|
27
|
+
linear-gradient(#fff 0 0);
|
|
28
|
+
-webkit-mask-composite: destination-out;
|
|
29
|
+
mask-composite: exclude;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
export const SSISecondaryButtonCaptionStyled = styled(SSITextH3Styled) `
|
|
33
|
+
background: ${gradientColors['100']};
|
|
34
|
+
background-clip: text;
|
|
35
|
+
-webkit-background-clip: text;
|
|
36
|
+
-webkit-text-fill-color: transparent;
|
|
37
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SSITabViewContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { fontColors } from "@sphereon/ui-components.core";
|
|
3
2
|
export const SSITabViewHeaderContainerStyled = styled.div `
|
|
4
3
|
display: flex;
|
|
5
4
|
flex-direction: row;
|
|
@@ -7,7 +6,5 @@ export const SSITabViewHeaderContainerStyled = styled.div `
|
|
|
7
6
|
margin-left: 66px;
|
|
8
7
|
`;
|
|
9
8
|
export const SSITabViewHeaderTitleContainerStyled = styled.div `
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
color: ${fontColors.dark};
|
|
12
9
|
cursor: pointer;
|
|
13
10
|
`;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { backgroundColors, borderColors, fontColors } from
|
|
2
|
+
import { backgroundColors, borderColors, fontColors } from '@sphereon/ui-components.core';
|
|
3
|
+
import { SSITextH2Css, SSITextH3Css } from '../../../css';
|
|
3
4
|
export const SSITableViewContainerStyled = styled.div `
|
|
4
5
|
background-color: ${backgroundColors.lightGrey};
|
|
5
6
|
display: flex;
|
|
6
7
|
flex-grow: 1;
|
|
7
|
-
flex-direction: column
|
|
8
|
+
flex-direction: column;
|
|
8
9
|
`;
|
|
9
10
|
export const SSITableViewLabelCellStyled = styled.div `
|
|
10
11
|
display: flex;
|
|
@@ -13,24 +14,24 @@ export const SSITableViewLabelCellStyled = styled.div `
|
|
|
13
14
|
`;
|
|
14
15
|
export const SSITableViewTableContainerStyled = styled.table `
|
|
15
16
|
user-select: text;
|
|
16
|
-
width:
|
|
17
|
+
width: 100%;
|
|
17
18
|
border-collapse: collapse;
|
|
18
19
|
`;
|
|
19
20
|
export const SSITableViewRowContainerStyled = styled.tr `
|
|
20
21
|
border-bottom: 1px solid ${borderColors.lightGrey};
|
|
21
22
|
`;
|
|
22
23
|
export const SSITableViewCellContainerStyled = styled.td `
|
|
24
|
+
${SSITextH3Css};
|
|
23
25
|
color: ${fontColors.dark};
|
|
24
26
|
background-color: ${backgroundColors.primaryLight};
|
|
25
27
|
padding: 20px 16px 20px 16px;
|
|
26
28
|
text-align: left;
|
|
27
29
|
`;
|
|
28
30
|
export const SSITableViewHeaderCellContainerStyled = styled.th `
|
|
31
|
+
${SSITextH2Css};
|
|
29
32
|
position: relative;
|
|
30
33
|
padding: 20px 16px 20px 16px;
|
|
31
|
-
font-style: normal;
|
|
32
|
-
font-weight: 500;
|
|
33
|
-
line-height: normal;
|
|
34
34
|
background-color: ${backgroundColors.primaryLight};
|
|
35
35
|
color: ${fontColors.lightGrey};
|
|
36
|
+
text-align: left;
|
|
36
37
|
`;
|
|
@@ -2,5 +2,4 @@ export declare const SSITableViewHeaderContainerStyled: import("styled-component
|
|
|
2
2
|
export declare const SSITableViewHeaderContentContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const SSITableViewHeaderActionsContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const SSITableViewHeaderFilterContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export declare const SSITableViewHeaderFilterCaptionStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
5
|
export declare const SSITableViewHeaderShowOptionContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { SSIFlexDirectionRowViewStyled } from '../../containers';
|
|
3
|
-
import { backgroundColors
|
|
3
|
+
import { backgroundColors } from '@sphereon/ui-components.core';
|
|
4
4
|
export const SSITableViewHeaderContainerStyled = styled.div `
|
|
5
5
|
background-color: ${backgroundColors.primaryLight};
|
|
6
6
|
display: flex;
|
|
@@ -22,9 +22,6 @@ export const SSITableViewHeaderFilterContainerStyled = styled(SSIFlexDirectionRo
|
|
|
22
22
|
align-items: center;
|
|
23
23
|
gap: 8px;
|
|
24
24
|
`;
|
|
25
|
-
export const SSITableViewHeaderFilterCaptionStyled = styled.div `
|
|
26
|
-
color: ${fontColors.dark};
|
|
27
|
-
`;
|
|
28
25
|
export const SSITableViewHeaderShowOptionContainerStyled = styled.div `
|
|
29
26
|
display: flex;
|
|
30
27
|
text-align: left;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const SSITruncatedFullTextStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
|
+
export declare const SSITruncatedContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const SSITruncatedTextStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
export const SSITruncatedFullTextStyled = styled.span `
|
|
3
|
+
display: none;
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 100%;
|
|
6
|
+
left: 0;
|
|
7
|
+
background: #fff;
|
|
8
|
+
border: 1px solid #ccc;
|
|
9
|
+
padding: 5px;
|
|
10
|
+
z-index: 1;
|
|
11
|
+
`;
|
|
12
|
+
export const SSITruncatedContainerStyled = styled.div `
|
|
13
|
+
position: relative;
|
|
14
|
+
|
|
15
|
+
&:hover ${SSITruncatedFullTextStyled} {
|
|
16
|
+
display: block;
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
export const SSITruncatedTextStyled = styled.span `
|
|
20
|
+
display: 'inline';
|
|
21
|
+
`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { SSIRoundedContainerStyled } from '../../containers';
|
|
3
|
-
import { fontColors } from
|
|
3
|
+
import { fontColors } from '@sphereon/ui-components.core';
|
|
4
4
|
export const SSITypeLabelContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
5
5
|
display: flex;
|
|
6
6
|
padding: 1px 12px;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './SSICardView';
|
|
2
2
|
export * from './SSIStatusLabel';
|
|
3
3
|
export * from './SSIPrimaryButton';
|
|
4
|
+
export * from './SSISecondaryButton';
|
|
4
5
|
export * from './SSIIconButton';
|
|
5
6
|
export * from './SSIDropDownList';
|
|
6
7
|
export * from './SSITypeLabel';
|
|
7
8
|
export * from './SSITableViewHeader';
|
|
8
9
|
export * from './SSITableView';
|
|
9
10
|
export * from './SSITabViewHeader';
|
|
11
|
+
export * from './SSITabView';
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export * from './SSICardView';
|
|
2
2
|
export * from './SSIStatusLabel';
|
|
3
3
|
export * from './SSIPrimaryButton';
|
|
4
|
+
export * from './SSISecondaryButton';
|
|
4
5
|
export * from './SSIIconButton';
|
|
5
6
|
export * from './SSIDropDownList';
|
|
6
7
|
export * from './SSITypeLabel';
|
|
7
8
|
export * from './SSITableViewHeader';
|
|
8
9
|
export * from './SSITableView';
|
|
9
10
|
export * from './SSITabViewHeader';
|
|
11
|
+
export * from './SSITabView';
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare const SSITextH1Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
|
+
export declare const SSITextH2Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const SSITextH3Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
|
+
export declare const SSITextH3LightStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
1
5
|
export declare const SSITextH4Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
6
|
export declare const SSITextH4SemiBoldStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
7
|
export declare const SSITextH4LightStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { fontColors } from '@sphereon/ui-components.core';
|
|
3
|
-
import {
|
|
3
|
+
import { SSITextH1Css, SSITextH2Css, SSITextH3Css, SSITextH4Css, SSITextH4SemiBoldCss, SSITextH5Css, SSITextH6Css } from '../../css';
|
|
4
|
+
export const SSITextH1Styled = styled.span `
|
|
5
|
+
${SSITextH1Css}
|
|
6
|
+
`;
|
|
7
|
+
export const SSITextH2Styled = styled.span `
|
|
8
|
+
${SSITextH2Css}
|
|
9
|
+
`;
|
|
10
|
+
export const SSITextH3Styled = styled.span `
|
|
11
|
+
${SSITextH3Css}
|
|
12
|
+
`;
|
|
13
|
+
export const SSITextH3LightStyled = styled(SSITextH3Styled) `
|
|
14
|
+
color: ${fontColors.light};
|
|
15
|
+
`;
|
|
4
16
|
export const SSITextH4Styled = styled.span `
|
|
5
|
-
|
|
6
|
-
font-size: ${fontStyle.h4Regular.fontSize}px;
|
|
7
|
-
font-weight: ${fontStyle.h4Regular.fontWeight};
|
|
8
|
-
line-height: ${fontStyle.h4Regular.lineHeight}px;
|
|
9
|
-
height: auto;
|
|
17
|
+
${SSITextH4Css}
|
|
10
18
|
`;
|
|
11
19
|
export const SSITextH4SemiBoldStyled = styled.span `
|
|
12
|
-
|
|
13
|
-
font-size: ${fontStyle.h4SemiBold.fontSize}px;
|
|
14
|
-
font-weight: ${fontStyle.h4SemiBold.fontWeight};
|
|
15
|
-
line-height: ${fontStyle.h4SemiBold.lineHeight}px;
|
|
16
|
-
height: auto;
|
|
20
|
+
${SSITextH4SemiBoldCss}
|
|
17
21
|
`;
|
|
18
22
|
export const SSITextH4LightStyled = styled(SSITextH4Styled) `
|
|
19
23
|
color: ${fontColors.light};
|
|
@@ -22,21 +26,13 @@ export const SSITextH4SemiBoldLightStyled = styled(SSITextH4SemiBoldStyled) `
|
|
|
22
26
|
color: ${fontColors.light};
|
|
23
27
|
`;
|
|
24
28
|
export const SSITextH5Styled = styled.span `
|
|
25
|
-
|
|
26
|
-
font-size: ${fontStyle.h5Regular.fontSize}px;
|
|
27
|
-
font-weight: ${fontStyle.h5Regular.fontWeight};
|
|
28
|
-
line-height: ${fontStyle.h5Regular.lineHeight}px;
|
|
29
|
-
height: auto;
|
|
29
|
+
${SSITextH5Css}
|
|
30
30
|
`;
|
|
31
31
|
export const SSITextH5LightStyled = styled(SSITextH5Styled) `
|
|
32
32
|
color: ${fontColors.light};
|
|
33
33
|
`;
|
|
34
34
|
export const SSITextH6Styled = styled.span `
|
|
35
|
-
|
|
36
|
-
font-size: ${fontStyle.h6.fontSize}px;
|
|
37
|
-
font-weight: ${fontStyle.h6.fontWeight};
|
|
38
|
-
line-height: ${fontStyle.h6.lineHeight}px;
|
|
39
|
-
height: auto;
|
|
35
|
+
${SSITextH6Css}
|
|
40
36
|
`;
|
|
41
37
|
export const SSITextH6LightStyled = styled(SSITextH6Styled) `
|
|
42
38
|
color: ${fontColors.light};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const SSITextH1Css: import("styled-components").FlattenSimpleInterpolation;
|
|
2
|
+
export declare const SSITextH2Css: import("styled-components").FlattenSimpleInterpolation;
|
|
3
|
+
export declare const SSITextH3Css: import("styled-components").FlattenSimpleInterpolation;
|
|
4
|
+
export declare const SSITextH4Css: import("styled-components").FlattenSimpleInterpolation;
|
|
5
|
+
export declare const SSITextH4SemiBoldCss: import("styled-components").FlattenSimpleInterpolation;
|
|
6
|
+
export declare const SSITextH5Css: import("styled-components").FlattenSimpleInterpolation;
|
|
7
|
+
export declare const SSITextH6Css: import("styled-components").FlattenSimpleInterpolation;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { fontStyle } from '../typography';
|
|
3
|
+
export const SSITextH1Css = css `
|
|
4
|
+
font-family: ${fontStyle.h1Regular.fontFamily};
|
|
5
|
+
font-size: ${fontStyle.h1Regular.fontSize}px;
|
|
6
|
+
font-weight: ${fontStyle.h1Regular.fontWeight};
|
|
7
|
+
line-height: ${fontStyle.h1Regular.lineHeight}px;
|
|
8
|
+
height: auto;
|
|
9
|
+
`;
|
|
10
|
+
export const SSITextH2Css = css `
|
|
11
|
+
font-family: ${fontStyle.h2Regular.fontFamily};
|
|
12
|
+
font-size: ${fontStyle.h2Regular.fontSize}px;
|
|
13
|
+
font-weight: ${fontStyle.h2Regular.fontWeight};
|
|
14
|
+
line-height: ${fontStyle.h2Regular.lineHeight}px;
|
|
15
|
+
height: auto;
|
|
16
|
+
`;
|
|
17
|
+
export const SSITextH3Css = css `
|
|
18
|
+
font-family: ${fontStyle.h3Regular.fontFamily};
|
|
19
|
+
font-size: ${fontStyle.h3Regular.fontSize}px;
|
|
20
|
+
font-weight: ${fontStyle.h3Regular.fontWeight};
|
|
21
|
+
line-height: ${fontStyle.h3Regular.lineHeight}px;
|
|
22
|
+
height: auto;
|
|
23
|
+
`;
|
|
24
|
+
export const SSITextH4Css = css `
|
|
25
|
+
font-family: ${fontStyle.h4Regular.fontFamily};
|
|
26
|
+
font-size: ${fontStyle.h4Regular.fontSize}px;
|
|
27
|
+
font-weight: ${fontStyle.h4Regular.fontWeight};
|
|
28
|
+
line-height: ${fontStyle.h4Regular.lineHeight}px;
|
|
29
|
+
height: auto;
|
|
30
|
+
`;
|
|
31
|
+
export const SSITextH4SemiBoldCss = css `
|
|
32
|
+
font-family: ${fontStyle.h4SemiBold.fontFamily};
|
|
33
|
+
font-size: ${fontStyle.h4SemiBold.fontSize}px;
|
|
34
|
+
font-weight: ${fontStyle.h4SemiBold.fontWeight};
|
|
35
|
+
line-height: ${fontStyle.h4SemiBold.lineHeight}px;
|
|
36
|
+
height: auto;
|
|
37
|
+
`;
|
|
38
|
+
export const SSITextH5Css = css `
|
|
39
|
+
font-family: ${fontStyle.h5Regular.fontFamily};
|
|
40
|
+
font-size: ${fontStyle.h5Regular.fontSize}px;
|
|
41
|
+
font-weight: ${fontStyle.h5Regular.fontWeight};
|
|
42
|
+
line-height: ${fontStyle.h5Regular.lineHeight}px;
|
|
43
|
+
height: auto;
|
|
44
|
+
`;
|
|
45
|
+
export const SSITextH6Css = css `
|
|
46
|
+
font-family: ${fontStyle.h6.fontFamily};
|
|
47
|
+
font-size: ${fontStyle.h6.fontSize}px;
|
|
48
|
+
font-weight: ${fontStyle.h6.fontWeight};
|
|
49
|
+
line-height: ${fontStyle.h6.lineHeight}px;
|
|
50
|
+
height: auto;
|
|
51
|
+
`;
|
|
@@ -6,6 +6,12 @@ export const fontStyle = {
|
|
|
6
6
|
fontWeight: fontWeight[600],
|
|
7
7
|
lineHeight: lineHeight[800],
|
|
8
8
|
},
|
|
9
|
+
h1Regular: {
|
|
10
|
+
fontFamily: 'Poppins',
|
|
11
|
+
fontSize: fontSize[700],
|
|
12
|
+
fontWeight: fontWeight[400],
|
|
13
|
+
lineHeight: lineHeight[700],
|
|
14
|
+
},
|
|
9
15
|
h1SemiBold: {
|
|
10
16
|
fontFamily: 'Poppins',
|
|
11
17
|
fontSize: fontSize[700],
|
|
@@ -20,11 +20,12 @@ export type ColumnHeader<T> = {
|
|
|
20
20
|
accessor: AccessorFn<T> | DeepKeys<T>;
|
|
21
21
|
type: TableCellTypeEnum;
|
|
22
22
|
label?: string;
|
|
23
|
+
truncationLength?: number;
|
|
23
24
|
};
|
|
24
25
|
export type Button = {
|
|
25
26
|
caption: string;
|
|
26
27
|
onClick: () => Promise<void>;
|
|
27
|
-
icon?:
|
|
28
|
+
icon?: ButtonIconsEnum;
|
|
28
29
|
disabled?: boolean;
|
|
29
30
|
};
|
|
30
31
|
export declare enum LabelTypeEnum {
|
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.2
|
|
4
|
+
"version": "0.1.2",
|
|
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.2
|
|
31
|
+
"@sphereon/ui-components.core": "0.1.2",
|
|
32
32
|
"@tanstack/react-table": "^8.9.3",
|
|
33
33
|
"styled-components": "^5.3.3"
|
|
34
34
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": ">= 16.8.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "45285dfa116751f1cda0fef607c8150031c87db8"
|
|
44
44
|
}
|