@streamlayer/react-ui 0.5.8 → 0.23.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 (208) hide show
  1. package/README.md +1 -1
  2. package/lib/icon-chevron-138a557c.js +4 -0
  3. package/lib/icon-exit-d3f9fc80.js +4 -0
  4. package/lib/index-d5620d2c.js +71 -0
  5. package/lib/index.js +91 -0
  6. package/lib/lib/demo/Gamification.js +95 -0
  7. package/lib/lib/demo/Highlights.js +59 -0
  8. package/lib/lib/demo/Login.js +25 -0
  9. package/lib/lib/demo/components/EventProvider.js +5 -0
  10. package/lib/lib/demo/components/Insight.js +31 -0
  11. package/lib/lib/demo/components/Insights.js +16 -0
  12. package/lib/lib/demo/components/Question.js +101 -0
  13. package/lib/lib/demo/components/QuestionsList.js +16 -0
  14. package/lib/lib/demo/components/UserSummary.js +32 -0
  15. package/lib/lib/demo/components/index.js +59 -0
  16. package/lib/lib/demo/index.js +126 -0
  17. package/lib/lib/demo/styles.js +58 -0
  18. package/lib/lib/gamification/common-header/index.js +14 -0
  19. package/lib/lib/gamification/common-header/styles.js +31 -0
  20. package/lib/lib/gamification/detailed-insight/index.js +29 -0
  21. package/lib/lib/gamification/detailed-insight/styles.js +62 -0
  22. package/lib/lib/gamification/insight/index.js +26 -0
  23. package/lib/lib/gamification/insight/styles.js +65 -0
  24. package/lib/lib/gamification/insight-list/index.js +11 -0
  25. package/lib/lib/gamification/insight-list/styles.js +20 -0
  26. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/index.js +10 -0
  27. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-instructions/styles.js +30 -0
  28. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/index.js +17 -0
  29. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-invite-card/styles.js +55 -0
  30. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/index.js +13 -0
  31. package/lib/lib/gamification/onboarding/components/onboarding-slides/onboarding-rules/styles.js +43 -0
  32. package/lib/lib/gamification/onboarding/index.js +66 -0
  33. package/lib/lib/gamification/onboarding/styles.js +69 -0
  34. package/lib/lib/gamification/question/index.js +39 -0
  35. package/{src → lib}/lib/gamification/question/styles.js +30 -28
  36. package/lib/lib/gamification/question-list/index.js +14 -0
  37. package/{src → lib}/lib/gamification/question-list/styles.js +11 -9
  38. package/lib/lib/gamification/user-statistics/components/rank/index.js +10 -0
  39. package/{src → lib}/lib/gamification/user-statistics/components/rank/styles.js +9 -7
  40. package/lib/lib/gamification/user-statistics/components/statistics/index.js +10 -0
  41. package/{src → lib}/lib/gamification/user-statistics/components/statistics/styles.js +7 -5
  42. package/lib/lib/gamification/user-statistics/index.js +57 -0
  43. package/{src → lib}/lib/gamification/user-statistics/styles.js +52 -37
  44. package/lib/lib/gamification/vote/components/voting-header/components/points/index.js +13 -0
  45. package/{src → lib}/lib/gamification/vote/components/voting-header/components/points/styles.js +13 -11
  46. package/lib/lib/gamification/vote/components/voting-header/components/timer/index.js +28 -0
  47. package/lib/lib/gamification/vote/components/voting-header/components/timer/styles.js +8 -0
  48. package/lib/lib/gamification/vote/components/voting-header/index.js +44 -0
  49. package/{src → lib}/lib/gamification/vote/components/voting-header/styles.js +22 -19
  50. package/lib/lib/gamification/vote/components/voting-option/index.js +8 -0
  51. package/lib/lib/gamification/vote/components/voting-option/styles.js +96 -0
  52. package/lib/lib/gamification/vote/index.js +51 -0
  53. package/{src → lib}/lib/gamification/vote/styles.js +21 -19
  54. package/lib/lib/gamification/vote/types.d.js +1 -0
  55. package/lib/lib/login/index.js +70 -0
  56. package/{src/lib/gamification → lib/lib}/login/styles.js +24 -20
  57. package/lib/lib/notifications/decorator.js +64 -0
  58. package/lib/lib/notifications/index.js +28 -0
  59. package/lib/lib/notifications/notification/index.js +36 -0
  60. package/lib/lib/notifications/notification/onboarding-inapp/index.js +25 -0
  61. package/lib/lib/notifications/notification/onboarding-inapp/styles.js +77 -0
  62. package/lib/lib/notifications/notification/question-inapp/index.js +23 -0
  63. package/lib/lib/notifications/notification/question-inapp/styles.js +61 -0
  64. package/lib/lib/notifications/notification/styles.js +32 -0
  65. package/lib/lib/notifications/styles.js +15 -0
  66. package/lib/lib/theme/constants.js +38 -0
  67. package/lib/lib/theme/index.js +8 -0
  68. package/lib/lib/theme/theme.js +27 -0
  69. package/lib/lib/user-account/index.js +27 -0
  70. package/lib/lib/user-account/styles.js +80 -0
  71. package/lib/utils/common.js +4 -0
  72. package/lib/utils/components/bypassLogin.js +63 -0
  73. package/lib/utils/components/developer.js +76 -0
  74. package/lib/utils/components/eventInput.js +56 -0
  75. package/lib/utils/createDemo.js +46 -0
  76. package/lib/utils/decorators/container.js +11 -0
  77. package/lib/utils/decorators/styles.js +27 -0
  78. package/lib/utils/login.js +25 -0
  79. package/lib/utils/storage.js +36 -0
  80. package/lib/utils/useStreamLayerApp.js +25 -0
  81. package/package.json +49 -23
  82. package/src/assets/demo-bg.webp +0 -0
  83. package/src/assets/icons/fedex.svg +0 -7
  84. package/src/assets/icons/icon-check-green.svg +0 -5
  85. package/src/assets/icons/icon-check-white.svg +0 -5
  86. package/src/assets/icons/icon-check.svg +0 -5
  87. package/src/assets/icons/icon-chevron.svg +0 -5
  88. package/src/assets/icons/icon-circle-arrow-right.svg +0 -4
  89. package/src/assets/icons/icon-close.svg +0 -5
  90. package/src/assets/icons/icon-cross.svg +0 -6
  91. package/src/assets/icons/icon-exit.svg +0 -5
  92. package/src/assets/icons/icon-poll.svg +0 -5
  93. package/src/assets/icons/icon-prediction.svg +0 -5
  94. package/src/assets/icons/icon-thumb-down.svg +0 -3
  95. package/src/assets/icons/icon-trivia.svg +0 -5
  96. package/src/assets/icons/icon-trophy-green.svg +0 -5
  97. package/src/assets/icons/icon-trophy.svg +0 -5
  98. package/src/index.d.ts +0 -10
  99. package/src/index.js +0 -11
  100. package/src/index.js.map +0 -1
  101. package/src/lib/demo/Gamification.d.ts +0 -7
  102. package/src/lib/demo/Gamification.js +0 -30
  103. package/src/lib/demo/Gamification.js.map +0 -1
  104. package/src/lib/demo/Login.d.ts +0 -5
  105. package/src/lib/demo/Login.js +0 -15
  106. package/src/lib/demo/Login.js.map +0 -1
  107. package/src/lib/demo/components/InPlayGame.d.ts +0 -6
  108. package/src/lib/demo/components/InPlayGame.js +0 -6
  109. package/src/lib/demo/components/InPlayGame.js.map +0 -1
  110. package/src/lib/demo/components/Notifications.d.ts +0 -6
  111. package/src/lib/demo/components/Notifications.js +0 -37
  112. package/src/lib/demo/components/Notifications.js.map +0 -1
  113. package/src/lib/demo/components/Question.d.ts +0 -7
  114. package/src/lib/demo/components/Question.js +0 -61
  115. package/src/lib/demo/components/Question.js.map +0 -1
  116. package/src/lib/demo/components/QuestionsList.d.ts +0 -6
  117. package/src/lib/demo/components/QuestionsList.js +0 -13
  118. package/src/lib/demo/components/QuestionsList.js.map +0 -1
  119. package/src/lib/demo/components/UserSummary.d.ts +0 -5
  120. package/src/lib/demo/components/UserSummary.js +0 -11
  121. package/src/lib/demo/components/UserSummary.js.map +0 -1
  122. package/src/lib/demo/components/index.d.ts +0 -5
  123. package/src/lib/demo/components/index.js +0 -6
  124. package/src/lib/demo/components/index.js.map +0 -1
  125. package/src/lib/demo/index.d.ts +0 -5
  126. package/src/lib/demo/index.js +0 -26
  127. package/src/lib/demo/index.js.map +0 -1
  128. package/src/lib/demo/styles.d.ts +0 -13
  129. package/src/lib/demo/styles.js +0 -14
  130. package/src/lib/demo/styles.js.map +0 -1
  131. package/src/lib/gamification/inapp/index.d.ts +0 -13
  132. package/src/lib/gamification/inapp/index.js +0 -12
  133. package/src/lib/gamification/inapp/index.js.map +0 -1
  134. package/src/lib/gamification/inapp/styles.d.ts +0 -37
  135. package/src/lib/gamification/inapp/styles.js +0 -74
  136. package/src/lib/gamification/inapp/styles.js.map +0 -1
  137. package/src/lib/gamification/login/index.d.ts +0 -7
  138. package/src/lib/gamification/login/index.js +0 -54
  139. package/src/lib/gamification/login/index.js.map +0 -1
  140. package/src/lib/gamification/login/styles.d.ts +0 -29
  141. package/src/lib/gamification/login/styles.js.map +0 -1
  142. package/src/lib/gamification/onboarding/index.d.ts +0 -6
  143. package/src/lib/gamification/onboarding/index.js +0 -4
  144. package/src/lib/gamification/onboarding/index.js.map +0 -1
  145. package/src/lib/gamification/onboarding/styles.d.ts +0 -21
  146. package/src/lib/gamification/onboarding/styles.js +0 -41
  147. package/src/lib/gamification/onboarding/styles.js.map +0 -1
  148. package/src/lib/gamification/question/index.d.ts +0 -5
  149. package/src/lib/gamification/question/index.js +0 -28
  150. package/src/lib/gamification/question/index.js.map +0 -1
  151. package/src/lib/gamification/question/styles.d.ts +0 -45
  152. package/src/lib/gamification/question/styles.js.map +0 -1
  153. package/src/lib/gamification/question-list/index.d.ts +0 -8
  154. package/src/lib/gamification/question-list/index.js +0 -7
  155. package/src/lib/gamification/question-list/index.js.map +0 -1
  156. package/src/lib/gamification/question-list/styles.d.ts +0 -13
  157. package/src/lib/gamification/question-list/styles.js.map +0 -1
  158. package/src/lib/gamification/user-statistics/components/rank/index.d.ts +0 -7
  159. package/src/lib/gamification/user-statistics/components/rank/index.js +0 -4
  160. package/src/lib/gamification/user-statistics/components/rank/index.js.map +0 -1
  161. package/src/lib/gamification/user-statistics/components/rank/styles.d.ts +0 -13
  162. package/src/lib/gamification/user-statistics/components/rank/styles.js.map +0 -1
  163. package/src/lib/gamification/user-statistics/components/statistics/index.d.ts +0 -7
  164. package/src/lib/gamification/user-statistics/components/statistics/index.js +0 -4
  165. package/src/lib/gamification/user-statistics/components/statistics/index.js.map +0 -1
  166. package/src/lib/gamification/user-statistics/components/statistics/styles.d.ts +0 -9
  167. package/src/lib/gamification/user-statistics/components/statistics/styles.js.map +0 -1
  168. package/src/lib/gamification/user-statistics/index.d.ts +0 -15
  169. package/src/lib/gamification/user-statistics/index.js +0 -14
  170. package/src/lib/gamification/user-statistics/index.js.map +0 -1
  171. package/src/lib/gamification/user-statistics/styles.d.ts +0 -57
  172. package/src/lib/gamification/user-statistics/styles.js.map +0 -1
  173. package/src/lib/gamification/vote/components/voting-header/components/points/index.d.ts +0 -6
  174. package/src/lib/gamification/vote/components/voting-header/components/points/index.js +0 -4
  175. package/src/lib/gamification/vote/components/voting-header/components/points/index.js.map +0 -1
  176. package/src/lib/gamification/vote/components/voting-header/components/points/styles.d.ts +0 -21
  177. package/src/lib/gamification/vote/components/voting-header/components/points/styles.js.map +0 -1
  178. package/src/lib/gamification/vote/components/voting-header/components/timer/index.d.ts +0 -8
  179. package/src/lib/gamification/vote/components/voting-header/components/timer/index.js +0 -19
  180. package/src/lib/gamification/vote/components/voting-header/components/timer/index.js.map +0 -1
  181. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.d.ts +0 -7
  182. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js +0 -6
  183. package/src/lib/gamification/vote/components/voting-header/components/timer/styles.js.map +0 -1
  184. package/src/lib/gamification/vote/components/voting-header/index.d.ts +0 -12
  185. package/src/lib/gamification/vote/components/voting-header/index.js +0 -17
  186. package/src/lib/gamification/vote/components/voting-header/index.js.map +0 -1
  187. package/src/lib/gamification/vote/components/voting-header/styles.d.ts +0 -35
  188. package/src/lib/gamification/vote/components/voting-header/styles.js.map +0 -1
  189. package/src/lib/gamification/vote/components/voting-option/index.d.ts +0 -17
  190. package/src/lib/gamification/vote/components/voting-option/index.js +0 -14
  191. package/src/lib/gamification/vote/components/voting-option/index.js.map +0 -1
  192. package/src/lib/gamification/vote/components/voting-option/styles.d.ts +0 -49
  193. package/src/lib/gamification/vote/components/voting-option/styles.js +0 -85
  194. package/src/lib/gamification/vote/components/voting-option/styles.js.map +0 -1
  195. package/src/lib/gamification/vote/index.d.ts +0 -13
  196. package/src/lib/gamification/vote/index.js +0 -22
  197. package/src/lib/gamification/vote/index.js.map +0 -1
  198. package/src/lib/gamification/vote/styles.d.ts +0 -33
  199. package/src/lib/gamification/vote/styles.js.map +0 -1
  200. package/src/lib/theme/index.d.ts +0 -4
  201. package/src/lib/theme/index.js +0 -5
  202. package/src/lib/theme/index.js.map +0 -1
  203. package/src/lib/theme/theme.d.ts +0 -41
  204. package/src/lib/theme/theme.js +0 -35
  205. package/src/lib/theme/theme.js.map +0 -1
  206. package/src/utils/login.d.ts +0 -3
  207. package/src/utils/login.js +0 -28
  208. package/src/utils/login.js.map +0 -1
