@sphereon/ui-components.ssi-react 0.2.1-unstable.2 → 0.2.1-unstable.4
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/{SSIIconButton → IconButton}/index.d.ts +3 -3
- package/dist/components/buttons/{SSIIconButton → IconButton}/index.js +14 -6
- package/dist/components/buttons/{SSISecondaryButton → PrimaryButton}/index.d.ts +3 -3
- package/dist/components/buttons/{SSIPrimaryButton → PrimaryButton}/index.js +5 -4
- package/dist/components/buttons/{SSIPrimaryButton → SecondaryButton}/index.d.ts +3 -3
- package/dist/components/buttons/{SSISecondaryButton → SecondaryButton}/index.js +5 -4
- package/dist/components/indicators/ProgressStepIndicator/index.js +6 -4
- package/dist/components/lists/DropDownList/index.js +2 -2
- package/dist/components/views/CredentialIssuanceWizardView/index.js +4 -5
- package/dist/components/views/FormView/index.d.ts +15 -0
- package/dist/components/views/FormView/index.js +12 -0
- package/dist/components/views/{CredentialIssuanceWizardView → FormView}/styles.css +24 -6
- package/dist/components/views/SSITableView/SSITableViewHeader/index.js +3 -3
- package/dist/index.d.ts +5 -4
- package/dist/index.js +5 -4
- package/dist/styles/components/components/IconButton/index.d.ts +1 -0
- package/dist/styles/components/components/{SSIIconButton → IconButton}/index.js +1 -1
- package/dist/styles/components/components/PrimaryButton/index.d.ts +1 -0
- package/dist/styles/components/components/{SSIPrimaryButton → PrimaryButton}/index.js +3 -2
- package/dist/styles/components/components/ProgressStepIndicator/index.d.ts +1 -0
- package/dist/styles/components/components/ProgressStepIndicator/index.js +10 -0
- package/dist/styles/components/components/SecondaryButton/index.d.ts +2 -0
- package/dist/styles/components/components/{SSISecondaryButton → SecondaryButton}/index.js +4 -3
- 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 +1 -0
- package/dist/types/view/index.d.ts +1 -1
- package/package.json +3 -3
- package/dist/styles/components/components/SSIIconButton/index.d.ts +0 -1
- package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +0 -1
- package/dist/styles/components/components/SSISecondaryButton/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 | (() => boolean);
|
|
8
8
|
iconColor?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const IconButton: FC<Props>;
|
|
11
|
+
export default IconButton;
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
|
|
2
|
+
import { ButtonIcon, fontColors, OpacityStyleEnum } 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';
|
|
7
6
|
import MeatBallsIcon from '../../assets/icons/MeatBallsIcon';
|
|
8
7
|
import DeleteIcon from '../../assets/icons/DeleteIcon';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { IconButtonContainerStyled as Container, SSITextH3Styled as Caption } from '../../../styles';
|
|
9
|
+
const IconButton = (props) => {
|
|
10
|
+
const { caption, icon, iconColor = fontColors.dark } = props;
|
|
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 })] }));
|
|
12
20
|
};
|
|
13
21
|
const getIcon = (icon, color) => {
|
|
14
22
|
switch (icon) {
|
|
@@ -26,4 +34,4 @@ const getIcon = (icon, color) => {
|
|
|
26
34
|
return _jsx("div", {});
|
|
27
35
|
}
|
|
28
36
|
};
|
|
29
|
-
export default
|
|
37
|
+
export default IconButton;
|
|
@@ -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 | (() => boolean);
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const PrimaryButton: FC<Props>;
|
|
11
|
+
export default PrimaryButton;
|
|
@@ -1,9 +1,10 @@
|
|
|
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,
|
|
4
|
+
import { PrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles';
|
|
5
|
+
const PrimaryButton = (props) => {
|
|
6
|
+
const { caption, icon, onClick, style } = props;
|
|
7
|
+
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
7
8
|
const getIcon = (icon, color) => {
|
|
8
9
|
switch (icon) {
|
|
9
10
|
case ButtonIcon.ADD:
|
|
@@ -19,4 +20,4 @@ const SSIPrimaryButton = (props) => {
|
|
|
19
20
|
};
|
|
20
21
|
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 })] }));
|
|
21
22
|
};
|
|
22
|
-
export default
|
|
23
|
+
export default PrimaryButton;
|
|
@@ -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 | (() => boolean);
|
|
8
8
|
style?: CSSProperties;
|
|
9
9
|
};
|
|
10
|
-
declare const
|
|
11
|
-
export default
|
|
10
|
+
declare const SecondaryButton: FC<Props>;
|
|
11
|
+
export default SecondaryButton;
|
|
@@ -1,10 +1,11 @@
|
|
|
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 { SecondaryButtonCaptionStyled as Caption, SecondaryButtonContainerStyled as Container } from '../../../styles';
|
|
5
5
|
import { gradientColors } from '../../../styles/colors';
|
|
6
|
-
const
|
|
7
|
-
const { caption, icon, onClick,
|
|
6
|
+
const SecondaryButton = (props) => {
|
|
7
|
+
const { caption, icon, onClick, style } = props;
|
|
8
|
+
const disabled = typeof props.disabled === 'function' ? props.disabled() : props.disabled ?? false;
|
|
8
9
|
const getIcon = (icon, color) => {
|
|
9
10
|
switch (icon) {
|
|
10
11
|
case ButtonIcon.ADD:
|
|
@@ -20,4 +21,4 @@ const SSISecondaryButton = (props) => {
|
|
|
20
21
|
};
|
|
21
22
|
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 })] }));
|
|
22
23
|
};
|
|
23
|
-
export default
|
|
24
|
+
export default SecondaryButton;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { elementColors, fontColors } from '@sphereon/ui-components.core';
|
|
2
|
+
import { elementColors, fontColors, Localization } 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, ProgressStepIndicatorSpacerLineCellStyled as SpacerLineCell, } from '../../../styles';
|
|
5
|
+
import { ProgressStepIndicatorContainerStyled as Container, ProgressStepIndicatorContentGridContainerStyled as GridContainer, ProgressStepIndicatorStepMarkerCellStyled as StepMarkerCell, ProgressStepIndicatorStepLineStyled as StepLine, ProgressStepIndicatorStepTextCellStyled as StepTextCell, ProgressStepIndicatorTitleTextStyled as TitleText, ProgressStepIndicatorDescriptionTextStyled as DescriptionText, ProgressStepIndicatorOptionalTextStyled as OptionalText, 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;
|
|
8
9
|
const gridRowNumber = stepNumber * 2 - 1;
|
|
9
10
|
return (_jsxs(_Fragment, { children: [_jsxs(StepMarkerCell, { style: { gridRow: gridRowNumber }, children: [_jsx(StepMarker, { stepNumber: stepNumber, status: status }), stepNumber < maxSteps && (_jsx(StepLine, { style: {
|
|
10
11
|
...(status === StepStatus.COMPLETED && {
|
|
11
12
|
backgroundColor: elementColors.purple,
|
|
12
13
|
}),
|
|
13
|
-
} }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [
|
|
14
|
+
} }))] }), _jsxs(StepTextCell, { style: { gridRow: gridRowNumber }, children: [title && (_jsxs(TitleText, { style: {
|
|
14
15
|
...(status === StepStatus.CURRENT && {
|
|
15
16
|
background: gradientColors['100'],
|
|
16
17
|
backgroundClip: 'text',
|
|
@@ -19,7 +20,8 @@ const getStepRowElement = (stepNumber, status, step, maxSteps) => {
|
|
|
19
20
|
}),
|
|
20
21
|
...(status === StepStatus.COMPLETED && { color: fontColors.dark }),
|
|
21
22
|
...(status === StepStatus.NEXT && { color: fontColors.lightGrey }),
|
|
22
|
-
}, children:
|
|
23
|
+
}, children: [_jsx("div", { children: title }), !required &&
|
|
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: {
|
|
23
25
|
...(status === StepStatus.COMPLETED && {
|
|
24
26
|
backgroundColor: elementColors.purple,
|
|
25
27
|
}),
|
|
@@ -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 IconButton from '../../buttons/IconButton';
|
|
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(IconButton, { 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,13 +1,11 @@
|
|
|
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';
|
|
6
4
|
import { Localization } from '@sphereon/ui-components.core';
|
|
7
5
|
import FileSelection from '../../fields/FileSelection';
|
|
8
6
|
import DragAndDropBox from '../../fields/DragAndDropBox';
|
|
9
|
-
import { jsonFormsMaterialRenderers } from '../../../renders/jsonFormsRenders';
|
|
10
7
|
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";
|
|
11
9
|
const CredentialIssuanceWizardView = (props) => {
|
|
12
10
|
const { credentialData, credentialTypes, onSelectCredentialTypeChange, onCredentialFormDataChange } = props;
|
|
13
11
|
const [selectedCredentialType, setSelectedCredentialType] = useState(null);
|
|
@@ -19,7 +17,7 @@ const CredentialIssuanceWizardView = (props) => {
|
|
|
19
17
|
setSelectedCredentialType(value);
|
|
20
18
|
onSelectCredentialTypeChange?.(value);
|
|
21
19
|
};
|
|
22
|
-
const onCredentialFormInputChange = (state) => {
|
|
20
|
+
const onCredentialFormInputChange = async (state) => {
|
|
23
21
|
setCredentialInput(state);
|
|
24
22
|
onCredentialFormDataChange?.({ ...state, evidence });
|
|
25
23
|
};
|
|
@@ -38,6 +36,7 @@ const CredentialIssuanceWizardView = (props) => {
|
|
|
38
36
|
return evidence.map((file, index) => _jsx(FileSelection, { file: file, onRemove: async () => onRemoveEvidence(index) }, index));
|
|
39
37
|
};
|
|
40
38
|
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 &&
|
|
41
|
-
_jsxs(_Fragment, { children: [_jsx(FormContainer, { children:
|
|
39
|
+
_jsxs(_Fragment, { children: [_jsx(FormContainer, { children: (selectedCredentialType.schema && selectedCredentialType.uiSchema) &&
|
|
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()] })] }) })] })] }));
|
|
42
41
|
};
|
|
43
42
|
export default CredentialIssuanceWizardView;
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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;
|
|
@@ -6,12 +6,7 @@
|
|
|
6
6
|
border-color: #7276F7 !important;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.MuiInputLabel-root.MuiFormLabel-root {
|
|
10
|
-
color: #303030 !important;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
.MuiTypography-h6 {
|
|
14
|
-
color: #303030 !important;
|
|
15
10
|
font-size: 16px !important;
|
|
16
11
|
font-style: normal !important;
|
|
17
12
|
font-weight: 600 !important;
|
|
@@ -38,6 +33,7 @@
|
|
|
38
33
|
margin: 0 !important;
|
|
39
34
|
background-color: #FBFBFB !important;
|
|
40
35
|
box-shadow: none !important;
|
|
36
|
+
border-radius: 4px !important;
|
|
41
37
|
}
|
|
42
38
|
|
|
43
39
|
.MuiCardHeader-title {
|
|
@@ -46,7 +42,6 @@
|
|
|
46
42
|
font-style: normal !important;
|
|
47
43
|
font-weight: 400 !important;
|
|
48
44
|
margin-bottom: 10px !important;
|
|
49
|
-
color: #303030 !important;
|
|
50
45
|
}
|
|
51
46
|
|
|
52
47
|
.MuiGrid-root.MuiGrid-container.MuiGrid-direction-xs-column {
|
|
@@ -67,6 +62,7 @@
|
|
|
67
62
|
|
|
68
63
|
.MuiTypography-root {
|
|
69
64
|
font-family: 'Poppins', sans-serif !important;
|
|
65
|
+
color: #303030 !important;
|
|
70
66
|
}
|
|
71
67
|
|
|
72
68
|
.MuiDateCalendar-root {
|
|
@@ -85,3 +81,25 @@
|
|
|
85
81
|
.MuiButtonBase-root.MuiPickersDay-root.MuiPickersDay-dayWithMargin:hover {
|
|
86
82
|
background-color: #B7B8D9 !important;
|
|
87
83
|
}
|
|
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 IconButton from '../../../buttons/IconButton';
|
|
4
|
+
import PrimaryButton from '../../../buttons/PrimaryButton';
|
|
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(IconButton, { 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(IconButton, { icon: ButtonIcon.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), actions.map((action, index) => (_jsx(PrimaryButton, { 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 IconButton from './components/buttons/IconButton';
|
|
15
|
+
import PrimaryButton from './components/buttons/PrimaryButton';
|
|
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 SecondaryButton from './components/buttons/SecondaryButton';
|
|
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,9 +40,10 @@ 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';
|
|
43
44
|
import { Row } from '@tanstack/react-table';
|
|
44
45
|
export * from './styles/fonts';
|
|
45
46
|
export * from './types';
|
|
46
47
|
export * from './helpers';
|
|
47
48
|
export * from './utils';
|
|
48
|
-
export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel,
|
|
49
|
+
export { SSICredentialCardView, CredentialMiniCardView, CredentialMiniCardViewProps, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, IconButton, PrimaryButton, SecondaryButton, 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, FormView };
|
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 IconButton from './components/buttons/IconButton';
|
|
14
|
+
import PrimaryButton from './components/buttons/PrimaryButton';
|
|
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 SecondaryButton from './components/buttons/SecondaryButton';
|
|
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,8 +39,9 @@ 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';
|
|
42
43
|
export * from './styles/fonts';
|
|
43
44
|
export * from './types';
|
|
44
45
|
export * from './helpers';
|
|
45
46
|
export * from './utils';
|
|
46
|
-
export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel,
|
|
47
|
+
export { SSICredentialCardView, CredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, IconButton, PrimaryButton, SecondaryButton, 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, FormView };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IconButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PrimaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,13 +1,14 @@
|
|
|
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 PrimaryButtonContainerStyled = 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;
|
|
12
12
|
cursor: pointer;
|
|
13
|
+
width: 180px;
|
|
13
14
|
`;
|
|
@@ -5,4 +5,5 @@ 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>;
|
|
8
9
|
export declare const ProgressStepIndicatorStepLineStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
export const ProgressStepIndicatorContainerStyled = styled.div `
|
|
5
6
|
background-color: ${backgroundColors.primaryLight};
|
|
6
7
|
border-radius: 24px;
|
|
@@ -36,11 +37,20 @@ export const ProgressStepIndicatorSpacerLineCellStyled = styled.div `
|
|
|
36
37
|
`;
|
|
37
38
|
export const ProgressStepIndicatorTitleTextStyled = styled(SSITextH1SemiBoldStyled) `
|
|
38
39
|
word-break: break-word;
|
|
40
|
+
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
gap: 4px;
|
|
39
44
|
`;
|
|
40
45
|
export const ProgressStepIndicatorDescriptionTextStyled = styled(SSITextH3Styled) `
|
|
41
46
|
word-break: break-word;
|
|
42
47
|
color: ${fontColors.lightGrey};
|
|
43
48
|
`;
|
|
49
|
+
export const ProgressStepIndicatorOptionalTextStyled = styled.div `
|
|
50
|
+
${SSITextH2Css};
|
|
51
|
+
line-height: unset;
|
|
52
|
+
font-style: italic;
|
|
53
|
+
`;
|
|
44
54
|
export const ProgressStepIndicatorStepLineStyled = styled.div `
|
|
45
55
|
width: 4px;
|
|
46
56
|
display: flex;
|
|
@@ -2,15 +2,16 @@ 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 SecondaryButtonContainerStyled = 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;
|
|
13
13
|
cursor: pointer;
|
|
14
|
+
width: 180px;
|
|
14
15
|
|
|
15
16
|
&::before {
|
|
16
17
|
content: '';
|
|
@@ -27,6 +28,6 @@ export const SSISecondaryButtonContainerStyled = styled(SSIRoundedContainerStyle
|
|
|
27
28
|
mask-composite: exclude;
|
|
28
29
|
}
|
|
29
30
|
`;
|
|
30
|
-
export const
|
|
31
|
+
export const SecondaryButtonCaptionStyled = styled(SSITextH3Styled) ` // FIXME H3 vs H2 mobile
|
|
31
32
|
${gradient100TextCss}
|
|
32
33
|
`;
|
|
@@ -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 './PrimaryButton';
|
|
7
|
+
export * from './SecondaryButton';
|
|
8
|
+
export * from './IconButton';
|
|
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 './PrimaryButton';
|
|
7
|
+
export * from './SecondaryButton';
|
|
8
|
+
export * from './IconButton';
|
|
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 JSONFormState = 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.4+0c3e560",
|
|
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.4+0c3e560",
|
|
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": "0c3e560dd1878d1aa7a6074a7d2838816569a296"
|
|
63
63
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SSIIconButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SSIPrimaryButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|