@verma-consulting/design-library 0.1.26 → 0.1.27
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.
- package/README.md +2 -1
- package/dist/index.d.mts +49 -20
- package/dist/index.d.ts +49 -20
- package/dist/index.js +255 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +244 -66
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -171,6 +171,183 @@ var TabPanel = (props) => {
|
|
|
171
171
|
};
|
|
172
172
|
var TabPanel_default = TabPanel;
|
|
173
173
|
|
|
174
|
+
// src/TablePagination.tsx
|
|
175
|
+
import * as React2 from "react";
|
|
176
|
+
import MuiTablePagination from "@mui/material/TablePagination";
|
|
177
|
+
import tablePaginationClasses from "@mui/material/TablePagination/tablePaginationClasses";
|
|
178
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
179
|
+
function mergeSx(...parts) {
|
|
180
|
+
const flat = [];
|
|
181
|
+
for (const p of parts) {
|
|
182
|
+
if (p == null) continue;
|
|
183
|
+
if (Array.isArray(p)) {
|
|
184
|
+
for (const x of p) {
|
|
185
|
+
if (x != null) flat.push(x);
|
|
186
|
+
}
|
|
187
|
+
} else {
|
|
188
|
+
flat.push(p);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
return flat;
|
|
192
|
+
}
|
|
193
|
+
var DEFAULT_ROWS_PER_PAGE_LABEL = "Per page";
|
|
194
|
+
function defaultDisplayedRangeLabel({
|
|
195
|
+
from,
|
|
196
|
+
to,
|
|
197
|
+
count
|
|
198
|
+
}) {
|
|
199
|
+
if (count === 0) {
|
|
200
|
+
return "No results";
|
|
201
|
+
}
|
|
202
|
+
if (count === -1) {
|
|
203
|
+
return `${from}\u2013${to}+`;
|
|
204
|
+
}
|
|
205
|
+
if (from > to) {
|
|
206
|
+
return `0 of ${count} results`;
|
|
207
|
+
}
|
|
208
|
+
return `${from}\u2013${to} of ${count} results`;
|
|
209
|
+
}
|
|
210
|
+
function defaultGetItemAriaLabel(type) {
|
|
211
|
+
const labels = {
|
|
212
|
+
first: "First page",
|
|
213
|
+
previous: "Previous page",
|
|
214
|
+
next: "Next page",
|
|
215
|
+
last: "Last page"
|
|
216
|
+
};
|
|
217
|
+
return labels[type];
|
|
218
|
+
}
|
|
219
|
+
var rootSx = {
|
|
220
|
+
width: "100%",
|
|
221
|
+
boxSizing: "border-box",
|
|
222
|
+
verticalAlign: "middle",
|
|
223
|
+
bgcolor: "transparent",
|
|
224
|
+
py: 0.75,
|
|
225
|
+
px: { xs: 1, sm: 1.5 },
|
|
226
|
+
[`& .${tablePaginationClasses.toolbar}`]: {
|
|
227
|
+
width: "100%",
|
|
228
|
+
minHeight: 48,
|
|
229
|
+
justifyContent: "flex-end",
|
|
230
|
+
alignItems: "center",
|
|
231
|
+
flexWrap: "nowrap",
|
|
232
|
+
gap: { xs: 0.75, sm: 1.25 },
|
|
233
|
+
py: 0,
|
|
234
|
+
pr: 0,
|
|
235
|
+
pl: 0,
|
|
236
|
+
maxWidth: "100%",
|
|
237
|
+
overflowX: "auto"
|
|
238
|
+
},
|
|
239
|
+
[`& .${tablePaginationClasses.spacer}`]: {
|
|
240
|
+
flex: "1 1 auto",
|
|
241
|
+
minWidth: 0
|
|
242
|
+
},
|
|
243
|
+
[`& .${tablePaginationClasses.selectLabel}`]: {
|
|
244
|
+
typography: "body2",
|
|
245
|
+
fontWeight: 500,
|
|
246
|
+
textTransform: "none",
|
|
247
|
+
color: "text.secondary",
|
|
248
|
+
m: 0,
|
|
249
|
+
whiteSpace: "nowrap"
|
|
250
|
+
},
|
|
251
|
+
[`& .${tablePaginationClasses.displayedRows}`]: {
|
|
252
|
+
typography: "body2",
|
|
253
|
+
color: "text.secondary",
|
|
254
|
+
fontVariantNumeric: "tabular-nums",
|
|
255
|
+
m: 0,
|
|
256
|
+
whiteSpace: "nowrap"
|
|
257
|
+
},
|
|
258
|
+
[`& .${tablePaginationClasses.input}`]: {
|
|
259
|
+
marginLeft: 0,
|
|
260
|
+
marginRight: 0
|
|
261
|
+
},
|
|
262
|
+
[`& .${tablePaginationClasses.actions}`]: {
|
|
263
|
+
marginLeft: 0,
|
|
264
|
+
gap: 0,
|
|
265
|
+
display: "flex",
|
|
266
|
+
alignItems: "center",
|
|
267
|
+
[`& .MuiIconButton-root`]: {
|
|
268
|
+
borderRadius: 1.5,
|
|
269
|
+
color: "text.secondary",
|
|
270
|
+
padding: 0.5,
|
|
271
|
+
"&:hover": {
|
|
272
|
+
bgcolor: "action.hover",
|
|
273
|
+
color: "text.primary"
|
|
274
|
+
},
|
|
275
|
+
"&.Mui-disabled": {
|
|
276
|
+
opacity: 0.36
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
var TablePagination = React2.forwardRef(function TablePagination2(props, ref) {
|
|
282
|
+
var _a, _b;
|
|
283
|
+
const {
|
|
284
|
+
sx,
|
|
285
|
+
slotProps,
|
|
286
|
+
SelectProps,
|
|
287
|
+
showFirstButton = true,
|
|
288
|
+
showLastButton = true,
|
|
289
|
+
labelDisplayedRows: labelDisplayedRowsProp,
|
|
290
|
+
labelRowsPerPage: labelRowsPerPageProp,
|
|
291
|
+
getItemAriaLabel,
|
|
292
|
+
rowsPerPageLabel,
|
|
293
|
+
displayedRangeLabel,
|
|
294
|
+
...other
|
|
295
|
+
} = props;
|
|
296
|
+
const labelRowsPerPageResolved = (_a = labelRowsPerPageProp != null ? labelRowsPerPageProp : rowsPerPageLabel) != null ? _a : DEFAULT_ROWS_PER_PAGE_LABEL;
|
|
297
|
+
const labelDisplayedRowsResolved = (_b = labelDisplayedRowsProp != null ? labelDisplayedRowsProp : displayedRangeLabel) != null ? _b : defaultDisplayedRangeLabel;
|
|
298
|
+
const slotSelect = slotProps == null ? void 0 : slotProps.select;
|
|
299
|
+
const { sx: slotSelectSx, ...slotSelectRest } = slotSelect != null ? slotSelect : {};
|
|
300
|
+
const { sx: legacySelectSx, ...legacySelectRest } = SelectProps != null ? SelectProps : {};
|
|
301
|
+
const mergedSelect = {
|
|
302
|
+
variant: "outlined",
|
|
303
|
+
size: "small",
|
|
304
|
+
...legacySelectRest,
|
|
305
|
+
...slotSelectRest,
|
|
306
|
+
sx: mergeSx(
|
|
307
|
+
(theme) => ({
|
|
308
|
+
borderRadius: 1.5,
|
|
309
|
+
minWidth: 64,
|
|
310
|
+
fontSize: theme.typography.body2.fontSize,
|
|
311
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
|
312
|
+
borderColor: "divider"
|
|
313
|
+
},
|
|
314
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
|
315
|
+
borderColor: "text.disabled"
|
|
316
|
+
},
|
|
317
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
|
318
|
+
borderColor: "primary.main"
|
|
319
|
+
},
|
|
320
|
+
"& .MuiSelect-select": {
|
|
321
|
+
py: 0.625,
|
|
322
|
+
minHeight: "unset",
|
|
323
|
+
display: "flex",
|
|
324
|
+
alignItems: "center"
|
|
325
|
+
}
|
|
326
|
+
}),
|
|
327
|
+
legacySelectSx,
|
|
328
|
+
slotSelectSx
|
|
329
|
+
)
|
|
330
|
+
};
|
|
331
|
+
return /* @__PURE__ */ jsx3(
|
|
332
|
+
MuiTablePagination,
|
|
333
|
+
{
|
|
334
|
+
ref,
|
|
335
|
+
showFirstButton,
|
|
336
|
+
showLastButton,
|
|
337
|
+
labelRowsPerPage: labelRowsPerPageResolved,
|
|
338
|
+
labelDisplayedRows: labelDisplayedRowsResolved,
|
|
339
|
+
getItemAriaLabel: getItemAriaLabel != null ? getItemAriaLabel : defaultGetItemAriaLabel,
|
|
340
|
+
slotProps: {
|
|
341
|
+
...slotProps,
|
|
342
|
+
select: mergedSelect
|
|
343
|
+
},
|
|
344
|
+
sx: mergeSx(rootSx, sx),
|
|
345
|
+
...other
|
|
346
|
+
}
|
|
347
|
+
);
|
|
348
|
+
});
|
|
349
|
+
var TablePagination_default = TablePagination;
|
|
350
|
+
|
|
174
351
|
// src/index.tsx
|
|
175
352
|
import {
|
|
176
353
|
useTheme as useTheme9,
|
|
@@ -191,7 +368,7 @@ import {
|
|
|
191
368
|
useTheme,
|
|
192
369
|
useMediaQuery
|
|
193
370
|
} from "@mui/material";
|
|
194
|
-
import { jsx as
|
|
371
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
195
372
|
var Logo = memo(
|
|
196
373
|
({
|
|
197
374
|
loggedIn = false,
|
|
@@ -219,7 +396,7 @@ var Logo = memo(
|
|
|
219
396
|
sx: { cursor: "pointer" },
|
|
220
397
|
onClick: handleClick,
|
|
221
398
|
children: [
|
|
222
|
-
(logoUrl || defaultLogo) && /* @__PURE__ */
|
|
399
|
+
(logoUrl || defaultLogo) && /* @__PURE__ */ jsx4(Grid, { item: true, children: logoUrl ? /* @__PURE__ */ jsx4(
|
|
223
400
|
Avatar,
|
|
224
401
|
{
|
|
225
402
|
alt: companyName || "avatar",
|
|
@@ -236,7 +413,7 @@ var Logo = memo(
|
|
|
236
413
|
children: (companyName == null ? void 0 : companyName.charAt(0)) || "?"
|
|
237
414
|
}
|
|
238
415
|
) : defaultLogo }),
|
|
239
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ jsx4(Grid, { item: true, sx: { maxWidth, textAlign: "center" }, children: loggedIn ? /* @__PURE__ */ jsx4(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx4(
|
|
240
417
|
Typography2,
|
|
241
418
|
{
|
|
242
419
|
variant: "h6",
|
|
@@ -247,7 +424,7 @@ var Logo = memo(
|
|
|
247
424
|
},
|
|
248
425
|
children: companyName
|
|
249
426
|
}
|
|
250
|
-
) }) : /* @__PURE__ */
|
|
427
|
+
) }) : /* @__PURE__ */ jsx4(Box2, { sx: { display: "flex", justifyContent: "center" }, children: companyComponent }) })
|
|
251
428
|
]
|
|
252
429
|
}
|
|
253
430
|
);
|
|
@@ -264,7 +441,7 @@ var Logo = memo(
|
|
|
264
441
|
},
|
|
265
442
|
onClick: handleClick,
|
|
266
443
|
children: [
|
|
267
|
-
(logoUrl || defaultLogo) && /* @__PURE__ */
|
|
444
|
+
(logoUrl || defaultLogo) && /* @__PURE__ */ jsx4(Box2, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: logoUrl ? /* @__PURE__ */ jsx4(
|
|
268
445
|
Avatar,
|
|
269
446
|
{
|
|
270
447
|
alt: companyName || "avatar",
|
|
@@ -280,7 +457,7 @@ var Logo = memo(
|
|
|
280
457
|
children: (companyName == null ? void 0 : companyName.charAt(0)) || "?"
|
|
281
458
|
}
|
|
282
459
|
) : defaultLogo }),
|
|
283
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ jsx4(Box2, { sx: { maxWidth, flexShrink: 1, minWidth: 0 }, children: loggedIn ? /* @__PURE__ */ jsx4(Tooltip, { title: companyName, placement: "top", arrow: true, children: /* @__PURE__ */ jsx4(
|
|
284
461
|
Typography2,
|
|
285
462
|
{
|
|
286
463
|
variant: "h6",
|
|
@@ -316,7 +493,7 @@ import {
|
|
|
316
493
|
} from "@mui/material";
|
|
317
494
|
import { useTheme as useTheme3 } from "@mui/material/styles";
|
|
318
495
|
import { Close } from "@mui/icons-material";
|
|
319
|
-
import { jsx as
|
|
496
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
320
497
|
var BootstrapDialog = styled(Dialog)(({ theme }) => ({
|
|
321
498
|
"& .MuiDialogContent-root": {
|
|
322
499
|
padding: theme.spacing(4)
|
|
@@ -344,7 +521,7 @@ var BootstrapDialogTitle = (props) => {
|
|
|
344
521
|
...other,
|
|
345
522
|
children: [
|
|
346
523
|
children,
|
|
347
|
-
onClose ? /* @__PURE__ */
|
|
524
|
+
onClose ? /* @__PURE__ */ jsx5(
|
|
348
525
|
IconButton2,
|
|
349
526
|
{
|
|
350
527
|
onClick: onClose,
|
|
@@ -353,7 +530,7 @@ var BootstrapDialogTitle = (props) => {
|
|
|
353
530
|
right: 16,
|
|
354
531
|
top: 16
|
|
355
532
|
},
|
|
356
|
-
children: /* @__PURE__ */
|
|
533
|
+
children: /* @__PURE__ */ jsx5(Close, { color: "primary" })
|
|
357
534
|
}
|
|
358
535
|
) : null
|
|
359
536
|
]
|
|
@@ -380,9 +557,9 @@ var FormDialog = ({
|
|
|
380
557
|
maxWidth,
|
|
381
558
|
fullScreen: mdMatches,
|
|
382
559
|
children: [
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ jsx5(BootstrapDialogTitle, { onClose: () => setOpen(false), children: title }),
|
|
561
|
+
/* @__PURE__ */ jsx5(DialogContent, { dividers: true, children }),
|
|
562
|
+
/* @__PURE__ */ jsx5(DialogActions, { children: actions })
|
|
386
563
|
]
|
|
387
564
|
}
|
|
388
565
|
);
|
|
@@ -393,7 +570,7 @@ var FormDialog_default = FormDialog;
|
|
|
393
570
|
import { styled as styled2 } from "@mui/material/styles";
|
|
394
571
|
import { Button } from "@mui/material";
|
|
395
572
|
import { CloudUpload } from "@mui/icons-material";
|
|
396
|
-
import { jsx as
|
|
573
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
397
574
|
var VisuallyHiddenInput = styled2("input")({
|
|
398
575
|
clip: "rect(0 0 0 0)",
|
|
399
576
|
clipPath: "inset(50%)",
|
|
@@ -413,10 +590,10 @@ var InputFileUpload = ({ name = "", onChange = () => null, title = "" }) => /* @
|
|
|
413
590
|
size: "small",
|
|
414
591
|
variant: "contained",
|
|
415
592
|
tabIndex: -1,
|
|
416
|
-
startIcon: /* @__PURE__ */
|
|
593
|
+
startIcon: /* @__PURE__ */ jsx6(CloudUpload, { fontSize: "inherit" }),
|
|
417
594
|
children: [
|
|
418
595
|
title,
|
|
419
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ jsx6(VisuallyHiddenInput, { type: "file", name, onChange })
|
|
420
597
|
]
|
|
421
598
|
}
|
|
422
599
|
);
|
|
@@ -427,7 +604,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
427
604
|
import { Box as Box3, IconButton as IconButton3 } from "@mui/material";
|
|
428
605
|
import { styled as styled3 } from "@mui/material/styles";
|
|
429
606
|
import { CloudUpload as CloudUpload2, Close as CloseIcon } from "@mui/icons-material";
|
|
430
|
-
import { jsx as
|
|
607
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
431
608
|
var HiddenInput = styled3("input")({
|
|
432
609
|
position: "absolute",
|
|
433
610
|
width: 1,
|
|
@@ -553,10 +730,10 @@ var ImageUploadAvatar = ({
|
|
|
553
730
|
onPointerLeave: () => setHover(false),
|
|
554
731
|
onClick: triggerPick,
|
|
555
732
|
children: [
|
|
556
|
-
internalSrc && /* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
allowClear && internalSrc && !disabled && /* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
733
|
+
internalSrc && /* @__PURE__ */ jsx7(PreviewImg, { src: internalSrc }),
|
|
734
|
+
/* @__PURE__ */ jsx7(Overlay, { className: `${!internalSrc ? "empty" : ""} ${hover && !disabled ? "hover" : ""}`, children: /* @__PURE__ */ jsx7(CloudUpload2, { className: "uploadIcon", fontSize: "large" }) }),
|
|
735
|
+
allowClear && internalSrc && !disabled && /* @__PURE__ */ jsx7(ClearButton, { size: "small", "aria-label": "Clear image", onClick: handleClear, sx: { m: 1 }, children: /* @__PURE__ */ jsx7(CloseIcon, { fontSize: "inherit" }) }),
|
|
736
|
+
/* @__PURE__ */ jsx7(HiddenInput, { ref: inputRef, type: "file", name, accept, onChange: handlePick, disabled })
|
|
560
737
|
]
|
|
561
738
|
}
|
|
562
739
|
);
|
|
@@ -565,7 +742,7 @@ var ImageUploadAvatar_default = ImageUploadAvatar;
|
|
|
565
742
|
|
|
566
743
|
// src/FormSnackBar.tsx
|
|
567
744
|
import { Snackbar, Alert, AlertTitle, Slide } from "@mui/material";
|
|
568
|
-
import { jsx as
|
|
745
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
569
746
|
var FormSnackBar = ({ snackBar = {}, setSnackBar = () => null }) => {
|
|
570
747
|
const getAlertStyles = () => {
|
|
571
748
|
if ((snackBar == null ? void 0 : snackBar.type) === "success") {
|
|
@@ -573,7 +750,7 @@ var FormSnackBar = ({ snackBar = {}, setSnackBar = () => null }) => {
|
|
|
573
750
|
}
|
|
574
751
|
return {};
|
|
575
752
|
};
|
|
576
|
-
return /* @__PURE__ */
|
|
753
|
+
return /* @__PURE__ */ jsx8(
|
|
577
754
|
Snackbar,
|
|
578
755
|
{
|
|
579
756
|
sx: { width: "100%" },
|
|
@@ -586,7 +763,7 @@ var FormSnackBar = ({ snackBar = {}, setSnackBar = () => null }) => {
|
|
|
586
763
|
type: ""
|
|
587
764
|
}),
|
|
588
765
|
TransitionComponent: Slide,
|
|
589
|
-
children: /* @__PURE__ */
|
|
766
|
+
children: /* @__PURE__ */ jsx8(
|
|
590
767
|
Alert,
|
|
591
768
|
{
|
|
592
769
|
sx: {
|
|
@@ -599,7 +776,7 @@ var FormSnackBar = ({ snackBar = {}, setSnackBar = () => null }) => {
|
|
|
599
776
|
},
|
|
600
777
|
variant: "filled",
|
|
601
778
|
severity: snackBar == null ? void 0 : snackBar.type,
|
|
602
|
-
children: /* @__PURE__ */
|
|
779
|
+
children: /* @__PURE__ */ jsx8(AlertTitle, { sx: { m: 0, p: 0 }, children: snackBar == null ? void 0 : snackBar.message })
|
|
603
780
|
}
|
|
604
781
|
)
|
|
605
782
|
}
|
|
@@ -610,7 +787,7 @@ var FormSnackBar_default = FormSnackBar;
|
|
|
610
787
|
// src/Loader.tsx
|
|
611
788
|
import { CircularProgress, Backdrop } from "@mui/material";
|
|
612
789
|
import { makeStyles as makeStyles2 } from "@mui/styles";
|
|
613
|
-
import { jsx as
|
|
790
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
614
791
|
var useStyles2 = makeStyles2({
|
|
615
792
|
"@keyframes pulse": {
|
|
616
793
|
"0%": { transform: "scale(1)", opacity: 0.9 },
|
|
@@ -623,7 +800,7 @@ var useStyles2 = makeStyles2({
|
|
|
623
800
|
});
|
|
624
801
|
var Loader = ({ size = 48, color = "primary" }) => {
|
|
625
802
|
const classes = useStyles2();
|
|
626
|
-
return /* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsx9(
|
|
627
804
|
Backdrop,
|
|
628
805
|
{
|
|
629
806
|
open: true,
|
|
@@ -632,7 +809,7 @@ var Loader = ({ size = 48, color = "primary" }) => {
|
|
|
632
809
|
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
633
810
|
backdropFilter: "blur(2px)"
|
|
634
811
|
},
|
|
635
|
-
children: /* @__PURE__ */
|
|
812
|
+
children: /* @__PURE__ */ jsx9(CircularProgress, { size, color, thickness: 3.5, className: classes.progress })
|
|
636
813
|
}
|
|
637
814
|
);
|
|
638
815
|
};
|
|
@@ -640,7 +817,7 @@ var Loader_default = Loader;
|
|
|
640
817
|
|
|
641
818
|
// src/SkeletonBar.tsx
|
|
642
819
|
import { Box as Box4, useTheme as useTheme4 } from "@mui/material";
|
|
643
|
-
import { jsx as
|
|
820
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
644
821
|
var SHIMMER_KEYFRAMES = {
|
|
645
822
|
"@keyframes skeletonShimmer": {
|
|
646
823
|
"0%": { backgroundPosition: "200% 0" },
|
|
@@ -656,7 +833,7 @@ var SkeletonBar = ({
|
|
|
656
833
|
const theme = useTheme4();
|
|
657
834
|
const base = theme.palette.mode === "dark" ? (_b = (_a = theme.palette.grey) == null ? void 0 : _a[700]) != null ? _b : "#424242" : (_d = (_c = theme.palette.grey) == null ? void 0 : _c[200]) != null ? _d : "#e0e0e0";
|
|
658
835
|
const highlight = theme.palette.mode === "dark" ? (_f = (_e = theme.palette.grey) == null ? void 0 : _e[600]) != null ? _f : "#616161" : (_h = (_g = theme.palette.grey) == null ? void 0 : _g[100]) != null ? _h : "#f5f5f5";
|
|
659
|
-
return /* @__PURE__ */
|
|
836
|
+
return /* @__PURE__ */ jsx10(
|
|
660
837
|
Box4,
|
|
661
838
|
{
|
|
662
839
|
sx: {
|
|
@@ -677,16 +854,16 @@ var SkeletonBar = ({
|
|
|
677
854
|
var SkeletonBar_default = SkeletonBar;
|
|
678
855
|
|
|
679
856
|
// src/EmptyState.tsx
|
|
680
|
-
import
|
|
857
|
+
import React5 from "react";
|
|
681
858
|
import { Box as Box5, Typography as Typography3, useTheme as useTheme5 } from "@mui/material";
|
|
682
859
|
import { DatasetOutlined } from "@mui/icons-material";
|
|
683
|
-
import { jsx as
|
|
860
|
+
import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
684
861
|
var EmptyState = ({ label, m = 8, icon }) => {
|
|
685
862
|
const theme = useTheme5();
|
|
686
863
|
const text = label != null ? label : "No data created yet";
|
|
687
864
|
const iconColor = theme.palette.mode === "dark" ? "rgba(255,255,255,0.42)" : "rgba(0,0,0,0.42)";
|
|
688
865
|
const labelColor = theme.palette.mode === "dark" ? "rgba(255,255,255,0.50)" : "rgba(0,0,0,0.38)";
|
|
689
|
-
const iconEl = icon != null &&
|
|
866
|
+
const iconEl = icon != null && React5.isValidElement(icon) ? icon : /* @__PURE__ */ jsx11(
|
|
690
867
|
DatasetOutlined,
|
|
691
868
|
{
|
|
692
869
|
sx: {
|
|
@@ -712,7 +889,7 @@ var EmptyState = ({ label, m = 8, icon }) => {
|
|
|
712
889
|
},
|
|
713
890
|
children: [
|
|
714
891
|
iconEl,
|
|
715
|
-
/* @__PURE__ */
|
|
892
|
+
/* @__PURE__ */ jsx11(
|
|
716
893
|
Typography3,
|
|
717
894
|
{
|
|
718
895
|
variant: "body2",
|
|
@@ -737,7 +914,7 @@ var EmptyState_default = EmptyState;
|
|
|
737
914
|
// src/Pill.tsx
|
|
738
915
|
import { Button as Button2, Typography as Typography4, Icon, useTheme as useTheme6 } from "@mui/material";
|
|
739
916
|
import { makeStyles as makeStyles3 } from "@mui/styles";
|
|
740
|
-
import { jsx as
|
|
917
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
741
918
|
var useStyles3 = makeStyles3((theme) => ({
|
|
742
919
|
button: {
|
|
743
920
|
padding: "4px 8px 4px 8px",
|
|
@@ -763,7 +940,7 @@ var Pill = ({
|
|
|
763
940
|
}) => {
|
|
764
941
|
const theme = useTheme6();
|
|
765
942
|
const classes = useStyles3();
|
|
766
|
-
return /* @__PURE__ */
|
|
943
|
+
return /* @__PURE__ */ jsx12(
|
|
767
944
|
Button2,
|
|
768
945
|
{
|
|
769
946
|
variant: isSelected ? "contained" : "outlined",
|
|
@@ -775,7 +952,7 @@ var Pill = ({
|
|
|
775
952
|
},
|
|
776
953
|
onClick,
|
|
777
954
|
children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
778
|
-
leftIcon && /* @__PURE__ */
|
|
955
|
+
leftIcon && /* @__PURE__ */ jsx12(
|
|
779
956
|
Icon,
|
|
780
957
|
{
|
|
781
958
|
className: leftIcon,
|
|
@@ -785,8 +962,8 @@ var Pill = ({
|
|
|
785
962
|
"data-testid": "pill-left-icon"
|
|
786
963
|
}
|
|
787
964
|
),
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
rightIcon && /* @__PURE__ */
|
|
965
|
+
/* @__PURE__ */ jsx12(Typography4, { variant: "subtitle", color: "inherit", fontWeight: "bold", children: label }),
|
|
966
|
+
rightIcon && /* @__PURE__ */ jsx12(
|
|
790
967
|
Icon,
|
|
791
968
|
{
|
|
792
969
|
className: rightIcon,
|
|
@@ -805,8 +982,8 @@ var Pill_default = Pill;
|
|
|
805
982
|
// src/IOSSwitch.tsx
|
|
806
983
|
import { styled as styled4 } from "@mui/material/styles";
|
|
807
984
|
import Switch from "@mui/material/Switch";
|
|
808
|
-
import { jsx as
|
|
809
|
-
var IOSSwitch = styled4((props) => /* @__PURE__ */
|
|
985
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
986
|
+
var IOSSwitch = styled4((props) => /* @__PURE__ */ jsx13(Switch, { focusVisibleClassName: ".Mui-focusVisible", disableRipple: true, ...props }))(({ theme }) => ({
|
|
810
987
|
width: 46,
|
|
811
988
|
height: 30,
|
|
812
989
|
padding: 0,
|
|
@@ -856,14 +1033,14 @@ var IOSSwitch_default = IOSSwitch;
|
|
|
856
1033
|
// src/StatusPill.tsx
|
|
857
1034
|
import { Chip } from "@mui/material";
|
|
858
1035
|
import { userStatus } from "@verma-consulting/common-library";
|
|
859
|
-
import { jsx as
|
|
1036
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
860
1037
|
var statusColorMap = {
|
|
861
1038
|
[userStatus.Pending]: "warning",
|
|
862
1039
|
[userStatus.Active]: "success",
|
|
863
1040
|
[userStatus.Inactive]: "error",
|
|
864
1041
|
[userStatus.Invited]: "info"
|
|
865
1042
|
};
|
|
866
|
-
var StatusPill = ({ status }) => /* @__PURE__ */
|
|
1043
|
+
var StatusPill = ({ status }) => /* @__PURE__ */ jsx14(
|
|
867
1044
|
Chip,
|
|
868
1045
|
{
|
|
869
1046
|
label: status,
|
|
@@ -878,7 +1055,7 @@ var StatusPill_default = StatusPill;
|
|
|
878
1055
|
import { useState as useState2 } from "react";
|
|
879
1056
|
import { Tooltip as Tooltip2, IconButton as IconButton4, Popover } from "@mui/material";
|
|
880
1057
|
import { MoreHoriz } from "@mui/icons-material";
|
|
881
|
-
import { Fragment, jsx as
|
|
1058
|
+
import { Fragment, jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
882
1059
|
var FormPopover = ({ row, children, title }) => {
|
|
883
1060
|
const [anchorEl, setAnchorEl] = useState2(null);
|
|
884
1061
|
const handleClick = (event) => {
|
|
@@ -889,7 +1066,7 @@ var FormPopover = ({ row, children, title }) => {
|
|
|
889
1066
|
};
|
|
890
1067
|
const open = Boolean(anchorEl);
|
|
891
1068
|
return /* @__PURE__ */ jsxs8(Fragment, { children: [
|
|
892
|
-
/* @__PURE__ */
|
|
1069
|
+
/* @__PURE__ */ jsx15(Tooltip2, { title, children: /* @__PURE__ */ jsx15(
|
|
893
1070
|
IconButton4,
|
|
894
1071
|
{
|
|
895
1072
|
onClick: handleClick,
|
|
@@ -904,10 +1081,10 @@ var FormPopover = ({ row, children, title }) => {
|
|
|
904
1081
|
backgroundColor: "#f0f0f0"
|
|
905
1082
|
}
|
|
906
1083
|
},
|
|
907
|
-
children: /* @__PURE__ */
|
|
1084
|
+
children: /* @__PURE__ */ jsx15(MoreHoriz, { fontSize: "inherit", color: "primary" })
|
|
908
1085
|
}
|
|
909
1086
|
) }),
|
|
910
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ jsx15(
|
|
911
1088
|
Popover,
|
|
912
1089
|
{
|
|
913
1090
|
open,
|
|
@@ -925,7 +1102,7 @@ var FormPopover = ({ row, children, title }) => {
|
|
|
925
1102
|
var FormPopover_default = FormPopover;
|
|
926
1103
|
|
|
927
1104
|
// src/SearchableSelect.tsx
|
|
928
|
-
import
|
|
1105
|
+
import React7, { useEffect as useEffect2, useRef as useRef2, useState as useState3, useMemo } from "react";
|
|
929
1106
|
import {
|
|
930
1107
|
Autocomplete,
|
|
931
1108
|
TextField,
|
|
@@ -936,7 +1113,7 @@ import {
|
|
|
936
1113
|
} from "@mui/material";
|
|
937
1114
|
import { Clear as Clear2 } from "@mui/icons-material";
|
|
938
1115
|
import { makeStyles as makeStyles4 } from "@mui/styles";
|
|
939
|
-
import { Fragment as Fragment2, jsx as
|
|
1116
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
940
1117
|
var useStyles4 = makeStyles4(() => ({
|
|
941
1118
|
defaultMode: {
|
|
942
1119
|
padding: "14px 8px",
|
|
@@ -955,7 +1132,7 @@ var useStyles4 = makeStyles4(() => ({
|
|
|
955
1132
|
whiteSpace: "pre-wrap"
|
|
956
1133
|
}
|
|
957
1134
|
}));
|
|
958
|
-
var SearchableSelect =
|
|
1135
|
+
var SearchableSelect = React7.memo(
|
|
959
1136
|
({
|
|
960
1137
|
name,
|
|
961
1138
|
label,
|
|
@@ -1023,7 +1200,7 @@ var SearchableSelect = React6.memo(
|
|
|
1023
1200
|
}
|
|
1024
1201
|
}, [selected, multiple]);
|
|
1025
1202
|
const isValueEmpty = !value.trim();
|
|
1026
|
-
return editMode ? /* @__PURE__ */
|
|
1203
|
+
return editMode ? /* @__PURE__ */ jsx16(FormControl2, { fullWidth: true, style, disabled, size, children: /* @__PURE__ */ jsx16(
|
|
1027
1204
|
Autocomplete,
|
|
1028
1205
|
{
|
|
1029
1206
|
multiple,
|
|
@@ -1053,7 +1230,7 @@ var SearchableSelect = React6.memo(
|
|
|
1053
1230
|
autoHighlight: true,
|
|
1054
1231
|
getOptionLabel: (option) => option.label,
|
|
1055
1232
|
isOptionEqualToValue: (option, val) => option.value === val.value,
|
|
1056
|
-
renderInput: (params) => /* @__PURE__ */
|
|
1233
|
+
renderInput: (params) => /* @__PURE__ */ jsx16(
|
|
1057
1234
|
TextField,
|
|
1058
1235
|
{
|
|
1059
1236
|
...params,
|
|
@@ -1063,7 +1240,7 @@ var SearchableSelect = React6.memo(
|
|
|
1063
1240
|
inputRef,
|
|
1064
1241
|
InputProps: {
|
|
1065
1242
|
...params.InputProps,
|
|
1066
|
-
endAdornment: /* @__PURE__ */
|
|
1243
|
+
endAdornment: /* @__PURE__ */ jsx16(Fragment2, { children: !isValueEmpty && /* @__PURE__ */ jsx16(
|
|
1067
1244
|
IconButton5,
|
|
1068
1245
|
{
|
|
1069
1246
|
"aria-label": `clear ${name}`,
|
|
@@ -1073,7 +1250,7 @@ var SearchableSelect = React6.memo(
|
|
|
1073
1250
|
backgroundColor: "transparent",
|
|
1074
1251
|
boxShadow: "none"
|
|
1075
1252
|
},
|
|
1076
|
-
children: /* @__PURE__ */
|
|
1253
|
+
children: /* @__PURE__ */ jsx16(Clear2, { fontSize: "inherit" })
|
|
1077
1254
|
}
|
|
1078
1255
|
) })
|
|
1079
1256
|
}
|
|
@@ -1097,8 +1274,8 @@ var SearchableSelect = React6.memo(
|
|
|
1097
1274
|
className: classes.defaultMode,
|
|
1098
1275
|
style,
|
|
1099
1276
|
children: [
|
|
1100
|
-
/* @__PURE__ */
|
|
1101
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx16(FormLabel2, { className: classes.formLabel, children: label }),
|
|
1278
|
+
/* @__PURE__ */ jsx16(Typography5, { className: classes.formValue, children: displayValue })
|
|
1102
1279
|
]
|
|
1103
1280
|
}
|
|
1104
1281
|
);
|
|
@@ -1117,7 +1294,7 @@ import {
|
|
|
1117
1294
|
useMediaQuery as useMediaQuery3
|
|
1118
1295
|
} from "@mui/material";
|
|
1119
1296
|
import { Close as Close2 } from "@mui/icons-material";
|
|
1120
|
-
import { jsx as
|
|
1297
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1121
1298
|
var FormDrawer = ({
|
|
1122
1299
|
open,
|
|
1123
1300
|
setOpen,
|
|
@@ -1143,9 +1320,9 @@ var FormDrawer = ({
|
|
|
1143
1320
|
}
|
|
1144
1321
|
},
|
|
1145
1322
|
children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
/* @__PURE__ */
|
|
1323
|
+
/* @__PURE__ */ jsx17(Box6, { p: 3, borderBottom: "1px solid #eee", children: /* @__PURE__ */ jsxs10(Grid2, { container: true, children: [
|
|
1324
|
+
/* @__PURE__ */ jsx17(Grid2, { item: true, children: title && /* @__PURE__ */ jsx17(Typography6, { variant: "h6", fontWeight: "bold", children: title }) }),
|
|
1325
|
+
/* @__PURE__ */ jsx17(Grid2, { item: true, children: /* @__PURE__ */ jsx17(
|
|
1149
1326
|
IconButton6,
|
|
1150
1327
|
{
|
|
1151
1328
|
size: "medium",
|
|
@@ -1156,12 +1333,12 @@ var FormDrawer = ({
|
|
|
1156
1333
|
right: 8,
|
|
1157
1334
|
zIndex: 2
|
|
1158
1335
|
},
|
|
1159
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ jsx17(Close2, { fontSize: "inherit" })
|
|
1160
1337
|
}
|
|
1161
1338
|
) })
|
|
1162
1339
|
] }) }),
|
|
1163
|
-
/* @__PURE__ */
|
|
1164
|
-
actions && /* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ jsx17(Box6, { flex: 1, overflow: "auto", p: 3, children }),
|
|
1341
|
+
actions && /* @__PURE__ */ jsx17(
|
|
1165
1342
|
Box6,
|
|
1166
1343
|
{
|
|
1167
1344
|
p: 2,
|
|
@@ -1196,7 +1373,7 @@ import {
|
|
|
1196
1373
|
useMediaQuery as useMediaQuery4
|
|
1197
1374
|
} from "@mui/material";
|
|
1198
1375
|
import { constants } from "@verma-consulting/common-library";
|
|
1199
|
-
import { jsx as
|
|
1376
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1200
1377
|
var PhoneNumberField = ({
|
|
1201
1378
|
value = "",
|
|
1202
1379
|
onChange,
|
|
@@ -1298,7 +1475,7 @@ var PhoneNumberField = ({
|
|
|
1298
1475
|
onBlur == null ? void 0 : onBlur();
|
|
1299
1476
|
}
|
|
1300
1477
|
};
|
|
1301
|
-
return /* @__PURE__ */
|
|
1478
|
+
return /* @__PURE__ */ jsx18(
|
|
1302
1479
|
Box7,
|
|
1303
1480
|
{
|
|
1304
1481
|
ref: wrapperRef,
|
|
@@ -1313,7 +1490,7 @@ var PhoneNumberField = ({
|
|
|
1313
1490
|
alignItems: "center",
|
|
1314
1491
|
sx: { width: "100%" },
|
|
1315
1492
|
children: [
|
|
1316
|
-
/* @__PURE__ */
|
|
1493
|
+
/* @__PURE__ */ jsx18(
|
|
1317
1494
|
TextField2,
|
|
1318
1495
|
{
|
|
1319
1496
|
select: true,
|
|
@@ -1348,7 +1525,7 @@ var PhoneNumberField = ({
|
|
|
1348
1525
|
] }, option.code))
|
|
1349
1526
|
}
|
|
1350
1527
|
),
|
|
1351
|
-
/* @__PURE__ */
|
|
1528
|
+
/* @__PURE__ */ jsx18(
|
|
1352
1529
|
TextField2,
|
|
1353
1530
|
{
|
|
1354
1531
|
label,
|
|
@@ -1397,6 +1574,7 @@ export {
|
|
|
1397
1574
|
SkeletonBar_default as SkeletonBar,
|
|
1398
1575
|
StatusPill_default as StatusPill,
|
|
1399
1576
|
TabPanel_default as TabPanel,
|
|
1577
|
+
TablePagination_default as TablePagination,
|
|
1400
1578
|
ThemeProvider,
|
|
1401
1579
|
createTheme,
|
|
1402
1580
|
makeStyles5 as makeStyles,
|