@streamlayer/react-ui 0.92.0 → 0.93.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 (53) hide show
  1. package/lib/assets/style.css +1 -1
  2. package/lib/index.js +5 -4
  3. package/lib/ui/app/Features/Gamification/Tabs.js +36 -32
  4. package/lib/ui/app/Features/Gamification/gamification-feature.js +4 -1
  5. package/lib/ui/app/Features/Gamification/index.js +42 -38
  6. package/lib/ui/app/Navigation/MastersNavigation/index.js +27 -25
  7. package/lib/ui/app/Notifications/Onboarding/index.js +91 -80
  8. package/lib/ui/app/Notifications/index.js +65 -60
  9. package/lib/ui/app/Points/index.js +6 -5
  10. package/lib/ui/app/masters.js +8 -2
  11. package/lib/ui/app/styles.d.ts +1 -0
  12. package/lib/ui/app/styles.js +6 -1
  13. package/lib/ui/app/useImagesPreload.d.ts +4 -0
  14. package/lib/ui/app/useImagesPreload.js +23 -0
  15. package/lib/ui/app/useSdkResponsive.js +11 -11
  16. package/lib/ui/app/useSdkScroll.d.ts +1 -0
  17. package/lib/ui/app/useSdkScroll.js +29 -21
  18. package/lib/ui/gamification/detail/header/index.js +11 -11
  19. package/lib/ui/gamification/detail/header/styles.d.ts +1 -1
  20. package/lib/ui/gamification/detail/header/styles.js +11 -11
  21. package/lib/ui/gamification/onboarding/index.d.ts +1 -0
  22. package/lib/ui/gamification/onboarding/index.js +54 -43
  23. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.d.ts +1 -1
  24. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/index.js +15 -13
  25. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.d.ts +1 -1
  26. package/lib/ui/gamification/onboarding/slides/onboarding-instructions/styles.js +9 -9
  27. package/lib/ui/gamification/points/index.js +5 -4
  28. package/lib/ui/gamification/question/insight/index.js +5 -5
  29. package/lib/ui/gamification/question/notification/prediction-result/animation-lines/index.js +17 -17
  30. package/lib/ui/gamification/question/notification/prediction-result/index.js +37 -39
  31. package/lib/ui/gamification/question/notification/prediction-result/styles.d.ts +1 -1
  32. package/lib/ui/gamification/question/notification/prediction-result/styles.js +12 -12
  33. package/lib/ui/gamification/vote/index.js +57 -56
  34. package/lib/ui/gamification/vote/insight-details/index.js +1 -1
  35. package/lib/ui/gamification/vote/vote-option/index.js +61 -57
  36. package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -0
  37. package/lib/ui/gamification/vote/win-bar/index.js +21 -20
  38. package/lib/ui/navigation/masters.d.ts +2 -1
  39. package/lib/ui/navigation/masters.js +9 -4
  40. package/lib/ui/questions/insight/index.d.ts +1 -1
  41. package/lib/ui/questions/insight/index.js +21 -27
  42. package/lib/ui/skeleton/index.d.ts +7 -0
  43. package/lib/ui/skeleton/index.js +7 -0
  44. package/lib/ui/skeleton/styles.d.ts +2 -0
  45. package/lib/ui/skeleton/styles.js +9 -0
  46. package/lib/ui/theme/breakpoints.d.ts +4 -1
  47. package/lib/ui/theme/breakpoints.js +24 -12
  48. package/lib/ui/theme/constants.d.ts +4 -0
  49. package/lib/ui/theme/constants.js +6 -2
  50. package/lib/ui/theme/index.js +4 -3
  51. package/lib/ui/theme/theme.js +29 -21
  52. package/lib/utils/decorators/container.js +4 -3
  53. package/package.json +18 -18
@@ -1,18 +1,30 @@
1
- import { BREAKPOINTS as e } from "./constants.js";
2
- const i = (t) => (n) => `
3
- @media (${t}) {
4
- ${n}
1
+ import { BREAKPOINTS as e, ORIENTATION as a } from "./constants.js";
2
+ const r = (n) => (t) => `
3
+ @media only screen and (${n}) {
4
+ ${t}
5
5
  }
