@codezee/sixtify-brahma 0.2.133 → 0.2.135

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 (39) hide show
  1. package/package.json +1 -1
  2. package/packages/shared-components/dist/ActionButtons/ActionButtons.js +1 -1
  3. package/packages/shared-components/dist/Button/Button.js +1 -1
  4. package/packages/shared-components/dist/FormFields/TextField/TextField.d.ts.map +1 -1
  5. package/packages/shared-components/dist/FormFields/TextField/TextField.js +5 -4
  6. package/packages/shared-components/dist/Svgs/AppLogo/AppLogoSmall.d.ts.map +1 -1
  7. package/packages/shared-components/dist/Svgs/AppLogo/index.d.ts +3 -0
  8. package/packages/shared-components/dist/Svgs/AppLogo/index.d.ts.map +1 -0
  9. package/packages/shared-components/dist/Svgs/AppLogo/index.js +18 -0
  10. package/packages/shared-components/dist/Svgs/SvgBranches.d.ts +8 -0
  11. package/packages/shared-components/dist/Svgs/SvgBranches.d.ts.map +1 -0
  12. package/packages/shared-components/dist/Svgs/SvgBranches.js +23 -0
  13. package/packages/shared-components/dist/Svgs/index.d.ts +11 -0
  14. package/packages/shared-components/dist/Svgs/index.d.ts.map +1 -1
  15. package/packages/shared-components/dist/Svgs/index.js +11 -0
  16. package/packages/shared-components/dist/Tree/DesktopTreeNode.d.ts +10 -0
  17. package/packages/shared-components/dist/Tree/DesktopTreeNode.d.ts.map +1 -0
  18. package/packages/shared-components/dist/Tree/DesktopTreeNode.js +21 -0
  19. package/packages/shared-components/dist/Tree/MobileTreeNode.d.ts +9 -0
  20. package/packages/shared-components/dist/Tree/MobileTreeNode.d.ts.map +1 -0
  21. package/packages/shared-components/dist/Tree/MobileTreeNode.js +17 -0
  22. package/packages/shared-components/dist/Tree/Node.d.ts +9 -0
  23. package/packages/shared-components/dist/Tree/Node.d.ts.map +1 -0
  24. package/packages/shared-components/dist/Tree/Node.js +18 -0
  25. package/packages/shared-components/dist/Tree/Node.styled.d.ts +10 -0
  26. package/packages/shared-components/dist/Tree/Node.styled.d.ts.map +1 -0
  27. package/packages/shared-components/dist/Tree/Node.styled.js +28 -0
  28. package/packages/shared-components/dist/Tree/Tree.d.ts +20 -0
  29. package/packages/shared-components/dist/Tree/Tree.d.ts.map +1 -0
  30. package/packages/shared-components/dist/Tree/Tree.js +147 -0
  31. package/packages/shared-components/dist/Tree/index.d.ts +3 -0
  32. package/packages/shared-components/dist/Tree/index.d.ts.map +1 -0
  33. package/packages/shared-components/dist/Tree/index.js +18 -0
  34. package/packages/shared-components/dist/index.d.ts +1 -0
  35. package/packages/shared-components/dist/index.d.ts.map +1 -1
  36. package/packages/shared-components/dist/index.js +1 -0
  37. package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.d.ts +1 -1
  38. package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.d.ts.map +1 -1
  39. package/packages/shared-components/dist/utils/hooks/useGlobalKeyboardShortcut.js +1 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codezee/sixtify-brahma",
3
- "version": "0.2.133",
3
+ "version": "0.2.135",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hardikranpariya/sixtify-brahma.git"
@@ -9,7 +9,7 @@ const material_1 = require("@mui/material");
9
9
  const noop_1 = __importDefault(require("lodash/noop"));
10
10
  const react_1 = require("react");
11
11
  const utils_1 = require("../utils");
