@streamlayer/react-ui 0.50.0 → 0.52.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.
Files changed (38) hide show
  1. package/lib/index.js +31 -30
  2. package/lib/ui/app/Features/FeatureProvider.d.ts +1 -0
  3. package/lib/ui/app/Features/FeatureProvider.js +6 -10
  4. package/lib/ui/app/Features/Gamification/Leaderboard.js +3 -2
  5. package/lib/ui/app/Features/Gamification/Tabs.js +1 -1
  6. package/lib/ui/app/Features/Gamification/index.d.ts +1 -0
  7. package/lib/ui/app/Features/Gamification/index.js +16 -18
  8. package/lib/ui/app/Features/Highlights/index.d.ts +1 -0
  9. package/lib/ui/app/Features/Highlights/index.js +15 -11
  10. package/lib/ui/app/Features/index.d.ts +1 -0
  11. package/lib/ui/app/Features/index.js +12 -8
  12. package/lib/ui/app/Navigation/MastersNavigation/index.d.ts +1 -0
  13. package/lib/ui/app/Navigation/MastersNavigation/index.js +10 -10
  14. package/lib/ui/app/masters.d.ts +1 -2
  15. package/lib/ui/app/masters.js +30 -33
  16. package/lib/ui/app/styles.js +1 -0
  17. package/lib/ui/app/useMastersApp.d.ts +4 -4
  18. package/lib/ui/app/useMastersApp.js +17 -17
  19. package/lib/ui/demo/DemoPoints.js +5 -3
  20. package/lib/ui/demo/components/Insight.d.ts +1 -0
  21. package/lib/ui/demo/components/Insight.js +10 -9
  22. package/lib/ui/demo/components/Insights.d.ts +1 -0
  23. package/lib/ui/demo/components/Insights.js +7 -7
  24. package/lib/ui/demo/components/Leaderboard.js +3 -2
  25. package/lib/ui/gamification/detailed-insight/index.d.ts +1 -0
  26. package/lib/ui/gamification/detailed-insight/index.js +14 -13
  27. package/lib/ui/gamification/insight-list/index.d.ts +1 -0
  28. package/lib/ui/gamification/insight-list/index.js +4 -4
  29. package/lib/ui/gamification/leaderboard-item/index.d.ts +1 -0
  30. package/lib/ui/gamification/leaderboard-item/index.js +18 -15
  31. package/lib/ui/gamification/leaderboard-item/styles.d.ts +3 -4
  32. package/lib/ui/gamification/leaderboard-item/styles.js +49 -58
  33. package/lib/ui/gamification/leaderboard-list/index.js +12 -10
  34. package/lib/ui/gamification/points/index.js +11 -9
  35. package/lib/ui/theme/index.js +2 -2
  36. package/lib/ui/theme/theme.d.ts +4 -0
  37. package/lib/ui/theme/theme.js +20 -19
  38. package/package.json +13 -13
package/lib/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { QuestionInApp as ko } from "./ui/notifications/notification/question-inapp/index.js";
2
- import { Login as wo } from "./ui/login/index.js";
3
- import { Onboarding as Bo } from "./ui/gamification/onboarding/index.js";
4
- import { ActivePages as Eo, Tab as Fo, Tabs as Go } from "./ui/gamification/tabs/index.js";
5
- import { LeaderboardItemDetail as Jo } from "./ui/gamification/leaderboard-item-detail/index.js";
6
- import { Question as Mo } from "./ui/gamification/question/index.js";
7
- import { QuestionList as Ro } from "./ui/gamification/question/list/index.js";
8
- import { UserStatistics as Xo } from "./ui/gamification/user-statistics/index.js";
9
- import { Vote as Zo } from "./ui/gamification/vote/index.js";
10
- import { Demo as $o } from "./ui/demo/index.js";
11
- import { Points as rr } from "./ui/gamification/points/index.js";
12
- import { StreamLayerThemeProvider as mr } from "./ui/theme/index.js";
13
- import { ThemeVariables as ir, theme as er, themeStr as fr } from "./ui/theme/theme.js";
1
+ import { QuestionInApp as Ur } from "./ui/notifications/notification/question-inapp/index.js";
2
+ import { Login as kr } from "./ui/login/index.js";
3
+ import { Onboarding as wr } from "./ui/gamification/onboarding/index.js";
4
+ import { ActivePages as Br, Tab as Er, Tabs as Fr } from "./ui/gamification/tabs/index.js";
5
+ import { LeaderboardItemDetail as Hr } from "./ui/gamification/leaderboard-item-detail/index.js";
6
+ import { Question as Kr } from "./ui/gamification/question/index.js";
7
+ import { QuestionList as Nr } from "./ui/gamification/question/list/index.js";
8
+ import { UserStatistics as Wr } from "./ui/gamification/user-statistics/index.js";
9
+ import { Vote as Yr } from "./ui/gamification/vote/index.js";
10
+ import { Demo as _r } from "./ui/demo/index.js";
11
+ import { Points as ro } from "./ui/gamification/points/index.js";
12
+ import { StreamLayerThemeProvider as to } from "./ui/theme/index.js";
13
+ import { ThemeVariables as po, resetCss as io, theme as eo, themeStr as so } from "./ui/theme/theme.js";
14
14
  import "react/jsx-runtime";
15
15
  import "react";
16
16
  import "./icon-exit-d3f9fc80.js";
@@ -96,21 +96,22 @@ import "./ui/gamification/points/styles.js";
96
96
  import "./ui/theme/breakpoints.js";
97
97
  import "@linaria/core";
98
98
  export {
99
- Eo as ActivePages,
100
- $o as Demo,
101
- Jo as LeaderboardItemDetail,
102
- wo as Login,
103
- Bo as Onboarding,
104
- rr as Points,
105
- Mo as Question,
106
- ko as QuestionInApp,
107
- Ro as QuestionList,
108
- mr as StreamLayerThemeProvider,
109
- Fo as Tab,
110
- Go as Tabs,
111
- ir as ThemeVariables,
112
- Xo as UserStatistics,
113
- Zo as Vote,
114
- er as theme,
115
- fr as themeStr
99
+ Br as ActivePages,
100
+ _r as Demo,
101
+ Hr as LeaderboardItemDetail,
102
+ kr as Login,
103
+ wr as Onboarding,
104
+ ro as Points,
105
+ Kr as Question,
106
+ Ur as QuestionInApp,
107
+ Nr as QuestionList,
108
+ to as StreamLayerThemeProvider,
109
+ Er as Tab,
110
+ Fr as Tabs,
111
+ po as ThemeVariables,
112
+ Wr as UserStatistics,
113
+ Yr as Vote,
114
+ io as resetCss,
115
+ eo as theme,
116
+ so as themeStr
116
117
  };
@@ -6,4 +6,5 @@ export declare const FeatureProvider: React.FC<{
6
6
  feature: Features;
7
7
  children: React.ReactNode;
8
8
  sdk: StreamLayerSDK;
9
+ className?: string;
9
10
  }>;
