@streamlayer/react-ui 0.29.1 → 0.30.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.
@@ -0,0 +1,50 @@
1
+ import { jsx as s, jsxs as m } from "react/jsx-runtime";
2
+ import { useEffect as g } from "react";
3
+ const f = ["SL-FONT1", "SL-FONT2"], w = () => {
4
+ const p = (t) => {
5
+ var r;
6
+ const e = t.target.name, o = (r = t.target.files) == null ? void 0 : r[0];
7
+ if (!o)
8
+ return;
9
+ const a = new FileReader();
10
+ a.onloadend = (d) => {
11
+ var i, l;
12
+ const n = (l = (i = d.target) == null ? void 0 : i.result) == null ? void 0 : l.toString();
13
+ if (n) {
14
+ const c = window.document.styleSheets[0];
15
+ c.insertRule(
16
+ `
17
+ @font-face {
18
+ font-family: '${e}';
19
+ src: url(data:application/octet-stream;base64,${n});
20
+ }
21
+ `,
22
+ c.cssRules.length
23
+ ), window.localStorage.setItem(e, n);
24
+ }
25
+ }, a.readAsText(o);
26
+ };
27
+ return g(() => {
28
+ const t = window.document.styleSheets[0];
29
+ for (const e of f) {
30
+ const o = window.localStorage.getItem(e);
31
+ o && t.insertRule(
32
+ `
33
+ @font-face {
34
+ font-family: '${e}';
35
+ src: url(data:application/octet-stream;base64,${o});
36
+ }
37
+ `,
38
+ t.cssRules.length
39
+ );
40
+ }
41
+ }, []), /* @__PURE__ */ s("div", { children: f.map((t) => /* @__PURE__ */ m("p", { style: { fontSize: "32px", fontFamily: t, lineHeight: "45px" }, children: [
42
+ "[",
43
+ t,
44
+ "] Typography - Desktop/Mobile/App",
45
+ !window.localStorage.getItem(t) && /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("input", { type: "file", name: t, accept: ".txt", onChange: p }) })
46
+ ] })) });
47
+ };
48
+ export {
49
+ w as Typography
50
+ };
@@ -50,8 +50,8 @@ const N = {
50
50
  NEUTRALS_GRAY9: "#25282A",
51
51
  NEUTRALS_BLACK: "#000000"
52
52
  }, E = Object.assign({}, N, T), S = {
53
- REGULAR: "'Benton Sans', BentonSans, Arial, Helvetica, sans-serif",
54
- SERIF: "'Tiempos', 'Tiempos Text', Times New Roman, serif",
53
+ REGULAR: "'Benton Sans', BentonSans, SL-FONT1, Arial, Helvetica, sans-serif",
54
+ SERIF: "'Tiempos', 'Tiempos Text', SL-FONT2, Times New Roman, serif",
55
55
  COLOR: "#fff"
56
56
  }, O = Object.keys(E).reduce((_, R) => {
57
57
  const A = E[R];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamlayer/react-ui",
3
- "version": "0.29.1",
3
+ "version": "0.30.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./lib/index.d.ts",
@@ -22,16 +22,16 @@
22
22
  ],
23
23
  "peerDependencies": {
24
24
  "@streamlayer/sl-eslib": "^5.45.1",
25
- "@streamlayer/feature-gamification": "^0.17.1",
26
- "@streamlayer/sdk-web": "^0.27.2",
27
- "@streamlayer/sdk-web-anonymous-auth": "^0.10.7",
28
- "@streamlayer/sdk-web-api": "^0.0.3",
29
- "@streamlayer/sdk-web-core": "^0.13.1",
30
- "@streamlayer/sdk-web-features": "^0.10.1",
31
- "@streamlayer/sdk-web-interfaces": "^0.18.1",
32
- "@streamlayer/sdk-web-notifications": "^0.10.0",
33
- "@streamlayer/sdk-web-storage": "^0.3.3",
34
- "@streamlayer/sdk-web-types": "^0.16.1"
25
+ "@streamlayer/feature-gamification": "^0.17.2",
26
+ "@streamlayer/sdk-web": "^0.27.3",
27
+ "@streamlayer/sdk-web-anonymous-auth": "^0.10.8",
28
+ "@streamlayer/sdk-web-api": "^0.0.4",
29
+ "@streamlayer/sdk-web-core": "^0.13.2",
30
+ "@streamlayer/sdk-web-features": "^0.10.2",
31
+ "@streamlayer/sdk-web-interfaces": "^0.18.2",
32
+ "@streamlayer/sdk-web-notifications": "^0.10.1",
33
+ "@streamlayer/sdk-web-storage": "^0.3.4",
34
+ "@streamlayer/sdk-web-types": "^0.16.2"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@connectrpc/connect": "^1.1.3",
@@ -1,15 +0,0 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { styled as e } from "@linaria/react";
3
- const n = e.p`
4
- font-family: var(--font-serif);
5
- font-size: 32px;
6
- `, i = e.p`
7
- font-family: var(--font-regular);
8
- font-size: 32px;
9
- `, s = () => /* @__PURE__ */ o("div", { children: [
10
- /* @__PURE__ */ r(i, { children: "Regular (Benton Sans Serif)" }),
11
- /* @__PURE__ */ r(n, { children: "Serif (Tiempos)" })
12
- ] });
13
- export {
14
- s as ThemeTypography
15
- };