@sphereon/ui-components.core 0.1.3-unstable.14 → 0.1.3-unstable.145

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/index.d.ts CHANGED
@@ -2,4 +2,5 @@ import Localization from './localization/Localization';
2
2
  export * from './utils';
3
3
  export * from './types';
4
4
  export * from './styles';
5
+ export * from './regexes';
5
6
  export { Localization };
package/dist/index.js CHANGED
@@ -23,3 +23,4 @@ exports.Localization = Localization_1["default"];
23
23
  __exportStar(require("./utils"), exports);
24
24
  __exportStar(require("./types"), exports);
25
25
  __exportStar(require("./styles"), exports);
26
+ __exportStar(require("./regexes"), exports);
@@ -6,8 +6,29 @@
6
6
  "credential_status_valid": "Valid",
7
7
  "credential_status_expired": "Expired",
8
8
  "credential_status_revoked": "Revoked",
9
+ "workflow_status_approved": "Approved",
10
+ "workflow_status_archived": "Archived",
11
+ "workflow_status_declined": "Declined",
12
+ "workflow_status_done": "Done",
13
+ "workflow_status_new": "New",
14
+ "workflow_status_pending": "Pending",
9
15
  "status_missing": "Unknown",
10
16
  "action_filter_caption": "Filter",
11
17
  "action_show_caption": "Show:",
12
- "result_count_label": "Showing {{count}} from {{maxCount}} results"
18
+ "result_count_label": "Showing {{count}} from {{maxCount}} results",
19
+ "action_delete_label": "Delete",
20
+ "table_pagination_input_caption_go_to": "Go to",
21
+ "table_pagination_input_caption_page": "page",
22
+ "drag_and_drop_upload_image_caption": "Click or drag to upload an image",
23
+ "drag_and_drop_upload_evidence_caption": "Click or drag to upload an evidence document",
24
+ "credential_attach_image_description": "This image will be attached to the credential.",
25
+ "credential_attach_evidence_description": "This document will be refer to the credential.",
26
+ "passport_photo_alt": "Passport Photo",
27
+ "credential_issuance_wizard_title": "Issue credential",
28
+ "credential_issuance_wizard_credential_type_label": "Credential type",
29
+ "credential_issuance_wizard_evidence_title": "Evidence",
30
+ "credential_issuance_wizard_evidence_optional_title": "(optional)",
31
+ "credential_issuance_wizard_evidence_description": "Optionally, you can upload one or more documents or files that you want to attach to this credential.",
32
+ "file_permission_public_label": "Public",
33
+ "file_permission_private_label": "Private"
13
34
  }
@@ -6,8 +6,30 @@
6
6
  "credential_status_valid": "Geldig",
7
7
  "credential_status_expired": "Verlopen",
8
8
  "credential_status_revoked": "Ingetrokken",
9
+ "workflow_status_approved": "Goedgekeurd",
10
+ "workflow_status_archived": "Gearchiveerd",
11
+ "workflow_status_declined": "Afgewezen",
12
+ "workflow_status_done": "Klaar",
13
+ "workflow_status_new": "Nieuw",
14
+ "workflow_status_pending": "In behandeling",
9
15
  "status_missing": "Onbekent",
10
16
  "action_filter_caption": "Filter",
11
17
  "action_show_caption": "Toon:",
12
- "result_count_label": "Toon {{count}} van {{maxCount}} resultaten"
18
+ "result_count_label": "Toon {{count}} van {{maxCount}} resultaten",
19
+ "action_delete_label": "Verwijder",
20
+ "table_pagination_input_caption_go_to": "Ga naar",
21
+ "table_pagination_input_caption_page": "pagina",
22
+ "action_delete_label": "Verwijder",
23
+ "drag_and_drop_upload_image_caption": "Klik of sleep om een afbeelding te uploaden",
24
+ "drag_and_drop_upload_evidence_caption": "Klik of sleep om een bewijsdocument te uploaden",
25
+ "credential_attach_image_description": "Deze afbeelding wordt aan de credential toegevoegd.",
26
+ "credential_attach_evidence_description": "Dit document verwijst naar de credential.",
27
+ "passport_photo_alt": "Pasfoto",
28
+ "credential_issuance_wizard_title": "Credential uitgeven",
29
+ "credential_issuance_wizard_credential_type_label": "Credential type",
30
+ "credential_issuance_wizard_evidence_title": "Bewijs",
31
+ "credential_issuance_wizard_evidence_optional_title": "(optioneel)",
32
+ "credential_issuance_wizard_evidence_description": "Optioneel kunt u een of meer documenten of bestanden uploaden die u aan deze credential wilt toevoegen.",
33
+ "file_permission_public_label": "Openbaar",
34
+ "file_permission_private_label": "Privaat"
13
35
  }
