@ukpc-lib/react 0.2.9 → 0.2.12

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 (33) hide show
  1. package/dist/Colors-4ad88021.js +29 -0
  2. package/dist/Colors-51ce6654.cjs +1 -0
  3. package/dist/components/Notification/NotificationList/components/CustomOpenListContext.d.ts +3 -0
  4. package/dist/components/Notification/NotificationList/components/query.d.ts +2 -0
  5. package/dist/components/Notification/models/NotiticationDto.d.ts +6 -0
  6. package/dist/components/Topbar/icons/country-flags/GermanyIcon.d.ts +4 -0
  7. package/dist/components/Topbar/icons/country-flags/UnitedKingdomIcon.d.ts +4 -0
  8. package/dist/components/index.cjs +26 -26
  9. package/dist/components/index.js +2748 -2527
  10. package/dist/index.css +1 -1
  11. package/dist/index.module-91685508.js +24670 -0
  12. package/dist/index.module-dcaddd18.cjs +1086 -0
  13. package/dist/share/TranslationProvider/index.d.ts +11 -0
  14. package/dist/share/index.cjs +1 -1
  15. package/dist/share/index.d.ts +1 -0
  16. package/dist/share/index.js +44 -42
  17. package/dist/theme/index.cjs +1 -0
  18. package/dist/theme/index.js +577 -0
  19. package/package.json +12 -2
  20. package/web-components-bundle/global-menu/index.cjs +2 -2
  21. package/web-components-bundle/global-menu/index.js +2 -2
  22. package/web-components-bundle/global-topbar/index.cjs +1 -1
  23. package/web-components-bundle/global-topbar/index.js +2 -2
  24. package/web-components-bundle/has-permission/index.cjs +1 -1
  25. package/web-components-bundle/has-permission/index.js +2 -2
  26. package/web-components-bundle/index-0c76b789.cjs +884 -0
  27. package/web-components-bundle/{index-75324537.js → index-200424a6.js} +18 -28
  28. package/web-components-bundle/{index-374bf205.cjs → index-661a7bdb.cjs} +1 -1
  29. package/web-components-bundle/index-fb164b1a.js +19854 -0
  30. package/dist/index.module-7d653d97.js +0 -22703
  31. package/dist/index.module-ff8a71df.cjs +0 -1086
  32. package/web-components-bundle/index-11fd22c1.cjs +0 -884
  33. package/web-components-bundle/index-51fef28a.js +0 -17668
