@codezee/sixtify-brahma 0.2.81 → 0.2.83

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 (69) hide show
  1. package/package.json +1 -1
  2. package/packages/shared-components/dist/AgGrid/ActionCell/ActionCell.js +2 -2
  3. package/packages/shared-components/dist/AgGrid/AgGrid.d.ts.map +1 -1
  4. package/packages/shared-components/dist/AgGrid/AgGrid.js +2 -1
  5. package/packages/shared-components/dist/AgGrid/AgGridStyleProvider.d.ts +4 -0
  6. package/packages/shared-components/dist/AgGrid/AgGridStyleProvider.d.ts.map +1 -0
  7. package/packages/shared-components/dist/AgGrid/AgGridStyleProvider.js +40 -0
  8. package/packages/shared-components/dist/AppBar/AppBar.d.ts.map +1 -1
  9. package/packages/shared-components/dist/AppBar/AppBar.js +4 -1
  10. package/packages/shared-components/dist/AppBar/AppBar.styled.d.ts +1 -1
  11. package/packages/shared-components/dist/AppBar/AppBar.styled.d.ts.map +1 -1
  12. package/packages/shared-components/dist/AppBar/AppBar.styled.js +35 -18
  13. package/packages/shared-components/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  14. package/packages/shared-components/dist/Breadcrumbs/Breadcrumbs.js +16 -1
  15. package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.d.ts.map +1 -1
  16. package/packages/shared-components/dist/CellSelectionTable/CellSelectionTable.js +16 -2
  17. package/packages/shared-components/dist/CellSelectionTable/hook/useOutsideClick.d.ts +4 -0
  18. package/packages/shared-components/dist/CellSelectionTable/hook/useOutsideClick.d.ts.map +1 -0
  19. package/packages/shared-components/dist/CellSelectionTable/hook/useOutsideClick.js +48 -0
  20. package/packages/shared-components/dist/Dialog/DeleteDialog.d.ts.map +1 -1
  21. package/packages/shared-components/dist/Dialog/DeleteDialog.js +2 -1
  22. package/packages/shared-components/dist/Dialog/Dialog.d.ts.map +1 -1
  23. package/packages/shared-components/dist/Dialog/Dialog.js +9 -2
  24. package/packages/shared-components/dist/Dialog/DialogActions.Styled.d.ts +10 -0
  25. package/packages/shared-components/dist/Dialog/DialogActions.Styled.d.ts.map +1 -0
  26. package/packages/shared-components/dist/Dialog/DialogActions.Styled.js +21 -0
  27. package/packages/shared-components/dist/Dialog/DialogContent.Styled.d.ts +3 -0
  28. package/packages/shared-components/dist/Dialog/DialogContent.Styled.d.ts.map +1 -0
  29. package/packages/shared-components/dist/Dialog/DialogContent.Styled.js +9 -0
  30. package/packages/shared-components/dist/Dialog/SaveDialog.d.ts.map +1 -1
  31. package/packages/shared-components/dist/Dialog/SaveDialog.js +2 -1
  32. package/packages/shared-components/dist/Drawer/Drawer.d.ts.map +1 -1
  33. package/packages/shared-components/dist/Drawer/Drawer.js +4 -1
  34. package/packages/shared-components/dist/Drawer/Drawer.styled.d.ts +2 -2
  35. package/packages/shared-components/dist/Drawer/Drawer.styled.d.ts.map +1 -1
  36. package/packages/shared-components/dist/Drawer/Drawer.styled.js +41 -36
  37. package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts +2 -1
  38. package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.d.ts.map +1 -1
  39. package/packages/shared-components/dist/FormFields/Autocomplete/Autocomplete.js +2 -2
  40. package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts +2 -1
  41. package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.d.ts.map +1 -1
  42. package/packages/shared-components/dist/FormFields/DatePicker/DatePicker.js +24 -7
  43. package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.d.ts.map +1 -1
  44. package/packages/shared-components/dist/FormFields/DateTimePicker/DateTimePicker.js +26 -9
  45. package/packages/shared-components/dist/Layouts/ButtonContainer.d.ts +8 -0
  46. package/packages/shared-components/dist/Layouts/ButtonContainer.d.ts.map +1 -0
  47. package/packages/shared-components/dist/Layouts/ButtonContainer.js +12 -0
  48. package/packages/shared-components/dist/Layouts/FormGridLayout.d.ts +2 -1
  49. package/packages/shared-components/dist/Layouts/FormGridLayout.d.ts.map +1 -1
  50. package/packages/shared-components/dist/Layouts/FormGridLayout.js +9 -3
  51. package/packages/shared-components/dist/Layouts/MasterPageLayout.d.ts +15 -0
  52. package/packages/shared-components/dist/Layouts/MasterPageLayout.d.ts.map +1 -0
  53. package/packages/shared-components/dist/Layouts/MasterPageLayout.js +26 -0
  54. package/packages/shared-components/dist/Layouts/index.d.ts +2 -0
  55. package/packages/shared-components/dist/Layouts/index.d.ts.map +1 -1
  56. package/packages/shared-components/dist/Layouts/index.js +2 -0
  57. package/packages/shared-components/dist/Tooltip/Tooltip.d.ts.map +1 -1
  58. package/packages/shared-components/dist/Tooltip/Tooltip.js +13 -2
  59. package/packages/shared-components/dist/UserProfileMenu/UserProfileMenu.js +1 -1
  60. package/packages/shared-components/dist/utils/hooks/useDialogActions.d.ts +1 -1
  61. package/packages/shared-components/dist/utils/hooks/useDialogActions.d.ts.map +1 -1
  62. package/packages/shared-components/dist/utils/hooks/useGetDeviceType.d.ts +5 -0
  63. package/packages/shared-components/dist/utils/hooks/useGetDeviceType.d.ts.map +1 -0
  64. package/packages/shared-components/dist/utils/hooks/useGetDeviceType.js +20 -0
  65. package/packages/shared-components/dist/utils/index.d.ts +1 -0
  66. package/packages/shared-components/dist/utils/index.d.ts.map +1 -1
  67. package/packages/shared-components/dist/utils/index.js +1 -0
  68. package/packages/shared-components/dist/utils/theme/typography.d.ts.map +1 -1
  69. package/packages/shared-components/dist/utils/theme/typography.js +44 -11
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.81",
3
+ "version": "0.2.83",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -19,10 +19,10 @@ const ActionCell = ({ items, disabled }) => {
19
19
  setAnchorEl(event.currentTarget);
20
20
  };
