@streamlayer/react-ui 0.99.0 → 0.100.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/showIn.js +45 -0
- package/lib/ui/app/Features/Gamification/Leaderboard.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Leaderboard.js +24 -26
- package/lib/ui/app/Features/Gamification/Question.js +19 -19
- package/lib/ui/app/Features/Gamification/Tabs.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/Tabs.js +27 -37
- package/lib/ui/app/Features/Gamification/index.d.ts +1 -2
- package/lib/ui/app/Features/Gamification/index.js +46 -40
- package/lib/ui/app/Features/index.d.ts +1 -2
- package/lib/ui/app/Features/index.js +16 -17
- package/lib/ui/app/Notifications/Onboarding/index.js +33 -33
- package/lib/ui/app/masters.js +42 -42
- package/lib/ui/app/useSdkScroll.js +30 -27
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +0 -1
- package/lib/ui/gamification/leaderboard/list-item/index.js +16 -16
- package/lib/ui/gamification/leaderboard/static.js +31 -24
- package/lib/ui/gamification/question/index.d.ts +1 -3
- package/lib/ui/gamification/question/index.js +25 -26
- package/lib/ui/gamification/question/insight/index.d.ts +0 -1
- package/lib/ui/gamification/question/insight/index.js +7 -7
- package/lib/ui/gamification/question/list/index.js +19 -35
- package/lib/ui/gamification/question/twitter/index.d.ts +0 -1
- package/lib/ui/gamification/question/twitter/index.js +8 -8
- package/lib/ui/gamification/question/twitter/styles.d.ts +1 -1
- package/lib/ui/gamification/question/twitter/styles.js +8 -9
- package/lib/ui/gamification/vote/alert/index.d.ts +8 -0
- package/lib/ui/gamification/vote/alert/index.js +11 -0
- package/lib/ui/gamification/vote/{expired-alert → alert}/styles.js +7 -7
- package/lib/ui/gamification/vote/feedback/index.js +31 -31
- package/lib/ui/gamification/vote/index.d.ts +1 -0
- package/lib/ui/gamification/vote/index.js +109 -89
- package/lib/ui/gamification/vote/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/styles.js +14 -8
- package/lib/ui/gamification/vote/vote-option/index.js +28 -28
- package/lib/ui/gamification/vote/vote-option/styles.d.ts +1 -0
- package/lib/ui/gamification/vote/vote-option/styles.js +34 -29
- package/lib/ui/modal/index.js +31 -31
- package/lib/ui/show-in/index.d.ts +1 -0
- package/lib/ui/show-in/index.js +12 -10
- package/package.json +20 -21
- package/lib/ui/gamification/vote/expired-alert/index.d.ts +0 -7
- package/lib/ui/gamification/vote/expired-alert/index.js +0 -11
- /package/lib/ui/gamification/vote/{expired-alert → alert}/styles.d.ts +0 -0
|
@@ -5,66 +5,71 @@ const r = /* @__PURE__ */ s("button")({
|
|
|
5
5
|
class: "b1b6dl8t",
|
|
6
6
|
propsAsIs: !1
|
|
7
7
|
}), l = /* @__PURE__ */ s("div")({
|
|
8
|
-
name: "
|
|
8
|
+
name: "ButtonPctWrap",
|
|
9
9
|
class: "b4iik8i",
|
|
10
10
|
propsAsIs: !1
|
|
11
|
-
}), I = /* @__PURE__ */ s("
|
|
12
|
-
name: "
|
|
11
|
+
}), I = /* @__PURE__ */ s("div")({
|
|
12
|
+
name: "ButtonPct",
|
|
13
13
|
class: "b1gq1lnf",
|
|
14
14
|
propsAsIs: !1
|
|
15
|
-
}), i = /* @__PURE__ */ s("
|
|
16
|
-
name: "
|
|
17
|
-
class: "
|
|
15
|
+
}), i = /* @__PURE__ */ s("span")({
|
|
16
|
+
name: "ButtonBody",
|
|
17
|
+
class: "b1j65z51",
|
|
18
18
|
propsAsIs: !1
|
|
19
19
|
}), m = /* @__PURE__ */ s("div")({
|
|
20
|
-
name: "
|
|
20
|
+
name: "IconContainer",
|
|
21
21
|
class: "i19tpfua",
|
|
22
22
|
propsAsIs: !1
|
|
23
|
+
}), u = /* @__PURE__ */ s("div")({
|
|
24
|
+
name: "IconWrap",
|
|
25
|
+
class: "i1tubmma",
|
|
26
|
+
propsAsIs: !1
|
|
23
27
|
}), n = /* @__PURE__ */ s("img")({
|
|
24
28
|
name: "Icon",
|
|
25
|
-
class: "
|
|
29
|
+
class: "i1grrgwj",
|
|
26
30
|
propsAsIs: !1
|
|
27
31
|
}), t = () => n, f = /* @__PURE__ */ s(t())({
|
|
28
32
|
name: "IconDefault",
|
|
29
|
-
class: "
|
|
33
|
+
class: "ibemyq8",
|
|
30
34
|
propsAsIs: !0
|
|
31
|
-
}), a = () => n,
|
|
35
|
+
}), a = () => n, A = /* @__PURE__ */ s(a())({
|
|
32
36
|
name: "IconCircle",
|
|
33
|
-
class: "
|
|
37
|
+
class: "i1dceht",
|
|
34
38
|
propsAsIs: !0
|
|
35
|
-
}),
|
|
39
|
+
}), d = /* @__PURE__ */ s("span")({
|
|
36
40
|
name: "Title",
|
|
37
|
-
class: "
|
|
41
|
+
class: "t116q4vq",
|
|
38
42
|
propsAsIs: !1
|
|
39
|
-
}),
|
|
43
|
+
}), B = /* @__PURE__ */ s("span")({
|
|
40
44
|
name: "Indicators",
|
|
41
|
-
class: "
|
|
45
|
+
class: "i17ajcu2",
|
|
42
46
|
propsAsIs: !1
|
|
43
47
|
}), b = /* @__PURE__ */ s("span")({
|
|
44
48
|
name: "Pts",
|
|
45
|
-
class: "
|
|
49
|
+
class: "pu9kmlb",
|
|
46
50
|
propsAsIs: !1
|
|
47
|
-
}),
|
|
51
|
+
}), C = /* @__PURE__ */ s("span")({
|
|
48
52
|
name: "Percentage",
|
|
49
|
-
class: "
|
|
53
|
+
class: "p1j2j0s0",
|
|
50
54
|
propsAsIs: !1
|
|
51
|
-
}), c = () => o,
|
|
55
|
+
}), c = () => o, P = /* @__PURE__ */ s(c())({
|
|
52
56
|
name: "CheckIcon",
|
|
53
|
-
class: "
|
|
57
|
+
class: "c1mzj1sj",
|
|
54
58
|
propsAsIs: !0
|
|
55
59
|
});
|
|
56
60
|
export {
|
|
57
|
-
|
|
61
|
+
i as ButtonBody,
|
|
58
62
|
r as ButtonContainer,
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
I as ButtonPct,
|
|
64
|
+
l as ButtonPctWrap,
|
|
65
|
+
P as CheckIcon,
|
|
61
66
|
n as Icon,
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
A as IconCircle,
|
|
68
|
+
m as IconContainer,
|
|
64
69
|
f as IconDefault,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
u as IconWrap,
|
|
71
|
+
B as Indicators,
|
|
72
|
+
C as Percentage,
|
|
68
73
|
b as Pts,
|
|
69
|
-
|
|
74
|
+
d as Title
|
|
70
75
|
};
|
package/lib/ui/modal/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
2
|
-
import { styled as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { r as
|
|
5
|
-
import { BREAKPOINTS as
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { styled as w } from "@linaria/react";
|
|
3
|
+
import { useState as c, useEffect as d } from "react";
|
|
4
|
+
import { r as a } from "../../index-Bicco-Aq.js";
|
|
5
|
+
import { BREAKPOINTS as u } from "../theme/constants.js";
|
|
6
|
+
const h = /* @__PURE__ */ w("div")({
|
|
7
7
|
name: "StaticContainer",
|
|
8
8
|
class: "svm502q",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), y = `
|
|
11
11
|
.sl-hide-on-modal {
|
|
12
12
|
height: 0 !important;
|
|
13
13
|
opacity: 0 !important;
|
|
@@ -17,43 +17,43 @@ const y = /* @__PURE__ */ h("div")({
|
|
|
17
17
|
.sl-pill-button {
|
|
18
18
|
display: none !important;
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
21
|
-
|
|
20
|
+
`, m = () => window.innerWidth >= u.lg && window.innerWidth < u.xl ? 76 : 53, f = (o) => {
|
|
21
|
+
var e;
|
|
22
|
+
const t = m();
|
|
23
|
+
return Math.round((((e = o.current) == null ? void 0 : e.getBoundingClientRect().y) || 0) - t) <= 0;
|
|
24
|
+
}, x = ({
|
|
25
|
+
children: o,
|
|
22
26
|
container: t,
|
|
23
|
-
useContainer:
|
|
27
|
+
useContainer: e
|
|
24
28
|
}) => {
|
|
25
|
-
const [l] =
|
|
26
|
-
|
|
27
|
-
const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
|
|
28
|
-
return (((r = t.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - e < 0;
|
|
29
|
-
}), [o, s] = w(!1);
|
|
30
|
-
return a(() => {
|
|
29
|
+
const [l] = c(() => f(t)), [n, s] = c(!1);
|
|
30
|
+
return d(() => {
|
|
31
31
|
if (!t.current || !l)
|
|
32
32
|
return s(!0), () => {
|
|
33
33
|
};
|
|
34
|
-
const
|
|
34
|
+
const r = window.scrollY;
|
|
35
35
|
return s(!0), () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
top: e
|
|
36
|
+
f(t) && window.scrollTo({
|
|
37
|
+
top: r,
|
|
38
|
+
behavior: "instant"
|
|
40
39
|
});
|
|
41
40
|
};
|
|
42
|
-
}, []),
|
|
43
|
-
if (
|
|
44
|
-
const
|
|
41
|
+
}, []), d(() => {
|
|
42
|
+
if (n && t.current && l) {
|
|
43
|
+
const r = m();
|
|
45
44
|
window.scrollTo({
|
|
46
|
-
top: t.current.offsetTop -
|
|
45
|
+
top: t.current.offsetTop - r,
|
|
46
|
+
behavior: "instant"
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
}, [
|
|
50
|
-
children: [
|
|
51
|
-
children:
|
|
52
|
-
}), /* @__PURE__ */
|
|
49
|
+
}, [n]), !t.current || !n ? null : e ? a.createPortal(/* @__PURE__ */ p(h, {
|
|
50
|
+
children: [o, /* @__PURE__ */ i("style", {
|
|
51
|
+
children: y
|
|
52
|
+
}), /* @__PURE__ */ i("style", {
|
|
53
53
|
children: O
|
|
54
54
|
})]
|
|
55
|
-
}), t.current, "modal-node") :
|
|
55
|
+
}), t.current, "modal-node") : a.createPortal(o, t.current, "modal-node");
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
|
-
|
|
58
|
+
x as ModalPortal
|
|
59
59
|
};
|
package/lib/ui/show-in/index.js
CHANGED
|
@@ -9,12 +9,14 @@ const w = /* @__PURE__ */ p("div")({
|
|
|
9
9
|
}), f = "sx17qu6", d = "h1692c5m", x = ({
|
|
10
10
|
children: r,
|
|
11
11
|
style: e,
|
|
12
|
-
className:
|
|
12
|
+
className: n,
|
|
13
13
|
enabled: o = !0,
|
|
14
|
-
hiding: s
|
|
14
|
+
hiding: s,
|
|
15
|
+
onAnimationEnd: t
|
|
15
16
|
}) => /* @__PURE__ */ c(w, {
|
|
16
17
|
style: e,
|
|
17
|
-
className: h(
|
|
18
|
+
className: h(n, o && f, o && s && d),
|
|
19
|
+
onAnimationEnd: t,
|
|
18
20
|
children: r
|
|
19
21
|
}), y = () => x, C = /* @__PURE__ */ p(y())({
|
|
20
22
|
name: "GrowingContainer",
|
|
@@ -23,25 +25,25 @@ const w = /* @__PURE__ */ p("div")({
|
|
|
23
25
|
}), G = ({
|
|
24
26
|
children: r,
|
|
25
27
|
style: e,
|
|
26
|
-
enabled:
|
|
28
|
+
enabled: n,
|
|
27
29
|
animate: o,
|
|
28
30
|
...s
|
|
29
31
|
}) => {
|
|
30
|
-
const
|
|
31
|
-
const m =
|
|
32
|
-
return
|
|
32
|
+
const t = l(null), u = a(() => {
|
|
33
|
+
const m = t == null ? void 0 : t.current, i = m && window.getComputedStyle(m), g = i == null ? void 0 : i.getPropertyValue("height");
|
|
34
|
+
return n ? {
|
|
33
35
|
height: o ? g : 0
|
|
34
36
|
} : {};
|
|
35
|
-
}, [
|
|
37
|
+
}, [n, o]);
|
|
36
38
|
return /* @__PURE__ */ c(C, {
|
|
37
39
|
...s,
|
|
38
|
-
enabled:
|
|
40
|
+
enabled: n && o,
|
|
39
41
|
style: {
|
|
40
42
|
...e,
|
|
41
43
|
...u
|
|
42
44
|
},
|
|
43
45
|
children: /* @__PURE__ */ c("div", {
|
|
44
|
-
ref:
|
|
46
|
+
ref: t,
|
|
45
47
|
children: r
|
|
46
48
|
})
|
|
47
49
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@streamlayer/react-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.100.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"typings": "./lib/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
],
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@lottiefiles/react-lottie-player": "^3.5.3",
|
|
39
|
-
"@streamlayer/sl-eslib": "^5.
|
|
39
|
+
"@streamlayer/sl-eslib": "^5.85.0",
|
|
40
40
|
"@types/lodash.throttle": "^4.1.9",
|
|
41
41
|
"lodash.throttle": "^4.1.1",
|
|
42
42
|
"nanoid": "3.3.7",
|
|
@@ -44,18 +44,18 @@
|
|
|
44
44
|
"react-virtualized-auto-sizer": "^1.0.24",
|
|
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.
|
|
52
|
-
"@streamlayer/sdk-web-core": "^0.
|
|
53
|
-
"@streamlayer/sdk-web-features": "^0.11.
|
|
54
|
-
"@streamlayer/sdk-web-interfaces": "^0.
|
|
55
|
-
"@streamlayer/sdk-web-logger": "^0.5.
|
|
56
|
-
"@streamlayer/sdk-web-notifications": "^0.
|
|
57
|
-
"@streamlayer/sdk-web-storage": "^0.4.
|
|
58
|
-
"@streamlayer/sdk-web-types": "^0.23.
|
|
47
|
+
"@streamlayer/feature-gamification": "^0.41.1",
|
|
48
|
+
"@streamlayer/sdk-web": "^0.33.5",
|
|
49
|
+
"@streamlayer/sdk-web-analytics": "^0.2.1",
|
|
50
|
+
"@streamlayer/sdk-web-anonymous-auth": "^0.11.47",
|
|
51
|
+
"@streamlayer/sdk-web-api": "^0.25.1",
|
|
52
|
+
"@streamlayer/sdk-web-core": "^0.23.1",
|
|
53
|
+
"@streamlayer/sdk-web-features": "^0.11.29",
|
|
54
|
+
"@streamlayer/sdk-web-interfaces": "^0.22.1",
|
|
55
|
+
"@streamlayer/sdk-web-logger": "^0.5.21",
|
|
56
|
+
"@streamlayer/sdk-web-notifications": "^0.16.1",
|
|
57
|
+
"@streamlayer/sdk-web-storage": "^0.4.8",
|
|
58
|
+
"@streamlayer/sdk-web-types": "^0.23.3"
|
|
59
59
|
},
|
|
60
60
|
"nx": {
|
|
61
61
|
"implicitDependencies": [
|
|
@@ -71,12 +71,11 @@
|
|
|
71
71
|
"@linaria/core": "^6.0.0",
|
|
72
72
|
"@linaria/react": "^6.0.0",
|
|
73
73
|
"@nanostores/react": "^0.7.2",
|
|
74
|
-
"@storybook/addon-docs": "^8.0.
|
|
75
|
-
"@storybook/addon-
|
|
76
|
-
"@storybook/
|
|
77
|
-
"@storybook/blocks": "^8.0.0",
|
|
74
|
+
"@storybook/addon-docs": "^8.0.4",
|
|
75
|
+
"@storybook/addon-viewport": "^8.0.4",
|
|
76
|
+
"@storybook/blocks": "^8.0.4",
|
|
78
77
|
"@storybook/jest": "~0.2.3",
|
|
79
|
-
"@storybook/react": "^8.0.
|
|
78
|
+
"@storybook/react": "^8.0.4",
|
|
80
79
|
"@storybook/testing-library": "~0.2.2",
|
|
81
80
|
"@types/react-infinite-scroller": "^1.2.5",
|
|
82
81
|
"@types/react-window": "^1.8.8",
|
|
@@ -91,11 +90,11 @@
|
|
|
91
90
|
"react-phone-number-input": "^3.3.9",
|
|
92
91
|
"rollup-plugin-node-polyfills": "^0.2.1",
|
|
93
92
|
"tslib": "^2.6.2",
|
|
94
|
-
"vite": "5.
|
|
93
|
+
"vite": "5.2.6",
|
|
95
94
|
"vite-plugin-node-polyfills": "^0.21.0",
|
|
96
95
|
"vite-plugin-svgr": "^4.2.0",
|
|
97
96
|
"vite-svg-loader": "^5.1.0",
|
|
98
97
|
"vite-tsconfig-paths": "^4.3.2",
|
|
99
|
-
"@streamlayer/react": "^0.41.
|
|
98
|
+
"@streamlayer/react": "^0.41.6"
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { SvgIcon as c } from "../../../icons/index.js";
|
|
3
|
-
import { Container as n, Title as t, Description as m } from "./styles.js";
|
|
4
|
-
const d = ({ title: e, description: i }) => /* @__PURE__ */ o(n, { children: [
|
|
5
|
-
/* @__PURE__ */ r(c, { name: "icon-check-circle" }),
|
|
6
|
-
/* @__PURE__ */ r(t, { children: e }),
|
|
7
|
-
/* @__PURE__ */ r(m, { children: i })
|
|
8
|
-
] });
|
|
9
|
-
export {
|
|
10
|
-
d as ExpiredAlert
|
|
11
|
-
};
|
|
File without changes
|