@streamlayer/react-ui 0.97.0 → 0.98.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/ui/app/Features/Gamification/UserSummary.js +11 -11
- package/lib/ui/app/Points/index.js +14 -14
- 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 +59 -68
- package/lib/ui/gamification/vote/feedback/styles.js +1 -1
- package/lib/ui/gamification/vote/index.js +90 -85
- package/lib/ui/gamification/vote/vote-option/index.js +28 -28
- 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.js +34 -32
- package/lib/ui/show-in/index.d.ts +7 -3
- package/lib/ui/show-in/index.js +43 -21
- package/package.json +10 -10
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
import { styled as s } from "@linaria/react";
|
|
2
2
|
import { SvgIcon as n } from "../../../icons/index.js";
|
|
3
|
+
import { GrowingShowIn as o } from "../../../show-in/index.js";
|
|
3
4
|
import "react/jsx-runtime";
|
|
4
5
|
import "react";
|
|
5
|
-
|
|
6
|
+
import "@linaria/core";
|
|
7
|
+
const t = () => o, m = /* @__PURE__ */ s(t())({
|
|
8
|
+
name: "ShowInContainer",
|
|
9
|
+
class: "sie6cqo",
|
|
10
|
+
propsAsIs: !0
|
|
11
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
6
12
|
name: "WinBarContainer",
|
|
7
|
-
class: "
|
|
13
|
+
class: "wgizw4u",
|
|
8
14
|
propsAsIs: !1
|
|
9
|
-
}),
|
|
15
|
+
}), f = /* @__PURE__ */ s("div")({
|
|
10
16
|
name: "Content",
|
|
11
|
-
class: "
|
|
17
|
+
class: "c1l3ucjp",
|
|
12
18
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
19
|
+
}), w = /* @__PURE__ */ s("div")({
|
|
14
20
|
name: "Title",
|
|
15
|
-
class: "
|
|
21
|
+
class: "tx7j799",
|
|
16
22
|
propsAsIs: !1
|
|
17
|
-
}),
|
|
23
|
+
}), i = () => n, A = /* @__PURE__ */ s(i())({
|
|
18
24
|
name: "WinIcon",
|
|
19
|
-
class: "
|
|
25
|
+
class: "w4lwuj0",
|
|
20
26
|
propsAsIs: !0
|
|
21
|
-
}),
|
|
27
|
+
}), C = /* @__PURE__ */ s("div")({
|
|
22
28
|
name: "Points",
|
|
23
|
-
class: "
|
|
29
|
+
class: "po9i64o",
|
|
24
30
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
31
|
+
}), u = /* @__PURE__ */ s("span")({
|
|
26
32
|
name: "PointsCount",
|
|
27
|
-
class: "
|
|
33
|
+
class: "pe5g05h",
|
|
28
34
|
propsAsIs: !1
|
|
29
|
-
}),
|
|
35
|
+
}), d = /* @__PURE__ */ s("span")({
|
|
30
36
|
name: "PointsUnits",
|
|
31
|
-
class: "
|
|
37
|
+
class: "p1hdtpmb",
|
|
32
38
|
propsAsIs: !1
|
|
33
39
|
});
|
|
34
40
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
f as Content,
|
|
42
|
+
C as Points,
|
|
43
|
+
u as PointsCount,
|
|
44
|
+
d as PointsUnits,
|
|
45
|
+
m as ShowInContainer,
|
|
46
|
+
w as Title,
|
|
47
|
+
I as WinBarContainer,
|
|
48
|
+
A as WinIcon
|
|
42
49
|
};
|
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cx as
|
|
3
|
-
import { styled as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { r as
|
|
1
|
+
import { jsxs as a, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cx as m } from "@linaria/core";
|
|
3
|
+
import { styled as f } from "@linaria/react";
|
|
4
|
+
import { useState as u, useCallback as i, useEffect as c } from "react";
|
|
5
|
+
import { r as d } from "../../index-jRXrW6ie.js";
|
|
6
6
|
import "../../index-uEuzH3jr.js";
|
|
7
|
-
const
|
|
7
|
+
const p = /* @__PURE__ */ f("div")({
|
|
8
8
|
name: "StaticContainer",
|
|
9
9
|
class: "svm502q",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}),
|
|
11
|
+
}), v = "fd3gza8", x = `
|
|
12
12
|
body {
|
|
13
13
|
overflow: hidden !important;
|
|
14
14
|
}
|
|
15
|
-
`,
|
|
15
|
+
`, y = `
|
|
16
16
|
.sl-hide-on-modal {
|
|
17
17
|
display: none !important;
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`, h = `
|
|
20
20
|
.sl-pill-button {
|
|
21
|
-
display: none;
|
|
21
|
+
display: none !important;
|
|
22
22
|
}
|
|
23
|
-
`,
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
e
|
|
29
|
-
}, [e,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
`, E = (r) => {
|
|
24
|
+
const [t, n] = u(r), o = i((l) => {
|
|
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,
|
|
34
|
+
container: t,
|
|
35
|
+
fixedView: n,
|
|
36
|
+
useContainer: o
|
|
35
37
|
}) => {
|
|
36
|
-
const [
|
|
37
|
-
return
|
|
38
|
-
className:
|
|
39
|
-
children: [
|
|
40
|
-
children: y
|
|
41
|
-
}), !s && /* @__PURE__ */ n("style", {
|
|
42
|
-
children: v
|
|
43
|
-
}), /* @__PURE__ */ n("style", {
|
|
38
|
+
const [e] = E(n);
|
|
39
|
+
return t.current ? o ? d.createPortal(/* @__PURE__ */ a(p, {
|
|
40
|
+
className: m(e && v),
|
|
41
|
+
children: [r, e && /* @__PURE__ */ s("style", {
|
|
44
42
|
children: x
|
|
43
|
+
}), !e && /* @__PURE__ */ s("style", {
|
|
44
|
+
children: y
|
|
45
|
+
}), /* @__PURE__ */ s("style", {
|
|
46
|
+
children: h
|
|
45
47
|
})]
|
|
46
|
-
}),
|
|
48
|
+
}), t.current, "modal-node") : d.createPortal(r, t.current, "modal-node") : null;
|
|
47
49
|
};
|
|
48
50
|
export {
|
|
49
|
-
|
|
51
|
+
V as ModalPortal
|
|
50
52
|
};
|
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -44,15 +44,15 @@
|
|
|
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.39.
|
|
48
|
-
"@streamlayer/sdk-web
|
|
49
|
-
"@streamlayer/sdk-web": "^0.
|
|
50
|
-
"@streamlayer/sdk-web-
|
|
51
|
-
"@streamlayer/sdk-web-api": "^0.24.
|
|
52
|
-
"@streamlayer/sdk-web-
|
|
53
|
-
"@streamlayer/sdk-web-
|
|
54
|
-
"@streamlayer/sdk-web-core": "^0.22.0",
|
|
47
|
+
"@streamlayer/feature-gamification": "^0.39.1",
|
|
48
|
+
"@streamlayer/sdk-web": "^0.33.1",
|
|
49
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.43",
|
|
50
|
+
"@streamlayer/sdk-web-analytics": "^0.1.1",
|
|
51
|
+
"@streamlayer/sdk-web-api": "^0.24.1",
|
|
52
|
+
"@streamlayer/sdk-web-core": "^0.22.1",
|
|
53
|
+
"@streamlayer/sdk-web-features": "^0.11.25",
|
|
55
54
|
"@streamlayer/sdk-web-interfaces": "^0.21.0",
|
|
55
|
+
"@streamlayer/sdk-web-logger": "^0.5.18",
|
|
56
56
|
"@streamlayer/sdk-web-notifications": "^0.15.0",
|
|
57
57
|
"@streamlayer/sdk-web-storage": "^0.4.5",
|
|
58
58
|
"@streamlayer/sdk-web-types": "^0.23.0"
|
|
@@ -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.2"
|
|
100
100
|
}
|
|
101
101
|
}
|