21
21
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { width: "100%" }, children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, { component: "div", sx: { cursor: "pointer", alignItems: "center", width: "100%" }, onClick: HandleClick, disabled: disabled, children: (0, jsx_runtime_1.jsx)(MoreVert_1.default, {}) }), !!anchorEl && ((0, jsx_runtime_1.jsx)(Popover_1.Popover, { open: true, anchorEl: anchorEl, onClose: HandleClose, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "2px" }, children: items.map((item) => {
22
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemButton, { sx: { width: "100%", textAlign: "center" }, onClick: () => {
22
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.ListItemButton, { sx: { width: "100%", textAlign: "start" }, onClick: () => {
23
23
  item?.onClick();
24
24
  setAnchorEl(null);
25
- }, children: item.title }) }, item.title));
25
+ }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", children: item.title }) }) }, item.title));
26
26
  }) }) }))] }));
27
27
  };
28
28
  exports.ActionCell = ActionCell;
@@ -1 +1 @@
1
- {"version":3,"file":"AgGrid.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAIjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,eAAe,UAAqB,CAAC;AAGlD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAC5D,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM,EAmFd,UAAU,CAAC"}
1
+ {"version":3,"file":"AgGrid.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGrid.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAKjC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,eAAe,UAAqB,CAAC;AAGlD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,GAAG;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,UAAU,GAAG,KAAK,CAAC,yBAAyB,CAAC,WAAW,CAAC,GAC5D,CAAC,CAAC,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,CAAC;AAElE,eAAO,MAAM,MAAM,EAmFd,UAAU,CAAC"}
@@ -6,6 +6,7 @@ const material_1 = require("@mui/material");
6
6
  const ag_grid_react_1 = require("ag-grid-react");
7
7
  const react_1 = require("react");
8
8
  const PadBox_1 = require("../PadBox");
9
+ const AgGridStyleProvider_1 = require("./AgGridStyleProvider");
9
10
  exports.defaultPageSize = 50;
10
11
  exports.pageSizeOptions = [20, 50, 100, 200];
11
12
  exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
@@ -34,6 +35,6 @@ exports.AgGrid = (0, react_1.forwardRef)((props, ref) => {
34
35
  backgroundColor: color.butterflyBlue[700],
35
36
  }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", children: "No result found" }) }));
36
37
  }
37
- return ((0, jsx_runtime_1.jsxs)("div", { className: "ag-theme-quartz ", style: { width: "100%", height, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: ref, cacheBlockSize: cacheBlockSize, defaultColDef: defaultColDef, rowHeight: rowHeight, rowModelType: rowModelType, rowBuffer: rowBuffer, infiniteInitialRowCount: infiniteInitialRowCount, overlayNoRowsTemplate: overlayNoRowsTemplate, pagination: pagination, ...(pagination ? { paginationPageSize: exports.defaultPageSize } : {}), paginationPageSizeSelector: pagination ? exports.pageSizeOptions : false, ...rest }), !!props.selectedItems && pagination && ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "absolute", bottom: "15px", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: "20px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: ["Selected Rows ", props.selectedItems] }) }) }))] }));
38
+ return ((0, jsx_runtime_1.jsxs)(AgGridStyleProvider_1.AgGridStyleProvider, { className: "ag-theme-quartz ", style: { width: "100%", height, position: "relative" }, children: [(0, jsx_runtime_1.jsx)(ag_grid_react_1.AgGridReact, { ref: ref, cacheBlockSize: cacheBlockSize, defaultColDef: defaultColDef, rowHeight: rowHeight, rowModelType: rowModelType, rowBuffer: rowBuffer, infiniteInitialRowCount: infiniteInitialRowCount, overlayNoRowsTemplate: overlayNoRowsTemplate, pagination: pagination, ...(pagination ? { paginationPageSize: exports.defaultPageSize } : {}), paginationPageSizeSelector: pagination ? exports.pageSizeOptions : false, ...rest }), !!props.selectedItems && pagination && ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "absolute", bottom: "15px", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: "20px" }, children: (0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "body2", children: ["Selected Rows ", props.selectedItems] }) }) }))] }));
38
39
  });
39
40
  exports.AgGrid.displayName = "AgGrid";