@@ -0,0 +1,28 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useStore as p } from "@nanostores/react";
3
+ import { NotificationComponent as n } from "./notification/index.js";
4
+ import { NotificationsContainer as e } from "./styles.js";
5
+ import "@streamlayer/sdk-web-notifications";
6
+ import "react";
7
+ import "./notification/onboarding-inapp/index.js";
8
+ import "./notification/onboarding-inapp/styles.js";
9
+ import "@linaria/react";
10
+ import "./notification/question-inapp/index.js";
11
+ import "../../icon-exit-d3f9fc80.js";
12
+ import "./notification/question-inapp/styles.js";
13
+ import "./notification/styles.js";
14
+ const S = ({ notificationsStore: i }) => {
15
+ const o = p(i);
16
+ return /* @__PURE__ */ r(e, { children: o == null ? void 0 : o.map((t, m) => /* @__PURE__ */ r(
17
+ n,
18
+ {
19
+ index: m,
20
+ total: o.length,
21
+ ...t
22
+ },
23
+ t.id
24
+ )) });
25
+ };
26
+ export {
27
+ S as Notifications
28
+ };
@@ -0,0 +1,36 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { NotificationType as i } from "@streamlayer/sdk-web-notifications";
3
+ import { useRef as f, useEffect as s } from "react";
4
+ import { OnBoardingInApp as N } from "./onboarding-inapp/index.js";
5
+ import { QuestionInApp as e } from "./question-inapp/index.js";
6
+ import { NotificationContainer as a } from "./styles.js";
7
+ import "./onboarding-inapp/styles.js";
8
+ import "@linaria/react";
9
+ import "../../../icon-exit-d3f9fc80.js";
10
+ import "./question-inapp/styles.js";
11
+ const l = {
12
+ [i.ONBOARDING]: N,
13
+ [i.QUESTION]: e
14
+ }, y = ({
15
+ index: t,
16
+ total: m,
17
+ ...r
18
+ }) => {
19
+ const o = f(null), p = l[r.type] || e;
20
+ return s(() => {
21
+ o.current !== null && r.hiding && o.current.animate([{ right: "0" }, { right: "-100%" }], {
22
+ duration: 300,
23
+ fill: "forwards"
24
+ });
25
+ }, [r.hiding]), /* @__PURE__ */ n(
26
+ a,
27
+ {
28
+ ref: o,
29
+ style: { zIndex: t + 1, transform: `translateY(${100 * (m - t - 1)}%)` },
30
+ children: /* @__PURE__ */ n(p, { ...r })
31
+ }
32
+ );
33
+ };
34
+ export {
35
+ y as NotificationComponent
36
+ };
@@ -0,0 +1,25 @@
1
+ import { jsxs as n, jsx as i, Fragment as t } from "react/jsx-runtime";
2
+ import { Container as g, CloseBtn as s, IconClose as C, BackgroundBlock as M, Icon as p, ContentWrap as m, SponsorLogo as Z, SponsorText as b, ContentTitle as D, ContentSubtitle as S, ActionBtn as h } from "./styles.js";
3
+ import "@linaria/react";
4
+ const W = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iMTAiIHZpZXdCb3g9IjAgMCAxMCAxMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIDQ2NSI+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY4IiB4PSIxLjI1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKDQ1IDEuMjUgMCkiIGZpbGw9IndoaXRlIi8+CjxyZWN0IGlkPSJSZWN0YW5nbGUgMzY5IiB5PSI4Ljc1IiB3aWR0aD0iMTIuMzc0NCIgaGVpZ2h0PSIxLjc2Nzc3IiByeD0iMC44ODM4ODQiIHRyYW5zZm9ybT0icm90YXRlKC00NSAwIDguNzUpIiBmaWxsPSJ3aGl0ZSIvPgo8L2c+Cjwvc3ZnPgo=", P = ({
5
+ close: I,
6
+ action: l,
7
+ data: { icon: c, header: a, title: e, subtitle: r, graphicBg: d, sponsorLogo: o }
8
+ }) => /* @__PURE__ */ n(g, { children: [
9
+ /* @__PURE__ */ i(s, { onClick: I, children: /* @__PURE__ */ i(C, { alt: "icon-close-onboarding-inapp", src: W }) }),
10
+ /* @__PURE__ */ i(M, { style: { backgroundImage: `url(${d || ""})` }, children: c && /* @__PURE__ */ i(p, { alt: "onboarding-inapp-icon", src: c }) }),
11
+ /* @__PURE__ */ n(m, { children: [
12
+ /* @__PURE__ */ n("div", { children: [
13
+ /* @__PURE__ */ i("div", { children: o ? /* @__PURE__ */ n(t, { children: [
14
+ /* @__PURE__ */ i(Z, { alt: "sponsor-logo", src: o }),
15
+ /* @__PURE__ */ i(b, { children: "Presents" })
16
+ ] }) : a || "" }),
17
+ /* @__PURE__ */ i(D, { children: e || "" }),
18
+ /* @__PURE__ */ i(S, { children: r || "" })
19
+ ] }),
20
+ /* @__PURE__ */ i(h, { onClick: l, children: "Play" })
21
+ ] })
22
+ ] });
23
+ export {
24
+ P as OnBoardingInApp
25
+ };
@@ -0,0 +1,77 @@
1
+ import { styled as o } from "@linaria/react";
2
+ const n = o.div`
3
+ background-color: var(--color-transparent-onboarding-inapp);
4
+ max-height: 120px;
5
+ `, r = o.div`
6
+ background-repeat: no-repeat;
7
+ background-size: contain;
8
+ border-top-left-radius: 8px;
9
+ border-bottom-left-radius: 8px;
10
+ width: 72px;
11
+ display: flex;
12
+ align-items: center;
13
+ `, e = o.img`
14
+ width: 56px;
15
+ margin-left: 8px;
16
+ `, i = o.div`
17
+ padding: 16px 8px 16px 0px;
18
+ margin-right: 8px;
19
+ font-size: 12px;
20
+ font-weight: 600;
21
+ display: flex;
22
+ flex: 1;
23
+ justify-content: space-between;
24
+ align-items: center;
25
+ `, p = o.img`
26
+ width: 16px;
27
+ height: 16px;
28
+ margin-right: 4px;
29
+ `, a = o.span`
30
+ font-style: italic;
31
+ font-weight: 600;
32
+ font-size: 8px;
33
+ text-transform: uppercase;
34
+ `, s = o.div`
35
+ margin-top: 8px;
36
+ margin-bottom: 2px;
37
+ font-size: 14px;
38
+ `, c = o.div`
39
+ color: var(--color-grey-primary-onboarding-inapp);
40
+ `, d = o.button`
41
+ border: none;
42
+ outline: none;
43
+ background-color: var(--color-green-primary-btn);
44
+ padding: 8px 16px;
45
+ color: #fff;
46
+ font-size: 12px;
47
+ font-weight: 600;
48
+ cursor: pointer;
49
+ border-radius: 24px;
50
+ `, x = o.button`
51
+ position: absolute;
52
+ right: 8px;
53
+ top: 4px;
54
+ border: none;
55
+ outline: none;
56
+ background-color: transparent;
57
+ padding: 5px;
58
+ color: #fff;
59
+ cursor: pointer;
60
+ border-radius: 50%;
61
+ `, g = o.img`
62
+ width: 10px;
63
+ height: 10px;
64
+ `;
65
+ export {
66
+ d as ActionBtn,
67
+ r as BackgroundBlock,
68
+ x as CloseBtn,
69
+ n as Container,
70
+ c as ContentSubtitle,
71
+ s as ContentTitle,
72
+ i as ContentWrap,
73
+ e as Icon,
74
+ g as IconClose,
75
+ p as SponsorLogo,
76
+ a as SponsorText
77
+ };
@@ -0,0 +1,23 @@
1
+ import { jsxs as t, jsx as n } from "react/jsx-runtime";
2
+ import { useCallback as a } from "react";
3
+ import { c as s } from "../../../../icon-exit-d3f9fc80.js";
4
+ import { Container as d, IconWrap as m, Icon as C, Content as h, TitleWrap as I, Title as f, CloseBtnWrap as k, CloseBtn as u, CloseIcon as x } from "./styles.js";
5
+ import "@linaria/react";
6
+ const B = ({ close: o, action: p, data: { color: r, icon: i, title: c } }) => {
7
+ const e = a(
8
+ (l) => {
9
+ l.stopPropagation(), o == null || o();
10
+ },
11
+ [o]
12
+ );
13
+ return /* @__PURE__ */ t(d, { onClick: p, children: [
14
+ /* @__PURE__ */ n(m, { style: r ? { backgroundColor: r } : {}, children: i && /* @__PURE__ */ n(C, { alt: "in-app-icon", src: i }) }),
15
+ /* @__PURE__ */ t(h, { children: [
16
+ /* @__PURE__ */ n(I, { children: /* @__PURE__ */ n(f, { id: "in-app-title", children: c || "" }) }),
17
+ /* @__PURE__ */ n(k, { children: /* @__PURE__ */ n(u, { onClick: e, children: /* @__PURE__ */ n(x, { alt: "close-in-app-icon", src: s }) }) })
18
+ ] })
19
+ ] });
20
+ };
21
+ export {
22
+ B as QuestionInApp
23
+ };
@@ -0,0 +1,61 @@
1
+ import { styled as e } from "@linaria/react";
2
+ const o = e.div`
3
+ border: 1px solid var(--color-blue-primary);
4
+ background-color: var(--color-bg-transparent);
5
+ cursor: pointer;
6
+ overflow: hidden;
7
+ `, n = e.div`
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+ padding: 14px;
12
+ background-color: var(--color-blue-primary);
13
+ `, i = e.img`
14
+ max-width: 40px;
15
+ max-height: 40px;
16
+ width: 100%;
17
+ height: 100%;
18
+ border-radius: 50%;
19
+ `, r = e.div`
20
+ display: flex;
21
+ justify-content: space-between;
22
+ width: 100%;
23
+ align-items: center;
24
+ `, d = e.div`
25
+ padding-left: 20px;
26
+ padding-right: 5px;
27
+ font-weight: 700;
28
+ font-size: 14px;
29
+ flex: 1;
30
+ `, l = e.div`
31
+ display: -webkit-box;
32
+ -webkit-box-orient: vertical;
33
+ -webkit-line-clamp: 2;
34
+ overflow: hidden;
35
+ word-break: break-word;
36
+ text-overflow: ellipsis;
37
+ `, a = e.div`
38
+ padding: 20px;
39
+ `, c = e.button`
40
+ border: none;
41
+ outline: none;
42
+ background-color: transparent;
43
+ cursor: pointer;
44
+ display: flex;
45
+ justify-content: center;
46
+ align-items: center;
47
+ `, s = e.img`
48
+ width: 24px;
49
+ height: 24px;
50
+ `;
51
+ export {
52
+ c as CloseBtn,
53
+ a as CloseBtnWrap,
54
+ s as CloseIcon,
55
+ o as Container,
56
+ r as Content,
57
+ i as Icon,
58
+ n as IconWrap,
59
+ l as Title,
60
+ d as TitleWrap
61
+ };
@@ -0,0 +1,32 @@
1
+ import { styled as i } from "@linaria/react";
2
+ const r = i.div`
3
+ position: absolute;
4
+ right: 0;
5
+ transition: transform 0.3s ease;
6
+ width: 100%;
7
+
8
+ > div {
9
+ border-radius: 8px;
10
+ width: 100%;
11
+ backdrop-filter: blur(10px);
12
+ display: flex;
13
+ color: var(--color-white);
14
+ animation: slide-in 0.3s ease-in;
15
+ position: relative;
16
+ box-sizing: border-box;
17
+ user-select: none;
18
+ }
19
+
20
+ @keyframes slide-in {
21
+ from {
22
+ right: -100%;
23
+ }
24
+
25
+ to {
26
+ right: 0;
27
+ }
28
+ }
29
+ `;
30
+ export {
31
+ r as NotificationContainer
32
+ };
@@ -0,0 +1,15 @@
1
+ import { styled as t } from "@linaria/react";
2
+ const o = t.div`
3
+ position: absolute;
4
+ right: 10px;
5
+ top: 10px;
6
+ max-width: 600px;
7
+ width: 100%;
8
+
9
+ > div {
10
+ margin-bottom: 10px;
11
+ }
12
+ `;
13
+ export {
14
+ o as NotificationsContainer
15
+ };
@@ -0,0 +1,38 @@
1
+ const R = {
2
+ BG_TRANSPARENT: "rgba(0,0,0, .8)",
3
+ BG_TRANSPARENT_VOTE_CONTAINER: "rgba(10, 14, 19, 0.8)",
4
+ BG_TRANSPARENT_ITEM: "rgba(0, 0, 0, 0.7)",
5
+ BG_TRANSPARENT_ITEM_VOTE: "rgba(255, 255, 255, 0.1)",
6
+ BG_TRANSPARENT_ITEM_SUCCESS: "rgba(0, 139, 251, 0.2)",
7
+ BG_TRANSPARENT_ITEM_ERROR: "rgba(205, 37, 37, 0.2)",
8
+ BG_TRANSPARENT_VOTE_PROGRESS: "rgba(255, 255, 255, 0.2)",
9
+ BG_TRANSPARENT_VOTE_PROGRESS_SUCCESS: "rgba(60, 139, 251, 0.5)",
10
+ BG_TRANSPARENT_VOTE_PROGRESS_ERROR: "rgba(205, 37, 37, 0.5)",
11
+ BG_TRANSPARENT_USER_CONTAINER: "rgba(255, 255, 255, 0.05)",
12
+ BG_TRANSPARENT_ONBOARDING_INAPP: "rgba(138, 159, 182, 0.2)",
13
+ BLUE_PRIMARY: "#1589EE",
14
+ RED_PRIMARY: "#CD2525",
15
+ RED_SECONDARY: "#EB5757",
16
+ BLUE_QUESTION_ACTION_BTN: "#1589ee",
17
+ WHITE: "#FFFFFF",
18
+ GREY_1: "#909395",
19
+ GREY_2: "#22262b",
20
+ GREY_3: "#2d3135",
21
+ GREY_4: "#53565a",
22
+ GREY_PRIMARY_ONBOARDING_INAPP: "#B5B7B8",
23
+ BLACK_1: "#161a1f",
24
+ GREEN_1: "#F7B801",
25
+ RED_1: "#A30000",
26
+ RED_2: "#FF4170",
27
+ GREY_PRIMARY: "#909395",
28
+ DIVIDER_COLOR_PRIMARY: "#2d3135",
29
+ DIVIDER_COLOR_SECONDARY: "#53565a",
30
+ GREEN_PRIMARY_BTN: "#009B77"
31
+ }, _ = {
32
+ FAMILY: "Roboto, sans-serif",
33
+ COLOR: "#fff"
34
+ };
35
+ export {
36
+ R as COLORS,
37
+ _ as FONT
38
+ };
@@ -0,0 +1,8 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { theme as e } from "./theme.js";
3
+ import "@linaria/core";
4
+ import "./constants.js";
5
+ const a = ({ children: r }) => /* @__PURE__ */ m("div", { className: e, children: r });
6
+ export {
7
+ a as StreamLayerThemeProvider
8
+ };
@@ -0,0 +1,27 @@
1
+ import { css as R } from "@linaria/core";
2
+ import { COLORS as r, FONT as o } from "./constants.js";
3
+ const _ = R`
4
+ --color-bg-transparent: ${r.BG_TRANSPARENT};
5
+ --color-transparent-vote-container: ${r.BG_TRANSPARENT_VOTE_CONTAINER};
6
+ --color-transparent-item: ${r.BG_TRANSPARENT_ITEM};
7
+ --color-transparent-item-success: ${r.BG_TRANSPARENT_ITEM_SUCCESS};
8
+ --color-transparent-item-error: ${r.BG_TRANSPARENT_ITEM_ERROR};
9
+ --color-bg-transparent-item-vote: ${r.BG_TRANSPARENT_ITEM_VOTE};
10
+ --color-transparent-user-container: ${r.BG_TRANSPARENT_USER_CONTAINER};
11
+ --color-transparent-onboarding-inapp: ${r.BG_TRANSPARENT_ONBOARDING_INAPP};
12
+ --color-blue-primary: ${r.BLUE_PRIMARY};
13
+ --color-red-primary: ${r.RED_PRIMARY};
14
+ --color-red-secondary: ${r.RED_SECONDARY};
15
+ --color-blue-question-action-btn: ${r.BLUE_QUESTION_ACTION_BTN};
16
+ --color-white: ${r.WHITE};
17
+ --color-red-2: ${r.RED_2};
18
+ --color-grey-primary: ${r.GREY_PRIMARY};
19
+ --color-divider-color-primary: ${r.DIVIDER_COLOR_PRIMARY};
20
+ --color-divider-color-secondary: ${r.DIVIDER_COLOR_SECONDARY};
21
+ --color-green-primary-btn: ${r.GREEN_PRIMARY_BTN};
22
+ --font-family: ${o.FAMILY};
23
+ --font-color: ${o.COLOR};
24
+ `;
25
+ export {
26
+ _ as theme
27
+ };
@@ -0,0 +1,27 @@
1
+ import { jsxs as D, jsx as I } from "react/jsx-runtime";
2
+ import { useStore as x } from "@nanostores/react";
3
+ import { abbreviate as o } from "../../utils/common.js";
4
+ import { Container as u, BackBtn as y, ContentWrap as l, UserContainer as n, UserAvatar as t, AvatarPlaceholder as L, UserName as r, LogoutBtn as m, LogoutIcon as z } from "./styles.js";
5
+ import "@linaria/react";
6
+ const S = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTciIGhlaWdodD0iMTgiIHZpZXdCb3g9IjAgMCAxNyAxOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9Ikdyb3VwIj4KPHBhdGggaWQ9IlZlY3RvciIgZD0iTTEyLjUzOTYgMTIuNDMxTDE1Ljg2MDMgOS4wMDE2OUwxMi41Mzk2IDUuNTcyMzkiIHN0cm9rZT0iI0VCNTc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8cGF0aCBpZD0iVmVjdG9yXzIiIGQ9Ik0xNS44NjAyIDkuMDAxNTlINS41NzIyNyIgc3Ryb2tlPSIjRUI1NzU3IiBzdHJva2Utd2lkdGg9IjEuNSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGlkPSJWZWN0b3JfMyIgZD0iTTEyLjQzMSAxTDMuMjg2MiAxLjAwMjI5QzIuMDI0MjIgMS4wMDM0MyAxIDIuMDI2NTEgMSAzLjI4ODQ5VjE0LjcxMzhDMSAxNS4zMjAxIDEuMjQwODcgMTUuOTAxNiAxLjY2OTYxIDE2LjMzMDRDMi4wOTgzNiAxNi43NTkxIDIuNjc5ODcgMTcgMy4yODYyIDE3SDEyLjUzOTYiIHN0cm9rZT0iI0VCNTc1NyIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L2c+Cjwvc3ZnPgo=", d = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAxMiAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggaWQ9Ikljb24gLyBjaGV2cm9uLmxlZnQiIGQ9Ik0wIDEwQzAgMTAuMzgxOCAwLjE0NTk5NiAxMC43MDc1IDAuNDQ5MjE5IDEwLjk5OTVMOS4yMDg5OCAxOS41Njg0QzkuNDQ0ODIgMTkuODE1NCA5Ljc1OTI4IDE5LjkzOSAxMC4xMTg3IDE5LjkzOUMxMC44NDg2IDE5LjkzOSAxMS40MjE0IDE5LjM3NzQgMTEuNDIxNCAxOC42MzYyQzExLjQyMTQgMTguMjc2OSAxMS4yNzU0IDE3Ljk1MTIgMTEuMDI4MyAxNy43MDQxTDMuMTMzMyAxMEwxMS4wMjgzIDIuMjk1OUMxMS4yNzU0IDIuMDM3NiAxMS40MjE0IDEuNzExOTEgMTEuNDIxNCAxLjM1MjU0QzExLjQyMTQgMC42MjI1NTkgMTAuODQ4NiAwLjA2MTAzNTIgMTAuMTE4NyAwLjA2MTAzNTJDOS43NTkyOCAwLjA2MTAzNTIgOS40NDQ4MiAwLjE4NDU3IDkuMjA4OTggMC40MzE2NDFMMC40NDkyMTkgOS4wMDA0OUMwLjE0NTk5NiA5LjI5MjQ4IDAuMDExMjMwNSA5LjYxODE2IDAgMTBaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjYiLz4KPC9zdmc+Cg==", k = ({ toggleAccountPage: i, logout: N, store: A }) => {
7
+ var j, a, c;
8
+ const { data: M } = x(A), g = (j = M == null ? void 0 : M.summary) == null ? void 0 : j.avatar, T = (a = M == null ? void 0 : M.summary) == null ? void 0 : a.name;
9
+ return /* @__PURE__ */ D(u, { children: [
10
+ /* @__PURE__ */ I(y, { onClick: () => i(!1), children: /* @__PURE__ */ I("img", { alt: "back-icon", src: d }) }),
11
+ /* @__PURE__ */ D(l, { children: [
12
+ /* @__PURE__ */ I("span", { children: "Profile" }),
13
+ /* @__PURE__ */ D(n, { children: [
14
+ g && /* @__PURE__ */ I(t, { alt: "user-avatar", src: g }),
15
+ !g && /* @__PURE__ */ I(L, { children: o(T || "") }),
16
+ /* @__PURE__ */ I(r, { children: (c = M == null ? void 0 : M.summary) == null ? void 0 : c.name })
17
+ ] })
18
+ ] }),
19
+ /* @__PURE__ */ D(m, { onClick: N, children: [
20
+ /* @__PURE__ */ I(z, { alt: "logout-icon", src: S }),
21
+ /* @__PURE__ */ I("span", { children: "Log out" })
22
+ ] })
23
+ ] });
24
+ };
25
+ export {
26
+ k as UserAccount
27
+ };
@@ -0,0 +1,80 @@
1
+ import { styled as t } from "@linaria/react";
2
+ const e = t.div`
3
+ display: flex;
4
+ flex-direction: column;
5
+ font-size: 18px;
6
+ font-weight: 700;
7
+ color: #fff;
8
+ padding: 24px 15px;
9
+ position: relative;
10
+ height: 100%;
11
+ `, o = t.span`
12
+ display: flex;
13
+ flex-direction: column;
14
+ align-items: center;
15
+ margin-bottom: 30px;
16
+ `, r = t.div`
17
+ margin-top: 31px;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ `, i = t.img`
22
+ width: 122px;
23
+ height: 122px;
24
+ border-radius: 50%;
25
+ `, a = t.span`
26
+ font-size: 24px;
27
+ font-weight: 600;
28
+ margin-top: 24px;
29
+ `, p = t.button`
30
+ position: absolute;
31
+ width: 30px;
32
+ height: 30px;
33
+ left: 24px;
34
+ top: 24px;
35
+ border: none;
36
+ outline: none;
37
+ background-color: transparent;
38
+ cursor: pointer;
39
+ padding: 0px;
40
+ display: flex;
41
+ justify-content: center;
42
+ align-items: center;
43
+ border-radius: 50%;
44
+ `, s = t.button`
45
+ padding: 16px;
46
+ border: none;
47
+ outline: none;
48
+ background-color: transparent;
49
+ cursor: pointer;
50
+ padding: 0px;
51
+ display: flex;
52
+ color: var(--color-red-secondary);
53
+ margin-left: 40px;
54
+ `, c = t.img`
55
+ margin-right: 16px;
56
+ `, d = t.div`
57
+ background: #2d6ffd;
58
+ border-radius: 50%;
59
+ width: 120px;
60
+ height: 120px;
61
+ text-align: center;
62
+ text-transform: uppercase;
63
+ display: flex;
64
+ align-items: center;
65
+ justify-content: center;
66
+ color: #fff;
67
+ font-size: 40px;
68
+ flex-shrink: 0;
69
+ `;
70
+ export {
71
+ d as AvatarPlaceholder,
72
+ p as BackBtn,
73
+ e as Container,
74
+ o as ContentWrap,
75
+ s as LogoutBtn,
76
+ c as LogoutIcon,
77
+ i as UserAvatar,
78
+ r as UserContainer,
79
+ a as UserName
80
+ };
@@ -0,0 +1,4 @@
1
+ const t = (e) => e.split(/\s+/).map((p) => p[0]).join("").toUpperCase();
2
+ export {
3
+ t as abbreviate
4
+ };
@@ -0,0 +1,63 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { styled as c } from "@linaria/react";
3
+ import { useState as a } from "react";
4
+ const d = c.div`
5
+ display: flex;
6
+ background: rgb(29, 123, 255);
7
+ padding: 4px 6px;
8
+ border-radius: 5px;
9
+ font-size: 16px;
10
+
11
+ input {
12
+ display: block;
13
+ width: 100%;
14
+ color: #fff;
15
+ font-size: 24px;
16
+ border: none;
17
+ padding: 2px;
18
+ padding-left: 10px;
19
+ background: linear-gradient(136.45deg, rgba(60, 139, 251, 0.3) 0.57%, rgba(0, 79, 190, 0.3) 100%);
20
+ border: 1px solid transparent;
21
+ outline: none;
22
+
23
+ &:focus {
24
+ border-color: rgb(29, 123, 255);
25
+ }
26
+ }
27
+
28
+ label {
29
+ margin-right: 4px;
30
+ }
31
+
32
+ button {
33
+ width: 150px;
34
+ color: #fff;
35
+ background: transparent;
36
+ margin: 0;
37
+ padding: 0;
38
+ cursor: pointer;
39
+ border: none;
40
+ text-transform: uppercase;
41
+ }
42
+
43
+ margin-bottom: 2px;
44
+ `, x = ({ sdk: l, storage: t }) => {
45
+ const [n, s] = a(t.getSchema() || ""), [o, p] = a(t.getToken() || "");
46
+ return /* @__PURE__ */ i("div", { children: [
47
+ /* @__PURE__ */ i(d, { children: [
48
+ /* @__PURE__ */ e("label", { children: "Bypass Schema" }),
49
+ /* @__PURE__ */ e("input", { type: "text", value: n, onChange: (r) => s(r.target.value) }),
50
+ /* @__PURE__ */ e("button", { style: { visibility: "hidden" }, children: "login" })
51
+ ] }),
52
+ /* @__PURE__ */ i(d, { children: [
53
+ /* @__PURE__ */ e("label", { children: "Bypass Token" }),
54
+ /* @__PURE__ */ e("input", { type: "text", disabled: !n, value: o, onChange: (r) => p(r.target.value) }),
55
+ /* @__PURE__ */ e("button", { disabled: !n || !o, onClick: async () => {
56
+ await l.authorizationBypass(n, o), t.setSchema(n), t.setToken(o);
57
+ }, children: "login" })
58
+ ] })
59
+ ] });
60
+ };
61
+ export {
62
+ x as BypassLogin
63
+ };
@@ -0,0 +1,76 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { useMemo as l, useState as c } from "react";
3
+ import { useStore as m } from "@nanostores/react";
4
+ import { styled as n } from "@linaria/react";
5
+ import { EventInput as x } from "./eventInput.js";
6
+ import { BypassLogin as f } from "./bypassLogin.js";
7
+ import { DeveloperStorage as u } from "../storage.js";
8
+ import "@streamlayer/sdk-web-storage";
9
+ const g = n.div`
10
+ position: fixed;
11
+ bottom: 0;
12
+ right: 0;
13
+ padding: 10px;
14
+ padding-right: 60px;
15
+ max-width: 600px;
16
+ `, h = n.div`
17
+ flex-direction: column;
18
+ gap: 5px;
19
+ `, b = n.button`
20
+ position: absolute;
21
+ z-index: 10000;
22
+ bottom: 10px;
23
+ right: 10px;
24
+ width: 40px;
25
+ height: 40px;
26
+
27
+ display: flex;
28
+ flex-direction: column;
29
+ justify-content: space-around;
30
+ background: rgb(29, 123, 255);
31
+ border: none;
32
+ border-radius: 6px;
33
+ padding: 10px;
34
+ cursor: pointer;
35
+ transition: all 0.1s ease;
36
+
37
+ &:hover {
38
+ padding-top: 8px;
39
+ padding-bottom: 8px;
40
+ }
41
+
42
+ &:active {
43
+ transform: translateY(4px);
44
+ }
45
+
46
+ &[data-answeredCorrect='false'] {
47
+ span:nth-child(odd) {
48
+ opacity: 0;
49
+ }
50
+ }
51
+
52
+ span {
53
+ display: block;
54
+ background: #fff;
55
+ border-radius: 4px;
56
+ width: 100%;
57
+ height: 4px;
58
+ }
59
+ `, C = ({ sdk: o }) => {
60
+ var d;
61
+ const p = l(() => new u(), []), [i, s] = c(!1), { organizationSettings: t } = m(o.sdkStore);
62
+ return /* @__PURE__ */ r(g, { children: [
63
+ /* @__PURE__ */ r(b, { "data-opened": i.toString(), onClick: () => s((a) => !a), children: [
64
+ /* @__PURE__ */ e("span", {}),
65
+ /* @__PURE__ */ e("span", {}),
66
+ /* @__PURE__ */ e("span", {})
67
+ ] }),
68
+ /* @__PURE__ */ r(h, { style: { display: i ? "flex" : "none" }, children: [
69
+ /* @__PURE__ */ e(x, { sdk: o, useStreamLayerEventsIds: !((d = t == null ? void 0 : t.data) != null && d.provider), storage: p }),
70
+ /* @__PURE__ */ e(f, { sdk: o, storage: p })
71
+ ] })
72
+ ] });
73
+ };
74
+ export {
75
+ C as Developer
76
+ };