@sphereon/ui-components.ssi-react 0.1.3-unstable.7 → 0.1.3-unstable.70

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.
Files changed (93) hide show
  1. package/dist/@config/toasts/index.d.ts +7 -0
  2. package/dist/@config/toasts/index.js +13 -0
  3. package/dist/components/assets/badges/SSICheckmarkBadge/index.js +1 -1
  4. package/dist/components/assets/badges/SSIExclamationMarkBadge/index.js +1 -1
  5. package/dist/components/assets/icons/SSIAddIcon/index.d.ts +3 -3
  6. package/dist/components/assets/icons/SSIArrowDownIcon/index.d.ts +3 -3
  7. package/dist/components/assets/icons/SSIFilterIcon/index.d.ts +3 -3
  8. package/dist/components/assets/icons/SSIProfileIcon/index.d.ts +1 -1
  9. package/dist/components/assets/icons/SSIProfileIcon/index.js +1 -2
  10. package/dist/components/assets/logos/SSILogo/index.d.ts +1 -1
  11. package/dist/components/assets/logos/SSILogo/index.js +1 -1
  12. package/dist/components/buttons/SSIIconButton/index.d.ts +3 -3
  13. package/dist/components/buttons/SSIIconButton/index.js +5 -6
  14. package/dist/components/buttons/SSIPrimaryButton/index.d.ts +3 -3
  15. package/dist/components/buttons/SSIPrimaryButton/index.js +3 -4
  16. package/dist/components/buttons/SSISecondaryButton/index.d.ts +3 -3
  17. package/dist/components/buttons/SSISecondaryButton/index.js +3 -4
  18. package/dist/components/fields/SSICheckbox/index.d.ts +15 -0
  19. package/dist/components/fields/SSICheckbox/index.js +21 -0
  20. package/dist/components/fields/SSIHoverText/index.d.ts +8 -0
  21. package/dist/components/fields/SSIHoverText/index.js +8 -0
  22. package/dist/components/indicators/SSIActivityIndicator/index.d.ts +10 -0
  23. package/dist/components/indicators/SSIActivityIndicator/index.js +8 -0
  24. package/dist/components/labels/SSIStatusLabel/index.d.ts +1 -1
  25. package/dist/components/labels/SSIStatusLabel/index.js +1 -1
  26. package/dist/components/labels/SSITypeLabel/index.d.ts +3 -3
  27. package/dist/components/labels/SSITypeLabel/index.js +4 -5
  28. package/dist/components/lists/SSIDropDownList/index.d.ts +1 -1
  29. package/dist/components/lists/SSIDropDownList/index.js +3 -3
  30. package/dist/components/messageBoxes/toasts/SSIToast/index.d.ts +11 -0
  31. package/dist/components/messageBoxes/toasts/SSIToast/index.js +20 -0
  32. package/dist/components/messageBoxes/toasts/SSIToastContainer/index.d.ts +10 -0
  33. package/dist/components/messageBoxes/toasts/SSIToastContainer/index.js +7 -0
  34. package/dist/components/views/{SSICardView → SSICredentialCardView}/index.d.ts +2 -2
  35. package/dist/components/views/SSICredentialCardView/index.js +24 -0
  36. package/dist/components/views/{SSIMiniCardView → SSICredentialMiniCardView}/index.d.ts +2 -2
  37. package/dist/components/views/{SSIMiniCardView → SSICredentialMiniCardView}/index.js +5 -5
  38. package/dist/components/views/SSITabView/SSITabViewHeader/index.d.ts +2 -2
  39. package/dist/components/views/SSITabView/SSITabViewHeader/index.js +1 -1
  40. package/dist/components/views/SSITabView/index.d.ts +2 -2
  41. package/dist/components/views/SSITabView/index.js +1 -1
  42. package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +1 -1
  43. package/dist/components/views/SSITableView/SSITableViewHeader/index.js +3 -5
  44. package/dist/components/views/SSITableView/index.d.ts +1 -1
  45. package/dist/components/views/SSITableView/index.js +18 -15
  46. package/dist/helpers/index.d.ts +1 -0
  47. package/dist/helpers/index.js +1 -0
  48. package/dist/helpers/toastHelper.d.ts +3 -0
  49. package/dist/helpers/toastHelper.js +14 -0
  50. package/dist/index.d.ts +10 -4
  51. package/dist/index.js +9 -4
  52. package/dist/styles/components/components/SSICheckbox/index.d.ts +4 -0
  53. package/dist/styles/components/components/SSICheckbox/index.js +25 -0
  54. package/dist/styles/components/components/SSICredentialCardView/index.d.ts +13 -0
  55. package/dist/styles/components/components/SSICredentialCardView/index.js +58 -0
  56. package/dist/styles/components/components/SSICredentialMiniCardView/index.d.ts +2 -0
  57. package/dist/styles/components/components/SSICredentialMiniCardView/index.js +14 -0
  58. package/dist/styles/components/components/SSIHoverText/index.d.ts +3 -0
  59. package/dist/styles/components/components/{SSIText → SSIHoverText}/index.js +5 -5
  60. package/dist/styles/components/components/SSISecondaryButton/index.js +3 -5
  61. package/dist/styles/components/components/SSIStatusLabel/index.js +1 -0
  62. package/dist/styles/components/components/SSITabView/index.js +1 -1
  63. package/dist/styles/components/components/SSIToast/index.d.ts +4 -0
  64. package/dist/styles/components/components/SSIToast/index.js +24 -0
  65. package/dist/styles/components/components/SSIToastContainer/index.d.ts +2 -0
  66. package/dist/styles/components/components/SSIToastContainer/index.js +314 -0
  67. package/dist/styles/components/components/index.d.ts +7 -2
  68. package/dist/styles/components/components/index.js +7 -2
  69. package/dist/styles/components/fonts/index.d.ts +2 -0
  70. package/dist/styles/components/fonts/index.js +7 -1
  71. package/dist/styles/css/index.d.ts +1 -0
  72. package/dist/styles/css/index.js +7 -0
  73. package/dist/styles/index.d.ts +3 -0
  74. package/dist/styles/index.js +3 -0
  75. package/dist/types/button/index.d.ts +7 -0
  76. package/dist/types/button/index.js +1 -0
  77. package/dist/types/component/index.d.ts +0 -38
  78. package/dist/types/component/index.js +1 -16
  79. package/dist/types/index.d.ts +3 -1
  80. package/dist/types/index.js +3 -1
  81. package/dist/types/table/index.d.ts +16 -0
  82. package/dist/types/table/index.js +6 -0
  83. package/dist/types/toast/index.d.ts +6 -0
  84. package/dist/types/toast/index.js +1 -0
  85. package/package.json +5 -3
  86. package/dist/components/labels/SSIText/index.d.ts +0 -7
  87. package/dist/components/labels/SSIText/index.js +0 -13
  88. package/dist/components/views/SSICardView/index.js +0 -24
  89. package/dist/styles/components/components/SSICardView/index.d.ts +0 -13
  90. package/dist/styles/components/components/SSICardView/index.js +0 -59
  91. package/dist/styles/components/components/SSIMiniCardView/index.d.ts +0 -1
  92. package/dist/styles/components/components/SSIMiniCardView/index.js +0 -10
  93. package/dist/styles/components/components/SSIText/index.d.ts +0 -3
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ToastCustomProps } from '@sphereon/ui-components.core';
3
+ import { ToastConfigParams } from '../../types';
4
+ export declare const toastConfig: {
5
+ ssiToastSuccess: (params: ToastConfigParams<ToastCustomProps>) => JSX.Element;
6
+ ssiToastError: (params: ToastConfigParams<ToastCustomProps>) => JSX.Element;
7
+ };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ToastType } from '@sphereon/ui-components.core';
3
+ import SSIToast from '../../components/messageBoxes/toasts/SSIToast';
4
+ export const toastConfig = {
5
+ ssiToastSuccess: (params) => {
6
+ const { title, message, onClick, props } = params;
7
+ return _jsx(SSIToast, { type: ToastType.SUCCESS, title: title, message: message, showBadge: props?.showBadge, onClick: onClick });
8
+ },
9
+ ssiToastError: (params) => {
10
+ const { title, message, onClick, props } = params;
11
+ return _jsx(SSIToast, { type: ToastType.ERROR, title: title, message: message, showBadge: props?.showBadge, onClick: onClick });
12
+ },
13
+ };
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { fontColors, statusColors } from '@sphereon/ui-components.core';
3
3
  const SSICheckmarkBadge = (props) => {
4
4
  const { size = 15, color = fontColors.light, backgroundColor = statusColors.valid } = props;
5
- return (_jsx("div", { style: { width: size, aspectRatio: 1 }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 15 15", fill: "none", children: [_jsx("circle", { cx: "7.5", cy: "7.5", r: "7.5", fill: backgroundColor }), _jsx("path", { d: "M5.91233 11.0361H5.9092C5.84998 11.0357 5.79144 11.0236 5.73697 11.0005C5.6825 10.9774 5.63319 10.9437 5.59192 10.9015L3.13412 8.38546C3.09155 8.34399 3.05776 8.29447 3.03473 8.23981C3.0117 8.18516 2.99989 8.12647 3 8.06722C3.00011 8.00796 3.01214 7.94932 3.03538 7.89475C3.05862 7.84018 3.09259 7.79079 3.13531 7.74947C3.17803 7.70815 3.22863 7.67575 3.28412 7.65417C3.33962 7.63259 3.3989 7.62226 3.45847 7.6238C3.51804 7.62534 3.5767 7.63871 3.63099 7.66312C3.68529 7.68754 3.73413 7.72251 3.77463 7.76597L5.91665 9.95833L10.9927 4.91088C11.077 4.82993 11.1898 4.78514 11.307 4.78615C11.4242 4.78716 11.5363 4.8339 11.6191 4.91629C11.702 4.99869 11.749 5.11015 11.75 5.22667C11.751 5.34319 11.706 5.45544 11.6246 5.53926L6.22827 10.9059C6.14448 10.9893 6.03084 11.0361 5.91233 11.0361Z", fill: color })] }) }));
5
+ return (_jsx("div", { style: { width: size, height: size }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 15 15", fill: "none", children: [_jsx("circle", { cx: "7.5", cy: "7.5", r: "7.5", fill: backgroundColor }), _jsx("path", { d: "M5.91233 11.0361H5.9092C5.84998 11.0357 5.79144 11.0236 5.73697 11.0005C5.6825 10.9774 5.63319 10.9437 5.59192 10.9015L3.13412 8.38546C3.09155 8.34399 3.05776 8.29447 3.03473 8.23981C3.0117 8.18516 2.99989 8.12647 3 8.06722C3.00011 8.00796 3.01214 7.94932 3.03538 7.89475C3.05862 7.84018 3.09259 7.79079 3.13531 7.74947C3.17803 7.70815 3.22863 7.67575 3.28412 7.65417C3.33962 7.63259 3.3989 7.62226 3.45847 7.6238C3.51804 7.62534 3.5767 7.63871 3.63099 7.66312C3.68529 7.68754 3.73413 7.72251 3.77463 7.76597L5.91665 9.95833L10.9927 4.91088C11.077 4.82993 11.1898 4.78514 11.307 4.78615C11.4242 4.78716 11.5363 4.8339 11.6191 4.91629C11.702 4.99869 11.749 5.11015 11.75 5.22667C11.751 5.34319 11.706 5.45544 11.6246 5.53926L6.22827 10.9059C6.14448 10.9893 6.03084 11.0361 5.91233 11.0361Z", fill: color })] }) }));
6
6
  };
7
7
  export default SSICheckmarkBadge;
@@ -2,6 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { fontColors, statusColors } from '@sphereon/ui-components.core';
3
3
  const SSIExclamationMarkBadge = (props) => {
4
4
  const { size = 15, color = fontColors.light, backgroundColor = statusColors.error } = props;
5
- return (_jsx("div", { style: { width: size, aspectRatio: 1 }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 15 15", fill: "none", children: [_jsx("circle", { cx: "7.5", cy: "7.5", r: "7.5", fill: backgroundColor }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.78571 3.48218C6.78571 3.33429 6.94559 3.21429 7.14279 3.21429H7.8572C8.05439 3.21429 8.21428 3.33429 8.21428 3.48218V9.37504C8.21428 9.52293 8.05439 9.64283 7.8572 9.64283H7.14279C6.94559 9.64283 6.78571 9.52292 6.78571 9.37504V3.48218ZM6.78571 10.9822C6.78571 10.8342 6.94559 10.7143 7.14279 10.7143H7.8572C8.05439 10.7143 8.21428 10.8342 8.21428 10.9822V11.5178C8.21428 11.6657 8.05439 11.7857 7.8572 11.7857H7.14279C6.94559 11.7857 6.78571 11.6657 6.78571 11.5178V10.9822Z", fill: color })] }) }));
5
+ return (_jsx("div", { style: { width: size, height: size }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 15 15", fill: "none", children: [_jsx("circle", { cx: "7.5", cy: "7.5", r: "7.5", fill: backgroundColor }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.78571 3.48218C6.78571 3.33429 6.94559 3.21429 7.14279 3.21429H7.8572C8.05439 3.21429 8.21428 3.33429 8.21428 3.48218V9.37504C8.21428 9.52293 8.05439 9.64283 7.8572 9.64283H7.14279C6.94559 9.64283 6.78571 9.52292 6.78571 9.37504V3.48218ZM6.78571 10.9822C6.78571 10.8342 6.94559 10.7143 7.14279 10.7143H7.8572C8.05439 10.7143 8.21428 10.8342 8.21428 10.9822V11.5178C8.21428 11.6657 8.05439 11.7857 7.8572 11.7857H7.14279C6.94559 11.7857 6.78571 11.6657 6.78571 11.5178V10.9822Z", fill: color })] }) }));
6
6
  };
