@sphereon/ui-components.ssi-react 0.1.3-unstable.99 → 0.2.1-unstable.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/@config/toasts/index.d.ts +2 -3
- package/dist/components/assets/icons/{BitterballenIcon → CrossIcon}/index.d.ts +2 -2
- package/dist/components/assets/icons/CrossIcon/index.js +7 -0
- package/dist/components/assets/icons/DeleteIcon/index.d.ts +2 -1
- package/dist/components/assets/icons/DeleteIcon/index.js +2 -2
- package/dist/components/assets/icons/DocumentIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/DocumentIcon/index.js +7 -0
- package/dist/components/assets/icons/ImageIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/ImageIcon/index.js +7 -0
- package/dist/components/assets/icons/MeatBallsIcon/index.d.ts +9 -0
- package/dist/components/assets/icons/MeatBallsIcon/index.js +7 -0
- package/dist/components/assets/icons/SSIAddIcon/index.js +1 -1
- package/dist/components/assets/icons/SSIArrowDownIcon/index.js +1 -1
- package/dist/components/assets/icons/SSIFilterIcon/index.js +1 -1
- package/dist/components/assets/images/WarningImage/index.d.ts +8 -0
- package/dist/components/assets/images/WarningImage/index.js +6 -0
- package/dist/components/assets/placeholders/PersonPlaceholder/index.d.ts +9 -0
- package/dist/components/assets/placeholders/PersonPlaceholder/index.js +7 -0
- package/dist/components/buttons/SSIIconButton/index.d.ts +4 -3
- package/dist/components/buttons/SSIIconButton/index.js +8 -8
- package/dist/components/buttons/SSIPrimaryButton/index.js +1 -1
- package/dist/components/buttons/SSISecondaryButton/index.js +1 -1
- package/dist/components/fields/ComboBox/index.d.ts +21 -0
- package/dist/components/fields/ComboBox/index.js +51 -0
- package/dist/components/fields/DragAndDropBox/index.d.ts +8 -0
- package/dist/components/fields/DragAndDropBox/index.js +30 -0
- package/dist/components/fields/FileSelection/index.d.ts +12 -0
- package/dist/components/fields/FileSelection/index.js +33 -0
- package/dist/components/fields/JSONForms/PassportPhotoControl/index.d.ts +5 -0
- package/dist/components/fields/JSONForms/PassportPhotoControl/index.js +37 -0
- package/dist/components/fields/SSICheckbox/index.d.ts +2 -1
- package/dist/components/fields/SSICheckbox/index.js +2 -2
- package/dist/components/fields/TextInputField/index.d.ts +12 -0
- package/dist/components/fields/TextInputField/index.js +21 -0
- package/dist/components/lists/DropDownList/index.d.ts +10 -0
- package/dist/components/lists/DropDownList/index.js +34 -0
- package/dist/components/lists/DropDownListItem/index.d.ts +13 -0
- package/dist/components/lists/DropDownListItem/index.js +23 -0
- package/dist/components/views/CredentialIssuanceWizardView/index.d.ts +10 -0
- package/dist/components/views/CredentialIssuanceWizardView/index.js +43 -0
- package/dist/components/views/CredentialIssuanceWizardView/styles.css +87 -0
- package/dist/components/views/CredentialMiniCardView/index.js +1 -1
- package/dist/components/views/CredentialViewItem/index.d.ts +16 -0
- package/dist/components/views/CredentialViewItem/index.js +17 -0
- package/dist/components/views/JSONDataView/index.d.ts +8 -0
- package/dist/components/views/JSONDataView/index.js +85 -0
- package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
- package/dist/components/views/SSITableView/PaginationControls/index.d.ts +8 -0
- package/dist/components/views/SSITableView/PaginationControls/index.js +9 -0
- package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +1 -0
- package/dist/components/views/SSITableView/SSITableViewHeader/index.js +7 -5
- package/dist/components/views/SSITableView/index.d.ts +5 -2
- package/dist/components/views/SSITableView/index.js +76 -45
- package/dist/index.d.ts +18 -2
- package/dist/index.js +18 -2
- package/dist/renders/jsonFormsRenders.d.ts +2 -0
- package/dist/renders/jsonFormsRenders.js +6 -0
- package/dist/styles/components/components/CredentialIssuanceWizardView/index.d.ts +9 -0
- package/dist/styles/components/components/CredentialIssuanceWizardView/index.js +55 -0
- package/dist/styles/components/components/CredentialViewItem/index.d.ts +5 -0
- package/dist/styles/components/components/CredentialViewItem/index.js +28 -0
- package/dist/styles/components/components/DragAndDropBox/index.d.ts +4 -0
- package/dist/styles/components/components/DragAndDropBox/index.js +25 -0
- package/dist/styles/components/components/DropDownList/index.d.ts +3 -0
- package/dist/styles/components/components/DropDownList/index.js +21 -0
- package/dist/styles/components/components/DropDownListItem/index.d.ts +3 -0
- package/dist/styles/components/components/DropDownListItem/index.js +21 -0
- package/dist/styles/components/components/FileSelectionField/index.d.ts +10 -0
- package/dist/styles/components/components/FileSelectionField/index.js +64 -0
- package/dist/styles/components/components/JSONDataView/index.d.ts +7 -0
- package/dist/styles/components/components/JSONDataView/index.js +47 -0
- package/dist/styles/components/components/Pagination/index.d.ts +5 -0
- package/dist/styles/components/components/Pagination/index.js +71 -0
- package/dist/styles/components/components/PassportPhotoControl/index.d.ts +4 -0
- package/dist/styles/components/components/PassportPhotoControl/index.js +27 -0
- package/dist/styles/components/components/ProgressStepIndicator/index.js +1 -0
- package/dist/styles/components/components/SSICheckbox/index.js +2 -2
- package/dist/styles/components/components/SSICredentialCardView/index.js +1 -0
- package/dist/styles/components/components/SSIIconButton/index.js +4 -2
- package/dist/styles/components/components/SSIStatusLabel/index.js +1 -0
- package/dist/styles/components/components/SSITabView/index.js +1 -1
- package/dist/styles/components/components/SSITabViewHeader/index.d.ts +1 -0
- package/dist/styles/components/components/SSITabViewHeader/index.js +5 -0
- package/dist/styles/components/components/SSITableView/index.d.ts +5 -1
- package/dist/styles/components/components/SSITableView/index.js +21 -3
- package/dist/styles/components/components/SSITableViewHeader/index.d.ts +1 -0
- package/dist/styles/components/components/SSITableViewHeader/index.js +8 -0
- package/dist/styles/components/components/SSIToast/index.js +2 -2
- package/dist/styles/components/components/TextInputField/index.d.ts +2 -0
- package/dist/styles/components/components/TextInputField/index.js +27 -0
- package/dist/styles/components/components/buttons/index.d.ts +1 -0
- package/dist/styles/components/components/buttons/index.js +4 -0
- package/dist/styles/components/components/index.d.ts +11 -2
- package/dist/styles/components/components/index.js +11 -2
- package/dist/styles/css/index.d.ts +2 -0
- package/dist/styles/css/index.js +14 -0
- package/dist/styles/fonts/index.d.ts +1 -1
- package/dist/styles/fonts/index.js +23 -13
- package/dist/styles/typography.js +6 -0
- package/dist/types/button/index.d.ts +2 -1
- package/dist/types/field/index.d.ts +21 -0
- package/dist/types/field/index.js +10 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +2 -0
- package/dist/types/table/index.d.ts +24 -14
- package/dist/types/table/index.js +3 -0
- package/dist/types/view/index.d.ts +14 -0
- package/dist/types/view/index.js +1 -0
- package/dist/utils/FileUtils.d.ts +1 -0
- package/dist/utils/FileUtils.js +7 -0
- package/dist/utils/ImageUtils.d.ts +2 -0
- package/dist/utils/ImageUtils.js +12 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/package.json +25 -8
- package/dist/components/assets/icons/BitterballenIcon/index.js +0 -7
- package/dist/components/buttons/RowActionMenuButton/index.d.ts +0 -13
- package/dist/components/buttons/RowActionMenuButton/index.js +0 -28
- package/dist/components/lists/SSIDropDownList/index.d.ts +0 -7
- package/dist/components/lists/SSIDropDownList/index.js +0 -11
- package/dist/styles/components/components/RowActionMenuButton/index.d.ts +0 -4
- package/dist/styles/components/components/RowActionMenuButton/index.js +0 -27
- package/dist/styles/components/components/SSIDropDownList/index.d.ts +0 -2
- package/dist/styles/components/components/SSIDropDownList/index.js +0 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled from 'styled-components';
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
2
|
import { backgroundColors, borderColors, fontColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import { SSITextH2Css, SSITextH3Css } from '../../../css';
|
|
4
4
|
export const SSITableViewContainerStyled = styled.div `
|
|
@@ -17,13 +17,27 @@ export const SSITableViewTableContainerStyled = styled.table `
|
|
|
17
17
|
border-collapse: collapse;
|
|
18
18
|
background-color: ${backgroundColors.lightGrey};
|
|
19
19
|
`;
|
|
20
|
-
export const
|
|
20
|
+
export const SSITableViewHeaderRowContainerStyled = styled.tr `
|
|
21
21
|
border-bottom: 1px solid ${borderColors.lightGrey};
|
|
22
|
+
background-color: ${backgroundColors.primaryLight};
|
|
23
|
+
`;
|
|
24
|
+
export const SSITableViewRowContainerStyled = styled.tr `
|
|
25
|
+
background-color: ${backgroundColors.primaryLight};
|
|
26
|
+
|
|
27
|
+
&:not(:last-child) {
|
|
28
|
+
border-bottom: 1px solid ${borderColors.lightGrey};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
${props => props.enableHover &&
|
|
32
|
+
css `
|
|
33
|
+
&:hover {
|
|
34
|
+
background-color: #ececec; // TODO
|
|
35
|
+
}
|
|
36
|
+
`}
|
|
22
37
|
`;
|
|
23
38
|
export const SSITableViewCellContainerStyled = styled.td `
|
|
24
39
|
${SSITextH3Css};
|
|
25
40
|
color: ${fontColors.dark};
|
|
26
|
-
background-color: ${backgroundColors.primaryLight};
|
|
27
41
|
padding: 20px 16px 20px 16px;
|
|
28
42
|
text-align: left;
|
|
29
43
|
//setting border-box makes padding be included in the width, otherwise content-box is used and then padding is excluded from the width
|
|
@@ -43,3 +57,7 @@ export const SSITableViewResultCountCaptionStyled = styled.div `
|
|
|
43
57
|
${SSITextH3Css};
|
|
44
58
|
margin-left: 24px;
|
|
45
59
|
`;
|
|
60
|
+
export const TableViewRowSelectionCheckboxContainerStyled = styled.div `
|
|
61
|
+
width: 20px;
|
|
62
|
+
height: 20px;
|
|
63
|
+
`;
|
|
@@ -3,3 +3,4 @@ export declare const SSITableViewHeaderContentContainerStyled: import("styled-co
|
|
|
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
5
|
export declare const SSITableViewHeaderShowOptionContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const TableViewHeaderStaticActionsContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -27,3 +27,11 @@ export const SSITableViewHeaderShowOptionContainerStyled = styled.div `
|
|
|
27
27
|
text-align: left;
|
|
28
28
|
align-items: center;
|
|
29
29
|
`;
|
|
30
|
+
export const TableViewHeaderStaticActionsContainerStyled = styled.div `
|
|
31
|
+
height: 48px;
|
|
32
|
+
flex-grow: 1;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: 50px;
|
|
37
|
+
`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { alertColors } from '@sphereon/ui-components.core';
|
|
3
3
|
import { SSIFlexDirectionRowViewStyled, SSIRoundedContainerStyled } from '../../containers';
|
|
4
|
-
import {
|
|
4
|
+
import { SSITextH4Styled } from '../../../fonts';
|
|
5
5
|
export const SSIToastContainerStyled = styled(SSIRoundedContainerStyled) `
|
|
6
6
|
//TODO we need better width, use a max width and use content to scale
|
|
7
7
|
// 96.8%;
|
|
@@ -19,6 +19,6 @@ export const SSIToastTitleContainerStyled = styled(SSIFlexDirectionRowViewStyled
|
|
|
19
19
|
margin-bottom: 12px;
|
|
20
20
|
width: 100%;
|
|
21
21
|
`;
|
|
22
|
-
export const SSIToastMessageTextStyled = styled(
|
|
22
|
+
export const SSIToastMessageTextStyled = styled(SSITextH4Styled) `
|
|
23
23
|
width: 100%;
|
|
24
24
|
`;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { borderColors, fontColors } from '@sphereon/ui-components.core';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { SSITextH2Css } from '../../../css';
|
|
4
|
+
export const TextFieldInputContainerStyled = styled.div `
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
`;
|
|
8
|
+
export const TextFieldInputInputStyled = styled.input `
|
|
9
|
+
${SSITextH2Css};
|
|
10
|
+
color: ${fontColors.dark};
|
|
11
|
+
display: flex;
|
|
12
|
+
padding: 12px 16px;
|
|
13
|
+
align-items: center;
|
|
14
|
+
border-radius: 4px;
|
|
15
|
+
border: 1px solid ${borderColors.lightGrey};
|
|
16
|
+
outline: none;
|
|
17
|
+
background-color: unset;
|
|
18
|
+
font-family: Poppins, serif;
|
|
19
|
+
|
|
20
|
+
&:focus {
|
|
21
|
+
border-color: ${borderColors.purple};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:hover {
|
|
25
|
+
border-color: ${borderColors.purple};
|
|
26
|
+
}
|
|
27
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ButtonFlexRowStyled: import("styled-components").StyledComponent<"button", any, {}, never>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './buttons';
|
|
2
|
+
export * from './DropDownListItem';
|
|
2
3
|
export * from './SSICredentialCardView';
|
|
3
4
|
export * from './SSICredentialMiniCardView';
|
|
4
5
|
export * from './SSIStatusLabel';
|
|
5
6
|
export * from './SSIPrimaryButton';
|
|
6
7
|
export * from './SSISecondaryButton';
|
|
7
8
|
export * from './SSIIconButton';
|
|
8
|
-
export * from './
|
|
9
|
+
export * from './DropDownList';
|
|
9
10
|
export * from './SSITypeLabel';
|
|
10
11
|
export * from './SSITableViewHeader';
|
|
11
12
|
export * from './SSITableView';
|
|
@@ -18,3 +19,11 @@ export * from './SSIHoverText';
|
|
|
18
19
|
export * from './SSICheckbox';
|
|
19
20
|
export * from './ProgressStepIndicator';
|
|
20
21
|
export * from './StepMarker';
|
|
22
|
+
export * from './FileSelectionField';
|
|
23
|
+
export * from './DragAndDropBox';
|
|
24
|
+
export * from './PassportPhotoControl';
|
|
25
|
+
export * from './CredentialIssuanceWizardView';
|
|
26
|
+
export * from './Pagination';
|
|
27
|
+
export * from './CredentialViewItem';
|
|
28
|
+
export * from './JSONDataView';
|
|
29
|
+
export * from './TextInputField';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './buttons';
|
|
2
|
+
export * from './DropDownListItem';
|
|
2
3
|
export * from './SSICredentialCardView';
|
|
3
4
|
export * from './SSICredentialMiniCardView';
|
|
4
5
|
export * from './SSIStatusLabel';
|
|
5
6
|
export * from './SSIPrimaryButton';
|
|
6
7
|
export * from './SSISecondaryButton';
|
|
7
8
|
export * from './SSIIconButton';
|
|
8
|
-
export * from './
|
|
9
|
+
export * from './DropDownList';
|
|
9
10
|
export * from './SSITypeLabel';
|
|
10
11
|
export * from './SSITableViewHeader';
|
|
11
12
|
export * from './SSITableView';
|
|
@@ -18,3 +19,11 @@ export * from './SSIHoverText';
|
|
|
18
19
|
export * from './SSICheckbox';
|
|
19
20
|
export * from './ProgressStepIndicator';
|
|
20
21
|
export * from './StepMarker';
|
|
22
|
+
export * from './FileSelectionField';
|
|
23
|
+
export * from './DragAndDropBox';
|
|
24
|
+
export * from './PassportPhotoControl';
|
|
25
|
+
export * from './CredentialIssuanceWizardView';
|
|
26
|
+
export * from './Pagination';
|
|
27
|
+
export * from './CredentialViewItem';
|
|
28
|
+
export * from './JSONDataView';
|
|
29
|
+
export * from './TextInputField';
|
|
@@ -7,4 +7,6 @@ export declare const SSITextH4Css: import("styled-components").FlattenSimpleInte
|
|
|
7
7
|
export declare const SSITextH4SemiBoldCss: import("styled-components").FlattenSimpleInterpolation;
|
|
8
8
|
export declare const SSITextH5Css: import("styled-components").FlattenSimpleInterpolation;
|
|
9
9
|
export declare const SSITextH6Css: import("styled-components").FlattenSimpleInterpolation;
|
|
10
|
+
export declare const SSITextH7RegularCss: import("styled-components").FlattenSimpleInterpolation;
|
|
11
|
+
export declare const SSITextH7SemiBoldCss: import("styled-components").FlattenSimpleInterpolation;
|
|
10
12
|
export declare const gradient100TextCss: import("styled-components").FlattenSimpleInterpolation;
|
package/dist/styles/css/index.js
CHANGED
|
@@ -64,6 +64,20 @@ export const SSITextH6Css = css `
|
|
|
64
64
|
line-height: ${fontStyle.h6.lineHeight}px;
|
|
65
65
|
height: auto;
|
|
66
66
|
`;
|
|
67
|
+
export const SSITextH7RegularCss = css `
|
|
68
|
+
font-family: ${fontStyle.h7Regular.fontFamily};
|
|
69
|
+
font-size: ${fontStyle.h7Regular.fontSize}px;
|
|
70
|
+
font-weight: ${fontStyle.h7Regular.fontWeight};
|
|
71
|
+
line-height: ${fontStyle.h7Regular.lineHeight}px;
|
|
72
|
+
height: auto;
|
|
73
|
+
`;
|
|
74
|
+
export const SSITextH7SemiBoldCss = css `
|
|
75
|
+
font-family: ${fontStyle.h7SemiBold.fontFamily};
|
|
76
|
+
font-size: ${fontStyle.h7SemiBold.fontSize}px;
|
|
77
|
+
font-weight: ${fontStyle.h7SemiBold.fontWeight};
|
|
78
|
+
line-height: ${fontStyle.h7SemiBold.lineHeight}px;
|
|
79
|
+
height: auto;
|
|
80
|
+
`;
|
|
67
81
|
export const gradient100TextCss = css `
|
|
68
82
|
background: ${gradientColors['100']};
|
|
69
83
|
background-clip: text;
|
|
@@ -8,9 +8,9 @@ export declare const SSITextH3LightStyled: import("styled-components").StyledCom
|
|
|
8
8
|
export declare const SSITextH4Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
9
|
export declare const SSITextH4SemiBoldStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export declare const SSITextH4LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
11
|
-
export declare const SSITextH4DarkStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
12
11
|
export declare const SSITextH4SemiBoldLightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
13
12
|
export declare const SSITextH5Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
13
|
export declare const SSITextH5LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
15
14
|
export declare const SSITextH6Styled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
15
|
export declare const SSITextH6LightStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
16
|
+
export declare const SSITextH7RegularStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,51 +1,61 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
import { fontColors } from '@sphereon/ui-components.core';
|
|
3
|
-
import { SSITextH1Css, SSITextH1SemiBoldCss, SSITextH2Css, SSITextH2SemiBoldStyledCss, SSITextH3Css, SSITextH4Css, SSITextH4SemiBoldCss, SSITextH5Css, SSITextH6Css, } from '../css';
|
|
3
|
+
import { SSITextH1Css, SSITextH1SemiBoldCss, SSITextH2Css, SSITextH2SemiBoldStyledCss, SSITextH3Css, SSITextH4Css, SSITextH4SemiBoldCss, SSITextH5Css, SSITextH6Css, SSITextH7RegularCss, } from '../css';
|
|
4
4
|
export const SSITextH1Styled = styled.div `
|
|
5
|
-
${SSITextH1Css}
|
|
5
|
+
${SSITextH1Css};
|
|
6
|
+
color: ${fontColors.dark};
|
|
6
7
|
`;
|
|
7
8
|
export const SSITextH1SemiBoldStyled = styled.div `
|
|
8
|
-
${SSITextH1SemiBoldCss}
|
|
9
|
+
${SSITextH1SemiBoldCss};
|
|
10
|
+
color: ${fontColors.dark};
|
|
9
11
|
`;
|
|
10
12
|
export const SSITextH1SemiBoldLightStyled = styled(SSITextH1SemiBoldStyled) `
|
|
11
13
|
color: ${fontColors.light};
|
|
12
14
|
`;
|
|
13
15
|
export const SSITextH2Styled = styled.div `
|
|
14
|
-
${SSITextH2Css}
|
|
16
|
+
${SSITextH2Css};
|
|
17
|
+
color: ${fontColors.dark};
|
|
15
18
|
`;
|
|
16
19
|
export const SSITextH2SemiBoldStyled = styled.div `
|
|
17
|
-
${SSITextH2SemiBoldStyledCss}
|
|
20
|
+
${SSITextH2SemiBoldStyledCss};
|
|
21
|
+
color: ${fontColors.dark};
|
|
18
22
|
`;
|
|
19
23
|
export const SSITextH3Styled = styled.div `
|
|
20
|
-
${SSITextH3Css}
|
|
24
|
+
${SSITextH3Css};
|
|
25
|
+
color: ${fontColors.dark};
|
|
21
26
|
`;
|
|
22
27
|
export const SSITextH3LightStyled = styled(SSITextH3Styled) `
|
|
23
28
|
color: ${fontColors.light};
|
|
24
29
|
`;
|
|
25
30
|
export const SSITextH4Styled = styled.div `
|
|
26
|
-
${SSITextH4Css}
|
|
31
|
+
${SSITextH4Css};
|
|
32
|
+
color: ${fontColors.dark};
|
|
27
33
|
`;
|
|
28
34
|
export const SSITextH4SemiBoldStyled = styled.div `
|
|
29
|
-
${SSITextH4SemiBoldCss}
|
|
35
|
+
${SSITextH4SemiBoldCss};
|
|
36
|
+
color: ${fontColors.dark};
|
|
30
37
|
`;
|
|
31
38
|
export const SSITextH4LightStyled = styled(SSITextH4Styled) `
|
|
32
39
|
color: ${fontColors.light};
|
|
33
40
|
`;
|
|
34
|
-
export const SSITextH4DarkStyled = styled(SSITextH4Styled) `
|
|
35
|
-
color: ${fontColors.dark};
|
|
36
|
-
`;
|
|
37
41
|
export const SSITextH4SemiBoldLightStyled = styled(SSITextH4SemiBoldStyled) `
|
|
38
42
|
color: ${fontColors.light};
|
|
39
43
|
`;
|
|
40
44
|
export const SSITextH5Styled = styled.div `
|
|
41
|
-
${SSITextH5Css}
|
|
45
|
+
${SSITextH5Css};
|
|
46
|
+
color: ${fontColors.dark};
|
|
42
47
|
`;
|
|
43
48
|
export const SSITextH5LightStyled = styled(SSITextH5Styled) `
|
|
44
49
|
color: ${fontColors.light};
|
|
45
50
|
`;
|
|
46
51
|
export const SSITextH6Styled = styled.div `
|
|
47
|
-
${SSITextH6Css}
|
|
52
|
+
${SSITextH6Css};
|
|
53
|
+
color: ${fontColors.dark};
|
|
48
54
|
`;
|
|
49
55
|
export const SSITextH6LightStyled = styled(SSITextH6Styled) `
|
|
50
56
|
color: ${fontColors.light};
|
|
51
57
|
`;
|
|
58
|
+
export const SSITextH7RegularStyled = styled.div `
|
|
59
|
+
${SSITextH7RegularCss};
|
|
60
|
+
color: ${fontColors.dark};
|
|
61
|
+
`;
|
|
@@ -72,6 +72,12 @@ export const fontStyle = {
|
|
|
72
72
|
fontWeight: fontWeight[400],
|
|
73
73
|
lineHeight: lineHeight[100],
|
|
74
74
|
},
|
|
75
|
+
h7Regular: {
|
|
76
|
+
fontFamily: 'Poppins',
|
|
77
|
+
fontSize: fontSize[400],
|
|
78
|
+
fontWeight: fontWeight[400],
|
|
79
|
+
lineHeight: lineHeight[400],
|
|
80
|
+
},
|
|
75
81
|
h7SemiBold: {
|
|
76
82
|
fontFamily: 'Poppins',
|
|
77
83
|
fontSize: fontSize[400],
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum AssetFilePermission {
|
|
2
|
+
PUBLIC = "public",
|
|
3
|
+
PRIVATE = "private"
|
|
4
|
+
}
|
|
5
|
+
export type ValueSelection = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum FileSelectionFieldType {
|
|
10
|
+
FILE = "file",
|
|
11
|
+
IMAGE = "image"
|
|
12
|
+
}
|
|
13
|
+
export type PassportPhoto = {
|
|
14
|
+
file: File;
|
|
15
|
+
base64Uri: string;
|
|
16
|
+
};
|
|
17
|
+
export type PassportPhotoControlData = {
|
|
18
|
+
fileName: string;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
base64Uri: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var AssetFilePermission;
|
|
2
|
+
(function (AssetFilePermission) {
|
|
3
|
+
AssetFilePermission["PUBLIC"] = "public";
|
|
4
|
+
AssetFilePermission["PRIVATE"] = "private";
|
|
5
|
+
})(AssetFilePermission || (AssetFilePermission = {}));
|
|
6
|
+
export var FileSelectionFieldType;
|
|
7
|
+
(function (FileSelectionFieldType) {
|
|
8
|
+
FileSelectionFieldType["FILE"] = "file";
|
|
9
|
+
FileSelectionFieldType["IMAGE"] = "image";
|
|
10
|
+
})(FileSelectionFieldType || (FileSelectionFieldType = {}));
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
import { AccessorFn, DeepKeys } from '@tanstack/react-table';
|
|
2
|
-
import {
|
|
2
|
+
import { Button } from '../button';
|
|
3
|
+
import { ValueSelection } from '../field';
|
|
3
4
|
export declare enum TableCellType {
|
|
4
5
|
TEXT = "text",
|
|
5
6
|
LABEL = "label",
|
|
6
7
|
STATUS = "status",
|
|
7
|
-
CREDENTIAL_CARD = "credentialCard"
|
|
8
|
+
CREDENTIAL_CARD = "credentialCard",
|
|
9
|
+
CREDENTIAL_DETAILS = "credentialDetails",
|
|
10
|
+
ACTIONS = "actions",
|
|
11
|
+
COMBOBOX = "combobox"
|
|
8
12
|
}
|
|
9
13
|
export type ColumnHeader<T> = {
|
|
10
14
|
accessor: AccessorFn<T> | DeepKeys<T>;
|
|
11
15
|
type: TableCellType;
|
|
12
16
|
label?: string;
|
|
13
|
-
|
|
17
|
+
columnOptions?: TableColumnOptions;
|
|
14
18
|
};
|
|
15
|
-
export type
|
|
16
|
-
truncationLength?: number;
|
|
17
|
-
enableHover?: boolean;
|
|
19
|
+
export type TableColumnOptions = {
|
|
18
20
|
columnMinWidth?: number;
|
|
19
21
|
columnMaxWidth?: number;
|
|
20
22
|
columnWidth?: number;
|
|
23
|
+
cellOptions?: TableCellOptions;
|
|
24
|
+
};
|
|
25
|
+
export type TableCellOptions = TextCellOptions | ComboboxCellOptions | ActionsCellOptions;
|
|
26
|
+
export type TableRowSelection = {
|
|
27
|
+
rowId: string;
|
|
28
|
+
rowData: any;
|
|
29
|
+
};
|
|
30
|
+
export type TextCellOptions = {
|
|
31
|
+
truncationLength?: number;
|
|
32
|
+
enableHover?: boolean;
|
|
21
33
|
};
|
|
22
|
-
export type
|
|
23
|
-
|
|
24
|
-
|
|
34
|
+
export type ComboboxCellOptions = {
|
|
35
|
+
selectOptions?: Array<ValueSelection>;
|
|
36
|
+
defaultValue?: ValueSelection;
|
|
37
|
+
onChange?: (value: ValueSelection) => Promise<void>;
|
|
25
38
|
};
|
|
26
|
-
export type
|
|
27
|
-
|
|
28
|
-
onClick: (rowData: any) => Promise<void>;
|
|
29
|
-
icon?: ButtonIcon;
|
|
30
|
-
disabled?: boolean;
|
|
39
|
+
export type ActionsCellOptions = {
|
|
40
|
+
actions: Array<Button>;
|
|
31
41
|
};
|
|
@@ -4,4 +4,7 @@ export var TableCellType;
|
|
|
4
4
|
TableCellType["LABEL"] = "label";
|
|
5
5
|
TableCellType["STATUS"] = "status";
|
|
6
6
|
TableCellType["CREDENTIAL_CARD"] = "credentialCard";
|
|
7
|
+
TableCellType["CREDENTIAL_DETAILS"] = "credentialDetails";
|
|
8
|
+
TableCellType["ACTIONS"] = "actions";
|
|
9
|
+
TableCellType["COMBOBOX"] = "combobox";
|
|
7
10
|
})(TableCellType || (TableCellType = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JsonFormsCore, JsonSchema, UISchemaElement } from '@jsonforms/core';
|
|
2
|
+
import { ErrorObject } from 'ajv';
|
|
3
|
+
export type CredentialFormInput = Pick<JsonFormsCore, 'data' | 'errors'>;
|
|
4
|
+
export type CredentialFormData = {
|
|
5
|
+
data?: any;
|
|
6
|
+
errors?: ErrorObject[];
|
|
7
|
+
evidence: Array<File>;
|
|
8
|
+
};
|
|
9
|
+
export type CredentialFormSelectionType = {
|
|
10
|
+
label: string;
|
|
11
|
+
schema?: JsonSchema;
|
|
12
|
+
uiSchema?: UISchemaElement;
|
|
13
|
+
credentialType: Array<string>;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const base64UriToFile: (base64Uri: string, filename: string, mimeType: string) => File;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { fromString } from 'uint8arrays';
|
|
2
|
+
export const base64UriToFile = (base64Uri, filename, mimeType) => {
|
|
3
|
+
const base64 = base64Uri.split(',')[1];
|
|
4
|
+
const uint8Array = fromString(base64, 'base64');
|
|
5
|
+
const blob = new Blob([uint8Array]);
|
|
6
|
+
return new File([blob], filename, { type: mimeType });
|
|
7
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const getImageSize = (uri) => {
|
|
2
|
+
return new Promise((resolve, reject) => {
|
|
3
|
+
const img = new Image();
|
|
4
|
+
img.onload = () => {
|
|
5
|
+
resolve({ width: img.width, height: img.height });
|
|
6
|
+
};
|
|
7
|
+
img.onerror = (error) => {
|
|
8
|
+
reject(error);
|
|
9
|
+
};
|
|
10
|
+
img.src = uri;
|
|
11
|
+
});
|
|
12
|
+
};
|
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
|
|
4
|
+
"version": "0.2.1-unstable.2+4c8020a",
|
|
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>",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"Self-sovereign identity (SSI)"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
16
|
+
"build": "tsc && pnpm run copy-css",
|
|
17
|
+
"copy-css": "cpy src/**/*.css dist --parents",
|
|
17
18
|
"build:clean": "tsc --build --clean && tsc --build"
|
|
18
19
|
},
|
|
19
20
|
"source": "src/index.ts",
|
|
@@ -28,19 +29,35 @@
|
|
|
28
29
|
"access": "public"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"@
|
|
32
|
+
"@emotion/react": "^11.11.4",
|
|
33
|
+
"@emotion/styled": "^11.11.0",
|
|
34
|
+
"@jsonforms/core": "^3.2.1",
|
|
35
|
+
"@jsonforms/material-renderers": "^3.2.1",
|
|
36
|
+
"@jsonforms/react": "^3.2.1",
|
|
37
|
+
"@jsonforms/vanilla-renderers": "^3.2.1",
|
|
38
|
+
"@mui/icons-material": "^5.15.11",
|
|
39
|
+
"@mui/material": "^5.15.12",
|
|
40
|
+
"@mui/styled-engine-sc": "^5.14.12",
|
|
41
|
+
"@mui/system": "^5.15.12",
|
|
42
|
+
"@mui/x-date-pickers": "^6.19.5",
|
|
43
|
+
"@sphereon/ui-components.core": "0.2.1-unstable.2+4c8020a",
|
|
32
44
|
"@tanstack/react-table": "^8.9.3",
|
|
33
|
-
"react-
|
|
45
|
+
"react-json-tree": "^0.18.0",
|
|
46
|
+
"react-loader-spinner": "5.4.5",
|
|
47
|
+
"react-select": "^5.8.0",
|
|
34
48
|
"react-toastify": "^9.1.3",
|
|
35
|
-
"styled-components": "^5.3.3"
|
|
49
|
+
"styled-components": "^5.3.3",
|
|
50
|
+
"uint8arrays": "^3.1.1"
|
|
36
51
|
},
|
|
37
52
|
"devDependencies": {
|
|
38
|
-
"@types/react": "~18.
|
|
53
|
+
"@types/react": "~18.2.67",
|
|
39
54
|
"@types/styled-components": "^5.1.15",
|
|
55
|
+
"ajv": "^8.12.0",
|
|
56
|
+
"cpy-cli": "^5.0.0",
|
|
40
57
|
"typescript": "4.9.5"
|
|
41
58
|
},
|
|
42
59
|
"peerDependencies": {
|
|
43
|
-
"react": ">=
|
|
60
|
+
"react": ">= 18"
|
|
44
61
|
},
|
|
45
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "4c8020a435287a10dca85c22eac2a8841a9ad6ed"
|
|
46
63
|
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { fontColors } from '@sphereon/ui-components.core';
|
|
3
|
-
const BitterballenIcon = (props) => {
|
|
4
|
-
const { size = 42, color = fontColors.dark, style } = props;
|
|
5
|
-
return (_jsx("div", { style: { ...style, width: size, aspectRatio: 1, display: 'flex' }, children: _jsxs("svg", { width: "42", height: "43", viewBox: "0 0 42 43", fill: color, xmlns: "http://www.w3.org/2000/svg", children: [_jsx("circle", { cx: "13", cy: "21.5", r: "2", fill: "#303030" }), _jsx("circle", { cx: "21", cy: "21.5", r: "2", fill: "#303030" }), _jsx("circle", { cx: "29", cy: "21.5", r: "2", fill: "#303030" })] }) }));
|
|
6
|
-
};
|
|
7
|
-
export default BitterballenIcon;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, FC } from 'react';
|
|
2
|
-
import { ButtonIcon } from '@sphereon/ui-components.core';
|
|
3
|
-
import { ActionButton } from '../../../index';
|
|
4
|
-
import { Row } from '@tanstack/react-table';
|
|
5
|
-
type Props = {
|
|
6
|
-
actions: ActionButton[];
|
|
7
|
-
icon: ButtonIcon;
|
|
8
|
-
color?: string;
|
|
9
|
-
style?: CSSProperties;
|
|
10
|
-
rowData?: Row<any>;
|
|
11
|
-
};
|
|
12
|
-
declare const RowActionMenuButton: FC<Props>;
|
|
13
|
-
export default RowActionMenuButton;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useEffect, useRef } from 'react';
|
|
3
|
-
import { ButtonIcon } from '@sphereon/ui-components.core';
|
|
4
|
-
import { SSIIconButton } from '../../../index';
|
|
5
|
-
import { RowActionMenuButtonContainerStyled as ButtonContainer, RowActionDropdownContainerStyled as DropdownContainer, ActionItemContainerStyled as ActionItemContainer, ActionItemCaptionStyled as ItemCaption, } from '../../../styles';
|
|
6
|
-
const RowActionMenuButton = ({ actions, icon, color, style = {}, rowData }) => {
|
|
7
|
-
const [isDropdownVisible, setIsDropdownVisible] = useState(false);
|
|
8
|
-
const dropdownRef = useRef(null);
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
const handleClickOutside = (event) => {
|
|
11
|
-
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
12
|
-
setIsDropdownVisible(false);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
document.addEventListener('mousedown', handleClickOutside);
|
|
16
|
-
return () => {
|
|
17
|
-
document.removeEventListener('mousedown', handleClickOutside);
|
|
18
|
-
};
|
|
19
|
-
}, [dropdownRef]);
|
|
20
|
-
const toggleDropdown = async () => {
|
|
21
|
-
setIsDropdownVisible(!isDropdownVisible);
|
|
22
|
-
};
|
|
23
|
-
const renderDropdown = () => {
|
|
24
|
-
return (_jsx(DropdownContainer, { ref: dropdownRef, style: { display: isDropdownVisible ? 'block' : 'none' }, children: actions.map((action, index) => (_jsxs(ActionItemContainer, { onClick: () => action.onClick(rowData), children: [_jsx(ItemCaption, { style: { marginLeft: '10px' }, children: action.caption }), action.icon && _jsx(SSIIconButton, { onClick: () => action.onClick(rowData), icon: action.icon })] }, index))) }));
|
|
25
|
-
};
|
|
26
|
-
return (_jsxs(ButtonContainer, { style: { ...style }, children: [_jsx(SSIIconButton, { icon: icon || ButtonIcon.BITTERBALLEN, color: color, onClick: toggleDropdown }), renderDropdown()] }));
|
|
27
|
-
};
|
|
28
|
-
export default RowActionMenuButton;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ButtonIcon } from '@sphereon/ui-components.core';
|
|
4
|
-
import SSIIconButton from '../../buttons/SSIIconButton';
|
|
5
|
-
import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles';
|
|
6
|
-
const SSIDropDownList = (props) => {
|
|
7
|
-
const { initialValue, label } = props;
|
|
8
|
-
const [value, setValue] = React.useState(initialValue);
|
|
9
|
-
return (_jsxs(Container, { children: [label && _jsx(LabelCaption, { children: label }), _jsx(SelectedValue, { children: value }), _jsx(SSIIconButton, { icon: ButtonIcon.ARROW_DOWN, onClick: async () => console.log('drop down clicked') })] }));
|
|
10
|
-
};
|
|
11
|
-
export default SSIDropDownList;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare const RowActionMenuButtonContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const ActionItemContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export declare const ActionItemCaptionStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
|
-
export declare const RowActionDropdownContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|