@sphereon/ui-components.ssi-react 0.1.3-unstable.15 → 0.1.3-unstable.23
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/fields/SSICheckbox/index.d.ts +15 -0
- package/dist/components/fields/SSICheckbox/index.js +24 -0
- package/dist/components/views/SSILoaderView/index.d.ts +23 -0
- package/dist/components/views/SSILoaderView/index.js +14 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/styles/components/components/SSICheckbox/index.d.ts +4 -0
- package/dist/styles/components/components/SSICheckbox/index.js +25 -0
- package/dist/styles/components/components/SSILoaderView/index.d.ts +2 -0
- package/dist/styles/components/components/SSILoaderView/index.js +8 -0
- package/dist/styles/components/components/index.d.ts +2 -0
- package/dist/styles/components/components/index.js +2 -0
- package/dist/styles/components/containers/index.d.ts +2 -0
- package/dist/styles/components/containers/index.js +8 -1
- package/dist/styles/components/fonts/index.d.ts +1 -0
- package/dist/styles/components/fonts/index.js +4 -0
- package/package.json +4 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export interface IProps {
|
|
3
|
+
onValueChange?: (isChecked: boolean) => Promise<void>;
|
|
4
|
+
initialValue?: boolean;
|
|
5
|
+
isChecked?: boolean;
|
|
6
|
+
label?: string | ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
borderColor?: string;
|
|
10
|
+
selectedColor?: string;
|
|
11
|
+
labelColor?: string;
|
|
12
|
+
checkmarkColor?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const SSICheckbox: FC<IProps>;
|
|
15
|
+
export default SSICheckbox;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { OpacityStyleEnum, fontColors, selectionElements } from '@sphereon/ui-components.core';
|
|
4
|
+
import { SSICheckboxContainerStyled as Container, SSICheckboxLabelContainerStyled as LabelCaption, SSICheckboxSelectedContainerStyled as SelectedContainer, SSICheckboxUnselectedContainerStyled as UnselectedContainer, } from '../../../styles/components';
|
|
5
|
+
const SSICheckbox = (props) => {
|
|
6
|
+
const { backgroundColor, borderColor = selectionElements.primaryBorderDark, disabled = false, initialValue = false, label, selectedColor = selectionElements.primaryDark, labelColor = fontColors.light, checkmarkColor = fontColors.dark } = props;
|
|
7
|
+
const [isChecked, setChecked] = React.useState(initialValue);
|
|
8
|
+
const value = props.isChecked !== undefined ? props.isChecked : isChecked;
|
|
9
|
+
const onValueChange = async () => {
|
|
10
|
+
const { onValueChange } = props;
|
|
11
|
+
if (disabled) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
if (onValueChange) {
|
|
15
|
+
await onValueChange(!isChecked);
|
|
16
|
+
}
|
|
17
|
+
setChecked(!isChecked);
|
|
18
|
+
};
|
|
19
|
+
return (_jsxs(Container, { onClick: onValueChange, style: { ...(disabled && { opacity: OpacityStyleEnum.DISABLED }) }, children: [value ? (_jsx(SelectedContainer, { style: { backgroundColor: selectedColor, border: `1px solid ${borderColor}` } })) : (_jsx(UnselectedContainer, { style: { backgroundColor, border: `1px solid ${borderColor}` } })), label &&
|
|
20
|
+
(typeof label === 'string'
|
|
21
|
+
? _jsx(LabelCaption, { style: { color: labelColor }, children: label })
|
|
22
|
+
: label)] }));
|
|
23
|
+
};
|
|
24
|
+
export default SSICheckbox;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface SSILoaderScreenProps {
|
|
3
|
+
ariaLabel?: string;
|
|
4
|
+
height?: number;
|
|
5
|
+
color?: string;
|
|
6
|
+
secondaryColor?: string;
|
|
7
|
+
strokeWidth?: number;
|
|
8
|
+
strokeWidthSecondary?: number;
|
|
9
|
+
timeout?: number;
|
|
10
|
+
visible?: boolean;
|
|
11
|
+
width?: number;
|
|
12
|
+
wrapperStyle?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
wrapperClass?: string;
|
|
16
|
+
message?: string;
|
|
17
|
+
callback: (state?: any) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export default class SSILoaderView extends React.Component<SSILoaderScreenProps, any> {
|
|
20
|
+
componentDidMount(): void;
|
|
21
|
+
render(): JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { SSIBasicHorizontalCenterContainerStyled as Container, SSILoadingScreenActivityCaptionStyled as ActivityCaption, SSILoadingScreenActivityIndicatorContainerStyled as ActivityIndicatorContainer } from '../../../styles/components';
|
|
4
|
+
import { Oval } from "react-loader-spinner";
|
|
5
|
+
export default class SSILoaderView extends React.Component {
|
|
6
|
+
componentDidMount() {
|
|
7
|
+
setTimeout(async (state) => {
|
|
8
|
+
await this.props.callback(state);
|
|
9
|
+
}, this.props.timeout ?? 0);
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (_jsx(_Fragment, { children: _jsxs(Container, { children: [_jsx(ActivityIndicatorContainer, { children: _jsx(Oval, { ...this.props }) }), _jsx(ActivityCaption, { children: this.props.message })] }) }));
|
|
13
|
+
}
|
|
14
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ import SSITabView from './components/views/SSITabView';
|
|
|
18
18
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
19
19
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
20
20
|
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
21
|
+
import SSICheckbox from './components/fields/SSICheckbox';
|
|
22
|
+
import SSILoaderView from "./components/views/SSILoaderView";
|
|
21
23
|
export * from './types';
|
|
22
24
|
export * from './styles/components/fonts';
|
|
23
|
-
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
|
|
25
|
+
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSICheckbox, SSILoaderView };
|
package/dist/index.js
CHANGED
|
@@ -18,6 +18,8 @@ import SSITabView from './components/views/SSITabView';
|
|
|
18
18
|
import SSITabViewHeader from './components/views/SSITabView/SSITabViewHeader';
|
|
19
19
|
import SSIProfileIcon from './components/assets/icons/SSIProfileIcon';
|
|
20
20
|
import SSISecondaryButton from './components/buttons/SSISecondaryButton';
|
|
21
|
+
import SSICheckbox from './components/fields/SSICheckbox';
|
|
22
|
+
import SSILoaderView from "./components/views/SSILoaderView";
|
|
21
23
|
export * from './types';
|
|
22
24
|
export * from './styles/components/fonts';
|
|
23
|
-
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, };
|
|
25
|
+
export { SSICredentialCardView, SSICredentialMiniCardView, SSIStatusLabel, SSICheckmarkBadge, SSIExclamationMarkBadge, SSIPlaceholderLogo, SSILogo, SSIAddIcon, SSIFilterIcon, SSIArrowDownIcon, SSITypeLabel, SSIIconButton, SSIPrimaryButton, SSISecondaryButton, SSIDropDownList, SSITableView, SSITableViewHeader, SSITabView, SSITabViewHeader, SSIProfileIcon, SSICheckbox, SSILoaderView };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SSICheckboxContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
+
export declare const SSICheckboxUnselectedContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
+
export declare const SSICheckboxSelectedContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
|
+
export declare const SSICheckboxLabelContainerStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { SSITextH4LightStyled } from '../../fonts';
|
|
3
|
+
import { SSIFlexDirectionRowViewStyled } from '../../containers';
|
|
4
|
+
export const SSICheckboxContainerStyled = styled(SSIFlexDirectionRowViewStyled) `
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
`;
|
|
9
|
+
export const SSICheckboxUnselectedContainerStyled = styled.div `
|
|
10
|
+
width: 18px;
|
|
11
|
+
aspect-ratio: 1;
|
|
12
|
+
border-radius: 4px;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
`;
|
|
15
|
+
export const SSICheckboxSelectedContainerStyled = styled.div `
|
|
16
|
+
width: 18px;
|
|
17
|
+
aspect-ratio: 1;
|
|
18
|
+
border-radius: 4px;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
`;
|
|
22
|
+
export const SSICheckboxLabelContainerStyled = styled(SSITextH4LightStyled) `
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { SSITextH2SemiBoldLightStyled } from "../../fonts";
|
|
3
|
+
export const SSILoadingScreenActivityIndicatorContainerStyled = styled.div `
|
|
4
|
+
margin-top: 282px;
|
|
5
|
+
`;
|
|
6
|
+
export const SSILoadingScreenActivityCaptionStyled = styled(SSITextH2SemiBoldLightStyled) `
|
|
7
|
+
margin-top: 69px;
|
|
8
|
+
`;
|
|
@@ -2,3 +2,5 @@ export declare const SSIFlexDirectionRowViewStyled: import("styled-components").
|
|
|
2
2
|
export declare const SSIFlexDirectionColumnViewStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const SSIAlphaContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const SSIRoundedContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const SSIBasicContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
+
export declare const SSIBasicHorizontalCenterContainerStyled: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
import { SSIRoundedEdgesCss } from '@sphereon/ui-components.core';
|
|
2
|
+
import { SSIBackgroundPrimaryDarkColorCss, SSIRoundedEdgesCss } from '@sphereon/ui-components.core';
|
|
3
3
|
export const SSIFlexDirectionRowViewStyled = styled.div `
|
|
4
4
|
display: flex;
|
|
5
5
|
flex-direction: row;
|
|
@@ -16,3 +16,10 @@ export const SSIRoundedContainerStyled = styled.div `
|
|
|
16
16
|
${SSIRoundedEdgesCss};
|
|
17
17
|
overflow: hidden;
|
|
18
18
|
`;
|
|
19
|
+
export const SSIBasicContainerStyled = styled.div `
|
|
20
|
+
flex: 1;
|
|
21
|
+
${SSIBackgroundPrimaryDarkColorCss};
|
|
22
|
+
`;
|
|
23
|
+
export const SSIBasicHorizontalCenterContainerStyled = styled(SSIBasicContainerStyled) `
|
|
24
|
+
align-items: center;
|
|
25
|
+
`;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const SSITextH1Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
2
2
|
export declare const SSITextH2Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
|
+
export declare const SSITextH2SemiBoldLightStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
3
4
|
export declare const SSITextH3Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
4
5
|
export declare const SSITextH3LightStyled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
5
6
|
export declare const SSITextH4Styled: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -7,6 +7,10 @@ export const SSITextH1Styled = styled.span `
|
|
|
7
7
|
export const SSITextH2Styled = styled.span `
|
|
8
8
|
${SSITextH2Css}
|
|
9
9
|
`;
|
|
10
|
+
export const SSITextH2SemiBoldLightStyled = styled(SSITextH2Styled) `
|
|
11
|
+
font-weight: 600;
|
|
12
|
+
color: ${fontColors.light}
|
|
13
|
+
`;
|
|
10
14
|
export const SSITextH3Styled = styled.span `
|
|
11
15
|
${SSITextH3Css}
|
|
12
16
|
`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ui-components.ssi-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.3-unstable.
|
|
4
|
+
"version": "0.1.3-unstable.23+4405bfe",
|
|
5
5
|
"description": "SSI UI components for React",
|
|
6
6
|
"repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
|
|
7
7
|
"author": "Sphereon <dev@sphereon.com>",
|
|
@@ -28,8 +28,9 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@sphereon/ui-components.core": "0.1.3-unstable.
|
|
31
|
+
"@sphereon/ui-components.core": "0.1.3-unstable.23+4405bfe",
|
|
32
32
|
"@tanstack/react-table": "^8.9.3",
|
|
33
|
+
"react-loader-spinner": "^5.4.5",
|
|
33
34
|
"styled-components": "^5.3.3"
|
|
34
35
|
},
|
|
35
36
|
"devDependencies": {
|
|
@@ -40,5 +41,5 @@
|
|
|
40
41
|
"peerDependencies": {
|
|
41
42
|
"react": ">= 16.8.0"
|
|
42
43
|
},
|
|
43
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "4405bfecf4002b54ea2aab365c16a509a5ac3766"
|
|
44
45
|
}
|