7
7
  export default SSIExclamationMarkBadge;
@@ -1,8 +1,8 @@
1
1
  import { CSSProperties, FC } from 'react';
2
- export interface IProps {
2
+ type Props = {
3
3
  size?: number;
4
4
  color?: string;
5
5
  style?: CSSProperties;
6
- }
7
- declare const SSIAddIcon: FC<IProps>;
6
+ };
7
+ declare const SSIAddIcon: FC<Props>;
8
8
  export default SSIAddIcon;
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties, FC } from 'react';
2
- export interface IProps {
2
+ type Props = {
3
3
  width?: number;
4
4
  height?: number;
5
5
  color?: string;
6
6
  style?: CSSProperties;
7
- }
8
- declare const SSIArrowDownIcon: FC<IProps>;
7
+ };
8
+ declare const SSIArrowDownIcon: FC<Props>;
9
9
  export default SSIArrowDownIcon;
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties, FC } from 'react';
2
- export interface IProps {
2
+ type Props = {
3
3
  width?: number;
4
4
  height?: number;
5
5
  color?: string;
6
6
  style?: CSSProperties;
7
- }
8
- declare const SSIFilterIcon: FC<IProps>;
7
+ };
8
+ declare const SSIFilterIcon: FC<Props>;
9
9
  export default SSIFilterIcon;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- export type Props = {
2
+ type Props = {
3
3
  fullName: string;
4
4
  fontColor?: string;
5
5
  backgroundColor?: string;
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { fontColors, getInitials, profileColors } from '@sphereon/ui-components.core';
3
- import { SSIProfileIconContainerStyled as Container } from '../../../../styles/components/components/SSIProfileIcon';
4
- import { SSITextH2Styled as ProfileIconText } from '../../../../styles/components';
3
+ import { SSIProfileIconContainerStyled as Container, SSITextH2Styled as ProfileIconText } from '../../../../styles';
5
4
  const ProfileIcon = (props) => {
6
5
  const { fontColor = fontColors.light, backgroundColor = profileColors['100'], fullName } = props;
7
6
  return (_jsx(Container, { style: { backgroundColor }, children: _jsx(ProfileIconText, { style: { color: fontColor }, children: getInitials(fullName) }) }));
@@ -1,5 +1,5 @@
1
- import { ImageAttributes } from '@sphereon/ui-components.core';
2
1
  import { CSSProperties, FC } from 'react';
2
+ import { ImageAttributes } from '@sphereon/ui-components.core';
3
3
  type Props = {
4
4
  logo?: ImageAttributes;
5
5
  size?: number;
@@ -5,7 +5,7 @@ const SSILogo = (props) => {
5
5
  const { logo, color = logoColors.default, size = 32, style } = props;
6
6
  return logo ? (_jsx("div", { style: {
7
7
  ...style,
8
- aspectRatio: logo?.dimensions && calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height),
8
+ ...(logo?.dimensions && { aspectRatio: calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height) }),
9
9
  height: size,
10
10
  background: `url(${logo.uri})`,
11
11
  backgroundSize: 'cover',
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { ButtonIconsEnum } from '../../../types';
3
- export type Props = {
4
- icon: ButtonIconsEnum;
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ type Props = {
4
+ icon: ButtonIcon;
5
5
  onClick: () => Promise<void>;
6
6
  disabled?: boolean;
7
7
  color?: string;
@@ -1,21 +1,20 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
2
3
  import SSIAddIcon from '../../assets/icons/SSIAddIcon';
3
4
  import SSIFilterIcon from '../../assets/icons/SSIFilterIcon';
4
5
  import SSIArrowDownIcon from '../../assets/icons/SSIArrowDownIcon';
5
- import { ButtonIconsEnum } from '../../../types';
6
- import { SSIIconButtonContainerStyled as Container } from '../../../styles/components';
7
- import { fontColors } from '@sphereon/ui-components.core';
6
+ import { SSIIconButtonContainerStyled as Container } from '../../../styles';
8
7
  const SSIIconButton = (props) => {
9
8
  const { icon, onClick, disabled = false, color = fontColors.dark } = props;
10
9
  return _jsx(Container, { onClick: onClick, children: getIcon(icon, color) });
11
10
  };
12
11
  const getIcon = (icon, color) => {
13
12
  switch (icon) {
14
- case ButtonIconsEnum.ADD:
13
+ case ButtonIcon.ADD:
15
14
  return _jsx(SSIAddIcon, { color: color });
16
- case ButtonIconsEnum.FILTER:
15
+ case ButtonIcon.FILTER:
17
16
  return _jsx(SSIFilterIcon, { color: color });
18
- case ButtonIconsEnum.ARROW_DOWN:
17
+ case ButtonIcon.ARROW_DOWN:
19
18
  return _jsx(SSIArrowDownIcon, { color: color });
20
19
  default:
21
20
  return _jsx("div", {});
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties, FC } from 'react';
2
- import { ButtonIconsEnum } from '../../../types';
3
- export type Props = {
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ type Props = {
4
4
  caption: string;
5
5
  onClick: () => Promise<void>;
6
- icon?: ButtonIconsEnum;
6
+ icon?: ButtonIcon;
7
7
  disabled?: boolean;
8
8
  style?: CSSProperties;
9
9
  };
@@ -1,13 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { fontColors } from '@sphereon/ui-components.core';
2
+ import { ButtonIcon, fontColors } from '@sphereon/ui-components.core';
3
3
  import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
- import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles/components';
5
- import { ButtonIconsEnum } from '../../../types';
4
+ import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles';
6
5
  const SSIPrimaryButton = (props) => {
7
6
  const { caption, icon, onClick, disabled = false, style = {} } = props;
8
7
  const getIcon = (icon, color) => {
9
8
  switch (icon) {
10
- case ButtonIconsEnum.ADD:
9
+ case ButtonIcon.ADD:
11
10
  return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
12
11
  default:
13
12
  return _jsx("div", {});
@@ -1,9 +1,9 @@
1
1
  import { CSSProperties, FC } from 'react';
2
- import { ButtonIconsEnum } from '../../../types';
3
- export type Props = {
2
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
+ type Props = {
4
4
  caption: string;
5
5
  onClick: () => Promise<void>;
6
- icon?: ButtonIconsEnum;
6
+ icon?: ButtonIcon;
7
7
  disabled?: boolean;
8
8
  style?: CSSProperties;
9
9
  };
@@ -1,13 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { gradientColors } from '@sphereon/ui-components.core';
2
+ import { ButtonIcon, gradientColors } from '@sphereon/ui-components.core';
3
3
  import SSIAddIcon from '../../assets/icons/SSIAddIcon';
4
- import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container, } from '../../../styles/components';
5
- import { ButtonIconsEnum } from '../../../types';
4
+ import { SSISecondaryButtonCaptionStyled as Caption, SSISecondaryButtonContainerStyled as Container } from '../../../styles';
6
5
  const SSISecondaryButton = (props) => {
7
6
  const { caption, icon, onClick, disabled = false, style = {} } = props;
8
7
  const getIcon = (icon, color) => {
9
8
  switch (icon) {
10
- case ButtonIconsEnum.ADD:
9
+ case ButtonIcon.ADD:
11
10
  return _jsx(SSIAddIcon, { style: { ...(disabled && { opacity: 0.5 }) }, color: color });
12
11
  default:
13
12
  return _jsx("div", {});
@@ -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,21 @@
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 && (typeof label === 'string' ? _jsx(LabelCaption, { style: { color: labelColor }, children: label }) : label)] }));
20
+ };
21
+ export default SSICheckbox;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export type Props = {
3
+ text: string;
4
+ truncationLength?: number;
5
+ enableHover?: boolean;
6
+ };
7
+ declare const SSIHoverText: FC<Props>;
8
+ export default SSIHoverText;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { SSIHoverTextTextStyled as Text, SSIHoverTextContainerStyled as Container, SSIHoverTextTextHoverStyled as TextHover, } from '../../../styles/components';
3
+ const SSIHoverText = (props) => {
4
+ const { text, truncationLength, enableHover = true } = props;
5
+ const value = truncationLength ? text.substring(0, truncationLength) : text;
6
+ return (_jsxs(Container, { children: [_jsx(Text, { children: value }), enableHover && _jsx(TextHover, { children: text })] }));
7
+ };
8
+ export default SSIHoverText;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ interface Props {
3
+ size?: string | number;
4
+ color?: string;
5
+ style?: {
6
+ [key: string]: string;
7
+ };
8
+ }
9
+ declare const SSIActivityIndicator: FC<Props>;
10
+ export default SSIActivityIndicator;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Oval } from 'react-loader-spinner';
3
+ import { elements } from '@sphereon/ui-components.core';
4
+ const SSIActivityIndicator = (props) => {
5
+ const { size = 80, color = elements.blue, style } = props;
6
+ return (_jsx(Oval, { width: size, height: size, color: color, secondaryColor: color, strokeWidth: 5, strokeWidthSecondary: 5, visible: true, wrapperStyle: style }));
7
+ };
8
+ export default SSIActivityIndicator;
@@ -1,5 +1,5 @@
1
- import { LabelStatus } from '@sphereon/ui-components.core';
2
1
  import { CSSProperties, FC } from 'react';
2
+ import { LabelStatus } from '@sphereon/ui-components.core';
3
3
  type Props = {
4
4
  status: LabelStatus;
5
5
  showIcon?: boolean;
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CredentialStatus, IssuerStatus, statusColors, getStatusTranslation } from '@sphereon/ui-components.core';
3
- import { SSIStatusLabelBadgeContainer as BadgeContainer, SSIStatusLabelContainerStyled as Container, SSIStatusLabelStatusCaptionStyled as StatusCaption, } from '../../../styles/components';
4
3
  import SSICheckmarkBadge from '../../../components/assets/badges/SSICheckmarkBadge';
5
4
  import SSIExclamationMarkBadge from '../../../components/assets/badges/SSIExclamationMarkBadge';
5
+ import { SSIStatusLabelBadgeContainer as BadgeContainer, SSIStatusLabelContainerStyled as Container, SSIStatusLabelStatusCaptionStyled as StatusCaption, } from '../../../styles';
6
6
  const SSIStatusLabel = (props) => {
7
7
  const { status, color = statusColors[status], style, showIcon = false } = props;
8
8
  return (_jsxs(Container, { style: { ...style, borderColor: color }, children: [showIcon && _jsx(BadgeContainer, { children: getStatusBadge(status, color) }), _jsx(StatusCaption, { style: { color }, children: getStatusTranslation(status) })] }));
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { LabelTypeEnum } from '../../../types';
3
- export type Props = {
4
- type: LabelTypeEnum;
2
+ import { LabelType } from '@sphereon/ui-components.core';
3
+ type Props = {
4
+ type: LabelType;
5
5
  };
6
6
  declare const SSITypeLabel: FC<Props>;
7
7
  export default SSITypeLabel;
@@ -1,12 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { LabelTypeEnum } from '../../../types';
3
- import { SSITypeLabelContainerStyled as Container } from '../../../styles/components';
4
- import { backgroundColors, gradientColors } from '@sphereon/ui-components.core';
2
+ import { backgroundColors, gradientColors, LabelType } from '@sphereon/ui-components.core';
3
+ import { SSITypeLabelContainerStyled as Container } from '../../../styles';
5
4
  const getBackground = (type) => {
6
5
  switch (type) {
7
- case LabelTypeEnum.ISSUER:
6
+ case LabelType.ISSUER:
8
7
  return gradientColors['200'];
9
- case LabelTypeEnum.VERIFIER:
8
+ case LabelType.VERIFIER:
10
9
  return gradientColors['100'];
11
10
  default:
12
11
  return backgroundColors.primaryLight;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- export type Props = {
2
+ type Props = {
3
3
  initialValue: string;
4
4
  label?: string;
5
5
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { ButtonIcon } from '@sphereon/ui-components.core';
3
4
  import SSIIconButton from '../../buttons/SSIIconButton';
4
- import { ButtonIconsEnum } from '../../../types';
5
- import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles/components';
5
+ import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles';
6
6
  const SSIDropDownList = (props) => {
7
7
  const { initialValue, label } = props;
8
8
  const [value, setValue] = React.useState(initialValue);
9
- return (_jsxs(Container, { children: [label && _jsx(LabelCaption, { children: label }), _jsx(SelectedValue, { children: value }), _jsx(SSIIconButton, { icon: ButtonIconsEnum.ARROW_DOWN, onClick: async () => console.log('drop down clicked') })] }));
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
10
  };
11
11
  export default SSIDropDownList;
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+ import { ToastType } from '@sphereon/ui-components.core';
3
+ type Props = {
4
+ type: ToastType;
5
+ title?: string;
6
+ message?: string;
7
+ showBadge?: boolean;
8
+ onClick?: () => Promise<void>;
9
+ };
10
+ declare const SSIToast: FC<Props>;
11
+ export default SSIToast;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ToastType } from '@sphereon/ui-components.core';
3
+ import SSICheckmarkBadge from '../../../assets/badges/SSICheckmarkBadge';
4
+ import SSIExclamationMarkBadge from '../../../assets/badges/SSIExclamationMarkBadge';
5
+ import { SSIToastContainerStyled as Container, SSIToastMessageTextStyled as MessageText, SSIFlexDirectionRowViewStyled as MessageContainer, SSITextH2SemiBoldStyled as TitleText, SSIToastTitleContainerStyled as TitleContainer, SSIToastBadgeContainerStyled as ToastBadgeContainer, } from '../../../../styles';
6
+ const getBadge = (type) => {
7
+ switch (type) {
8
+ case ToastType.SUCCESS:
9
+ return _jsx(SSICheckmarkBadge, {});
10
+ case ToastType.ERROR:
11
+ return _jsx(SSIExclamationMarkBadge, {});
12
+ default:
13
+ return _jsx("div", {});
14
+ }
15
+ };
16
+ const SSIToast = (props) => {
17
+ const { type, title, message, showBadge = true, onClick } = props;
18
+ return (_jsxs(Container, { onClick: onClick, children: [title && (_jsxs(TitleContainer, { children: [showBadge && _jsx(ToastBadgeContainer, { children: getBadge(type) }), _jsx(TitleText, { children: title })] })), _jsxs(MessageContainer, { children: [!title && showBadge && _jsx(ToastBadgeContainer, { children: getBadge(type) }), message && _jsx(MessageText, { style: { ...(showBadge && { textAlign: 'center' }) }, children: message })] })] }));
19
+ };
20
+ export default SSIToast;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ToastPosition } from 'react-toastify';
3
+ type Props = {
4
+ autoHide?: boolean;
5
+ visibilityTimeMs?: number;
6
+ position?: ToastPosition;
7
+ pauseOnHover?: boolean;
8
+ };
9
+ declare const SSIToastContainer: FC<Props>;
10
+ export default SSIToastContainer;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { SSIToastContainerContainerStyled as Container } from '../../../../styles';
3
+ const SSIToastContainer = (props) => {
4
+ const { position = 'top-right', autoHide = true, visibilityTimeMs = 6000, pauseOnHover = true } = props;
5
+ return (_jsx(Container, { position: position, autoClose: !autoHide ? autoHide : visibilityTimeMs, hideProgressBar: true, closeButton: false, pauseOnHover: pauseOnHover }));
6
+ };
7
+ export default SSIToastContainer;
@@ -28,5 +28,5 @@ type Props = {
28
28
  footer?: CardFooter;
29
29
  display?: CardDisplay;
30
30
  };
31
- declare const SSICardView: FC<Props>;
32
- export default SSICardView;
31
+ declare const SSICredentialCardView: FC<Props>;
32
+ export default SSICredentialCardView;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { backgroundColors, credentialCardColors, Localization, toLocalDateString, } from '@sphereon/ui-components.core';
3
+ import SSILogo from '../../assets/logos/SSILogo';
4
+ import SSIStatusLabel from '../../labels/SSIStatusLabel';
5
+ import { SSIAlphaContainerStyled as AlphaContainer, SSICredentialCardViewContainerStyled as Container, SSICredentialCardViewBackgroundImageStyled as BackgroundImage, SSICredentialCardViewContentMainContainerStyled as ContentMainContainer, SSICredentialCardViewContentSubContainerStyled as ContentSubContainer, SSICredentialCardViewStatusContainerStyled as StatusContainer, SSICredentialCardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICredentialCardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICredentialCardViewFooterContainerStyled as FooterContainer, SSITextH4LightStyled as H4Text, SSICredentialCardViewHeaderContainerStyled as HeaderContainer, SSICredentialCardViewContentIssueNameContainerStyled as IssueNameContainer, SSICredentialCardViewHeaderLogoContainerStyled as LogoContainer, SSICredentialCardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICredentialCardViewHeaderTitleContainerStyled as TitleContainer, SSIFlexDirectionColumnViewStyled as PropertyContainer, } from '../../../styles';
6
+ const SSICredentialCardView = (props) => {
7
+ const { header, body, footer } = props;
8
+ const { credentialTitle, credentialSubtitle, logo } = props.header ?? {};
9
+ const { issuerName, properties } = props.body ?? {};
10
+ const { credentialStatus, expirationDate } = props.footer ?? {};
11
+ const { backgroundColor = credentialCardColors.default, backgroundImage, textColor = backgroundColors.primaryLight } = props.display ?? {};
12
+ const getPropertyElementsFrom = (properties) => {
13
+ return properties.slice(0, 2).map((property, index) => (_jsxs(PropertyContainer, { style: {
14
+ ...(properties.length > 1 && { width: 140 }),
15
+ ...(index > 0 && { marginLeft: 10 }),
16
+ }, children: [_jsx(H4Text, { style: { color: textColor }, children: property.name }), _jsx(PropertyValueText, { style: { color: textColor }, children: property.value })] }, index)));
17
+ };
18
+ return (_jsx(Container, { style: { backgroundColor }, children: _jsx(BackgroundImage, { style: {
19
+ ...(backgroundImage?.uri && { background: `url(${backgroundImage.uri})`, backgroundSize: 'cover' }),
20
+ }, children: _jsxs(AlphaContainer, { children: [header && (_jsxs(HeaderContainer, { children: [(!backgroundImage || logo) && (_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) })), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, { style: { color: textColor }, children: credentialTitle }), credentialSubtitle && _jsx(CredentialSubtitleText, { style: { color: textColor }, children: credentialSubtitle })] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, { style: { color: textColor }, children: issuerName }) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [_jsx(ExpirationDateText, { style: { color: textColor }, children: expirationDate
21
+ ? `${Localization.translate('credential_card_expires_message')} ${toLocalDateString(expirationDate)}`
22
+ : Localization.translate('credential_status_never_expires_date_label') }), credentialStatus && (_jsx(StatusContainer, { children: credentialStatus && _jsx(SSIStatusLabel, { status: credentialStatus, color: textColor }) }))] }))] }) }) }));
23
+ };
24
+ export default SSICredentialCardView;
@@ -7,5 +7,5 @@ type Props = {
7
7
  logoColor?: string;
8
8
  style?: CSSProperties;
9
9
  };
10
- declare const SSIMiniCardView: FC<Props>;
11
- export default SSIMiniCardView;
10
+ declare const SSICredentialMiniCardView: FC<Props>;
11
+ export default SSICredentialMiniCardView;
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { credentialCardColors } from '@sphereon/ui-components.core';
3
- import { SSIMiniCardViewContainerStyled as Container } from '../../../styles/components';
4
3
  import SSILogo from '../../assets/logos/SSILogo';
5
- const SSIMiniCardView = (props) => {
4
+ import { SSICredentialMiniCardViewContainerStyled as Container, SSICredentialMiniCardViewBackgroundImageStyled as BackgroundImage, } from '../../../styles';
5
+ const SSICredentialMiniCardView = (props) => {
6
6
  const { backgroundColor = credentialCardColors.default, backgroundImage, logo, logoColor, style } = props;
7
- return (_jsx(Container, { style: { ...style, backgroundColor }, children: _jsx("div", { style: {
7
+ return (_jsx(Container, { style: { ...style, backgroundColor }, children: _jsx(BackgroundImage, { style: {
8
8
  ...(backgroundImage?.uri && { background: `url(${backgroundImage.uri})`, backgroundSize: 'cover' }),
9
- }, children: _jsx(SSILogo, { logo: logo, color: logoColor }) }) }));
9
+ }, children: (!backgroundImage || logo) && _jsx(SSILogo, { logo: logo, color: logoColor }) }) }));
10
10
  };
11
- export default SSIMiniCardView;
11
+ export default SSICredentialMiniCardView;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { TabNavigationState } from '../../../../types';
3
- export type Props = {
2
+ import { TabNavigationState } from '@sphereon/ui-components.core';
3
+ type Props = {
4
4
  navigationState: TabNavigationState;
5
5
  onIndexChange: (index: number) => void;
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITextH3Styled as TitleCaption, } from '../../../../styles/components';
2
+ import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITextH3Styled as TitleCaption, } from '../../../../styles';
3
3
  const SSITabViewHeader = (props) => {
4
4
  const { navigationState, onIndexChange } = props;
5
5
  return (_jsx(Container, { children: navigationState.routes.map((value, index) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import { TabViewRoute } from '../../../types';
3
- export type Props = {
2
+ import { TabViewRoute } from '@sphereon/ui-components.core';
3
+ type Props = {
4
4
  routes: Array<TabViewRoute>;
5
5
  };
6
6
  declare const SSITabView: React.FC<Props>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import SSITabViewHeader from './SSITabViewHeader';
4
- import { SSITabViewContainerStyled as Container } from '../../../styles/components';
4
+ import { SSITabViewContainerStyled as Container } from '../../../styles';
5
5
  const Tab = (props) => {
6
6
  return _jsx(React.Fragment, { children: props.children });
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Button } from '../../../../types';
3
- export type Props = {
3
+ type Props = {
4
4
  enableFiltering?: boolean;
5
5
  enableMostRecent?: boolean;
6
6
  actions?: Array<Button>;
@@ -1,13 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Localization } from '@sphereon/ui-components.core';
2
+ import { ButtonIcon, Localization } from '@sphereon/ui-components.core';
3
3
  import SSIIconButton from '../../../buttons/SSIIconButton';
4
- import { ButtonIconsEnum } from '../../../../types';
5
4
  import SSIDropDownList from '../../../lists/SSIDropDownList';
6
5
  import SSIPrimaryButton from '../../../buttons/SSIPrimaryButton';
7
- import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, SSITableViewHeaderShowOptionContainerStyled as ShowOptionContainer, } from '../../../../styles/components';
6
+ import { SSITableViewHeaderActionsContainerStyled as ActionsContainer, SSITableViewHeaderContainerStyled as Container, SSITableViewHeaderContentContainerStyled as ContentContainer, SSITextH3Styled as FilterCaption, SSITableViewHeaderFilterContainerStyled as FilterContainer, SSITableViewHeaderShowOptionContainerStyled as ShowOptionContainer, } from '../../../../styles';
8
7
  const SSITableViewHeader = (props) => {
9
8
  const { enableFiltering = false, enableMostRecent = false, actions = [] } = props;
10
- return (_jsx(Container, { children: _jsx(ContentContainer, { children: _jsxs(ActionsContainer, { children: [enableFiltering && (_jsxs(FilterContainer, { children: [_jsx(SSIIconButton, { icon: ButtonIconsEnum.FILTER, onClick: async () => console.log('add filter clicked') }), _jsx(FilterCaption, { children: Localization.translate('action_filter_caption') })] })), enableMostRecent &&
11
- _jsx(ShowOptionContainer, { children: _jsx(SSIDropDownList, { label: Localization.translate('action_show_caption'), initialValue: 'Most recent' }) }), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) }) }));
9
+ return (_jsx(Container, { children: _jsx(ContentContainer, { 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') })] })), enableMostRecent && (_jsx(ShowOptionContainer, { children: _jsx(SSIDropDownList, { label: Localization.translate('action_show_caption'), initialValue: 'Most recent' }) })), actions.map((action, index) => (_jsx(SSIPrimaryButton, { caption: action.caption, onClick: action.onClick, icon: action.icon }, index)))] }) }) }));
12
10
  };
13
11
  export default SSITableViewHeader;
@@ -1,7 +1,7 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ColumnResizeMode, Row } from '@tanstack/react-table';
3
3
  import { Button, ColumnHeader } from '../../../types';
4
- export type Props<T> = {
4
+ type Props<T> = {
5
5
  data: Array<T>;
6
6
  columns: Array<ColumnHeader<T>>;
7
7
  onRowClick?: (data: Row<T>) => Promise<void>;