@streamlayer/react-ui 0.98.0 → 0.98.1
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/hooks/analytics.js +2 -2
- package/lib/ui/app/Features/Gamification/gamification-feature.js +2 -2
- package/lib/ui/app/Features/Gamification/index.js +42 -44
- package/lib/ui/app/Features/index.js +2 -2
- package/lib/ui/app/Notifications/Onboarding/index.js +7 -8
- package/lib/ui/app/Notifications/index.js +123 -103
- package/lib/ui/app/masters.js +26 -28
- package/lib/ui/gamification/vote/feedback/index.js +34 -34
- package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/styles.js +28 -23
- package/lib/ui/gamification/vote/index.js +105 -100
- package/lib/ui/gamification/vote/vote-option/index.js +33 -31
- package/lib/ui/modal/index.d.ts +0 -1
- package/lib/ui/modal/index.js +45 -37
- package/lib/ui/theme/constants.js +1 -1
- package/lib/ui/theme/theme.js +16 -14
- package/package.json +10 -10
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,52 +1,60 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { styled as h } from "@linaria/react";
|
|
3
|
+
import { useState as w, useEffect as m } from "react";
|
|
4
|
+
import { r as a } from "../../index-jRXrW6ie.js";
|
|
5
|
+
import { BREAKPOINTS as n } from "../theme/constants.js";
|
|
6
6
|
import "../../index-uEuzH3jr.js";
|
|
7
|
-
const
|
|
7
|
+
const y = /* @__PURE__ */ h("div")({
|
|
8
8
|
name: "StaticContainer",
|
|
9
9
|
class: "svm502q",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
12
|
-
body {
|
|
13
|
-
overflow: hidden !important;
|
|
14
|
-
}
|
|
15
|
-
`, y = `
|
|
11
|
+
}), g = `
|
|
16
12
|
.sl-hide-on-modal {
|
|
17
|
-
|
|
13
|
+
height: 0 !important;
|
|
14
|
+
opacity: 0 !important;
|
|
15
|
+
overflow: hidden !important;
|
|
18
16
|
}
|
|
19
|
-
`,
|
|
17
|
+
`, O = `
|
|
20
18
|
.sl-pill-button {
|
|
21
19
|
display: none !important;
|
|
22
20
|
}
|
|
23
|
-
`,
|
|
24
|
-
|
|
25
|
-
l.target instanceof HTMLAnchorElement && l.target.href.slice(-1) === "#" && n(!1);
|
|
26
|
-
}, []), e = i(() => n(!1), []);
|
|
27
|
-
return c(() => (r && (document.addEventListener("scroll", e), document.addEventListener("click", o)), () => {
|
|
28
|
-
document.removeEventListener("scroll", e), document.removeEventListener("click", o);
|
|
29
|
-
}), [r, e, o]), c(() => {
|
|
30
|
-
t === !1 && (document.removeEventListener("scroll", e), document.removeEventListener("click", o));
|
|
31
|
-
}, [t, e, o]), [t];
|
|
32
|
-
}, V = ({
|
|
33
|
-
children: r,
|
|
21
|
+
`, k = ({
|
|
22
|
+
children: i,
|
|
34
23
|
container: t,
|
|
35
|
-
|
|
36
|
-
useContainer: o
|
|
24
|
+
useContainer: f
|
|
37
25
|
}) => {
|
|
38
|
-
const [
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
26
|
+
const [l] = w(() => {
|
|
27
|
+
var r;
|
|
28
|
+
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
29
|
+
return (((r = t.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - e < 0;
|
|
30
|
+
}), [o, s] = w(!1);
|
|
31
|
+
return m(() => {
|
|
32
|
+
if (!t.current || !l)
|
|
33
|
+
return s(!0), () => {
|
|
34
|
+
};
|
|
35
|
+
const e = window.scrollY;
|
|
36
|
+
return s(!0), () => {
|
|
37
|
+
var c;
|
|
38
|
+
const d = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
39
|
+
(((c = t.current) == null ? void 0 : c.getBoundingClientRect().y) || 0) - d < 0 && window.scrollTo({
|
|
40
|
+
top: e
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
}, []), m(() => {
|
|
44
|
+
if (o && t.current && l) {
|
|
45
|
+
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
46
|
+
window.scrollTo({
|
|
47
|
+
top: t.current.offsetTop - e
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}, [o]), !t.current || !o ? null : f ? a.createPortal(/* @__PURE__ */ p(y, {
|
|
51
|
+
children: [i, /* @__PURE__ */ u("style", {
|
|
52
|
+
children: g
|
|
53
|
+
}), /* @__PURE__ */ u("style", {
|
|
54
|
+
children: O
|
|
47
55
|
})]
|
|
48
|
-
}), t.current, "modal-node") :
|
|
56
|
+
}), t.current, "modal-node") : a.createPortal(i, t.current, "modal-node");
|
|
49
57
|
};
|
|
50
58
|
export {
|
|
51
|
-
|
|
59
|
+
k as ModalPortal
|
|
52
60
|
};
|
package/lib/ui/theme/theme.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { breakpoints as
|
|
3
|
-
import { colors as
|
|
4
|
-
const
|
|
5
|
-
${
|
|
2
|
+
import { breakpoints as n } from "./breakpoints.js";
|
|
3
|
+
import { colors as h, FONT as t } from "./constants.js";
|
|
4
|
+
const l = `
|
|
5
|
+
${h}
|
|
6
6
|
--font-family: ${t.REGULAR};
|
|
7
7
|
--font-regular: ${t.REGULAR};
|
|
8
8
|
--font-color: ${t.COLOR};
|
|
@@ -11,6 +11,7 @@ const s = `
|
|
|
11
11
|
|
|
12
12
|
--header-offset: 0px;
|
|
13
13
|
--header-height: 68px;
|
|
14
|
+
--watch-live-header: 0px;
|
|
14
15
|
--animation-duration: 0.5s;
|
|
15
16
|
--animation-function: ease;
|
|
16
17
|
--container-padding: 16px;
|
|
@@ -19,14 +20,15 @@ const s = `
|
|
|
19
20
|
--max-width: 600px;
|
|
20
21
|
--max-notifications-width: 400px;
|
|
21
22
|
|
|
22
|
-
${
|
|
23
|
+
${n.down("xl")`
|
|
23
24
|
--header-offset: 56px;
|
|
25
|
+
--watch-live-header: 46px;
|
|
24
26
|
`}
|
|
25
27
|
|
|
26
|
-
${
|
|
28
|
+
${n.intermediate("xl", "lg")`
|
|
27
29
|
--header-offset: 76px;
|
|
28
30
|
`}
|
|
29
|
-
`,
|
|
31
|
+
`, p = "StreamLayerCSSReset", m = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
|
|
30
32
|
children: /* @__PURE__ */ r("table", {
|
|
31
33
|
children: [/* @__PURE__ */ e("thead", {
|
|
32
34
|
children: /* @__PURE__ */ r("tr", {
|
|
@@ -37,22 +39,22 @@ const s = `
|
|
|
37
39
|
})]
|
|
38
40
|
})
|
|
39
41
|
}), /* @__PURE__ */ e("tbody", {
|
|
40
|
-
children:
|
|
41
|
-
const
|
|
42
|
+
children: l.split(";").map((a) => {
|
|
43
|
+
const i = a.trim(), [o, d] = i.split(":");
|
|
42
44
|
return /* @__PURE__ */ r("tr", {
|
|
43
45
|
children: [/* @__PURE__ */ e("td", {
|
|
44
|
-
children:
|
|
46
|
+
children: o
|
|
45
47
|
}), /* @__PURE__ */ e("td", {
|
|
46
48
|
children: d
|
|
47
49
|
})]
|
|
48
|
-
},
|
|
50
|
+
}, i);
|
|
49
51
|
})
|
|
50
52
|
})]
|
|
51
53
|
})
|
|
52
54
|
});
|
|
53
55
|
export {
|
|
54
56
|
x as ThemeVariables,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
p as resetCss,
|
|
58
|
+
m as theme,
|
|
59
|
+
l as themeStr
|
|
58
60
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.98.
|
|
3
|
+
"version": "0.98.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -44,16 +44,16 @@
|
|
|
44
44
|
"react-virtualized-auto-sizer": "^1.0.21",
|
|
45
45
|
"react-window": "^1.8.10",
|
|
46
46
|
"react-window-infinite-loader": "^1.0.9",
|
|
47
|
-
"@streamlayer/feature-gamification": "^0.
|
|
48
|
-
"@streamlayer/sdk-web": "^0.33.
|
|
49
|
-
"@streamlayer/sdk-web-
|
|
50
|
-
"@streamlayer/sdk-web-
|
|
51
|
-
"@streamlayer/sdk-web-api": "^0.24.
|
|
52
|
-
"@streamlayer/sdk-web-core": "^0.22.
|
|
53
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
47
|
+
"@streamlayer/feature-gamification": "^0.40.0",
|
|
48
|
+
"@streamlayer/sdk-web": "^0.33.2",
|
|
49
|
+
"@streamlayer/sdk-web-analytics": "^0.1.2",
|
|
50
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.44",
|
|
51
|
+
"@streamlayer/sdk-web-api": "^0.24.2",
|
|
52
|
+
"@streamlayer/sdk-web-core": "^0.22.2",
|
|
53
|
+
"@streamlayer/sdk-web-features": "^0.11.26",
|
|
54
54
|
"@streamlayer/sdk-web-interfaces": "^0.21.0",
|
|
55
55
|
"@streamlayer/sdk-web-logger": "^0.5.18",
|
|
56
|
-
"@streamlayer/sdk-web-notifications": "^0.15.
|
|
56
|
+
"@streamlayer/sdk-web-notifications": "^0.15.1",
|
|
57
57
|
"@streamlayer/sdk-web-storage": "^0.4.5",
|
|
58
58
|
"@streamlayer/sdk-web-types": "^0.23.0"
|
|
59
59
|
},
|
|
@@ -96,6 +96,6 @@
|
|
|
96
96
|
"vite-plugin-svgr": "^4.2.0",
|
|
97
97
|
"vite-svg-loader": "^5.1.0",
|
|
98
98
|
"vite-tsconfig-paths": "^4.3.1",
|
|
99
|
-
"@streamlayer/react": "^0.41.
|
|
99
|
+
"@streamlayer/react": "^0.41.3"
|
|
100
100
|
}
|
|
101
101
|
}
|