12
- function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOpenMenuOnShortcut = false, shortcutKey = "a", }) {
12
+ function ActionButtons({ buttons, justifyContent = "end", sx, buttonSx, shouldOpenMenuOnShortcut = false, shortcutKey = "n", }) {
13
13
  const [anchorEl, setAnchorEl] = (0, react_1.useState)(null);
14
14
  const [openMenuKey, setOpenMenuKey] = (0, react_1.useState)(null);
15
15
  const buttonRefs = (0, react_1.useRef)({});
@@ -8,7 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const material_1 = require("@mui/material");
9
9
  const isFunction_1 = __importDefault(require("lodash/isFunction"));
10
10
  const utils_1 = require("../utils");
11
- const Button = ({ loading = false, children, disabled = false, enableKeyboardShortcut = true, shortcutKey, modifierKeys = ["ctrl", "alt"], onClick, ...rest }) => {
11
+ const Button = ({ loading = false, children, disabled = false, enableKeyboardShortcut = true, shortcutKey, modifierKeys = ["ctrl", "shift"], onClick, ...rest }) => {
12
12
  (0, utils_1.useGlobalKeyboardShortcut)({
13
13
  key: shortcutKey ?? "",
14
14
  modifierKeys,
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../src/FormFields/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,IAAI,iBAAiB,EACxC,KAAK,UAAU,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACxB,MAAM,iBAAiB,CAAC;AAWzB,MAAM,MAAM,oBAAoB,GAC5B,QAAQ,GACR,eAAe,GACf,uBAAuB,GACvB,gBAAgB,GAChB,oBAAoB,GACpB,QAAQ,CAAC;AAEb,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,CAAC;AAY7D,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,WAAW,IAAI,kBAAkB,CAAC,CAAC,CAAC,GACvE,IAAI,CAAC,iBAAiB,EAAE,MAAM,qBAAqB,CAAC,CAAC,CAAC,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QA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AAe,EACnB,EAAE,cAAc,CAAC,CAAC,CAAC,2CAoJnB"}
@@ -73,7 +73,8 @@ function TextField({ control, name, defaultValue, label = "", rules, type, requi
73
73
  } }) }))] })), (0, jsx_runtime_1.jsx)(material_1.TextField, { disabled: disabled, required: required, fullWidth: true, onKeyDown: handleKeyDown, placeholder: styling === "default" ? placeholder : placeholder || label, type: type, label: styling === "default" ? label : undefined, sx: (0, commonStyles_1.getDefaultTextFieldSx)(styling), InputLabelProps: (0, commonStyles_1.getDefaultInputLabelProps)(styling), inputProps: {
74
74
  min: 0,
75
75
  }, error: Boolean(error), helperText: error?.message, onChange: (event) => {
76
- const { selectionStart, selectionEnd, setSelectionRange } = event.target;
76
+ const input = event.target;
77
+ const { selectionStart, selectionEnd } = input;
77
78
  let value = event.target.value || null;
78
79
  if (typeof value === "string" && value.trim() === "") {
79
80
  value = null;
@@ -97,8 +98,8 @@ function TextField({ control, name, defaultValue, label = "", rules, type, requi
97
98
  else {
98
99
  onChange(cleanedVal);
99
100
  }
100
- setTimeout(() => {
101
- setSelectionRange(selectionStart, selectionEnd);
102
- }, 0);
101
+ requestAnimationFrame(() => {
102
+ input.setSelectionRange(selectionStart, selectionEnd);
103
+ });
103
104
  }, value: typeof value === "string" ? value.trimStart() : (value ?? ""), ...restField, ...inputFieldProps })] }));