@@ -0,0 +1 @@
1
+ export declare const emailAddressValidationRegex: RegExp;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.emailAddressValidationRegex = void 0;
4
+ exports.emailAddressValidationRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
@@ -1,5 +1,5 @@
1
- import { LabelStatus } from '../../types';
2
- type BackgroundColor = 'primaryDark' | 'secondaryDark' | 'primaryLight' | 'secondaryLight' | 'lightGrey';
1
+ import { GradientProperties, LabelStatus } from '../../types';
2
+ type BackgroundColor = 'primaryDark' | 'secondaryDark' | 'primaryLight' | 'secondaryLight' | 'lightGrey' | 'orange';
3
3
  export declare const backgroundColors: Record<BackgroundColor, string>;
4
4
  type CredentialCardColor = 'default';
5
5
  export declare const credentialCardColors: Record<CredentialCardColor, string>;
@@ -8,10 +8,18 @@ export declare const logoColors: Record<LogoColor, string>;
8
8
  export declare const statusColors: Record<LabelStatus | 'error', string>;
9
9
  type FontColor = 'dark' | 'light' | 'secondaryButton' | 'greyedOut' | 'lightGrey';
10
10
  export declare const fontColors: Record<FontColor, string>;
11
- type Gradient = 100 | 200;
12
- export declare const gradientColors: Record<Gradient, string>;
13
- type Border = 'dark' | 'light' | 'lightGrey';
11
+ type HighLightGradient = 100 | 200;
12
+ export declare const gradientsColors: Record<HighLightGradient, GradientProperties>;
13
+ type Border = 'dark' | 'light' | 'lightGrey' | 'darkGrey';
14
14
  export declare const borderColors: Record<Border, string>;
15
15
  type Profile = 100 | 200 | 300 | 400 | 500;
16
16
  export declare const profileColors: Record<Profile, string>;
17
+ type Alerts = 'primaryLight' | 'secondaryLight';
18
+ export declare const alertColors: Record<Alerts, string>;
19
+ type SelectionElement = 'primaryDark' | 'primaryBorderDark' | 'selectedRow';
20
+ export declare const selectionElementColors: Record<SelectionElement, string>;
21
+ type Element = 'blue' | 'lightGrey' | 'purple' | 100 | 200 | 300;
22
+ export declare const elementColors: Record<Element, string>;
23
+ type Button = 100;
24
+ export declare const buttonColors: Record<Button, string>;
17
25
  export {};
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.profileColors = exports.borderColors = exports.gradientColors = exports.fontColors = exports.statusColors = exports.logoColors = exports.credentialCardColors = exports.backgroundColors = void 0;
3
+ exports.buttonColors = exports.elementColors = exports.selectionElementColors = exports.alertColors = exports.profileColors = exports.borderColors = exports.gradientsColors = exports.fontColors = exports.statusColors = exports.logoColors = exports.credentialCardColors = exports.backgroundColors = void 0;
4
4
  exports.backgroundColors = {
5
5
  primaryDark: '#202537',
6
6
  secondaryDark: '#2C334B',
7
7
  primaryLight: '#FBFBFB',
8
8
  secondaryLight: '#E3E3FF',
9
- lightGrey: '#E3E3E3'
9
+ lightGrey: '#E3E3E3',
10
+ orange: '#D74500'
10
11
  };
