@streamlayer/react-ui 0.32.0 → 0.34.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/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { QuestionInApp as Uo } from "./ui/notifications/notification/question-inapp/index.js";
2
- import { Login as ko } from "./ui/login/index.js";
3
- import { Onboarding as wo } from "./ui/gamification/onboarding/index.js";
4
- import { ActivePages as Bo, Navigation as Co } from "./ui/gamification/navigation/index.js";
5
- import { LeaderboardItemDetail as Fo } from "./ui/gamification/leaderboard-item-detail/index.js";
6
- import { Question as Ho } from "./ui/gamification/question/index.js";
7
- import { QuestionList as Ko } from "./ui/gamification/question-list/index.js";
8
- import { UserStatistics as Ro } from "./ui/gamification/user-statistics/index.js";
9
- import { Vote as Xo } from "./ui/gamification/vote/index.js";
10
- import { Demo as Zo } from "./ui/demo/index.js";
11
- import { Points as $o } from "./ui/gamification/points/index.js";
12
- import { StreamLayerThemeProvider as rr } from "./ui/theme/index.js";
13
- import { ThemeVariables as mr, theme as ir, themeStr as pr } from "./ui/theme/theme.js";
1
+ import { QuestionInApp as jo } from "./ui/notifications/notification/question-inapp/index.js";
2
+ import { Login as qo } from "./ui/login/index.js";
3
+ import { Onboarding as zo } from "./ui/gamification/onboarding/index.js";
4
+ import { ActivePages as Co, Tab as Eo, Tabs as Fo } from "./ui/gamification/tabs/index.js";
5
+ import { LeaderboardItemDetail as Ho } from "./ui/gamification/leaderboard-item-detail/index.js";
6
+ import { Question as Ko } from "./ui/gamification/question/index.js";
7
+ import { QuestionList as No } from "./ui/gamification/question-list/index.js";
8
+ import { UserStatistics as Wo } from "./ui/gamification/user-statistics/index.js";
9
+ import { Vote as Yo } from "./ui/gamification/vote/index.js";
10
+ import { Demo as _o } from "./ui/demo/index.js";
11
+ import { Points as or } from "./ui/gamification/points/index.js";
12
+ import { StreamLayerThemeProvider as tr } from "./ui/theme/index.js";
13
+ import { ThemeVariables as pr, theme as ir, themeStr as er } from "./ui/theme/theme.js";
14
14
  import "react/jsx-runtime";
15
15
  import "react";
16
16
  import "./icon-exit-6a55bb8f.js";
@@ -34,7 +34,7 @@ import "./ui/gamification/onboarding/components/onboarding-slides/onboarding-inv
34
34
  import "./ui/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js";
35
35
  import "./ui/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js";
36
36
  import "./ui/gamification/onboarding/styles.js";
37
- import "./ui/gamification/navigation/styles.js";
37
+ import "./ui/gamification/tabs/styles.js";
38
38
  import "./ui/gamification/common-header/index.js";
39
39
  import "./ui/gamification/common-header/styles.js";
40
40
  import "./ui/gamification/leaderboard-item-detail/styles.js";
@@ -95,20 +95,21 @@ import "./ui/gamification/points/styles.js";
95
95
  import "./ui/icons/index.js";
96
96
  import "@linaria/core";
97
97
  export {
98
- Bo as ActivePages,
99
- Zo as Demo,
100
- Fo as LeaderboardItemDetail,
101
- ko as Login,
102
- Co as Navigation,
103
- wo as Onboarding,
104
- $o as Points,
105
- Ho as Question,
106
- Uo as QuestionInApp,
107
- Ko as QuestionList,
108
- rr as StreamLayerThemeProvider,
109
- mr as ThemeVariables,
110
- Ro as UserStatistics,
111
- Xo as Vote,
98
+ Co as ActivePages,
99
+ _o as Demo,
100
+ Ho as LeaderboardItemDetail,
101
+ qo as Login,
102
+ zo as Onboarding,
103
+ or as Points,
104
+ Ko as Question,
105
+ jo as QuestionInApp,
106
+ No as QuestionList,
107
+ tr as StreamLayerThemeProvider,
108
+ Eo as Tab,
109
+ Fo as Tabs,
110
+ pr as ThemeVariables,
111
+ Wo as UserStatistics,
112
+ Yo as Vote,
112
113
  ir as theme,
113
- pr as themeStr
114
+ er as themeStr
114
115
  };
