@stack-spot/portal-layout 0.0.51 → 0.0.52
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 +2 -2
- package/dist/Layout.js +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.js +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.js +54 -54
- 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 +41 -41
- package/dist/components/error/ErrorBoundary.d.ts +1 -1
- package/dist/components/error/ErrorBoundary.js +1 -1
- 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 +12 -8
- package/dist/components/menu/MenuContent.d.ts.map +1 -1
- package/dist/components/menu/MenuContent.js +146 -146
- package/dist/components/menu/MenuSections.d.ts +1 -1
- package/dist/components/menu/MenuSections.js +1 -1
- package/dist/components/menu/PageSelector.d.ts +1 -1
- package/dist/components/menu/PageSelector.js +65 -65
- package/dist/layout-context.d.ts +1 -1
- package/dist/layout-context.js +1 -1
- package/dist/layout.css +466 -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 +1 -1
- package/package.json +1 -1
- package/src/Layout.tsx +106 -106
- package/src/LayoutOverlayManager.tsx +273 -273
- package/src/components/Dialog.tsx +93 -93
- package/src/components/Header.tsx +34 -34
- package/src/components/OverlayContent.tsx +58 -58
- package/src/components/PortalSwitcher.tsx +147 -147
- package/src/components/SelectionList.tsx +272 -272
- 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 -296
- package/src/components/menu/MenuSections.tsx +270 -270
- package/src/components/menu/PageSelector.tsx +154 -154
- 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 -22
- package/src/layout.css +466 -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
- package/dist/components/error/ErrorDescriptor.d.ts +0 -12
- package/dist/components/error/ErrorDescriptor.d.ts.map +0 -1
- package/dist/components/error/ErrorDescriptor.js +0 -17
- package/dist/components/error/ErrorDescriptor.js.map +0 -1
- package/dist/components/menu/useCheckTextOverflow.d.ts +0 -6
- package/dist/components/menu/useCheckTextOverflow.d.ts.map +0 -1
- package/dist/components/menu/useCheckTextOverflow.js +0 -20
- package/dist/components/menu/useCheckTextOverflow.js.map +0 -1
package/dist/Layout.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ interface RawProps extends WithStyle, LayoutContext {
|
|
|
23
23
|
errorDescriptor?: DescriptionFn;
|
|
24
24
|
onError?: ErrorHandler;
|
|
25
25
|
}
|
|
26
|
-
export declare const RawLayout: ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style, anchorTag }: RawProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const RawLayout: ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style, anchorTag }: RawProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
27
|
+
export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style }: Props) => import("react/jsx-runtime.js").JSX.Element;
|
|
28
28
|
export {};
|
|
29
29
|
//# sourceMappingURL=Layout.d.ts.map
|
package/dist/Layout.js
CHANGED
|
@@ -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.js";
|
|
2
2
|
import { CSSToCitricAdapter, listToClass } from '@stack-spot/portal-theme';
|
|
3
3
|
import '@stack-spot/portal-theme/dist/theme.css';
|
|
4
4
|
import { useEffect } from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
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.js";
|
|
2
2
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
3
3
|
import { Button } from '@citric/core';
|
|
4
4
|
import { useLayoutEffect, useState } from 'react';
|
|
@@ -10,11 +10,11 @@ import { ElementNotFound, LayoutError } from './errors.js';
|
|
|
10
10
|
import { showToaster as showReactToaster } from './toaster.js';
|
|
11
11
|
import { focusFirstChild, valueOfLayoutVar } from './utils.js';
|
|
12
12
|
function multipleCallsWarning(type, timeMS) {
|
|
13
|
-
return `
|
|
14
|
-
Attempted to show a modal or rightPanel while a ${type} was still being closed. Closing a ${type} takes only ${timeMS}ms, so this action
|
|
15
|
-
is unlikely to have been triggered by the user and may point to errors in your code. Please check.\nTip: showModal and showRightPanel
|
|
16
|
-
are sideEffects and should never be called during the render of a component. Try to use "useEffect" or link it to an event, like
|
|
17
|
-
"onClick".
|
|
13
|
+
return `
|
|
14
|
+
Attempted to show a modal or rightPanel while a ${type} was still being closed. Closing a ${type} takes only ${timeMS}ms, so this action
|
|
15
|
+
is unlikely to have been triggered by the user and may point to errors in your code. Please check.\nTip: showModal and showRightPanel
|
|
16
|
+
are sideEffects and should never be called during the render of a component. Try to use "useEffect" or link it to an event, like
|
|
17
|
+
"onClick".
|
|
18
18
|
`.replace(/\s*\n\s+/g, ' ');
|
|
19
19
|
}
|
|
20
20
|
class LayoutOverlayManager {
|
|
@@ -30,6 +30,6 @@ interface Props extends DialogOptions {
|
|
|
30
30
|
onConfirm: () => void;
|
|
31
31
|
onCancel: () => void;
|
|
32
32
|
}
|
|
33
|
-
export declare const Dialog: ({ message, title, subtitle, cancel, confirm, validation, onConfirm, onCancel, type, buttonPlacement, buttonColor, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const Dialog: ({ message, title, subtitle, cancel, confirm, validation, onConfirm, onCancel, type, buttonPlacement, buttonColor, }: Props) => import("react/jsx-runtime.js").JSX.Element;
|
|
34
34
|
export {};
|
|
35
35
|
//# sourceMappingURL=Dialog.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.js";
|
|
2
2
|
import { Button, Flex, Input, Text } from '@citric/core';
|
|
3
3
|
import { interpolate } from '@stack-spot/portal-translate';
|
|
4
4
|
import { useState } from 'react';
|
|
@@ -11,5 +11,5 @@ export interface HeaderProps {
|
|
|
11
11
|
center?: ReactNode;
|
|
12
12
|
right?: ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare const Header: ({ logo, logoHref, center, right, userName, email, options, portalSwitch }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const Header: ({ logo, logoHref, center, right, userName, email, options, portalSwitch }: HeaderProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
15
15
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime.js";
|
|
2
2
|
import { Flex } from '@citric/core';
|
|
3
3
|
import { useAnchorTag } from '../layout-context.js';
|
|
4
4
|
import { Logo } from '../svg/Logo.js';
|
|
@@ -11,6 +11,6 @@ interface Props extends OverlayContentProps {
|
|
|
11
11
|
onClose: () => void;
|
|
12
12
|
type: 'modal' | 'panel';
|
|
13
13
|
}
|
|
14
|
-
export declare const OverlayContent: ({ children, title, subtitle, className, style, onClose, type }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const OverlayContent: ({ children, title, subtitle, className, style, onClose, type }: Props) => import("react/jsx-runtime.js").JSX.Element;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=OverlayContent.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.js";
|
|
2
2
|
import { Flex, Text } from '@citric/core';
|
|
3
3
|
import { TimesMini } from '@citric/icons';
|
|
4
4
|
import { IconButton } from '@citric/ui';
|
|
@@ -6,25 +6,25 @@ import { listToClass, theme } from '@stack-spot/portal-theme';
|
|
|
6
6
|
import { styled } from 'styled-components';
|
|
7
7
|
import { useDictionary } from '../dictionary.js';
|
|
8
8
|
export const CLOSE_OVERLAY_ID = 'close-overlay';
|
|
9
|
-
const ContentBox = styled.section `
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
border-radius: 1rem;
|
|
13
|
-
background-color: ${theme.color.light['400']};
|
|
14
|
-
&.modal {
|
|
15
|
-
padding: 32px;
|
|
16
|
-
}
|
|
17
|
-
&.panel {
|
|
18
|
-
padding: 20px;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex-direction: column;
|
|
21
|
-
flex: 1;
|
|
22
|
-
}
|
|
23
|
-
header {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
margin-bottom: 1.25rem;
|
|
27
|
-
}
|
|
9
|
+
const ContentBox = styled.section `
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
border-radius: 1rem;
|
|
13
|
+
background-color: ${theme.color.light['400']};
|
|
14
|
+
&.modal {
|
|
15
|
+
padding: 32px;
|
|
16
|
+
}
|
|
17
|
+
&.panel {
|
|
18
|
+
padding: 20px;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
flex: 1;
|
|
22
|
+
}
|
|
23
|
+
header {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: row;
|
|
26
|
+
margin-bottom: 1.25rem;
|
|
27
|
+
}
|
|
28
28
|
`;
|
|
29
29
|
export const OverlayContent = ({ children, title, subtitle, className, style, onClose, type }) => {
|
|
30
30
|
const t = useDictionary();
|
|
@@ -6,5 +6,5 @@ export interface Portal {
|
|
|
6
6
|
export interface PortalSwitcherProps {
|
|
7
7
|
portals?: Portal[];
|
|
8
8
|
}
|
|
9
|
-
export declare const PortalSwitcher: ({ portals }: PortalSwitcherProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const PortalSwitcher: ({ portals }: PortalSwitcherProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=PortalSwitcher.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.js";
|
|
2
2
|
import { Button, Flex, IconBox, Text } from '@citric/core';
|
|
3
3
|
import { ArrowRight, CheckCircleFill, Select } from '@citric/icons';
|
|
4
4
|
import { theme } from '@stack-spot/portal-theme';
|
|
@@ -15,59 +15,59 @@ const Logos = {
|
|
|
15
15
|
'EDP': _jsx(EDP, {}),
|
|
16
16
|
'HUB': _jsx(HUB, {}),
|
|
17
17
|
};
|
|
18
|
-
const PortalSwitcherBox = styled(Flex) `
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
align-items: start;
|
|
21
|
-
z-index: 10;
|
|
22
|
-
|
|
23
|
-
.current-portal {
|
|
24
|
-
padding: 8px;
|
|
25
|
-
border-radius: 4px;
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
&:hover {
|
|
28
|
-
background-color: ${theme.color.light[500]};
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.selection-list {
|
|
33
|
-
max-width: 360px;
|
|
34
|
-
box-shadow: 4px 4px 48px 0px #000000;
|
|
35
|
-
position: absolute;
|
|
36
|
-
top: 50px;
|
|
37
|
-
|
|
38
|
-
.selection-list-content {
|
|
39
|
-
padding: 8px;
|
|
40
|
-
border-width: 1px;
|
|
41
|
-
border-style: solid;
|
|
42
|
-
border-color: ${theme.color.light['500']};
|
|
43
|
-
|
|
44
|
-
&> ul {
|
|
45
|
-
display: flex;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
gap: 8px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.action {
|
|
51
|
-
padding: 16px;
|
|
52
|
-
background-color: ${theme.color.light['400']};
|
|
53
|
-
border-width: 1px;
|
|
54
|
-
border-style: solid;
|
|
55
|
-
border-color: ${theme.color.light['500']};
|
|
56
|
-
border-radius: 4px;
|
|
57
|
-
|
|
58
|
-
&:hover, &:hover a {
|
|
59
|
-
background-color: ${theme.color.light['500']};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
a {
|
|
63
|
-
height: auto;
|
|
64
|
-
transition: unset;
|
|
65
|
-
align-items: flex-start;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
18
|
+
const PortalSwitcherBox = styled(Flex) `
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
align-items: start;
|
|
21
|
+
z-index: 10;
|
|
22
|
+
|
|
23
|
+
.current-portal {
|
|
24
|
+
padding: 8px;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
&:hover {
|
|
28
|
+
background-color: ${theme.color.light[500]};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.selection-list {
|
|
33
|
+
max-width: 360px;
|
|
34
|
+
box-shadow: 4px 4px 48px 0px #000000;
|
|
35
|
+
position: absolute;
|
|
36
|
+
top: 50px;
|
|
37
|
+
|
|
38
|
+
.selection-list-content {
|
|
39
|
+
padding: 8px;
|
|
40
|
+
border-width: 1px;
|
|
41
|
+
border-style: solid;
|
|
42
|
+
border-color: ${theme.color.light['500']};
|
|
43
|
+
|
|
44
|
+
&> ul {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.action {
|
|
51
|
+
padding: 16px;
|
|
52
|
+
background-color: ${theme.color.light['400']};
|
|
53
|
+
border-width: 1px;
|
|
54
|
+
border-style: solid;
|
|
55
|
+
border-color: ${theme.color.light['500']};
|
|
56
|
+
border-radius: 4px;
|
|
57
|
+
|
|
58
|
+
&:hover, &:hover a {
|
|
59
|
+
background-color: ${theme.color.light['500']};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
a {
|
|
63
|
+
height: auto;
|
|
64
|
+
transition: unset;
|
|
65
|
+
align-items: flex-start;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
71
|
`;
|
|
72
72
|
const PORTAL_SWITCHER_ID = 'PortalSwitcher';
|
|
73
73
|
export const PortalSwitcher = ({ portals = [] }) => {
|
|
@@ -31,6 +31,6 @@ export interface SelectionListProps extends WithStyle {
|
|
|
31
31
|
after?: ReactElement;
|
|
32
32
|
scroll?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export declare const SelectionList: ({ id, items, className, style, visible, maxHeight, onHide, before, after, scroll, }: SelectionListProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const SelectionList: ({ id, items, className, style, visible, maxHeight, onHide, before, after, scroll, }: SelectionListProps) => import("react/jsx-runtime.js").JSX.Element;
|
|
35
35
|
export {};
|
|
36
36
|
//# sourceMappingURL=SelectionList.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.js";
|
|
2
2
|
import { Flex, IconBox, Text } from '@citric/core';
|
|
3
3
|
import { ArrowLeft, Check, ChevronRight } from '@citric/icons';
|
|
4
4
|
import { IconButton } from '@citric/ui';
|
|
@@ -10,59 +10,59 @@ import { useAnchorTag } from '../layout-context.js';
|
|
|
10
10
|
import { useKeyboardControls } from './menu/use-keyboard-controls.js';
|
|
11
11
|
const ANIMATION_DURATION_MS = 300;
|
|
12
12
|
const MAX_HEIGHT_TRANSITION = `max-height ease-in ${ANIMATION_DURATION_MS / 1000}s`;
|
|
13
|
-
const SelectionBox = styled.div `
|
|
14
|
-
max-height: 0;
|
|
15
|
-
overflow-y: ${({ $scroll }) => $scroll ? 'auto' : 'hidden'};
|
|
16
|
-
overflow-x: hidden;
|
|
17
|
-
transition: ${MAX_HEIGHT_TRANSITION}, visibility 0s ${ANIMATION_DURATION_MS / 1000}s;
|
|
18
|
-
z-index: 1;
|
|
19
|
-
box-shadow: 4px 4px 48px #000;
|
|
20
|
-
border-radius: 0.5rem;
|
|
21
|
-
visibility: hidden;
|
|
22
|
-
|
|
23
|
-
.selection-list-content {
|
|
24
|
-
display: flex;
|
|
25
|
-
flex-direction: column;
|
|
26
|
-
background: ${theme.color.light['500']};
|
|
27
|
-
border-radius: 0.5rem;
|
|
28
|
-
border: 1px solid ${theme.color.light['600']};
|
|
29
|
-
background-color: ${theme.color.light['300']};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.section-title, li > a {
|
|
33
|
-
height: 40px;
|
|
34
|
-
padding: 0 8px;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: row;
|
|
37
|
-
align-items: center;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
li > a {
|
|
41
|
-
gap: 4px;
|
|
42
|
-
transition: background-color 0.2s;
|
|
43
|
-
&:hover, &:focus {
|
|
44
|
-
background: ${theme.color.light['400']};
|
|
45
|
-
}
|
|
46
|
-
.label {
|
|
47
|
-
flex: 1;
|
|
48
|
-
white-space: nowrap;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
text-overflow: ellipsis;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
li.section {
|
|
55
|
-
border-bottom: 2px solid ${theme.color.light['600']};
|
|
56
|
-
&:last-child {
|
|
57
|
-
border-bottom: none;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&.visible {
|
|
62
|
-
max-height: ${({ $maxHeight }) => $maxHeight};
|
|
63
|
-
visibility: visible;
|
|
64
|
-
transition: ${MAX_HEIGHT_TRANSITION};
|
|
65
|
-
}
|
|
13
|
+
const SelectionBox = styled.div `
|
|
14
|
+
max-height: 0;
|
|
15
|
+
overflow-y: ${({ $scroll }) => $scroll ? 'auto' : 'hidden'};
|
|
16
|
+
overflow-x: hidden;
|
|
17
|
+
transition: ${MAX_HEIGHT_TRANSITION}, visibility 0s ${ANIMATION_DURATION_MS / 1000}s;
|
|
18
|
+
z-index: 1;
|
|
19
|
+
box-shadow: 4px 4px 48px #000;
|
|
20
|
+
border-radius: 0.5rem;
|
|
21
|
+
visibility: hidden;
|
|
22
|
+
|
|
23
|
+
.selection-list-content {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
background: ${theme.color.light['500']};
|
|
27
|
+
border-radius: 0.5rem;
|
|
28
|
+
border: 1px solid ${theme.color.light['600']};
|
|
29
|
+
background-color: ${theme.color.light['300']};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.section-title, li > a {
|
|
33
|
+
height: 40px;
|
|
34
|
+
padding: 0 8px;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: row;
|
|
37
|
+
align-items: center;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
li > a {
|
|
41
|
+
gap: 4px;
|
|
42
|
+
transition: background-color 0.2s;
|
|
43
|
+
&:hover, &:focus {
|
|
44
|
+
background: ${theme.color.light['400']};
|
|
45
|
+
}
|
|
46
|
+
.label {
|
|
47
|
+
flex: 1;
|
|
48
|
+
white-space: nowrap;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
li.section {
|
|
55
|
+
border-bottom: 2px solid ${theme.color.light['600']};
|
|
56
|
+
&:last-child {
|
|
57
|
+
border-bottom: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.visible {
|
|
62
|
+
max-height: ${({ $maxHeight }) => $maxHeight};
|
|
63
|
+
visibility: visible;
|
|
64
|
+
transition: ${MAX_HEIGHT_TRANSITION};
|
|
65
|
+
}
|
|
66
66
|
`;
|
|
67
67
|
function renderAction({ label, href, onClick, icon, iconRight, active, target, iconActive = _jsx(Check, {}), }, { onClose, Link }) {
|
|
68
68
|
function handleClick() {
|
|
@@ -4,6 +4,6 @@ interface Props {
|
|
|
4
4
|
email?: string;
|
|
5
5
|
options?: SelectionListProps['items'];
|
|
6
6
|
}
|
|
7
|
-
export declare const UserMenu: ({ userName, email, options }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const UserMenu: ({ userName, email, options }: Props) => import("react/jsx-runtime.js").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=UserMenu.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.js";
|
|
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,46 +8,46 @@ 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 }) => {
|
|
@@ -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").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|
|
19
|
+
render(): string | number | boolean | import("react/jsx-runtime.js").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ErrorDescription } from './ErrorManager.js';
|
|
2
|
-
export declare const ErrorFeedback: ({ code, message, debug }: ErrorDescription) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const ErrorFeedback: ({ code, message, debug }: ErrorDescription) => import("react/jsx-runtime.js").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.js";
|
|
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").JSX.Element | Iterable<import("react").ReactNode> | null | undefined;
|
|
20
|
+
render(): string | number | boolean | import("react/jsx-runtime.js").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 | "page" | "false" | "true" | "time" | "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 | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "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"?: "all" | "text" | "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,7 +248,9 @@ 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;
|
|
251
252
|
onPointerLeave?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
253
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
252
254
|
onPointerOver?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
253
255
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
254
256
|
onPointerOut?: import("react").PointerEventHandler<HTMLUListElement> | undefined;
|
|
@@ -333,7 +335,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
333
335
|
"aria-colindextext"?: string | undefined;
|
|
334
336
|
"aria-colspan"?: number | undefined;
|
|
335
337
|
"aria-controls"?: string | undefined;
|
|
336
|
-
"aria-current"?: boolean | "
|
|
338
|
+
"aria-current"?: boolean | "page" | "false" | "true" | "time" | "step" | "location" | "date" | undefined;
|
|
337
339
|
"aria-describedby"?: string | undefined;
|
|
338
340
|
"aria-description"?: string | undefined;
|
|
339
341
|
"aria-details"?: string | undefined;
|
|
@@ -343,7 +345,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
343
345
|
"aria-expanded"?: (boolean | "false" | "true") | undefined;
|
|
344
346
|
"aria-flowto"?: string | undefined;
|
|
345
347
|
"aria-grabbed"?: (boolean | "false" | "true") | undefined;
|
|
346
|
-
"aria-haspopup"?: boolean | "
|
|
348
|
+
"aria-haspopup"?: boolean | "grid" | "listbox" | "menu" | "false" | "true" | "dialog" | "tree" | undefined;
|
|
347
349
|
"aria-hidden"?: (boolean | "false" | "true") | undefined;
|
|
348
350
|
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
349
351
|
"aria-keyshortcuts"?: string | undefined;
|
|
@@ -360,7 +362,7 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
360
362
|
"aria-posinset"?: number | undefined;
|
|
361
363
|
"aria-pressed"?: boolean | "mixed" | "false" | "true" | undefined;
|
|
362
364
|
"aria-readonly"?: (boolean | "false" | "true") | undefined;
|
|
363
|
-
"aria-relevant"?: "
|
|
365
|
+
"aria-relevant"?: "all" | "text" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
364
366
|
"aria-required"?: (boolean | "false" | "true") | undefined;
|
|
365
367
|
"aria-roledescription"?: string | undefined;
|
|
366
368
|
"aria-rowcount"?: number | undefined;
|
|
@@ -517,7 +519,9 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
517
519
|
onPointerCancel?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
518
520
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
519
521
|
onPointerEnter?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
522
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
520
523
|
onPointerLeave?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
524
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
521
525
|
onPointerOver?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
522
526
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
523
527
|
onPointerOut?: import("react").PointerEventHandler<HTMLElement> | undefined;
|
|
@@ -539,6 +543,6 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
539
543
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
540
544
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLElement> | undefined;
|
|
541
545
|
}>;
|
|
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;
|
|
546
|
+
export declare const ActionItem: ({ label, onClick, href, active, icon, badge, overflow }: MenuAction) => import("react/jsx-runtime.js").JSX.Element;
|
|
547
|
+
export declare const MenuContent: ({ pageSelector, goBack, title, subtitle, afterTitle, options, loading, error }: MenuSectionContent) => import("react/jsx-runtime.js").JSX.Element;
|
|
544
548
|
//# sourceMappingURL=MenuContent.d.ts.map
|