@ukpc-lib/react 0.3.3 → 0.3.5

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 (30) hide show
  1. package/dist/components/GlobalMenu/components/MenuItem.d.ts +1 -1
  2. package/dist/components/index.cjs +23 -23
  3. package/dist/components/index.js +39 -40
  4. package/dist/{index.module-fcfb53fb.js → index.module-9e206368.js} +10282 -10160
  5. package/dist/index.module-ad52e7aa.cjs +1092 -0
  6. package/dist/share/index.cjs +1 -1
  7. package/dist/share/index.d.ts +1 -1
  8. package/dist/share/index.js +19 -17
  9. package/dist/theme/SaasThemeProvider.d.ts +25 -1
  10. package/dist/theme/Theme.d.ts +1 -1
  11. package/dist/theme/index.d.ts +1 -1
  12. package/package.json +1 -1
  13. package/web-components-bundle/global-menu/index.cjs +1 -1
  14. package/web-components-bundle/global-menu/index.js +1 -1
  15. package/web-components-bundle/global-topbar/index.cjs +1 -1
  16. package/web-components-bundle/global-topbar/index.js +2 -2
  17. package/web-components-bundle/has-permission/index.cjs +1 -1
  18. package/web-components-bundle/has-permission/index.js +2 -2
  19. package/web-components-bundle/{index-ff7fd2be.cjs → index-12495706.cjs} +1 -1
  20. package/web-components-bundle/{index-8081b070.js → index-21a54132.js} +1 -1
  21. package/web-components-bundle/{index-c311c558.cjs → index-25f216cc.cjs} +16 -16
  22. package/web-components-bundle/{index-feebf9bf.js → index-c5021c14.js} +856 -882
  23. package/dist/index-5bc96a1f.js +0 -147
  24. package/dist/index-b3ac4c73.cjs +0 -1
  25. package/dist/index.module-be2c9027.cjs +0 -1092
  26. package/dist/share/BrandThemeProvider/Colors.d.ts +0 -33
  27. package/dist/share/BrandThemeProvider/Theme.d.ts +0 -21
  28. package/dist/share/BrandThemeProvider/index.d.ts +0 -15
  29. package/dist/theme/index.cjs +0 -1
  30. package/dist/theme/index.js +0 -461