104
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AppLogoSmall.d.ts","sourceRoot":"","sources":["../../../src/Svgs/AppLogo/AppLogoSmall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,eAAO,MAAM,YAAY,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CA8C1D,CAAC"}
1
+ {"version":3,"file":"AppLogoSmall.d.ts","sourceRoot":"","sources":["../../../src/Svgs/AppLogo/AppLogoSmall.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,eAAO,MAAM,YAAY,GAAI,OAAO,QAAQ,CAAC,aAAa,CAAC,4CA8C1D,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./AppLogoMedium";
2
+ export * from "./AppLogoSmall";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Svgs/AppLogo/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./AppLogoMedium"), exports);
18
+ __exportStar(require("./AppLogoSmall"), exports);
@@ -0,0 +1,8 @@
1
+ export type PathDefinition = {
2
+ definition: string;
3
+ };
4
+ export declare const SvgBranches: import("react").ForwardRefExoticComponent<Readonly<{
5
+ paths: PathDefinition[];
6
+ strokeColor?: string;
7
+ }> & import("react").RefAttributes<SVGSVGElement>>;
8
+ //# sourceMappingURL=SvgBranches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SvgBranches.d.ts","sourceRoot":"","sources":["../../src/Svgs/SvgBranches.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG;IAC3B,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAOF,eAAO,MAAM,WAAW;WAJf,cAAc,EAAE;kBACT,MAAM;kDAqCrB,CAAC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SvgBranches = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const material_1 = require("@mui/material");
9
+ const map_1 = __importDefault(require("lodash/map"));
10
+ const react_1 = require("react");
11
+ exports.SvgBranches = (0, react_1.forwardRef)(({ paths, strokeColor }, ref) => {
12
+ const theme = (0, material_1.useTheme)();
13
+ const { butterflyBlue } = theme.palette.app.color;
14
+ const color = strokeColor ?? butterflyBlue[900];
15
+ return ((0, jsx_runtime_1.jsx)("svg", { ref: ref, style: {
16
+ position: "absolute",
17
+ left: 0,
18
+ top: 0,
19
+ pointerEvents: "none",
20
+ overflow: "visible",
21
+ }, children: (0, map_1.default)(paths, ({ definition }) => ((0, jsx_runtime_1.jsx)("path", { d: definition, stroke: color, strokeWidth: 2, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", opacity: 0.95 }, definition))) }));
22
+ });
23
+ exports.SvgBranches.displayName = "SvgBranches";
@@ -1,4 +1,5 @@
1
1
  export * from "./ArrowUpRight";
2
+ export * from "./ArrowUp";
2
3
  export * from "./AttendanceDashboard";
3
4
  export * from "./Company";
4
5
  export * from "./DownloadSvg";
@@ -19,8 +20,13 @@ export * from "./SvgDelete";
19
20
  export * from "./SvgDownload";
20
21
  export * from "./SvgDrop";
21
22
  export * from "./SvgExport";
23
+ export * from "./SvgFilteredList";
24
+ export * from "./SvgFilterList";
25
+ export * from "./SvgHistory";
26
+ export * from "./SvgEdit";
22
27
  export * from "./SvgHome";
23
28
  export * from "./SvgImport";
29
+ export * from "./SvgKeyBoard";
24
30
  export * from "./SvgNoLogo";
25
31
  export * from "./SvgNoSign";
26
32
  export * from "./SvgPageNotFound";
@@ -28,4 +34,9 @@ export * from "./SvgProfile";
28
34
  export * from "./SvgReGenerate";
29
35
  export * from "./SvgView";
30
36
  export * from "./SvgKeyBoard";
37
+ export * from "./SvgBranches";
38
+ export * from "./SvgEmail";
39
+ export * from "./SvgIndicator";
40
+ export * from "./SvgPhone";
41
+ export * from "./AppLogo";
31
42
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Svgs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Svgs/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ArrowUpRight"), exports);
18
+ __exportStar(require("./ArrowUp"), exports);
18
19
  __exportStar(require("./AttendanceDashboard"), exports);
19
20
  __exportStar(require("./Company"), exports);
20
21
  __exportStar(require("./DownloadSvg"), exports);
@@ -35,8 +36,13 @@ __exportStar(require("./SvgDelete"), exports);
35
36
  __exportStar(require("./SvgDownload"), exports);
36
37
  __exportStar(require("./SvgDrop"), exports);
37
38
  __exportStar(require("./SvgExport"), exports);
39
+ __exportStar(require("./SvgFilteredList"), exports);
40
+ __exportStar(require("./SvgFilterList"), exports);
41
+ __exportStar(require("./SvgHistory"), exports);
42
+ __exportStar(require("./SvgEdit"), exports);
38
43
  __exportStar(require("./SvgHome"), exports);
39
44
  __exportStar(require("./SvgImport"), exports);
45
+ __exportStar(require("./SvgKeyBoard"), exports);
40
46
  __exportStar(require("./SvgNoLogo"), exports);
41
47
  __exportStar(require("./SvgNoSign"), exports);
42
48
  __exportStar(require("./SvgPageNotFound"), exports);
@@ -44,3 +50,8 @@ __exportStar(require("./SvgProfile"), exports);
44
50
  __exportStar(require("./SvgReGenerate"), exports);
45
51
  __exportStar(require("./SvgView"), exports);
46
52
  __exportStar(require("./SvgKeyBoard"), exports);
53
+ __exportStar(require("./SvgBranches"), exports);
54
+ __exportStar(require("./SvgEmail"), exports);
55
+ __exportStar(require("./SvgIndicator"), exports);
56
+ __exportStar(require("./SvgPhone"), exports);
57
+ __exportStar(require("./AppLogo"), exports);
@@ -0,0 +1,10 @@
1
+ import type { Nodes } from "./Tree";
2
+ type DesktopTreeNodeProps = Readonly<{
3
+ node: Nodes;
4
+ setRef: (id: string, element: HTMLDivElement | null) => void;
5
+ themeColor?: string;
6
+ itemWidth: string;
7
+ }>;
8
+ export declare const DesktopTreeNode: ({ node, setRef, themeColor, itemWidth, }: DesktopTreeNodeProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=DesktopTreeNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesktopTreeNode.d.ts","sourceRoot":"","sources":["../../src/Tree/DesktopTreeNode.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,oBAAoB,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAEH,eAAO,MAAM,eAAe,GAAI,0CAK7B,oBAAoB,4CAqCtB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DesktopTreeNode = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const material_1 = require("@mui/material");
9
+ const map_1 = __importDefault(require("lodash/map"));
10
+ const Node_1 = require("./Node");
11
+ const DesktopTreeNode = ({ node, setRef, themeColor, itemWidth, }) => {
12
+ const { id, children } = node;
13
+ const hasChildren = !!children?.length;
14
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
15
+ display: "flex",
16
+ gap: 3,
17
+ alignItems: "flex-start",
18
+ flex: `1 0 ${itemWidth}`,
19
+ }, children: [(0, jsx_runtime_1.jsx)(Node_1.Node, { node: node, isParent: hasChildren, innerRef: (el) => setRef(id, el), themeColor: themeColor }), hasChildren && ((0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 1, sx: { mt: 0.5 }, children: (0, map_1.default)(children, (child) => ((0, jsx_runtime_1.jsx)(exports.DesktopTreeNode, { node: child, setRef: setRef, themeColor: themeColor, itemWidth: itemWidth }, child.id))) }))] }, id));
20
+ };
21
+ exports.DesktopTreeNode = DesktopTreeNode;
@@ -0,0 +1,9 @@
1
+ import type { Nodes } from "./Tree";
2
+ type MobileTreeNodeProps = Readonly<{
3
+ node: Nodes;
4
+ setRef: (id: string, element: HTMLDivElement | null) => void;
5
+ themeColor?: string;
6
+ }>;
7
+ export declare const MobileTreeNode: ({ node, setRef, themeColor, }: MobileTreeNodeProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=MobileTreeNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MobileTreeNode.d.ts","sourceRoot":"","sources":["../../src/Tree/MobileTreeNode.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,KAAK,mBAAmB,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7D,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,+BAI5B,mBAAmB,4CA8BrB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.MobileTreeNode = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const material_1 = require("@mui/material");
9
+ const map_1 = __importDefault(require("lodash/map"));
10
+ const PadBox_1 = require("../PadBox");
11
+ const Node_1 = require("./Node");
12
+ const MobileTreeNode = ({ node, setRef, themeColor, }) => {
13
+ const { id, children } = node;
14
+ const hasChildren = !!children?.length;
15
+ return ((0, jsx_runtime_1.jsxs)(material_1.Stack, { gap: 1, children: [(0, jsx_runtime_1.jsx)(Node_1.Node, { node: node, isParent: hasChildren, innerRef: (el) => setRef(id, el), themeColor: themeColor }), hasChildren && ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: 3, paddingTop: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 1, children: (0, map_1.default)(children, (child) => ((0, jsx_runtime_1.jsx)(exports.MobileTreeNode, { node: child, setRef: setRef, themeColor: themeColor }, child.id))) }) }))] }, id));
16
+ };
17
+ exports.MobileTreeNode = MobileTreeNode;
@@ -0,0 +1,9 @@
1
+ import type { Nodes } from "./Tree";
2
+ export type NodeProps = Readonly<{
3
+ node: Nodes;
4
+ innerRef?: React.RefCallback<HTMLDivElement>;
5
+ isParent?: boolean;
6
+ themeColor?: string;
7
+ }>;
8
+ export declare const Node: ({ node, innerRef, isParent, themeColor, }: NodeProps) => import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=Node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Node.d.ts","sourceRoot":"","sources":["../../src/Tree/Node.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,KAAK,CAAC;IACZ,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,2CAKlB,SAAS,4CA4CX,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Node = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const PadBox_1 = require("../PadBox");
7
+ const Node_styled_1 = require("./Node.styled");
8
+ const Node = ({ node, innerRef, isParent = false, themeColor, }) => {
9
+ const { id, title, subtitle, value } = node;
10
+ const theme = (0, material_1.useTheme)();
11
+ const { butterflyBlue, slate } = theme.palette.app.color;
12
+ const baseColor = themeColor ?? butterflyBlue[900];
13
+ const nodeBorderColor = isParent ? baseColor : (0, material_1.alpha)(baseColor, 0.7);
14
+ const nodeBackgroundColor = isParent ? (0, material_1.alpha)(baseColor, 0.1) : "none";
15
+ const nodeSubtitleColor = slate[900];
16
+ return ((0, jsx_runtime_1.jsxs)(Node_styled_1.StyledNodePaper, { elevation: isParent ? 3 : 0, ref: innerRef, isParent: isParent, borderColor: nodeBorderColor, backgroundColor: nodeBackgroundColor, baseColor: baseColor, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", noWrap: true, children: title }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "subtitle2", color: nodeSubtitleColor, noWrap: true, children: subtitle })] }), (0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { paddingLeft: 1 }, children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { ml: "auto", textAlign: "right" }, children: (0, jsx_runtime_1.jsx)(material_1.Typography, { noWrap: true, variant: "body2", children: value }) }) })] }, id));
17
+ };
18
+ exports.Node = Node;
@@ -0,0 +1,10 @@
1
+ import type { PaperProps } from "@mui/material";
2
+ import type React from "react";
3
+ export type StyledNodePaperProps = {
4
+ isParent: boolean;
5
+ borderColor: string;
6
+ backgroundColor: string;
7
+ baseColor: string;
8
+ };
9
+ export declare const StyledNodePaper: React.ComponentType<PaperProps & StyledNodePaperProps>;
10
+ //# sourceMappingURL=Node.styled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Node.styled.d.ts","sourceRoot":"","sources":["../../src/Tree/Node.styled.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,aAAa,CAC/C,UAAU,GAAG,oBAAoB,CA0BlC,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StyledNodePaper = void 0;
4
+ const material_1 = require("@mui/material");
5
+ const styles_1 = require("@mui/material/styles");
6
+ exports.StyledNodePaper = (0, styles_1.styled)(material_1.Paper, {
7
+ shouldForwardProp: (prop) => prop !== "$isParent" &&
8
+ prop !== "$borderColor" &&
9
+ prop !== "$backgroundColor" &&
10
+ prop !== "$baseColor",
11
+ })(({ theme, isParent, borderColor, backgroundColor, baseColor }) => ({
12
+ width: "auto",
13
+ minWidth: 0,
14
+ padding: theme.spacing(1),
15
+ borderRadius: 12,
16
+ border: `1px solid ${borderColor}`,
17
+ boxShadow: isParent ? `0 6px 18px ${(0, material_1.alpha)(baseColor, 0.2)}` : "none",
18
+ backgroundColor,
19
+ display: "flex",
20
+ alignItems: "center",
21
+ gap: theme.spacing(1),
22
+ minHeight: 40,
23
+ overflow: "hidden",
24
+ flex: "1 1 auto",
25
+ [theme.breakpoints.down("sm")]: {
26
+ flex: "1 1 100%",
27
+ },
28
+ }));
@@ -0,0 +1,20 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * Nodes type definition.
4
+ * @property id - Must be unique in Every Nodes, including children nodes.
5
+ */
6
+ export type Nodes = {
7
+ id: string;
8
+ title: ReactNode;
9
+ subtitle?: ReactNode;
10
+ value?: string | number;
11
+ children?: Nodes[];
12
+ };
13
+ export type TreeProps = Readonly<{
14
+ nodes: Nodes[];
15
+ direction?: "horizontal" | "vertical";
16
+ columns?: number;
17
+ color?: string;
18
+ }>;
19
+ export declare const Tree: ({ nodes, direction, columns, color, }: TreeProps) => import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=Tree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tree.d.ts","sourceRoot":"","sources":["../../src/Tree/Tree.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOpE;;;GAGG;AACH,MAAM,MAAM,KAAK,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC/B,KAAK,EAAE,KAAK,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,uCAKlB,SAAS,4CA+QX,CAAC"}
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Tree = void 0;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const material_1 = require("@mui/material");
9
+ const forEach_1 = __importDefault(require("lodash/forEach"));
10
+ const map_1 = __importDefault(require("lodash/map"));
11
+ const omit_1 = __importDefault(require("lodash/omit"));
12
+ const values_1 = __importDefault(require("lodash/values"));
13
+ const react_1 = require("react");
14
+ const PadBox_1 = require("../PadBox");
15
+ const Svgs_1 = require("../Svgs");
16
+ const utils_1 = require("../utils");
17
+ const DesktopTreeNode_1 = require("./DesktopTreeNode");
18
+ const MobileTreeNode_1 = require("./MobileTreeNode");
19
+ const Tree = ({ nodes, direction = "horizontal", columns = 3, color, }) => {
20
+ const { isMobile } = (0, utils_1.useGetDeviceType)();
21
+ const refs = (0, react_1.useRef)({});
22
+ const containerRef = (0, react_1.useRef)(null);
23
+ const svgRef = (0, react_1.useRef)(null);
24
+ const resizeObserverRef = (0, react_1.useRef)(null);
25
+ const [paths, setPaths] = (0, react_1.useState)([]);
26
+ const setRef = (id, element) => {
27
+ if (element) {
28
+ refs.current[id] = element;
29
+ if (resizeObserverRef.current) {
30
+ resizeObserverRef.current.observe(element);
31
+ }
32
+ return;
33
+ }
34
+ refs.current = (0, omit_1.default)(refs.current, id);
35
+ };
36
+ const getRectangleElementPosition = (element) => {
37
+ if (!element) {
38
+ return null;
39
+ }
40
+ return element.getBoundingClientRect();
41
+ };
42
+ const createMobilePath = (parentRectangle, currentRectangle, svgRect) => {
43
+ const { left: parentLeft, width: parentWidth, bottom: parentBottom, } = parentRectangle;
44
+ const { left: currentLeft, width: currentWidth, top: currentTop, } = currentRectangle;
45
+ const { left: svgLeft, top: svgTop } = svgRect;
46
+ const startX = parentLeft + parentWidth / 2 - svgLeft;
47
+ const startY = parentBottom - svgTop;
48
+ const endX = currentLeft + currentWidth / 2 - svgLeft;
49
+ const endY = currentTop - svgTop;
50
+ const midY = startY + Math.max(12, (endY - startY) / 2);
51
+ return `M ${startX} ${startY} C ${startX} ${midY} ${endX} ${midY} ${endX} ${endY}`;
52
+ };
53
+ const createDesktopPath = (parentRectangle, currentRectangle, svgRect) => {
54
+ const { right: parentRight, top: parentTop, height: parentHeight, } = parentRectangle;
55
+ const { left: currentLeft, top: currentTop, height: currentHeight, } = currentRectangle;
56
+ const { left: svgLeft, top: svgTop } = svgRect;
57
+ const startX = parentRight - svgLeft;
58
+ const startY = parentTop + parentHeight / 2 - svgTop;
59
+ const endX = currentLeft - svgLeft;
60
+ const endY = currentTop + currentHeight / 2 - svgTop;
61
+ const dx = endX - startX;
62
+ const absDx = Math.abs(dx);
63
+ const curvature = Math.min(120, Math.max(24, absDx / 2));
64
+ const direction = dx >= 0 ? 1 : -1;
65
+ const c1x = startX + curvature * direction;
66
+ const c1y = startY;
67
+ const c2x = endX - curvature * direction;
68
+ const c2y = endY;
69
+ return `M ${startX} ${startY} C ${c1x} ${c1y} ${c2x} ${c2y} ${endX} ${endY}`;
70
+ };
71
+ const computePathsRecursive = (nodeList, svgRect, paths) => {
72
+ (0, forEach_1.default)(nodeList, (node) => {
73
+ const { id, children } = node;
74
+ if (!children?.length) {
75
+ return;
76
+ }
77
+ const parentElement = refs.current[id];
78
+ if (!parentElement) {
79
+ return;
80
+ }
81
+ const parentRectangle = getRectangleElementPosition(parentElement);
82
+ if (!parentRectangle) {
83
+ return;
84
+ }
85
+ (0, forEach_1.default)(children, (child) => {
86
+ const { id, children } = child;
87
+ const currentElement = refs.current[id];
88
+ if (!currentElement) {
89
+ return;
90
+ }
91
+ const currentRectangle = getRectangleElementPosition(currentElement);
92
+ if (!currentRectangle) {
93
+ return;
94
+ }
95
+ const pathData = isMobile || direction === "vertical"
96
+ ? createMobilePath(parentRectangle, currentRectangle, svgRect)
97
+ : createDesktopPath(parentRectangle, currentRectangle, svgRect);
98
+ paths.push({ definition: pathData });
99
+ if (children?.length) {
100
+ computePathsRecursive([child], svgRect, paths);
101
+ }
102
+ });
103
+ });
104
+ };
105
+ const computePaths = () => {
106
+ const svg = svgRef.current;
107
+ const container = containerRef.current;
108
+ if (!svg || !container) {
109
+ return;
110
+ }
111
+ const width = container.clientWidth;
112
+ svg.setAttribute("width", String(width));
113
+ svg.setAttribute("height", "auto");
114
+ const svgRect = container.getBoundingClientRect();
115
+ const newPaths = [];
116
+ computePathsRecursive(nodes, svgRect, newPaths);
117
+ setPaths(newPaths);
118
+ };
119
+ (0, react_1.useEffect)(() => {
120
+ const scheduleCompute = () => {
121
+ return requestAnimationFrame(() => {
122
+ computePaths();
123
+ });
124
+ };
125
+ const initialId = scheduleCompute();
126
+ const observer = new ResizeObserver(scheduleCompute);
127
+ resizeObserverRef.current = observer;
128
+ if (containerRef.current) {
129
+ observer.observe(containerRef.current);
130
+ }
131
+ (0, values_1.default)(refs.current).forEach((el) => observer.observe(el));
132
+ const handleResize = scheduleCompute;
133
+ window.addEventListener("resize", handleResize);
134
+ return () => {
135
+ cancelAnimationFrame(initialId);
136
+ observer.disconnect();
137
+ resizeObserverRef.current = null;
138
+ window.removeEventListener("resize", handleResize);
139
+ };
140
+ }, [nodes, isMobile, direction]);
141
+ const itemWidth = `calc(${100 / columns}% - 24px)`;
142
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { ref: containerRef, variant: "outlined", component: material_1.Paper, position: "relative", sx: {
143
+ overflowX: "hidden",
144
+ overflowY: "visible",
145
+ }, children: [(0, jsx_runtime_1.jsx)(Svgs_1.SvgBranches, { ref: svgRef, paths: paths, strokeColor: color }), isMobile || direction === "vertical" ? ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: 2 }, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { spacing: 3, children: (0, map_1.default)(nodes, (node) => ((0, jsx_runtime_1.jsx)(MobileTreeNode_1.MobileTreeNode, { node: node, setRef: setRef, themeColor: color }, node.id))) }) })) : ((0, jsx_runtime_1.jsx)(PadBox_1.PadBox, { padding: { padding: 2 }, children: (0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", alignItems: "flex-start", justifyContent: "flex-start", flexWrap: "wrap", gap: 3, children: (0, map_1.default)(nodes, (node) => ((0, jsx_runtime_1.jsx)(DesktopTreeNode_1.DesktopTreeNode, { node: node, setRef: setRef, themeColor: color, itemWidth: itemWidth }, node.id))) }) }))] }));
146
+ };
147
+ exports.Tree = Tree;
@@ -0,0 +1,3 @@
1
+ export * from "./Tree";
2
+ export * from "./Node";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Tree/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Tree"), exports);
18
+ __exportStar(require("./Node"), exports);
@@ -32,4 +32,5 @@ export * from "./Toast";
32
32
  export * from "./Tooltip";
33
33
  export * from "./UserProfileMenu";
34
34
  export * from "./utils";
35
+ export * from "./Tree";
35
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,sBAAsB,CAAC;AACrC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B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AC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
@@ -48,3 +48,4 @@ __exportStar(require("./Toast"), exports);
48
48
  __exportStar(require("./Tooltip"), exports);
49
49
  __exportStar(require("./UserProfileMenu"), exports);
50
50
  __exportStar(require("./utils"), exports);
51
+ __exportStar(require("./Tree"), exports);
@@ -1,5 +1,5 @@
1
1
  import type { OnAction } from "../types";
2
- export type ModifierType = "ctrl" | "shift" | "alt" | "meta";
2
+ export type ModifierType = "ctrl" | "shift" | "meta";
3
3
  type UseGlobalKeyboardShortcutArgs = {
4
4
  key: string;
5
5
  onTrigger: OnAction;
@@ -1 +1 @@
1
- {"version":3,"file":"useGlobalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/useGlobalKeyboardShortcut.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAE7D,KAAK,6BAA6B,GAAG;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,qDAKvC,6BAA6B,SAmF/B,CAAC"}
1
+ {"version":3,"file":"useGlobalKeyboardShortcut.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/useGlobalKeyboardShortcut.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,KAAK,6BAA6B,GAAG;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,QAAQ,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,GAAG,YAAY,EAAE,CAAC;IAC7C,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,qDAKvC,6BAA6B,SA2E/B,CAAC"}
@@ -29,8 +29,6 @@ const useGlobalKeyboardShortcut = ({ key, onTrigger, modifierKeys = "ctrl", with
29
29
  return e.ctrlKey || e.metaKey;
30
30
  case "shift":
31
31
  return e.shiftKey;
32
- case "alt":
33
- return e.altKey;
34
32
  case "meta":
35
33
  return e.metaKey;
36
34
  default:
@@ -45,15 +43,11 @@ const useGlobalKeyboardShortcut = ({ key, onTrigger, modifierKeys = "ctrl", with
45
43
  if (requiredModifiers.includes("shift") && e.shiftKey) {
46
44
  requiredModifiersCount++;
47
45
  }
48
- if (requiredModifiers.includes("alt") && e.altKey) {
49
- requiredModifiersCount++;
50
- }
51
46
  const hasExtraModifiers = (e.ctrlKey && !requiredModifiers.includes("ctrl")) ||
52
47
  (e.metaKey &&
53
48
  !requiredModifiers.includes("ctrl") &&
54
49
  !requiredModifiers.includes("meta")) ||
55
- (e.shiftKey && !requiredModifiers.includes("shift")) ||
56
- (e.altKey && !requiredModifiers.includes("alt"));
50
+ (e.shiftKey && !requiredModifiers.includes("shift"));
57
51
  if (keyMatch &&
58
52
  modifierMatch &&
59
53
  requiredModifiersCount === normalizedModifierKeys.length &&