@@ -1,13 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useStore as e } from "@nanostores/react";
3
- import { FeatureStatus as u } from "@streamlayer/sdk-web-interfaces";
4
- const c = ({
5
- feature: i,
6
- sdk: o,
7
- children: n
8
- }) => {
9
- const d = e(i.status), { slStreamId: r } = e(o.sdkStore);
10
- return r != null && r.loading ? /* @__PURE__ */ t("div", { children: "event is loading..." }) : r != null && r.data ? d !== u.Ready ? /* @__PURE__ */ t("div", { children: "wait feature..." }) : n : /* @__PURE__ */ t("div", { children: "event is forbidden..." });
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useStore as i } from "@nanostores/react";
3
+ import { FeatureStatus as f } from "@streamlayer/sdk-web-interfaces";
4
+ const c = ({ feature: o, sdk: n, children: d, className: t }) => {
5
+ const u = i(o.status), { slStreamId: r } = i(n.sdkStore);
6
+ return r != null && r.loading ? /* @__PURE__ */ e("div", { className: t, children: "event is loading..." }) : r != null && r.data ? u !== f.Ready ? /* @__PURE__ */ e("div", { className: t, children: "wait feature..." }) : d : /* @__PURE__ */ e("div", { className: t, children: "event is forbidden..." });
11
7
  };