@@ -1,33 +0,0 @@
1
- export type ColorsType = {
2
- primary100?: string;
3
- primary200?: string;
4
- primary300?: string;
5
- primary400?: string;
6
- primary500?: string;
7
- secondary?: string;
8
- secondaryDark?: string;
9
- textPrimary?: string;
10
- white?: string;
11
- grey100?: string;
12
- grey200?: string;
13
- grey300?: string;
14
- grey400?: string;
15
- grey500?: string;
16
- grey600?: string;
17
- success?: string;
18
- successLight?: string;
19
- warning?: string;
20
- warningLight?: string;
21
- danger?: string;
22
- dangerLight?: string;
23
- dangerDark?: string;
24
- linkPrimary?: string;
25
- linkLight?: string;
26
- appBarColor?: string;
27
- appBarBgColor?: string;
28
- headerTextColor?: string;
29
- headerBgColor?: string;
30
- buttonText?: string;
31
- buttonHover?: string;
32
- };
33
- export declare const color: ColorsType;
@@ -1,21 +0,0 @@
1
- import { ColorsType } from './Colors';
2
- declare module '@mui/material/Button' {
3
- interface ButtonPropsVariantOverrides {
4
- errorContained: true;
5
- orangeContained: true;
6
- errorOutlined: true;
7
- cancelSmall: true;
8
- outlinedGreen: true;
9
- cancelOutlined: true;
10
- primary: true;
11
- confirm: true;
12
- cancel: true;
13
- outlinedPrimary: true;
14
- outLinedDanger: true;
15
- }
16
- }
17
- type ThemeProps = {
18
- colors?: ColorsType;
19
- };
20
- export declare const createCustomTheme: (props: ThemeProps) => import("@mui/material").Theme;
21
- export {};
@@ -1,15 +0,0 @@
1
- import { Theme } from '@mui/material';
2
- import { PropsWithChildren } from 'react';
3
- import { ColorsType } from './Colors';
4
- export declare const useBrandTheme: () => {
5
- colors: ColorsType;
6
- theme: Theme;
7
- logo: any;
8
- isFetching: boolean;
9
- };
10
- type BrandThemeProps = PropsWithChildren<{
11
- url: string;
12
- customTheme?(brandColors: ColorsType): Partial<Theme>;
13
- }>;
14
- export declare const BrandThemeProvider: (props: BrandThemeProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../index-b3ac4c73.cjs"),n=require("react/jsx-runtime"),o=require("@mui/material"),a=e=>{const i=t({});return n.jsx(o.ThemeProvider,{theme:i,children:e.children})},t=({colors:e=r.color})=>o.createTheme({palette:{primary:{main:e.primary300},secondary:{main:e.secondary},warning:{main:e.warning},error:{main:e.danger}},typography:{fontFamily:"TT Firs Neue Trl",button:{textTransform:"none",fontSize:"0.875rem",fontWeight:400,boxShadow:"none"},body1:{fontSize:"0.875rem",fontWeight:400},body2:{fontSize:"0.75rem"},h6:{fontSize:"0.875rem",fontWeight:500},h5:{fontSize:"1rem",fontWeight:500},h4:{fontSize:"1.25rem",fontWeight:500},h3:{fontSize:"1.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h1:{fontSize:"2.5rem",fontWeight:500},subtitle1:{fontSize:"0.75rem"},subtitle2:{fontSize:"0.625rem"}},components:{MuiIconButton:{styleOverrides:{root:{},sizeSmall:{}}},MuiButton:{styleOverrides:{root:{boxShadow:"none !important",padding:"8px 32px",borderWidth:1,borderRadius:3,fontWeight:400}},variants:[{props:{variant:"primary"},style:{backgroundColor:e.primary300,color:e.buttonText,"&:hover":{backgroundColor:e.primary500,color:e.white},"&.Mui-disabled":{backgroundColor:e.grey200}}},{props:{variant:"confirm"},style:{backgroundColor:e.danger,color:e.white,"&:hover":{backgroundColor:e.dangerDark},"&.Mui-disabled":{backgroundColor:e.grey200}}},{props:{variant:"cancel"},style:{backgroundColor:e.grey300,color:e.textPrimary,"&:hover":{backgroundColor:e.grey400}}},{props:{variant:"outlined"},style:{color:e.primary500,border:"1px solid",borderColor:e.primary400,"&:hover":{backgroundColor:"inherit"}}},{props:{variant:"outlinedPrimary"},style:{color:e.primary500,border:"1px solid",borderColor:e.primary400,"&:hover":{backgroundColor:"inherit"}}},{props:{variant:"outLinedDanger"},style:{color:e.danger,border:"1px solid",borderColor:e.danger,"&:hover":{backgroundColor:"inherit"}}}]},MuiAppBar:{styleOverrides:{root:{backgroundColor:e.appBarBgColor,color:e.appBarColor}}},MuiSelect:{defaultProps:{MenuProps:{PaperProps:{sx:{boxShadow:"none",border:1,borderStyle:"solid",borderColor:e.grey300,mt:"5px"}},MenuListProps:{sx:{padding:"5px","& .MuiMenuItem-root":{fontWeight:400,minHeight:0,borderRadius:"5px","&:hover":{backgroundColor:e.grey100},"&.Mui-selected":{backgroundColor:e.primary200}}}}}},styleOverrides:{select:{padding:"9.94px 5px 9.94px 15px"}}},MuiPaginationItem:{defaultProps:{components:{previous:r.AiFillCaretLeft,next:r.AiFillCaretRight}},styleOverrides:{root:{"& svg":{width:"10px"},border:"none",fontSize:"14px",lineHeight:"1.5rem",borderRadius:"7px","&.Mui-selected":{backgroundColor:e.primary200},"&.MuiPaginationItem-previousNext":{backgroundColor:e.grey200}}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontSize:"10px",lineHeight:"12px",fontWeight:400,"& .MuiChip-label":{lineHeight:"normal"}},avatar:{width:"10px"},colorSuccess:{color:e.success,backgroundColor:e.successLight},colorWarning:{color:e.warning,backgroundColor:e.warningLight},colorError:{color:e.danger,backgroundColor:e.dangerLight},colorSecondary:{color:e.linkPrimary,backgroundColor:e.linkLight}}},MuiTab:{styleOverrides:{root:{background:e.grey200,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",marginRight:"5px",minWidth:"200px",flexDirection:"row",alignContent:"center",gap:"8px",textTransform:"capitalize","& svg":{mb:"0 !important"},padding:0,height:"32px",minHeight:"auto",fontSize:"12px","& .chart-icon":{fill:e.grey600},"& .detail-icon":{stroke:e.grey600}}}},MuiDrawer:{defaultProps:{},styleOverrides:{root:{"&.MuiDrawer-paper":{overflowY:"unset"},"& .MuiDrawer-paper":{zIndex:9},"&.MuiPaper-root":{border:"none",background:e.grey100,pt:12,zIndex:9}}}},MuiTextField:{defaultProps:{InputProps:{sx:{"& .Mui-disabled":{background:e.grey200}}},InputLabelProps:{shrink:!0}},styleOverrides:{root:{backgroundColor:e.white,"& .MuiOutlinedInput-input":{padding:"0px 16px 0px 12px",fontWeight:400,height:40,fontSize:"14px",border:1,borderRadius:4,"&::placeholder":{color:e.grey600}},"& .MuiFormLabel-root":{color:e.textPrimary},"& .MuiFormLabel-asterisk":{color:e.danger}}}},MuiFormGroup:{styleOverrides:{root:{}}},MuiFormHelperText:{defaultProps:{sx:{fontSize:12}},styleOverrides:{}},MuiAutocomplete:{defaultProps:{sx:{"& .MuiPaper-root":{padding:"5px"}}},styleOverrides:{root:{"& .MuiSvgIcon-root":{width:"20px",height:"20px"},"& .MuiAutocomplete-tag":{margin:0},"& .MuiButtonBase-root":{marginRight:"2px !important",height:"max-content",padding:"2px"},"& .MuiOutlinedInput-root":{padding:"7.45px 55px 7.45px 10px !important"},"& svg":{},"& #checkboxes-tags-demo":{padding:"6px 4px"},"& .MuiAutocomplete-endAdornment":{top:"calc(50% - 12px)"}}}},MuiTableHead:{styleOverrides:{root:{"& th":{fontSize:"14px",padding:"8px 16px"}}}},MuiTableBody:{styleOverrides:{root:{"& th,td":{fontSize:"14px",padding:"8px 16px",height:"45px"},"& .MuiTableCell-root":{borderBottom:`1px solid ${e.grey300}`}}}},MuiRadio:{defaultProps:{sx:{"&.MuiButtonBase-root":{padding:"5px"}}},styleOverrides:{root:{"& .MuiSvgIcon-root":{fontSize:16},color:e.grey600,"&.Mui-checked":{color:e.success},"&.Mui-disabled":{color:e.grey600}}}},MuiTooltip:{defaultProps:{placement:"top",arrow:!0}}}});exports.color=r.color;exports.SaasThemeProvider=a;exports.createCustomTheme=t;
@@ -1,461 +0,0 @@
1
- import { A as o, a as t, c as i } from "../index-5bc96a1f.js";
2
- import { jsx as n } from "react/jsx-runtime";
3
- import { ThemeProvider as a, createTheme as d } from "@mui/material";
4
- const h = (e) => {
5
- const r = p({});
6
- return /* @__PURE__ */ n(a, { theme: r, children: e.children });
7
- }, p = ({ colors: e = i }) => d({
8
- palette: {
9
- primary: {
10
- main: e.primary300
11
- },
12
- secondary: {
13
- main: e.secondary
14
- },
15
- warning: {
16
- main: e.warning
17
- },
18
- error: {
19
- main: e.danger
20
- }
21
- },
22
- typography: {
23
- fontFamily: "TT Firs Neue Trl",
24
- button: {
25
- textTransform: "none",
26
- // padding: '0.75rem 1rem',
27
- fontSize: "0.875rem",
28
- // lineHeight: '1rem',
29
- // height: 'fit-content',
30
- // // fontFamily: '',
31
- // borderRadius: 5,
32
- fontWeight: 400,
33
- boxShadow: "none"
34
- },
35
- body1: {
36
- fontSize: "0.875rem",
37
- fontWeight: 400
38
- },
39
- body2: {
40
- fontSize: "0.75rem"
41
- },
42
- h6: {
43
- fontSize: "0.875rem",
44
- fontWeight: 500
45
- },
46
- h5: {
47
- fontSize: "1rem",
48
- fontWeight: 500
49
- },
50
- h4: {
51
- fontSize: "1.25rem",
52
- fontWeight: 500
53
- },
54
- h3: {
55
- fontSize: "1.5rem",
56
- fontWeight: 500
57
- },
58
- h2: {
59
- fontSize: "2rem",
60
- fontWeight: 500
61
- },
62
- h1: {
63
- fontSize: "2.5rem",
64
- fontWeight: 500
65
- },
66
- subtitle1: {
67
- fontSize: "0.75rem"
68
- },
69
- subtitle2: {
70
- fontSize: "0.625rem"
71
- }
72
- },
73
- components: {
74
- MuiIconButton: {
75
- styleOverrides: {
76
- root: {},
77
- sizeSmall: {}
78
- }
79
- },
80
- MuiButton: {
81
- styleOverrides: {
82
- root: {
83
- boxShadow: "none !important",
84
- padding: "8px 32px",
85
- borderWidth: 1,
86
- borderRadius: 3,
87
- fontWeight: 400
88
- }
89
- },
90
- variants: [
91
- {
92
- props: { variant: "primary" },
93
- style: {
94
- backgroundColor: e.primary300,
95
- color: e.buttonText,
96
- "&:hover": {
97
- backgroundColor: e.primary500,
98
- color: e.white
99
- },
100
- "&.Mui-disabled": {
101
- backgroundColor: e.grey200
102
- }
103
- }
104
- },
105
- {
106
- props: { variant: "confirm" },
107
- style: {
108
- backgroundColor: e.danger,
109
- color: e.white,
110
- "&:hover": {
111
- backgroundColor: e.dangerDark
112
- },
113
- "&.Mui-disabled": {
114
- backgroundColor: e.grey200
115
- }
116
- }
117
- },
118
- {
119
- props: { variant: "cancel" },
120
- style: {
121
- backgroundColor: e.grey300,
122
- color: e.textPrimary,
123
- "&:hover": {
124
- backgroundColor: e.grey400
125
- }
126
- }
127
- },
128
- {
129
- props: { variant: "outlined" },
130
- style: {
131
- color: e.primary500,
132
- border: "1px solid",
133
- borderColor: e.primary400,
134
- "&:hover": {
135
- backgroundColor: "inherit"
136
- }
137
- }
138
- },
139
- {
140
- props: { variant: "outlinedPrimary" },
141
- style: {
142
- color: e.primary500,
143
- border: "1px solid",
144
- borderColor: e.primary400,
145
- "&:hover": {
146
- backgroundColor: "inherit"
147
- }
148
- }
149
- },
150
- {
151
- props: { variant: "outLinedDanger" },
152
- style: {
153
- color: e.danger,
154
- border: "1px solid",
155
- borderColor: e.danger,
156
- "&:hover": {
157
- backgroundColor: "inherit"
158
- }
159
- }
160
- }
161
- ]
162
- },
163
- MuiAppBar: {
164
- styleOverrides: {
165
- root: {
166
- backgroundColor: e.appBarBgColor,
167
- color: e.appBarColor
168
- }
169
- }
170
- },
171
- MuiSelect: {
172
- defaultProps: {
173
- MenuProps: {
174
- PaperProps: {
175
- sx: {
176
- boxShadow: "none",
177
- border: 1,
178
- borderStyle: "solid",
179
- borderColor: e.grey300,
180
- mt: "5px"
181
- }
182
- },
183
- MenuListProps: {
184
- sx: {
185
- padding: "5px",
186
- "& .MuiMenuItem-root": {
187
- fontWeight: 400,
188
- minHeight: 0,
189
- borderRadius: "5px",
190
- "&:hover": {
191
- backgroundColor: e.grey100
192
- },
193
- "&.Mui-selected": {
194
- // fontWeight: 500,
195
- // color: color.darkPrimary,
196
- backgroundColor: e.primary200
197
- }
198
- // [breakpoints.down('sm')]: {
199
- // padding:0
200
- // },
201
- }
202
- }
203
- }
204
- }
205
- },
206
- styleOverrides: {
207
- select: {
208
- padding: "9.94px 5px 9.94px 15px"
209
- }
210
- }
211
- },
212
- MuiPaginationItem: {
213
- defaultProps: {
214
- components: {
215
- previous: o,
216
- next: t
217
- }
218
- },
219
- styleOverrides: {
220
- root: {
221
- "& svg": {
222
- width: "10px"
223
- },
224
- border: "none",
225
- fontSize: "14px",
226
- lineHeight: "1.5rem",
227
- borderRadius: "7px",
228
- "&.Mui-selected": {
229
- backgroundColor: e.primary200
230
- },
231
- "&.MuiPaginationItem-previousNext": {
232
- backgroundColor: e.grey200
233
- }
234
- }
235
- }
236
- },
237
- MuiChip: {
238
- styleOverrides: {
239
- root: {
240
- borderRadius: "5px",
241
- fontSize: "10px",
242
- lineHeight: "12px",
243
- fontWeight: 400,
244
- "& .MuiChip-label": {
245
- lineHeight: "normal"
246
- }
247
- },
248
- avatar: {
249
- width: "10px"
250
- },
251
- colorSuccess: {
252
- color: e.success,
253
- backgroundColor: e.successLight
254
- },
255
- colorWarning: {
256
- color: e.warning,
257
- backgroundColor: e.warningLight
258
- },
259
- colorError: {
260
- color: e.danger,
261
- backgroundColor: e.dangerLight
262
- },
263
- colorSecondary: {
264
- color: e.linkPrimary,
265
- backgroundColor: e.linkLight
266
- }
267
- }
268
- },
269
- MuiTab: {
270
- styleOverrides: {
271
- root: {
272
- background: e.grey200,
273
- borderTopLeftRadius: "8px",
274
- borderTopRightRadius: "8px",
275
- marginRight: "5px",
276
- minWidth: "200px",
277
- flexDirection: "row",
278
- alignContent: "center",
279
- gap: "8px",
280
- textTransform: "capitalize",
281
- "& svg": {
282
- mb: "0 !important"
283
- },
284
- padding: 0,
285
- height: "32px",
286
- minHeight: "auto",
287
- fontSize: "12px",
288
- "& .chart-icon": {
289
- fill: e.grey600
290
- },
291
- "& .detail-icon": {
292
- stroke: e.grey600
293
- }
294
- }
295
- }
296
- },
297
- MuiDrawer: {
298
- defaultProps: {},
299
- styleOverrides: {
300
- root: {
301
- "&.MuiDrawer-paper": {
302
- overflowY: "unset"
303
- },
304
- "& .MuiDrawer-paper": {
305
- zIndex: 9
306
- },
307
- "&.MuiPaper-root": {
308
- border: "none",
309
- background: e.grey100,
310
- pt: 12,
311
- zIndex: 9
312
- }
313
- }
314
- }
315
- },
316
- MuiTextField: {
317
- defaultProps: {
318
- InputProps: {
319
- sx: {
320
- "& .Mui-disabled": {
321
- background: e.grey200
322
- }
323
- }
324
- },
325
- InputLabelProps: {
326
- shrink: !0
327
- }
328
- },
329
- styleOverrides: {
330
- root: {
331
- backgroundColor: e.white,
332
- "& .MuiOutlinedInput-input": {
333
- padding: "0px 16px 0px 12px",
334
- fontWeight: 400,
335
- height: 40,
336
- fontSize: "14px",
337
- border: 1,
338
- borderRadius: 4,
339
- "&::placeholder": {
340
- color: e.grey600
341
- }
342
- },
343
- "& .MuiFormLabel-root": {
344
- color: e.textPrimary
345
- },
346
- "& .MuiFormLabel-asterisk": {
347
- color: e.danger
348
- }
349
- }
350
- }
351
- },
352
- MuiFormGroup: {
353
- styleOverrides: {
354
- root: {
355
- // position: 'relative',
356
- }
357
- }
358
- },
359
- MuiFormHelperText: {
360
- defaultProps: {
361
- sx: {
362
- fontSize: 12
363
- }
364
- },
365
- styleOverrides: {}
366
- },
367
- MuiAutocomplete: {
368
- defaultProps: {
369
- sx: {
370
- "& .MuiPaper-root": {
371
- padding: "5px"
372
- }
373
- }
374
- },
375
- styleOverrides: {
376
- root: {
377
- "& .MuiSvgIcon-root": {
378
- width: "20px",
379
- height: "20px"
380
- },
381
- "& .MuiAutocomplete-tag": {
382
- margin: 0
383
- },
384
- "& .MuiButtonBase-root": {
385
- marginRight: "2px !important",
386
- height: "max-content",
387
- padding: "2px"
388
- },
389
- "& .MuiOutlinedInput-root": {
390
- padding: "7.45px 55px 7.45px 10px !important"
391
- },
392
- "& svg": {},
393
- "& #checkboxes-tags-demo": {
394
- padding: "6px 4px"
395
- },
396
- "& .MuiAutocomplete-endAdornment": {
397
- top: "calc(50% - 12px)"
398
- }
399
- }
400
- }
401
- },
402
- MuiTableHead: {
403
- styleOverrides: {
404
- root: {
405
- "& th": {
406
- fontSize: "14px",
407
- padding: "8px 16px"
408
- }
409
- }
410
- }
411
- },
412
- MuiTableBody: {
413
- styleOverrides: {
414
- root: {
415
- "& th,td": {
416
- fontSize: "14px",
417
- padding: "8px 16px",
418
- height: "45px"
419
- },
420
- "& .MuiTableCell-root": {
421
- borderBottom: `1px solid ${e.grey300}`
422
- }
423
- }
424
- }
425
- },
426
- MuiRadio: {
427
- defaultProps: {
428
- sx: {
429
- "&.MuiButtonBase-root": {
430
- padding: "5px"
431
- }
432
- }
433
- },
434
- styleOverrides: {
435
- root: {
436
- "& .MuiSvgIcon-root": {
437
- fontSize: 16
438
- },
439
- color: e.grey600,
440
- "&.Mui-checked": {
441
- color: e.success
442
- },
443
- "&.Mui-disabled": {
444
- color: e.grey600
445
- }
446
- }
447
- }
448
- },
449
- MuiTooltip: {
450
- defaultProps: {
451
- placement: "top",
452
- arrow: !0
453
- }
454
- }
455
- }
456
- });
457
- export {
458
- h as SaasThemeProvider,
459
- i as color,
460
- p as createCustomTheme
461
- };