@sphereon/ui-components.ssi-react 0.1.1 → 0.1.2-next.12

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 (63) hide show
  1. package/dist/components/assets/badges/SSICheckmarkBadge/index.js +14 -3
  2. package/dist/components/assets/badges/SSIExclamationMarkBadge/index.js +14 -3
  3. package/dist/components/assets/icons/SSIAddIcon/index.d.ts +7 -0
  4. package/dist/components/assets/icons/SSIAddIcon/index.js +18 -0
  5. package/dist/components/assets/icons/SSIArrowDownIcon/index.d.ts +8 -0
  6. package/dist/components/assets/icons/SSIArrowDownIcon/index.js +18 -0
  7. package/dist/components/assets/icons/SSIFilterIcon/index.d.ts +8 -0
  8. package/dist/components/assets/icons/SSIFilterIcon/index.js +18 -0
  9. package/dist/components/assets/icons/SSIProfileIcon/index.d.ts +8 -0
  10. package/dist/components/assets/icons/SSIProfileIcon/index.js +20 -0
  11. package/dist/components/assets/logos/SSILogo/index.js +14 -9
  12. package/dist/components/assets/logos/SSIPlaceholderLogo/index.js +14 -3
  13. package/dist/components/buttons/SSIIconButton/index.d.ts +10 -0
  14. package/dist/components/buttons/SSIIconButton/index.js +35 -0
  15. package/dist/components/buttons/SSIPrimaryButton/index.d.ts +10 -0
  16. package/dist/components/buttons/SSIPrimaryButton/index.js +29 -0
  17. package/dist/components/labels/SSIStatusLabel/index.js +17 -6
  18. package/dist/components/labels/SSITypeLabel/index.d.ts +7 -0
  19. package/dist/components/labels/SSITypeLabel/index.js +30 -0
  20. package/dist/components/lists/SSIDropDownList/index.d.ts +7 -0
  21. package/dist/components/lists/SSIDropDownList/index.js +49 -0
  22. package/dist/components/views/SSICardView/index.js +23 -16
  23. package/dist/components/views/SSITabView/SSITabViewHeader/index.d.ts +8 -0
  24. package/dist/components/views/SSITabView/SSITabViewHeader/index.js +22 -0
  25. package/dist/components/views/SSITabView/index.d.ts +7 -0
  26. package/dist/components/views/SSITabView/index.js +65 -0
  27. package/dist/components/views/SSITableView/SSITableViewHeader/index.d.ts +8 -0
  28. package/dist/components/views/SSITableView/SSITableViewHeader/index.js +50 -0
  29. package/dist/components/views/SSITableView/index.d.ts +13 -0
  30. package/dist/components/views/SSITableView/index.js +113 -0
  31. package/dist/index.d.ts +15 -1
  32. package/dist/index.js +15 -1
  33. package/dist/styles/components/components/SSICardView/index.js +18 -56
  34. package/dist/styles/components/components/SSIDropDownList/index.d.ts +2 -0
  35. package/dist/styles/components/components/SSIDropDownList/index.js +11 -0
  36. package/dist/styles/components/components/SSIIconButton/index.d.ts +1 -0
  37. package/dist/styles/components/components/SSIIconButton/index.js +7 -0
  38. package/dist/styles/components/components/SSIPrimaryButton/index.d.ts +1 -0
  39. package/dist/styles/components/components/SSIPrimaryButton/index.js +9 -0
  40. package/dist/styles/components/components/SSIProfileIcon/index.d.ts +1 -0
  41. package/dist/styles/components/components/SSIProfileIcon/index.js +7 -0
  42. package/dist/styles/components/components/SSIStatusLabel/index.js +8 -12
  43. package/dist/styles/components/components/SSITabViewHeader/index.d.ts +2 -0
  44. package/dist/styles/components/components/SSITabViewHeader/index.js +8 -0
  45. package/dist/styles/components/components/SSITableView/index.d.ts +6 -0
  46. package/dist/styles/components/components/SSITableView/index.js +14 -0
  47. package/dist/styles/components/components/SSITableViewHeader/index.d.ts +5 -0
  48. package/dist/styles/components/components/SSITableViewHeader/index.js +13 -0
  49. package/dist/styles/components/components/SSITypeLabel/index.d.ts +1 -0
  50. package/dist/styles/components/components/SSITypeLabel/index.js +9 -0
  51. package/dist/styles/components/components/index.d.ts +7 -0
  52. package/dist/styles/components/components/index.js +7 -0
  53. package/dist/styles/components/containers/index.js +9 -16
  54. package/dist/styles/components/fonts/index.d.ts +4 -0
  55. package/dist/styles/components/fonts/index.js +18 -41
  56. package/dist/styles/css/index.d.ts +7 -0
  57. package/dist/styles/css/index.js +14 -0
  58. package/dist/styles/typography.js +7 -1
  59. package/dist/types/component/index.d.ts +37 -0
  60. package/dist/types/component/index.js +16 -0
  61. package/dist/types/index.d.ts +1 -0
  62. package/dist/types/index.js +1 -0
  63. package/package.json +4 -3
