@streamlayer/react-ui 1.16.2 → 1.18.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 (65) hide show
  1. package/lib/app/app/story/settings/login.js +18 -14
  2. package/lib/app/login/demo.d.ts +1 -4
  3. package/lib/app/login/demo.js +38 -24
  4. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.d.ts +4 -0
  5. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/index.js +10 -0
  6. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/styles.d.ts +4 -0
  7. package/lib/app/masters/BetPack/BetPackContent/EmergencyScreen/styles.js +25 -0
  8. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +5 -0
  9. package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +18 -0
  10. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.d.ts +7 -0
  11. package/lib/app/masters/BetPack/BetPackContent/EndScreen/styles.js +41 -0
  12. package/lib/app/masters/BetPack/BetPackContent/LoaderScreen/index.d.ts +1 -0
  13. package/lib/app/masters/BetPack/BetPackContent/LoaderScreen/index.js +13 -0
  14. package/lib/app/masters/BetPack/BetPackContent/QuestionScreen/index.d.ts +6 -0
  15. package/lib/app/masters/BetPack/BetPackContent/QuestionScreen/index.js +7 -0
  16. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.d.ts +4 -0
  17. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/index.js +6 -0
  18. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/styles.d.ts +1 -0
  19. package/lib/app/masters/BetPack/BetPackContent/ScreenContainer/styles.js +9 -0
  20. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.d.ts +5 -0
  21. package/lib/app/masters/BetPack/BetPackContent/StartScreen/index.js +33 -0
  22. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.d.ts +7 -0
  23. package/lib/app/masters/BetPack/BetPackContent/StartScreen/styles.js +41 -0
  24. package/lib/app/masters/BetPack/BetPackContent/constants.d.ts +13 -0
  25. package/lib/app/masters/BetPack/BetPackContent/constants.js +22 -0
  26. package/lib/app/masters/BetPack/BetPackContent/index.d.ts +11 -0
  27. package/lib/app/masters/BetPack/BetPackContent/index.js +116 -0
  28. package/lib/app/masters/BetPack/BetPackContent/styles.d.ts +3 -0
  29. package/lib/app/masters/BetPack/BetPackContent/styles.js +20 -0
  30. package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +12 -0
  31. package/lib/app/masters/BetPack/BetPackOverlay/index.js +9 -0
  32. package/lib/app/masters/BetPack/BetPackOverlay/styles.d.ts +10 -0
  33. package/lib/app/masters/BetPack/BetPackOverlay/styles.js +51 -0
  34. package/lib/app/masters/BetPack/index.d.ts +14 -0
  35. package/lib/app/masters/BetPack/index.js +84 -0
  36. package/lib/app/masters/BetPack/styles.d.ts +4 -0
  37. package/lib/app/masters/BetPack/styles.js +24 -0
  38. package/lib/app/masters/BetPack/typings.d.js +1 -0
  39. package/lib/app/masters/BetPack/utils.d.ts +19 -0
  40. package/lib/app/masters/BetPack/utils.js +10 -0
  41. package/lib/app/masters/masters.d.ts +0 -2
  42. package/lib/app/masters/masters.js +89 -85
  43. package/lib/app/masters/story/components.d.ts +11 -0
  44. package/lib/app/masters/story/components.js +151 -0
  45. package/lib/app/masters/story/index.d.ts +3 -0
  46. package/lib/app/masters/story/index.js +53 -0
  47. package/lib/assets/style.css +1 -1
  48. package/lib/ui/gamification/vote/feedback/index.d.ts +3 -1
  49. package/lib/ui/gamification/vote/feedback/index.js +52 -50
  50. package/lib/ui/gamification/vote/feedback/styles.d.ts +1 -0
  51. package/lib/ui/gamification/vote/feedback/styles.js +5 -0
  52. package/lib/ui/gamification/vote/index.d.ts +1 -0
  53. package/lib/ui/gamification/vote/index.js +150 -126
  54. package/lib/ui/gamification/vote/styles.d.ts +5 -0
  55. package/lib/ui/gamification/vote/styles.js +40 -14
  56. package/lib/ui/gamification/vote/vote-option/index.js +43 -40
  57. package/lib/ui/icons/index.d.ts +5 -0
  58. package/lib/ui/icons/index.js +87 -66
  59. package/lib/ui/loader/index.d.ts +4 -0
  60. package/lib/ui/loader/index.js +5 -0
  61. package/lib/ui/theme/masters-theme.js +75 -40
  62. package/lib/ui/theme/masters.js +3 -2
  63. package/lib/utils/decorators/container.js +11 -9
  64. package/lib/utils/decorators/masters.js +29 -0
  65. package/package.json +22 -16
