@sphereon/ui-components.core 0.1.2-unstable.4 → 0.1.2
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/styles/ssi/colors.d.ts +2 -0
- package/dist/styles/ssi/colors.js +8 -1
- package/dist/styles/ssi/typography.d.ts +1 -1
- package/dist/utils/UserUtils.d.ts +1 -0
- package/dist/utils/UserUtils.js +26 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +2 -2
|
@@ -12,4 +12,6 @@ type Gradient = 100 | 200;
|
|
|
12
12
|
export declare const gradientColors: Record<Gradient, string>;
|
|
13
13
|
type Border = 'dark' | 'light' | 'lightGrey';
|
|
14
14
|
export declare const borderColors: Record<Border, string>;
|
|
15
|
+
type Profile = 100 | 200 | 300 | 400 | 500;
|
|
16
|
+
export declare const profileColors: Record<Profile, string>;
|
|
15
17
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.borderColors = exports.gradientColors = exports.fontColors = exports.statusColors = exports.logoColors = exports.credentialCardColors = exports.backgroundColors = void 0;
|
|
3
|
+
exports.profileColors = exports.borderColors = exports.gradientColors = exports.fontColors = exports.statusColors = exports.logoColors = exports.credentialCardColors = exports.backgroundColors = void 0;
|
|
4
4
|
exports.backgroundColors = {
|
|
5
5
|
primaryDark: '#202537',
|
|
6
6
|
secondaryDark: '#2C334B',
|
|
@@ -38,3 +38,10 @@ exports.borderColors = {
|
|
|
38
38
|
light: '#E3E3E3',
|
|
39
39
|
lightGrey: '#ACACAC'
|
|
40
40
|
};
|
|
41
|
+
exports.profileColors = {
|
|
42
|
+
100: '#EE5209',
|
|
43
|
+
200: '#FF9900',
|
|
44
|
+
300: '#5BDED3',
|
|
45
|
+
400: '#0B81FF',
|
|
46
|
+
500: '#BD2DFF'
|
|
47
|
+
};
|
|
@@ -4,4 +4,4 @@ export type LineHeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
|
|
|
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' | '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' | 'h7SemiBold';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getInitials: (fullName: string) => string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.getInitials = void 0;
|
|
4
|
+
var getInitials = function (fullName) {
|
|
5
|
+
if (fullName && fullName.length > 0) {
|
|
6
|
+
var namePartsArray = fullName.trim().split(' ');
|
|
7
|
+
var firstInitial = '';
|
|
8
|
+
var lastInitial = '';
|
|
9
|
+
if (namePartsArray.length > 0) {
|
|
10
|
+
var firstName = namePartsArray[0];
|
|
11
|
+
if (firstName.length > 0) {
|
|
12
|
+
firstInitial = firstName[0];
|
|
13
|
+
}
|
|
14
|
+
if (namePartsArray.length > 1) {
|
|
15
|
+
var lastPart = namePartsArray[namePartsArray.length - 1];
|
|
16
|
+
if (lastPart.length > 0) {
|
|
17
|
+
lastInitial = lastPart[0];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
var initials = "".concat(firstInitial).concat(lastInitial);
|
|
22
|
+
return initials.toUpperCase();
|
|
23
|
+
}
|
|
24
|
+
return '?';
|
|
25
|
+
};
|
|
26
|
+
exports.getInitials = getInitials;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
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.2
|
|
4
|
+
"version": "0.1.2",
|
|
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": "
|
|
46
|
+
"gitHead": "45285dfa116751f1cda0fef607c8150031c87db8"
|
|
47
47
|
}
|