@@ -1,7 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { fontColors, statusColors } from '@sphereon/ui-components.core';
3
- const SSICheckmarkBadge = (props) => {
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 })] }) }));
14
+ var SSICheckmarkBadge = function (props) {
15
+ var _a = props.size, size = _a === void 0 ? 15 : _a, _b = props.color, color = _b === void 0 ? fontColors.light : _b, _c = props.backgroundColor, backgroundColor = _c === void 0 ? statusColors.valid : _c;
16
+ return (_jsx("div", __assign({ style: { width: size, aspectRatio: 1 } }, { children: _jsxs("svg", __assign({ 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
17
  };
7
18
  export default SSICheckmarkBadge;
@@ -1,7 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { fontColors, statusColors } from '@sphereon/ui-components.core';
3
- const SSIExclamationMarkBadge = (props) => {
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 })] }) }));
14
+ var SSIExclamationMarkBadge = function (props) {
15
+ var _a = props.size, size = _a === void 0 ? 15 : _a, _b = props.color, color = _b === void 0 ? fontColors.light : _b, _c = props.backgroundColor, backgroundColor = _c === void 0 ? statusColors.error : _c;
16
+ return (_jsx("div", __assign({ style: { width: size, aspectRatio: 1 } }, { children: _jsxs("svg", __assign({ 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
17
  };
7
18
  export default SSIExclamationMarkBadge;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export interface IProps {
3
+ size?: number;
4
+ color?: string;
5
+ }
6
+ declare const SSIAddIcon: FC<IProps>;
7
+ export default SSIAddIcon;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { fontColors } from '@sphereon/ui-components.core';
14
+ var SSIAddIcon = function (props) {
15
+ var _a = props.size, size = _a === void 0 ? 16 : _a, _b = props.color, color = _b === void 0 ? fontColors.dark : _b;
16
+ return (_jsx("div", __assign({ style: { width: size, aspectRatio: 1, display: 'flex' } }, { children: _jsx("svg", __assign({ width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M8 0.5C7.65483 0.5 7.375 0.779833 7.375 1.125V7.37503H1.125C0.779812 7.37503 0.5 7.65484 0.5 8.00003C0.5 8.34519 0.779812 8.62502 1.125 8.62502H7.375V14.875C7.375 15.2202 7.65483 15.5 8 15.5C8.34519 15.5 8.625 15.2202 8.625 14.875V8.62502H14.875C15.2202 8.62502 15.5 8.34519 15.5 8.00003C15.5 7.65484 15.2202 7.37503 14.875 7.37503H8.625V1.125C8.625 0.779833 8.34519 0.5 8 0.5Z", fill: color }) })) })));
17
+ };
18
+ export default SSIAddIcon;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface IProps {
3
+ width?: number;
4
+ height?: number;
5
+ color?: string;
6
+ }
7
+ declare const SSIArrowDownIcon: FC<IProps>;
8
+ export default SSIArrowDownIcon;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { fontColors } from '@sphereon/ui-components.core';
14
+ var SSIArrowDownIcon = function (props) {
15
+ var _a = props.width, width = _a === void 0 ? 16 : _a, _b = props.height, height = _b === void 0 ? 8 : _b, _c = props.color, color = _c === void 0 ? fontColors.dark : _c;
16
+ return (_jsx("div", __assign({ style: { width: width, height: height, display: 'flex' } }, { children: _jsx("svg", __assign({ width: "16", height: "8", viewBox: "0 0 16 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M8.03265 7.74886C8.14951 7.74175 8.26065 7.69465 8.34825 7.61511L15.3133 1.19499C15.367 1.1489 15.411 1.09224 15.4429 1.02837C15.4747 0.964504 15.4937 0.894731 15.4987 0.823204C15.5037 0.751676 15.4946 0.67985 15.4719 0.611995C15.4493 0.54414 15.4135 0.481647 15.3668 0.428216C15.3201 0.374784 15.2634 0.331504 15.2001 0.300961C15.1367 0.270419 15.068 0.253238 14.9981 0.250423C14.9281 0.247608 14.8583 0.259221 14.7928 0.28458C14.7273 0.309939 14.6675 0.348517 14.6168 0.398032L8 6.49492L1.38317 0.398032C1.33252 0.348517 1.27268 0.309939 1.20718 0.28458C1.14169 0.259221 1.07189 0.247597 1.00193 0.250412C0.931963 0.253227 0.863266 0.270419 0.799918 0.300961C0.736569 0.331504 0.679861 0.374784 0.633164 0.428216C0.586466 0.481647 0.550732 0.54414 0.528085 0.611995C0.505437 0.67985 0.496338 0.751676 0.501329 0.823204C0.506319 0.894731 0.525297 0.964504 0.557135 1.02837C0.588973 1.09224 0.633022 1.1489 0.686663 1.19499L7.65174 7.61511C7.70344 7.6621 7.76372 7.69811 7.82911 7.72107C7.89449 7.74403 7.96367 7.75348 8.03265 7.74886Z", fill: color }) })) })));
17
+ };
18
+ export default SSIArrowDownIcon;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export interface IProps {
3
+ width?: number;
4
+ height?: number;
5
+ color?: string;
6
+ }
7
+ declare const SSIFilterIcon: FC<IProps>;
8
+ export default SSIFilterIcon;
@@ -0,0 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { fontColors } from '@sphereon/ui-components.core';
14
+ var SSIFilterIcon = function (props) {
15
+ var _a = props.height, height = _a === void 0 ? 16 : _a, _b = props.width, width = _b === void 0 ? 18 : _b, _c = props.color, color = _c === void 0 ? fontColors.dark : _c;
16
+ return (_jsx("div", __assign({ style: { width: width, height: height, display: 'flex' } }, { children: _jsx("svg", __assign({ width: "18", height: "16", viewBox: "0 0 18 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("path", { d: "M16.5 1.5H1.5L7.5 8.33222V13.0556L10.5 14.5V8.33222L16.5 1.5Z", stroke: color, strokeOpacity: "0.8", strokeWidth: "1.29412", strokeLinecap: "round", strokeLinejoin: "round" }) })) })));
17
+ };
18
+ export default SSIFilterIcon;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ export type Props = {
3
+ fullName: string;
4
+ fontColor?: string;
5
+ backgroundColor?: string;
6
+ };
7
+ declare const ProfileIcon: FC<Props>;
8
+ export default ProfileIcon;
@@ -0,0 +1,20 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { fontColors, getInitials, profileColors } from '@sphereon/ui-components.core';
14
+ import { SSIProfileIconContainerStyled as Container } from '../../../../styles/components/components/SSIProfileIcon';
15
+ import { SSITextH2Styled as ProfileIconText } from '../../../../styles/components';
16
+ var ProfileIcon = function (props) {
17
+ var _a = props.fontColor, fontColor = _a === void 0 ? fontColors.light : _a, _b = props.backgroundColor, backgroundColor = _b === void 0 ? profileColors['100'] : _b, fullName = props.fullName;
18
+ return (_jsx(Container, __assign({ style: { backgroundColor: backgroundColor } }, { children: _jsx(ProfileIconText, __assign({ style: { color: fontColor } }, { children: getInitials(fullName) })) })));
19
+ };
20
+ export default ProfileIcon;
@@ -1,14 +1,19 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { calculateAspectRatio, logoColors } from '@sphereon/ui-components.core';
3
14
  import SSIPlaceholderLogo from '../SSIPlaceholderLogo';
4
- const SSILogo = (props) => {
5
- const { logo, color = logoColors.default, size = 32, style } = props;
6
- return logo ? (_jsx("div", { style: {
7
- ...style,
8
- aspectRatio: logo?.dimensions && calculateAspectRatio(logo?.dimensions.width, logo?.dimensions.height),
9
- height: size,
10
- background: `url(${logo.uri})`,
11
- backgroundSize: 'cover',
12
- } })) : (_jsx(SSIPlaceholderLogo, { style: style, size: size, color: color }));
15
+ var SSILogo = function (props) {
16
+ var logo = props.logo, _a = props.color, color = _a === void 0 ? logoColors.default : _a, _b = props.size, size = _b === void 0 ? 32 : _b, style = props.style;
17
+ return logo ? (_jsx("div", { style: __assign(__assign({}, style), { aspectRatio: (logo === null || logo === void 0 ? void 0 : logo.dimensions) && calculateAspectRatio(logo === null || logo === void 0 ? void 0 : logo.dimensions.width, logo === null || logo === void 0 ? void 0 : logo.dimensions.height), height: size, background: "url(".concat(logo.uri, ")"), backgroundSize: 'cover' }) })) : (_jsx(SSIPlaceholderLogo, { style: style, size: size, color: color }));
13
18
  };
14
19
  export default SSILogo;
@@ -1,7 +1,18 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { logoColors } from '@sphereon/ui-components.core';
3
- const SSIPlaceholderLogo = (props) => {
4
- const { color = logoColors.default, size = 32, style } = props;
5
- return (_jsx("div", { style: { ...style, width: size, aspectRatio: 1 }, children: _jsxs("svg", { width: "100%", height: "100%", viewBox: "0 0 32 32", fill: "none", children: [_jsx("path", { d: "M15.9997 31.9999C11.7563 31.9999 7.68645 30.3141 4.68603 27.3136C1.68548 24.313 0 20.2435 0 15.9999C0 11.7563 1.68548 7.68669 4.68603 4.68627C7.68657 1.68572 11.7561 0 15.9997 0C20.2433 0 24.3129 1.68572 27.3133 4.68627C30.3139 7.68657 31.9994 11.7563 31.9994 15.9999C31.9947 20.2419 30.3075 24.3089 27.3079 27.3082C24.3083 30.3077 20.2415 31.9949 15.9997 31.9999ZM15.9997 0.914927V0.914691C11.9987 0.914691 8.16186 2.50412 5.33238 5.33317C2.50339 8.1624 0.9139 11.9997 0.9139 16.0005C0.9139 20.0015 2.50333 23.8383 5.33238 26.6678C8.16137 29.4968 11.9983 31.0863 15.9997 31.0863C20.0011 31.0863 23.8375 29.4968 26.667 26.6678C29.496 23.8388 31.0855 20.0018 31.0855 16.0005C31.081 12.0009 29.4901 8.16627 26.662 5.33861C23.834 2.51059 19.9997 0.919705 16.0002 0.915174L15.9997 0.914927Z", fill: color }), _jsx("path", { d: "M30.1659 10.0545C30.0927 10.0545 30.0205 10.0368 29.9556 10.0028C26.3647 8.13584 21.2781 7.06476 15.9997 7.06476C10.7214 7.06476 5.63448 8.13578 2.04387 10.0028C1.93604 10.0625 1.80862 10.0762 1.6904 10.0405C1.57241 10.0049 1.47355 9.92327 1.41668 9.81378C1.35981 9.70429 1.34966 9.5764 1.38836 9.45936C1.42706 9.34232 1.51154 9.24581 1.62244 9.19177C5.39433 7.23065 10.4993 6.15039 16 6.15039C21.5006 6.15039 26.6056 7.23065 30.3775 9.19177C30.5643 9.28899 30.6604 9.50136 30.6104 9.70594C30.5603 9.91052 30.377 10.0545 30.1663 10.0545L30.1659 10.0545Z", fill: color }), _jsx("path", { d: "M15.9996 25.848C10.4929 25.848 5.38486 24.7664 1.61726 22.8022C1.39333 22.6856 1.30626 22.4095 1.42282 22.1856C1.53963 21.9617 1.8157 21.8746 2.03964 21.9912C5.62728 23.8614 10.7147 24.9339 15.9997 24.9339C21.2848 24.9339 26.3722 23.8614 29.9598 21.9914V21.9912C30.1838 21.8746 30.4598 21.9617 30.5766 22.1856C30.6932 22.4096 30.6061 22.6856 30.3822 22.8022C26.6146 24.7666 21.5066 25.8481 15.9999 25.8481L15.9996 25.848Z", fill: color }), _jsx("path", { d: "M15.9995 32.0001C11.3852 32.0001 7.77148 24.9717 7.77148 16.0007C7.77148 7.02959 11.3855 0.0012207 15.9995 0.0012207C20.6136 0.0012207 24.2276 7.02899 24.2276 16.0007C24.2276 24.9723 20.6136 32.0001 15.9995 32.0001ZM15.9995 0.915181C11.9666 0.915181 8.68545 7.68078 8.68545 16.0007C8.68545 24.3205 11.9668 31.0861 15.9995 31.0861C20.0323 31.0861 23.3136 24.3205 23.3136 16.0007C23.3136 7.68078 20.0323 0.915181 15.9995 0.915181Z", fill: color }), _jsx("path", { d: "M16 31.9998C15.7476 31.9998 15.543 31.795 15.543 31.5425V0.457553C15.543 0.205069 15.7476 0.000488281 16 0.000488281C16.2525 0.000488281 16.4571 0.205069 16.4571 0.457553V31.5425C16.4571 31.6638 16.409 31.7801 16.3233 31.8658C16.2377 31.9514 16.1213 31.9998 16 31.9998V31.9998Z", fill: color }), _jsx("path", { d: "M31.542 16.4571H0.457065C0.204581 16.4571 0 16.2525 0 16C0 15.7476 0.204581 15.543 0.457065 15.543H31.542C31.7945 15.543 31.9991 15.7476 31.9991 16C31.9991 16.2525 31.7945 16.4571 31.542 16.4571Z", fill: color })] }) }));
14
+ var SSIPlaceholderLogo = function (props) {
15
+ var _a = props.color, color = _a === void 0 ? logoColors.default : _a, _b = props.size, size = _b === void 0 ? 32 : _b, style = props.style;
16
+ return (_jsx("div", __assign({ style: __assign(__assign({}, style), { width: size, aspectRatio: 1 }) }, { children: _jsxs("svg", __assign({ width: "100%", height: "100%", viewBox: "0 0 32 32", fill: "none" }, { children: [_jsx("path", { d: "M15.9997 31.9999C11.7563 31.9999 7.68645 30.3141 4.68603 27.3136C1.68548 24.313 0 20.2435 0 15.9999C0 11.7563 1.68548 7.68669 4.68603 4.68627C7.68657 1.68572 11.7561 0 15.9997 0C20.2433 0 24.3129 1.68572 27.3133 4.68627C30.3139 7.68657 31.9994 11.7563 31.9994 15.9999C31.9947 20.2419 30.3075 24.3089 27.3079 27.3082C24.3083 30.3077 20.2415 31.9949 15.9997 31.9999ZM15.9997 0.914927V0.914691C11.9987 0.914691 8.16186 2.50412 5.33238 5.33317C2.50339 8.1624 0.9139 11.9997 0.9139 16.0005C0.9139 20.0015 2.50333 23.8383 5.33238 26.6678C8.16137 29.4968 11.9983 31.0863 15.9997 31.0863C20.0011 31.0863 23.8375 29.4968 26.667 26.6678C29.496 23.8388 31.0855 20.0018 31.0855 16.0005C31.081 12.0009 29.4901 8.16627 26.662 5.33861C23.834 2.51059 19.9997 0.919705 16.0002 0.915174L15.9997 0.914927Z", fill: color }), _jsx("path", { d: "M30.1659 10.0545C30.0927 10.0545 30.0205 10.0368 29.9556 10.0028C26.3647 8.13584 21.2781 7.06476 15.9997 7.06476C10.7214 7.06476 5.63448 8.13578 2.04387 10.0028C1.93604 10.0625 1.80862 10.0762 1.6904 10.0405C1.57241 10.0049 1.47355 9.92327 1.41668 9.81378C1.35981 9.70429 1.34966 9.5764 1.38836 9.45936C1.42706 9.34232 1.51154 9.24581 1.62244 9.19177C5.39433 7.23065 10.4993 6.15039 16 6.15039C21.5006 6.15039 26.6056 7.23065 30.3775 9.19177C30.5643 9.28899 30.6604 9.50136 30.6104 9.70594C30.5603 9.91052 30.377 10.0545 30.1663 10.0545L30.1659 10.0545Z", fill: color }), _jsx("path", { d: "M15.9996 25.848C10.4929 25.848 5.38486 24.7664 1.61726 22.8022C1.39333 22.6856 1.30626 22.4095 1.42282 22.1856C1.53963 21.9617 1.8157 21.8746 2.03964 21.9912C5.62728 23.8614 10.7147 24.9339 15.9997 24.9339C21.2848 24.9339 26.3722 23.8614 29.9598 21.9914V21.9912C30.1838 21.8746 30.4598 21.9617 30.5766 22.1856C30.6932 22.4096 30.6061 22.6856 30.3822 22.8022C26.6146 24.7666 21.5066 25.8481 15.9999 25.8481L15.9996 25.848Z", fill: color }), _jsx("path", { d: "M15.9995 32.0001C11.3852 32.0001 7.77148 24.9717 7.77148 16.0007C7.77148 7.02959 11.3855 0.0012207 15.9995 0.0012207C20.6136 0.0012207 24.2276 7.02899 24.2276 16.0007C24.2276 24.9723 20.6136 32.0001 15.9995 32.0001ZM15.9995 0.915181C11.9666 0.915181 8.68545 7.68078 8.68545 16.0007C8.68545 24.3205 11.9668 31.0861 15.9995 31.0861C20.0323 31.0861 23.3136 24.3205 23.3136 16.0007C23.3136 7.68078 20.0323 0.915181 15.9995 0.915181Z", fill: color }), _jsx("path", { d: "M16 31.9998C15.7476 31.9998 15.543 31.795 15.543 31.5425V0.457553C15.543 0.205069 15.7476 0.000488281 16 0.000488281C16.2525 0.000488281 16.4571 0.205069 16.4571 0.457553V31.5425C16.4571 31.6638 16.409 31.7801 16.3233 31.8658C16.2377 31.9514 16.1213 31.9998 16 31.9998V31.9998Z", fill: color }), _jsx("path", { d: "M31.542 16.4571H0.457065C0.204581 16.4571 0 16.2525 0 16C0 15.7476 0.204581 15.543 0.457065 15.543H31.542C31.7945 15.543 31.9991 15.7476 31.9991 16C31.9991 16.2525 31.7945 16.4571 31.542 16.4571Z", fill: color })] })) })));
6
17
  };
7
18
  export default SSIPlaceholderLogo;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ButtonIconsEnum } from '../../../types';
3
+ export type Props = {
4
+ icon: ButtonIconsEnum;
5
+ onClick: () => Promise<void>;
6
+ disabled?: boolean;
7
+ color?: string;
8
+ };
9
+ declare const SSIIconButton: FC<Props>;
10
+ export default SSIIconButton;
@@ -0,0 +1,35 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import SSIAddIcon from '../../assets/icons/SSIAddIcon';
14
+ import SSIFilterIcon from '../../assets/icons/SSIFilterIcon';
15
+ import SSIArrowDownIcon from '../../assets/icons/SSIArrowDownIcon';
16
+ import { ButtonIconsEnum } from '../../../types';
17
+ import { SSIIconButtonContainerStyled as Container } from '../../../styles/components';
18
+ import { fontColors } from '@sphereon/ui-components.core';
19
+ var SSIIconButton = function (props) {
20
+ var icon = props.icon, onClick = props.onClick, _a = props.disabled, disabled = _a === void 0 ? false : _a, _b = props.color, color = _b === void 0 ? fontColors.dark : _b;
21
+ return _jsx(Container, __assign({ onClick: onClick }, { children: getIcon(icon, color) }));
22
+ };
23
+ var getIcon = function (icon, color) {
24
+ switch (icon) {
25
+ case ButtonIconsEnum.ADD:
26
+ return _jsx(SSIAddIcon, { color: color });
27
+ case ButtonIconsEnum.FILTER:
28
+ return _jsx(SSIFilterIcon, { color: color });
29
+ case ButtonIconsEnum.ARROW_DOWN:
30
+ return _jsx(SSIArrowDownIcon, { color: color });
31
+ default:
32
+ return _jsx("div", {});
33
+ }
34
+ };
35
+ export default SSIIconButton;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ import { ButtonIconsEnum } from '../../../types';
3
+ export type Props = {
4
+ caption: string;
5
+ onClick: () => Promise<void>;
6
+ icon?: ButtonIconsEnum;
7
+ disabled?: boolean;
8
+ };
9
+ declare const SSIPrimaryButton: FC<Props>;
10
+ export default SSIPrimaryButton;
@@ -0,0 +1,29 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { fontColors } from '@sphereon/ui-components.core';
14
+ import SSIAddIcon from '../../assets/icons/SSIAddIcon';
15
+ import { SSIPrimaryButtonContainerStyled as Container, SSITextH3LightStyled as Caption } from '../../../styles/components';
16
+ import { ButtonIconsEnum } from '../../../types';
17
+ var SSIPrimaryButton = function (props) {
18
+ var caption = props.caption, icon = props.icon, onClick = props.onClick;
19
+ return (_jsxs(Container, __assign({ onClick: onClick }, { children: [icon && getIcon(icon, fontColors.light), _jsx(Caption, { children: caption })] })));
20
+ };
21
+ var getIcon = function (icon, color) {
22
+ switch (icon) {
23
+ case ButtonIconsEnum.ADD:
24
+ return _jsx(SSIAddIcon, { color: color });
25
+ default:
26
+ return _jsx("div", {});
27
+ }
28
+ };
29
+ export default SSIPrimaryButton;
@@ -1,13 +1,24 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { CredentialStatus, IssuerStatus, statusColors, getStatusTranslation } from '@sphereon/ui-components.core';
3
14
  import { SSIStatusLabelBadgeContainer as BadgeContainer, SSIStatusLabelContainerStyled as Container, SSIStatusLabelStatusCaptionStyled as StatusCaption, } from '../../../styles/components';
4
15
  import SSICheckmarkBadge from '../../../components/assets/badges/SSICheckmarkBadge';
5
16
  import SSIExclamationMarkBadge from '../../../components/assets/badges/SSIExclamationMarkBadge';
6
- const SSIStatusLabel = (props) => {
7
- const { status, color = statusColors[status], style, showIcon = false } = props;
8
- return (_jsxs(Container, { style: { ...style, borderColor: color }, children: [showIcon && _jsx(BadgeContainer, { children: getStatusBadge(status, color) }), _jsx(StatusCaption, { style: { color }, children: getStatusTranslation(status) })] }));
17
+ var SSIStatusLabel = function (props) {
18
+ var status = props.status, _a = props.color, color = _a === void 0 ? statusColors[status] : _a, style = props.style, _b = props.showIcon, showIcon = _b === void 0 ? false : _b;
19
+ return (_jsxs(Container, __assign({ style: __assign(__assign({}, style), { borderColor: color }) }, { children: [showIcon && _jsx(BadgeContainer, { children: getStatusBadge(status, color) }), _jsx(StatusCaption, __assign({ style: { color: color } }, { children: getStatusTranslation(status) }))] })));
9
20
  };
10
- const getStatusBadge = (status, backgroundColor) => {
21
+ var getStatusBadge = function (status, backgroundColor) {
11
22
  switch (status) {
12
23
  case IssuerStatus.VERIFIED:
13
24
  return _jsx(SSICheckmarkBadge, { backgroundColor: backgroundColor });
@@ -18,9 +29,9 @@ const getStatusBadge = (status, backgroundColor) => {
18
29
  case CredentialStatus.EXPIRED:
19
30
  return _jsx(SSIExclamationMarkBadge, { backgroundColor: backgroundColor });
20
31
  case CredentialStatus.REVOKED:
21
- throw new Error(`${status} not yet implemented`);
32
+ throw new Error("".concat(status, " not yet implemented"));
22
33
  default:
23
- throw new Error(`${status} not supported`);
34
+ throw new Error("".concat(status, " not supported"));
24
35
  }
25
36
  };
26
37
  export default SSIStatusLabel;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { LabelTypeEnum } from '../../../types';
3
+ export type Props = {
4
+ type: LabelTypeEnum;
5
+ };
6
+ declare const SSITypeLabel: FC<Props>;
7
+ export default SSITypeLabel;
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { LabelTypeEnum } from '../../../types';
14
+ import { SSITypeLabelContainerStyled as Container } from '../../../styles/components';
15
+ import { backgroundColors, gradientColors } from '@sphereon/ui-components.core';
16
+ var getBackground = function (type) {
17
+ switch (type) {
18
+ case LabelTypeEnum.ISSUER:
19
+ return gradientColors['200'];
20
+ case LabelTypeEnum.VERIFIER:
21
+ return gradientColors['100'];
22
+ default:
23
+ return backgroundColors.primaryLight;
24
+ }
25
+ };
26
+ var SSITypeLabel = function (props) {
27
+ var type = props.type;
28
+ return _jsx(Container, __assign({ style: { background: getBackground(type) } }, { children: type }));
29
+ };
30
+ export default SSITypeLabel;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ export type Props = {
3
+ initialValue: string;
4
+ label?: string;
5
+ };
6
+ declare const SSIDropDownList: FC<Props>;
7
+ export default SSIDropDownList;
@@ -0,0 +1,49 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
38
+ import React from 'react';
39
+ import SSIIconButton from '../../buttons/SSIIconButton';
40
+ import { ButtonIconsEnum } from '../../../types';
41
+ import { SSIDropDownListContainerStyled as Container, SSITextH3Styled as LabelCaption, SSIDropDownListSelectedValueStyled as SelectedValue, } from '../../../styles/components';
42
+ var SSIDropDownList = function (props) {
43
+ var initialValue = props.initialValue, label = props.label;
44
+ var _a = React.useState(initialValue), value = _a[0], setValue = _a[1];
45
+ return (_jsxs(Container, { children: [label && _jsx(LabelCaption, { children: label }), _jsx(SelectedValue, { children: value }), _jsx(SSIIconButton, { icon: ButtonIconsEnum.ARROW_DOWN, onClick: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
46
+ return [2, console.log('drop down clicked')];
47
+ }); }); } })] }));
48
+ };
49
+ export default SSIDropDownList;
@@ -1,24 +1,31 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import { backgroundColors, credentialCardColors, Localization, toLocalDateString, } from '@sphereon/ui-components.core';
3
14
  import { SSIAlphaContainerStyled as AlphaContainer, SSICardViewContainerStyled as Container, SSICardViewBackgroundImageStyled as BackgroundImage, SSICardViewContentMainContainerStyled as ContentMainContainer, SSICardViewContentSubContainerStyled as ContentSubContainer, SSICardViewSSICredentialStatusStyled as CredentialStatusContainer, SSICardViewCredentialSubtitleTextStyled as CredentialSubtitleText, SSICardViewCredentialTitleTextStyled as CredentialTitleText, SSITextH5LightStyled as ExpirationDateText, SSICardViewFooterContainerStyled as FooterContainer, SSITextH4LightStyled as H4Text, SSICardViewHeaderContainerStyled as HeaderContainer, SSICardViewContentIssueNameContainerStyled as IssueNameContainer, SSICardViewHeaderLogoContainerStyled as LogoContainer, SSICardViewContentPropertiesContainerStyled as PropertiesContainer, SSITextH6LightStyled as PropertyValueText, SSICardViewHeaderTitleContainerStyled as TitleContainer, SSIFlexDirectionColumnViewStyled as PropertyContainer, } from '../../../styles/components';
4
15
  import SSILogo from '../../assets/logos/SSILogo';
5
16
  import SSIStatusLabel from '../../labels/SSIStatusLabel';
6
- const SSICardView = (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
+ var SSICardView = function (props) {
18
+ var _a, _b, _c, _d;
19
+ var header = props.header, body = props.body, footer = props.footer;
20
+ var _e = (_a = props.header) !== null && _a !== void 0 ? _a : {}, credentialTitle = _e.credentialTitle, credentialSubtitle = _e.credentialSubtitle, logo = _e.logo;
21
+ var _f = (_b = props.body) !== null && _b !== void 0 ? _b : {}, issuerName = _f.issuerName, properties = _f.properties;
22
+ var _g = (_c = props.footer) !== null && _c !== void 0 ? _c : {}, credentialStatus = _g.credentialStatus, expirationDate = _g.expirationDate;
23
+ var _h = (_d = props.display) !== null && _d !== void 0 ? _d : {}, _j = _h.backgroundColor, backgroundColor = _j === void 0 ? credentialCardColors.default : _j, backgroundImage = _h.backgroundImage, _k = _h.textColor, textColor = _k === void 0 ? backgroundColors.primaryLight : _k;
24
+ var getPropertyElementsFrom = function (properties) {
25
+ return properties.slice(0, 2).map(function (property, index) { return (_jsxs(PropertyContainer, __assign({ style: __assign(__assign({}, (properties.length > 1 && { width: 140 })), (index > 0 && { marginLeft: 10 })) }, { children: [_jsx(H4Text, __assign({ style: { color: textColor } }, { children: property.name })), _jsx(PropertyValueText, __assign({ style: { color: textColor } }, { children: property.value }))] }), index)); });
17
26
  };
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: [_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(CredentialStatusContainer, { children: credentialStatus && _jsx(SSIStatusLabel, { status: credentialStatus, color: textColor }) }))] }))] }) }) }));
27
+ return (_jsx(Container, __assign({ style: { backgroundColor: backgroundColor } }, { children: _jsx(BackgroundImage, __assign({ style: __assign({}, ((backgroundImage === null || backgroundImage === void 0 ? void 0 : backgroundImage.uri) && { background: "url(".concat(backgroundImage.uri, ")"), backgroundSize: 'cover' })) }, { children: _jsxs(AlphaContainer, { children: [header && (_jsxs(HeaderContainer, { children: [_jsx(LogoContainer, { children: _jsx(SSILogo, { logo: logo, color: textColor }) }), credentialTitle && (_jsxs(TitleContainer, { children: [_jsx(CredentialTitleText, __assign({ style: { color: textColor } }, { children: credentialTitle })), credentialSubtitle && _jsx(CredentialSubtitleText, __assign({ style: { color: textColor } }, { children: credentialSubtitle }))] }))] })), body && (_jsx(ContentMainContainer, { children: _jsxs(ContentSubContainer, { children: [issuerName && (_jsx(IssueNameContainer, { children: _jsx(H4Text, __assign({ style: { color: textColor } }, { children: issuerName })) })), properties && _jsx(PropertiesContainer, { children: getPropertyElementsFrom(properties) })] }) })), footer && (_jsxs(FooterContainer, { children: [_jsx(ExpirationDateText, __assign({ style: { color: textColor } }, { children: expirationDate
28
+ ? "".concat(Localization.translate('credential_card_expires_message'), " ").concat(toLocalDateString(expirationDate))
29
+ : Localization.translate('credential_status_never_expires_date_label') })), credentialStatus && (_jsx(CredentialStatusContainer, { children: credentialStatus && _jsx(SSIStatusLabel, { status: credentialStatus, color: textColor }) }))] }))] }) })) })));
23
30
  };
24
31
  export default SSICardView;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { TabNavigationState } from '../../../../types';
3
+ export type Props = {
4
+ navigationState: TabNavigationState;
5
+ onIndexChange: (index: number) => void;
6
+ };
7
+ declare const SSITabViewHeader: React.FC<Props>;
8
+ export default SSITabViewHeader;
@@ -0,0 +1,22 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { SSITabViewHeaderContainerStyled as Container, SSITabViewHeaderTitleContainerStyled as TitleContainer, SSITextH3Styled as TitleCaption, } from '../../../../styles/components';
14
+ var SSITabViewHeader = function (props) {
15
+ var navigationState = props.navigationState, onIndexChange = props.onIndexChange;
16
+ return (_jsx(Container, { children: navigationState.routes.map(function (value, index) {
17
+ var tabIndex = index + 1;
18
+ var isActiveTab = tabIndex === navigationState.index;
19
+ return (_jsx(TitleContainer, __assign({ onClick: function () { return onIndexChange(tabIndex); }, style: __assign({}, (isActiveTab && { borderBottom: "2px solid #7276F7", alignSelf: 'stretch' })) }, { children: _jsx(TitleCaption, __assign({ style: { fontWeight: !isActiveTab ? '400' : '600' } }, { children: value.title })) }), tabIndex));
20
+ }) }));
21
+ };
22
+ export default SSITabViewHeader;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { TabViewRoute } from '../../../types';
3
+ export type Props = {
4
+ routes: Array<TabViewRoute>;
5
+ };
6
+ declare const SSITabView: React.FC<Props>;
7
+ export default SSITabView;