@@ -0,0 +1,5 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ const r = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20200%20200'%3e%3cradialGradient%20id='a9'%20cx='.66'%20fx='.66'%20cy='.3125'%20fy='.3125'%20gradientTransform='scale(1.5)'%3e%3cstop%20offset='0'%20stop-color='%23FFFFFF'%3e%3c/stop%3e%3cstop%20offset='.3'%20stop-color='%23FFFFFF'%20stop-opacity='.9'%3e%3c/stop%3e%3cstop%20offset='.6'%20stop-color='%23FFFFFF'%20stop-opacity='.6'%3e%3c/stop%3e%3cstop%20offset='.8'%20stop-color='%23FFFFFF'%20stop-opacity='.3'%3e%3c/stop%3e%3cstop%20offset='1'%20stop-color='%23FFFFFF'%20stop-opacity='0'%3e%3c/stop%3e%3c/radialGradient%3e%3ccircle%20transform-origin='center'%20fill='none'%20stroke='url(%23a9)'%20stroke-width='17'%20stroke-linecap='round'%20stroke-dasharray='200%201000'%20stroke-dashoffset='0'%20cx='100'%20cy='100'%20r='70'%3e%3canimateTransform%20type='rotate'%20attributeName='transform'%20calcMode='spline'%20dur='1.8'%20values='360;0'%20keyTimes='0;1'%20keySplines='0%200%201%201'%20repeatCount='indefinite'%3e%3c/animateTransform%3e%3c/circle%3e%3ccircle%20transform-origin='center'%20fill='none'%20opacity='.2'%20stroke='%23FFFFFF'%20stroke-width='17'%20stroke-linecap='round'%20cx='100'%20cy='100'%20r='70'%3e%3c/circle%3e%3c/svg%3e", c = ({ height: o = "37px", width: t = "37px" }) => /* @__PURE__ */ e("div", { style: { height: o, width: t }, children: /* @__PURE__ */ e("img", { alt: "loader", src: r }) });
3
+ export {
4
+ c as Loader
5
+ };
@@ -1,6 +1,7 @@
1
- import { breakpoints as i } from "./breakpoints.js";
2
- import { FONT as t } from "./constants.js";
3
- const r = {
1
+ import { breakpoints as T } from "./breakpoints.js";
2
+ import { COLORS as F, FONT as _ } from "./constants.js";
3
+ const t = {
4
+ ...F,
4
5
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5
6
  // @ts-expect-error
6
7
  BG_TRANSPARENT: "rgba(0,0,0, .8)",
@@ -11,7 +12,7 @@ const r = {
11
12
  GREY_PRIMARY: "#909395",
12
13
  PRIMARY_1: "#107D57",
13
14
  PRIMARY_2: "#006747",
14
- PRIMARY_TEXT: "#006747",
15
+ PRIMARY_TEXT: "#25282A",
15
16
  QUESTION_TYPE_ICON: "#107D57",
16
17
  SUCCESS: "#107D57",
17
18
  UNSUCCESS: "#DF2F3B",
@@ -25,40 +26,74 @@ const r = {
25
26
  NEUTRALS_GRAY5: "#B1B3B3",
26
27
  NEUTRALS_GRAY6: "#888B8D",
27
28
  NEUTRALS_GRAY7: "#6B6F73",
28
- NEUTRALS_GRAY9: "#25282A"
29
- }, e = {
30
- ...t,
29
+ NEUTRALS_GRAY9: "#25282A",
30
+ SDK_CONTAINER_BG: "#F7F7F7",
31
+ SDK_WHITE_CONTAINER_BG: "#fff",
32
+ SDK_DARK_CONTAINER_BG: "#fff",
33
+ SDK_PREDICTION_RESULT_SUCCESS_BG: "#fff",
34
+ SDK_PREDICTION_RESULT_INCORRECT_BG: "#fff",
35
+ SDK_PREDICTION_RESULT_SUCCESS_TEXT: "#107D57",
36
+ SDK_PREDICTION_RESULT_ERROR_TITLE: "#090E13",
37
+ SDK_PREDICTION_RESULT_ERROR_SUBTITLE: "#DF2F3B",
38
+ SDK_PREDICTION_RESULT_CLOSE_ICON: "#6B6F73",
39
+ SDK_PREDICTION_FEEDBACK_SUCCESS_ICON: "#107D57",
40
+ SDK_PREDICTION_FEEDBACK_INCORRECT_RECT1: "#CD2525",
41
+ SDK_PREDICTION_FEEDBACK_INCORRECT_RECT2: "#fff",
42
+ PREDICTION_BG_LINES_CORRECT: "#01AB58",
43
+ PREDICTION_BG_LINES_INCORRECT: "#888B8D",
44
+ SKELETON_COLOR_1: "#f1efef",
45
+ SKELETON_COLOR_2: "#f9f8f8",
46
+ TABS_CONTAINER_BG: "#F2F2F1",
47
+ TABS_ACTIVE_BG: "#FFFFFF",
48
+ TABS_COLOR: "#6B6F73",
49
+ TABS_ACTIVE_COLOR: "#107D57",
50
+ CARD_BG: "#FFFFFF",
51
+ CARD_BORDER: "#fff",
52
+ BORDER: "#E8E8E8",
53
+ VOTE_BTN_BG: "#F7F7F7",
54
+ VOTE_BTN_BORDER: "rgb(232, 232, 232)",
55
+ VOTE_BTN_DISABLED_BORDER: "#B1B3B3",
56
+ VOTE_BTN_SELECTED_BORDER: "#25282A",
57
+ VOTE_BTN_NOT_SELECTED_BORDER: "#E8E8E8",
58
+ VOTE_BTN_SELECTED_BG: "#FFFFFF",
59
+ VOTE_BTN_NOT_SELECTED_BG: "#FFFFFF",
60
+ VOTE_BTN_NOT_SELECTED_BG_UNSET: "rgb(196, 196, 196)",
61
+ VOTED_ANSWER_BG: "rgba(16, 125, 87, 0.10)",
62
+ VOTED_BTN_RCT_BG: "rgba(16, 125, 87, 0.30)",
63
+ IN_APP_BG: "rgba(255, 255, 255, 0.90)",
64
+ IN_APP_QUESTION_TYPE_ICON: "#1D7BFF",
65
+ IN_APP_QUESTION_TYPE_LABEL: "#82899E",
66
+ IN_APP_QUESTION_QUOTE: "rgba(10, 14, 19, 0.70)",
67
+ IN_APP_QUESTION_RESULT_SUBTITLE_BG: "#1D7BFF",
68
+ IN_APP_QUESTION_RESULT_LINE: "#babfc5"
69
+ }, E = {
70
+ ..._,
31
71
  REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
32
72
  SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
33
73
  COLOR: "#fff",
34
74
  WEIGHT_DEFAULT: "500"
35
- }, E = Object.entries(r).reduce((n, [o, a]) => `
36
- ${n}
37
- --color-${o.toLowerCase().replaceAll("_", "-")}: ${a};
38
- `, ""), R = `
39
- ${E}
40
- --font-family: ${e.REGULAR};
41
- --font-regular: ${e.REGULAR};
42
- --font-color: ${e.COLOR};
43
- --font-serif: ${e.SERIF};
44
- --font-weight-default: ${e.WEIGHT_DEFAULT};
45
- --font-weight-default1: ${e.WEIGHT_DEFAULT1};
46
- --font-weight-default2: ${e.WEIGHT_DEFAULT2};
47
- --font-weight-default3: ${e.WEIGHT_DEFAULT3};
48
- --font-size-default: ${t.SIZE_DEFAULT};
49
- --font-size-secondary: ${t.SIZE_DEFAULT1};
50
- --font-size-small: ${t.SIZE_DEFAULT2};
51
- --line-height-default: ${t.LINE_HEIGHT};
52
- --margin-title-default: ${t.MARGIN_TITLE_DEFAULT};
75
+ }, N = Object.entries(t).reduce((R, [e, S]) => `
76
+ ${R}
77
+ --color-${e.toLowerCase().replaceAll("_", "-")}: ${S};
78
+ `, ""), i = `
79
+ ${N}
80
+ --font-family: ${E.REGULAR};
81
+ --font-regular: ${E.REGULAR};
82
+ --font-color: ${E.COLOR};
83
+ --font-serif: ${E.SERIF};
84
+ --font-weight-default: ${E.WEIGHT_DEFAULT};
85
+ --font-weight-default1: ${E.WEIGHT_DEFAULT1};
86
+ --font-weight-default2: ${E.WEIGHT_DEFAULT2};
87
+ --font-weight-default3: ${E.WEIGHT_DEFAULT3};
88
+ --font-size-default: ${_.SIZE_DEFAULT};
89
+ --font-size-secondary: ${_.SIZE_DEFAULT1};
90
+ --font-size-small: ${_.SIZE_DEFAULT2};
91
+ --line-height-default: ${_.LINE_HEIGHT};
92
+ --margin-title-default: ${_.MARGIN_TITLE_DEFAULT};
53
93
  --font-header-title: 0.75rem;
54
- --color-vote-btn-border: transparent;
55
- --color-vote-btn-not-selected-bg-unset: #fff;
56
- --color-voted-answer-bg: #1D7BFF;
57
- --color-voted-btn-rct-bg: #fff;
58
- --color-prediction-bg-lines-correct: #095CD1;
59
94
 
60
95
  --header-offset: 0px;
61
- --header-height: 68px;
96
+ --header-height: 0px;
62
97
  --watch-live-header: 0px;
63
98
  --animation-duration: 0.5s;
64
99
  --animation-function: ease;
@@ -82,17 +117,17 @@ const r = {
82
117
  --welcome-screen-graphic-size-xl: 125px;
83
118
  --insight-image-ratio: 16/9;
84
119
 
85
- ${i.down("xl")`
86
- --header-offset: 56px;
87
- --watch-live-header: 46px;
120
+ ${T.down("xl")`
121
+ --header-offset: 0px;
122
+ --watch-live-header: 0px;
88
123
  `}
89
124
 
90
- ${i.intermediate("xl", "lg")`
91
- --header-offset: 76px;
125
+ ${T.intermediate("xl", "lg")`
126
+ --header-offset: 0px;
92
127
  `}
93
- `, T = "m1ojpy2l";
128
+ `, A = "m1ojpy2l";
94
129
  export {
95
- r as MASTERS_COLORS,
96
- T as mastersTheme,
97
- R as mastersThemeStr
130
+ t as MASTERS_COLORS,
131
+ A as mastersTheme,
132
+ i as mastersThemeStr
98
133
  };
@@ -1,6 +1,7 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
+ import { cx as s } from "@linaria/core";
2
3
  import { mastersTheme as a } from "./masters-theme.js";
3
- const o = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, style: m, children: r }) });
4
+ const c = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: s("masters-theme", a), style: m, children: r }) });
4
5
  export {
5
- o as StreamLayerMastersThemeProvider
6
+ c as StreamLayerMastersThemeProvider
6
7
  };