@@ -1,10 +1,10 @@
1
1
  import { jsxs as e, Fragment as i, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as s } from "react";
3
- import { ActivePages as m, Navigation as a } from "../../../gamification/navigation/index.js";
3
+ import { ActivePages as m, Tabs as a } from "../../../gamification/tabs/index.js";
4
4
  import { Leaderboard as n } from "./Leaderboard.js";
5
5
  import { QuestionsList as u } from "./QuestionsList.js";
6
6
  import { UserSummary as g } from "./UserSummary.js";
7
- import "../../../gamification/navigation/styles.js";
7
+ import "../../../gamification/tabs/styles.js";
8
8
  import "@linaria/react";
9
9
  import "@nanostores/react";
10
10
  import "../../../gamification/leaderboard-item-detail/index.js";
@@ -19,8 +19,8 @@ import "../../../theme/constants.js";
19
19
  import "../../../gamification/vote/components/voting-header/components/timer/styles.js";
20
20
  import "../../../gamification/vote/components/voting-header/styles.js";
21
21
  import "../../../../fedex-a8dcc7b2.js";
22
- import "../../../gamification/navigation/index.js";
23
- import "../../../gamification/navigation/styles.js";
22
+ import "../../../gamification/tabs/index.js";
23
+ import "../../../gamification/tabs/styles.js";
24
24
  import "./Leaderboard.js";
25
25
  import "../../../gamification/leaderboard-item-detail/index.js";
26
26
  import "../../../gamification/common-header/index.js";
@@ -23,8 +23,8 @@ import "../../gamification/vote/components/voting-header/components/timer/styles
23
23
  import "../../gamification/vote/components/voting-header/styles.js";
24
24
  import "../../../fedex-a8dcc7b2.js";
25
25
  import "./Gamification/Tabs.js";
26
- import "../../gamification/navigation/index.js";
27
- import "../../gamification/navigation/styles.js";
26
+ import "../../gamification/tabs/index.js";
27
+ import "../../gamification/tabs/styles.js";
28
28
  import "./Gamification/Leaderboard.js";
29
29
  import "../../gamification/leaderboard-item-detail/index.js";
30
30
  import "../../gamification/common-header/index.js";
@@ -0,0 +1,36 @@
1
+ import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
+ import { ChannelsButton as u, ChannelsButtonId as i } from "../../../navigation/button/Channels.js";
3
+ import { FeaturedGroupsButton as a, FeaturedGroupsButtonId as n } from "../../../navigation/button/FeaturedGroups.js";
4
+ import { LeaderBoardButton as d, LeaderBoardButtonId as m } from "../../../navigation/button/LeaderBoard.js";
5
+ import { Navigation as s } from "../../../navigation/masters.js";
6
+ import "@linaria/react";
7
+ import "../../../icons/index.js";
8
+ import "react";
9
+ import "../../../navigation/button/index.js";
10
+ import "../../../navigation/button/styles.js";
11
+ import "../../../navigation/index.js";
12
+ const l = ({ activeOverlay: o, setActiveOverlay: t }) => /* @__PURE__ */ p(s, { children: [
13
+ /* @__PURE__ */ r(u, { active: o === i, onClick: () => t(i) }),
14
+ /* @__PURE__ */ r(
15
+ a,
16
+ {
17
+ active: o === n,
18
+ onClick: () => {
19
+ t(n);
20
+ }
21
+ }
22
+ ),
23
+ /* @__PURE__ */ r(
24
+ d,
25
+ {
26
+ active: o === m,
27
+ onClick: () => t(m)
28
+ }
29
+ )
30
+ ] });
31
+ export {
32
+ i as ChannelsButtonId,
33
+ n as FeaturedGroupsButtonId,
34
+ m as LeaderBoardButtonId,
35
+ l as MastersNavigation
36
+ };
@@ -1,14 +1,15 @@
1
- import { jsx as o, jsxs as a } from "react/jsx-runtime";
2
- import { useStore as s } from "@nanostores/react";
3
- import { useState as c } from "react";
1
+ import { jsx as o, jsxs as n } from "react/jsx-runtime";
2
+ import { useStore as c } from "@nanostores/react";
3
+ import { useState as f } from "react";
4
4
  import { FeatureType as u } from "@streamlayer/sdk-web-types";
