@streamlayer/react-ui 0.98.0 → 0.98.1

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.
@@ -1,52 +1,60 @@
1
- import { jsxs as a, jsx as s } from "react/jsx-runtime";
2
- import { cx as m } from "@linaria/core";
3
- import { styled as f } from "@linaria/react";
4
- import { useState as u, useCallback as i, useEffect as c } from "react";
5
- import { r as d } from "../../index-jRXrW6ie.js";
1
+ import { jsxs as p, jsx as u } from "react/jsx-runtime";
2
+ import { styled as h } from "@linaria/react";
3
+ import { useState as w, useEffect as m } from "react";
4
+ import { r as a } from "../../index-jRXrW6ie.js";
5
+ import { BREAKPOINTS as n } from "../theme/constants.js";
6
6
  import "../../index-uEuzH3jr.js";
7
- const p = /* @__PURE__ */ f("div")({
7
+ const y = /* @__PURE__ */ h("div")({
8
8
  name: "StaticContainer",
9
9
  class: "svm502q",
10
10
  propsAsIs: !1
11
- }), v = "fd3gza8", x = `
12
- body {
13
- overflow: hidden !important;
14
- }
15
- `, y = `
11
+ }), g = `
16
12
  .sl-hide-on-modal {
17
- display: none !important;
13
+ height: 0 !important;
14
+ opacity: 0 !important;
15
+ overflow: hidden !important;
18
16
  }
19
- `, h = `
17
+ `, O = `
20
18
  .sl-pill-button {
21
19
  display: none !important;
22
20
  }
23
- `, E = (r) => {
24
- const [t, n] = u(r), o = i((l) => {
25
- l.target instanceof HTMLAnchorElement && l.target.href.slice(-1) === "#" && n(!1);
26
- }, []), e = i(() => n(!1), []);
27
- return c(() => (r && (document.addEventListener("scroll", e), document.addEventListener("click", o)), () => {
28
- document.removeEventListener("scroll", e), document.removeEventListener("click", o);
29
- }), [r, e, o]), c(() => {
30
- t === !1 && (document.removeEventListener("scroll", e), document.removeEventListener("click", o));
31
- }, [t, e, o]), [t];
32
- }, V = ({
33
- children: r,
21
+ `, k = ({
22
+ children: i,
34
23
  container: t,
35
- fixedView: n,
36
- useContainer: o
24
+ useContainer: f
37
25
  }) => {
38
- const [e] = E(n);
39
- return t.current ? o ? d.createPortal(/* @__PURE__ */ a(p, {
40
- className: m(e && v),
41
- children: [r, e && /* @__PURE__ */ s("style", {
42
- children: x
43
- }), !e && /* @__PURE__ */ s("style", {
44
- children: y
45
- }), /* @__PURE__ */ s("style", {
46
- children: h
26
+ const [l] = w(() => {
27
+ var r;
28
+ const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
29
+ return (((r = t.current) == null ? void 0 : r.getBoundingClientRect().y) || 0) - e < 0;
30
+ }), [o, s] = w(!1);
31
+ return m(() => {
32
+ if (!t.current || !l)
33
+ return s(!0), () => {
34
+ };
35
+ const e = window.scrollY;
36
+ return s(!0), () => {
37
+ var c;
38
+ const d = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
39
+ (((c = t.current) == null ? void 0 : c.getBoundingClientRect().y) || 0) - d < 0 && window.scrollTo({
40
+ top: e
41
+ });
42
+ };
43
+ }, []), m(() => {
44
+ if (o && t.current && l) {
45
+ const e = window.innerWidth >= n.lg && window.innerWidth < n.xl ? 75 : 52;
46
+ window.scrollTo({
47
+ top: t.current.offsetTop - e
48
+ });
49
+ }
50
+ }, [o]), !t.current || !o ? null : f ? a.createPortal(/* @__PURE__ */ p(y, {
51
+ children: [i, /* @__PURE__ */ u("style", {
52
+ children: g
53
+ }), /* @__PURE__ */ u("style", {
54
+ children: O
47
55
  })]
48
- }), t.current, "modal-node") : d.createPortal(r, t.current, "modal-node") : null;
56
+ }), t.current, "modal-node") : a.createPortal(i, t.current, "modal-node");
49
57
  };
50
58
  export {
51
- V as ModalPortal
59
+ k as ModalPortal
52
60
  };
@@ -59,7 +59,7 @@ const N = {
59
59
  sm: 576,
60
60
  md: 768,
61
61
  lg: 992,
62
- xl: 1215,
62
+ xl: 1200,
63
63
  xxl: 1440
64
64
  }, G = {
65
65
  landscape: "landscape",
@@ -1,8 +1,8 @@
1
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { breakpoints as i } from "./breakpoints.js";
3
- import { colors as l, FONT as t } from "./constants.js";
4
- const s = `
5
- ${l}
2
+ import { breakpoints as n } from "./breakpoints.js";
3
+ import { colors as h, FONT as t } from "./constants.js";
4
+ const l = `
5
+ ${h}
6
6
  --font-family: ${t.REGULAR};
7
7
  --font-regular: ${t.REGULAR};
8
8
  --font-color: ${t.COLOR};
@@ -11,6 +11,7 @@ const s = `
11
11
 
12
12
  --header-offset: 0px;
13
13
  --header-height: 68px;
14
+ --watch-live-header: 0px;
14
15
  --animation-duration: 0.5s;
15
16
  --animation-function: ease;
16
17
  --container-padding: 16px;
@@ -19,14 +20,15 @@ const s = `
19
20
  --max-width: 600px;
20
21
  --max-notifications-width: 400px;
21
22
 
22
- ${i.down("xl")`
23
+ ${n.down("xl")`
23
24
  --header-offset: 56px;
25
+ --watch-live-header: 46px;
24
26
  `}
25
27
 
26
- ${i.intermediate("xl", "lg")`
28
+ ${n.intermediate("xl", "lg")`
27
29
  --header-offset: 76px;
28
30
  `}
29
- `, m = "StreamLayerCSSReset", p = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
31
+ `, p = "StreamLayerCSSReset", m = "ttkj0ah", x = () => /* @__PURE__ */ e("table", {
30
32
  children: /* @__PURE__ */ r("table", {
31
33
  children: [/* @__PURE__ */ e("thead", {
32
34
  children: /* @__PURE__ */ r("tr", {
@@ -37,22 +39,22 @@ const s = `
37
39
  })]
38
40
  })
39
41
  }), /* @__PURE__ */ e("tbody", {
40
- children: s.split(";").map((o) => {
41
- const n = o.trim(), [a, d] = n.split(":");
42
+ children: l.split(";").map((a) => {
43
+ const i = a.trim(), [o, d] = i.split(":");
42
44
  return /* @__PURE__ */ r("tr", {
43
45
  children: [/* @__PURE__ */ e("td", {
44
- children: a
46
+ children: o
45
47
  }), /* @__PURE__ */ e("td", {
46
48
  children: d
47
49
  })]
48
- }, n);
50
+ }, i);
49
51
  })
50
52
  })]
51
53
  })
52
54
  });
53
55
  export {
54
56
  x as ThemeVariables,
55
- m as resetCss,
56
- p as theme,
57
- s as themeStr
57
+ p as resetCss,
58
+ m as theme,
59
+ l as themeStr
58
60
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.98.0",
3
+ "version": "0.98.1",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -44,16 +44,16 @@
44
44
  "react-virtualized-auto-sizer": "^1.0.21",
45
45
  "react-window": "^1.8.10",
46
46
  "react-window-infinite-loader": "^1.0.9",
47
- "@streamlayer/feature-gamification": "^0.39.1",
48
- "@streamlayer/sdk-web": "^0.33.1",
49
- "@streamlayer/sdk-web-anonymous-auth": "^0.11.43",
50
- "@streamlayer/sdk-web-analytics": "^0.1.1",
51
- "@streamlayer/sdk-web-api": "^0.24.1",
52
- "@streamlayer/sdk-web-core": "^0.22.1",
53
- "@streamlayer/sdk-web-features": "^0.11.25",
47
+ "@streamlayer/feature-gamification": "^0.40.0",
48
+ "@streamlayer/sdk-web": "^0.33.2",
49
+ "@streamlayer/sdk-web-analytics": "^0.1.2",
50
+ "@streamlayer/sdk-web-anonymous-auth": "^0.11.44",
51
+ "@streamlayer/sdk-web-api": "^0.24.2",
52
+ "@streamlayer/sdk-web-core": "^0.22.2",
53
+ "@streamlayer/sdk-web-features": "^0.11.26",
54
54
  "@streamlayer/sdk-web-interfaces": "^0.21.0",
55
55
  "@streamlayer/sdk-web-logger": "^0.5.18",
56
- "@streamlayer/sdk-web-notifications": "^0.15.0",
56
+ "@streamlayer/sdk-web-notifications": "^0.15.1",
57
57
  "@streamlayer/sdk-web-storage": "^0.4.5",
58
58
  "@streamlayer/sdk-web-types": "^0.23.0"
59
59
  },
@@ -96,6 +96,6 @@
96
96
  "vite-plugin-svgr": "^4.2.0",
97
97
  "vite-svg-loader": "^5.1.0",
98
98
  "vite-tsconfig-paths": "^4.3.1",
99
- "@streamlayer/react": "^0.41.2"
99
+ "@streamlayer/react": "^0.41.3"
100
100
  }
101
101
  }