@stack-spot/portal-layout 0.0.49 → 0.0.51
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/Layout.d.ts +5 -4
- package/dist/Layout.d.ts.map +1 -1
- package/dist/Layout.js +4 -3
- package/dist/Layout.js.map +1 -1
- package/dist/LayoutOverlayManager.js +6 -6
- package/dist/components/Dialog.d.ts +1 -1
- package/dist/components/Dialog.js +1 -1
- package/dist/components/Header.d.ts +1 -1
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Header.js +8 -4
- package/dist/components/Header.js.map +1 -1
- package/dist/components/OverlayContent.d.ts +1 -1
- package/dist/components/OverlayContent.js +20 -20
- package/dist/components/PortalSwitcher.d.ts +1 -1
- package/dist/components/PortalSwitcher.js +54 -54
- package/dist/components/SelectionList.d.ts +1 -1
- package/dist/components/SelectionList.d.ts.map +1 -1
- package/dist/components/SelectionList.js +61 -58
- package/dist/components/SelectionList.js.map +1 -1
- package/dist/components/Toaster.d.ts +1 -1
- package/dist/components/Toaster.js +1 -1
- package/dist/components/UserMenu.d.ts +1 -1
- package/dist/components/UserMenu.js +42 -42
- package/dist/components/UserMenu.js.map +1 -1
- package/dist/components/error/ErrorBoundary.d.ts +1 -1
- package/dist/components/error/ErrorBoundary.js +1 -1
- package/dist/components/error/ErrorDescriptor.d.ts +12 -0
- package/dist/components/error/ErrorDescriptor.d.ts.map +1 -0
- package/dist/components/error/ErrorDescriptor.js +17 -0
- package/dist/components/error/ErrorDescriptor.js.map +1 -0
- package/dist/components/error/ErrorFeedback.d.ts +1 -1
- package/dist/components/error/ErrorFeedback.js +1 -1
- package/dist/components/error/SilentErrorBoundary.d.ts +1 -1
- package/dist/components/error/SilentErrorBoundary.js +1 -1
- package/dist/components/menu/MenuContent.d.ts +8 -12
- package/dist/components/menu/MenuContent.d.ts.map +1 -1
- package/dist/components/menu/MenuContent.js +151 -148
- package/dist/components/menu/MenuContent.js.map +1 -1
- package/dist/components/menu/MenuSections.d.ts +1 -1
- package/dist/components/menu/MenuSections.d.ts.map +1 -1
- package/dist/components/menu/MenuSections.js +7 -5
- package/dist/components/menu/MenuSections.js.map +1 -1
- package/dist/components/menu/PageSelector.d.ts +1 -1
- package/dist/components/menu/PageSelector.d.ts.map +1 -1
- package/dist/components/menu/PageSelector.js +68 -66
- package/dist/components/menu/PageSelector.js.map +1 -1
- package/dist/components/menu/useCheckTextOverflow.d.ts +6 -0
- package/dist/components/menu/useCheckTextOverflow.d.ts.map +1 -0
- package/dist/components/menu/useCheckTextOverflow.js +20 -0
- package/dist/components/menu/useCheckTextOverflow.js.map +1 -0
- package/dist/layout-context.d.ts +10 -0
- package/dist/layout-context.d.ts.map +1 -0
- package/dist/layout-context.js +11 -0
- package/dist/layout-context.js.map +1 -0
- package/dist/layout.css +465 -465
- package/dist/svg/AI.d.ts +1 -1
- package/dist/svg/AI.js +1 -1
- package/dist/svg/EDP.d.ts +1 -1
- package/dist/svg/EDP.js +1 -1
- package/dist/svg/Forbidden.d.ts +1 -1
- package/dist/svg/Forbidden.js +1 -1
- package/dist/svg/HUB.d.ts +1 -1
- package/dist/svg/HUB.js +1 -1
- package/dist/svg/Logo.d.ts +1 -1
- package/dist/svg/Logo.js +1 -1
- package/dist/svg/NotFound.d.ts +1 -1
- package/dist/svg/NotFound.js +1 -1
- package/dist/svg/ServerError.d.ts +1 -1
- package/dist/svg/ServerError.js +1 -1
- package/dist/svg/Unauthenticated.d.ts +1 -1
- package/dist/svg/Unauthenticated.js +1 -1
- package/dist/toaster.js +2 -2
- package/dist/toaster.js.map +1 -1
- package/package.json +2 -2
- package/src/Layout.tsx +106 -103
- package/src/LayoutOverlayManager.tsx +273 -273
- package/src/components/Dialog.tsx +93 -93
- package/src/components/Header.tsx +34 -29
- package/src/components/OverlayContent.tsx +58 -58
- package/src/components/PortalSwitcher.tsx +147 -147
- package/src/components/SelectionList.tsx +272 -268
- package/src/components/Toaster.tsx +16 -16
- package/src/components/UserMenu.tsx +111 -111
- package/src/components/error/ErrorBoundary.tsx +38 -38
- package/src/components/error/ErrorFeedback.tsx +114 -114
- package/src/components/error/ErrorManager.ts +31 -31
- package/src/components/error/SilentErrorBoundary.tsx +54 -54
- package/src/components/menu/MenuContent.tsx +296 -293
- package/src/components/menu/MenuSections.tsx +270 -268
- package/src/components/menu/PageSelector.tsx +154 -152
- package/src/components/menu/constants.ts +2 -2
- package/src/components/menu/types.ts +112 -112
- package/src/components/menu/use-check-text-overflow.tsx +26 -26
- package/src/components/menu/use-keyboard-controls.tsx +70 -70
- package/src/components/types.ts +15 -15
- package/src/dictionary.ts +25 -25
- package/src/elements.ts +24 -24
- package/src/errors.ts +11 -11
- package/src/index.ts +17 -17
- package/src/layout-context.tsx +22 -0
- package/src/layout.css +465 -465
- package/src/svg/AI.tsx +37 -37
- package/src/svg/EDP.tsx +35 -35
- package/src/svg/Forbidden.tsx +22 -22
- package/src/svg/HUB.tsx +35 -35
- package/src/svg/Logo.tsx +35 -35
- package/src/svg/NotFound.tsx +16 -16
- package/src/svg/ServerError.tsx +33 -33
- package/src/svg/Unauthenticated.tsx +16 -16
- package/src/toaster.tsx +76 -76
- package/src/utils.ts +114 -114
- package/tsconfig.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Flex, IconBox, LinkBox, Text } from '@citric/core';
|
|
3
3
|
import { ChevronDown } from '@citric/icons';
|
|
4
4
|
import { Avatar } from '@citric/ui';
|
|
@@ -8,52 +8,52 @@ import { useState } from 'react';
|
|
|
8
8
|
import { styled } from 'styled-components';
|
|
9
9
|
import { SelectionList } from './SelectionList.js';
|
|
10
10
|
const USER_MENU_ID = 'userMenu';
|
|
11
|
-
const UserMenuBox = styled.div `
|
|
12
|
-
.user-menu-header {
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
padding: 12px;
|
|
18
|
-
border-bottom: 2px solid ${theme.color.light['600']};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.selection-list {
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: var(--header-height);
|
|
24
|
-
right: 20px;
|
|
25
|
-
width: 266px;
|
|
26
|
-
|
|
27
|
-
.selection-list-content {
|
|
28
|
-
border: none;
|
|
29
|
-
padding: 16px 16px 8px;
|
|
30
|
-
background-color: ${theme.color.light['400']};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
li {
|
|
34
|
-
margin: 8px 0;
|
|
35
|
-
& > a {
|
|
36
|
-
border-radius: 6px;
|
|
37
|
-
&:hover, &:focus {
|
|
38
|
-
background: ${theme.color.light['500']};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.username {
|
|
45
|
-
margin: 5px 0 2px 0;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.chevron {
|
|
49
|
-
transition: transform ease-out 0.3s;
|
|
50
|
-
}
|
|
11
|
+
const UserMenuBox = styled.div `
|
|
12
|
+
.user-menu-header {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: 12px;
|
|
18
|
+
border-bottom: 2px solid ${theme.color.light['600']};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.selection-list {
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: var(--header-height);
|
|
24
|
+
right: 20px;
|
|
25
|
+
width: 266px;
|
|
26
|
+
|
|
27
|
+
.selection-list-content {
|
|
28
|
+
border: none;
|
|
29
|
+
padding: 16px 16px 8px;
|
|
30
|
+
background-color: ${theme.color.light['400']};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
li {
|
|
34
|
+
margin: 8px 0;
|
|
35
|
+
& > a {
|
|
36
|
+
border-radius: 6px;
|
|
37
|
+
&:hover, &:focus {
|
|
38
|
+
background: ${theme.color.light['500']};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.username {
|
|
45
|
+
margin: 5px 0 2px 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.chevron {
|
|
49
|
+
transition: transform ease-out 0.3s;
|
|
50
|
+
}
|
|
51
51
|
`;
|
|
52
52
|
const UserMenuHeader = ({ userName, email }) => (_jsxs("div", { className: "user-menu-header", children: [_jsx(Avatar, { size: "xs", children: userName }), _jsx(Text, { appearance: "body1", className: "username", children: userName }), email && _jsx(Text, { appearance: "microtext1", className: "email", colorScheme: "light.700", children: email })] }));
|
|
53
53
|
export const UserMenu = ({ userName, email, options }) => {
|
|
54
54
|
const t = useTranslate(dictionary);
|
|
55
55
|
const [visible, setVisible] = useState(false);
|
|
56
|
-
return (_jsxs(UserMenuBox, { children: [_jsx(LinkBox, { as: "button", onClick: () => setVisible(v => !v), "aria-controls": USER_MENU_ID, "aria-expanded": visible, "aria-label": interpolate(t.accountMenu, [userName]), children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "xs", "aria-label": interpolate(t.accountMenu, [userName]), children: userName }), _jsx(IconBox, {
|
|
56
|
+
return (_jsxs(UserMenuBox, { children: [_jsx(LinkBox, { as: "button", onClick: () => setVisible(v => !v), "aria-controls": USER_MENU_ID, "aria-expanded": visible, "aria-label": interpolate(t.accountMenu, [userName]), children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Avatar, { size: "xs", "aria-label": interpolate(t.accountMenu, [userName]), children: userName }), _jsx(IconBox, { colorIcon: "inverse.500", className: "chevron", style: visible ? { transform: 'rotate(180deg)' } : undefined, children: _jsx(ChevronDown, {}) })] }) }), options?.length
|
|
57
57
|
? _jsx(SelectionList, { id: USER_MENU_ID, visible: visible, before: _jsx(UserMenuHeader, { userName: userName, email: email }), items: options, onHide: () => setVisible(false), maxHeight: "600px" })
|
|
58
58
|
: null] }));
|
|
59
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../../src/components/UserMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAc,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAsB,MAAM,iBAAiB,CAAA;AAQnE,MAAM,YAAY,GAAG,UAAU,CAAA;AAE/B,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;+BAOC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;;;;;;;;;;0BAY7B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;;;;;;wBAQ1B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC;;;;;;;;;;;;;CAa/C,CAAA;AAED,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAA0B,EAAE,EAAE,CAAC,CACtE,eAAK,SAAS,EAAC,kBAAkB,aAC/B,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,YAAE,QAAQ,GAAU,EACrC,KAAC,IAAI,IAAC,UAAU,EAAC,OAAO,EAAC,SAAS,EAAC,UAAU,YAAE,QAAQ,GAAQ,EAC9D,KAAK,IAAI,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,SAAS,EAAC,OAAO,EAAC,WAAW,EAAC,WAAW,YAAE,KAAK,GAAQ,IAC5F,CACP,CAAA;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAS,EAAE,EAAE;IAC9D,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IAClC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAE7C,OAAO,CACL,MAAC,WAAW,eACV,KAAC,OAAO,IACN,EAAE,EAAC,QAAQ,EACX,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,mBACnB,YAAY,mBACZ,OAAO,gBACV,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,YAElD,MAAC,IAAI,IAAC,UAAU,EAAC,QAAQ,aACvB,KAAC,MAAM,IAAC,IAAI,EAAC,IAAI,gBAAa,WAAW,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,YAAG,QAAQ,GAAU,EACzF,KAAC,OAAO,IAAC,
|
|
1
|
+
{"version":3,"file":"UserMenu.js","sourceRoot":"","sources":["../../src/components/UserMenu.tsx"],"names":[],"mappings":"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"}
|
|
@@ -16,7 +16,7 @@ export declare class ErrorBoundary extends Component<Props, State> {
|
|
|
16
16
|
};
|
|
17
17
|
componentDidCatch(error: any, errorInfo: any): void;
|
|
18
18
|
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
19
|
-
render(): string | number | boolean | import("react/jsx-runtime
|
|
19
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ErrorDescription {
|
|
2
|
+
code?: number;
|
|
3
|
+
message?: string;
|
|
4
|
+
debug?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export type DescriptionFn = (error: any) => ErrorDescription;
|
|
7
|
+
export declare class ErrorDescriptor {
|
|
8
|
+
private static descriptionFunction;
|
|
9
|
+
static setDescriptionFunction(fn: DescriptionFn): void;
|
|
10
|
+
static describe(error: any): ErrorDescription;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ErrorDescriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDescriptor.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorDescriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,gBAAgB,CAAA;AAE5D,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAEhC;IAEF,MAAM,CAAC,sBAAsB,CAAC,EAAE,EAAE,aAAa;IAI/C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG;CAG3B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class ErrorDescriptor {
|
|
2
|
+
static setDescriptionFunction(fn) {
|
|
3
|
+
this.descriptionFunction = fn;
|
|
4
|
+
}
|
|
5
|
+
static describe(error) {
|
|
6
|
+
return this.descriptionFunction(error);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(ErrorDescriptor, "descriptionFunction", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value: error => ({
|
|
14
|
+
message: error.message || `${error}`,
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=ErrorDescriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ErrorDescriptor.js","sourceRoot":"","sources":["../../../src/components/error/ErrorDescriptor.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,eAAe;IAK1B,MAAM,CAAC,sBAAsB,CAAC,EAAiB;QAC7C,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAA;IAC/B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAU;QACxB,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;;AAVc;;;;WAAqC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5D,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,GAAG,KAAK,EAAE;KACrC,CAAC;GAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ErrorDescription } from './ErrorManager.js';
|
|
2
|
-
export declare const ErrorFeedback: ({ code, message, debug }: ErrorDescription) => import("react/jsx-runtime
|
|
2
|
+
export declare const ErrorFeedback: ({ code, message, debug }: ErrorDescription) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=ErrorFeedback.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Button, Container, Flex, LinkBox, Text } from '@citric/core';
|
|
3
3
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
4
4
|
import { useState } from 'react';
|
|
@@ -17,7 +17,7 @@ export declare class SilentErrorBoundary extends Component<Props, State> {
|
|
|
17
17
|
};
|
|
18
18
|
componentDidCatch(error: any, errorInfo: any): void;
|
|
19
19
|
componentDidUpdate(prevProps: Readonly<Props>): void;
|
|
20
|
-
render(): string | number | boolean | import("react/jsx-runtime
|
|
20
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=SilentErrorBoundary.d.ts.map
|
|
@@ -64,7 +64,7 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
64
64
|
"aria-colindextext"?: string | undefined;
|
|
65
65
|
"aria-colspan"?: number | undefined;
|
|
66
66
|
"aria-controls"?: string | undefined;
|
|
67
|
-
"aria-current"?: boolean | "
|
|
67
|
+
"aria-current"?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
|
|
68
68
|
"aria-describedby"?: string | undefined;
|
|
69
69
|
"aria-description"?: string | undefined;
|
|
70
70
|
"aria-details"?: string | undefined;
|
|
@@ -74,7 +74,7 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
74
74
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
75
75
|
"aria-flowto"?: string | undefined;
|
|
76
76
|
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
77
|
-
"aria-haspopup"?: boolean | "
|
|
77
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "listbox" | "false" | "true" | "tree" | undefined;
|
|
78
78
|
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
79
79
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
80
80
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -91,7 +91,7 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
91
91
|
"aria-posinset"?: number | undefined;
|
|
92
92
|
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
93
93
|
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
94
|
-
"aria-relevant"?: "
|
|
94
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
95
95
|
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
96
96
|
"aria-roledescription"?: string | undefined;
|
|
97
97
|
"aria-rowcount"?: number | undefined;
|
|
@@ -248,9 +248,7 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
248
248
|
onPointerCancel?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
249
249
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
250
250
|
onPointerEnter?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
251
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
252
251
|
onPointerLeave?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
253
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
254
252
|
onPointerOver?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
255
253
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
256
254
|
onPointerOut?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
@@ -335,7 +333,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
335
333
|
"aria-colindextext"?: string | undefined;
|
|
336
334
|
"aria-colspan"?: number | undefined;
|
|
337
335
|
"aria-controls"?: string | undefined;
|
|
338
|
-
"aria-current"?: boolean | "
|
|
336
|
+
"aria-current"?: boolean | "time" | "page" | "false" | "true" | "step" | "location" | "date" | undefined;
|
|
339
337
|
"aria-describedby"?: string | undefined;
|
|
340
338
|
"aria-description"?: string | undefined;
|
|
341
339
|
"aria-details"?: string | undefined;
|
|
@@ -345,7 +343,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
345
343
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
346
344
|
"aria-flowto"?: string | undefined;
|
|
347
345
|
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
348
|
-
"aria-haspopup"?: boolean | "
|
|
346
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "grid" | "listbox" | "false" | "true" | "tree" | undefined;
|
|
349
347
|
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
350
348
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
351
349
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -362,7 +360,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
362
360
|
"aria-posinset"?: number | undefined;
|
|
363
361
|
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
364
362
|
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
365
|
-
"aria-relevant"?: "
|
|
363
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
366
364
|
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
367
365
|
"aria-roledescription"?: string | undefined;
|
|
368
366
|
"aria-rowcount"?: number | undefined;
|
|
@@ -519,9 +517,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
519
517
|
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
520
518
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
521
519
|
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
522
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
523
520
|
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
524
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
525
521
|
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
526
522
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
527
523
|
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -543,6 +539,6 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
543
539
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
544
540
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
545
541
|
}>;
|
|
546
|
-
export declare const ActionItem: ({ label, onClick, href, active, icon, badge, overflow }: MenuAction) => import("react/jsx-runtime
|
|
547
|
-
export declare const MenuContent: ({ pageSelector, goBack, title, subtitle, afterTitle, options, loading, error }: MenuSectionContent) => import("react/jsx-runtime
|
|
542
|
+
export declare const ActionItem: ({ label, onClick, href, active, icon, badge, overflow }: MenuAction) => import("react/jsx-runtime").JSX.Element;
|
|
543
|
+
export declare const MenuContent: ({ pageSelector, goBack, title, subtitle, afterTitle, options, loading, error }: MenuSectionContent) => import("react/jsx-runtime").JSX.Element;
|
|
548
544
|
//# sourceMappingURL=MenuContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/menu/MenuContent.tsx"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"MenuContent.d.ts","sourceRoot":"","sources":["../../../src/components/menu/MenuContent.tsx"],"names":[],"mappings":";;AAYA,OAAO,EAAa,UAAU,EAAY,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAY7E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsIrB,CAAA;AAED,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAIjB,CAAA;AAED,eAAO,MAAM,UAAU,4DAAsE,UAAU,4CAuBtG,CAAA;AAoED,eAAO,MAAM,WAAW,mFAAyF,kBAAkB,4CAsClI,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable react-refresh/only-export-components */
|
|
2
3
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
3
4
|
import { Flex, IconBox, Text } from '@citric/core';
|
|
4
5
|
import { ArrowLeft, ChevronDown } from '@citric/icons';
|
|
@@ -6,162 +7,164 @@ import { LoadingCircular } from '@citric/ui';
|
|
|
6
7
|
import { listToClass, theme } from '@stack-spot/portal-theme';
|
|
7
8
|
import { useMemo, useState } from 'react';
|
|
8
9
|
import { styled } from 'styled-components';
|
|
10
|
+
import { useAnchorTag } from '../../layout-context.js';
|
|
9
11
|
import { hideOverlayImmediately } from './MenuSections.js';
|
|
10
12
|
import { PageSelector } from './PageSelector.js';
|
|
11
13
|
import { MENU_CONTENT_ITEM_PADDING as ITEM_PADDING, MENU_CONTENT_PADDING as PADDING } from './constants.js';
|
|
12
14
|
import { useCheckTextOverflow } from './use-check-text-overflow.js';
|
|
13
|
-
const BackLink = styled.a `
|
|
14
|
-
display: flex;
|
|
15
|
-
flex-direction: row;
|
|
16
|
-
align-items: center;
|
|
17
|
-
margin: ${PADDING}px;
|
|
18
|
-
margin-bottom: 16px;
|
|
19
|
-
gap: 6px;
|
|
15
|
+
const BackLink = styled.a `
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
align-items: center;
|
|
19
|
+
margin: ${PADDING}px;
|
|
20
|
+
margin-bottom: 16px;
|
|
21
|
+
gap: 6px;
|
|
20
22
|
`;
|
|
21
|
-
export const MenuGroup = styled.ul `
|
|
22
|
-
padding: 0 0 0 16px;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
visibility: hidden;
|
|
26
|
-
transition: visibility 0s 0.3s;
|
|
27
|
-
|
|
28
|
-
&.no-indentation {
|
|
29
|
-
padding: 0;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.item-row-group > a {
|
|
33
|
-
padding: 0 16px;
|
|
34
|
-
margin: 0;
|
|
35
|
-
border-radius: 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.item-row-group > a::before {
|
|
39
|
-
content: '';
|
|
40
|
-
position: absolute;
|
|
41
|
-
top: 0;
|
|
42
|
-
left: 0;
|
|
43
|
-
right: 0;
|
|
44
|
-
bottom: 0;
|
|
45
|
-
background-color: var(--light-300);
|
|
46
|
-
opacity: 0.24;
|
|
47
|
-
border-radius: inherit;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.item-row {
|
|
51
|
-
display: flex;
|
|
52
|
-
flex-direction: row;
|
|
53
|
-
gap: 8px;
|
|
54
|
-
align-items: center;
|
|
55
|
-
|
|
56
|
-
.label {
|
|
57
|
-
flex: 1;
|
|
58
|
-
&.hidden, &.ellipsis {
|
|
59
|
-
white-space: nowrap;
|
|
60
|
-
overflow: hidden;
|
|
61
|
-
}
|
|
62
|
-
&.ellipsis {
|
|
63
|
-
text-overflow: ellipsis;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.item-row-group {
|
|
69
|
-
margin-top: 16px;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
li a {
|
|
73
|
-
position: relative;
|
|
74
|
-
height: 0;
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
transition: height 0.3s, background-color 0.2s;
|
|
77
|
-
margin-left: ${PADDING - ITEM_PADDING}px;
|
|
78
|
-
padding-left: ${ITEM_PADDING}px;
|
|
79
|
-
|
|
80
|
-
&:hover {
|
|
81
|
-
background-color: ${theme.color.light['500']};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&.action {
|
|
85
|
-
&:before {
|
|
86
|
-
content: '';
|
|
87
|
-
position: absolute;
|
|
88
|
-
left: 2px;
|
|
89
|
-
width: 2px;
|
|
90
|
-
height: 0;
|
|
91
|
-
background: inherit;
|
|
92
|
-
transition: height 0.2s;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&.active {
|
|
96
|
-
|
|
97
|
-
&:hover {
|
|
98
|
-
background-color: transparent;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&:before {
|
|
102
|
-
background: ${theme.color.primary['500']};
|
|
103
|
-
height: 24px;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&:not(.active):hover:before {
|
|
108
|
-
background: ${theme.color.light.contrastText};
|
|
109
|
-
height: 24px;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.chevron {
|
|
114
|
-
transition: transform 0.3s;
|
|
115
|
-
&:not(.open) {
|
|
116
|
-
transform: rotate(-90deg);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.item-row-title {
|
|
121
|
-
opacity: 0.7;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&.open {
|
|
126
|
-
visibility: visible;
|
|
127
|
-
transition: unset;
|
|
128
|
-
& > li > a, & > li > .item-row-group > a {
|
|
129
|
-
height: 40px;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&:not(.open) &.open > li > a {
|
|
134
|
-
height: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
&.root {
|
|
138
|
-
margin-bottom: ${PADDING}px;
|
|
139
|
-
|
|
140
|
-
& > li {
|
|
141
|
-
.group-title {
|
|
142
|
-
margin-left: ${PADDING}px;
|
|
143
|
-
margin-bottom: 5px;
|
|
144
|
-
margin-top: 40px;
|
|
145
|
-
display: block;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
&:first-child {
|
|
149
|
-
.group-title {
|
|
150
|
-
margin-top: 0;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
23
|
+
export const MenuGroup = styled.ul `
|
|
24
|
+
padding: 0 0 0 16px;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
visibility: hidden;
|
|
28
|
+
transition: visibility 0s 0.3s;
|
|
29
|
+
|
|
30
|
+
&.no-indentation {
|
|
31
|
+
padding: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.item-row-group > a {
|
|
35
|
+
padding: 0 16px;
|
|
36
|
+
margin: 0;
|
|
37
|
+
border-radius: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.item-row-group > a::before {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 0;
|
|
44
|
+
left: 0;
|
|
45
|
+
right: 0;
|
|
46
|
+
bottom: 0;
|
|
47
|
+
background-color: var(--light-300);
|
|
48
|
+
opacity: 0.24;
|
|
49
|
+
border-radius: inherit;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.item-row {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: row;
|
|
55
|
+
gap: 8px;
|
|
56
|
+
align-items: center;
|
|
57
|
+
|
|
58
|
+
.label {
|
|
59
|
+
flex: 1;
|
|
60
|
+
&.hidden, &.ellipsis {
|
|
61
|
+
white-space: nowrap;
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
}
|
|
64
|
+
&.ellipsis {
|
|
65
|
+
text-overflow: ellipsis;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.item-row-group {
|
|
71
|
+
margin-top: 16px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
li a {
|
|
75
|
+
position: relative;
|
|
76
|
+
height: 0;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
transition: height 0.3s, background-color 0.2s;
|
|
79
|
+
margin-left: ${PADDING - ITEM_PADDING}px;
|
|
80
|
+
padding-left: ${ITEM_PADDING}px;
|
|
81
|
+
|
|
82
|
+
&:hover {
|
|
83
|
+
background-color: ${theme.color.light['500']};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.action {
|
|
87
|
+
&:before {
|
|
88
|
+
content: '';
|
|
89
|
+
position: absolute;
|
|
90
|
+
left: 2px;
|
|
91
|
+
width: 2px;
|
|
92
|
+
height: 0;
|
|
93
|
+
background: inherit;
|
|
94
|
+
transition: height 0.2s;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&.active {
|
|
98
|
+
|
|
99
|
+
&:hover {
|
|
100
|
+
background-color: transparent;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:before {
|
|
104
|
+
background: ${theme.color.primary['500']};
|
|
105
|
+
height: 24px;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&:not(.active):hover:before {
|
|
110
|
+
background: ${theme.color.light.contrastText};
|
|
111
|
+
height: 24px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.chevron {
|
|
116
|
+
transition: transform 0.3s;
|
|
117
|
+
&:not(.open) {
|
|
118
|
+
transform: rotate(-90deg);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.item-row-title {
|
|
123
|
+
opacity: 0.7;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.open {
|
|
128
|
+
visibility: visible;
|
|
129
|
+
transition: unset;
|
|
130
|
+
& > li > a, & > li > .item-row-group > a {
|
|
131
|
+
height: 40px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&:not(.open) &.open > li > a {
|
|
136
|
+
height: 0;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.root {
|
|
140
|
+
margin-bottom: ${PADDING}px;
|
|
141
|
+
|
|
142
|
+
& > li {
|
|
143
|
+
.group-title {
|
|
144
|
+
margin-left: ${PADDING}px;
|
|
145
|
+
margin-bottom: 5px;
|
|
146
|
+
margin-top: 40px;
|
|
147
|
+
display: block;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&:first-child {
|
|
151
|
+
.group-title {
|
|
152
|
+
margin-top: 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
155
157
|
`;
|
|
156
|
-
export const Title = styled.header `
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
margin: ${PADDING}px 0 24px ${PADDING}px;
|
|
158
|
+
export const Title = styled.header `
|
|
159
|
+
display: flex;
|
|
160
|
+
flex-direction: column;
|
|
161
|
+
margin: ${PADDING}px 0 24px ${PADDING}px;
|
|
160
162
|
`;
|
|
161
163
|
export const ActionItem = ({ label, onClick, href, active, icon, badge, overflow = 'wrap' }) => {
|
|
164
|
+
const Link = useAnchorTag();
|
|
162
165
|
const { ref, overflow: textOverflow } = useCheckTextOverflow();
|
|
163
166
|
const isTextLabel = typeof label === 'string';
|
|
164
|
-
return (_jsxs(
|
|
167
|
+
return (_jsxs(Link, { href: href, onClick: () => {
|
|
165
168
|
if (active)
|
|
166
169
|
return;
|
|
167
170
|
if (onClick)
|
|
@@ -197,7 +200,7 @@ export const MenuContent = ({ pageSelector, goBack, title, subtitle, afterTitle,
|
|
|
197
200
|
return _jsx(Text, { colorScheme: "danger", children: error });
|
|
198
201
|
return _jsx(MenuGroup, { className: "open root no-indentation", children: items });
|
|
199
202
|
}
|
|
200
|
-
return (_jsxs(_Fragment, { children: [goBack && (_jsxs(BackLink, { href: goBack.href, onClick: goBack.onClick, children: [_jsx(IconBox, {
|
|
203
|
+
return (_jsxs(_Fragment, { children: [goBack && (_jsxs(BackLink, { href: goBack.href, onClick: goBack.onClick, children: [_jsx(IconBox, { colorIcon: "inverse.500", size: "sm", children: _jsx(ArrowLeft, {}) }), typeof goBack?.label === 'string' ?
|
|
201
204
|
_jsx(Text, { appearance: "body2", nowrapEllipsis: true, children: goBack.label }) :
|
|
202
205
|
goBack.label.element] })), title && (_jsxs(Title, { children: [_jsx(Text, { appearance: "overheader1", colorScheme: "primary", sx: { fontSize: '0.75rem', mt: 2, mb: 2 }, children: title }), subtitle && _jsx(Text, { appearance: "h5", children: subtitle })] })), afterTitle, pageSelector && _jsx(PageSelector, { ...pageSelector }), renderContent()] }));
|
|
203
206
|
};
|