@ukpc-lib/react 0.2.8 → 0.2.11

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 (40) hide show
  1. package/dist/assets/icons/notification-icon.svg +7 -0
  2. package/dist/components/Notification/NotificationList/components/AllContent.d.ts +4 -0
  3. package/dist/components/Notification/NotificationList/components/CustomOpenListContext.d.ts +12 -0
  4. package/dist/components/Notification/NotificationList/components/NotitficationItem.d.ts +7 -0
  5. package/dist/components/Notification/NotificationList/components/query.d.ts +2 -0
  6. package/dist/components/Notification/NotificationList/index.d.ts +3 -0
  7. package/dist/components/Notification/Tabs/index.d.ts +13 -0
  8. package/dist/components/Notification/firebase/firebaseConfig.d.ts +3 -2
  9. package/dist/components/Notification/index.d.ts +8 -0
  10. package/dist/components/Notification/models/NotiticationDto.d.ts +49 -0
  11. package/dist/components/Topbar/icons/NotificationIcon.d.ts +3 -1
  12. package/dist/components/Topbar/icons/country-flags/GermanyIcon.d.ts +4 -0
  13. package/dist/components/Topbar/icons/country-flags/UnitedKingdomIcon.d.ts +4 -0
  14. package/dist/components/Topbar/index.d.ts +2 -1
  15. package/dist/components/index.cjs +28 -26
  16. package/dist/components/index.js +3959 -3436
  17. package/dist/index.css +1 -1
  18. package/dist/index.module-1924da8e.cjs +1086 -0
  19. package/dist/index.module-1e1600c5.js +24705 -0
  20. package/dist/share/TranslationProvider/index.d.ts +11 -0
  21. package/dist/share/index.cjs +1 -1
  22. package/dist/share/index.d.ts +1 -0
  23. package/dist/share/index.js +45 -43
  24. package/package.json +5 -1
  25. package/web-components-bundle/global-menu/index.cjs +2 -2
  26. package/web-components-bundle/global-menu/index.js +2 -3
  27. package/web-components-bundle/global-topbar/index.cjs +1 -2
  28. package/web-components-bundle/global-topbar/index.js +3 -234
  29. package/web-components-bundle/has-permission/index.cjs +1 -1046
  30. package/web-components-bundle/has-permission/index.js +4 -17739
  31. package/web-components-bundle/index-178bf236.cjs +884 -0
  32. package/web-components-bundle/index-1b59168e.js +19857 -0
  33. package/web-components-bundle/index-374bf205.cjs +106 -0
  34. package/web-components-bundle/index-75324537.js +17036 -0
  35. package/dist/index.module-331f7b11.js +0 -22724
  36. package/dist/index.module-4e0ade57.cjs +0 -1086
  37. package/web-components-bundle/index-5a2ec4da.cjs +0 -38
  38. package/web-components-bundle/index-8330a770.js +0 -7687
  39. package/web-components-bundle/react-to-web-component-287abfaf.cjs +0 -69
  40. package/web-components-bundle/react-to-web-component-8933be15.js +0 -9353
