impact-ui 4.0.13 → 4.0.14
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/dist/_virtual/index4.js +2 -4
- package/dist/_virtual/index5.js +3 -3
- package/dist/_virtual/index6.js +4 -2
- package/dist/components/CreateItemFlow/CreateItemFlow.types.d.ts +15 -32
- package/dist/components/CreateItemFlow/CreateItemFlow.types.d.ts.map +1 -1
- package/dist/components/CreateItemFlow/index.d.ts +1 -14
- package/dist/components/CreateItemFlow/index.d.ts.map +1 -1
- package/dist/components/CreateItemFlow/index.js +60 -60
- package/dist/components/DynamicLayout/index.d.ts.map +1 -1
- package/dist/components/DynamicLayout/index.js +5 -9
- package/dist/mcp-component-registry.json +21 -32
- package/dist/node_modules/@mui/system/colorManipulator.js +2 -2
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/utils/shortcuts/ShortcutManager.d.ts.map +1 -1
- package/dist/utils/shortcuts/ShortcutManager.js +5 -6
- package/dist/utils/shortcuts/format.d.ts +1 -1
- package/dist/utils/shortcuts/format.d.ts.map +1 -1
- package/dist/utils/shortcuts/format.js +19 -17
- package/dist/utils/shortcuts/index.d.ts +1 -1
- package/dist/utils/shortcuts/index.d.ts.map +1 -1
- package/dist/utils/shortcuts/match.d.ts +4 -1
- package/dist/utils/shortcuts/match.d.ts.map +1 -1
- package/dist/utils/shortcuts/match.js +16 -33
- package/dist/utils/shortcuts/parse.d.ts +5 -5
- package/dist/utils/shortcuts/parse.d.ts.map +1 -1
- package/dist/utils/shortcuts/parse.js +36 -50
- package/dist/utils/shortcuts/types.d.ts +16 -15
- package/dist/utils/shortcuts/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
|
|
3
|
-
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
1
|
+
var reactIs = { exports: {} };
|
|
4
2
|
export {
|
|
5
|
-
|
|
3
|
+
reactIs as __module
|
|
6
4
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getAugmentedNamespace } from "./_commonjsHelpers.js";
|
|
2
|
-
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/
|
|
3
|
-
const require$$
|
|
2
|
+
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/formatMuiErrorMessage/index.js";
|
|
3
|
+
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
4
4
|
export {
|
|
5
|
-
require$$
|
|
5
|
+
require$$1 as default
|
|
6
6
|
};
|
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { getAugmentedNamespace } from "./_commonjsHelpers.js";
|
|
2
|
+
import * as index from "../node_modules/@mui/system/node_modules/@mui/utils/esm/clamp/index.js";
|
|
3
|
+
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(index);
|
|
2
4
|
export {
|
|
3
|
-
|
|
5
|
+
require$$2 as default
|
|
4
6
|
};
|
|
@@ -1,38 +1,21 @@
|
|
|
1
|
-
import { ReactNode,
|
|
2
|
-
import {
|
|
3
|
-
import { StepperStep } from '../Stepper/Stepper.types';
|
|
1
|
+
import { ReactNode, CSSProperties, Ref } from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button/Button.types';
|
|
4
3
|
|
|
5
|
-
export interface CreateItemFlowProps
|
|
6
|
-
step?: number;
|
|
7
|
-
totalSteps?: number;
|
|
4
|
+
export interface CreateItemFlowProps {
|
|
8
5
|
leftPanelWidth?: string | number;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
actionsChildren?: ReactNode | null;
|
|
20
|
-
showStepper?: boolean;
|
|
6
|
+
leftPanelContent?: ReactNode;
|
|
7
|
+
leftPanelImage?: ReactNode;
|
|
8
|
+
rightContent?: ReactNode;
|
|
9
|
+
title?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
prevButtonProps?: Partial<ButtonProps>;
|
|
12
|
+
extraButtonProp?: ReactNode;
|
|
13
|
+
nextButtonProps?: Partial<ButtonProps>;
|
|
14
|
+
customCSS?: CSSProperties;
|
|
15
|
+
className?: string;
|
|
21
16
|
}
|
|
22
17
|
export interface RightContentPanelProps {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
step: number;
|
|
26
|
-
stepperVariant: 'default' | 'progress' | 'mui';
|
|
27
|
-
onStepClick?: (step: number) => void;
|
|
28
|
-
headings: string[];
|
|
29
|
-
children?: ReactNode | ReactNode[];
|
|
30
|
-
actionsChildren?: ReactNode | null;
|
|
31
|
-
onCancel?: () => void;
|
|
32
|
-
onPrev?: () => void;
|
|
33
|
-
onNext?: () => void;
|
|
34
|
-
totalSteps: number;
|
|
35
|
-
contentRef?: RefObject<HTMLDivElement>;
|
|
36
|
-
hasScroll?: boolean;
|
|
18
|
+
contentRef?: Ref<HTMLDivElement>;
|
|
19
|
+
children?: ReactNode;
|
|
37
20
|
}
|
|
38
21
|
//# sourceMappingURL=CreateItemFlow.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateItemFlow.types.d.ts","sourceRoot":"","sources":["../../../src/components/CreateItemFlow/CreateItemFlow.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"CreateItemFlow.types.d.ts","sourceRoot":"","sources":["../../../src/components/CreateItemFlow/CreateItemFlow.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACrE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,WAAW,mBAAmB;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CreateItemFlowProps } from './CreateItemFlow.types';
|
|
3
3
|
|
|
4
|
-
export interface CreateItemFlowProps {
|
|
5
|
-
leftPanelWidth?: string | number;
|
|
6
|
-
leftPanelContent?: React.ReactNode;
|
|
7
|
-
leftPanelImage?: React.ReactNode;
|
|
8
|
-
rightContent?: React.ReactNode;
|
|
9
|
-
title?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
prevButtonProps?: Partial<ButtonProps>;
|
|
12
|
-
extraButtonProp?: React.ReactNode;
|
|
13
|
-
nextButtonProps?: Partial<ButtonProps>;
|
|
14
|
-
customCSS?: React.CSSProperties;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
4
|
export declare const CreateItemFlow: React.MemoExoticComponent<({ leftPanelWidth, leftPanelContent, leftPanelImage, rightContent, title, description, prevButtonProps, extraButtonProp, nextButtonProps, customCSS, className, }: CreateItemFlowProps) => import("react/jsx-runtime").JSX.Element>;
|
|
18
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CreateItemFlow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CreateItemFlow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAOpC,OAAO,EAAE,KAAK,mBAAmB,EAA+B,MAAM,wBAAwB,CAAC;AAC/F,OAAO,8BAA8B,CAAC;AAgGtC,eAAO,MAAM,cAAc,+LAnDxB,mBAAmB,6CAmDqC,CAAC"}
|
|
@@ -24,70 +24,70 @@ const LeftPanelContent = ({ leftPanelContent, leftPanelImage }) => {
|
|
|
24
24
|
] });
|
|
25
25
|
};
|
|
26
26
|
const RightContentPanel = ({ contentRef, children }) => /* @__PURE__ */ jsx("div", { ref: contentRef, className: "content-wrapper", children });
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
27
|
+
const CreateItemFlowComponent = ({
|
|
28
|
+
leftPanelWidth,
|
|
29
|
+
leftPanelContent = null,
|
|
30
|
+
leftPanelImage = null,
|
|
31
|
+
rightContent,
|
|
32
|
+
title,
|
|
33
|
+
description = "",
|
|
34
|
+
prevButtonProps = {},
|
|
35
|
+
extraButtonProp,
|
|
36
|
+
nextButtonProps = {},
|
|
37
|
+
customCSS,
|
|
38
|
+
className
|
|
39
|
+
}) => {
|
|
40
|
+
const { t } = useTranslation();
|
|
41
|
+
const {
|
|
42
|
+
children: prevLabel = t("createItemFlow.back"),
|
|
43
|
+
icon: prevIcon,
|
|
44
|
+
...restPrevProps
|
|
45
|
+
} = prevButtonProps;
|
|
46
|
+
const {
|
|
47
|
+
children: nextLabel = t("createItemFlow.next"),
|
|
48
|
+
icon: nextIcon,
|
|
49
|
+
...restNextProps
|
|
50
|
+
} = nextButtonProps;
|
|
51
|
+
const resolvedTitle = title ?? t("createItemFlow.defaultTitle");
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
DynamicLayout,
|
|
54
|
+
{
|
|
55
|
+
className,
|
|
56
|
+
description,
|
|
57
|
+
footer: /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
58
|
+
/* @__PURE__ */ jsx(
|
|
59
|
+
Button,
|
|
60
|
+
{
|
|
61
|
+
icon: "icon" in prevButtonProps ? prevIcon : /* @__PURE__ */ jsx(default_1, {}),
|
|
62
|
+
variant: restPrevProps.variant ?? "tertiary",
|
|
63
|
+
...restPrevProps,
|
|
64
|
+
children: prevLabel
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsxs("div", { className: "footer-right-group", children: [
|
|
68
|
+
extraButtonProp,
|
|
59
69
|
/* @__PURE__ */ jsx(
|
|
60
70
|
Button,
|
|
61
71
|
{
|
|
62
|
-
icon: "icon" in
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
72
|
+
icon: "icon" in nextButtonProps ? nextIcon : /* @__PURE__ */ jsx(default_1$1, {}),
|
|
73
|
+
iconPlacement: nextButtonProps.iconPlacement ?? "right",
|
|
74
|
+
variant: restNextProps.variant ?? "primary",
|
|
75
|
+
...restNextProps,
|
|
76
|
+
children: nextLabel
|
|
66
77
|
}
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
] })
|
|
81
|
-
] }),
|
|
82
|
-
leftPanel: /* @__PURE__ */ jsx(LeftPanelContent, { leftPanelContent, leftPanelImage }),
|
|
83
|
-
leftPanelWidth,
|
|
84
|
-
rightContent: /* @__PURE__ */ jsx(RightContentPanel, { children: rightContent }),
|
|
85
|
-
style: customCSS,
|
|
86
|
-
title: resolvedTitle
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
);
|
|
78
|
+
)
|
|
79
|
+
] })
|
|
80
|
+
] }),
|
|
81
|
+
leftPanel: /* @__PURE__ */ jsx(LeftPanelContent, { leftPanelContent, leftPanelImage }),
|
|
82
|
+
leftPanelWidth,
|
|
83
|
+
rightContent: /* @__PURE__ */ jsx(RightContentPanel, { children: rightContent }),
|
|
84
|
+
style: customCSS,
|
|
85
|
+
title: resolvedTitle
|
|
86
|
+
}
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
const CreateItemFlow = memo(CreateItemFlowComponent);
|
|
90
|
+
CreateItemFlow.displayName = "CreateItemFlow";
|
|
91
91
|
export {
|
|
92
92
|
CreateItemFlow
|
|
93
93
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,6BAA6B,CAAC;AAGrC,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,GAAI,8FAS3B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DynamicLayout/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAE1D,OAAO,6BAA6B,CAAC;AAGrC,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,YAAY,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,GAAI,8FAS3B,kBAAkB,4CAgCpB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.dynamic-layout-container{background-color:#fff;border-radius:24px!important;box-shadow:0 0 4px #ababab40;display:flex;flex-direction:column;top:0;right:24px;bottom:24px;left:24px;justify-content:center;position:absolute}.dynamic-layout-container .dynamic-layout-header{border-bottom:1px solid #d9dde7;display:flex;flex-direction:column;gap:8px;padding:24px}.dynamic-layout-container .dynamic-layout-header h1{color:#0d152c;font-size:24px;font-weight:800;line-height:36px}.dynamic-layout-container .dynamic-layout-header p{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-transform:capitalize}.dynamic-layout-container .dynamic-layout-body{background-position:100% 0;background-repeat:no-repeat;background-size:contain;border-bottom-right-radius:24px;display:flex;flex:1;min-height:0;overflow:hidden;padding:24px}.dynamic-layout-container .dynamic-layout-body .left-panel{border-right:1px solid #d9dde7;padding-right:24px;width:220px}.dynamic-layout-container .dynamic-layout-body .left-panel .left-panel-content{display:flex;flex-direction:column;height:100%;justify-content:space-between}.dynamic-layout-container .dynamic-layout-body .left-panel .left-panel-image{height:130px;margin:0 auto;width:132px}.dynamic-layout-container .dynamic-layout-body .right-column{display:flex;flex-direction:column;justify-content:space-between;min-height:0;padding-left:24px;width:calc(100% - 220px)}.dynamic-layout-container .dynamic-layout-body .right-column .right-content{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto}.dynamic-layout-container .dynamic-layout-body .right-column .dynamic-layout-footer{border-top:1px solid #d9dde7;display:flex;justify-content:space-between;padding-top:24px}.dynamic-layout-container .dynamic-layout-body .right-column .dynamic-layout-footer .footer-right-group{align-items:center;display:flex;gap:12px}@media screen and (min-width:1400px) and (max-width:1600px){.dynamic-layout-body{padding:20px}.left-panel-image{width:100%}}@media screen and (max-width:1399px){.dynamic-layout-body{padding:16px}.left-panel{flex-shrink:0;padding-right:16px;width:fit-content}.right-column{flex:1;padding-left:16px;width:auto}.left-panel-image{height:auto;max-width:132px;width:100%}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode('@keyframes ia-shimmer-horizontal{0%{background-position:100% 0}to{background-position:0 0}}@keyframes ia-shimmer-vertical{0%{background-position:0 100%}to{background-position:0 0}}@property --ia-shimmer-angle{syntax:"<angle>";inherits:false;initial-value:0deg}@keyframes ia-shimmer-circular{0%{--ia-shimmer-angle:0deg}to{--ia-shimmer-angle:360deg}}.ia-shimmer{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ltr{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(90deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ltr{animation:none;background-image:linear-gradient(90deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--rtl{animation:ia-shimmer-horizontal 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(270deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:300% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--rtl{animation:none;background-image:linear-gradient(270deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--btt{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:reverse;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--btt{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--ttb{animation:ia-shimmer-vertical 1.6s ease-in-out infinite;animation-direction:normal;background-color:#e8edf5;background-image:linear-gradient(0deg,#e8edf5,#eceef4 22%,#e8edf5 48%,#d5dbe8 62%,#e8edf5);background-repeat:no-repeat;background-size:100% 300%}@media (prefers-reduced-motion:reduce){.ia-shimmer--ttb{animation:none;background-image:linear-gradient(0deg,#e8edf5,#eceef4 40%,#d5dbe8);background-size:100% 100%}}.ia-shimmer--circular{background-color:#e8edf5;background-repeat:no-repeat;--ia-shimmer-angle:0deg;animation:ia-shimmer-circular 1.6s linear infinite;background-image:conic-gradient(from var(--ia-shimmer-angle),#eceef4 0deg,#e8edf5 80deg,#d5dbe8 160deg,#e8edf5 260deg,#eceef4 1turn);background-size:100% 100%}@media (prefers-reduced-motion:reduce){.ia-shimmer--circular{animation:none;background-image:conic-gradient(from 0deg,#eceef4,#e8edf5,#d5dbe8,#e8edf5 1turn)}}:root{--ia-focus-color:#4259ee;--ia-focus-bg:#fff;--ia-focus-ring-width:2px;--ia-focus-ring-offset:2px;--ia-modal-backdrop:#0d152ccc}*,:after,:before{box-sizing:border-box}body,textarea{font-style:normal;font-weight:500}a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font-size:100%;font:inherit;margin:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}body{font-family:Manrope,sans-serif}.impact-notification-separator{background-color:#d9dde7;display:inline-block;height:16px;width:1.5px}.impact-notification-horizontal-separator{background-color:#d9dde7;display:inline-block;height:1px;width:100%}ul.storybook-order-list{list-style-type:disc;padding-left:12px}ul.storybook-order-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-list li strong{font-weight:800}ul.storybook-order-child-list{list-style-type:circle;padding-left:20px}ul.storybook-order-child-list li{font-size:12px;line-height:20px;padding-bottom:8px}ul.storybook-order-child-list li strong{font-weight:800}.dynamic-layout-container{background-color:#fff;border-radius:24px!important;box-shadow:0 0 4px #ababab40;display:flex;flex-direction:column;top:0;right:24px;bottom:24px;left:24px;justify-content:center;position:absolute}.dynamic-layout-container .dynamic-layout-header{border-bottom:1px solid #d9dde7;display:flex;flex-direction:column;gap:8px;padding:24px}.dynamic-layout-container .dynamic-layout-header h1{color:#0d152c;font-size:24px;font-weight:800;line-height:36px}.dynamic-layout-container .dynamic-layout-header p{color:#7a8294;font-size:12px;font-weight:500;line-height:16px;text-transform:capitalize}.dynamic-layout-container .dynamic-layout-body{background-position:100% 0;background-repeat:no-repeat;background-size:contain;border-bottom-right-radius:24px;display:flex;flex:1;min-height:0;overflow:hidden;padding:24px}.dynamic-layout-container .dynamic-layout-body .left-panel{border-right:1px solid #d9dde7;padding-right:24px;width:var(--left-panel-width,220px)}.dynamic-layout-container .dynamic-layout-body .left-panel .left-panel-content{display:flex;flex-direction:column;height:100%;justify-content:space-between}.dynamic-layout-container .dynamic-layout-body .left-panel .left-panel-image{height:130px;margin:0 auto;width:132px}.dynamic-layout-container .dynamic-layout-body .right-column{display:flex;flex-direction:column;justify-content:space-between;min-height:0;padding-left:24px;width:calc(100% - var(--left-panel-width, 220px))}.dynamic-layout-container .dynamic-layout-body .right-column .right-content{display:flex;flex:1;flex-direction:column;min-height:0;overflow-x:hidden;overflow-y:auto}.dynamic-layout-container .dynamic-layout-body .right-column .dynamic-layout-footer{border-top:1px solid #d9dde7;display:flex;justify-content:space-between;padding-top:24px}.dynamic-layout-container .dynamic-layout-body .right-column .dynamic-layout-footer .footer-right-group{align-items:center;display:flex;gap:12px}@media screen and (min-width:1400px) and (max-width:1600px){.dynamic-layout-body{padding:20px}.left-panel-image{width:100%}}@media screen and (max-width:1399px){.dynamic-layout-body{padding:16px}.left-panel{flex-shrink:0;padding-right:16px;width:fit-content}.right-column{flex:1;padding-left:16px;width:auto}.left-panel-image{height:auto;max-width:132px;width:100%}}')),document.head.appendChild(e)}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}}();
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import React__default, { useRef } from "react";
|
|
4
4
|
|
|
@@ -25,16 +25,12 @@ const DynamicLayout = ({
|
|
|
25
25
|
Box,
|
|
26
26
|
{
|
|
27
27
|
className: "dynamic-layout-body",
|
|
28
|
+
style: leftPanelWidth ? {
|
|
29
|
+
"--left-panel-width": typeof leftPanelWidth === "number" ? `${leftPanelWidth}px` : leftPanelWidth
|
|
30
|
+
} : void 0,
|
|
28
31
|
sx: { backgroundImage: `url(${contentBackgroundImage})` },
|
|
29
32
|
children: [
|
|
30
|
-
/* @__PURE__ */ jsx(
|
|
31
|
-
Box,
|
|
32
|
-
{
|
|
33
|
-
className: "left-panel",
|
|
34
|
-
style: leftPanelWidth ? { "--left-panel-width": leftPanelWidth } : void 0,
|
|
35
|
-
children: leftPanel
|
|
36
|
-
}
|
|
37
|
-
),
|
|
33
|
+
/* @__PURE__ */ jsx(Box, { className: "left-panel", children: leftPanel }),
|
|
38
34
|
/* @__PURE__ */ jsxs(Box, { className: "right-column", children: [
|
|
39
35
|
/* @__PURE__ */ jsx(Box, { className: "right-content", children: React__default.cloneElement(rightContent, { contentRef }) }),
|
|
40
36
|
footer && /* @__PURE__ */ jsx(Box, { className: "dynamic-layout-footer", children: footer })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-11T13:03:42.565Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"Menu": {
|
|
6
6
|
"title": "Components/Menu",
|
|
@@ -2115,7 +2115,10 @@
|
|
|
2115
2115
|
"title": "Components/CreateItemFlow",
|
|
2116
2116
|
"category": "Components",
|
|
2117
2117
|
"description": "A create item flow is a UI component that allows users to create an item. It is often used in forms, settings, and surveys to capture user preferences or multiple selections.",
|
|
2118
|
-
"examples": [
|
|
2118
|
+
"examples": [
|
|
2119
|
+
"Default",
|
|
2120
|
+
"WithAppLayout"
|
|
2121
|
+
],
|
|
2119
2122
|
"props": {
|
|
2120
2123
|
"title": {
|
|
2121
2124
|
"description": "Title displayed in the header.",
|
|
@@ -2127,6 +2130,11 @@
|
|
|
2127
2130
|
"type": "unknown",
|
|
2128
2131
|
"required": true
|
|
2129
2132
|
},
|
|
2133
|
+
"leftPanelWidth": {
|
|
2134
|
+
"description": "Custom width for the left panel in pixels.",
|
|
2135
|
+
"type": "unknown",
|
|
2136
|
+
"required": true
|
|
2137
|
+
},
|
|
2130
2138
|
"leftPanelContent": {
|
|
2131
2139
|
"description": "Component rendered in the left panel area (e.g. a Stepper).",
|
|
2132
2140
|
"type": "unknown",
|
|
@@ -2137,57 +2145,38 @@
|
|
|
2137
2145
|
"type": "unknown",
|
|
2138
2146
|
"required": true
|
|
2139
2147
|
},
|
|
2140
|
-
"leftPanelWidth": {
|
|
2141
|
-
"description": "Custom width for the left panel in pixels.",
|
|
2142
|
-
"type": "unknown",
|
|
2143
|
-
"required": true
|
|
2144
|
-
},
|
|
2145
2148
|
"rightContent": {
|
|
2146
2149
|
"description": "Component rendered as the main content on the right side.",
|
|
2147
2150
|
"type": "unknown",
|
|
2148
2151
|
"required": true
|
|
2149
2152
|
},
|
|
2150
|
-
"
|
|
2151
|
-
"description": "
|
|
2152
|
-
"type": "unknown",
|
|
2153
|
-
"required": true
|
|
2154
|
-
},
|
|
2155
|
-
"onNext": {
|
|
2156
|
-
"description": "Callback fired when the next/submit button is clicked.",
|
|
2153
|
+
"prevButtonProps": {
|
|
2154
|
+
"description": "Props passed to the back/previous Button component (e.g. { children:",
|
|
2157
2155
|
"type": "unknown",
|
|
2158
2156
|
"required": true
|
|
2159
2157
|
},
|
|
2160
|
-
"
|
|
2161
|
-
"description": "
|
|
2158
|
+
"nextButtonProps": {
|
|
2159
|
+
"description": "Props passed to the next/submit Button component (e.g. { children:",
|
|
2162
2160
|
"type": "unknown",
|
|
2163
2161
|
"required": true
|
|
2164
2162
|
},
|
|
2165
|
-
"
|
|
2166
|
-
"description": "
|
|
2163
|
+
"extraButtonProp": {
|
|
2164
|
+
"description": "Additional element rendered between the prev and next buttons in the footer.",
|
|
2167
2165
|
"type": "unknown",
|
|
2168
2166
|
"required": true
|
|
2169
2167
|
},
|
|
2170
|
-
"
|
|
2171
|
-
"description": "
|
|
2168
|
+
"customCSS": {
|
|
2169
|
+
"description": "Custom inline styles applied to the root DynamicLayout container.",
|
|
2172
2170
|
"type": "unknown",
|
|
2173
2171
|
"required": true
|
|
2174
2172
|
},
|
|
2175
|
-
"
|
|
2176
|
-
"description": "
|
|
2173
|
+
"className": {
|
|
2174
|
+
"description": "Additional CSS class name applied to the root DynamicLayout container.",
|
|
2177
2175
|
"type": "unknown",
|
|
2178
2176
|
"required": true
|
|
2179
2177
|
}
|
|
2180
2178
|
},
|
|
2181
|
-
"storyArgs": {
|
|
2182
|
-
"Default": {
|
|
2183
|
-
"title": "Create Alert",
|
|
2184
|
-
"description": "Create and configure your alert settings. Follow the steps to set up your alert preferences."
|
|
2185
|
-
},
|
|
2186
|
-
"WithAppLayout": {
|
|
2187
|
-
"title": "Create Alert",
|
|
2188
|
-
"description": "Create and configure your alert settings. Follow the steps to set up your alert preferences."
|
|
2189
|
-
}
|
|
2190
|
-
},
|
|
2179
|
+
"storyArgs": {},
|
|
2191
2180
|
"storyFile": "src/stories/CreateItemFlow.stories.tsx"
|
|
2192
2181
|
},
|
|
2193
2182
|
"DatePicker": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __exports as colorManipulator } from "../../../_virtual/colorManipulator.js";
|
|
2
2
|
import require$$0 from "@babel/runtime/helpers/interopRequireDefault";
|
|
3
|
-
import require$$1 from "../../../_virtual/
|
|
4
|
-
import require$$2 from "../../../_virtual/
|
|
3
|
+
import require$$1 from "../../../_virtual/index5.js";
|
|
4
|
+
import require$$2 from "../../../_virtual/index6.js";
|
|
5
5
|
var _interopRequireDefault = require$$0;
|
|
6
6
|
Object.defineProperty(colorManipulator, "__esModule", {
|
|
7
7
|
value: true
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as reactIs } from "../../../../_virtual/
|
|
1
|
+
import { __module as reactIs } from "../../../../_virtual/index4.js";
|
|
2
2
|
import { __require as requireReactIs_production_min } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as requireReactIs_development } from "./cjs/react-is.development.js";
|
|
4
4
|
var hasRequiredReactIs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutManager.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/ShortcutManager.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"ShortcutManager.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/ShortcutManager.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAkB,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAYrF,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAgC;IAEvD,OAAO,CAAC,aAAa,CAA2C;IAChE,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,eAAe,CAA4B;IACnD,OAAO,CAAC,gBAAgB,CAAkB;IAC1C,OAAO,CAAC,YAAY,CAAuC;IAE3D,OAAO;IAOP,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,eAAe;IAO5F,MAAM,CAAC,aAAa,IAAI,IAAI;IAK5B,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,SAAS;IASjB,OAAO,CAAC,aAAa,CA2CnB;IAEF,QAAQ,CAAC,YAAY,EAAE,oBAAoB,GAAG,IAAI;IAuBlD;;;OAGG;IACH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,IAAI,GAAG,OAAO;IAe1D,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAS5B,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO;IAIjC,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAO/B,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAYhC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAIpC,eAAe,IAAI,eAAe,EAAE;IAUpC,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,EAAE;IAWpE,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAIhC,OAAO,IAAI,IAAI;IAWf,OAAO,CAAC,QAAQ;CAajB"}
|
|
@@ -19,9 +19,7 @@ const _ShortcutManager = class _ShortcutManager {
|
|
|
19
19
|
const isInInput = INPUT_ELEMENTS.has(target.tagName) || target.isContentEditable;
|
|
20
20
|
const sorted = this.getSorted();
|
|
21
21
|
const active = sorted.filter((e) => this.isScopeActive(e.scope ?? "global"));
|
|
22
|
-
const sequenceEntries = active.filter(
|
|
23
|
-
(e) => e.parsed.type === "sequence" && (e.allowInInput === true || !isInInput)
|
|
24
|
-
).map((e) => ({ ...e, steps: e.parsed.steps }));
|
|
22
|
+
const sequenceEntries = active.filter((e) => e.parsed.isSequence && (e.allowInInput === true || !isInInput)).map((e) => ({ ...e, steps: e.parsed.combos }));
|
|
25
23
|
if (sequenceEntries.length > 0 || this._sequenceTracker.hasActiveSequences) {
|
|
26
24
|
const seqMatch = this._sequenceTracker.advance(event, sequenceEntries);
|
|
27
25
|
if (seqMatch) {
|
|
@@ -35,11 +33,12 @@ const _ShortcutManager = class _ShortcutManager {
|
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
35
|
const comboEntries = active.filter(
|
|
38
|
-
(e) => e.parsed.
|
|
36
|
+
(e) => !e.parsed.isSequence && (e.allowInInput === true || !isInInput)
|
|
39
37
|
);
|
|
40
38
|
for (const entry of comboEntries) {
|
|
41
|
-
|
|
42
|
-
if (
|
|
39
|
+
const combo = entry.parsed.combos[0];
|
|
40
|
+
if (!combo) continue;
|
|
41
|
+
if (matchShortcut(event, combo)) {
|
|
43
42
|
if (entry.preventDefault !== false) event.preventDefault();
|
|
44
43
|
this.debugLog(event, entry);
|
|
45
44
|
entry.handler(event);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface FormatOptions {
|
|
2
2
|
separator?: string;
|
|
3
3
|
}
|
|
4
|
-
/** Human-readable platform-aware label for UI badges. */
|
|
4
|
+
/** Human-readable platform-aware label for UI badges (JS-compatible output). */
|
|
5
5
|
export declare function formatShortcutDisplay(keys: string, options?: FormatOptions): string;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/format.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/format.ts"],"names":[],"mappings":"AAuCA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB,GAAG,MAAM,CAMvF"}
|
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
import { parseShortcutString } from "./parse.js";
|
|
2
2
|
import { isMac } from "./platform.js";
|
|
3
|
+
const MAC_SYMBOLS = {
|
|
4
|
+
meta: "⌘",
|
|
5
|
+
ctrl: "⌃",
|
|
6
|
+
alt: "⌥",
|
|
7
|
+
shift: "⇧"
|
|
8
|
+
};
|
|
9
|
+
const WIN_SYMBOLS = {
|
|
10
|
+
meta: "Win",
|
|
11
|
+
ctrl: "Ctrl",
|
|
12
|
+
alt: "Alt",
|
|
13
|
+
shift: "Shift"
|
|
14
|
+
};
|
|
15
|
+
const MODIFIER_ORDER = ["ctrl", "alt", "shift", "meta"];
|
|
3
16
|
const SPECIAL_KEY_DISPLAY = {
|
|
4
17
|
arrowup: "↑",
|
|
5
18
|
arrowdown: "↓",
|
|
@@ -17,27 +30,16 @@ function formatKey(key) {
|
|
|
17
30
|
if (key.length === 1) return key.toUpperCase();
|
|
18
31
|
return key.charAt(0).toUpperCase() + key.slice(1);
|
|
19
32
|
}
|
|
20
|
-
function formatCombo(combo, separator) {
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
parts.push(isMac ? "⌘" : "Ctrl");
|
|
25
|
-
} else {
|
|
26
|
-
if (modifiers.ctrl) parts.push(isMac ? "⌃" : "Ctrl");
|
|
27
|
-
if (modifiers.meta) parts.push("⌘");
|
|
28
|
-
}
|
|
29
|
-
if (modifiers.alt) parts.push(isMac ? "⌥" : "Alt");
|
|
30
|
-
if (modifiers.shift) parts.push(isMac ? "⇧" : "Shift");
|
|
31
|
-
if (key) parts.push(formatKey(key));
|
|
32
|
-
return parts.join(separator);
|
|
33
|
+
function formatCombo(combo, symbols, separator) {
|
|
34
|
+
const modParts = MODIFIER_ORDER.filter((m) => combo.modifiers.has(m)).map((m) => symbols[m]);
|
|
35
|
+
const keyPart = formatKey(combo.key);
|
|
36
|
+
return [...modParts, keyPart].join(separator);
|
|
33
37
|
}
|
|
34
38
|
function formatShortcutDisplay(keys, options = {}) {
|
|
39
|
+
const symbols = isMac ? MAC_SYMBOLS : WIN_SYMBOLS;
|
|
35
40
|
const separator = options.separator ?? (isMac ? "" : "+");
|
|
36
41
|
const parsed = parseShortcutString(keys);
|
|
37
|
-
|
|
38
|
-
return parsed.steps.map((c) => formatCombo(c, separator)).join(" then ");
|
|
39
|
-
}
|
|
40
|
-
return formatCombo(parsed.combo, separator);
|
|
42
|
+
return parsed.combos.map((combo) => formatCombo(combo, symbols, separator)).join(" then ");
|
|
41
43
|
}
|
|
42
44
|
export {
|
|
43
45
|
formatShortcutDisplay
|
|
@@ -6,5 +6,5 @@ export { normalizeShortcutString, parseShortcutString } from './parse';
|
|
|
6
6
|
export { SequenceTracker } from './sequence';
|
|
7
7
|
export type { SequenceEntry } from './sequence';
|
|
8
8
|
export { ShortcutManager } from './ShortcutManager';
|
|
9
|
-
export type { ParsedShortcut, ShortcutBinding,
|
|
9
|
+
export type { Modifier, ParsedShortcut, ShortcutBinding, ShortcutCombo, ShortcutRegistration, ShortcutSummary, } from './types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,cAAc,EACd,eAAe,EACf,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,cAAc,EACd,WAAW,EACX,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,EACb,oBAAoB,EACpB,eAAe,GAChB,MAAM,SAAS,CAAC"}
|
|
@@ -4,6 +4,9 @@ import { ShortcutCombo } from './types';
|
|
|
4
4
|
export declare function normalizeKey(key: string): string;
|
|
5
5
|
/** Map `KeyboardEvent.code` to normalized key (fixes macOS Option+letter). */
|
|
6
6
|
export declare function normalizedPhysicalKey(code: string): string | null;
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Test whether a KeyboardEvent matches a ShortcutCombo exactly
|
|
9
|
+
* (same modifiers, no more / no fewer, and matching key).
|
|
10
|
+
*/
|
|
8
11
|
export declare function matchShortcut(event: KeyboardEvent, combo: ShortcutCombo): boolean;
|
|
9
12
|
//# sourceMappingURL=match.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/match.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"match.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/match.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAY,aAAa,EAAE,MAAM,SAAS,CAAC;AAEvD,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGhD;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsDjE;AAYD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAcjF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { KEY_ALIASES } from "./constants.js";
|
|
2
|
-
import { isMac } from "./platform.js";
|
|
3
2
|
function normalizeKey(key) {
|
|
4
3
|
const lower = key.toLowerCase();
|
|
5
4
|
return KEY_ALIASES[lower] ?? lower;
|
|
@@ -54,40 +53,24 @@ function normalizedPhysicalKey(code) {
|
|
|
54
53
|
}
|
|
55
54
|
return null;
|
|
56
55
|
}
|
|
57
|
-
function
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if (wantsMod) {
|
|
65
|
-
if (!modPressed) return false;
|
|
66
|
-
if (wantsAlt && !event.altKey) return false;
|
|
67
|
-
if (wantsShift && !event.shiftKey) return false;
|
|
68
|
-
if (!wantsAlt && event.altKey) return false;
|
|
69
|
-
if (!wantsShift && event.shiftKey) return false;
|
|
70
|
-
if (wantsCtrl && !event.ctrlKey) return false;
|
|
71
|
-
if (wantsMeta && !event.metaKey) return false;
|
|
72
|
-
return true;
|
|
73
|
-
}
|
|
74
|
-
if (wantsCtrl !== event.ctrlKey) return false;
|
|
75
|
-
if (wantsMeta !== event.metaKey) return false;
|
|
76
|
-
if (wantsAlt !== event.altKey) return false;
|
|
77
|
-
if (wantsShift !== event.shiftKey) return false;
|
|
78
|
-
return true;
|
|
79
|
-
}
|
|
80
|
-
function keyMatch(event, expectedKey) {
|
|
81
|
-
if (!expectedKey) return true;
|
|
82
|
-
const normalized = normalizeKey(event.key);
|
|
83
|
-
if (normalized === expectedKey) return true;
|
|
84
|
-
const physical = normalizedPhysicalKey(event.code);
|
|
85
|
-
if (physical !== null && physical === expectedKey) return true;
|
|
86
|
-
return false;
|
|
56
|
+
function getActiveModifiers(event) {
|
|
57
|
+
const mods = /* @__PURE__ */ new Set();
|
|
58
|
+
if (event.ctrlKey) mods.add("ctrl");
|
|
59
|
+
if (event.metaKey) mods.add("meta");
|
|
60
|
+
if (event.altKey) mods.add("alt");
|
|
61
|
+
if (event.shiftKey) mods.add("shift");
|
|
62
|
+
return mods;
|
|
87
63
|
}
|
|
88
64
|
function matchShortcut(event, combo) {
|
|
89
|
-
|
|
90
|
-
|
|
65
|
+
const pressed = getActiveModifiers(event);
|
|
66
|
+
if (pressed.size !== combo.modifiers.size) return false;
|
|
67
|
+
for (const mod of combo.modifiers) {
|
|
68
|
+
if (!pressed.has(mod)) return false;
|
|
69
|
+
}
|
|
70
|
+
const fromKey = normalizeKey(event.key);
|
|
71
|
+
if (fromKey === combo.key) return true;
|
|
72
|
+
const fromCode = normalizedPhysicalKey(event.code);
|
|
73
|
+
return fromCode !== null && fromCode === combo.key;
|
|
91
74
|
}
|
|
92
75
|
export {
|
|
93
76
|
matchShortcut,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ParsedShortcut } from './types';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Parse a shortcut string into
|
|
5
|
-
* `mod+k` →
|
|
4
|
+
* Parse a shortcut string into the JS-compatible `{ isSequence, combos }` shape.
|
|
5
|
+
* `mod+k` → single combo (mod resolved to ctrl/meta); `g i` → sequence.
|
|
6
6
|
*/
|
|
7
|
-
export declare function parseShortcutString(
|
|
7
|
+
export declare function parseShortcutString(shortcutStr: string): ParsedShortcut;
|
|
8
8
|
/**
|
|
9
9
|
* Normalize shortcut string for blacklist / dedup / comparison.
|
|
10
|
-
*
|
|
10
|
+
* Modifiers are sorted alphabetically; `mod` is already platform-resolved.
|
|
11
11
|
*/
|
|
12
|
-
export declare function normalizeShortcutString(
|
|
12
|
+
export declare function normalizeShortcutString(shortcutStr: string): string;
|
|
13
13
|
//# sourceMappingURL=parse.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/parse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/parse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAY,cAAc,EAAiB,MAAM,SAAS,CAAC;AA8CvE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,CAYvE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQnE"}
|
|
@@ -1,62 +1,48 @@
|
|
|
1
1
|
import { KEY_ALIASES } from "./constants.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { isMac } from "./platform.js";
|
|
3
|
+
const MODIFIER_SET = /* @__PURE__ */ new Set(["ctrl", "meta", "alt", "shift", "mod"]);
|
|
4
|
+
function resolveModifier(mod) {
|
|
5
|
+
if (mod === "mod") return isMac ? "meta" : "ctrl";
|
|
6
|
+
return mod;
|
|
5
7
|
}
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
function canonicalModifierToken(token) {
|
|
9
|
+
if (token === "control") return "ctrl";
|
|
10
|
+
if (token === "cmd" || token === "command") return "meta";
|
|
11
|
+
if (token === "option") return "alt";
|
|
12
|
+
if (MODIFIER_SET.has(token)) return token;
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
function parseCombo(comboStr) {
|
|
16
|
+
const parts = comboStr.toLowerCase().split("+").map((p) => p.trim()).filter(Boolean);
|
|
17
|
+
const modifiers = /* @__PURE__ */ new Set();
|
|
15
18
|
let key = "";
|
|
16
|
-
for (const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
else
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
for (const part of parts) {
|
|
20
|
+
const modToken = canonicalModifierToken(part);
|
|
21
|
+
if (modToken !== null) {
|
|
22
|
+
modifiers.add(resolveModifier(modToken));
|
|
23
|
+
} else {
|
|
24
|
+
key = KEY_ALIASES[part] ?? part;
|
|
25
|
+
}
|
|
23
26
|
}
|
|
24
27
|
return { modifiers, key };
|
|
25
28
|
}
|
|
26
|
-
function parseShortcutString(
|
|
27
|
-
const trimmed =
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
type: "sequence",
|
|
32
|
-
steps: parts.map((p) => parseComboPart(p))
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
if (/\s+\S/.test(trimmed) && trimmed.includes("+")) {
|
|
36
|
-
const parts = trimmed.split(/\s+/).filter(Boolean);
|
|
37
|
-
return {
|
|
38
|
-
type: "sequence",
|
|
39
|
-
steps: parts.map((p) => parseComboPart(p))
|
|
40
|
-
};
|
|
29
|
+
function parseShortcutString(shortcutStr) {
|
|
30
|
+
const trimmed = shortcutStr.trim();
|
|
31
|
+
const parts = trimmed.split(/\s+/).filter(Boolean);
|
|
32
|
+
if (parts.length <= 1) {
|
|
33
|
+
return { isSequence: false, combos: [parseCombo(parts[0] ?? "")] };
|
|
41
34
|
}
|
|
42
|
-
return {
|
|
35
|
+
return {
|
|
36
|
+
isSequence: true,
|
|
37
|
+
combos: parts.map(parseCombo)
|
|
38
|
+
};
|
|
43
39
|
}
|
|
44
|
-
function normalizeShortcutString(
|
|
45
|
-
const parsed = parseShortcutString(
|
|
46
|
-
|
|
47
|
-
const mods = [];
|
|
48
|
-
if (combo.modifiers.mod) mods.push("mod");
|
|
49
|
-
if (combo.modifiers.ctrl) mods.push("ctrl");
|
|
50
|
-
if (combo.modifiers.meta) mods.push("meta");
|
|
51
|
-
if (combo.modifiers.alt) mods.push("alt");
|
|
52
|
-
if (combo.modifiers.shift) mods.push("shift");
|
|
53
|
-
mods.sort();
|
|
40
|
+
function normalizeShortcutString(shortcutStr) {
|
|
41
|
+
const parsed = parseShortcutString(shortcutStr);
|
|
42
|
+
return parsed.combos.map((combo) => {
|
|
43
|
+
const mods = [...combo.modifiers].sort();
|
|
54
44
|
return mods.length > 0 ? [...mods, combo.key].join("+") : combo.key;
|
|
55
|
-
}
|
|
56
|
-
if (parsed.type === "sequence") {
|
|
57
|
-
return parsed.steps.map(normCombo).join(" ");
|
|
58
|
-
}
|
|
59
|
-
return normCombo(parsed.combo);
|
|
45
|
+
}).join(" ");
|
|
60
46
|
}
|
|
61
47
|
export {
|
|
62
48
|
normalizeShortcutString,
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
/** Platform modifier after `mod` is resolved at parse time. */
|
|
2
|
+
export type Modifier = 'ctrl' | 'meta' | 'alt' | 'shift';
|
|
3
|
+
/**
|
|
4
|
+
* A single key combination (e.g. Mod+Shift+K).
|
|
5
|
+
* JS-compatible: `modifiers` is a Set (no unresolved `mod` token).
|
|
6
|
+
*/
|
|
1
7
|
export interface ShortcutCombo {
|
|
2
|
-
modifiers:
|
|
3
|
-
|
|
4
|
-
meta: boolean;
|
|
5
|
-
alt: boolean;
|
|
6
|
-
shift: boolean;
|
|
7
|
-
mod: boolean;
|
|
8
|
-
};
|
|
8
|
+
modifiers: Set<Modifier>;
|
|
9
|
+
/** Normalized lowercase key (e.g. 'k', 'enter', 'arrowup') */
|
|
9
10
|
key: string;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Parsed shortcut — single combo or sequence of combos.
|
|
14
|
+
* JS-compatible shape used by consumers of the previous JS package.
|
|
15
|
+
*/
|
|
16
|
+
export interface ParsedShortcut {
|
|
17
|
+
isSequence: boolean;
|
|
18
|
+
/** Single-element for simple chords; multi for sequences like `g i` */
|
|
19
|
+
combos: ShortcutCombo[];
|
|
14
20
|
}
|
|
15
|
-
export interface ShortcutChord {
|
|
16
|
-
type: 'chord';
|
|
17
|
-
combo: ShortcutCombo;
|
|
18
|
-
}
|
|
19
|
-
export type ParsedShortcut = ShortcutSequence | ShortcutChord;
|
|
20
21
|
export interface ShortcutRegistration {
|
|
21
22
|
id: string;
|
|
22
23
|
keys: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/types.ts"],"names":[],"mappings":"AAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/utils/shortcuts/types.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;AAEzD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;IACzB,8DAA8D;IAC9D,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,OAAO,CAAC;IACpB,uEAAuE;IACvE,MAAM,EAAE,aAAa,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IACxC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|