@@ -0,0 +1,4 @@
1
+ import type { StyledComponent } from "@emotion/styled";
2
+ import type { BoxProps } from "@mui/material";
3
+ export declare const AgGridStyleProvider: StyledComponent<BoxProps>;
4
+ //# sourceMappingURL=AgGridStyleProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgGridStyleProvider.d.ts","sourceRoot":"","sources":["../../src/AgGrid/AgGridStyleProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG9C,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAAC,QAAQ,CAyCzD,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgGridStyleProvider = void 0;
4
+ const material_1 = require("@mui/material");
5
+ exports.AgGridStyleProvider = (0, material_1.styled)(material_1.Box)(({ theme }) => ({
6
+ width: "100%",
7
+ height: "100%",
8
+ position: "relative",
9
+ "& .ag-paging-panel": {
10
+ display: "flex",
11
+ flexWrap: "wrap",
12
+ gap: "8px",
13
+ padding: "8px",
14
+ },
15
+ "& .ag-paging-page-summary-panel": {
16
+ fontSize: "14px",
17
+ },
18
+ "& .ag-paging-button": {
19
+ minWidth: "28px",
20
+ },
21
+ [theme.breakpoints.down("sm")]: {
22
+ "& .ag-paging-panel": {
23
+ flexDirection: "row",
24
+ alignItems: "center",
25
+ justifyContent: "center",
26
+ gap: "5px",
27
+ height: "60px",
28
+ margin: 0,
29
+ },
30
+ "& .ag-paging-button, & .ag-paging-page-summary-panel": {
31
+ fontSize: "12px",
32
+ },
33
+ "& .ag-paging-page-size": {
34
+ display: "none",
35
+ },
36
+ "& .ag-paging-row-summary-panel": {
37
+ margin: 0,
38
+ },
39
+ },
40
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,2BAGpB,iBAAiB,CAAC,WAAW,CAAC,4CAMhC,CAAC"}
1
+ {"version":3,"file":"AppBar.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/C,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,2BAGpB,iBAAiB,CAAC,WAAW,CAAC,4CAkBhC,CAAC"}
@@ -4,8 +4,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.AppBar = void 0;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const material_1 = require("@mui/material");
7
+ const PadBox_1 = require("../PadBox");
7
8
  const AppBar_styled_1 = require("./AppBar.styled");
8
9
  const AppBar = ({ drawerOpen, children, }) => {
9
- return ((0, jsx_runtime_1.jsx)(AppBar_styled_1.StyledAppBar, { position: "fixed", open: drawerOpen, children: (0, jsx_runtime_1.jsx)(material_1.Toolbar, { children: children }) }));
10
+ return ((0, jsx_runtime_1.jsx)(AppBar_styled_1.StyledAppBar, { position: "fixed", open: drawerOpen, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", alignItems: "center", minHeight: { xs: "58px", lg: "64px" }, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: {
11
+ padding: { lg: "0 20px", xs: "0px 5px" },
12
+ }, children: children }) }) }));
10
13
  };
11
14
  exports.AppBar = AppBar;
@@ -1,4 +1,4 @@
1
- import type { AppBarProps as MuiAppBarProps } from "@mui/material/AppBar";
1
+ import { type AppBarProps as MuiAppBarProps } from "@mui/material/AppBar";
2
2
  import type { ComponentType } from "react";
3
3
  type StyledAppBarProps = {
4
4
  open?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"AppBar.styled.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.styled.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,cAAc,CAAC;AAEnB,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAuBvD,CAAC"}
1
+ {"version":3,"file":"AppBar.styled.d.ts","sourceRoot":"","sources":["../../src/AppBar/AppBar.styled.tsx"],"names":[],"mappings":"AAAA,OAAkB,EAChB,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,cAAc,CAAC;AAEnB,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAgDxD,CAAC"}
@@ -4,26 +4,43 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.StyledAppBar = void 0;
7
- const material_1 = require("@mui/material");
8
7
  const AppBar_1 = __importDefault(require("@mui/material/AppBar"));