11
12
  exports.credentialCardColors = {
12
13
  "default": '#5BDED2'
@@ -20,7 +21,13 @@ exports.statusColors = {
20
21
  revoked: '#EE5309',
21
22
  verified: '#00C249',
22
23
  unverified: '#FF9900',
23
- error: '#D74500'
24
+ error: '#D74500',
25
+ New: '#7276F7',
26
+ Approved: '#00C249',
27
+ Pending: '#0B81FF',
28
+ Archived: '#B3B3B3',
29
+ Declined: '#D74500',
30
+ Done: '#00C249'
24
31
  };
25
32
  exports.fontColors = {
26
33
  dark: '#303030',
@@ -29,14 +36,21 @@ exports.fontColors = {
29
36
  greyedOut: '#8F8F8F',
30
37
  lightGrey: '#8D9099'
31
38
  };
32
- exports.gradientColors = {
33
- 100: 'linear-gradient(135deg, #7276f7 0%, #7c40e8 100%)',
34
- 200: 'linear-gradient(135deg, #F90 0%, #EE5309 100%)'
39
+ exports.gradientsColors = {
40
+ 100: {
41
+ primaryColor: '#7276F7',
42
+ secondaryColor: '#7C40E8'
43
+ },
44
+ 200: {
45
+ primaryColor: '#FF9900',
46
+ secondaryColor: '#EE5309'
47
+ }
35
48
  };
36
49
  exports.borderColors = {
37
50
  dark: '#404D7A',
38
51
  light: '#E3E3E3',
39
- lightGrey: '#ACACAC'
52
+ lightGrey: '#ACACAC',
53
+ darkGrey: '#303030'
40
54
  };
41
55
  exports.profileColors = {
42
56
  100: '#EE5209',
@@ -45,3 +59,23 @@ exports.profileColors = {
45
59
  400: '#0B81FF',
46
60
  500: '#BD2DFF'
47
61
  };
62
+ exports.alertColors = {
63
+ primaryLight: '#FBFBFB',
64
+ secondaryLight: '#EBEBEB'
65
+ };
66
+ exports.selectionElementColors = {
67
+ primaryDark: '#0B81FF',
68
+ primaryBorderDark: '#FBFBFB',
69
+ selectedRow: '#B7B8D9'
70
+ };
71
+ exports.elementColors = {
72
+ blue: '#0B81FF',
73
+ lightGrey: '#C4C4C4',
74
+ purple: '#7276F7',
75
+ 100: '#F25409',
76
+ 200: '#F78854',
77
+ 300: '#8D9099'
78
+ };
79
+ exports.buttonColors = {
80
+ 100: '#8B1900'
81
+ };
@@ -1,7 +1,7 @@
1
- export type FontSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
1
+ export type FontSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 64;
2
2
  export declare const fontSize: Record<FontSize, number>;
3
- export type LineHeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
3
+ export type LineHeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 64;
4
4
  export declare const lineHeight: Record<LineHeight, number>;
5
5
  export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
6
6
  export declare const fontWeight: Record<FontWeight, FontWeight>;
7
- export type FontStyle = 'h0SemiBold' | 'h1Regular' | 'h1SemiBold' | 'h2Regular' | 'h2SemiBold' | 'h3Regular' | 'h3SemiBold' | 'h4Regular' | 'h4SemiBold' | 'h5Regular' | 'h5SemiBold' | 'h6' | 'h7SemiBold';
7
+ export type FontStyle = 'h0SemiBold' | 'h1Regular' | 'h1SemiBold' | 'h2Regular' | 'h2SemiBold' | 'h3Regular' | 'h3SemiBold' | 'h4Regular' | 'h4SemiBold' | 'h5Regular' | 'h5SemiBold' | 'h6' | 'h7Regular' | 'h7SemiBold' | 'Regular64';
@@ -9,7 +9,8 @@ exports.fontSize = {
9
9
  500: 14,
10
10
  600: 16,
11
11
  700: 24,
12
- 800: 36
12
+ 800: 36,
13
+ 64: 64
13
14
  };
14
15
  exports.lineHeight = {
15
16
  100: 13.5,
@@ -19,7 +20,8 @@ exports.lineHeight = {
19
20
  500: 21,
20
21
  600: 24,
21
22
  700: 34,
22
- 800: 54
23
+ 800: 54,
24
+ 64: 64
23
25
  };
24
26
  exports.fontWeight = {
25
27
  normal: 'normal',
@@ -0,0 +1,5 @@
1
+ export type ParsedBase64Uri = {
2
+ base64Uri: string;
3
+ base64: string;
4
+ mimeType: string;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -0,0 +1,7 @@
1
+ export declare enum ButtonIcon {
2
+ ADD = "add",
3
+ ARROW_DOWN = "arrowDown",
4
+ MEATBALLS = "meatballs",
5
+ DELETE = "delete",
6
+ FILTER = "filter"
7
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ButtonIcon = void 0;
4
+ var ButtonIcon;
5
+ (function (ButtonIcon) {
6
+ ButtonIcon["ADD"] = "add";
7
+ ButtonIcon["ARROW_DOWN"] = "arrowDown";
8
+ ButtonIcon["MEATBALLS"] = "meatballs";
9
+ ButtonIcon["DELETE"] = "delete";
10
+ ButtonIcon["FILTER"] = "filter";
11
+ })(ButtonIcon = exports.ButtonIcon || (exports.ButtonIcon = {}));
@@ -7,4 +7,12 @@ export declare enum IssuerStatus {
7
7
  VERIFIED = "verified",
8
8
  UNVERIFIED = "unverified"
9
9
  }
10
- export type LabelStatus = CredentialStatus | IssuerStatus;
10
+ export declare enum WorkflowStatus {
11
+ NEW = "New",
12
+ APPROVED = "Approved",
13
+ DECLINED = "Declined",
14
+ PENDING = "Pending",
15
+ DONE = "Done",
16
+ ARCHIVED = "Archived"
17
+ }
18
+ export type LabelStatus = CredentialStatus | IssuerStatus | WorkflowStatus;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  exports.__esModule = true;
3
- exports.IssuerStatus = exports.CredentialStatus = void 0;
3
+ exports.WorkflowStatus = exports.IssuerStatus = exports.CredentialStatus = void 0;
4
4
  var CredentialStatus;
5
5
  (function (CredentialStatus) {
6
6
  CredentialStatus["VALID"] = "valid";
@@ -12,3 +12,12 @@ var IssuerStatus;
12
12
  IssuerStatus["VERIFIED"] = "verified";
13
13
  IssuerStatus["UNVERIFIED"] = "unverified";
14
14
  })(IssuerStatus = exports.IssuerStatus || (exports.IssuerStatus = {}));
15
+ var WorkflowStatus;
16
+ (function (WorkflowStatus) {
17
+ WorkflowStatus["NEW"] = "New";
18
+ WorkflowStatus["APPROVED"] = "Approved";
19
+ WorkflowStatus["DECLINED"] = "Declined";
20
+ WorkflowStatus["PENDING"] = "Pending";
21
+ WorkflowStatus["DONE"] = "Done";
22
+ WorkflowStatus["ARCHIVED"] = "Archived";
23
+ })(WorkflowStatus = exports.WorkflowStatus || (exports.WorkflowStatus = {}));
@@ -1,3 +1,9 @@
1
+ export * from './button';
1
2
  export * from './credential';
2
3
  export * from './image';
4
+ export * from './label';
3
5
  export * from './localization';
6
+ export * from './tab';
7
+ export * from './toast';
8
+ export * from './style';
9
+ export * from './base64';
@@ -14,6 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  exports.__esModule = true;
17
+ __exportStar(require("./button"), exports);
17
18
  __exportStar(require("./credential"), exports);
18
19
  __exportStar(require("./image"), exports);
20
+ __exportStar(require("./label"), exports);
19
21
  __exportStar(require("./localization"), exports);
22
+ __exportStar(require("./tab"), exports);
23
+ __exportStar(require("./toast"), exports);
24
+ __exportStar(require("./style"), exports);
25
+ __exportStar(require("./base64"), exports);
@@ -0,0 +1,4 @@
1
+ export declare enum LabelType {
2
+ ISSUER = "Issuer",
3
+ VERIFIER = "Verifier"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.LabelType = void 0;
4
+ var LabelType;
5
+ (function (LabelType) {
6
+ LabelType["ISSUER"] = "Issuer";
7
+ LabelType["VERIFIER"] = "Verifier";
8
+ })(LabelType = exports.LabelType || (exports.LabelType = {}));
@@ -0,0 +1,7 @@
1
+ export declare enum OpacityStyleEnum {
2
+ DISABLED = 0.5
3
+ }
4
+ export type GradientProperties = {
5
+ primaryColor: string;
6
+ secondaryColor: string;
7
+ };
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.OpacityStyleEnum = void 0;
4
+ var OpacityStyleEnum;
5
+ (function (OpacityStyleEnum) {
6
+ OpacityStyleEnum[OpacityStyleEnum["DISABLED"] = 0.5] = "DISABLED";
7
+ })(OpacityStyleEnum = exports.OpacityStyleEnum || (exports.OpacityStyleEnum = {}));
@@ -0,0 +1,12 @@
1
+ import { ComponentType } from 'react';
2
+ export type TabRoute = {
3
+ key: string;
4
+ title: string;
5
+ };
6
+ export type TabViewRoute = TabRoute & {
7
+ content: ComponentType<unknown>;
8
+ };
9
+ export type TabNavigationState = {
10
+ index: number;
11
+ routes: Array<TabViewRoute>;
12
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -0,0 +1,7 @@
1
+ export declare enum ToastType {
2
+ SUCCESS = "ssiToastSuccess",
3
+ ERROR = "ssiToastError"
4
+ }
5
+ export type ToastCustomProps = {
6
+ showBadge?: boolean;
7
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.ToastType = void 0;
4
+ var ToastType;
5
+ (function (ToastType) {
6
+ ToastType["SUCCESS"] = "ssiToastSuccess";
7
+ ToastType["ERROR"] = "ssiToastError";
8
+ })(ToastType = exports.ToastType || (exports.ToastType = {}));
@@ -0,0 +1,3 @@
1
+ import { ParsedBase64Uri } from '../types';
2
+ export declare const getFileSizeDisplay: (bytes: number) => string;
3
+ export declare const parseBase64Uri: (base64Uri: string) => ParsedBase64Uri;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.parseBase64Uri = exports.getFileSizeDisplay = void 0;
4
+ var getFileSizeDisplay = function (bytes) {
5
+ if (bytes < 1024) {
6
+ return "".concat(bytes, " B");
7
+ }
8
+ else if (bytes <= 1024 * 1024) {
9
+ return "".concat((bytes / 1024).toFixed(1), " KB");
10
+ }
11
+ else if (bytes <= 1024 * 1024 * 1024) {
12
+ return "".concat((bytes / (1024 * 1024)).toFixed(1), " MB");
13
+ }
14
+ else {
15
+ return "".concat((bytes / (1024 * 1024 * 1024)).toFixed(1), " GB");
16
+ }
17
+ };
18
+ exports.getFileSizeDisplay = getFileSizeDisplay;
19
+ var parseBase64Uri = function (base64Uri) {
20
+ var base64Parts = base64Uri.split(';base64,');
21
+ var mimeType = base64Parts[0].replace('data:', '');
22
+ return {
23
+ base64Uri: base64Uri,
24
+ base64: base64Parts[1],
25
+ mimeType: mimeType
26
+ };
27
+ };
28
+ exports.parseBase64Uri = parseBase64Uri;
@@ -18,6 +18,18 @@ var getStatusTranslation = function (status) {
18
18
  return Localization_1["default"].translate('credential_status_expired');
19
19
  case types_1.CredentialStatus.REVOKED:
20
20
  return Localization_1["default"].translate('credential_status_revoked');
21
+ case types_1.WorkflowStatus.APPROVED:
22
+ return Localization_1["default"].translate('workflow_status_approved');
23
+ case types_1.WorkflowStatus.ARCHIVED:
24
+ return Localization_1["default"].translate('workflow_status_archived');
25
+ case types_1.WorkflowStatus.DECLINED:
26
+ return Localization_1["default"].translate('workflow_status_declined');
27
+ case types_1.WorkflowStatus.DONE:
28
+ return Localization_1["default"].translate('workflow_status_done');
29
+ case types_1.WorkflowStatus.NEW:
30
+ return Localization_1["default"].translate('workflow_status_new');
31
+ case types_1.WorkflowStatus.PENDING:
32
+ return Localization_1["default"].translate('workflow_status_pending');
21
33
  default:
22
34
  return Localization_1["default"].translate('status_missing');
23
35
  }
@@ -2,3 +2,4 @@ export * from './ImageUtils';
2
2
  export * from './DateUtils';
3
3
  export * from './TranslationUtils';
4
4
  export * from './UserUtils';
5
+ export * from './FileUtils';
@@ -18,3 +18,4 @@ __exportStar(require("./ImageUtils"), exports);
18
18
  __exportStar(require("./DateUtils"), exports);
19
19
  __exportStar(require("./TranslationUtils"), exports);
20
20
  __exportStar(require("./UserUtils"), exports);
21
+ __exportStar(require("./FileUtils"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.core",
3
3
  "private": false,
4
- "version": "0.1.3-unstable.14+af3a5ae",
4
+ "version": "0.1.3-unstable.145+66bd1c4",
5
5
  "description": "SSI UI components Core",
6
6
  "repository": "git@github.com:Sphereon-Opensource/UI-Components.git",
7
7
  "author": "Sphereon <dev@sphereon.com>",
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "react": ">= 16.8.0"
45
45
  },
46
- "gitHead": "af3a5aea914a8d012b69cb5cf5ad1ad6141711cb"
46
+ "gitHead": "66bd1c46e40b7a5930b8f02404d2924d36954110"
47
47
  }