5
- import { StreamLayerThemeProvider as f } from "../theme/index.js";
6
- import { ActiveFeature as S } from "./Features/index.js";
7
- import { MastersNavigation as b } from "./MastersNavigation/index.js";
8
- import { SDKContainer as h, SDKScrollContainer as v } from "./styles.js";
9
- import { useSdkFeature as y } from "./useSdkFeature.js";
5
+ import { StreamLayerThemeProvider as S } from "../theme/index.js";
6
+ import { mastersVariables as b } from "../theme/masters.js";
7
+ import { ActiveFeature as v } from "./Features/index.js";
8
+ import { MastersNavigation as h } from "./Navigation/MastersNavigation/index.js";
9
+ import { SDKContainer as y, SDKScrollContainer as A } from "./styles.js";
10
+ import { useSdkFeature as F } from "./useSdkFeature.js";
10
11
  import { FeaturedGroupsButtonId as m } from "../navigation/button/FeaturedGroups.js";
11
- import { ChannelsButtonId as A } from "../navigation/button/Channels.js";
12
+ import { ChannelsButtonId as B } from "../navigation/button/Channels.js";
12
13
  import { LeaderBoardButtonId as l } from "../navigation/button/LeaderBoard.js";
13
14
  import "../theme/theme.js";
14
15
  import "@linaria/core";
@@ -32,8 +33,8 @@ import "../gamification/vote/components/voting-header/components/timer/styles.js
32
33
  import "../gamification/vote/components/voting-header/styles.js";
33
34
  import "../../fedex-a8dcc7b2.js";
34
35
  import "./Features/Gamification/Tabs.js";
35
- import "../gamification/navigation/index.js";
36
- import "../gamification/navigation/styles.js";
36
+ import "../gamification/tabs/index.js";
37
+ import "../gamification/tabs/styles.js";
37
38
  import "./Features/Gamification/Leaderboard.js";
38
39
  import "../gamification/leaderboard-item-detail/index.js";
39
40
  import "../gamification/common-header/index.js";
@@ -68,25 +69,26 @@ import "../gamification/insight-list/index.js";
68
69
  import "../gamification/insight/index.js";
69
70
  import "../gamification/insight/styles.js";
70
71
  import "../gamification/insight-list/styles.js";
72
+ import "../navigation/masters.js";
71
73
  import "../navigation/index.js";
72
74
  import "../icons/index.js";
73
75
  import "../navigation/button/index.js";
74
76
  import "../navigation/button/styles.js";