12
8
  export {
13
9
  c as FeatureProvider
@@ -14,7 +14,8 @@ import "react-window-infinite-loader";
14
14
  import "../../../gamification/leaderboard-item/index.js";
15
15
  import "../../../../utils/common.js";
16
16
  import "../../../gamification/leaderboard-item/styles.js";
17
- const q = ({ leaderboardList: o }) => {
17
+ import "../../../icons/index.js";
18
+ const w = ({ leaderboardList: o }) => {
18
19
  const { data: r } = d(o.$store), [t, i] = f(void 0), e = (p) => {
19
20
  const a = r.find((s) => s.userId === p);
20
21
  i(a);
@@ -25,5 +26,5 @@ const q = ({ leaderboardList: o }) => {
25
26
  ] });
26
27
  };
27
28
  export {
28
- q as Leaderboard
29
+ w as Leaderboard
29
30
  };
@@ -20,6 +20,7 @@ import "react-window-infinite-loader";
20
20
  import "../../../gamification/leaderboard-item/index.js";
21
21
  import "../../../../utils/common.js";
22
22
  import "../../../gamification/leaderboard-item/styles.js";
23
+ import "../../../icons/index.js";
23
24
  import "../../../gamification/question/list/index.js";
24
25
  import "../../../gamification/question/index.js";
25
26
  import "@streamlayer/sdk-web-types";
@@ -27,7 +28,6 @@ import "../../../button/index.js";
27
28
  import "../../../button/styles.js";
28
29
  import "../../../gamification/constants.js";
29
30
  import "../../../gamification/question/styles.js";
30
- import "../../../icons/index.js";
31
31
  import "../../../gamification/question/list/styles.js";
32
32
  import "../../../gamification/user-statistics/index.js";
33
33
  import "../../../gamification/user-statistics/components/rank/index.js";
@@ -4,4 +4,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
4
  export declare const GamificationOverlay: React.FC<{
5
5
  gamification: GamificationClass;
6
6
  sdk: StreamLayerSDK;
7
+ className?: string;
7
8
  }>;
@@ -1,10 +1,10 @@
1
- import { jsxs as m, Fragment as p, jsx as r } from "react/jsx-runtime";
2
- import { styled as e } from "@linaria/react";
3
- import { useStore as n } from "@nanostores/react";
4
- import { SDKScrollContainer as s } from "../../styles.js";
5
- import { ShowIn as l } from "../../../show-in/index.js";
6
- import { Question as a } from "./Question.js";
7
- import { Tabs as d } from "./Tabs.js";
1
+ import { jsxs as p, Fragment as e, jsx as r } from "react/jsx-runtime";
2
+ import { styled as n } from "@linaria/react";
3
+ import { useStore as s } from "@nanostores/react";
4
+ import { SDKScrollContainer as l } from "../../styles.js";
5
+ import { ShowIn as d } from "../../../show-in/index.js";
6
+ import { Question as u } from "./Question.js";
7
+ import { Tabs as a } from "./Tabs.js";
8
8
  import "@streamlayer/sdk-web-types";
9
9
  import "../../../gamification/detail/header/index.js";
10
10
  import "../../../gamification/constants.js";
@@ -52,28 +52,26 @@ import "../../../gamification/user-statistics/components/rank/styles.js";
52
52
  import "../../../gamification/user-statistics/components/statistic/index.js";
53
53
  import "../../../gamification/user-statistics/components/statistic/styles.js";
54
54
  import "../../../gamification/user-statistics/styles.js";
55
- const u = e(l)`
55
+ const c = n(d)`
56
56
  position: absolute;
57
57
  inset: 0;
58
58
  top: var(--header-height);
59
59
  background: var(--color-neutrals-white);
60
60
  z-index: 3;
61
- `, ho = ({
62
- gamification: o
63
- }) => {
64
- const { loading: i, data: t } = n(o.openedQuestion);
65
- return /* @__PURE__ */ m(p, { children: [
66
- (i || t) && /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(
67
- a,
61
+ `, fo = ({ gamification: o, className: t }) => {
62
+ const { loading: m, data: i } = s(o.openedQuestion);
63
+ return /* @__PURE__ */ p(e, { children: [
64
+ (m || i) && /* @__PURE__ */ r(c, { className: t, children: /* @__PURE__ */ r(
65
+ u,
68
66
  {
69
67
  closeQuestion: o.closeQuestion,
70
68
  vote: o.submitAnswer,
71
- openedQuestion: t
69
+ openedQuestion: i
72
70
  }
73
71
  ) }),
74
- /* @__PURE__ */ r(s, { "data-nav": "true", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ r(d, { gamification: o }) })
72
+ /* @__PURE__ */ r(l, { className: t, "data-nav": "true", style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ r(a, { gamification: o }) })
75
73
  ] });
76
74
  };
77
75
  export {
78
- ho as GamificationOverlay
76
+ fo as GamificationOverlay
79
77
  };
@@ -4,4 +4,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
4
4
  export declare const HighlightsOverlay: React.FC<{
5
5
  highlights: Highlights;
6
6
  sdk: StreamLayerSDK;
7
+ className?: string;
7
8
  }>;
@@ -1,7 +1,7 @@
1
- import { jsxs as i, Fragment as e, jsx as r } from "react/jsx-runtime";
2
- import { useStore as m } from "@nanostores/react";
3
- import { Insight as p } from "../../../demo/components/Insight.js";
4
- import { Insights as s } from "../../../demo/components/Insights.js";
1
+ import { jsxs as e, Fragment as m, jsx as i } from "react/jsx-runtime";
2
+ import { useStore as p } from "@nanostores/react";
3
+ import { Insight as s } from "../../../demo/components/Insight.js";
4
+ import { Insights as n } from "../../../demo/components/Insights.js";
5
5
  import "../../../gamification/detailed-insight/index.js";
6
6
  import "../../../gamification/common-header/index.js";
7
7
  import "../../../../icon-exit-d3f9fc80.js";
@@ -13,13 +13,17 @@ import "../../../gamification/insight/index.js";
13
13
  import "@streamlayer/sdk-web-types";
14
14
  import "../../../gamification/insight/styles.js";
15
15
  import "../../../gamification/insight-list/styles.js";
16
- const y = ({ highlights: o }) => {
17
- const t = m(o.openedInsight);
18
- return /* @__PURE__ */ i(e, { children: [
19
- !t && o.insights && /* @__PURE__ */ r(s, { highlights: o, store: o.insights.getStore() }),
20
- t && /* @__PURE__ */ r(
21
- p,
16
+ const O = ({
17
+ highlights: o,
18
+ className: r
19
+ }) => {
20
+ const t = p(o.openedInsight);
21
+ return /* @__PURE__ */ e(m, { children: [
22
+ !t && o.insights && /* @__PURE__ */ i(n, { className: r, highlights: o, store: o.insights.getStore() }),
23
+ t && /* @__PURE__ */ i(
24
+ s,
22
25
  {
26
+ className: r,
23
27
  openedInsight: t,
24
28
  closeHighlights: o.closeFeature,
25
29
  closeInsight: o.closeHighlight
@@ -28,5 +32,5 @@ const y = ({ highlights: o }) => {
28
32
  ] });
29
33
  };
30
34
  export {
31
- y as HighlightsOverlay
35
+ O as HighlightsOverlay
32
36
  };
@@ -5,4 +5,5 @@ import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
5
5
  export declare const ActiveFeature: React.FC<{
6
6
  sdk: StreamLayerSDK;
7
7
  feature: Features | null;
8
+ className?: string;
8
9
  }>;
@@ -1,9 +1,9 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useMemo as p } from "react";
3
- import { FeatureType as o } from "@streamlayer/sdk-web-types";
4
- import { FeatureProvider as m } from "./FeatureProvider.js";
5
- import { GamificationOverlay as e } from "./Gamification/index.js";
6
- import { HighlightsOverlay as n } from "./Highlights/index.js";
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { useMemo as e } from "react";
3
+ import { FeatureType as m } from "@streamlayer/sdk-web-types";
4
+ import { FeatureProvider as p } from "./FeatureProvider.js";
5
+ import { GamificationOverlay as n } from "./Gamification/index.js";
6
+ import { HighlightsOverlay as g } from "./Highlights/index.js";
7
7
  import "@nanostores/react";
8
8
  import "@streamlayer/sdk-web-interfaces";
9
9
  import "@linaria/react";
@@ -64,7 +64,11 @@ import "../../gamification/insight-list/index.js";
64
64
  import "../../gamification/insight/index.js";
65
65
  import "../../gamification/insight/styles.js";
66
66
  import "../../gamification/insight-list/styles.js";
67
- const xr = ({ sdk: i, feature: r }) => p(() => r ? r.featureConfig.get().type === o.GAMES ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(e, { gamification: r, sdk: i }) }) : r.featureConfig.get().type === o.HIGHLIGHTS ? /* @__PURE__ */ t(m, { sdk: i, feature: r, children: /* @__PURE__ */ t(n, { highlights: r, sdk: i }) }) : null : null, [i, r]);
67
+ const Ir = ({
68
+ sdk: i,
69
+ feature: r,
70
+ className: t
71
+ }) => e(() => r ? r.featureConfig.get().type === m.GAMES ? /* @__PURE__ */ o(p, { className: t, sdk: i, feature: r, children: /* @__PURE__ */ o(n, { className: t, gamification: r, sdk: i }) }) : r.featureConfig.get().type === m.HIGHLIGHTS ? /* @__PURE__ */ o(p, { className: t, sdk: i, feature: r, children: /* @__PURE__ */ o(g, { className: t, highlights: r, sdk: i }) }) : null : null, [i, r]);
68
72
  export {
69
- xr as ActiveFeature
73
+ Ir as ActiveFeature
70
74
  };
@@ -8,4 +8,5 @@ export declare const MastersNavigation: React.FC<{
8
8
  activeOverlay: AvailableOverlays;
9
9
  setActiveOverlay: (overlay: AvailableOverlays) => void;
10
10
  sdkReady: boolean;
11
+ className?: string;
11
12
  }>;
@@ -1,18 +1,18 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { ChannelsButton as a, ChannelsButtonId as i } from "../../../navigation/button/Channels.js";
3
- import { FeaturedGroupsButton as u, FeaturedGroupsButtonId as n } from "../../../navigation/button/FeaturedGroups.js";
4
- import { LeaderBoardButton as s, LeaderBoardButtonId as m } from "../../../navigation/button/LeaderBoard.js";
5
- import { Navigation as e } from "../../../navigation/masters.js";
1
+ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
+ import { ChannelsButton as u, ChannelsButtonId as i } from "../../../navigation/button/Channels.js";
3
+ import { FeaturedGroupsButton as s, FeaturedGroupsButtonId as n } from "../../../navigation/button/FeaturedGroups.js";
4
+ import { LeaderBoardButton as e, LeaderBoardButtonId as m } from "../../../navigation/button/LeaderBoard.js";
5
+ import { Navigation as B } from "../../../navigation/masters.js";
6
6
  import "@linaria/react";
7
7
  import "../../../icons/index.js";
8
8
  import "react";
9
9
  import "../../../navigation/button/index.js";
10
10
  import "../../../navigation/button/styles.js";
11
11
  import "../../../navigation/index.js";
12
- const F = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p }) => /* @__PURE__ */ d(e, { children: [
13
- /* @__PURE__ */ r(a, { active: o === i, onClick: () => t(i) }),
12
+ const G = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p, className: d }) => /* @__PURE__ */ a(B, { className: d, children: [
13
+ /* @__PURE__ */ r(u, { active: o === i, onClick: () => t(i) }),
14
14
  /* @__PURE__ */ r(
15
- u,
15
+ s,
16
16
  {
17
17
  active: o === n,
18
18
  disabled: !p,
@@ -22,7 +22,7 @@ const F = ({ activeOverlay: o, setActiveOverlay: t, sdkReady: p }) => /* @__PURE
22
22
  }
23
23
  ),
24
24
  /* @__PURE__ */ r(
25
- s,
25
+ e,
26
26
  {
27
27
  active: o === m,
28
28
  onClick: () => t(m)
@@ -33,5 +33,5 @@ export {
33
33
  i as ChannelsButtonId,
34
34
  n as FeaturedGroupsButtonId,
35
35
  m as LeaderBoardButtonId,
36
- F as MastersNavigation
36
+ G as MastersNavigation
37
37
  };
@@ -2,12 +2,11 @@
2
2
  import { type StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
3
  export type Overlays = {};
4
4
  export type MastersAppChildrenProps = {
5
- enableSdk: () => void;
5
+ enableSdk: (event: string) => void;
6
6
  disableSdk: () => void;
7
7
  };
8
8
  export type MastersAppProps = {
9
9
  sdk: StreamLayerSDK;
10
- event: string;
11
10
  overlays?: Overlays;
12
11
  children: (methods: MastersAppChildrenProps) => React.ReactNode;
13
12
  };
@@ -1,14 +1,13 @@
1
- import { jsx as r, jsxs as u } from "react/jsx-runtime";
2
- import { StreamLayerThemeProvider as f } from "../theme/index.js";
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { resetCss as e } from "../theme/theme.js";
3
3
  import { ActiveFeature as v } from "./Features/index.js";
4
4
  import { MastersNavigation as S } from "./Navigation/MastersNavigation/index.js";
5
- import { SDKContainer as y, SDKScrollContainer as e } from "./styles.js";
6
- import { useMastersApp as h } from "./useMastersApp.js";
7
- import { useSdkFeature as k } from "./useSdkFeature.js";
8
- import { ChannelsButtonId as b } from "../navigation/button/Channels.js";
9
- import { LeaderBoardButtonId as a } from "../navigation/button/LeaderBoard.js";
10
- import { FeaturedGroupsButtonId as A } from "../navigation/button/FeaturedGroups.js";
11
- import "../theme/theme.js";
5
+ import { SDKContainer as y, SDKScrollContainer as a } from "./styles.js";
6
+ import { useMastersApp as k } from "./useMastersApp.js";
7
+ import { useSdkFeature as b } from "./useSdkFeature.js";
8
+ import { ChannelsButtonId as A } from "../navigation/button/Channels.js";
9
+ import { LeaderBoardButtonId as n } from "../navigation/button/LeaderBoard.js";
10
+ import { FeaturedGroupsButtonId as B } from "../navigation/button/FeaturedGroups.js";
12
11
  import "@linaria/core";
13
12
  import "../theme/constants.js";
14
13
  import "react";
@@ -78,42 +77,40 @@ import "../navigation/masters.js";
78
77
  import "../navigation/index.js";
79
78
  import "../navigation/button/index.js";
80
79
  import "../navigation/button/styles.js";
81
- const g = ({ sdk: o }) => {
82
- const [, m] = k(o);
83
- return /* @__PURE__ */ r(v, { feature: m, sdk: o });
84
- }, Xt = ({ sdk: o, overlays: m, children: p, event: n }) => {
85
- const { sdkEnabled: i, sdkReady: d, activeOverlay: t, activateAndLoadOverlay: s, enableSdk: l, disableSdk: c } = h(
86
- o,
87
- n
88
- );
89
- return /* @__PURE__ */ r(f, { style: { height: "100%" }, children: /* @__PURE__ */ u(y, { children: [
90
- i && /* @__PURE__ */ r(
80
+ const C = ({ sdk: r, className: m }) => {
81
+ const [, p] = b(r);
82
+ return /* @__PURE__ */ i(v, { className: m, feature: p, sdk: r });
83
+ }, Wt = ({ sdk: r, overlays: m, children: p }) => {
84
+ const { sdkEnabled: o, sdkReady: s, activeOverlay: t, activateAndLoadOverlay: d, enableSdk: l, disableSdk: c } = k(r);
85
+ return /* @__PURE__ */ f(y, { children: [
86
+ o && /* @__PURE__ */ i(
91
87
  S,
92
88
  {
93
- sdkReady: d,
89
+ sdkReady: s,
94
90
  activeOverlay: t,
95
- setActiveOverlay: s
91
+ className: e,
92
+ setActiveOverlay: (u) => d("", u)
96
93
  }
97
94
  ),
98
- /* @__PURE__ */ r(
99
- e,
95
+ /* @__PURE__ */ i(
96
+ a,
100
97
  {
101
- "data-nav": i.toString(),
102
- style: { display: !i || t === b ? "block" : "none" },
98
+ "data-nav": o.toString(),
99
+ style: { display: !o || t === A ? "block" : "none" },
103
100
  children: p && p({ enableSdk: l, disableSdk: c })
104
101
  }
105
102
  ),
106
- /* @__PURE__ */ r(
107
- e,
103
+ /* @__PURE__ */ i(
104
+ a,
108
105
  {
109
- "data-nav": i.toString(),
110
- style: { display: t === a ? "block" : "none" },
111
- children: m && t === a && m[t]
106
+ "data-nav": o.toString(),
107
+ style: { display: t === n ? "block" : "none" },
108
+ children: m && t === n && m[t]
112
109
  }
113
110
  ),
114
- i && t === A && /* @__PURE__ */ r(g, { sdk: o })
115
- ] }) });
111
+ o && t === B && /* @__PURE__ */ i(C, { className: e, sdk: r })
112
+ ] });
116
113
  };
117
114
  export {
118
- Xt as MastersApp
115
+ Wt as MastersApp
119
116
  };
@@ -4,6 +4,7 @@ const i = n.div`
4
4
  background: transparent;
5
5
  font-family: var(--font-regular);
6
6
  position: relative;
7
+ min-width: 324px;
7
8
  `, r = n.div`
8
9
  overflow-y: auto;
9
10
  height: 100%;
@@ -6,16 +6,16 @@ import { AvailableOverlays } from './Navigation/MastersNavigation';
6
6
  * - On activate Channels or Leaderboard button, the SDK is disabled and the FG+ overlay is closed.
7
7
  * - On sdk status change, if sdk disabled (f.e some errors occurred), the SDK is disabled and the FG+ overlay is closed.
8
8
  * @param sdk - The StreamLayerSDK instance to use.
9
- * @param event - The name of the event to create a session for.
10
9
  * @returns An object containing various functions and state values for managing the SDK and app overlays.
11
10
  * @returns disableSdk - A function that disables the SDK and closes the FG+ overlay.
12
11
  * @returns enableSdk - A function that initializes the SDK and opens the FG+ overlay.
12
+ * With event (The id of the event to create a session for.) as a parameter.
13
13
  */
14
- export declare const useMastersApp: (sdk: StreamLayerSDK, event: string) => {
14
+ export declare const useMastersApp: (sdk: StreamLayerSDK) => {
15
15
  sdkEnabled: boolean;
16
16
  sdkReady: boolean;
17
17
  activeOverlay: any;
18
- activateAndLoadOverlay: (overlay: AvailableOverlays) => void;
19
- enableSdk: () => void;
18
+ activateAndLoadOverlay: (event: string, overlay: AvailableOverlays) => void;
19
+ enableSdk: (event: string) => void;
20
20
  disableSdk: () => void;
21
21
  };
@@ -3,7 +3,7 @@ import { useState as u, useCallback as f, useEffect as S } from "react";
3
3
  import { FeatureType as b } from "@streamlayer/sdk-web-types";
4
4
  import "react/jsx-runtime";
5
5
  import { ChannelsButtonId as l } from "../navigation/button/Channels.js";
6
- import { FeaturedGroupsButtonId as r } from "../navigation/button/FeaturedGroups.js";
6
+ import { FeaturedGroupsButtonId as o } from "../navigation/button/FeaturedGroups.js";
7
7
  import "../navigation/button/LeaderBoard.js";
8
8
  import "../navigation/masters.js";
9
9
  import "@linaria/react";
@@ -11,34 +11,34 @@ import "../icons/index.js";
11
11
  import "../navigation/button/index.js";
12
12
  import "../navigation/button/styles.js";
13
13
  import "../navigation/index.js";
14
- const R = (e, s) => {
15
- const [m, n] = u(!1), o = d(e.status) === "ready", [a, p] = u(r), i = f(
16
- (t) => {
17
- p(t), t === r ? (e.createEventSession(s), e.openFeature(b.GAMES)) : e.closeFeature();
14
+ const R = (t) => {
15
+ const [m, n] = u(!1), a = d(t.status) === "ready", [i, p] = u(o), s = f(
16
+ (e, r) => {
17
+ p(r), r === o ? (e && t.createEventSession(e), t.openFeature(b.GAMES)) : t.closeFeature();
18
18
  },
19
- [s, e]
19
+ [t]
20
20
  );
21
21
  return S(() => {
22
- !o && a === r && (p(l), e.closeFeature());
23
- }, [o, a, e]), {
22
+ !a && i === o && (p(l), t.closeFeature());
23
+ }, [a, i, t]), {
24
24
  sdkEnabled: m,
25
- sdkReady: o,
26
- activeOverlay: a,
27
- activateAndLoadOverlay: i,
28
- enableSdk: () => {
29
- e.initializeApp().then(({ enabled: t, err: c }) => {
25
+ sdkReady: a,
26
+ activeOverlay: i,
27
+ activateAndLoadOverlay: s,
28
+ enableSdk: (e) => {
29
+ t.initializeApp().then(({ enabled: r, err: c }) => {
30
30
  if (n(!0), c) {
31
- i(l);
31
+ s(e, l);
32
32
  return;
33
33
  }
34
- if (t) {
35
- i(r);
34
+ if (r) {
35
+ s(e, o);
36
36
  return;
37
37
  }
38
38
  });
39
39
  },
40
40
  disableSdk: () => {
41
- n(!1), e.disableApp();
41
+ n(!1), t.disableApp();
42
42
  }
43
43
  };
44
44
  };
@@ -3,12 +3,14 @@ import { FeatureType as s } from "@streamlayer/sdk-web-types";
3
3
  import { useStore as p } from "@nanostores/react";
4
4
  import { styled as u } from "@linaria/react";
5
5
  import { Points as a } from "../gamification/points/index.js";
6
+ import "../theme/theme.js";
7
+ import "@linaria/core";
8
+ import "../theme/constants.js";
6
9
  import "../../utils/common.js";
7
10
  import "../gamification/points/styles.js";
8
11
  import "../icons/index.js";
9
12
  import "react";
10
13
  import "../theme/breakpoints.js";
11
- import "../theme/constants.js";
12
14
  const d = u.div`
13
15
  position: fixed;
14
16
  top: 0;
@@ -17,10 +19,10 @@ const d = u.div`
17
19
  var m, i, e, n;
18
20
  const t = p(o);
19
21
  return ((i = (m = t.data) == null ? void 0 : m.summary) == null ? void 0 : i.points) === void 0 ? null : /* @__PURE__ */ r(d, { children: ((n = (e = t.data) == null ? void 0 : e.summary) == null ? void 0 : n.points) && /* @__PURE__ */ r(a, { points: t.data.summary.points }) });
20
- }, F = ({ sdk: o }) => {
22
+ }, A = ({ sdk: o }) => {
21
23
  const t = o.getFeature(s.GAMES);
22
24
  return t != null && t.userSummary ? /* @__PURE__ */ r(f, { store: t.userSummary.getStore() }) : null;
23
25
  };
24
26
  export {
25
- F as DemoPoints
27
+ A as DemoPoints
26
28
  };
@@ -4,4 +4,5 @@ export declare const Insight: React.FC<{
4
4
  openedInsight: Exclude<Highlights['openedInsight']['value'], undefined>;
5
5
  closeHighlights: () => void;
6
6
  closeInsight: () => void;
7
+ className?: string;
7
8
  }>;
@@ -1,24 +1,25 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { DetailedInsight as L } from "../../gamification/detailed-insight/index.js";
1
+ import { jsx as L } from "react/jsx-runtime";
2
+ import { DetailedInsight as c } from "../../gamification/detailed-insight/index.js";
3
3
  import "../../gamification/common-header/index.js";
4
4
  import "../../../icon-exit-d3f9fc80.js";
5
5
  import "../../gamification/common-header/styles.js";
6
6
  import "@linaria/react";
7
7
  import "../../gamification/detailed-insight/styles.js";
8
- const j = ({ openedInsight: o, closeHighlights: r, closeInsight: s }) => {
8
+ const x = ({ openedInsight: o, closeHighlights: r, closeInsight: s, className: l }) => {
9
9
  var t, a, b, n, e;
10
10
  const i = ((t = o.options) == null ? void 0 : t.options.case) === "factoid" ? {
11
11
  image: o.options.options.value.image,
12
12
  body: o.options.options.value.body,
13
13
  webLink: (a = o.options.options.value.webLink) == null ? void 0 : a.url,
14
14
  webLinkLabel: (b = o.options.options.value.webLink) == null ? void 0 : b.label
15
- } : {}, l = o.subject || ((n = o.notification) == null ? void 0 : n.title), m = i.body || ((e = o.notification) == null ? void 0 : e.body);
16
- return /* @__PURE__ */ p(
17
- L,
15
+ } : {}, m = o.subject || ((n = o.notification) == null ? void 0 : n.title), p = i.body || ((e = o.notification) == null ? void 0 : e.body);
16
+ return /* @__PURE__ */ L(
17
+ c,
18
18
  {
19
+ className: l,
19
20
  image: i.image,
20
- title: l,
21
- description: m,
21
+ title: m,
22
+ description: p,
22
23
  webLink: i.webLink,
23
24
  webLinkLabel: i.webLinkLabel,
24
25
  closeInsight: s,
@@ -27,5 +28,5 @@ const j = ({ openedInsight: o, closeHighlights: r, closeInsight: s }) => {
27
28
  );
28
29
  };
29
30
  export {
30
- j as Insight
31
+ x as Insight
31
32
  };
@@ -3,4 +3,5 @@ import type { Highlights } from '@streamlayer/feature-gamification';
3
3
  export declare const Insights: React.FC<{
4
4
  highlights: Highlights;
5
5
  store: ReturnType<Exclude<Highlights['insights'], undefined>['getStore']>;
6
+ className?: string;
6
7
  }>;
@@ -1,15 +1,15 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { useStore as s } from "@nanostores/react";
3
- import { InsightList as n } from "../../gamification/insight-list/index.js";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useStore as p } from "@nanostores/react";
3
+ import { InsightList as s } from "../../gamification/insight-list/index.js";
4
4
  import "../../gamification/insight/index.js";
5
5
  import "@streamlayer/sdk-web-types";
6
6
  import "../../gamification/insight/styles.js";
7
7
  import "@linaria/react";
8
8
  import "../../gamification/insight-list/styles.js";
9
- const d = ({ highlights: r, store: o }) => {
10
- const { data: t } = s(o);
11
- return t ? /* @__PURE__ */ i(n, { insights: t, openInsight: r.openHighlight }) : /* @__PURE__ */ i("div", { children: "wait insights..." });
9
+ const c = ({ highlights: o, store: n, className: t }) => {
10
+ const { data: i } = p(n);
11
+ return i ? /* @__PURE__ */ r(s, { className: t, insights: i, openInsight: o.openHighlight }) : /* @__PURE__ */ r("div", { className: t, children: "wait insights..." });
12
12
  };
13
13
  export {
14
- d as Insights
14
+ c as Insights
15
15
  };
@@ -14,7 +14,8 @@ import "react-window-infinite-loader";
14
14
  import "../../gamification/leaderboard-item/index.js";
15
15
  import "../../../utils/common.js";
16
16
  import "../../gamification/leaderboard-item/styles.js";
17
- const C = ({ store: p }) => {
17
+ import "../../icons/index.js";
18
+ const E = ({ store: p }) => {
18
19
  const { data: r } = u(p), [e, s] = b(void 0);
19
20
  if (!r)
20
21
  return /* @__PURE__ */ i("div", { children: "wait leader board..." });
@@ -38,5 +39,5 @@ const C = ({ store: p }) => {
38
39
  ] });
39
40
  };
40
41
  export {
41
- C as Leaderboard
42
+ E as Leaderboard
42
43
  };
@@ -7,6 +7,7 @@ type DetailedInsightProps = {
7
7
  webLink?: string;
8
8
  closeHighlights: () => void;
9
9
  closeInsight: () => void;
10
+ className?: string;
10
11
  };
11
12
  export declare const DetailedInsight: React.FC<DetailedInsightProps>;
12
13
  export {};
@@ -1,29 +1,30 @@
1
1
  import { jsxs as I, jsx as M } from "react/jsx-runtime";
2
- import { CommonHeader as Z } from "../common-header/index.js";
3
- import { Container as g, Image as l, AdditionalContent as o, Title as n, Description as d, AdditionalBtn as r, LinkIcon as a } from "./styles.js";
2
+ import { CommonHeader as g } from "../common-header/index.js";
3
+ import { Container as l, Image as o, AdditionalContent as n, Title as d, Description as r, AdditionalBtn as a, LinkIcon as u } from "./styles.js";
4
4
  import "../../../icon-exit-d3f9fc80.js";
5
5
  import "../common-header/styles.js";
6
6
  import "@linaria/react";
7
- const u = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=", C = ({
7
+ const b = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNyAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBjbGFzcz0ic2MtQU5kc04ga1RWV0pFIj48cGF0aCBkPSJNNi42NjY1IDMuMTY2NjlINC45OTk4NEM0LjI2MzQ2IDMuMTY2NjkgMy42NjY1IDMuNzYzNjQgMy42NjY1IDQuNTAwMDJWMTEuNUMzLjY2NjUgMTIuMjM2NCA0LjI2MzQ2IDEyLjgzMzQgNC45OTk4NCAxMi44MzM0SDExLjk5OThDMTIuNzM2MiAxMi44MzM0IDEzLjMzMzIgMTIuMjM2NCAxMy4zMzMyIDExLjVWOS44MzMzNSIgc3Ryb2tlPSIjZmZmZmZmIiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIj48L3BhdGg+PHBhdGggZD0iTTEzLjMzMzUgNi4xNjY2OVYzLjE2NjY5SDEwLjMzMzUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjxwYXRoIGQ9Ik0xMy4xNjY4IDMuMzMzMzFMOC4zMzM1IDguMTY2NjUiIHN0cm9rZT0iI2ZmZmZmZiIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PC9wYXRoPjwvc3ZnPgo=", L = ({
8
8
  image: i,
9
9
  title: j,
10
10
  description: m,
11
11
  webLinkLabel: z,
12
12
  webLink: c,
13
13
  closeHighlights: t,
14
- closeInsight: N
15
- }) => /* @__PURE__ */ I(g, { children: [
16
- /* @__PURE__ */ M(Z, { close: t, comeBack: N }),
17
- i && /* @__PURE__ */ M(l, { alt: "detail-insight-image", src: i }),
18
- /* @__PURE__ */ I(o, { children: [
19
- j && /* @__PURE__ */ M(n, { children: j }),
20
- m && /* @__PURE__ */ M(d, { children: m })
14
+ closeInsight: N,
15
+ className: Z
16
+ }) => /* @__PURE__ */ I(l, { className: Z, children: [
17
+ /* @__PURE__ */ M(g, { close: t, comeBack: N }),
18
+ i && /* @__PURE__ */ M(o, { alt: "detail-insight-image", src: i }),
19
+ /* @__PURE__ */ I(n, { children: [
20
+ j && /* @__PURE__ */ M(d, { children: j }),
21
+ m && /* @__PURE__ */ M(r, { children: m })
21
22
  ] }),
22
- c && z && /* @__PURE__ */ I(r, { href: c, target: "_blank", children: [
23
+ c && z && /* @__PURE__ */ I(a, { href: c, target: "_blank", children: [
23
24
  z,
24
- /* @__PURE__ */ M(a, { alt: "link-icon", src: u })
25
+ /* @__PURE__ */ M(u, { alt: "link-icon", src: b })
25
26
  ] })
26
27
  ] });
27
28
  export {
28
- C as DetailedInsight
29
+ L as DetailedInsight
29
30
  };
@@ -8,6 +8,7 @@ interface InsightListProps {
8
8
  title: string;
9
9
  }>;
10
10
  openInsight: (insightId: string) => void;
11
+ className?: string;
11
12
  }
12
13
  export declare const InsightList: React.FC<InsightListProps>;
13
14
  export {};
@@ -1,10 +1,10 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Insight as e } from "../insight/index.js";
3
- import { Container as n, ItemsContainer as i } from "./styles.js";
2
+ import { Insight as n } from "../insight/index.js";
3
+ import { Container as i, ItemsContainer as p } from "./styles.js";
4
4
  import "@streamlayer/sdk-web-types";
5
5
  import "../insight/styles.js";
6
6
  import "@linaria/react";
7
- const l = ({ insights: r, openInsight: m }) => /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(i, { children: r == null ? void 0 : r.map((t) => /* @__PURE__ */ o(e, { openInsight: m, ...t }, t.questionId)) }) });
7
+ const u = ({ insights: r, openInsight: m, className: e }) => /* @__PURE__ */ o(i, { className: e, children: /* @__PURE__ */ o(p, { children: r == null ? void 0 : r.map((t) => /* @__PURE__ */ o(n, { openInsight: m, ...t }, t.questionId)) }) });
8
8
  export {
9
- l as InsightList
9
+ u as InsightList
10
10
  };
@@ -2,6 +2,7 @@
2
2
  import type { LeaderboardItem as ILeaderboardItem } from '@streamlayer/sdk-web-types';
3
3
  export type LeaderboardItemProps = Partial<ILeaderboardItem> & {
4
4
  userId: string;
5
+ isCurrentUser: boolean;
5
6
  openItemDetail: () => void;
6
7
  style?: React.CSSProperties;
7
8
  };
@@ -1,25 +1,28 @@
1
1
  import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
- import { abbreviate as l } from "../../../utils/common.js";
3
- import { Container as c, RankPosition as m, Avatar as h, AvatarPlaceholder as s, Content as p, NameWrap as b, Name as f, Rank as k, Units as v } from "./styles.js";
2
+ import { abbreviate as c, formatDecimals as l } from "../../../utils/common.js";
3
+ import { Container as s, Position as h, Content as p, Avatar as C, AvatarPlaceholder as b, NameContainer as f, Name as v, CurrentUserBadge as x } from "./styles.js";
4
4
  import "@linaria/react";
5
- const A = ({
6
- rank: t,
5
+ import "../../icons/index.js";
6
+ import "react";
7
+ const k = ({
8
+ rank: o,
7
9
  avatar: i,
8
- name: n,
10
+ name: t,
9
11
  points: a,
10
- openItemDetail: o,
12
+ isCurrentUser: n,
13
+ openItemDetail: m,
11
14
  style: d
12
- }) => /* @__PURE__ */ e(c, { onClick: o, style: d, children: [
13
- /* @__PURE__ */ r(m, { children: t || 0 }),
14
- i ? /* @__PURE__ */ r(h, { alt: "leaderboard-item-avatar", src: i }) : /* @__PURE__ */ r(s, { children: l(n || "") }),
15
+ }) => /* @__PURE__ */ e(s, { onClick: m, style: d, children: [
16
+ /* @__PURE__ */ r(h, { children: o || 0 }),
15
17
  /* @__PURE__ */ e(p, { children: [
16
- /* @__PURE__ */ r(b, { children: /* @__PURE__ */ r(f, { children: n || "" }) }),
17
- /* @__PURE__ */ e(k, { children: [
18
- /* @__PURE__ */ r(v, { children: "PTS" }),
19
- a || 0
18
+ i ? /* @__PURE__ */ r(C, { alt: "leaderboard-item-avatar", src: i }) : /* @__PURE__ */ r(b, { children: c(t || "") }),
19
+ /* @__PURE__ */ e(f, { children: [
20
+ /* @__PURE__ */ r(v, { children: t || "" }),
21
+ n && /* @__PURE__ */ r(x, { name: "icon-star" })
20
22
  ] })
21
- ] })
23
+ ] }),
24
+ /* @__PURE__ */ r("div", { children: l(a) })
22
25
  ] });
23
26
  export {
24
- A as LeaderboardItem
27
+ k as LeaderboardItem
25
28
  };
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
- export declare const RankPosition: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const Position: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
4
  export declare const Avatar: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
5
5
  export declare const AvatarPlaceholder: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
6
6
  export declare const Content: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
- export declare const NameWrap: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
+ export declare const NameContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
8
  export declare const Name: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
9
- export declare const Rank: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
- export declare const Units: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & Record<never, unknown>>;
9
+ export declare const CurrentUserBadge: any;
@@ -1,78 +1,69 @@
1
- import { styled as e } from "@linaria/react";
2
- const t = e.div`
3
- box-sizing: border-box;
1
+ import { styled as r } from "@linaria/react";
2
+ import { SvgIcon as e } from "../../icons/index.js";
3
+ import "react/jsx-runtime";
4
+ import "react";
5
+ const a = r.div`
4
6
  display: flex;
5
- padding: 8px;
6
7
  align-items: center;
8
+ column-gap: 4px;
9
+ padding: 8px 16px 8px 8px;
10
+ color: var(--color-neutrals-gray9);
11
+ font-size: 12px;
12
+ font-weight: var(--font-weight-default);
13
+ line-height: 16px;
14
+ border: 1px solid var(--color-neutrals-gray3);
7
15
  border-radius: 8px;
8
- width: 100%;
9
- min-height: 50px;
10
- max-height: 50px;
11
- background-color: #fff;
12
- color: #000;
13
- font-size: 14px;
14
- font-weight: 600;
15
- overflow: hidden;
16
+ background-color: var(--color-neutrals-white);
16
17
  cursor: pointer;
17
- `, n = e.div`
18
- width: 28px;
19
- max-width: 28px;
18
+
19
+ &:hover {
20
+ color: var(--color-primary-green1);
21
+ border-color: var(--color-neutrals-gray5);
22
+ }
23
+ `, l = r.div`
24
+ min-width: 28px;
25
+ text-align: center;
26
+ `, p = r.img`
27
+ width: 32px;
28
+ height: 32px;
29
+ border-radius: 50%;
30
+ `, s = r.div`
20
31
  display: flex;
32
+ flex-shrink: 0;
21
33
  align-items: center;
22
34
  justify-content: center;
23
- margin-right: 4px;
24
- overflow: hidden;
25
- `, r = e.img`
26
35
  width: 32px;
27
36
  height: 32px;
37
+ color: var(--color-neutrals-gray9);
38
+ font-size: 12px;
28
39
  border-radius: 50%;
29
- `, o = e.div`
30
40
  background: var(--color-grey-primary-onboarding-inapp);
31
- border-radius: 50%;
32
- width: 32px;
33
- height: 32px;
34
41
  text-align: center;
35
42
  text-transform: uppercase;
43
+ `, c = r.div`
36
44
  display: flex;
45
+ flex-grow: 1;
37
46
  align-items: center;
38
- justify-content: center;
39
- font-size: 12px;
40
- flex-shrink: 0;
41
- `, a = e.div`
42
- flex: 1;
43
- display: flex;
44
- justify-content: space-between;
47
+ column-gap: 8px;
48
+ `, d = r.div`
49
+ display: grid;
45
50
  align-items: center;
46
- padding: 4px 4px 4px 0px;
47
- margin-right: 4px;
48
- margin-left: 8px;
49
- overflow: hidden;
50
- `, p = e.div`
51
- display: flex;
52
- align-items: center;
53
- flex: 1;
54
- overflow: hidden;
55
- `, d = e.span`
56
- overflow: hidden;
57
- white-space: nowrap;
51
+ column-gap: 4px;
52
+ grid-template-columns: 1fr auto;
53
+ `, g = r.span`
58
54
  text-overflow: ellipsis;
59
- margin-right: 4px;
60
- `, s = e.div`
61
- display: flex;
62
- align-items: center;
63
- max-width: 75px;
64
- `, x = e.span`
65
- font-size: 10px;
66
- margin-right: 4px;
55
+ white-space: nowrap;
56
+ overflow: hidden;
57
+ `, x = r(e)`
58
+ flex-shrink: 0;
67
59
  `;
68
60
  export {
69
- r as Avatar,
70
- o as AvatarPlaceholder,
71
- t as Container,
72
- a as Content,
73
- d as Name,
74
- p as NameWrap,
75
- s as Rank,
76
- n as RankPosition,
77
- x as Units
61
+ p as Avatar,
62
+ s as AvatarPlaceholder,
63
+ a as Container,
64
+ c as Content,
65
+ x as CurrentUserBadge,
66
+ g as Name,
67
+ d as NameContainer,
68
+ l as Position
78
69
  };
@@ -1,4 +1,4 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import l from "react-virtualized-auto-sizer";
3
3
  import { FixedSizeList as u } from "react-window";
4
4
  import I from "react-window-infinite-loader";
@@ -6,34 +6,36 @@ import { LeaderboardItem as f } from "../leaderboard-item/index.js";
6
6
  import "../../../utils/common.js";
7
7
  import "../leaderboard-item/styles.js";
8
8
  import "@linaria/react";
9
- const C = ({ items: r, openItemDetail: i, fetchMore: m }) => /* @__PURE__ */ e(l, { children: ({ width: d, height: n }) => /* @__PURE__ */ e(
9
+ import "../../icons/index.js";
10
+ import "react";
11
+ const x = ({ items: r, openItemDetail: i, fetchMore: m }) => /* @__PURE__ */ o(l, { children: ({ width: d, height: n }) => /* @__PURE__ */ o(
10
12
  I,
11
13
  {
12
- isItemLoaded: (o) => o < r.length,
14
+ isItemLoaded: (t) => t < r.length,
13
15
  itemCount: r.length + 1,
14
16
  loadMoreItems: m,
15
- children: ({ onItemsRendered: o, ref: p }) => /* @__PURE__ */ e(
17
+ children: ({ onItemsRendered: t, ref: p }) => /* @__PURE__ */ o(
16
18
  u,
17
19
  {
18
20
  itemSize: 58,
19
- onItemsRendered: o,
21
+ onItemsRendered: t,
20
22
  ref: p,
21
23
  itemCount: r.length,
22
24
  width: d,
23
25
  height: n,
24
- children: ({ index: t, style: a }) => /* @__PURE__ */ e(
26
+ children: ({ index: e, style: a }) => /* @__PURE__ */ o(
25
27
  f,
26
28
  {
27
29
  style: a,
28
- ...r[t],
29
- openItemDetail: () => i(r[t].userId)
30
+ ...r[e],
31
+ openItemDetail: () => i(r[e].userId)
30
32
  },
31
- r[t].userId
33
+ r[e].userId
32
34
  )
33
35
  }
34
36
  )
35
37
  }
36
38
  ) });
37
39
  export {
38
- C as LeaderboardList
40
+ x as LeaderboardList
39
41
  };
@@ -1,18 +1,20 @@
1
1
  import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { formatDecimals as r } from "../../../utils/common.js";
3
- import { PointsContainer as n, PointsIcon as m, PointsSvg as s, PointsBody as e, PointsTitle as p, PointsValue as c } from "./styles.js";
2
+ import { resetCss as r } from "../../theme/theme.js";
3
+ import { formatDecimals as n } from "../../../utils/common.js";
4
+ import { PointsContainer as m, PointsIcon as s, PointsSvg as e, PointsBody as p, PointsTitle as c, PointsValue as l } from "./styles.js";
5
+ import "@linaria/core";
6
+ import "../../theme/constants.js";
4
7
  import "@linaria/react";
5
8
  import "../../icons/index.js";
6
9
  import "react";
7
10
  import "../../theme/breakpoints.js";
8
- import "../../theme/constants.js";
9
- const u = ({ points: t }) => /* @__PURE__ */ i(n, { children: [
10
- /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(s, { name: "icon-trophy" }) }),
11
- /* @__PURE__ */ i(e, { children: [
12
- /* @__PURE__ */ o(p, { children: "Total points" }),
13
- /* @__PURE__ */ o(c, { children: r(t) })
11
+ const T = ({ points: t }) => /* @__PURE__ */ i(m, { className: r, children: [
12
+ /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(e, { name: "icon-trophy" }) }),
13
+ /* @__PURE__ */ i(p, { children: [
14
+ /* @__PURE__ */ o(c, { children: "Total points" }),
15
+ /* @__PURE__ */ o(l, { children: n(t) })
14
16
  ] })
15
17
  ] });
16
18
  export {
17
- u as Points
19
+ T as Points
18
20
  };
@@ -2,7 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
2
2
  import { theme as o } from "./theme.js";
3
3
  import "@linaria/core";
4
4
  import "./constants.js";
5
- const s = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: o, style: m, children: r });
5
+ const p = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: o, style: m, children: r }) });
6
6
  export {
7
- s as StreamLayerThemeProvider
7
+ p as StreamLayerThemeProvider
8
8
  };
@@ -1,3 +1,7 @@
1
1
  export declare const themeStr: string;
2
+ /**
3
+ * @link https://stackoverflow.com/a/65560812
4
+ */
5
+ export declare const resetCss = "StreamLayerCSSReset";
2
6
  export declare const theme: import("@linaria/core").LinariaClassName;
3
7
  export declare const ThemeVariables: () => import("react/jsx-runtime").JSX.Element;
@@ -1,36 +1,37 @@
1
- import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
- import { css as d } from "@linaria/core";
3
- import { colors as c, FONT as e } from "./constants.js";
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { css as l } from "@linaria/core";
3
+ import { colors as c, FONT as t } from "./constants.js";
4
4
  const i = `
5
5
  ${c}
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};
6
+ --font-family: ${t.REGULAR};
7
+ --font-regular: ${t.REGULAR};
8
+ --font-color: ${t.COLOR};
9
+ --font-serif: ${t.SERIF};
10
+ --font-weight-default: ${t.WEIGHT_DEFAULT};
11
11
 
12
12
  --header-height: 68px;
13
13
  --animation-duration: 0.5s;
14
14
  --animation-function: ease;
15
15
  --container-padding: 16px;
16
16
  --border-radius: 8px;
17
- `, f = d`
17
+ `, f = "StreamLayerCSSReset", p = l`
18
18
  ${i}
19
- `, p = () => /* @__PURE__ */ t("table", { children: /* @__PURE__ */ r("table", { children: [
20
- /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ r("tr", { children: [
21
- /* @__PURE__ */ t("th", { children: "name" }),
22
- /* @__PURE__ */ t("th", { children: "value" })
19
+ `, u = () => /* @__PURE__ */ e("table", { children: /* @__PURE__ */ r("table", { children: [
20
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { children: [
21
+ /* @__PURE__ */ e("th", { children: "name" }),
22
+ /* @__PURE__ */ e("th", { children: "value" })
23
23
  ] }) }),
24
- /* @__PURE__ */ t("tbody", { children: i.split(";").map((o) => {
25
- const n = o.trim(), [a, l] = n.split(":");
24
+ /* @__PURE__ */ e("tbody", { children: i.split(";").map((o) => {
25
+ const n = o.trim(), [a, s] = n.split(":");
26
26
  return /* @__PURE__ */ r("tr", { children: [
27
- /* @__PURE__ */ t("td", { children: a }),
28
- /* @__PURE__ */ t("td", { children: l })
27
+ /* @__PURE__ */ e("td", { children: a }),
28
+ /* @__PURE__ */ e("td", { children: s })
29
29
  ] }, n);
30
30
  }) })
31
31
  ] }) });
32
32
  export {
33
- p as ThemeVariables,
34
- f as theme,
33
+ u as ThemeVariables,
34
+ f as resetCss,
35
+ p as theme,
35
36
  i as themeStr
36
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.50.0",
3
+ "version": "0.52.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -26,20 +26,20 @@
26
26
  "package.json"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@streamlayer/sl-eslib": "^5.52.0",
29
+ "@streamlayer/sl-eslib": "^5.53.5",
30
30
  "react-virtualized-auto-sizer": "^1.0.20",
31
31
  "react-window": "^1.8.9",
32
32
  "react-window-infinite-loader": "^1.0.9",
33
- "@streamlayer/feature-gamification": "^0.19.2",
34
- "@streamlayer/sdk-web-anonymous-auth": "^0.11.4",
35
- "@streamlayer/sdk-web": "^0.28.9",
36
- "@streamlayer/sdk-web-api": "^0.1.0",
37
- "@streamlayer/sdk-web-core": "^0.17.0",
38
- "@streamlayer/sdk-web-features": "^0.10.12",
39
- "@streamlayer/sdk-web-interfaces": "^0.18.8",
40
- "@streamlayer/sdk-web-notifications": "^0.10.7",
41
- "@streamlayer/sdk-web-storage": "^0.3.9",
42
- "@streamlayer/sdk-web-types": "^0.17.0"
33
+ "@streamlayer/feature-gamification": "^0.19.3",
34
+ "@streamlayer/sdk-web": "^0.28.10",
35
+ "@streamlayer/sdk-web-anonymous-auth": "^0.11.5",
36
+ "@streamlayer/sdk-web-api": "^0.0.1",
37
+ "@streamlayer/sdk-web-core": "^0.17.1",
38
+ "@streamlayer/sdk-web-features": "^0.10.13",
39
+ "@streamlayer/sdk-web-interfaces": "^0.18.9",
40
+ "@streamlayer/sdk-web-notifications": "^0.10.8",
41
+ "@streamlayer/sdk-web-types": "^0.17.1",
42
+ "@streamlayer/sdk-web-storage": "^0.3.10"
43
43
  },
44
44
  "nx": {
45
45
  "implicitDependencies": [
@@ -78,6 +78,6 @@
78
78
  "vite-plugin-svgr": "^4.1.0",
79
79
  "vite-svg-loader": "^4.0.0",
80
80
  "vite-tsconfig-paths": "^4.2.1",
81
- "@streamlayer/react": "^0.25.0"
81
+ "@streamlayer/react": "^0.26.0"
82
82
  }
83
83
  }