@streamlayer/react-ui 0.92.0 → 0.93.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/assets/style.css +1 -1
- package/lib/index.js +5 -4
- package/lib/ui/app/Features/Gamification/Tabs.js +36 -32
- package/lib/ui/app/Features/Gamification/gamification-feature.js +4 -1
- package/lib/ui/app/Features/Gamification/index.js +42 -38
- package/lib/ui/app/Navigation/MastersNavigation/index.js +27 -25
- package/lib/ui/app/Notifications/Onboarding/index.js +91 -80
- package/lib/ui/app/Notifications/index.js +65 -60
- package/lib/ui/app/Points/index.js +6 -5
- package/lib/ui/app/masters.js +8 -2
- package/lib/ui/app/styles.d.ts +1 -0
- package/lib/ui/app/styles.js +6 -1
- package/lib/ui/app/useImagesPreload.d.ts +4 -0
- package/lib/ui/app/useImagesPreload.js +23 -0
- package/lib/ui/app/useSdkResponsive.js +11 -11
- package/lib/ui/app/useSdkScroll.d.ts +1 -0
- package/lib/ui/app/useSdkScroll.js +29 -21
- package/lib/ui/gamification/detail/header/index.js +11 -11
- package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
- package/lib/ui/gamification/detail/header/styles.js +11 -11
- package/lib/ui/gamification/onboarding/index.d.ts +1 -0
- package/lib/ui/gamification/onboarding/index.js +54 -43
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
- package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
- package/lib/ui/gamification/points/index.js +5 -4
- package/lib/ui/gamification/question/insight/index.js +5 -5
- package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
- package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
- package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
- package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
- package/lib/ui/gamification/vote/index.js +57 -56
- package/lib/ui/gamification/vote/insight-details/index.js +1 -1
- package/lib/ui/gamification/vote/vote-option/index.js +61 -57
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/index.js +21 -20
- package/lib/ui/navigation/masters.d.ts +2 -1
- package/lib/ui/navigation/masters.js +9 -4
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.js +21 -27
- package/lib/ui/skeleton/index.d.ts +7 -0
- package/lib/ui/skeleton/index.js +7 -0
- package/lib/ui/skeleton/styles.d.ts +2 -0
- package/lib/ui/skeleton/styles.js +9 -0
- package/lib/ui/theme/breakpoints.d.ts +4 -1
- package/lib/ui/theme/breakpoints.js +24 -12
- package/lib/ui/theme/constants.d.ts +4 -0
- package/lib/ui/theme/constants.js +6 -2
- package/lib/ui/theme/index.js +4 -3
- package/lib/ui/theme/theme.js +29 -21
- package/lib/utils/decorators/container.js +4 -3
- package/package.json +18 -18
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import { BREAKPOINTS as e } from "./constants.js";
|
|
2
|
-
const
|
|
3
|
-
@media (${
|
|
4
|
-
${
|
|
1
|
+
import { BREAKPOINTS as e, ORIENTATION as a } from "./constants.js";
|
|
2
|
+
const r = (n) => (t) => `
|
|
3
|
+
@media only screen and (${n}) {
|
|
4
|
+
${t}
|
|
5
5
|
}
|
|
6
|
-
`,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
`, d = (n, t) => (i) => `
|
|
7
|
+
@media only screen and (${n}) and (${t}) {
|
|
8
|
+
${i}
|
|
9
|
+
}
|
|
10
|
+
`, s = {
|
|
11
|
+
up: (n) => {
|
|
12
|
+
const t = e[n];
|
|
13
|
+
return r(`min-width: ${t}px`);
|
|
14
|
+
},
|
|
15
|
+
down: (n) => {
|
|
16
|
+
const t = e[n] - 1;
|
|
17
|
+
return r(`max-width: ${t}px`);
|
|
18
|
+
},
|
|
19
|
+
intermediate: (n, t) => {
|
|
20
|
+
const i = e[n] - 1, o = e[t];
|
|
21
|
+
return d(`max-width: ${i}px`, `min-width: ${o}px`);
|
|
10
22
|
},
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
return
|
|
23
|
+
orientation: (n) => {
|
|
24
|
+
const t = a[n];
|
|
25
|
+
return r(`orientation: ${t}`);
|
|
14
26
|
}
|
|
15
27
|
};
|
|
16
28
|
export {
|
|
17
|
-
|
|
29
|
+
s as breakpoints
|
|
18
30
|
};
|
|
@@ -60,7 +60,10 @@ const N = {
|
|
|
60
60
|
lg: 992,
|
|
61
61
|
xl: 1200,
|
|
62
62
|
xxl: 1400
|
|
63
|
-
}, G =
|
|
63
|
+
}, G = {
|
|
64
|
+
landscape: "landscape",
|
|
65
|
+
portrait: "portrait"
|
|
66
|
+
}, B = Object.keys(E).reduce((A, R) => {
|
|
64
67
|
const _ = E[R];
|
|
65
68
|
return `
|
|
66
69
|
${A}
|
|
@@ -72,5 +75,6 @@ export {
|
|
|
72
75
|
E as COLORS,
|
|
73
76
|
S as FONT,
|
|
74
77
|
T as MASTERS_COLORS,
|
|
75
|
-
G as
|
|
78
|
+
G as ORIENTATION,
|
|
79
|
+
B as colors
|
|
76
80
|
};
|
package/lib/ui/theme/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { theme as
|
|
2
|
+
import { theme as o } from "./theme.js";
|
|
3
|
+
import "./breakpoints.js";
|
|
3
4
|
import "./constants.js";
|
|
4
|
-
const
|
|
5
|
+
const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
p as StreamLayerThemeProvider
|
|
7
8
|
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,36 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
--font-
|
|
7
|
-
--font-
|
|
8
|
-
--font-
|
|
9
|
-
--font-
|
|
1
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { breakpoints as d } from "./breakpoints.js";
|
|
3
|
+
import { colors as s, FONT as e } from "./constants.js";
|
|
4
|
+
const h = `
|
|
5
|
+
${s}
|
|
6
|
+
--font-family: ${e.REGULAR};
|
|
7
|
+
--font-regular: ${e.REGULAR};
|
|
8
|
+
--font-color: ${e.COLOR};
|
|
9
|
+
--font-serif: ${e.SERIF};
|
|
10
|
+
--font-weight-default: ${e.WEIGHT_DEFAULT};
|
|
10
11
|
|
|
12
|
+
--header-offset: 0px;
|
|
11
13
|
--header-height: 68px;
|
|
12
14
|
--animation-duration: 0.5s;
|
|
13
15
|
--animation-function: ease;
|
|
14
16
|
--container-padding: 16px;
|
|
15
17
|
--border-radius: 8px;
|
|
16
18
|
--pill-offset: 0px;
|
|
17
|
-
|
|
19
|
+
--max-width: 600px;
|
|
20
|
+
--max-notifications-width: 400px;
|
|
21
|
+
|
|
22
|
+
${d.down("xl")`
|
|
23
|
+
--header-offset: 56px;
|
|
24
|
+
`}
|
|
25
|
+
`, m = "StreamLayerCSSReset", p = "ttkj0ah", x = () => /* @__PURE__ */ t("table", {
|
|
18
26
|
children: /* @__PURE__ */ r("table", {
|
|
19
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ t("thead", {
|
|
20
28
|
children: /* @__PURE__ */ r("tr", {
|
|
21
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ t("th", {
|
|
22
30
|
children: "name"
|
|
23
|
-
}), /* @__PURE__ */
|
|
31
|
+
}), /* @__PURE__ */ t("th", {
|
|
24
32
|
children: "value"
|
|
25
33
|
})]
|
|
26
34
|
})
|
|
27
|
-
}), /* @__PURE__ */
|
|
28
|
-
children:
|
|
35
|
+
}), /* @__PURE__ */ t("tbody", {
|
|
36
|
+
children: h.split(";").map((i) => {
|
|
29
37
|
const n = i.trim(), [o, a] = n.split(":");
|
|
30
38
|
return /* @__PURE__ */ r("tr", {
|
|
31
|
-
children: [/* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ t("td", {
|
|
32
40
|
children: o
|
|
33
|
-
}), /* @__PURE__ */
|
|
41
|
+
}), /* @__PURE__ */ t("td", {
|
|
34
42
|
children: a
|
|
35
43
|
})]
|
|
36
44
|
}, n);
|
|
@@ -39,8 +47,8 @@ const s = `
|
|
|
39
47
|
})
|
|
40
48
|
});
|
|
41
49
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
x as ThemeVariables,
|
|
51
|
+
m as resetCss,
|
|
52
|
+
p as theme,
|
|
53
|
+
h as themeStr
|
|
46
54
|
};
|
|
@@ -2,10 +2,11 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
|
|
3
3
|
import { AppContainer as t } from "./styles.js";
|
|
4
4
|
import "../../ui/theme/theme.js";
|
|
5
|
+
import "../../ui/theme/breakpoints.js";
|
|
5
6
|
import "../../ui/theme/constants.js";
|
|
6
7
|
import "@linaria/react";
|
|
7
|
-
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, {}) }) }) });
|
|
8
9
|
export {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
l as container,
|
|
11
|
+
a as theme
|
|
11
12
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.93.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -36,24 +36,24 @@
|
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lottiefiles/react-lottie-player": "*",
|
|
39
|
-
"@streamlayer/sl-eslib": "^5.
|
|
39
|
+
"@streamlayer/sl-eslib": "^5.64.1",
|
|
40
40
|
"@types/lodash.throttle": "^4.1.9",
|
|
41
41
|
"lodash.throttle": "^4.1.1",
|
|
42
42
|
"react-infinite-scroller": "^1.2.6",
|
|
43
43
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
44
44
|
"react-window": "^1.8.10",
|
|
45
45
|
"react-window-infinite-loader": "^1.0.9",
|
|
46
|
-
"@streamlayer/feature-gamification": "^0.35.
|
|
47
|
-
"@streamlayer/sdk-web": "^0.30.
|
|
48
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.11.
|
|
49
|
-
"@streamlayer/sdk-web-api": "^0.20.
|
|
50
|
-
"@streamlayer/sdk-web-core": "^0.18.
|
|
51
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
52
|
-
"@streamlayer/sdk-web-interfaces": "^0.20.
|
|
53
|
-
"@streamlayer/sdk-web-notifications": "^0.13.
|
|
54
|
-
"@streamlayer/sdk-web-
|
|
55
|
-
"@streamlayer/sdk-web-
|
|
56
|
-
"@streamlayer/sdk-web-
|
|
46
|
+
"@streamlayer/feature-gamification": "^0.35.1",
|
|
47
|
+
"@streamlayer/sdk-web": "^0.30.2",
|
|
48
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.34",
|
|
49
|
+
"@streamlayer/sdk-web-api": "^0.20.1",
|
|
50
|
+
"@streamlayer/sdk-web-core": "^0.18.2",
|
|
51
|
+
"@streamlayer/sdk-web-features": "^0.11.16",
|
|
52
|
+
"@streamlayer/sdk-web-interfaces": "^0.20.1",
|
|
53
|
+
"@streamlayer/sdk-web-notifications": "^0.13.7",
|
|
54
|
+
"@streamlayer/sdk-web-logger": "^0.5.12",
|
|
55
|
+
"@streamlayer/sdk-web-storage": "^0.3.12",
|
|
56
|
+
"@streamlayer/sdk-web-types": "^0.21.1"
|
|
57
57
|
},
|
|
58
58
|
"nx": {
|
|
59
59
|
"implicitDependencies": [
|
|
@@ -69,12 +69,12 @@
|
|
|
69
69
|
"@linaria/core": "^6.0.0",
|
|
70
70
|
"@linaria/react": "^6.0.0",
|
|
71
71
|
"@nanostores/react": "^0.7.1",
|
|
72
|
-
"@storybook/addon-docs": "^7.6.
|
|
72
|
+
"@storybook/addon-docs": "^7.6.11",
|
|
73
73
|
"@storybook/addon-styling": "^1.3.7",
|
|
74
|
-
"@storybook/addon-viewport": "^7.6.
|
|
75
|
-
"@storybook/blocks": "^7.6.
|
|
74
|
+
"@storybook/addon-viewport": "^7.6.11",
|
|
75
|
+
"@storybook/blocks": "^7.6.11",
|
|
76
76
|
"@storybook/jest": "^0.2.3",
|
|
77
|
-
"@storybook/react": "^7.6.
|
|
77
|
+
"@storybook/react": "^7.6.11",
|
|
78
78
|
"@storybook/testing-library": "^0.2.2",
|
|
79
79
|
"@types/react-infinite-scroller": "^1.2.5",
|
|
80
80
|
"@types/react-window": "^1.8.8",
|
|
@@ -94,6 +94,6 @@
|
|
|
94
94
|
"vite-plugin-svgr": "^4.2.0",
|
|
95
95
|
"vite-svg-loader": "^5.1.0",
|
|
96
96
|
"vite-tsconfig-paths": "^4.3.1",
|
|
97
|
-
"@streamlayer/react": "^0.37.
|
|
97
|
+
"@streamlayer/react": "^0.37.1"
|
|
98
98
|
}
|
|
99
99
|
}
|