6
- `, o = {
7
- up: (t) => {
8
- const n = e[t];
9
- return i(`min-width: ${n}px`);
6
+ `, d = (n, t) => (i) => `
7
+ @media only screen and (${n}) and (${t}) {
8
+ ${i}
9
+ }
10
+ `, s = {
11
+ up: (n) => {
12
+ const t = e[n];
13
+ return r(`min-width: ${t}px`);
14
+ },
15
+ down: (n) => {
16
+ const t = e[n] - 1;
17
+ return r(`max-width: ${t}px`);
18
+ },
19
+ intermediate: (n, t) => {
20
+ const i = e[n] - 1, o = e[t];
21
+ return d(`max-width: ${i}px`, `min-width: ${o}px`);
10
22
  },
11
- down: (t) => {
12
- const n = e[t] - 1;
13
- return i(`max-width: ${n}px`);
23
+ orientation: (n) => {
24
+ const t = a[n];
25
+ return r(`orientation: ${t}`);
14
26
  }
15
27
  };
16
28
  export {
17
- o as breakpoints
29
+ s as breakpoints
18
30
  };
@@ -86,4 +86,8 @@ export declare const BREAKPOINTS: {
86
86
  xl: number;
87
87
  xxl: number;
88
88
  };
89
+ export declare const ORIENTATION: {
90
+ landscape: string;
91
+ portrait: string;
92
+ };
89
93
  export declare const colors: string;
@@ -60,7 +60,10 @@ const N = {
60
60
  lg: 992,
61
61
  xl: 1200,
62
62
  xxl: 1400
63
- }, G = Object.keys(E).reduce((A, R) => {
63
+ }, G = {
64
+ landscape: "landscape",
65
+ portrait: "portrait"
66
+ }, B = Object.keys(E).reduce((A, R) => {
64
67
  const _ = E[R];
65
68
  return `
66
69
  ${A}
@@ -72,5 +75,6 @@ export {
72
75
  E as COLORS,
73
76
  S as FONT,
74
77
  T as MASTERS_COLORS,
75
- G as colors
78
+ G as ORIENTATION,
79
+ B as colors
76
80
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { theme as a } from "./theme.js";
2
+ import { theme as o } from "./theme.js";
3
+ import "./breakpoints.js";
3
4
  import "./constants.js";
4
- const s = ({ children: r, style: m }) => /* @__PURE__ */ e("div", { className: "StreamLayerSDKTheme", children: /* @__PURE__ */ e("div", { className: a, 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 }) });
5
6
  export {
6
- s as StreamLayerThemeProvider
7
+ p as StreamLayerThemeProvider
7
8
  };
@@ -1,36 +1,44 @@
1
- import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { colors as l, FONT as t } from "./constants.js";
3
- const s = `
4
- ${l}
5
- --font-family: ${t.REGULAR};
6
- --font-regular: ${t.REGULAR};
7
- --font-color: ${t.COLOR};
8
- --font-serif: ${t.SERIF};
9
- --font-weight-default: ${t.WEIGHT_DEFAULT};
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import { breakpoints as d } from "./breakpoints.js";
3
+ import { colors as s, FONT as e } from "./constants.js";
4
+ const h = `
5
+ ${s}
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};
10
11
 
12
+ --header-offset: 0px;
11
13
  --header-height: 68px;
12
14
  --animation-duration: 0.5s;
13
15
  --animation-function: ease;
14
16
  --container-padding: 16px;
15
17
  --border-radius: 8px;
16
18
  --pill-offset: 0px;
17
- `, c = "StreamLayerCSSReset", m = "ttkj0ah", f = () => /* @__PURE__ */ e("table", {
19
+ --max-width: 600px;
20
+ --max-notifications-width: 400px;
21
+
22
+ ${d.down("xl")`
23
+ --header-offset: 56px;
24
+ `}
25
+ `, m = "StreamLayerCSSReset", p = "ttkj0ah", x = () => /* @__PURE__ */ t("table", {
18
26
  children: /* @__PURE__ */ r("table", {
19
- children: [/* @__PURE__ */ e("thead", {
27
+ children: [/* @__PURE__ */ t("thead", {
20
28
  children: /* @__PURE__ */ r("tr", {
21
- children: [/* @__PURE__ */ e("th", {
29
+ children: [/* @__PURE__ */ t("th", {
22
30
  children: "name"
23
- }), /* @__PURE__ */ e("th", {
31
+ }), /* @__PURE__ */ t("th", {
24
32
  children: "value"
25
33
  })]
26
34
  })
27
- }), /* @__PURE__ */ e("tbody", {
28
- children: s.split(";").map((i) => {
35
+ }), /* @__PURE__ */ t("tbody", {
36
+ children: h.split(";").map((i) => {
29
37
  const n = i.trim(), [o, a] = n.split(":");
30
38
  return /* @__PURE__ */ r("tr", {
31
- children: [/* @__PURE__ */ e("td", {
39
+ children: [/* @__PURE__ */ t("td", {
32
40
  children: o
33
- }), /* @__PURE__ */ e("td", {
41
+ }), /* @__PURE__ */ t("td", {
34
42
  children: a
35
43
  })]
36
44
  }, n);
@@ -39,8 +47,8 @@ const s = `
39
47
  })
40
48
  });
41
49
  export {
42
- f as ThemeVariables,
43
- c as resetCss,
44
- m as theme,
45
- s as themeStr
50
+ x as ThemeVariables,
51
+ m as resetCss,
52
+ p as theme,
53
+ h as themeStr
46
54
  };
@@ -2,10 +2,11 @@ import { jsx as r } from "react/jsx-runtime";
2
2
  import { StreamLayerThemeProvider as o } from "../../ui/theme/index.js";
3
3
  import { AppContainer as t } from "./styles.js";
4
4
  import "../../ui/theme/theme.js";
5
+ import "../../ui/theme/breakpoints.js";
5
6
  import "../../ui/theme/constants.js";
6
7
  import "@linaria/react";
7
- const h = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
8
+ const a = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(e, {}) }), l = (e) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { children: /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(e, {}) }) }) });
8
9
  export {
9
- a as container,
10
- h as theme
10
+ l as container,
11
+ a as theme
11
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.92.0",
3
+ "version": "0.93.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -36,24 +36,24 @@
36
36
  ],
