@sphereon/ui-components.ssi-react 0.2.1-unstable.4 → 0.2.1-unstable.6
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/buttons/{IconButton → SSIIconButton}/index.d.ts +3 -3
- package/dist/components/buttons/{IconButton → SSIIconButton}/index.js +6 -14
- package/dist/components/buttons/{PrimaryButton → SSIPrimaryButton}/index.d.ts +3 -3
- package/dist/components/buttons/{PrimaryButton → SSIPrimaryButton}/index.js +4 -5
- package/dist/components/buttons/{SecondaryButton → SSISecondaryButton}/index.d.ts +3 -3
- package/dist/components/buttons/{SecondaryButton → SSISecondaryButton}/index.js +4 -5
- package/dist/components/indicators/ProgressStepIndicator/index.js +4 -6
- package/dist/components/lists/DropDownList/index.js +2 -2
- package/dist/components/views/CredentialIssuanceWizardView/index.js +5 -4
- package/dist/components/views/{FormView → CredentialIssuanceWizardView}/styles.css +6 -24
- package/dist/components/views/SSITableView/SSITableViewHeader/index.js +3 -3
- package/dist/index.d.ts +4 -5
- package/dist/index.js +4 -5
- package/dist/styles/components/components/ProgressStepIndicator/index.d.ts +0 -1
- package/dist/styles/components/components/ProgressStepIndicator/index.js +0 -10
- package/dist/styles/components/components/SSIIconButton/index.d.ts +1 -0
- package/dist/styles/components/components/{IconButton → SSIIconButton}/index.js +1 -1
- package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +1 -0
- package/dist/styles/components/components/{PrimaryButton → SSIPrimaryButton}/index.js +2 -3
- package/dist/styles/components/components/SSISecondaryButton/index.d.ts +2 -0
- package/dist/styles/components/components/{SecondaryButton → SSISecondaryButton}/index.js +3 -4
- package/dist/styles/components/components/index.d.ts +3 -3
- package/dist/styles/components/components/index.js +3 -3
- package/dist/types/indicator/index.d.ts +0 -1
- package/dist/types/view/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/components/views/FormView/index.d.ts +0 -15
- package/dist/components/views/FormView/index.js +0 -12
- package/dist/styles/components/components/IconButton/index.d.ts +0 -1
- package/dist/styles/components/components/PrimaryButton/index.d.ts +0 -1
- package/dist/styles/components/components/SecondaryButton/index.d.ts +0 -2
|
@@ -4,8 +4,8 @@ type Props = {
|
|
|
4
4
|
icon: ButtonIcon;
|
|
5
5
|
caption?: string;
|
|
6
6
|
onClick: MouseEventHandler;
|
|
7
|
-
disabled?: boolean
|
|
7
|
+
disabled?: boolean;
|
|
8
8
|
iconColor?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const SSIIconButton: FC<Props>;
|
|
11
|
+
export default SSIIconButton;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ButtonIcon, fontColors
|
|
2
|
+
import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSIAddIcon from '../../assets/icons/SSIAddIcon';
|
|
4
4
|
import SSIFilterIcon from '../../assets/icons/SSIFilterIcon';
|
|
5
5
|
import SSIArrowDownIcon from '../../assets/icons/SSIArrowDownIcon';
|
|
6
|
+
import { SSIIconButtonContainerStyled as Container, SSITextH3Styled as Caption } from '../../../styles';
|
|
6
7
|
import MeatBallsIcon from '../../assets/icons/MeatBallsIcon';
|
|
7
8
|
import DeleteIcon from '../../assets/icons/DeleteIcon';
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
12
|
-
const onClick = async (event) => {
|
|
13
|
-
if (!disabled) {
|
|
14
|
-
props.onClick(event);
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
return (_jsxs(Container, { style: {
|
|
18
|
-
...(disabled && { opacity: OpacityStyleEnum.DISABLED }),
|
|
19
|
-
}, onClick: onClick, children: [getIcon(icon, iconColor), caption && _jsx(Caption, { children: caption })] }));
|
|
9
|
+
const SSIIconButton = (props) => {
|
|
10
|
+
const { caption, icon, onClick, disabled = false, iconColor = fontColors.dark } = props;
|
|
11
|
+
return (_jsxs(Container, { onClick: onClick, children: [getIcon(icon, iconColor), caption && _jsx(Caption, { children: caption })] }));
|
|
20
12
|
};
|
|
21
13
|
const getIcon = (icon, color) => {
|
|
22
14
|
switch (icon) {
|
|
@@ -34,4 +26,4 @@ const getIcon = (icon, color) => {
|
|
|
34
26
|
return _jsx("div", {});
|
|
35
27
|
}
|
|
36
28
|
};
|
|
37
|
-
export default
|
|
29
|
+
export default SSIIconButton;
|
|
@@ -4,8 +4,8 @@ type Props = {
|
|
|
4
4
|
caption: string;
|
|
5
5
|
onClick: () => Promise<void>;
|
|
6
6
|
icon?: ButtonIcon;
|
|
7
|
-
disabled?: boolean
|
|
7
|
+
disabled?: boolean;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const SSIPrimaryButton: FC<Props>;
|
|
11
|
+
export default SSIPrimaryButton;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonIcon, fontColors, OpacityStyleEnum } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSIAddIcon from '../../assets/icons/SSIAddIcon';
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
const { caption, icon, onClick, style } = props;
|
|
7
|
-
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
4
|
+
import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles';
|
|
5
|
+
const SSIPrimaryButton = (props) => {
|
|
6
|
+
const { caption, icon, onClick, disabled = false, style } = props;
|
|
8
7
|
const getIcon = (icon, color) => {
|
|
9
8
|
switch (icon) {
|
|
10
9
|
case ButtonIcon.ADD:
|
|
@@ -20,4 +19,4 @@ const PrimaryButton = (props) => {
|
|
|
20
19
|
};
|
|
21
20
|
return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, onClick: onClicked, children: [icon && getIcon(icon, fontColors.light), _jsx(Caption, { style: { ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, children: caption })] }));
|
|
22
21
|
};
|
|
23
|
-
export default
|
|
22
|
+
export default SSIPrimaryButton;
|
|
@@ -4,8 +4,8 @@ type Props = {
|
|
|
4
4
|
caption: string;
|
|
5
5
|
onClick: () => Promise<void>;
|
|
6
6
|
icon?: ButtonIcon;
|
|
7
|
-
disabled?: boolean
|
|
7
|
+
disabled?: boolean;
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const SSISecondaryButton: FC<Props>;
|
|
11
|
+
export default SSISecondaryButton;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonIcon, OpacityStyleEnum } from '@sphereon/ui-components.core';
|
|
3
3
|
import SSIAddIcon from '../../assets/icons/SSIAddIcon';
|
|
4
|
-
import {
|
|
4
|
+
import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container } from '../../../styles';
|
|
5
5
|
import { gradientColors } from '../../../styles/colors';
|
|
6
|
-
const
|
|
7
|
-
const { caption, icon, onClick, style } = props;
|
|
8
|
-
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
6
|
+
const SSISecondaryButton = (props) => {
|
|
7
|
+
const { caption, icon, onClick, disabled = false, style } = props;
|
|
9
8
|
const getIcon = (icon, color) => {
|
|
10
9
|
switch (icon) {
|
|
11
10
|
case ButtonIcon.ADD:
|
|
@@ -21,4 +20,4 @@ const SecondaryButton = (props) => {
|
|
|
21
20
|
};
|
|
22
21
|
return (_jsxs(Container, { style: { ...style, ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, onClick: onClicked, children: [icon && getIcon(icon, gradientColors['100']), _jsx(Caption, { style: { ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, children: caption })] }));
|
|
23
22
|
};
|
|
24
|
-
export default
|
|
23
|
+
export default SSISecondaryButton;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { elementColors, fontColors
|
|
2
|
+
import { elementColors, fontColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import StepMarker from '../../assets/markers/StepMarker';
|
|
4
4
|
import { gradientColors } from '../../../styles/colors';
|
|
5
|
-
import { ProgressStepIndicatorContainerStyled as Container, ProgressStepIndicatorContentGridContainerStyled as GridContainer, ProgressStepIndicatorStepMarkerCellStyled as StepMarkerCell, ProgressStepIndicatorStepLineStyled as StepLine, ProgressStepIndicatorStepTextCellStyled as StepTextCell, ProgressStepIndicatorTitleTextStyled as TitleText, ProgressStepIndicatorDescriptionTextStyled as DescriptionText,
|
|
5
|
+
import { ProgressStepIndicatorContainerStyled as Container, ProgressStepIndicatorContentGridContainerStyled as GridContainer, ProgressStepIndicatorStepMarkerCellStyled as StepMarkerCell, ProgressStepIndicatorStepLineStyled as StepLine, ProgressStepIndicatorStepTextCellStyled as StepTextCell, ProgressStepIndicatorTitleTextStyled as TitleText, ProgressStepIndicatorDescriptionTextStyled as DescriptionText, ProgressStepIndicatorSpacerLineCellStyled as SpacerLineCell, } from '../../../styles';
|
|
6
6
|
import { StepStatus } from '../../../types';
|
|
7
7
|
const getStepRowElement = (stepNumber, status, step, maxSteps) => {
|
|
8
|
-
const { title, description, required = true } = step;
|
|
9
8
|
const gridRowNumber = stepNumber * 2 - 1;
|
|
10
9
|
return (_jsxs(_Fragment, { children: [_jsxs(StepMarkerCell, { style: { gridRow: gridRowNumber }, children: [_jsx(StepMarker, { stepNumber: stepNumber, status: status }), stepNumber < maxSteps && (_jsx(StepLine, { style: {
|
|
11
10
|
...(status === StepStatus.COMPLETED && {
|
|
12
11
|
backgroundColor: elementColors.purple,
|
|
13
12
|
}),
|
|
14
|
-
} }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [title && (
|
|
13
|
+
} }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [step.title && (_jsx(TitleText, { style: {
|
|
15
14
|
...(status === StepStatus.CURRENT && {
|
|
16
15
|
background: gradientColors['100'],
|
|
17
16
|
backgroundClip: 'text',
|
|
@@ -20,8 +19,7 @@ const getStepRowElement = (stepNumber, status, step, maxSteps) => {
|
|
|
20
19
|
}),
|
|
21
20
|
...(status === StepStatus.COMPLETED && { color: fontColors.dark }),
|
|
22
21
|
...(status === StepStatus.NEXT && { color: fontColors.lightGrey }),
|
|
23
|
-
}, children:
|
|
24
|
-
_jsx(OptionalText, { children: Localization.translate('optional_label') })] })), description && (_jsx(DescriptionText, { style: { ...((status === StepStatus.CURRENT || status === StepStatus.COMPLETED) && { color: fontColors.dark }) }, children: description }))] }), stepNumber < maxSteps && (_jsx(SpacerLineCell, { style: { gridRow: gridRowNumber + 1 }, children: _jsx(StepLine, { style: {
|
|
22
|
+
}, children: step.title })), step.description && (_jsx(DescriptionText, { style: { ...((status === StepStatus.CURRENT || status === StepStatus.COMPLETED) && { color: fontColors.dark }) }, children: step.description }))] }), stepNumber < maxSteps && (_jsx(SpacerLineCell, { style: { gridRow: gridRowNumber + 1 }, children: _jsx(StepLine, { style: {
|
|
25
23
|
...(status === StepStatus.COMPLETED && {
|
|
26
24
|
backgroundColor: elementColors.purple,
|
|
27
25
|
}),
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { borderColors } from '@sphereon/ui-components.core';
|
|
4
4
|
import DropDownListItem from '../DropDownListItem';
|
|
5
|
-
import
|
|
5
|
+
import SSIIconButton from '../../buttons/SSIIconButton';
|
|
6
6
|
import { DropDownListContainerStyled as Container, DropDownContainerStyled as DropDownContainer, DropDownListButtonStyled as ListButton, } from '../../../styles/components';
|
|
7
7
|
const DropDownList = (props) => {
|
|
8
8
|
const { icon, buttons, showBorder = false } = props;
|
|
@@ -29,6 +29,6 @@ const DropDownList = (props) => {
|
|
|
29
29
|
return (_jsx(DropDownListItem, { showBorder: showBorder, label: item.caption, onClick: item.onClick, icon: item.icon, fontColor: item.fontColor }, index));
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
return (_jsxs(Container, { ref: dropdownRef, children: [_jsx(ListButton, { children: _jsx(
|
|
32
|
+
return (_jsxs(Container, { ref: dropdownRef, children: [_jsx(ListButton, { children: _jsx(SSIIconButton, { icon: icon, onClick: onMore }) }), showActionsMenu && (_jsx(DropDownContainer, { style: { ...(showBorder && { borderWidth: 2, borderColor: borderColors.lightGrey, borderStyle: 'solid' }) }, children: getItems() }))] }));
|
|
33
33
|
};
|
|
34
34
|
export default DropDownList;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Autocomplete, TextField } from '@mui/material';
|
|
4
|
+
import { materialCells } from '@jsonforms/material-renderers';
|
|
5
|
+
import { JsonForms } from '@jsonforms/react';
|
|
4
6
|
import { Localization } from '@sphereon/ui-components.core';
|
|
5
7
|
import FileSelection from '../../fields/FileSelection';
|
|
6
8
|
import DragAndDropBox from '../../fields/DragAndDropBox';
|
|
9
|
+
import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
|
|
7
10
|
import { CredentialIssuanceWizardViewContainerStyled as Container, CredentialIssuanceWizardViewCredentialTypeContainerStyled as CredentialTypeContainer, CredentialIssuanceWizardViewCredentialTypeTitleStyled as CredentialTypeTitle, CredentialIssuanceWizardViewFormContainerStyled as FormContainer, CredentialIssuanceWizardViewEvidenceContainerStyled as EvidenceContainer, CredentialIssuanceWizardViewEvidenceContentContainerStyled as EvidenceContentContainer, CredentialIssuanceWizardViewEvidenceTitleContainerStyled as EvidenceTitleContainer, SSITextH2SemiBoldStyled as EvidenceTitle, CredentialIssuanceWizardViewEvidenceTitleOptionalStyled as EvidenceTitleOptional, SSITextH2Styled as EvidenceDescription, CredentialIssuanceWizardViewEvidenceFilesContainerStyled as EvidenceFilesContainer } from '../../../styles';
|
|
8
|
-
import FormView from "../FormView";
|
|
9
11
|
const CredentialIssuanceWizardView = (props) => {
|
|
10
12
|
const { credentialData, credentialTypes, onSelectCredentialTypeChange, onCredentialFormDataChange } = props;
|
|
11
13
|
const [selectedCredentialType, setSelectedCredentialType] = useState(null);
|
|
@@ -17,7 +19,7 @@ const CredentialIssuanceWizardView = (props) => {
|
|
|
17
19
|
setSelectedCredentialType(value);
|
|
18
20
|
onSelectCredentialTypeChange?.(value);
|
|
19
21
|
};
|
|
20
|
-
const onCredentialFormInputChange =
|
|
22
|
+
const onCredentialFormInputChange = (state) => {
|
|
21
23
|
setCredentialInput(state);
|
|
22
24
|
onCredentialFormDataChange?.({ ...state, evidence });
|
|
23
25
|
};
|
|
@@ -36,7 +38,6 @@ const CredentialIssuanceWizardView = (props) => {
|
|
|
36
38
|
return evidence.map((file, index) => _jsx(FileSelection, { file: file, onRemove: async () => onRemoveEvidence(index) }, index));
|
|
37
39
|
};
|
|
38
40
|
return (_jsxs(Container, { children: [_jsxs(CredentialTypeContainer, { children: [_jsx(CredentialTypeTitle, { children: Localization.translate('credential_issuance_wizard_title') }), _jsx(Autocomplete, { options: credentialTypes, sx: { flexGrow: 1 }, renderInput: (params) => _jsx(TextField, { ...params, label: Localization.translate('credential_issuance_wizard_credential_type_label') }), onChange: onCredentialTypeChange })] }), selectedCredentialType &&
|
|
39
|
-
_jsxs(_Fragment, { children: [_jsx(FormContainer, { children: (selectedCredentialType.schema
|
|
40
|
-
_jsx(FormView, { schema: selectedCredentialType.schema, uiSchema: selectedCredentialType.uiSchema, data: credentialData, onFormStateChange: onCredentialFormInputChange }) }), _jsx(EvidenceContainer, { children: _jsxs(EvidenceContentContainer, { children: [_jsxs("div", { children: [_jsxs(EvidenceTitleContainer, { children: [_jsx(EvidenceTitle, { children: Localization.translate('credential_issuance_wizard_evidence_title') }), _jsx(EvidenceTitleOptional, { children: Localization.translate('optional_label') })] }), _jsx(EvidenceDescription, { children: Localization.translate('credential_issuance_wizard_evidence_description') })] }), _jsxs(EvidenceFilesContainer, { children: [_jsx(DragAndDropBox, { caption: Localization.translate('drag_and_drop_upload_evidence_caption'), description: Localization.translate('credential_attach_evidence_description'), onChangeFile: onAddEvidence }), getEvidenceElements()] })] }) })] })] }));
|
|
41
|
+
_jsxs(_Fragment, { children: [_jsx(FormContainer, { children: _jsx(JsonForms, { schema: selectedCredentialType.schema, uischema: selectedCredentialType.uiSchema, data: credentialData, renderers: jsonFormsMaterialRenderers, cells: materialCells, onChange: onCredentialFormInputChange }) }), _jsx(EvidenceContainer, { children: _jsxs(EvidenceContentContainer, { children: [_jsxs("div", { children: [_jsxs(EvidenceTitleContainer, { children: [_jsx(EvidenceTitle, { children: Localization.translate('credential_issuance_wizard_evidence_title') }), _jsx(EvidenceTitleOptional, { children: Localization.translate('credential_issuance_wizard_evidence_optional_title') })] }), _jsx(EvidenceDescription, { children: Localization.translate('credential_issuance_wizard_evidence_description') })] }), _jsxs(EvidenceFilesContainer, { children: [_jsx(DragAndDropBox, { caption: Localization.translate('drag_and_drop_upload_evidence_caption'), description: Localization.translate('credential_attach_evidence_description'), onChangeFile: onAddEvidence }), getEvidenceElements()] })] }) })] })] }));
|
|
41
42
|
};
|
|
42
43
|
export default CredentialIssuanceWizardView;
|
|
@@ -6,7 +6,12 @@
|
|
|
6
6
|
border-color: #7276F7 !important;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.MuiInputLabel-root.MuiFormLabel-root {
|
|
10
|
+
color: #303030 !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
.MuiTypography-h6 {
|
|
14
|
+
color: #303030 !important;
|
|
10
15
|
font-size: 16px !important;
|
|
11
16
|
font-style: normal !important;
|
|
12
17
|
font-weight: 600 !important;
|
|
@@ -33,7 +38,6 @@
|
|
|
33
38
|
margin: 0 !important;
|
|
34
39
|
background-color: #FBFBFB !important;
|
|
35
40
|
box-shadow: none !important;
|
|
36
|
-
border-radius: 4px !important;
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
.MuiCardHeader-title {
|
|
@@ -42,6 +46,7 @@
|
|
|
42
46
|
font-style: normal !important;
|
|
43
47
|
font-weight: 400 !important;
|
|
44
48
|
margin-bottom: 10px !important;
|
|
49
|
+
color: #303030 !important;
|
|
45
50
|
}
|
|
46
51
|
|
|
47
52
|
.MuiGrid-root.MuiGrid-container.MuiGrid-direction-xs-column {
|
|
@@ -62,7 +67,6 @@
|
|
|
62
67
|
|
|
63
68
|
.MuiTypography-root {
|
|
64
69
|
font-family: 'Poppins', sans-serif !important;
|
|
65
|
-
color: #303030 !important;
|
|
66
70
|
}
|
|
67
71
|
|
|
68
72
|
.MuiDateCalendar-root {
|
|
@@ -81,25 +85,3 @@
|
|
|
81
85
|
.MuiButtonBase-root.MuiPickersDay-root.MuiPickersDay-dayWithMargin:hover {
|
|
82
86
|
background-color: #B7B8D9 !important;
|
|
83
87
|
}
|
|
84
|
-
|
|
85
|
-
.base-Popper-root {
|
|
86
|
-
border-radius: 4px !important;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.MuiFormGroup-root.MuiFormGroup-row {
|
|
90
|
-
display: grid !important;
|
|
91
|
-
grid-template-columns: repeat(2, 1fr) !important;
|
|
92
|
-
grid-gap: 10px !important;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.MuiGrid-root.MuiGrid-item.MuiGrid-grid-xs-true:empty {
|
|
96
|
-
display: none !important;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
textarea.MuiInputBase-input.MuiInputBase-inputMultiline {
|
|
100
|
-
min-height: 112px !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.MuiTabs-scroller.MuiTabs-fixed {
|
|
104
|
-
margin-bottom: 12px !important;
|
|
105
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ButtonIcon, Localization, statusColors } from '@sphereon/ui-components.core';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import SSIIconButton from '../../../buttons/SSIIconButton';
|
|
4
|
+
import SSIPrimaryButton from '../../../buttons/SSIPrimaryButton';
|
|
5
5
|
import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, TableViewHeaderStaticActionsContainerStyled as StaticActionsContainer, } from '../../../../styles';
|
|
6
6
|
const SSITableViewHeader = (props) => {
|
|
7
7
|
const { enableFiltering = false, enableMostRecent = false, actions = [], onDelete } = props;
|
|
8
8
|
const onDeleteClick = async () => {
|
|
9
9
|
await onDelete?.();
|
|
10
10
|
};
|
|
11
|
-
return (_jsxs(Container, { children: [_jsx(StaticActionsContainer, { children: onDelete && (_jsx(
|
|
11
|
+
return (_jsxs(Container, { children: [_jsx(StaticActionsContainer, { children: onDelete && (_jsx(SSIIconButton, { caption: Localization.translate('action_delete_label'), icon: ButtonIcon.DELETE, iconColor: statusColors.error, onClick: onDeleteClick })) }), _jsx(ContentContainer, { style: { width: 'fit-content' }, children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(SSIIconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) })] }));
|
|
12
12
|
};
|
|
13
13
|
export default SSITableViewHeader;
|
package/dist/index.d.ts
CHANGED
|
@@ -11,15 +11,15 @@ import SSIAddIcon from './components/assets/icons/SSIAddIcon';
|
|
|
11
11
|
import SSIFilterIcon from './components/assets/icons/SSIFilterIcon';
|
|
12
12
|
import SSIArrowDownIcon from './components/assets/icons/SSIArrowDownIcon';
|
|
13
13
|
import SSITypeLabel from './components/labels/SSITypeLabel';
|
|
14
|
-
import
|
|
15
|
-
import
|
|
14
|
+
import SSIIconButton from './components/buttons/SSIIconButton';
|
|
15
|
+
import SSIPrimaryButton from './components/buttons/SSIPrimaryButton';
|
|
16
16
|
import DropDownList from './components/lists/DropDownList';
|
|
17
17
|
import SSITableView from './components/views/SSITableView';
|
|
18
18
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
19
19
|
import SSITabView from './components/views/SSITabView';
|
|
20
20
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
21
21
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
22
|
-
import
|
|
22
|
+
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
23
23
|
import SSICheckbox from './components/fields/SSICheckbox';
|
|
24
24
|
import SSIActivityIndicator from './components/indicators/SSIActivityIndicator';
|
|
25
25
|
import SSIHoverText from './components/fields/SSIHoverText';
|
|
@@ -40,10 +40,9 @@ import CredentialViewItem from './components/views/CredentialViewItem';
|
|
|
40
40
|
import JSONDataView from './components/views/JSONDataView';
|
|
41
41
|
import TextInputField from './components/fields/TextInputField';
|
|
42
42
|
import WarningImage from './components/assets/images/WarningImage';
|
|
43
|
-
import FormView from './components/views/FormView';
|
|
44
43
|
import { Row } from '@tanstack/react-table';
|
|
45
44
|
export * from './styles/fonts';
|
|
46
45
|
export * from './types';
|
|
47
46
|
export * from './helpers';
|
|
48
47
|
export * from './utils';
|
|
49
|
-
export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel,
|
|
48
|
+
export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, Row, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, CredentialViewItem, JSONDataView, TextInputField, WarningImage };
|
package/dist/index.js
CHANGED
|
@@ -10,15 +10,15 @@ import SSIAddIcon from './components/assets/icons/SSIAddIcon';
|
|
|
10
10
|
import SSIFilterIcon from './components/assets/icons/SSIFilterIcon';
|
|
11
11
|
import SSIArrowDownIcon from './components/assets/icons/SSIArrowDownIcon';
|
|
12
12
|
import SSITypeLabel from './components/labels/SSITypeLabel';
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import SSIIconButton from './components/buttons/SSIIconButton';
|
|
14
|
+
import SSIPrimaryButton from './components/buttons/SSIPrimaryButton';
|
|
15
15
|
import DropDownList from './components/lists/DropDownList';
|
|
16
16
|
import SSITableView from './components/views/SSITableView';
|
|
17
17
|
import SSITableViewHeader from './components/views/SSITableView/SSITableViewHeader';
|
|
18
18
|
import SSITabView from './components/views/SSITabView';
|
|
19
19
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
20
20
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
21
|
-
import
|
|
21
|
+
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
22
22
|
import SSICheckbox from './components/fields/SSICheckbox';
|
|
23
23
|
import SSIActivityIndicator from './components/indicators/SSIActivityIndicator';
|
|
24
24
|
import SSIHoverText from './components/fields/SSIHoverText';
|
|
@@ -39,9 +39,8 @@ import CredentialViewItem from './components/views/CredentialViewItem';
|
|
|
39
39
|
import JSONDataView from './components/views/JSONDataView';
|
|
40
40
|
import TextInputField from './components/fields/TextInputField';
|
|
41
41
|
import WarningImage from './components/assets/images/WarningImage';
|
|
42
|
-
import FormView from './components/views/FormView';
|
|
43
42
|
export * from './styles/fonts';
|
|
44
43
|
export * from './types';
|
|
45
44
|
export * from './helpers';
|
|
46
45
|
export * from './utils';
|
|
47
|
-
export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel,
|
|
46
|
+
export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, DropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSIToastContainer, SSICheckbox, SSIActivityIndicator, SSIHoverText, StepMarker, ProgressStepIndicator, PaginationControls, PaginationControlsProps, DocumentIcon, CrossIcon, ImageIcon, FileSelection, ComboBox, DragAndDropBox, PersonPlaceholder, PassportPhotoControl, passportPhotoControlTester, CredentialIssuanceWizardView, CredentialViewItem, JSONDataView, TextInputField, WarningImage };
|
|
@@ -5,5 +5,4 @@ export declare const ProgressStepIndicatorStepTextCellStyled: import("styled-com
|
|
|
5
5
|
export declare const ProgressStepIndicatorSpacerLineCellStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
6
|
export declare const ProgressStepIndicatorTitleTextStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export declare const ProgressStepIndicatorDescriptionTextStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
-
export declare const ProgressStepIndicatorOptionalTextStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
8
|
export declare const ProgressStepIndicatorStepLineStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { backgroundColors, borderColors, elementColors, fontColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import { SSITextH1SemiBoldStyled, SSITextH3Styled } from '../../../fonts';
|
|
4
|
-
import { SSITextH2Css } from "../../../css";
|
|
5
4
|
export const ProgressStepIndicatorContainerStyled = styled.div `
|
|
6
5
|
background-color: ${backgroundColors.primaryLight};
|
|
7
6
|
border-radius: 24px;
|
|
@@ -37,20 +36,11 @@ export const ProgressStepIndicatorSpacerLineCellStyled = styled.div `
|
|
|
37
36
|
`;
|
|
38
37
|
export const ProgressStepIndicatorTitleTextStyled = styled(SSITextH1SemiBoldStyled) `
|
|
39
38
|
word-break: break-word;
|
|
40
|
-
|
|
41
|
-
display: flex;
|
|
42
|
-
flex-direction: row;
|
|
43
|
-
gap: 4px;
|
|
44
39
|
`;
|
|
45
40
|
export const ProgressStepIndicatorDescriptionTextStyled = styled(SSITextH3Styled) `
|
|
46
41
|
word-break: break-word;
|
|
47
42
|
color: ${fontColors.lightGrey};
|
|
48
43
|
`;
|
|
49
|
-
export const ProgressStepIndicatorOptionalTextStyled = styled.div `
|
|
50
|
-
${SSITextH2Css};
|
|
51
|
-
line-height: unset;
|
|
52
|
-
font-style: italic;
|
|
53
|
-
`;
|
|
54
44
|
export const ProgressStepIndicatorStepLineStyled = styled.div `
|
|
55
45
|
width: 4px;
|
|
56
46
|
display: flex;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SSIIconButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SSIPrimaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { SSIRoundedContainerStyled } from '../../containers';
|
|
3
3
|
import { gradientColors } from '../../../colors';
|
|
4
|
-
export const
|
|
4
|
+
export const SSIPrimaryButtonContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
5
5
|
background: ${gradientColors['100']};
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: row;
|
|
8
8
|
justify-content: center;
|
|
9
9
|
align-items: center;
|
|
10
10
|
gap: 8px;
|
|
11
|
-
padding: 9px;
|
|
11
|
+
padding: 9px 6px 9px 6px;
|
|
12
12
|
cursor: pointer;
|
|
13
|
-
width: 180px;
|
|
14
13
|
`;
|
|
@@ -2,16 +2,15 @@ import styled from 'styled-components';
|
|
|
2
2
|
import { SSIRoundedContainerStyled } from '../../containers';
|
|
3
3
|
import { SSITextH3Styled } from '../../../fonts';
|
|
4
4
|
import { gradient100TextCss } from '../../../css';
|
|
5
|
-
export const
|
|
5
|
+
export const SSISecondaryButtonContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
6
6
|
position: relative;
|
|
7
7
|
display: flex;
|
|
8
8
|
flex-direction: row;
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
|
11
11
|
gap: 8px;
|
|
12
|
-
padding: 9px;
|
|
12
|
+
padding: 9px 6px 9px 6px;
|
|
13
13
|
cursor: pointer;
|
|
14
|
-
width: 180px;
|
|
15
14
|
|
|
16
15
|
&::before {
|
|
17
16
|
content: '';
|
|
@@ -28,6 +27,6 @@ export const SecondaryButtonContainerStyled = styled(SSIRoundedContainerStyled)
|
|
|
28
27
|
mask-composite: exclude;
|
|
29
28
|
}
|
|
30
29
|
`;
|
|
31
|
-
export const
|
|
30
|
+
export const SSISecondaryButtonCaptionStyled = styled(SSITextH3Styled) `
|
|
32
31
|
${gradient100TextCss}
|
|
33
32
|
`;
|
|
@@ -3,9 +3,9 @@ export * from './DropDownListItem';
|
|
|
3
3
|
export * from './SSICredentialCardView';
|
|
4
4
|
export * from './SSICredentialMiniCardView';
|
|
5
5
|
export * from './SSIStatusLabel';
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
6
|
+
export * from './SSIPrimaryButton';
|
|
7
|
+
export * from './SSISecondaryButton';
|
|
8
|
+
export * from './SSIIconButton';
|
|
9
9
|
export * from './DropDownList';
|
|
10
10
|
export * from './SSITypeLabel';
|
|
11
11
|
export * from './SSITableViewHeader';
|
|
@@ -3,9 +3,9 @@ export * from './DropDownListItem';
|
|
|
3
3
|
export * from './SSICredentialCardView';
|
|
4
4
|
export * from './SSICredentialMiniCardView';
|
|
5
5
|
export * from './SSIStatusLabel';
|
|
6
|
-
export * from './
|
|
7
|
-
export * from './
|
|
8
|
-
export * from './
|
|
6
|
+
export * from './SSIPrimaryButton';
|
|
7
|
+
export * from './SSISecondaryButton';
|
|
8
|
+
export * from './SSIIconButton';
|
|
9
9
|
export * from './DropDownList';
|
|
10
10
|
export * from './SSITypeLabel';
|
|
11
11
|
export * from './SSITableViewHeader';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { JsonFormsCore, JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
2
|
import { ErrorObject } from 'ajv';
|
|
3
|
-
export type
|
|
3
|
+
export type CredentialFormInput = Pick<JsonFormsCore, 'data' | 'errors'>;
|
|
4
4
|
export type CredentialFormData = {
|
|
5
5
|
data?: any;
|
|
6
6
|
errors?: ErrorObject[];
|
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.2.1-unstable.
|
|
4
|
+
"version": "0.2.1-unstable.6+2b7f5ca",
|
|
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>",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@mui/styled-engine-sc": "^5.14.12",
|
|
41
41
|
"@mui/system": "^5.15.12",
|
|
42
42
|
"@mui/x-date-pickers": "^6.19.5",
|
|
43
|
-
"@sphereon/ui-components.core": "0.2.1-unstable.
|
|
43
|
+
"@sphereon/ui-components.core": "0.2.1-unstable.6+2b7f5ca",
|
|
44
44
|
"@tanstack/react-table": "^8.9.3",
|
|
45
45
|
"react-json-tree": "^0.18.0",
|
|
46
46
|
"react-loader-spinner": "5.4.5",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"react": ">= 18"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2b7f5cab03e93c7a3a26d880a5097f24e3149591"
|
|
63
63
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, FC } from 'react';
|
|
2
|
-
import { JsonFormsCellRendererRegistryEntry, JsonFormsRendererRegistryEntry, JsonSchema, UISchemaElement, ValidationMode } from '@jsonforms/core';
|
|
3
|
-
import { JSONFormState } from '../../../types';
|
|
4
|
-
type Props = {
|
|
5
|
-
schema: JsonSchema;
|
|
6
|
-
uiSchema: UISchemaElement;
|
|
7
|
-
validationMode?: ValidationMode;
|
|
8
|
-
data?: Record<any, any>;
|
|
9
|
-
renderers?: Array<JsonFormsRendererRegistryEntry>;
|
|
10
|
-
cells?: Array<JsonFormsCellRendererRegistryEntry>;
|
|
11
|
-
onFormStateChange?: (state: JSONFormState) => Promise<void>;
|
|
12
|
-
style?: CSSProperties;
|
|
13
|
-
};
|
|
14
|
-
declare const FormView: FC<Props>;
|
|
15
|
-
export default FormView;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { JsonForms } from '@jsonforms/react';
|
|
3
|
-
import { materialCells } from '@jsonforms/material-renderers';
|
|
4
|
-
import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
|
|
5
|
-
const FormView = (props) => {
|
|
6
|
-
const { data, schema, uiSchema, validationMode = 'ValidateAndShow', renderers = jsonFormsMaterialRenderers, cells = materialCells, style, onFormStateChange } = props;
|
|
7
|
-
const onFormStateChanged = (state) => {
|
|
8
|
-
void onFormStateChange?.(state);
|
|
9
|
-
};
|
|
10
|
-
return _jsx("div", { style: style, children: _jsx(JsonForms, { schema: schema, uischema: uiSchema, data: data, renderers: renderers, cells: cells, onChange: onFormStateChanged, validationMode: validationMode }) });
|
|
11
|
-
};
|
|
12
|
-
export default FormView;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const IconButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PrimaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|