@sphereon/ui-components.core 0.3.1-unstable.5 → 0.4.1-next.10

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.
@@ -0,0 +1,49 @@
1
+ :root {
2
+ --border-radius-1: 0.125rem; /* 2px */
3
+ --border-radius-2: 0.25rem; /* 4px */
4
+ --border-radius-3: 0.375rem; /* 6px */
5
+ --border-radius-4: 0.5rem; /* 8px */
6
+ --border-radius-6: 0.75rem; /* 12px */
7
+ --border-radius-8: 1rem; /* 16px */
8
+ --border-radius-12: 1.5rem; /* 24px */
9
+ --border-radius-full: 50%; /* full radius */
10
+
11
+ --spacing-0_5: 0.125rem; /* 2px */
12
+ --spacing-1: 0.25rem; /* 4px */
13
+ --spacing-1_5: 0.375rem; /* 6px */
14
+ --spacing-4: 1rem; /* 16px */
15
+
16
+ --color-grey-50: #FBFBFB;
17
+ --color-grey-600: #727272;
18
+ --color-grey-900: #0A0D12;
19
+ --color-grey-1000: #ECECEC; /* FIXME UXDS-21 this color in the design has no token */
20
+ --color-grey-1100: #8D9099; /* FIXME UXDS-21 this color in the design has no token */
21
+
22
+ --color-brand-50: #ECE4FC;
23
+
24
+ --color-selenas-500: #A92CD5;
25
+
26
+ --color-warning-500: #ED8E00; /* FIXME UXDS-21 token name should be updated in figma design */
27
+
28
+ --color-magenta-500: #F4003A;
29
+
30
+ --color-pending-500: #0B81FF; /* FIXME UXDS-21 token name should be updated in figma design */
31
+
32
+ --font-family: 'Poppins';
33
+
34
+ --font-size-1: 0.625rem; /* 10px */
35
+ --font-size-4: 1rem; /* 16px */
36
+
37
+ --font-weight-regular: 400;
38
+
39
+ /* FIXME UXDS-21 temporary composite tokens until the tokens in figma have been fixed */
40
+ --text-style-1: normal var(--font-weight-regular) var(--font-size-1)/1.5 var(--font-family), sans-serif;
41
+ --text-style-2: normal var(--font-weight-regular) var(--font-size-4)/1.5 var(--font-family), sans-serif;
42
+
43
+ .font-1 {
44
+ font: var(--text-style-1);
45
+ }
46
+ .font-2 {
47
+ font: var(--text-style-2);
48
+ }
49
+ }
@@ -7,3 +7,4 @@ export * from './tab';
7
7
  export * from './toast';
8
8
  export * from './style';
9
9
  export * from './base64';
10
+ export * from './roles';
@@ -23,3 +23,4 @@ __exportStar(require("./tab"), exports);
23
23
  __exportStar(require("./toast"), exports);
24
24
  __exportStar(require("./style"), exports);
25
25
  __exportStar(require("./base64"), exports);