37
37
  "peerDependencies": {
38
38
  "@lottiefiles/react-lottie-player": "*",
39
- "@streamlayer/sl-eslib": "^5.63.3",
39
+ "@streamlayer/sl-eslib": "^5.64.1",
40
40
  "@types/lodash.throttle": "^4.1.9",
41
41
  "lodash.throttle": "^4.1.1",
42
42
  "react-infinite-scroller": "^1.2.6",
43
43
  "react-virtualized-auto-sizer": "^1.0.21",
44
44
  "react-window": "^1.8.10",
45
45
  "react-window-infinite-loader": "^1.0.9",
46
- "@streamlayer/feature-gamification": "^0.35.0",
47
- "@streamlayer/sdk-web": "^0.30.1",
48
- "@streamlayer/sdk-web-anonymous-auth": "^0.11.33",
49
- "@streamlayer/sdk-web-api": "^0.20.0",
50
- "@streamlayer/sdk-web-core": "^0.18.1",
51
- "@streamlayer/sdk-web-features": "^0.11.15",
52
- "@streamlayer/sdk-web-interfaces": "^0.20.0",
53
- "@streamlayer/sdk-web-notifications": "^0.13.6",
54
- "@streamlayer/sdk-web-storage": "^0.3.11",
55
- "@streamlayer/sdk-web-types": "^0.21.0",
56
- "@streamlayer/sdk-web-logger": "^0.5.11"
46
+ "@streamlayer/feature-gamification": "^0.35.1",
47
+ "@streamlayer/sdk-web": "^0.30.2",
48
+ "@streamlayer/sdk-web-anonymous-auth": "^0.11.34",
49
+ "@streamlayer/sdk-web-api": "^0.20.1",
50
+ "@streamlayer/sdk-web-core": "^0.18.2",
51
+ "@streamlayer/sdk-web-features": "^0.11.16",
52
+ "@streamlayer/sdk-web-interfaces": "^0.20.1",
53
+ "@streamlayer/sdk-web-notifications": "^0.13.7",
54
+ "@streamlayer/sdk-web-logger": "^0.5.12",
55
+ "@streamlayer/sdk-web-storage": "^0.3.12",
56
+ "@streamlayer/sdk-web-types": "^0.21.1"
57
57
  },
58
58
  "nx": {
59
59
  "implicitDependencies": [
@@ -69,12 +69,12 @@
69
69
  "@linaria/core": "^6.0.0",
70
70
  "@linaria/react": "^6.0.0",
71
71
  "@nanostores/react": "^0.7.1",
72
- "@storybook/addon-docs": "^7.6.10",
72
+ "@storybook/addon-docs": "^7.6.11",
73
73
  "@storybook/addon-styling": "^1.3.7",
74
- "@storybook/addon-viewport": "^7.6.10",
75
- "@storybook/blocks": "^7.6.10",
74
+ "@storybook/addon-viewport": "^7.6.11",
75
+ "@storybook/blocks": "^7.6.11",
76
76
  "@storybook/jest": "^0.2.3",
77
- "@storybook/react": "^7.6.10",
77
+ "@storybook/react": "^7.6.11",
78
78
  "@storybook/testing-library": "^0.2.2",
79
79
  "@types/react-infinite-scroller": "^1.2.5",
80
80
  "@types/react-window": "^1.8.8",
@@ -94,6 +94,6 @@
94
94
  "vite-plugin-svgr": "^4.2.0",
95
95
  "vite-svg-loader": "^5.1.0",
96
96
  "vite-tsconfig-paths": "^4.3.1",
97
- "@streamlayer/react": "^0.37.0"
97
+ "@streamlayer/react": "^0.37.1"
98
98
  }
99
99
  }