@streamlayer/react-ui 0.39.0 → 0.41.0
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/lib/index.d.ts +1 -1
- package/lib/index.js +6 -6
- package/lib/ui/app/Features/Gamification/Leaderboard.js +2 -2
- package/lib/ui/app/Features/Gamification/Question.js +40 -55
- package/lib/ui/app/Features/Gamification/QuestionsList.js +5 -4
- package/lib/ui/app/Features/Gamification/Tabs.js +20 -19
- package/lib/ui/app/Features/Gamification/UserSummary.js +2 -2
- package/lib/ui/app/Features/Gamification/index.js +11 -17
- package/lib/ui/app/Features/index.js +11 -17
- package/lib/ui/app/masters.js +11 -16
- package/lib/ui/app/styles.d.ts +3 -0
- package/lib/ui/app/styles.js +13 -8
- package/lib/ui/demo/Gamification.js +5 -5
- package/lib/ui/demo/Highlights.js +3 -3
- package/lib/ui/demo/components/Leaderboard.js +2 -2
- package/lib/ui/demo/components/Question.js +13 -14
- package/lib/ui/demo/components/QuestionsList.js +5 -4
- package/lib/ui/demo/components/UserSummary.js +2 -2
- package/lib/ui/demo/components/index.js +5 -5
- package/lib/ui/demo/index.js +6 -6
- package/lib/ui/gamification/constants.d.ts +6 -0
- package/lib/ui/gamification/constants.js +13 -0
- package/lib/ui/gamification/leaderboard-item-detail/index.js +2 -2
- package/lib/ui/gamification/question/index.js +28 -35
- package/lib/ui/gamification/{question-list → question/list}/index.js +8 -7
- package/lib/ui/gamification/tabs/styles.js +6 -11
- package/lib/ui/gamification/user-statistics/components/rank/styles.js +14 -11
- package/lib/ui/gamification/user-statistics/components/statistic/index.d.ts +7 -0
- package/lib/ui/gamification/user-statistics/components/statistic/index.js +10 -0
- package/lib/ui/gamification/user-statistics/components/{statistics → statistic}/styles.d.ts +1 -0
- package/lib/ui/gamification/user-statistics/components/statistic/styles.js +23 -0
- package/lib/ui/gamification/user-statistics/index.js +38 -35
- package/lib/ui/gamification/user-statistics/styles.d.ts +3 -1
- package/lib/ui/gamification/user-statistics/styles.js +63 -52
- package/lib/ui/gamification/vote/vote-header/index.d.ts +8 -0
- package/lib/ui/gamification/vote/vote-header/index.js +20 -0
- package/lib/ui/gamification/vote/vote-header/styles.d.ts +7 -0
- package/lib/ui/gamification/vote/vote-header/styles.js +59 -0
- package/lib/ui/icons/index.d.ts +0 -1
- package/lib/ui/icons/index.js +32 -33
- package/lib/ui/navigation/masters.js +4 -3
- package/lib/ui/theme/constants.d.ts +0 -2
- package/lib/ui/theme/constants.js +7 -9
- package/lib/utils/common.js +3 -2
- package/lib/utils/decorators/container.js +5 -7
- package/package.json +7 -7
- package/lib/fedex-a8dcc7b2.js +0 -4
- package/lib/ui/gamification/user-statistics/components/statistics/index.d.ts +0 -7
- package/lib/ui/gamification/user-statistics/components/statistics/index.js +0 -10
- package/lib/ui/gamification/user-statistics/components/statistics/styles.js +0 -16
- package/lib/ui/theme/Typography.d.ts +0 -2
- package/lib/ui/theme/Typography.js +0 -53
- /package/lib/ui/gamification/{question-list → question/list}/index.d.ts +0 -0
- /package/lib/ui/gamification/{question-list → question/list}/styles.d.ts +0 -0
- /package/lib/ui/gamification/{question-list → question/list}/styles.js +0 -0
|
@@ -8,7 +8,6 @@ const N = {
|
|
|
8
8
|
BG_TRANSPARENT_VOTE_PROGRESS: "rgba(255, 255, 255, 0.2)",
|
|
9
9
|
BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS: "rgba(60, 139, 251, 0.5)",
|
|
10
10
|
BG_TRANSPARENT_VOTE_PROGRESS_ERROR: "rgba(205, 37, 37, 0.5)",
|
|
11
|
-
BG_TRANSPARENT_USER_CONTAINER: "rgba(255, 255, 255, 0.05)",
|
|
12
11
|
BG_TRANSPARENT_ONBOARDING_INAPP: "rgba(138, 159, 182, 0.2)",
|
|
13
12
|
LEADERBOARD_UNIT: "rgba(255, 255, 255, 0.5)",
|
|
14
13
|
BLUE_PRIMARY: "#1589EE",
|
|
@@ -26,7 +25,6 @@ const N = {
|
|
|
26
25
|
RED_1: "#A30000",
|
|
27
26
|
RED_2: "#FF4170",
|
|
28
27
|
GREY_PRIMARY: "#909395",
|
|
29
|
-
DIVIDER_COLOR_PRIMARY: "#2d3135",
|
|
30
28
|
DIVIDER_COLOR_SECONDARY: "#53565a",
|
|
31
29
|
GREEN_PRIMARY_BTN: "#009B77"
|
|
32
30
|
}, T = {
|
|
@@ -50,20 +48,20 @@ const N = {
|
|
|
50
48
|
NEUTRALS_GRAY9: "#25282A",
|
|
51
49
|
NEUTRALS_BLACK: "#000000"
|
|
52
50
|
}, E = Object.assign({}, N, T), S = {
|
|
53
|
-
REGULAR: "'Benton Sans', BentonSans,
|
|
54
|
-
SERIF: "'Tiempos', 'Tiempos Text',
|
|
51
|
+
REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
|
|
52
|
+
SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
|
|
55
53
|
COLOR: "#fff",
|
|
56
54
|
WEIGHT_DEFAULT: "500"
|
|
57
|
-
},
|
|
58
|
-
const
|
|
55
|
+
}, G = Object.keys(E).reduce((A, R) => {
|
|
56
|
+
const _ = E[R];
|
|
59
57
|
return `
|
|
60
|
-
${
|
|
61
|
-
--color-${R.toLowerCase().replaceAll("_", "-")}: ${
|
|
58
|
+
${A}
|
|
59
|
+
--color-${R.toLowerCase().replaceAll("_", "-")}: ${_};
|
|
62
60
|
`;
|
|
63
61
|
}, "");
|
|
64
62
|
export {
|
|
65
63
|
E as COLORS,
|
|
66
64
|
S as FONT,
|
|
67
65
|
T as MASTERS_COLORS,
|
|
68
|
-
|
|
66
|
+
G as colors
|
|
69
67
|
};
|
package/lib/utils/common.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = (t) => t.split(/\s+/).map((o) => o[0]).join("").toUpperCase(), a = (t) => t ? t.toLocaleString("en-US") : "0";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
e as abbreviate,
|
|
4
|
+
a as formatDecimals
|
|
4
5
|
};
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { StreamLayerThemeProvider as
|
|
3
|
-
import {
|
|
4
|
-
import { AppContainer as i } from "./styles.js";
|
|
2
|
+
import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
|
|
3
|
+
import { AppContainer as t } from "./styles.js";
|
|
5
4
|
import "../../ui/theme/theme.js";
|
|
6
5
|
import "@linaria/core";
|
|
7
6
|
import "../../ui/theme/constants.js";
|
|
8
|
-
import "react";
|
|
9
7
|
import "@linaria/react";
|
|
10
|
-
const
|
|
8
|
+
const a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), l = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
|
|
11
9
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
l as container,
|
|
11
|
+
a as theme
|
|
14
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"@streamlayer/sl-eslib": "^5.52.0",
|
|
30
|
-
"@streamlayer/
|
|
31
|
-
"@streamlayer/
|
|
32
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.10.
|
|
30
|
+
"@streamlayer/feature-gamification": "^0.18.1",
|
|
31
|
+
"@streamlayer/sdk-web": "^0.28.3",
|
|
32
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.10.12",
|
|
33
33
|
"@streamlayer/sdk-web-api": "^0.0.6",
|
|
34
|
-
"@streamlayer/sdk-web-core": "^0.
|
|
35
|
-
"@streamlayer/sdk-web-features": "^0.10.
|
|
34
|
+
"@streamlayer/sdk-web-core": "^0.15.0",
|
|
35
|
+
"@streamlayer/sdk-web-features": "^0.10.6",
|
|
36
36
|
"@streamlayer/sdk-web-interfaces": "^0.18.4",
|
|
37
37
|
"@streamlayer/sdk-web-notifications": "^0.10.3",
|
|
38
38
|
"@streamlayer/sdk-web-storage": "^0.3.6",
|
|
@@ -73,6 +73,6 @@
|
|
|
73
73
|
"vite-plugin-svgr": "^4.1.0",
|
|
74
74
|
"vite-svg-loader": "^4.0.0",
|
|
75
75
|
"vite-tsconfig-paths": "^4.2.1",
|
|
76
|
-
"@streamlayer/react": "^0.
|
|
76
|
+
"@streamlayer/react": "^0.24.0"
|
|
77
77
|
}
|
|
78
78
|
}
|
package/lib/fedex-a8dcc7b2.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const M = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjgiIGhlaWdodD0iMjIiIHZpZXdCb3g9IjAgMCA2OCAyMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9IlZlY3RvciI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTYuNjE1NSA3LjQ0MTQ2SDUwLjcwNjZMNTYuMzA3MiAxMy44NjE1TDUwLjcwNjYgMjAuMjgwNUg1Ni40MzU3TDU5LjE1ODcgMTcuMTM3TDYxLjkwNjggMjAuMjgwNUg2Ny44NEw2Mi4xOSAxMy44MzQ4TDY3Ljc2MzYgNy40NDE0Nkg2Mi4wNjA2TDU5LjM4OTcgMTAuNTYwMkw1Ni42MTU1IDcuNDQxNDZaTTYyLjI3MjEgNy45MTY1OUw1OS4zOTY0IDExLjI3NDdMNTYuNDA5MiA3LjkxNjU5SDUxLjc0NDZMN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|
-
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Container as n, Indicator as c } from "./styles.js";
|
|
3
|
-
import "@linaria/react";
|
|
4
|
-
const p = ({ indicator: i, title: t }) => /* @__PURE__ */ o(n, { children: [
|
|
5
|
-
/* @__PURE__ */ r(c, { children: i }),
|
|
6
|
-
/* @__PURE__ */ r("p", { children: t })
|
|
7
|
-
] });
|
|
8
|
-
export {
|
|
9
|
-
p as Statistics
|
|
10
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { styled as t } from "@linaria/react";
|
|
2
|
-
const o = t.div`
|
|
3
|
-
font-weight: 700;
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
row-gap: 4px;
|
|
7
|
-
align-items: center;
|
|
8
|
-
text-align: center;
|
|
9
|
-
`, i = t.div`
|
|
10
|
-
font-size: 18px;
|
|
11
|
-
color: #fff;
|
|
12
|
-
`;
|
|
13
|
-
export {
|
|
14
|
-
o as Container,
|
|
15
|
-
i as Indicator
|
|
16
|
-
};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect as g } from "react";
|
|
3
|
-
const p = ["SL-FONT1", "SL-FONT2"], u = () => {
|
|
4
|
-
g(() => {
|
|
5
|
-
const o = window.document.styleSheets[0];
|
|
6
|
-
for (const t of p) {
|
|
7
|
-
const e = window.localStorage.getItem(t);
|
|
8
|
-
e && o.insertRule(
|
|
9
|
-
`
|
|
10
|
-
@font-face {
|
|
11
|
-
font-family: '${t}';
|
|
12
|
-
src: url(data:application/octet-stream;base64,${e});
|
|
13
|
-
}
|
|
14
|
-
`,
|
|
15
|
-
o.cssRules.length
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
}, []);
|
|
19
|
-
}, y = () => {
|
|
20
|
-
const o = (t) => {
|
|
21
|
-
var i;
|
|
22
|
-
const e = t.target.name, a = (i = t.target.files) == null ? void 0 : i[0];
|
|
23
|
-
if (!a)
|
|
24
|
-
return;
|
|
25
|
-
const r = new FileReader();
|
|
26
|
-
r.onloadend = (m) => {
|
|
27
|
-
var c, l;
|
|
28
|
-
const n = (l = (c = m.target) == null ? void 0 : c.result) == null ? void 0 : l.toString();
|
|
29
|
-
if (n) {
|
|
30
|
-
const f = window.document.styleSheets[0];
|
|
31
|
-
f.insertRule(
|
|
32
|
-
`
|
|
33
|
-
@font-face {
|
|
34
|
-
font-family: '${e}';
|
|
35
|
-
src: url(data:application/octet-stream;base64,${n});
|
|
36
|
-
}
|
|
37
|
-
`,
|
|
38
|
-
f.cssRules.length
|
|
39
|
-
), window.localStorage.setItem(e, n);
|
|
40
|
-
}
|
|
41
|
-
}, r.readAsText(a);
|
|
42
|
-
};
|
|
43
|
-
return u(), /* @__PURE__ */ s("div", { children: p.map((t) => /* @__PURE__ */ d("p", { style: { fontSize: "32px", fontFamily: t, lineHeight: "45px" }, children: [
|
|
44
|
-
"[",
|
|
45
|
-
t,
|
|
46
|
-
"] Typography - Desktop/Mobile/App",
|
|
47
|
-
!window.localStorage.getItem(t) && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("input", { type: "file", name: t, accept: ".txt", onChange: o }) })
|
|
48
|
-
] })) });
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
y as Typography,
|
|
52
|
-
u as useCustomFonts
|
|
53
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|