@@ -1,236 +1,5 @@
1
- import { j as e, s as u, r as a, S as j, L as k } from "../react-to-web-component-8933be15.js";
2
- function m({ primaryColor: r = "#009d4f" }) {
3
- return /* @__PURE__ */ e.jsxs(
4
- "svg",
5
- {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- width: "24",
8
- height: "25",
9
- viewBox: "0 0 24 25",
10
- fill: "none",
11
- children: [
12
- /* @__PURE__ */ e.jsx(
13
- "path",
14
- {
15
- d: "M8.5 19.5H8C4 19.5 2 18.5 2 13.5V8.5C2 4.5 4 2.5 8 2.5H16C20 2.5 22 4.5 22 8.5V13.5C22 17.5 20 19.5 16 19.5H15.5C15.19 19.5 14.89 19.65 14.7 19.9L13.2 21.9C12.54 22.78 11.46 22.78 10.8 21.9L9.3 19.9C9.14 19.68 8.77 19.5 8.5 19.5Z",
16
- stroke: r,
17
- "stroke-width": "1.5",
18
- "stroke-miterlimit": "10",
19
- "stroke-linecap": "round",
20
- "stroke-linejoin": "round"
21
- }
22
- ),
23
- /* @__PURE__ */ e.jsx(
24
- "path",
25
- {
26
- d: "M15.9965 11.5H16.0054",
27
- stroke: r,
28
- "stroke-width": "2",
29
- "stroke-linecap": "round",
30
- "stroke-linejoin": "round"
31
- }
32
- ),
33
- /* @__PURE__ */ e.jsx(
34
- "path",
35
- {
36
- d: "M11.9955 11.5H12.0045",
37
- stroke: r,
38
- "stroke-width": "2",
39
- "stroke-linecap": "round",
40
- "stroke-linejoin": "round"
41
- }
42
- ),
43
- /* @__PURE__ */ e.jsx(
44
- "path",
45
- {
46
- d: "M7.99451 11.5H8.00349",
47
- stroke: r,
48
- "stroke-width": "2",
49
- "stroke-linecap": "round",
50
- "stroke-linejoin": "round"
51
- }
52
- )
53
- ]
54
- }
55
- );
56
- }
57
- function b({
58
- primaryColor: r = "#009d4f"
59
- }) {
60
- return /* @__PURE__ */ e.jsxs(
61
- "svg",
62
- {
63
- width: "24",
64
- height: "25",
65
- viewBox: "0 0 24 25",
66
- fill: "none",
67
- xmlns: "http://www.w3.org/2000/svg",
68
- children: [
69
- /* @__PURE__ */ e.jsx(
70
- "path",
71
- {
72
- fillRule: "evenodd",
73
- clipRule: "evenodd",
74
- d: "M11.7968 17.4705C16.5901 17.4705 18.8076 16.8556 19.0218 14.3874C19.0218 11.921 17.4757 12.0796 17.4757 9.05334C17.4757 6.68952 15.2352 4 11.7968 4C8.35833 4 6.1178 6.68952 6.1178 9.05334C6.1178 12.0796 4.57178 11.921 4.57178 14.3874C4.78679 16.8649 7.00428 17.4705 11.7968 17.4705Z",
75
- stroke: r,
76
- strokeWidth: "1.5",
77
- strokeLinecap: "round",
78
- strokeLinejoin: "round"
79
- }
80
- ),
81
- /* @__PURE__ */ e.jsx(
82
- "path",
83
- {
84
- d: "M13.8274 20.0286C12.6679 21.3161 10.8591 21.3313 9.68848 20.0286",
85
- stroke: r,
86
- strokeWidth: "1.5",
87
- strokeLinecap: "round",
88
- strokeLinejoin: "round"
89
- }
90
- ),
91
- /* @__PURE__ */ e.jsx("circle", { cx: "16.928", cy: "7", r: "2", fill: "#E01B00", stroke: r })
92
- ]
93
- }
94
- );
95
- }
96
- const y = `.avatar-dropdown-item{padding:.5rem;font-size:.875rem;line-height:1.25rem;cursor:pointer;border-radius:.25rem}.avartarDropdownMenu{background-color:#fff;padding:.5rem;width:13rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);position:absolute;left:-10rem;top:3.2rem}.avartarDropdownMenu ul{list-style:none;padding-inline-start:0;margin-block-end:0}.navbar{position:fixed;display:flex;z-index:30;background:black;top:0;width:100%;padding-left:2.5rem;height:64px}.navbar-container{display:flex;flex-direction:row;align-items:center;width:100%;justify-content:space-between}.logo-container{padding:16px 0;height:100%}.right-side-container{display:flex;flex-direction:row;align-items:center;text-align:center;margin-right:2.5rem;gap:1rem}.userContainer{display:flex;align-items:center;gap:.5rem}.userFullName{color:#fff;font-weight:400;font-size:.875rem;line-height:1.25rem}.userAvatar{width:2.5rem;height:2.5rem;cursor:pointer;-o-object-fit:cover;object-fit:cover;border-radius:9999px;border:2px solid #FFFFFF}.userAvatarNull{width:2.5rem;height:2.5rem;background:#DDDDDD;border-radius:100%;color:#fff;font-size:20px;font-weight:400;display:flex;align-items:center;justify-content:center}.relative{position:relative}.cursor-pointer{cursor:pointer}
97
- `;
98
- function N({
99
- logo: r,
100
- user: t,
101
- baseUrl: c,
102
- style: o,
103
- classNames: s = "",
104
- customColors: n
105
- }) {
106
- const i = r || "/public/assets/icons/logo-header.png", l = {
107
- ...o,
108
- color: (n == null ? void 0 : n.color) || "black",
109
- backgroundColor: (n == null ? void 0 : n.bgColor) || "black"
110
- }, [p, d] = a.useState(!1), h = () => {
111
- window.location.href = `${c}/authentication/logout?callbackUrl=${window.location.href}`;
112
- };
113
- return /* @__PURE__ */ e.jsxs(j, { styles: [y], style: { zIndex: 1202 }, children: [
114
- /* @__PURE__ */ e.jsx(
115
- "nav",
116
- {
117
- className: `navbar ${s}`,
118
- style: n ? l : o,
119
- children: /* @__PURE__ */ e.jsxs("div", { className: "navbar-container", children: [
120
- /* @__PURE__ */ e.jsx("div", { className: "logo-container", children: /* @__PURE__ */ e.jsx("img", { src: i, alt: "logo-header" }) }),
121
- /* @__PURE__ */ e.jsxs("div", { className: "right-side-container", children: [
122
- /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer", children: /* @__PURE__ */ e.jsx(b, { primaryColor: n == null ? void 0 : n.primaryColor }) }),
123
- /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer", children: /* @__PURE__ */ e.jsx(m, { primaryColor: n == null ? void 0 : n.primaryColor }) }),
124
- /* @__PURE__ */ e.jsxs("div", { className: "userContainer", children: [
125
- /* @__PURE__ */ e.jsx(
126
- L,
127
- {
128
- primaryColor: n == null ? void 0 : n.primaryColor,
129
- avatarUrl: t == null ? void 0 : t.avatarUrl,
130
- userName: t == null ? void 0 : t.firstName,
131
- setShowConfirmModal: d
132
- }
133
- ),
134
- /* @__PURE__ */ e.jsx("p", { className: "userFullName", children: `${(t == null ? void 0 : t.firstName) || "Unknown"} ${(t == null ? void 0 : t.lastName) || "User"}` })
135
- ] })
136
- ] })
137
- ] })
138
- }
139
- ),
140
- /* @__PURE__ */ e.jsx(
141
- k,
142
- {
143
- isOpen: p,
144
- onClose: () => d(!1),
145
- onConfirm: h
146
- }
147
- )
148
- ] });
149
- }
150
- function L({
151
- avatarUrl: r,
152
- userName: t,
153
- setShowConfirmModal: c,
154
- primaryColor: o = "#009d4f"
155
- }) {
156
- const [s, n] = a.useState(!1), i = a.useRef(null), l = a.useRef(null), [p, d] = a.useState(!1), [h, f] = a.useState(!1), w = {
157
- backgroundColor: p ? o : "transparent"
158
- }, v = {
159
- backgroundColor: h ? o : "transparent"
160
- };
161
- return a.useEffect(() => {
162
- const x = (g) => {
163
- i.current && !i.current.contains(g.target) && n(!1), l.current && !l.current.contains(g.target) && n(!1);
164
- };
165
- return document.addEventListener("click", x, !0), () => {
166
- document.removeEventListener("click", x, !0);
167
- };
168
- }, [i]), /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { style: { position: "relative" }, children: [
169
- r ? /* @__PURE__ */ e.jsx(
170
- "img",
171
- {
172
- onClick: () => n(!s),
173
- ref: i,
174
- alt: "user avatar",
175
- className: "userAvatar",
176
- src: r
177
- }
178
- ) : /* @__PURE__ */ e.jsx(
179
- "div",
180
- {
181
- onClick: () => n(!s),
182
- ref: i,
183
- className: "userAvatarNull",
184
- children: (t == null ? void 0 : t.charAt(0)) ?? ""
185
- }
186
- ),
187
- /* @__PURE__ */ e.jsx(
188
- "div",
189
- {
190
- style: { display: s ? "block" : "none" },
191
- className: "avartarDropdownMenu",
192
- ref: l,
193
- children: /* @__PURE__ */ e.jsxs("ul", { children: [
194
- /* @__PURE__ */ e.jsx(
195
- "li",
196
- {
197
- onMouseEnter: () => f(!0),
198
- onMouseLeave: () => f(!1),
199
- style: v,
200
- className: "avatar-dropdown-item",
201
- children: "Profile"
202
- }
203
- ),
204
- /* @__PURE__ */ e.jsx(
205
- "li",
206
- {
207
- onMouseEnter: () => d(!0),
208
- onMouseLeave: () => d(!1),
209
- style: w,
210
- onClick: () => c(!0),
211
- className: "avatar-dropdown-item",
212
- children: "Logout"
213
- }
214
- )
215
- ] })
216
- }
217
- )
218
- ] }) });
219
- }
220
- {
221
- const r = u(N, {
222
- props: {
223
- logo: "string",
224
- user: "json",
225
- baseUrl: "string",
226
- classNames: "string",
227
- style: "json",
228
- customColors: "json"
229
- },
230
- shadow: "open"
231
- });
232
- customElements.define("global-topbar", r);
233
- }
1
+ import "../index-75324537.js";
2
+ import { T as a } from "../index-1b59168e.js";
234
3
  export {
235
- N as TopBar
4
+ a as TopBar
236
5
  };