@@ -1,12 +1,14 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { StreamLayerThemeProvider as t } from "../../ui/theme/index.js";
3
- import { BGContainer as i, AppContainer as m } from "./styles.js";
4
- const l = (r, n) => {
5
- const o = n.globals.theme || "light";
6
- return /* @__PURE__ */ e(t, { themeMode: o, children: /* @__PURE__ */ e(r, {}) });
7
- }, a = (r) => /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(r, {}) }), s = (r) => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {}) }) }) });
2
+ import { StreamLayerThemeProvider as n } from "../../ui/theme/index.js";
3
+ import { StreamLayerMastersThemeProvider as i } from "../../ui/theme/masters.js";
4
+ import { BGContainer as m, AppContainer as c } from "./styles.js";
5
+ const l = (r, t) => /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(r, {}) }), p = (r, t) => {
6
+ const o = t.globals.theme || "light";
7
+ return /* @__PURE__ */ e(n, { themeMode: o, children: /* @__PURE__ */ e(r, {}) });
8
+ }, f = (r) => /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(r, {}) }), u = (r) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(r, {}) }) }) });
8
9
  export {
9
- a as bgContainer,
10
- s as container,
11
- l as theme
10
+ f as bgContainer,
11
+ u as container,
12
+ l as mastersTheme,
13
+ p as theme
12
14
  };