26
+ __exportStar(require("./roles"), exports);
@@ -0,0 +1,6 @@
1
+ export declare enum RoleType {
2
+ HOLDER = "HOLDER",
3
+ ISSUER = "ISSUER",
4
+ RELYING_PARTY = "RELYING_PARTY",
5
+ ADMIN = "ADMIN"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ exports.RoleType = void 0;
4
+ var RoleType;
5
+ (function (RoleType) {
6
+ RoleType["HOLDER"] = "HOLDER";
7
+ RoleType["ISSUER"] = "ISSUER";
8
+ RoleType["RELYING_PARTY"] = "RELYING_PARTY";
9
+ RoleType["ADMIN"] = "ADMIN";
10
+ })(RoleType = exports.RoleType || (exports.RoleType = {}));
@@ -6,4 +6,5 @@ export declare const DATE_FORMAT_OPTIONS: {
6
6
  };
7
7
  export declare const toLocalDateTimeString: (date: number) => string;
8
8
  export declare const toLocalDateString: (date: number) => string;
9
+ export declare const formatDate: (date: number) => number;
9
10
  export declare const makeEpochMilli: (date: number) => number;
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  exports.__esModule = true;
17
- exports.makeEpochMilli = exports.toLocalDateString = exports.toLocalDateTimeString = exports.DATE_FORMAT_OPTIONS = exports.EPOCH_MILLISECONDS = void 0;
17
+ exports.makeEpochMilli = exports.formatDate = exports.toLocalDateString = exports.toLocalDateTimeString = exports.DATE_FORMAT_OPTIONS = exports.EPOCH_MILLISECONDS = void 0;
18
18
  var Localization_1 = __importDefault(require("../localization/Localization"));
19
19
  exports.EPOCH_MILLISECONDS = 1000;
20
20
  exports.DATE_FORMAT_OPTIONS = {
@@ -23,11 +23,11 @@ exports.DATE_FORMAT_OPTIONS = {
23
23
  day: 'numeric'
24
24
  };
25
25
  var toLocalDateTimeString = function (date) {
26
- return new Date(formatDate(date)).toLocaleString(Localization_1["default"].getLocale(), __assign(__assign({}, exports.DATE_FORMAT_OPTIONS), { hour: 'numeric', minute: 'numeric', second: 'numeric' }));
26
+ return new Date((0, exports.formatDate)(date)).toLocaleString(Localization_1["default"].getLocale(), __assign(__assign({}, exports.DATE_FORMAT_OPTIONS), { hour: 'numeric', minute: 'numeric', second: 'numeric' }));
27
27
  };
28
28
  exports.toLocalDateTimeString = toLocalDateTimeString;
29
29
  var toLocalDateString = function (date) {
30
- return new Date(formatDate(date)).toLocaleDateString(Localization_1["default"].getLocale(), exports.DATE_FORMAT_OPTIONS);
30
+ return new Date((0, exports.formatDate)(date)).toLocaleDateString(Localization_1["default"].getLocale(), exports.DATE_FORMAT_OPTIONS);
31
31
  };
32
32
  exports.toLocalDateString = toLocalDateString;
33
33
  var formatDate = function (date) {
@@ -38,6 +38,7 @@ var formatDate = function (date) {
38
38
  }
39
39
  return epoch;
40
40
  };
41
+ exports.formatDate = formatDate;
41
42
  var makeEpochMilli = function (date) {
42
43
  if (!isEpochMilli(date)) {
43
44
  date = date * exports.EPOCH_MILLISECONDS;
@@ -49,7 +50,7 @@ var isEpochMilli = function (date) {
49
50
  return date.toString().length > 10;
50
51
  };
51
52
  var removeFractionalPart = function (date) {
52
- if (date.toString().includes('.')) {
53
+ if (date.toString().indexOf('.') >= 0) {
53
54
  return Number(date.toString().split('.')[0]);
54
55
  }
55
56
  return date;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sphereon/ui-components.core",
3
3
  "private": false,
4
- "version": "0.3.1-unstable.5+14fb900",
4
+ "version": "0.4.1-next.10+8822e2f",
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>",
@@ -12,9 +12,16 @@
12
12
  "Self-sovereign identity (SSI)"
13
13
  ],
14
14
  "scripts": {
15
- "build": "tsc",
15
+ "build": "pnpm run copy-css && tsc",
16
+ "copy-css": "copy-files-from-to",
16
17
  "build:clean": "tsc --build --clean && tsc --build"
17
18
  },
19
+ "copyFiles": [
20
+ {
21
+ "from": "src/**/*.css",
22
+ "to": "dist"
23
+ }
24
+ ],
18
25
  "source": "src/index.ts",
19
26
  "main": "dist/index.js",
20
27
  "types": "dist/index.d.ts",
@@ -39,7 +46,7 @@
39
46
  "typescript": "4.9.5"
40
47
  },
41
48
  "peerDependencies": {
42
- "react": ">= 18"
49
+ "react": ">= 18.2"
43
50
  },
44
- "gitHead": "14fb900e9a7fffa91ed70500402d470afa5aa5b3"
51
+ "gitHead": "8822e2f4d5c44e88f67caee45ef92e08c8777e8e"
45
52
  }