@alxgrn/telefrag-ui 0.0.23 → 0.0.24

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 +1 @@
1
- .Panel{background-color:var(--alxgrn-bg-panel);border-radius:var(--alxgrn-unit-half);padding:var(--alxgrn-unit-double);margin:var(--alxgrn-unit) 0}.Panel:first-child{margin-top:0}.Panel:last-child{margin-bottom:0}.Panel p:first-child,.Panel .p:first-child{margin-top:0}.Panel p:last-child,.Panel .p:last-child{margin-bottom:0}@media (max-width: 512px){.Panel{padding:var(--alxgrn-unit)}}
1
+ .Panel{background-color:var(--alxgrn-bg-panel);border-radius:var(--alxgrn-unit-half);padding:var(--alxgrn-unit);margin:var(--alxgrn-unit) 0}.Panel:first-child{margin-top:0}.Panel:last-child{margin-bottom:0}.Panel p:first-child,.Panel .p:first-child{margin-top:0}.Panel p:last-child,.Panel .p:last-child{margin-bottom:0}
@@ -5,6 +5,7 @@ type Props = {
5
5
  subtitle?: string;
6
6
  logo?: string;
7
7
  back?: string;
8
+ admin?: boolean;
8
9
  square?: boolean;
9
10
  onLogoClick?: () => void;
10
11
  onBackClick?: () => void;
@@ -1,41 +1,42 @@
1
1
  import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
- import H from "../icons/Image.js";
3
- import k from "../icons/ShowSidebar.js";
2
+ import N from "../icons/Image.js";
3
+ import f from "../icons/ShowSidebar.js";
4
4
  import "react";
5
- import N from "../icons/Trash.js";
5
+ import p from "../icons/Trash.js";
6
6
  import '../../assets/PageHeader.css';/* empty css */
7
- const j = ({
8
- menu: d,
9
- title: p,
10
- subtitle: u,
11
- logo: l,
12
- back: s,
13
- square: c,
14
- onLogoClick: o,
15
- onLogoCreate: n,
16
- onLogoRemove: m,
17
- onBackClick: g,
18
- onBackCreate: t,
19
- onBackRemove: v,
20
- onShowSidebar: P
7
+ const y = ({
8
+ menu: l,
9
+ title: u,
10
+ subtitle: k,
11
+ logo: s,
12
+ back: c,
13
+ admin: d,
14
+ square: o,
15
+ onLogoClick: n,
16
+ onLogoCreate: m,
17
+ onLogoRemove: g,
18
+ onBackClick: t,
19
+ onBackCreate: v,
20
+ onBackRemove: P,
21
+ onShowSidebar: h
21
22
  }) => {
22
- const r = (e, h) => {
23
- e.stopPropagation(), h && h();
23
+ const r = (e, H) => {
24
+ e.stopPropagation(), H && H();
24
25
  };
25
26
  return /* @__PURE__ */ i("div", { className: "PageHeader", children: [
26
27
  /* @__PURE__ */ i(
27
28
  "div",
28
29
  {
29
30
  className: "PageHeaderBack",
30
- onClick: (e) => r(e, g),
31
+ onClick: (e) => r(e, t),
31
32
  style: {
32
- cursor: g ? "pointer" : void 0,
33
- backgroundImage: s ? `url(${s})` : void 0
33
+ cursor: t ? "pointer" : void 0,
34
+ backgroundImage: c ? `url(${c})` : void 0
34
35
  },
35
36
  children: [
36
- t && /* @__PURE__ */ a("div", { className: "PageHeaderBackCreate", onClick: (e) => r(e, t), children: /* @__PURE__ */ a(H, {}) }),
37
- v && /* @__PURE__ */ a("div", { className: "PageHeaderBackRemove", onClick: (e) => r(e, v), children: /* @__PURE__ */ a(N, {}) }),
38
- P && /* @__PURE__ */ a("div", { className: "PageHeaderShowSidebar", onClick: (e) => r(e, P), children: /* @__PURE__ */ a(k, {}) })
37
+ d && v && /* @__PURE__ */ a("div", { className: "PageHeaderBackCreate", onClick: (e) => r(e, v), children: /* @__PURE__ */ a(N, {}) }),
38
+ d && P && /* @__PURE__ */ a("div", { className: "PageHeaderBackRemove", onClick: (e) => r(e, P), children: /* @__PURE__ */ a(p, {}) }),
39
+ h && /* @__PURE__ */ a("div", { className: "PageHeaderShowSidebar", onClick: (e) => r(e, h), children: /* @__PURE__ */ a(f, {}) })
39
40
  ]
40
41
  }
41
42
  ),
@@ -43,27 +44,27 @@ const j = ({
43
44
  /* @__PURE__ */ i(
44
45
  "div",
45
46
  {
46
- className: c ? "PageHeaderLogo Square" : "PageHeaderLogo",
47
- onClick: (e) => r(e, o),
47
+ className: o ? "PageHeaderLogo Square" : "PageHeaderLogo",
48
+ onClick: (e) => r(e, n),
48
49
  style: {
49
- cursor: o ? "pointer" : void 0,
50
- backgroundImage: l ? `url(${l})` : void 0,
51
- borderRadius: c ? void 0 : "50%"
50
+ cursor: n ? "pointer" : void 0,
51
+ backgroundImage: s ? `url(${s})` : void 0,
52
+ borderRadius: o ? void 0 : "50%"
52
53
  },
53
54
  children: [
54
- n && /* @__PURE__ */ a("div", { className: "PageHeaderLogoCreate", onClick: (e) => r(e, n), children: /* @__PURE__ */ a(H, {}) }),
55
- m && /* @__PURE__ */ a("div", { className: "PageHeaderLogoRemove", onClick: (e) => r(e, m), children: /* @__PURE__ */ a(N, {}) })
55
+ d && m && /* @__PURE__ */ a("div", { className: "PageHeaderLogoCreate", onClick: (e) => r(e, m), children: /* @__PURE__ */ a(N, {}) }),
56
+ d && g && /* @__PURE__ */ a("div", { className: "PageHeaderLogoRemove", onClick: (e) => r(e, g), children: /* @__PURE__ */ a(p, {}) })
56
57
  ]
57
58
  }
58
59
  ),
59
60
  /* @__PURE__ */ i("div", { className: "PageHeaderInfo", children: [
60
- /* @__PURE__ */ a("div", { className: "PageHeaderTitle one-line", children: p }),
61
- /* @__PURE__ */ a("div", { className: "PageHeaderSubtitle one-line", children: u })
61
+ /* @__PURE__ */ a("div", { className: "PageHeaderTitle one-line", children: u }),
62
+ /* @__PURE__ */ a("div", { className: "PageHeaderSubtitle one-line", children: k })
62
63
  ] }),
63
- d && /* @__PURE__ */ a("div", { className: "PageHeaderMenu", children: d })
64
+ l && /* @__PURE__ */ a("div", { className: "PageHeaderMenu", children: l })
64
65
  ] })
65
66
  ] });
66
67
  };
67
68
  export {
68
- j as default
69
+ y as default
69
70
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alxgrn/telefrag-ui",
3
3
  "description": "UI library for The Daily Telefrag project",
4
- "version": "0.0.23",
4
+ "version": "0.0.24",
5
5
  "private": false,
6
6
  "author": "Alexander Fedorov <alex@molner.ru>",
7
7
  "license": "Apache-2.0",