@@ -0,0 +1,29 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { useEffect as r } from "react";
3
+ const t = (s) => {
4
+ const e = document.createElement("link");
5
+ for (const o in s)
6
+ e.setAttribute(o, s[o]);
7
+ document.head.appendChild(e);
8
+ }, a = (s) => (r(() => {
9
+ t({
10
+ rel: "stylesheet",
11
+ href: "https://simulation.masters.com/assets/style/styles.ca29f286.css",
12
+ type: "text/css"
13
+ }), t({
14
+ rel: "preload",
15
+ href: "https://simulation.masters.com/assets/fonts/icons/masters-icons.woff",
16
+ as: "font",
17
+ type: "font/woff",
18
+ crossorigin: "anonymous"
19
+ }), t({
20
+ rel: "preload",
21
+ href: "https://simulation.masters.com/assets/fonts/icons/masters-icons.ttf",
22
+ as: "font",
23
+ type: "font/ttf",
24
+ crossorigin: "anonymous"
25
+ });
26
+ }, []), /* @__PURE__ */ n(s, {}));
27
+ export {
28
+ a as useMastersFiles
29
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "1.16.2",
3
+ "version": "1.18.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -20,6 +20,11 @@
20
20
  "default": "./lib/app/masters/Points/index.js",
21
21
  "types": "./lib/app/masters/Points/index.d.ts"
22
22
  },
