@streamlayer/react-ui 0.97.1 → 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/UserSummary.js +11 -11
- 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/Points/index.js +14 -14
- package/lib/ui/app/masters.js +26 -28
- package/lib/ui/app/useMastersApp.js +25 -23
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
- package/lib/ui/gamification/vote/feedback/index.js +64 -73
- package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/feedback/styles.js +29 -24
- package/lib/ui/gamification/vote/index.js +107 -97
- package/lib/ui/gamification/vote/vote-option/index.js +54 -52
- package/lib/ui/gamification/vote/win-bar/index.d.ts +2 -0
- package/lib/ui/gamification/vote/win-bar/index.js +44 -25
- package/lib/ui/gamification/vote/win-bar/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/win-bar/styles.js +28 -21
- package/lib/ui/modal/index.d.ts +0 -1
- package/lib/ui/modal/index.js +47 -37
- package/lib/ui/show-in/index.d.ts +7 -3
- package/lib/ui/show-in/index.js +43 -21
- 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,50 +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
|
-
`, v = `
|
|
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
|
-
display: none;
|
|
19
|
+
display: none !important;
|
|
22
20
|
}
|
|
23
|
-
`,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}), [o, t]), l(() => {
|
|
28
|
-
e === !1 && document.removeEventListener("scroll", t);
|
|
29
|
-
}, [e, t]), [e];
|
|
30
|
-
}, P = ({
|
|
31
|
-
children: o,
|
|
32
|
-
container: e,
|
|
33
|
-
fixedView: r,
|
|
34
|
-
useContainer: t
|
|
21
|
+
`, k = ({
|
|
22
|
+
children: i,
|
|
23
|
+
container: t,
|
|
24
|
+
useContainer: f
|
|
35
25
|
}) => {
|
|
36
|
-
const [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
|
45
55
|
})]
|
|
46
|
-
}),
|
|
56
|
+
}), t.current, "modal-node") : a.createPortal(i, t.current, "modal-node");
|
|
47
57
|
};
|
|
48
58
|
export {
|
|
49
|
-
|
|
59
|
+
k as ModalPortal
|
|
50
60
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type ShowInProps = {
|
|
3
3
|
children: React.ReactNode | React.ReactNode[];
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
className?: string;
|
|
6
6
|
enabled?: boolean;
|
|
7
|
-
replayKey?: unknown;
|
|
8
7
|
hiding?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare const ShowIn: React.FC<ShowInProps>;
|
|
10
|
+
export declare const GrowingShowIn: React.FC<ShowInProps & {
|
|
11
|
+
animate?: boolean;
|
|
9
12
|
}>;
|
|
13
|
+
export {};
|
package/lib/ui/show-in/index.js
CHANGED
|
@@ -1,30 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { styled as
|
|
4
|
-
import {
|
|
5
|
-
const w = /* @__PURE__ */
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { cx as h } from "@linaria/core";
|
|
3
|
+
import { styled as p } from "@linaria/react";
|
|
4
|
+
import { useRef as l, useMemo as a } from "react";
|
|
5
|
+
const w = /* @__PURE__ */ p("div")({
|
|
6
6
|
name: "Container",
|
|
7
7
|
class: "c1pgyo67",
|
|
8
8
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
10
|
-
children:
|
|
11
|
-
style:
|
|
12
|
-
className:
|
|
9
|
+
}), f = "sx17qu6", d = "h1692c5m", x = ({
|
|
10
|
+
children: r,
|
|
11
|
+
style: e,
|
|
12
|
+
className: t,
|
|
13
13
|
enabled: o = !0,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
hiding: s
|
|
15
|
+
}) => /* @__PURE__ */ c(w, {
|
|
16
|
+
style: e,
|
|
17
|
+
className: h(t, o && f, o && s && d),
|
|
18
|
+
children: r
|
|
19
|
+
}), y = () => x, C = /* @__PURE__ */ p(y())({
|
|
20
|
+
name: "GrowingContainer",
|
|
21
|
+
class: "gck55ev",
|
|
22
|
+
propsAsIs: !0
|
|
23
|
+
}), G = ({
|
|
24
|
+
children: r,
|
|
25
|
+
style: e,
|
|
26
|
+
enabled: t,
|
|
27
|
+
animate: o,
|
|
28
|
+
...s
|
|
16
29
|
}) => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
t
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
}, [t])
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
const n = l(null), u = a(() => {
|
|
31
|
+
const m = n == null ? void 0 : n.current, i = m && window.getComputedStyle(m), g = i == null ? void 0 : i.getPropertyValue("height");
|
|
32
|
+
return t ? {
|
|
33
|
+
height: o ? g : 0
|
|
34
|
+
} : {};
|
|
35
|
+
}, [t, o]);
|
|
36
|
+
return /* @__PURE__ */ c(C, {
|
|
37
|
+
...s,
|
|
38
|
+
enabled: t && o,
|
|
39
|
+
style: {
|
|
40
|
+
...e,
|
|
41
|
+
...u
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ c("div", {
|
|
44
|
+
ref: n,
|
|
45
|
+
children: r
|
|
46
|
+
})
|
|
26
47
|
});
|
|
27
48
|
};
|
|
28
49
|
export {
|
|
29
|
-
|
|
50
|
+
G as GrowingShowIn,
|
|
51
|
+
x as ShowIn
|
|
30
52
|
};
|
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.
|
|
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-analytics": "^0.1.
|
|
50
|
-
"@streamlayer/sdk-web-anonymous-auth": "^0.11.
|
|
51
|
-
"@streamlayer/sdk-web-api": "^0.24.
|
|
52
|
-
"@streamlayer/sdk-web-
|
|
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",
|
|
53
54
|
"@streamlayer/sdk-web-interfaces": "^0.21.0",
|
|
54
55
|
"@streamlayer/sdk-web-logger": "^0.5.18",
|
|
55
|
-
"@streamlayer/sdk-web-notifications": "^0.15.
|
|
56
|
-
"@streamlayer/sdk-web-core": "^0.22.0",
|
|
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
|
}
|