9
- exports.StyledAppBar = (0, material_1.styled)(AppBar_1.default, {
8
+ const styles_1 = require("@mui/material/styles");
9
+ exports.StyledAppBar = (0, styles_1.styled)(AppBar_1.default, {
10
10
  shouldForwardProp: (prop) => prop !== "open",
11
- })(({ theme, open }) => ({
12
- background: theme.palette.app.color.iron[600],
13
- boxShadow: "unset",
14
- zIndex: theme.zIndex.drawer + 1,
15
- transition: theme.transitions.create(["width", "margin"], {
16
- easing: theme.transitions.easing.sharp,
17
- duration: theme.transitions.duration.leavingScreen,
18
- }),
19
- marginLeft: "80px",
20
- width: "calc(100% - 80px)",
21
- ...(open && {
22
- marginLeft: "300px",
23
- width: "calc(100% - 300px)",
11
+ })(({ theme, open }) => {
12
+ const drawerWidth = 300;
13
+ const collapsedWidth = 80;
14
+ const mobileOffset = open ? collapsedWidth : 0;
15
+ const desktopOffset = open ? drawerWidth : collapsedWidth;
16
+ return {
17
+ background: theme.palette.app.color.iron[600],
18
+ boxShadow: "unset",
19
+ zIndex: theme.zIndex.drawer + 1,
24
20
  transition: theme.transitions.create(["width", "margin"], {
25
21
  easing: theme.transitions.easing.sharp,
26
- duration: theme.transitions.duration.enteringScreen,
22
+ duration: theme.transitions.duration.standard,
27
23
  }),
28
- }),
29
- }));
24
+ width: "100%",
25
+ [theme.breakpoints.down("md")]: {
26
+ paddingLeft: "0px",
27
+ paddingRight: "0px",
28
+ marginLeft: `${mobileOffset}px`,
29
+ width: `calc(100% - ${mobileOffset}px)`,
30
+ },
31
+ [theme.breakpoints.up("md")]: {
32
+ paddingLeft: "0px",
33
+ paddingRight: "0px",
34
+ marginLeft: `${desktopOffset}px`,
35
+ width: `calc(100% - ${desktopOffset}px)`,
36
+ },
37
+ ...(open && {
38
+ marginLeft: "300px",
39
+ width: "calc(100% - 300px)",
40
+ transition: theme.transitions.create(["width", "margin"], {
41
+ easing: theme.transitions.easing.sharp,
42
+ duration: theme.transitions.duration.enteringScreen,
43
+ }),
44
+ }),
45
+ };
46
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,eAAe,4CAsDrD,CAAC"}
1
+ {"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,KAAK,cAAc,GAAG;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,WAAW,eAAe,4CAuErD,CAAC"}
@@ -7,7 +7,22 @@ const uuid_1 = require("uuid");
7
7
  const Breadcrumbs = ({ items }) => {
8
8
  const theme = (0, material_1.useTheme)();
9
9
  const { butterflyBlue } = theme.palette.app.color;
10
- return ((0, jsx_runtime_1.jsx)(material_1.Breadcrumbs, { children: items.map((item) => {
10
+ return ((0, jsx_runtime_1.jsx)(material_1.Breadcrumbs, { sx: {
11
+ display: "flex",
12
+ flexWrap: "nowrap",
13
+ overflowX: "auto",
14
+ whiteSpace: "nowrap",
15
+ "& .MuiBreadcrumbs-ol": {
16
+ display: "flex",
17
+ flexWrap: "nowrap",
18
+ },
19
+ "& .MuiBreadcrumbs-li": {
20
+ whiteSpace: "nowrap",
21
+ },
22
+ "&::-webkit-scrollbar": {
23
+ display: "none",
24
+ },
25
+ }, children: items.map((item) => {
11
26
  const { icon, text, onClick } = item;
12
27
  if (onClick) {
13
28
  return ((0, jsx_runtime_1.jsxs)(material_1.Link, { underline: "hover", sx: { display: "flex", alignItems: "center" }, onClick: (e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CellSelectionTable.d.ts","sourceRoot":"","sources":["../../src/CellSelectionTable/CellSelectionTable.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAYf,OAAO,KAAK,EACV,SAAS,EACT,MAAM,EAGP,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,IAAI,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,eAAe,EAAE,CACf,aAAa,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,EACtC,CAAC,EAAE,UAAU,KACV,IAAI,CAAC;IACV,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,oFAQhC,QAAQ,CAAC,uBAAuB,CAAC,4CA0XnC,CAAC"}
1
+ {"version":3,"file":"CellSelectionTable.d.ts","sourceRoot":"","sources":["../../src/CellSelectionTable/CellSelectionTable.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAaf,OAAO,KAAK,EACV,SAAS,EACT,MAAM,EAGP,MAAM,eAAe,CAAC;AAEvB,MAAM,MAAM,IAAI,GAAG;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,eAAe,EAAE,CACf,aAAa,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,EACtC,CAAC,EAAE,UAAU,KACV,IAAI,CAAC;IACV,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CAC/C,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,oFAQhC,QAAQ,CAAC,uBAAuB,CAAC,4CA4YnC,CAAC"}
@@ -6,6 +6,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
6
6
  const material_1 = require("@mui/material");
7
7
  const react_1 = require("react");
8
8
  const Tooltip_1 = require("../Tooltip");
9
+ const useOutsideClick_1 = require("./hook/useOutsideClick");
9
10
  const useStickyColumns_1 = require("./hook/useStickyColumns");
10
11
  const EmployeeCell_1 = require("./SubComponents/EmployeeCell");
11
12
  const TableBodyLoader_1 = require("./SubComponents/TableBodyLoader");
@@ -14,12 +15,23 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
14
15
  const theme = (0, material_1.useTheme)();
15
16
  const { slate, iron, butterflyBlue } = theme.palette.app.color;
16
17
  const selectingRef = (0, react_1.useRef)(false);
18
+ const tableRef = (0, react_1.useRef)(null);
17
19
  const selectionModeRef = (0, react_1.useRef)("add");
18
20
  const anchorRef = (0, react_1.useRef)(null);
19
21
  const hoveringRef = (0, react_1.useRef)(null);
20
22
  const [selectedRanges, setSelectedRanges] = (0, react_1.useState)([]);
21
23
  const [currentSelectedRanges, setCurrentSelectedRanges] = (0, react_1.useState)([]);
22
24
  const { stickyMap } = (0, useStickyColumns_1.useStickyColumns)(columns);
25
+ (0, useOutsideClick_1.useOutsideClick)(tableRef, () => {
26
+ setSelectedRanges([]);
27
+ setCurrentSelectedRanges([]);
28
+ });
29
+ (0, react_1.useMemo)(() => {
30
+ if (loading && selectedRanges.length > 0) {
31
+ setSelectedRanges([]);
32
+ setCurrentSelectedRanges([]);
33
+ }
34
+ }, [loading]);
23
35
  const isSelectedCell = (rowIndex, colIndex) => {
24
36
  if (selectedRanges.length === 0 && currentSelectedRanges.length === 0) {
25
37
  return false;
@@ -59,7 +71,8 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
59
71
  return iron[600];
60
72
  }
61
73
  const handleCellMouseDown = (0, react_1.useCallback)((ri, ci) => (e) => {
62
- if (columns[ci]?.disableSelection) {
74
+ e.preventDefault();
75
+ if (columns[ci]?.disableSelection && ci > 0) {
63
76
  const nextSelectableIndex = columns.findIndex((col, index) => !col.disableSelection && index > ci);
64
77
  if (nextSelectableIndex !== -1) {
65
78
  return (0, helper_1.handleMouseDown)({
@@ -153,7 +166,8 @@ const CellSelectionTable = ({ columns, data, onCellSelection, cellColors, height
153
166
  onCellSelection,
154
167
  });
155
168
  }, [onCellSelection, selectedRanges]);
156
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "relative", overflow: "auto", height: height, bgcolor: iron[600], children: (0, jsx_runtime_1.jsxs)(material_1.Table, { stickyHeader: true, sx: {
169
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { position: "relative", overflow: "auto", height: height, bgcolor: iron[600], children: (0, jsx_runtime_1.jsxs)(material_1.Table, { ref: tableRef, stickyHeader: true, sx: {
170
+ userSelect: "none",
157
171
  borderCollapse: "separate",
158
172
  borderSpacing: 0,
159
173
  "& th, & td": {
@@ -0,0 +1,4 @@
1
+ import { type RefObject } from "react";
2
+ export declare function isClickInsideAnyOverlay(event: MouseEvent): boolean;
3
+ export declare function useOutsideClick<T extends HTMLElement>(ref: RefObject<T>, onOutsideClick: () => void): void;
4
+ //# sourceMappingURL=useOutsideClick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOutsideClick.d.ts","sourceRoot":"","sources":["../../../src/CellSelectionTable/hook/useOutsideClick.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAWlD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAsBlE;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACnD,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,EACjB,cAAc,EAAE,MAAM,IAAI,QAyB3B"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isClickInsideAnyOverlay = isClickInsideAnyOverlay;
4
+ exports.useOutsideClick = useOutsideClick;
5
+ const react_1 = require("react");
6
+ const OVERLAY_ROLES = new Set([
7
+ "dialog",
8
+ "alertdialog",
9
+ "menu",
10
+ "listbox",
11
+ "tooltip",
12
+ "combobox",
13
+ ]);
14
+ function isClickInsideAnyOverlay(event) {
15
+ const path = (event.composedPath ? event.composedPath() : []);
16
+ for (const node of path) {
17
+ if (!(node instanceof Element)) {
18
+ continue;
19
+ }
20
+ if (node.getAttribute("aria-modal") === "true") {
21
+ return true;
22
+ }
23
+ const role = node.getAttribute("role");
24
+ if (role && OVERLAY_ROLES.has(role)) {
25
+ return true;
26
+ }
27
+ }
28
+ return getComputedStyle(document.body).overflow === "hidden";
29
+ }
30
+ function useOutsideClick(ref, onOutsideClick) {
31
+ (0, react_1.useEffect)(() => {
32
+ const handleMouseDown = (event) => {
33
+ if (isClickInsideAnyOverlay(event)) {
34
+ return;
35
+ }
36
+ const target = event.target;
37
+ const el = ref.current;
38
+ if (el && el.contains(target)) {
39
+ return;
40
+ }
41
+ onOutsideClick();
42
+ };
43
+ document.addEventListener("mousedown", handleMouseDown);
44
+ return () => {
45
+ document.removeEventListener("mousedown", handleMouseDown);
46
+ };
47
+ }, [ref, onOutsideClick]);
48
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"DeleteDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/DeleteDialog.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,sDAM1B,iBAAiB,4CA4BnB,CAAC"}
1
+ {"version":3,"file":"DeleteDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/DeleteDialog.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,sDAM1B,iBAAiB,4CA4BnB,CAAC"}
@@ -9,7 +9,8 @@ const InfoTwoTone_1 = __importDefault(require("@mui/icons-material/InfoTwoTone")
9
9
  const material_1 = require("@mui/material");
10
10
  const Button_1 = require("../Button");
11
11
  const Dialog_1 = require("./Dialog");
12
+ const Layouts_1 = require("../Layouts");
12
13
  const DeleteDialog = ({ title, open, isDeleteLoading, onDelete, onClose, }) => {
13
- return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { maxWidth: "xs", isHideCloseIcon: true, isHideDividers: true, open: open, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5px", children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClose, variant: "outlined", children: "Cancel" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onDelete, color: "error", loading: isDeleteLoading, children: "Delete" })] }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", children: [(0, jsx_runtime_1.jsx)(InfoTwoTone_1.default, { color: "error", sx: { mt: "1px" } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle1", fontWeight: 700, children: title })] }) }));
14
+ return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { maxWidth: "xs", isHideCloseIcon: true, isHideDividers: true, open: open, actions: (0, jsx_runtime_1.jsxs)(Layouts_1.ButtonContainer, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClose, variant: "outlined", children: "Cancel" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onDelete, color: "error", loading: isDeleteLoading, children: "Delete" })] }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", children: [(0, jsx_runtime_1.jsx)(InfoTwoTone_1.default, { color: "error", sx: { mt: "1px" } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle1", fontWeight: 700, children: title })] }) }));
14
15
  };
15
16
  exports.DeleteDialog = DeleteDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAQL,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,MAAM,MAAM,WAAW,GAAG,iBAAiB,CACzC,cAAc,GAAG;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,kFAQpB,WAAW,4CA6Bb,CAAC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AACA,OAAO,EAML,KAAK,WAAW,IAAI,cAAc,EACnC,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK1D,MAAM,MAAM,WAAW,GAAG,iBAAiB,CACzC,cAAc,GAAG;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CACF,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,kFAQpB,WAAW,4CAuCb,CAAC"}
@@ -7,8 +7,15 @@ exports.Dialog = void 0;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const HighlightOff_1 = __importDefault(require("@mui/icons-material/HighlightOff"));
9
9
  const material_1 = require("@mui/material");
10
- const PadBox_1 = require("../PadBox");
10
+ const utils_1 = require("../utils");
11
+ const DialogContent_Styled_1 = require("./DialogContent.Styled");
12
+ const DialogActions_Styled_1 = require("./DialogActions.Styled");
11
13
  const Dialog = ({ title, isHideCloseIcon = false, isHideDividers = false, children, onClose, actions, ...props }) => {
12
- return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { fullWidth: true, ...props, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { textAlign: "center", children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h5", fontWeight: 500, flex: 1, children: title }), !isHideCloseIcon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: (event) => onClose && onClose(event, "escapeKeyDown"), color: "secondary", children: (0, jsx_runtime_1.jsx)(HighlightOff_1.default, { fontSize: "large" }) }))] }) }), (0, jsx_runtime_1.jsx)(material_1.DialogContent, { dividers: !isHideDividers, children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: "10px" }, children: children }) }), actions && ((0, jsx_runtime_1.jsx)(material_1.DialogActions, { sx: { py: "16px", px: "24px" }, children: actions }))] }));
14
+ const { layout } = (0, utils_1.useGetDeviceType)();
15
+ return ((0, jsx_runtime_1.jsxs)(material_1.Dialog, { fullWidth: true, ...props, children: [(0, jsx_runtime_1.jsx)(material_1.DialogTitle, { padding: {
16
+ xs: "10px",
17
+ sm: "16px 20px",
18
+ md: "16px 24px",
19
+ }, textAlign: "center", children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", fontWeight: 500, flex: 1, children: title }), !isHideCloseIcon && ((0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: (event) => onClose && onClose(event, "escapeKeyDown"), color: "secondary", size: "small", children: (0, jsx_runtime_1.jsx)(HighlightOff_1.default, { fontSize: layout === "desktop" ? "large" : "medium" }) }))] }) }), (0, jsx_runtime_1.jsx)(DialogContent_Styled_1.StyledDialogContent, { dividers: !isHideDividers, children: children }), actions && (0, jsx_runtime_1.jsx)(DialogActions_Styled_1.StyledDialogActions, { children: actions })] }));
13
20
  };
14
21
  exports.Dialog = Dialog;
@@ -0,0 +1,10 @@
1
+ import type { DialogActionsProps } from "@mui/material/DialogActions";
2
+ import { type Theme } from "@mui/material/styles";
3
+ export declare const getDialogTheme: (theme: Theme) => {
4
+ [x: string]: string | {
5
+ padding: string;
6
+ };
7
+ padding: string;
8
+ };
9
+ export declare const StyledDialogActions: React.ComponentType<DialogActionsProps>;
10
+ //# sourceMappingURL=DialogActions.Styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogActions.Styled.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogActions.Styled.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAU,KAAK,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE1D,eAAO,MAAM,cAAc,GAAI,OAAO,KAAK;;;;;CAYzC,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAGnE,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledDialogActions = exports.getDialogTheme = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const styles_1 = require("@mui/material/styles");
6
+ const getDialogTheme = (theme) => ({
7
+ padding: "16px 24px",
8
+ [theme.breakpoints.up("xs")]: {
9
+ padding: "10px",
10
+ },
11
+ [theme.breakpoints.up("sm")]: {
12
+ padding: "16px 20px",
13
+ },
14
+ [theme.breakpoints.up("md")]: {
15
+ padding: "16px 24px",
16
+ },
17
+ });
18
+ exports.getDialogTheme = getDialogTheme;
19
+ exports.StyledDialogActions = (0, styles_1.styled)(material_1.DialogActions)(({ theme }) => ({
20
+ ...(0, exports.getDialogTheme)(theme),
21
+ }));
@@ -0,0 +1,3 @@
1
+ import { type DialogContentProps } from "@mui/material";
2
+ export declare const StyledDialogContent: React.ComponentType<DialogContentProps>;
3
+ //# sourceMappingURL=DialogContent.Styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContent.Styled.d.ts","sourceRoot":"","sources":["../../src/Dialog/DialogContent.Styled.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAIvE,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,aAAa,CAAC,kBAAkB,CAGnE,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledDialogContent = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const styles_1 = require("@mui/material/styles");
6
+ const DialogActions_Styled_1 = require("./DialogActions.Styled");
7
+ exports.StyledDialogContent = (0, styles_1.styled)(material_1.DialogContent)(({ theme }) => ({
8
+ ...(0, DialogActions_Styled_1.getDialogTheme)(theme),
9
+ }));
@@ -1 +1 @@
1
- {"version":3,"file":"SaveDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/SaveDialog.tsx"],"names":[],"mappings":"AAKA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,kDAMxB,eAAe,4CA8BjB,CAAC"}
1
+ {"version":3,"file":"SaveDialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/SaveDialog.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,kDAMxB,eAAe,4CA8BjB,CAAC"}
@@ -8,10 +8,11 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const InfoTwoTone_1 = __importDefault(require("@mui/icons-material/InfoTwoTone"));
9
9
  const material_1 = require("@mui/material");
10
10
  const Button_1 = require("../Button");
11
+ const Layouts_1 = require("../Layouts");
11
12
  const Dialog_1 = require("./Dialog");
12
13
  const SaveDialog = ({ title, open, isSaveLoading = false, onSave, onClose, }) => {
13
14
  const theme = (0, material_1.useTheme)();
14
15
  const { butterflyBlue } = theme.palette.app.color;
15
- return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { maxWidth: "xs", isHideCloseIcon: true, isHideDividers: true, open: open, actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: "5px", children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClose, variant: "outlined", children: "Cancel" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onSave, loading: isSaveLoading, children: "Save" })] }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", children: [(0, jsx_runtime_1.jsx)(InfoTwoTone_1.default, { htmlColor: butterflyBlue[900], sx: { mt: "1px" } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle1", children: title })] }) }));
16
+ return ((0, jsx_runtime_1.jsx)(Dialog_1.Dialog, { maxWidth: "xs", isHideCloseIcon: true, isHideDividers: true, open: open, actions: (0, jsx_runtime_1.jsxs)(Layouts_1.ButtonContainer, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onClose, variant: "outlined", children: "Cancel" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: onSave, loading: isSaveLoading, children: "Save" })] }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: "10px", direction: "row", children: [(0, jsx_runtime_1.jsx)(InfoTwoTone_1.default, { htmlColor: butterflyBlue[900], sx: { mt: "1px" } }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle1", children: title })] }) }));
16
17
  };
17
18
  exports.SaveDialog = SaveDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,uCAIpB,WAAW,4CAgCb,CAAC"}
1
+ {"version":3,"file":"Drawer.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAUf,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;IACrE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,uCAIpB,WAAW,4CA2Db,CAAC"}
@@ -12,6 +12,7 @@ const react_1 = require("react");
12
12
  const PadBox_1 = require("../PadBox");
13
13
  const AppLogoMedium_1 = require("../Svgs/AppLogo/AppLogoMedium");
14
14
  const AppLogoSmall_1 = require("../Svgs/AppLogo/AppLogoSmall");
15
+ const useGetDeviceType_1 = require("../utils/hooks/useGetDeviceType");
15
16
  const CloseDrawerMenuItemList_1 = require("./CloseDrawer/CloseDrawerMenuItemList");
16
17
  const Drawer_styled_1 = require("./Drawer.styled");
17
18
  const OpenDrawerMenuItemList_1 = require("./OpenDrawer/OpenDrawerMenuItemList");
@@ -20,6 +21,8 @@ const Drawer = ({ menuItems = [], open, currentPathname, }) => {
20
21
  const handleClose = () => {
21
22
  setAnchorEl(null);
22
23
  };
23
- return ((0, jsx_runtime_1.jsxs)(Drawer_styled_1.StyledDrawer, { variant: "permanent", open: open, children: [(0, jsx_runtime_1.jsx)(material_1.Box, { textAlign: "center", children: (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingTop: "1.5rem" }, children: open ? (0, jsx_runtime_1.jsx)(AppLogoMedium_1.AppLogoMedium, {}) : (0, jsx_runtime_1.jsx)(AppLogoSmall_1.AppLogoSmall, {}) }) }), (0, jsx_runtime_1.jsx)(List_1.default, { component: "nav", onMouseLeave: handleClose, children: open ? ((0, jsx_runtime_1.jsx)(OpenDrawerMenuItemList_1.OpenDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname })) : ((0, jsx_runtime_1.jsx)(CloseDrawerMenuItemList_1.CloseDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname, anchorEl: anchorEl, setAnchorEl: setAnchorEl })) })] }));
24
+ const { layout } = (0, useGetDeviceType_1.useGetDeviceType)();
25
+ const isDesktop = layout === "desktop";
26
+ return ((0, jsx_runtime_1.jsxs)(Drawer_styled_1.StyledDrawer, { variant: "permanent", open: open, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { textAlign: "center", children: [isDesktop && ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingTop: "1.5rem" }, children: open ? (0, jsx_runtime_1.jsx)(AppLogoMedium_1.AppLogoMedium, {}) : (0, jsx_runtime_1.jsx)(AppLogoSmall_1.AppLogoSmall, {}) })), !isDesktop && ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingTop: "0.5rem", paddingBottom: "0.5rem" }, children: (0, jsx_runtime_1.jsx)(AppLogoSmall_1.AppLogoSmall, {}) }))] }), isDesktop && ((0, jsx_runtime_1.jsx)(List_1.default, { component: "nav", onMouseLeave: handleClose, children: open ? ((0, jsx_runtime_1.jsx)(OpenDrawerMenuItemList_1.OpenDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname })) : ((0, jsx_runtime_1.jsx)(CloseDrawerMenuItemList_1.CloseDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname, anchorEl: anchorEl, setAnchorEl: setAnchorEl })) })), !isDesktop && ((0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, { onClickAway: handleClose, children: (0, jsx_runtime_1.jsx)(List_1.default, { component: "nav", onMouseLeave: handleClose, children: (0, jsx_runtime_1.jsx)(CloseDrawerMenuItemList_1.CloseDrawerMenuItemList, { menuItems: menuItems, currentPathname: currentPathname, anchorEl: anchorEl, setAnchorEl: setAnchorEl }) }) }))] }));
24
27
  };
25
28
  exports.Drawer = Drawer;
@@ -1,9 +1,9 @@
1
1
  import type { BoxProps, DrawerProps as MuiDrawerProps } from "@mui/material";
2
2
  import type { ComponentType } from "react";
3
3
  export declare const Bullet: ComponentType<BoxProps>;
4
- type StyledDrawerProps = {
4
+ type StyledDrawerProps = MuiDrawerProps & {
5
5
  open?: boolean;
6
- } & MuiDrawerProps;
6
+ };
7
7
  export declare const StyledDrawer: ComponentType<StyledDrawerProps>;
8
8
  export {};
9
9
  //# sourceMappingURL=Drawer.styled.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Drawer.styled.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.styled.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAER,WAAW,IAAI,cAAc,EAE9B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,QAAQ,CAKxC,CAAC;AA2BJ,KAAK,iBAAiB,GAAG;IACvB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,GAAG,cAAc,CAAC;AACnB,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAkBvD,CAAC"}
1
+ {"version":3,"file":"Drawer.styled.d.ts","sourceRoot":"","sources":["../../src/Drawer/Drawer.styled.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EAER,WAAW,IAAI,cAAc,EAE9B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,eAAO,MAAM,MAAM,EAAE,aAAa,CAAC,QAAQ,CAKxC,CAAC;AAEJ,KAAK,iBAAiB,GAAG,cAAc,GAAG;IACxC,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,aAAa,CAAC,iBAAiB,CAiDxD,CAAC"}
@@ -8,41 +8,46 @@ exports.Bullet = (0, material_1.styled)(material_1.Box)(({ theme }) => ({
8
8
  borderRadius: "50%",
9
9
  background: theme.palette.app.color.butterflyBlue[400],
10
10
  }));
11
- const drawerWidth = 300;
12
- const openedMixin = (theme) => ({
13
- width: drawerWidth,
14
- transition: theme.transitions.create("width", {
15
- easing: theme.transitions.easing.sharp,
16
- duration: theme.transitions.duration.enteringScreen,
17
- }),
18
- overflowX: "hidden",
19
- backgroundColor: theme.palette.app.color.mirage[900],
20
- });
21
- const closedMixin = (theme) => ({
22
- transition: theme.transitions.create("width", {
23
- easing: theme.transitions.easing.sharp,
24
- duration: theme.transitions.duration.leavingScreen,
25
- }),
26
- overflowX: "hidden",
27
- width: "80px",
28
- [theme.breakpoints.up("sm")]: {
29
- width: "80px",
30
- },
31
- backgroundColor: theme.palette.app.color.mirage[900],
32
- });
33
11
  exports.StyledDrawer = (0, material_1.styled)(material_1.Drawer, {
34
12
  shouldForwardProp: (prop) => prop !== "open",
35
- })(({ theme, open }) => ({
36
- width: drawerWidth,
37
- flexShrink: 0,
38
- whiteSpace: "nowrap",
39
- boxSizing: "border-box",
40
- ...(open && {
41
- ...openedMixin(theme),
42
- "& .MuiDrawer-paper": openedMixin(theme),
43
- }),
44
- ...(!open && {
45
- ...closedMixin(theme),
46
- "& .MuiDrawer-paper": closedMixin(theme),
47
- }),
48
- }));
13
+ })(({ theme, open }) => {
14
+ const drawerWidth = 300;
15
+ const openedMixin = (theme) => ({
16
+ width: drawerWidth,
17
+ transition: theme.transitions.create("width", {
18
+ easing: theme.transitions.easing.sharp,
19
+ duration: theme.transitions.duration.enteringScreen,
20
+ }),
21
+ overflowX: "hidden",
22
+ backgroundColor: theme.palette.app.color.mirage[900],
23
+ [theme.breakpoints.down("md")]: {
24
+ width: "80px",
25
+ },
26
+ });
27
+ const closedMixin = (theme) => ({
28
+ transition: theme.transitions.create("width", {
29
+ easing: theme.transitions.easing.sharp,
30
+ duration: theme.transitions.duration.leavingScreen,
31
+ }),
32
+ overflowX: "hidden",
33
+ width: "0px",
34
+ [theme.breakpoints.up("md")]: {
35
+ width: "80px",
36
+ },
37
+ backgroundColor: theme.palette.app.color.mirage[900],
38
+ });
39
+ return {
40
+ width: drawerWidth,
41
+ flexShrink: 0,
42
+ whiteSpace: "nowrap",
43
+ boxSizing: "border-box",
44
+ ...(open && {
45
+ ...openedMixin(theme),
46
+ "& .MuiDrawer-paper": openedMixin(theme),
47
+ }),
48
+ ...(!open && {
49
+ ...closedMixin(theme),
50
+ "& .MuiDrawer-paper": closedMixin(theme),
51
+ }),
52
+ };
53
+ });