23
+ "./bet-pack": {
24
+ "import": "./lib/app/masters/BetPack/index.js",
25
+ "default": "./lib/app/masters/BetPack/index.js",
26
+ "types": "./lib/app/masters/BetPack/index.d.ts"
27
+ },
23
28
  "./points": {
24
29
  "import": "./lib/app/app/Points/index.js",
25
30
  "default": "./lib/app/app/Points/index.js",
@@ -56,7 +61,7 @@
56
61
  ],
57
62
  "peerDependencies": {
58
63
  "@lottiefiles/react-lottie-player": "^3.5.4",
59
- "@streamlayer/sl-eslib": "^5.130.0",
64
+ "@streamlayer/sl-eslib": "^5.149.1",
60
65
  "@types/lodash.throttle": "^4.1.9",
61
66
  "lodash.throttle": "^4.1.1",
62
67
  "nanoid": "3.3.7",
@@ -64,19 +69,19 @@
64
69
  "react-virtualized-auto-sizer": "^1.0.24",
65
70
  "react-window": "^1.8.10",
66
71
  "react-window-infinite-loader": "^1.0.9",
67
- "@streamlayer/feature-gamification": "^1.13.3",
68
- "@streamlayer/sdk-web": "^1.7.3",
69
- "@streamlayer/sdk-web-analytics": "^1.5.7",
70
- "@streamlayer/sdk-web-anonymous-auth": "^1.1.20",
71
- "@streamlayer/sdk-web-api": "^1.6.20",
72
- "@streamlayer/sdk-web-core": "^1.9.3",
73
- "@streamlayer/sdk-web-features": "^1.0.41",
74
- "@streamlayer/sdk-web-interfaces": "^1.4.7",
75
- "@streamlayer/sdk-web-logger": "^1.0.41",
76
- "@streamlayer/sdk-web-notifications": "^1.3.3",
77
- "@streamlayer/sdk-web-storage": "^1.0.41",
78
- "@streamlayer/sdk-web-types": "^1.9.3",
79
- "@streamlayer/react-polyfills": "^0.1.1"
72
+ "@streamlayer/feature-gamification": "^1.14.0",
73
+ "@streamlayer/sdk-web": "^1.8.0",
74
+ "@streamlayer/sdk-web-analytics": "^1.6.0",
75
+ "@streamlayer/sdk-web-api": "^1.7.0",
76
+ "@streamlayer/sdk-web-anonymous-auth": "^1.1.22",
77
+ "@streamlayer/sdk-web-core": "^1.10.0",
78
+ "@streamlayer/sdk-web-interfaces": "^1.4.9",
79
+ "@streamlayer/sdk-web-features": "^1.0.43",
80
+ "@streamlayer/sdk-web-notifications": "^1.3.5",
81
+ "@streamlayer/sdk-web-logger": "^1.0.43",
82
+ "@streamlayer/sdk-web-storage": "^1.0.43",
83
+ "@streamlayer/sdk-web-types": "^1.10.0",
84
+ "@streamlayer/react-polyfills": "^0.1.3"
80
85
  },
81
86
  "nx": {
82
87
  "implicitDependencies": [
@@ -108,6 +113,7 @@
108
113
  "react-countdown-circle-timer": "^3.2.1",
109
114
  "react-countup": "^6.5.3",
110
115
  "react-phone-number-input": "^3.4.8",
116
+ "react-slick": "^0.30.3",
111
117
  "rollup-plugin-node-polyfills": "^0.2.1",
112
118
  "screenfull": "^6.0.2",
113
119
  "tslib": "^2.7.0",
@@ -116,6 +122,6 @@
116
122
  "vite-plugin-svgr": "^4.2.0",
117
123
  "vite-svg-loader": "^5.1.0",
118
124
  "vite-tsconfig-paths": "^5.0.1",
119
- "@streamlayer/react": "^1.11.2"
125
+ "@streamlayer/react": "^1.12.0"
120
126
  }
121
127
  }