@@ -0,0 +1,577 @@
1
+ import { c as b } from "../Colors-4ad88021.js";
2
+ import { jsx as y } from "react/jsx-runtime";
3
+ import { createTheme as x, ThemeProvider as v } from "@mui/material";
4
+ import a from "react";
5
+ var c = {
6
+ color: void 0,
7
+ size: void 0,
8
+ className: void 0,
9
+ style: void 0,
10
+ attr: void 0
11
+ }, g = a.createContext && /* @__PURE__ */ a.createContext(c), O = ["attr", "size", "title"];
12
+ function M(e, r) {
13
+ if (e == null)
14
+ return {};
15
+ var t = P(e, r), i, o;
16
+ if (Object.getOwnPropertySymbols) {
17
+ var n = Object.getOwnPropertySymbols(e);
18
+ for (o = 0; o < n.length; o++)
19
+ i = n[o], !(r.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (t[i] = e[i]);
20
+ }
21
+ return t;
22
+ }
23
+ function P(e, r) {
24
+ if (e == null)
25
+ return {};
26
+ var t = {}, i = Object.keys(e), o, n;
27
+ for (n = 0; n < i.length; n++)
28
+ o = i[n], !(r.indexOf(o) >= 0) && (t[o] = e[o]);
29
+ return t;
30
+ }
31
+ function u() {
32
+ return u = Object.assign ? Object.assign.bind() : function(e) {
33
+ for (var r = 1; r < arguments.length; r++) {
34
+ var t = arguments[r];
35
+ for (var i in t)
36
+ Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
37
+ }
38
+ return e;
39
+ }, u.apply(this, arguments);
40
+ }
41
+ function s(e, r) {
42
+ var t = Object.keys(e);
43
+ if (Object.getOwnPropertySymbols) {
44
+ var i = Object.getOwnPropertySymbols(e);
45
+ r && (i = i.filter(function(o) {
46
+ return Object.getOwnPropertyDescriptor(e, o).enumerable;
47
+ })), t.push.apply(t, i);
48
+ }
49
+ return t;
50
+ }
51
+ function p(e) {
52
+ for (var r = 1; r < arguments.length; r++) {
53
+ var t = arguments[r] != null ? arguments[r] : {};
54
+ r % 2 ? s(Object(t), !0).forEach(function(i) {
55
+ C(e, i, t[i]);
56
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : s(Object(t)).forEach(function(i) {
57
+ Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
58
+ });
59
+ }
60
+ return e;
61
+ }
62
+ function C(e, r, t) {
63
+ return r = w(r), r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
64
+ }
65
+ function w(e) {
66
+ var r = S(e, "string");
67
+ return typeof r == "symbol" ? r : String(r);
68
+ }
69
+ function S(e, r) {
70
+ if (typeof e != "object" || e === null)
71
+ return e;
72
+ var t = e[Symbol.toPrimitive];
73
+ if (t !== void 0) {
74
+ var i = t.call(e, r || "default");
75
+ if (typeof i != "object")
76
+ return i;
77
+ throw new TypeError("@@toPrimitive must return a primitive value.");
78
+ }
79
+ return (r === "string" ? String : Number)(e);
80
+ }
81
+ function m(e) {
82
+ return e && e.map((r, t) => /* @__PURE__ */ a.createElement(r.tag, p({
83
+ key: t
84
+ }, r.attr), m(r.child)));
85
+ }
86
+ function f(e) {
87
+ return (r) => /* @__PURE__ */ a.createElement(k, u({
88
+ attr: p({}, e.attr)
89
+ }, r), m(e.child));
90
+ }
91
+ function k(e) {
92
+ var r = (t) => {
93
+ var {
94
+ attr: i,
95
+ size: o,
96
+ title: n
97
+ } = e, h = M(e, O), l = o || t.size || "1em", d;
98
+ return t.className && (d = t.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ a.createElement("svg", u({
99
+ stroke: "currentColor",
100
+ fill: "currentColor",
101
+ strokeWidth: "0"
102
+ }, t.attr, i, h, {
103
+ className: d,
104
+ style: p(p({
105
+ color: e.color || t.color
106
+ }, t.style), e.style),
107
+ height: l,
108
+ width: l,
109
+ xmlns: "http://www.w3.org/2000/svg"
110
+ }), n && /* @__PURE__ */ a.createElement("title", null, n), e.children);
111
+ };
112
+ return g !== void 0 ? /* @__PURE__ */ a.createElement(g.Consumer, null, (t) => r(t)) : r(c);
113
+ }
114
+ function z(e) {
115
+ return f({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" }, child: [] }] })(e);
116
+ }
117
+ function j(e) {
118
+ return f({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" }, child: [] }] })(e);
119
+ }
120
+ const T = ({ colors: e = b }) => x({
121
+ palette: {
122
+ primary: {
123
+ main: e.primary300
124
+ },
125
+ secondary: {
126
+ main: e.secondary
127
+ },
128
+ warning: {
129
+ main: e.warning
130
+ },
131
+ error: {
132
+ main: e.danger
133
+ }
134
+ },
135
+ typography: {
136
+ fontFamily: "TT Firs Neue Trl",
137
+ button: {
138
+ textTransform: "none",
139
+ // padding: '0.75rem 1rem',
140
+ fontSize: "0.875rem",
141
+ // lineHeight: '1rem',
142
+ // height: 'fit-content',
143
+ // // fontFamily: '',
144
+ // borderRadius: 5,
145
+ fontWeight: 400,
146
+ boxShadow: "none"
147
+ },
148
+ body1: {
149
+ fontSize: "0.875rem",
150
+ fontWeight: 400
151
+ },
152
+ body2: {
153
+ fontSize: "0.75rem"
154
+ },
155
+ h6: {
156
+ fontSize: "0.875rem",
157
+ fontWeight: 500
158
+ },
159
+ h5: {
160
+ fontSize: "1rem",
161
+ fontWeight: 500
162
+ },
163
+ h4: {
164
+ fontSize: "1.25rem",
165
+ fontWeight: 500
166
+ },
167
+ h3: {
168
+ fontSize: "1.5rem",
169
+ fontWeight: 500
170
+ },
171
+ h2: {
172
+ fontSize: "2rem",
173
+ fontWeight: 500
174
+ },
175
+ h1: {
176
+ fontSize: "2.5rem",
177
+ fontWeight: 500
178
+ },
179
+ subtitle1: {
180
+ fontSize: "0.75rem"
181
+ },
182
+ subtitle2: {
183
+ fontSize: "0.625rem"
184
+ }
185
+ },
186
+ components: {
187
+ MuiIconButton: {
188
+ styleOverrides: {
189
+ root: {},
190
+ sizeSmall: {}
191
+ }
192
+ },
193
+ MuiButton: {
194
+ styleOverrides: {
195
+ root: {
196
+ boxShadow: "none !important",
197
+ padding: "8px 32px",
198
+ borderWidth: 1,
199
+ borderRadius: 3,
200
+ fontWeight: 400
201
+ }
202
+ },
203
+ variants: [
204
+ {
205
+ props: { variant: "primary" },
206
+ style: {
207
+ backgroundColor: e.primary300,
208
+ color: e.buttonText,
209
+ "&:hover": {
210
+ backgroundColor: e.primary500,
211
+ color: e.white
212
+ },
213
+ "&.Mui-disabled": {
214
+ backgroundColor: e.grey200
215
+ }
216
+ }
217
+ },
218
+ {
219
+ props: { variant: "confirm" },
220
+ style: {
221
+ backgroundColor: e.danger,
222
+ color: e.white,
223
+ "&:hover": {
224
+ backgroundColor: e.dangerDark
225
+ },
226
+ "&.Mui-disabled": {
227
+ backgroundColor: e.grey200
228
+ }
229
+ }
230
+ },
231
+ {
232
+ props: { variant: "cancel" },
233
+ style: {
234
+ backgroundColor: e.grey300,
235
+ color: e.textPrimary,
236
+ "&:hover": {
237
+ backgroundColor: e.grey400
238
+ }
239
+ }
240
+ },
241
+ {
242
+ props: { variant: "outlined" },
243
+ style: {
244
+ color: e.primary500,
245
+ border: "1px solid",
246
+ borderColor: e.primary400,
247
+ "&:hover": {
248
+ backgroundColor: "inherit"
249
+ }
250
+ }
251
+ },
252
+ {
253
+ props: { variant: "outlinedPrimary" },
254
+ style: {
255
+ color: e.primary500,
256
+ border: "1px solid",
257
+ borderColor: e.primary400,
258
+ "&:hover": {
259
+ backgroundColor: "inherit"
260
+ }
261
+ }
262
+ },
263
+ {
264
+ props: { variant: "outLinedDanger" },
265
+ style: {
266
+ color: e.danger,
267
+ border: "1px solid",
268
+ borderColor: e.danger,
269
+ "&:hover": {
270
+ backgroundColor: "inherit"
271
+ }
272
+ }
273
+ }
274
+ ]
275
+ },
276
+ MuiAppBar: {
277
+ styleOverrides: {
278
+ root: {
279
+ backgroundColor: e.appBarBgColor,
280
+ color: e.appBarColor
281
+ }
282
+ }
283
+ },
284
+ MuiSelect: {
285
+ defaultProps: {
286
+ MenuProps: {
287
+ PaperProps: {
288
+ sx: {
289
+ boxShadow: "none",
290
+ border: 1,
291
+ borderStyle: "solid",
292
+ borderColor: e.grey300,
293
+ mt: "5px"
294
+ }
295
+ },
296
+ MenuListProps: {
297
+ sx: {
298
+ padding: "5px",
299
+ "& .MuiMenuItem-root": {
300
+ fontWeight: 400,
301
+ minHeight: 0,
302
+ borderRadius: "5px",
303
+ "&:hover": {
304
+ backgroundColor: e.grey100
305
+ },
306
+ "&.Mui-selected": {
307
+ // fontWeight: 500,
308
+ // color: color.darkPrimary,
309
+ backgroundColor: e.primary200
310
+ }
311
+ // [breakpoints.down('sm')]: {
312
+ // padding:0
313
+ // },
314
+ }
315
+ }
316
+ }
317
+ }
318
+ },
319
+ styleOverrides: {
320
+ select: {
321
+ padding: "9.94px 5px 9.94px 15px"
322
+ }
323
+ }
324
+ },
325
+ MuiPaginationItem: {
326
+ defaultProps: {
327
+ components: {
328
+ previous: z,
329
+ next: j
330
+ }
331
+ },
332
+ styleOverrides: {
333
+ root: {
334
+ "& svg": {
335
+ width: "10px"
336
+ },
337
+ border: "none",
338
+ fontSize: "14px",
339
+ lineHeight: "1.5rem",
340
+ borderRadius: "7px",
341
+ "&.Mui-selected": {
342
+ backgroundColor: e.primary200
343
+ },
344
+ "&.MuiPaginationItem-previousNext": {
345
+ backgroundColor: e.grey200
346
+ }
347
+ }
348
+ }
349
+ },
350
+ MuiChip: {
351
+ styleOverrides: {
352
+ root: {
353
+ borderRadius: "5px",
354
+ fontSize: "10px",
355
+ lineHeight: "12px",
356
+ fontWeight: 400,
357
+ "& .MuiChip-label": {
358
+ lineHeight: "normal"
359
+ }
360
+ },
361
+ avatar: {
362
+ width: "10px"
363
+ },
364
+ colorSuccess: {
365
+ color: e.success,
366
+ backgroundColor: e.successLight
367
+ },
368
+ colorWarning: {
369
+ color: e.warning,
370
+ backgroundColor: e.warningLight
371
+ },
372
+ colorError: {
373
+ color: e.danger,
374
+ backgroundColor: e.dangerLight
375
+ },
376
+ colorSecondary: {
377
+ color: e.linkPrimary,
378
+ backgroundColor: e.linkLight
379
+ }
380
+ }
381
+ },
382
+ MuiTab: {
383
+ styleOverrides: {
384
+ root: {
385
+ background: e.grey200,
386
+ borderTopLeftRadius: "8px",
387
+ borderTopRightRadius: "8px",
388
+ marginRight: "5px",
389
+ minWidth: "200px",
390
+ flexDirection: "row",
391
+ alignContent: "center",
392
+ gap: "8px",
393
+ textTransform: "capitalize",
394
+ "& svg": {
395
+ mb: "0 !important"
396
+ },
397
+ padding: 0,
398
+ height: "32px",
399
+ minHeight: "auto",
400
+ fontSize: "12px",
401
+ "& .chart-icon": {
402
+ fill: e.grey600
403
+ },
404
+ "& .detail-icon": {
405
+ stroke: e.grey600
406
+ }
407
+ }
408
+ }
409
+ },
410
+ MuiDrawer: {
411
+ defaultProps: {},
412
+ styleOverrides: {
413
+ root: {
414
+ "&.MuiDrawer-paper": {
415
+ overflowY: "unset"
416
+ },
417
+ "& .MuiDrawer-paper": {
418
+ zIndex: 9
419
+ },
420
+ "&.MuiPaper-root": {
421
+ border: "none",
422
+ background: e.grey100,
423
+ pt: 12,
424
+ zIndex: 9
425
+ }
426
+ }
427
+ }
428
+ },
429
+ MuiTextField: {
430
+ defaultProps: {
431
+ InputProps: {
432
+ sx: {
433
+ "& .Mui-disabled": {
434
+ background: e.grey200
435
+ }
436
+ }
437
+ },
438
+ InputLabelProps: {
439
+ shrink: !0
440
+ }
441
+ },
442
+ styleOverrides: {
443
+ root: {
444
+ backgroundColor: e.white,
445
+ "& .MuiOutlinedInput-input": {
446
+ padding: "0px 16px 0px 12px",
447
+ fontWeight: 400,
448
+ height: 40,
449
+ fontSize: "14px",
450
+ border: 1,
451
+ borderRadius: 4,
452
+ "&::placeholder": {
453
+ color: e.grey600
454
+ }
455
+ },
456
+ "& .MuiFormLabel-root": {
457
+ color: e.textPrimary
458
+ },
459
+ "& .MuiFormLabel-asterisk": {
460
+ color: e.danger
461
+ }
462
+ }
463
+ }
464
+ },
465
+ MuiFormGroup: {
466
+ styleOverrides: {
467
+ root: {
468
+ // position: 'relative',
469
+ }
470
+ }
471
+ },
472
+ MuiFormHelperText: {
473
+ defaultProps: {
474
+ sx: {
475
+ fontSize: 12
476
+ }
477
+ },
478
+ styleOverrides: {}
479
+ },
480
+ MuiAutocomplete: {
481
+ defaultProps: {
482
+ sx: {
483
+ "& .MuiPaper-root": {
484
+ padding: "5px"
485
+ }
486
+ }
487
+ },
488
+ styleOverrides: {
489
+ root: {
490
+ "& .MuiSvgIcon-root": {
491
+ width: "20px",
492
+ height: "20px"
493
+ },
494
+ "& .MuiAutocomplete-tag": {
495
+ margin: 0
496
+ },
497
+ "& .MuiButtonBase-root": {
498
+ marginRight: "2px !important",
499
+ height: "max-content",
500
+ padding: "2px"
501
+ },
502
+ "& .MuiOutlinedInput-root": {
503
+ padding: "7.45px 55px 7.45px 10px !important"
504
+ },
505
+ "& svg": {},
506
+ "& #checkboxes-tags-demo": {
507
+ padding: "6px 4px"
508
+ },
509
+ "& .MuiAutocomplete-endAdornment": {
510
+ top: "calc(50% - 12px)"
511
+ }
512
+ }
513
+ }
514
+ },
515
+ MuiTableHead: {
516
+ styleOverrides: {
517
+ root: {
518
+ "& th": {
519
+ fontSize: "14px",
520
+ padding: "8px 16px"
521
+ }
522
+ }
523
+ }
524
+ },
525
+ MuiTableBody: {
526
+ styleOverrides: {
527
+ root: {
528
+ "& th,td": {
529
+ fontSize: "14px",
530
+ padding: "8px 16px",
531
+ height: "45px"
532
+ },
533
+ "& .MuiTableCell-root": {
534
+ borderBottom: `1px solid ${e.grey300}`
535
+ }
536
+ }
537
+ }
538
+ },
539
+ MuiRadio: {
540
+ defaultProps: {
541
+ sx: {
542
+ "&.MuiButtonBase-root": {
543
+ padding: "5px"
544
+ }
545
+ }
546
+ },
547
+ styleOverrides: {
548
+ root: {
549
+ "& .MuiSvgIcon-root": {
550
+ fontSize: 16
551
+ },
552
+ color: e.grey600,
553
+ "&.Mui-checked": {
554
+ color: e.success
555
+ },
556
+ "&.Mui-disabled": {
557
+ color: e.grey600
558
+ }
559
+ }
560
+ }
561
+ },
562
+ MuiTooltip: {
563
+ defaultProps: {
564
+ placement: "top",
565
+ arrow: !0
566
+ }
567
+ }
568
+ }
569
+ }), R = (e) => {
570
+ const r = T({});
571
+ return /* @__PURE__ */ y(v, { theme: r, children: e.children });
572
+ };
573
+ export {
574
+ R as SaasThemeProvider,
575
+ b as color,
576
+ T as createCustomTheme
577
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ukpc-lib/react",
3
3
  "private": false,
4
- "version": "0.2.9",
4
+ "version": "0.2.12",
5
5
  "type": "module",
6
6
  "main": "./dist/",
7
7
  "module": "./dist/",
@@ -15,6 +15,11 @@
15
15
  "import": "./dist/share/index.js",
16
16
  "require": "./dist/share/index.cjs",
17
17
  "types": "./dist/share/index.d.ts"
18
+ },
19
+ "./theme": {
20
+ "import": "./dist/theme/index.js",
21
+ "require": "./dist/theme/index.cjs",
22
+ "types": "./dist/theme/index.d.ts"
18
23
  }
19
24
  },
20
25
  "typesVersions": {
@@ -50,9 +55,13 @@
50
55
  "cssnano": "^6.0.3",
51
56
  "firebase": "^10.8.1",
52
57
  "framer-motion": "^10.18.0",
58
+ "i18n": "^0.15.1",
59
+ "i18next": "^23.10.1",
60
+ "i18next-browser-languagedetector": "^7.2.0",
53
61
  "jquery": "^3.7.1",
54
62
  "moment": "^2.30.1",
55
63
  "react-bootstrap-daterangepicker": "^8.0.0",
64
+ "react-i18next": "^14.1.0",
56
65
  "react-query": "^3.39.3",
57
66
  "react-router-dom": "^6.21.3",
58
67
  "react-shadow": "^20.4.0",
@@ -93,7 +102,8 @@
93
102
  "react-dom": "^18.2.0",
94
103
  "react-query": "^3.39.3",
95
104
  "react-router-dom": "^6.21.3",
96
- "tailwindcss": "^3.4.1"
105
+ "tailwindcss": "^3.4.1",
106
+ "react-icons": "^5.0.1"
97
107
  },
98
108
  "author": "Thinh Phung",
99
109
  "description": "![Screenshot 2024-01-22 at 11 40 08](https://github.com/UKParkingControl/LibShareJS/assets/153060345/99004010-67a2-436b-a5b7-317992137205)",