75
- const Jr = ({ sdk: r, overlays: p, children: e }) => {
76
- const [t, n] = c(m), i = s(r.enabled) === "on", [, d] = y(r);
77
- return /* @__PURE__ */ o(f, { style: { height: "100%" }, children: /* @__PURE__ */ a(h, { children: [
78
- i && /* @__PURE__ */ o(b, { activeOverlay: t, setActiveOverlay: n }),
79
- /* @__PURE__ */ a(v, { children: [
80
- /* @__PURE__ */ o("div", { style: { display: !i || t === A ? "block" : "none" }, children: e && e({ enableSdk: () => {
81
- r.initializeApp().then(() => {
82
- n(m), r.openFeature(u.GAMES);
83
- });
84
- }, disableSdk: r.disableApp }) }),
77
+ const Rr = ({ sdk: r, overlays: p, children: e }) => {
78
+ const [t, a] = f(m), i = c(r.enabled) === "on", [, s] = F(r), d = () => {
79
+ r.initializeApp().then(() => {
80
+ a(m), r.openFeature(u.GAMES);
81
+ });
82
+ };
83
+ return /* @__PURE__ */ o(S, { style: { height: "100%" }, children: /* @__PURE__ */ n(y, { className: b, children: [
84
+ i && /* @__PURE__ */ o(h, { activeOverlay: t, setActiveOverlay: a }),
85
+ /* @__PURE__ */ n(A, { "data-nav": i.toString(), children: [
86
+ /* @__PURE__ */ o("div", { style: { display: !i || t === B ? "block" : "none" }, children: e && e({ enableSdk: d, disableSdk: r.disableApp }) }),
85
87
  /* @__PURE__ */ o("div", { style: { display: t === l ? "block" : "none" }, children: p && t === l && p[t] }),
86
- i && t === m && /* @__PURE__ */ o(S, { feature: d, sdk: r })
88
+ i && t === m && /* @__PURE__ */ o(v, { feature: s, sdk: r })
87
89
  ] })
88
90
  ] }) });
89
91
  };
90
92
  export {
91
- Jr as App
93
+ Rr as App
92
94
  };
@@ -1,13 +1,22 @@
1
- import { styled as o } from "@linaria/react";
2
- const r = o.div`
1
+ import { styled as t } from "@linaria/react";
2
+ const n = t.div`
3
3
  height: 100%;
4
4
  background: #fff;
5
5
  font-family: var(--font-regular);
6
- `, n = o.div`
6
+ position: relative;
7
+ `, i = t.div`
7
8
  overflow-y: auto;
8
9
  height: 100%;
10
+ transition: transform;
11
+ transition-duration: var(--animation-duration);
12
+ transition-timing-function: var(--animation-function);
13
+
14
+ &[data-nav='true'] {
15
+ height: calc(100% - var(--header-height));
16
+ transform: translateY(var(--header-height));
17
+ }
9
18
  `;
10
19
  export {
11
- r as SDKContainer,
12
- n as SDKScrollContainer
20
+ n as SDKContainer,
21
+ i as SDKScrollContainer
13
22
  };
@@ -1,8 +1,8 @@
1
- import { jsx as r, jsxs as s, Fragment as k } from "react/jsx-runtime";
2
- import { FeatureStatus as z } from "@streamlayer/sdk-web-interfaces";
1
+ import { jsx as t, jsxs as s, Fragment as z } from "react/jsx-runtime";
2
+ import { FeatureStatus as J } from "@streamlayer/sdk-web-interfaces";
3
3
  import { useStore as p } from "@nanostores/react";
4
- import { useState as J } from "react";
5
- import { ActivePages as a, Navigation as K } from "../gamification/navigation/index.js";
4
+ import { useState as K } from "react";
5
+ import { ActivePages as a, Tabs as N } from "../gamification/tabs/index.js";
6
6
  import { UserSummary as V } from "./components/UserSummary.js";
7
7
  import { QuestionsList as W } from "./components/QuestionsList.js";
8
8
  import { Question as X } from "./components/Question.js";
@@ -14,7 +14,7 @@ import "../gamification/common-header/styles.js";
14
14
  import "../gamification/detailed-insight/styles.js";
15
15
  import { Leaderboard as Z } from "./components/Leaderboard.js";
16
16
  import { DemoContainer as m, UserStatisticsContainer as _, QuestionsContainer as $ } from "./styles.js";
17
- import "../gamification/navigation/styles.js";
17
+ import "../gamification/tabs/styles.js";
18
18
  import "@linaria/react";
19
19
  import "../gamification/user-statistics/index.js";
20
20
  import "../../utils/common.js";
@@ -58,24 +58,24 @@ import "../gamification/leaderboard-invite-link/styles.js";
58
58
  import "../gamification/leaderboard-item/index.js";
59
59
  import "../gamification/leaderboard-item/styles.js";
60
60
  import "../gamification/leaderboard-list/styles.js";
61
- const mr = ({
62
- gamification: t,
61
+ const mt = ({
62
+ gamification: r,
63
63
  sdk: u
64
64
  }) => {
65
65
  var d, v, c, b, y, g, S, h, C, G, L, Q, A, E, f, w, x, P, F, O, B, D, R;
66
- const j = p(t.status), q = p(t.onboardingStatus), l = p(t.openedQuestion), { slStreamId: o } = p(u.sdkStore), e = p(t.featureSettings), [n, H] = J(a.HOME);
67
- if (j !== z.Ready)
68
- return /* @__PURE__ */ r("div", { children: "wait..." });
66
+ const T = p(r.status), j = p(r.onboardingStatus), l = p(r.openedQuestion), { slStreamId: o } = p(u.sdkStore), e = p(r.featureSettings), [n, q] = K(a.HOME);
67
+ if (T !== J.Ready)
68
+ return /* @__PURE__ */ t("div", { children: "wait..." });
69
69
  if (o != null && o.loading)
70
- return /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r("div", { children: "Event is loading" }) });
70
+ return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t("div", { children: "Event is loading" }) });
71
71
  if (!(o != null && o.data))
72
- return /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r("div", { children: "Event is forbidden" }) });
73
- if (!q)
74
- return /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(
72
+ return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t("div", { children: "Event is forbidden" }) });
73
+ if (!j)
74
+ return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(
75
75
  Y,
76
76
  {
77
77
  closeFeature: u.closeFeature,
78
- gamification: t,
78
+ gamification: r,
79
79
  steps: (v = (d = e.inplayGame) == null ? void 0 : d.onboarding) == null ? void 0 : v.steps,
80
80
  gameIcon: (y = (b = (c = e.inplayGame) == null ? void 0 : c.overview) == null ? void 0 : b.media) == null ? void 0 : y.gameIcon,
81
81
  sponsorLogo: (h = (S = (g = e.inplayGame) == null ? void 0 : g.overview) == null ? void 0 : S.media) == null ? void 0 : h.sponsorLogo,
@@ -88,27 +88,27 @@ const mr = ({
88
88
  inviteCardBtnLabel: (R = (D = e.inplayGame) == null ? void 0 : D.inviteCard) == null ? void 0 : R.buttonLabel
89
89
  }
90
90
  ) });
91
- const M = (i) => {
92
- t.openQuestion(i);
93
- }, T = () => {
94
- t.closeQuestion();
95
- }, U = (i, N) => {
96
- t.submitAnswer(i, N);
91
+ const H = (i) => {
92
+ r.openQuestion(i);
93
+ }, M = () => {
94
+ r.closeQuestion();
95
+ }, U = (i, k) => {
96
+ r.submitAnswer(i, k);
97
97
  };
98
98
  return /* @__PURE__ */ s(m, { children: [
99
- /* @__PURE__ */ r(K, { activePage: n, toggleActivePage: (i) => {
100
- H(i);
99
+ /* @__PURE__ */ t(N, { activePage: n, toggleActivePage: (i) => {
100
+ q(i);
101
101
  } }),
102
- n === a.HOME && /* @__PURE__ */ s(k, { children: [
103
- /* @__PURE__ */ r(_, { children: t.userSummary && /* @__PURE__ */ r(V, { store: t.userSummary.getStore() }) }),
102
+ n === a.HOME && /* @__PURE__ */ s(z, { children: [
103
+ /* @__PURE__ */ t(_, { children: r.userSummary && /* @__PURE__ */ t(V, { store: r.userSummary.getStore() }) }),
104
104
  /* @__PURE__ */ s($, { children: [
105
- t.questions && /* @__PURE__ */ r(W, { openQuestion: M, store: t.questions.getStore() }),
106
- l && /* @__PURE__ */ r(X, { closeQuestion: T, vote: U, openedQuestion: l })
105
+ r.questions && /* @__PURE__ */ t(W, { openQuestion: H, store: r.questions.getStore() }),
106
+ l && /* @__PURE__ */ t(X, { closeQuestion: M, vote: U, openedQuestion: l })
107
107
  ] })
108
108
  ] }),
109
- n === a.LEADERBOARD && t.leaderboardList && /* @__PURE__ */ r(Z, { store: t.leaderboardList.getStore() })
109
+ n === a.LEADERBOARD && r.leaderboardList && /* @__PURE__ */ t(Z, { store: r.leaderboardList.getStore() })
110
110
  ] });
111
111
  };
112
112
  export {
113
- mr as GamificationComponent
113
+ mt as GamificationComponent
114
114
  };
@@ -21,8 +21,8 @@ import "../../icon-exit-6a55bb8f.js";
21
21
  import "../notifications/notification/question-inapp/styles.js";
22
22
  import "../notifications/notification/styles.js";
23
23
  import "../notifications/styles.js";
24
- import "../gamification/navigation/index.js";
25
- import "../gamification/navigation/styles.js";
24
+ import "../gamification/tabs/index.js";
25
+ import "../gamification/tabs/styles.js";
26
26
  import "./components/UserSummary.js";
27
27
  import "../gamification/user-statistics/index.js";
28
28
  import "../../utils/common.js";
@@ -0,0 +1,26 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { Button as i, Title as a, Container as l, STabs as m } from "./styles.js";
3
+ import "@linaria/react";
4
+ var h = /* @__PURE__ */ ((r) => (r.HOME = "home", r.LEADERBOARD = "leaderboard", r))(h || {});
5
+ const t = ({ title: r, active: o, onClick: d }) => /* @__PURE__ */ e(i, { onClick: d, "data-selected": o, children: /* @__PURE__ */ e(a, { children: r }) }), p = ({ activePage: r = "home", toggleActivePage: o }) => /* @__PURE__ */ e(l, { children: /* @__PURE__ */ n(m, { "data-position": r === "home" ? "left" : "right", children: [
6
+ /* @__PURE__ */ e(t, { title: "Home", active: r === "home", onClick: () => o(
7
+ "home"
8
+ /* HOME */
9
+ ) }),
10
+ /* @__PURE__ */ e(
11
+ t,
12
+ {
13
+ title: "Leader Board",
14
+ active: r === "leaderboard",
15
+ onClick: () => o(
16
+ "leaderboard"
17
+ /* LEADERBOARD */
18
+ )
19
+ }
20
+ )
21
+ ] }) });
22
+ export {
23
+ h as ActivePages,
24
+ t as Tab,
25
+ p as Tabs
26
+ };
@@ -0,0 +1,70 @@
1
+ import { styled as o } from "@linaria/react";
2
+ const t = o.div`
3
+ padding-left: var(--container-padding);
4
+ padding-right: var(--container-padding);
5
+ `, n = o.div`
6
+ position: relative;
7
+ box-sizing: border-box;
8
+ width: 100%;
9
+ display: flex;
10
+ overflow: hidden;
11
+ border-radius: 8px;
12
+ background-color: var(--color-neutrals-gray2);
13
+ padding: 4px;
14
+
15
+ &:before {
16
+ content: '';
17
+ position: absolute;
18
+ background-color: var(--color-white);
19
+ border-radius: 6px;
20
+ height: 28px;
21
+ left: 4px;
22
+ width: calc(50% - 4px);
23
+ transition: transform var(--animation-duration) var(--animation-function);
24
+ }
25
+
26
+ &[data-position='left'] {
27
+ &:before {
28
+ transform: translateX(0);
29
+ }
30
+ }
31
+
32
+ &[data-position='right'] {
33
+ &:before {
34
+ transform: translateX(100%);
35
+ }
36
+ }
37
+ `, e = o.button`
38
+ border: none;
39
+ outline: none;
40
+ background-color: transparent;
41
+ color: var(--color-neutrals-gray7);
42
+ display: flex;
43
+ justify-content: center;
44
+ align-items: center;
45
+ font-size: 12px;
46
+ font-weight: 550;
47
+ width: 50%;
48
+ box-sizing: border-box;
49
+ padding: 4px 10px;
50
+ height: 28px;
51
+ cursor: pointer;
52
+
53
+ &:hover {
54
+ color: var(--color-primary-green1);
55
+ }
56
+
57
+ &[data-selected='true'] {
58
+ color: var(--color-primary-green1);
59
+ cursor: default;
60
+ }
61
+ `, a = o.span`
62
+ position: relative;
63
+ z-index: 2;
64
+ `;
65
+ export {
66
+ e as Button,
67
+ t as Container,
68
+ n as STabs,
69
+ a as Title
70
+ };
@@ -1,15 +1,10 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { styled as i } from "@linaria/react";
3
- const e = i.div`
2
+ import { styled as o } from "@linaria/react";
3
+ const i = o.div`
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: space-between;
7
- padding: 16px;
8
-
9
- & > button:not(:last-child) {
10
- margin-right: 8px;
11
- }
12
- `, s = ({ children: t }) => /* @__PURE__ */ n(e, { children: t });
7
+ `, a = ({ children: t, className: e }) => /* @__PURE__ */ n(i, { className: e, children: t });
13
8
  export {
14
- s as Navigation
9
+ a as Navigation
15
10
  };
@@ -0,0 +1,36 @@
1
+ import { styled as o } from "@linaria/react";
2
+ import { Navigation as i } from "./index.js";
3
+ import "react/jsx-runtime";
4
+ const r = o(i)`
5
+ position: absolute;
6
+ top: 0;
7
+ left: 0;
8
+ right: 0;
9
+
10
+ box-sizing: border-box;
11
+ overflow: hidden;
12
+ opacity: 0;
13
+
14
+ animation: show-nav 0.5s ease;
15
+ animation-fill-mode: forwards;
16
+
17
+ padding: 16px;
18
+
19
+ & > button:not(:last-child) {
20
+ margin-right: 8px;
21
+ }
22
+
23
+ @keyframes show-nav {
24
+ 90% {
25
+ opacity: 0;
26
+ }
27
+
28
+ 100% {
29
+ height: 68px;
30
+ opacity: 1;
31
+ }
32
+ }
33
+ `;
34
+ export {
35
+ r as Navigation
36
+ };
@@ -0,0 +1,10 @@
1
+ import { css as a } from "@linaria/core";
2
+ const n = a`
3
+ --header-height: 68px;
4
+ --animation-duration: 0.5s;
5
+ --animation-function: ease;
6
+ --container-padding: 16px;
7
+ `;
8
+ export {
9
+ n as mastersVariables
10
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -1,35 +0,0 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { Navigation as u } from "../../navigation/index.js";
3
- import { ChannelsButton as a, ChannelsButtonId as n } from "../../navigation/button/Channels.js";
4
- import { FeaturedGroupsButton as d, FeaturedGroupsButtonId as i } from "../../navigation/button/FeaturedGroups.js";
5
- import { LeaderBoardButton as s, LeaderBoardButtonId as m } from "../../navigation/button/LeaderBoard.js";
6
- import "@linaria/react";
7
- import "../../icons/index.js";
8
- import "react";
9
- import "../../navigation/button/index.js";
10
- import "../../navigation/button/styles.js";
11
- const j = ({ activeOverlay: o, setActiveOverlay: t }) => /* @__PURE__ */ p(u, { children: [
12
- /* @__PURE__ */ r(a, { active: o === n, onClick: () => t(n) }),
13
- /* @__PURE__ */ r(
14
- d,
15
- {
16
- active: o === i,
17
- onClick: () => {
18
- t(i);
19
- }
20
- }
21
- ),
22
- /* @__PURE__ */ r(
23
- s,
24
- {
25
- active: o === m,
26
- onClick: () => t(m)
27
- }
28
- )
29
- ] });
30
- export {
31
- n as ChannelsButtonId,
32
- i as FeaturedGroupsButtonId,
33
- m as LeaderBoardButtonId,
34
- j as MastersNavigation
35
- };
@@ -1,34 +0,0 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import { Container as n, PageTitle as l } from "./styles.js";
3
- import "@linaria/react";
4
- var m = /* @__PURE__ */ ((r) => (r.HOME = "home", r.LEADERBOARD = "leaderboard", r))(m || {});
5
- const p = ({ activePage: r = "home", toggleActivePage: o }) => /* @__PURE__ */ d(n, { children: [
6
- /* @__PURE__ */ e(
7
- l,
8
- {
9
- style: { borderBottom: r === "home" ? "2px solid var(--color-blue-primary)" : "none" },
10
- onClick: () => o(
11
- "home"
12
- /* HOME */
13
- ),
14
- children: "Home"
15
- }
16
- ),
17
- /* @__PURE__ */ e(
18
- l,
19
- {
20
- style: {
21
- borderBottom: r === "leaderboard" ? "2px solid var(--color-blue-primary)" : "none"
22
- },
23
- onClick: () => o(
24
- "leaderboard"
25
- /* LEADERBOARD */
26
- ),
27
- children: "Leader Board"
28
- }
29
- )
30
- ] });
31
- export {
32
- m as ActivePages,
33
- p as Navigation
34
- };
@@ -1,26 +0,0 @@
1
- import { styled as e } from "@linaria/react";
2
- const o = e.div`
3
- box-sizing: border-box;
4
- width: 100%;
5
- display: flex;
6
- justify-content: space-between;
7
- color: var(--color-white);
8
- font-size: 14px;
9
- font-weight: 400;
10
- overflow: hidden;
11
- margin-bottom: 12px;
12
- cursor: pointer;
13
- `, i = e.div`
14
- display: flex;
15
- align-items: center;
16
- justify-content: center;
17
- overflow: hidden;
18
- white-space: nowrap;
19
- text-overflow: ellipsis;
20
- width: 49%;
21
- padding: 4px;
22
- `;
23
- export {
24
- o as Container,
25
- i as PageTitle
26
- };