@stack-spot/portal-layout 0.0.56 → 0.0.58
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 +4 -2
- package/dist/Layout.d.ts.map +1 -1
- package/dist/Layout.js +11 -5
- package/dist/Layout.js.map +1 -1
- package/dist/components/PortalSwitcher.js +1 -1
- package/dist/components/PortalSwitcher.js.map +1 -1
- package/dist/components/error/ErrorBoundary.d.ts +1 -1
- package/dist/components/error/SilentErrorBoundary.d.ts +1 -1
- package/dist/components/menu/MenuContent.d.ts +48 -48
- package/dist/components/tour/Navigation.d.ts +8 -0
- package/dist/components/tour/Navigation.d.ts.map +1 -0
- package/dist/components/tour/Navigation.js +15 -0
- package/dist/components/tour/Navigation.js.map +1 -0
- package/dist/components/tour/config.d.ts +3 -0
- package/dist/components/tour/config.d.ts.map +1 -0
- package/dist/components/tour/config.js +22 -0
- package/dist/components/tour/config.js.map +1 -0
- package/dist/components/tour/steps/PortalSwitcherStep.d.ts +3 -0
- package/dist/components/tour/steps/PortalSwitcherStep.d.ts.map +1 -0
- package/dist/components/tour/steps/PortalSwitcherStep.js +27 -0
- package/dist/components/tour/steps/PortalSwitcherStep.js.map +1 -0
- package/dist/components/tour/utils.d.ts +9 -0
- package/dist/components/tour/utils.d.ts.map +1 -0
- package/dist/components/tour/utils.js +48 -0
- package/dist/components/tour/utils.js.map +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/src/Layout.tsx +33 -23
- package/src/components/PortalSwitcher.tsx +1 -1
- package/src/components/tour/Navigation.tsx +29 -0
- package/src/components/tour/config.tsx +23 -0
- package/src/components/tour/steps/PortalSwitcherStep.tsx +44 -0
- package/src/components/tour/utils.tsx +58 -0
- package/src/index.ts +3 -2
package/dist/Layout.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { ProviderProps } from '@reactour/tour';
|
|
1
2
|
import { WithStyle } from '@stack-spot/portal-theme';
|
|
2
3
|
import '@stack-spot/portal-theme/dist/theme.css';
|
|
3
4
|
import { ReactElement, ReactNode } from 'react';
|
|
4
|
-
import { DescriptionFn, ErrorHandler } from './components/error/ErrorManager.js';
|
|
5
5
|
import { HeaderProps } from './components/Header.js';
|
|
6
|
+
import { DescriptionFn, ErrorHandler } from './components/error/ErrorManager.js';
|
|
6
7
|
import { MenuProps } from './components/menu/types.js';
|
|
7
8
|
import { LayoutContext } from './layout-context.js';
|
|
8
9
|
import './layout.css';
|
|
@@ -22,8 +23,9 @@ interface RawProps extends WithStyle, LayoutContext {
|
|
|
22
23
|
extra?: ReactNode;
|
|
23
24
|
errorDescriptor?: DescriptionFn;
|
|
24
25
|
onError?: ErrorHandler;
|
|
26
|
+
tourProps?: Omit<ProviderProps, 'children'>;
|
|
25
27
|
}
|
|
26
|
-
export declare const RawLayout: ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style, anchorTag }: RawProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const RawLayout: ({ menuSections, menuContent, header, children, tourProps, extra, errorDescriptor, onError, className, style, anchorTag }: RawProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
29
|
export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
28
30
|
export {};
|
|
29
31
|
//# sourceMappingURL=Layout.d.ts.map
|
package/dist/Layout.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgB,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAsB,SAAS,EAAe,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{ CSSToCitricAdapter, listToClass } from '@stack-spot/portal-theme';
|
|
3
4
|
import '@stack-spot/portal-theme/dist/theme.css';
|
|
4
5
|
import { useEffect } from 'react';
|
|
6
|
+
import { overlay } from './LayoutOverlayManager.js';
|
|
7
|
+
import { Header } from './components/Header.js';
|
|
8
|
+
import { Toaster } from './components/Toaster.js';
|
|
5
9
|
import { ErrorBoundary } from './components/error/ErrorBoundary.js';
|
|
6
10
|
import { ErrorManager } from './components/error/ErrorManager.js';
|
|
7
11
|
import { SilentErrorBoundary } from './components/error/SilentErrorBoundary.js';
|
|
8
|
-
import { Header } from './components/Header.js';
|
|
9
12
|
import { MenuContent } from './components/menu/MenuContent.js';
|
|
10
13
|
import { MenuSections } from './components/menu/MenuSections.js';
|
|
11
|
-
import {
|
|
14
|
+
import { defaultTourConfig } from './components/tour/config.js';
|
|
15
|
+
import { portalSwitcherStep } from './components/tour/steps/PortalSwitcherStep.js';
|
|
12
16
|
import { elementIds, getLayoutElements } from './elements.js';
|
|
13
17
|
import { LayoutProvider } from './layout-context.js';
|
|
14
18
|
import './layout.css';
|
|
15
|
-
|
|
16
|
-
export const RawLayout = ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style, anchorTag }) => {
|
|
19
|
+
export const RawLayout = ({ menuSections, menuContent, header, children, tourProps, extra, errorDescriptor, onError, className, style, anchorTag }) => {
|
|
17
20
|
// @ts-ignore
|
|
18
21
|
const { bottomDialog, modal, rightPanel } = overlay.useOverlays();
|
|
19
22
|
const { layout } = getLayoutElements();
|
|
@@ -24,13 +27,16 @@ export const RawLayout = ({ menuSections, menuContent, header, children, extra,
|
|
|
24
27
|
className,
|
|
25
28
|
isCompactedOnlyIcons ? 'menu-compact' : undefined,
|
|
26
29
|
];
|
|
30
|
+
const tourPropsWithDefaults = { ...defaultTourConfig(), ...(tourProps || {}) };
|
|
31
|
+
tourPropsWithDefaults.steps.unshift(portalSwitcherStep);
|
|
27
32
|
useEffect(() => {
|
|
28
33
|
if (errorDescriptor)
|
|
29
34
|
ErrorManager.setDescriptionFunction(errorDescriptor);
|
|
30
35
|
if (onError)
|
|
31
36
|
ErrorManager.setErrorHandler(onError);
|
|
32
37
|
}, []);
|
|
33
|
-
return (_jsx(CSSToCitricAdapter, { children: _jsx(LayoutProvider, { anchorTag: anchorTag, children: _jsxs("div", { id: elementIds.layout, className: listToClass(classes), style: style, children: [children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [_jsx("nav", { role: "menu", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
|
|
38
|
+
return (_jsx(CSSToCitricAdapter, { children: _jsx(LayoutProvider, { anchorTag: anchorTag, children: _jsx(TourProvider, { ...tourPropsWithDefaults, children: _jsxs("div", { id: elementIds.layout, className: listToClass(classes), style: style, children: [children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [_jsx("nav", { role: "menu", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
|
|
39
|
+
_jsx("nav", { role: "menu", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) })] }), header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), _jsx("div", { id: elementIds.bottomDialog, role: "dialog", children: _jsx(ErrorBoundary, { children: bottomDialog }) }), _jsxs("div", { id: elementIds.backdrop, children: [_jsx("div", { id: elementIds.rightPanel, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: rightPanel }) }), _jsx("div", { id: elementIds.modal, "aria-modal": true, role: "dialog", children: _jsx(ErrorBoundary, { children: modal }) })] }), _jsx(Toaster, {}), _jsx("div", { id: elementIds.accessibilityAnnouncer, "aria-atomic": true, "aria-live": "assertive" })] }) }) }) }));
|
|
34
40
|
};
|
|
35
41
|
const MenuContentRenderer = ({ content }) => {
|
|
36
42
|
const menuContent = typeof content === 'function' ? content() : content;
|
package/dist/Layout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAiB,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAa,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACrF,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAA;AAChE,OAAO,EAA+B,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAA;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAE7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAA;AAC/E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC1D,OAAO,EAAiB,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAChE,OAAO,cAAc,CAAA;AAsBrB,MAAM,CAAC,MA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AAK,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;IACvE,OAAO,KAAC,WAAW,OAAK,WAAW,GAAI,CAAA;AACzC,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAS,EAAE,EAAE,CAAC,CAC9G,KAAC,SAAS,IACR,MAAM,EAAE,KAAC,MAAM,OAAK,MAAM,GAAI,EAC9B,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAC,YAAY,OAAK,IAAI,GAAI,CAAC,CAAC,CAAC,SAAS,EACpE,WAAW,EAAE,IAAI,CAAC,OAAO;QACvB,CAAC,CAAC,KAAC,mBAAmB,IAA0D,OAAO,EAAE,IAAI,CAAC,OAAO,IAAzE,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAA2B;QACzG,CAAC,CAAC,SAAS,EAEb,eAAe,EAAE,eAAe,EAChC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,YAEX,QAAQ,GACC,CACb,CAAA"}
|
|
@@ -78,7 +78,7 @@ export const PortalSwitcher = ({ portals = [] }) => {
|
|
|
78
78
|
_jsx(Button, { className: "current-portal", appearance: "text", colorScheme: "light", "aria-controls": PORTAL_SWITCHER_ID, "aria-expanded": visible, "aria-label": `${t.portalSwitcher}: ${currentPortal?.acronym} ${t.selected}`, onClick: () => {
|
|
79
79
|
setVisible(true);
|
|
80
80
|
announce(`${t.portalSwitcher} ${t.selected}`);
|
|
81
|
-
}, children: _jsxs(Flex, { alignItems: "center", children: [Logos[currentPortal.acronym], _jsx(IconBox, { size: "xs", ml: 3, children: _jsx(Select, {}) })] }) }) :
|
|
81
|
+
}, children: _jsxs(Flex, { alignItems: "center", className: "portal-switcher", children: [Logos[currentPortal.acronym], _jsx(IconBox, { size: "xs", ml: 3, children: _jsx(Select, {}) })] }) }) :
|
|
82
82
|
_jsx(Logo, {}), _jsx(SelectionList, { id: PORTAL_SWITCHER_ID, items: portals?.map(portal => ({
|
|
83
83
|
label: {
|
|
84
84
|
id: portal.acronym,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PortalSwitcher.js","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,MAAM,MAAM,mBAAmB,CAAA;AACtC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAA;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,WAAW,CAAA;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAIlC,MAAM,KAAK,GAAqC;IAC9C,IAAI,EAAE,KAAC,EAAE,KAAG;IACZ,KAAK,EAAE,KAAC,GAAG,KAAG;IACd,KAAK,EAAE,KAAC,GAAG,KAAG;CACf,CAAA;AAQD,MAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;;;;;;;;0BAUZ,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAA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AAC,IAAI,IAAC,aAAa,EAAC,QAAQ,aAClC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,EACtB,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,EAAE,EAAE,CAAC,EAAE,WAAW,EAAC,WAAW,YAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAQ,IAClF;qBACR;oBACD,MAAM,EAAE,OAAO;oBACf,IAAI,EAAE,MAAM,CAAC,GAAG;oBAChB,MAAM,EAAE,aAAa,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO;oBAChD,UAAU,EAAE,KAAC,eAAe,kBAAa,CAAC,CAAC,QAAQ,GAAI;oBACvD,SAAS,EAAE,MAAM,CAAC,OAAO,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC,KAAC,UAAU,KAAG,CAAC,CAAC,CAAC,SAAS;iBAClF,CAAC,CAAC,EACH,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,OAAO,EACjB,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,GAAI,IAClB,CAAA;AACvB,CAAC,CAAA;AAGD,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE;QACF,GAAG,EAAE,oEAAoE;QACzE,EAAE,EAAE,sEAAsE;QAC1E,GAAG,EAAE,wFAAwF;QAC7F,cAAc,EAAE,iBAAiB;QACjC,QAAQ,EAAE,UAAU;KACrB;IACD,EAAE,EAAE;QACF,GAAG,EAAE,wEAAwE;QAC7E,EAAE,EAAE,oFAAoF;QACxF,GAAG,EAAE,uFAAuF;QAC5F,cAAc,EAAE,oBAAoB;QACpC,QAAQ,EAAE,aAAa;KACxB;CACF,CAAA"}
|
|
@@ -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
|
|
19
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
22
22
|
//# sourceMappingURL=ErrorBoundary.d.ts.map
|
|
@@ -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
|
|
20
|
+
render(): string | number | boolean | Iterable<import("react").ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
21
21
|
}
|
|
22
22
|
export {};
|
|
23
23
|
//# sourceMappingURL=SilentErrorBoundary.d.ts.map
|
|
@@ -11,17 +11,17 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
11
11
|
accessKey?: string | undefined;
|
|
12
12
|
autoFocus?: boolean | undefined;
|
|
13
13
|
className?: string | undefined;
|
|
14
|
-
contentEditable?:
|
|
14
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
15
15
|
contextMenu?: string | undefined;
|
|
16
16
|
dir?: string | undefined;
|
|
17
|
-
draggable?: (boolean | "
|
|
17
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
18
|
hidden?: boolean | undefined;
|
|
19
19
|
id?: string | undefined;
|
|
20
20
|
lang?: string | undefined;
|
|
21
21
|
nonce?: string | undefined;
|
|
22
22
|
placeholder?: string | undefined;
|
|
23
23
|
slot?: string | undefined;
|
|
24
|
-
spellCheck?: (boolean | "
|
|
24
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
25
25
|
style?: import("react").CSSProperties | undefined;
|
|
26
26
|
tabIndex?: number | undefined;
|
|
27
27
|
title?: string | undefined;
|
|
@@ -51,55 +51,55 @@ export declare const MenuGroup: import("styled-components").IStyledComponent<"we
|
|
|
51
51
|
results?: number | undefined;
|
|
52
52
|
security?: string | undefined;
|
|
53
53
|
unselectable?: "on" | "off" | undefined;
|
|
54
|
-
inputMode?: "
|
|
54
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
55
55
|
is?: string | undefined;
|
|
56
56
|
"aria-activedescendant"?: string | undefined;
|
|
57
|
-
"aria-atomic"?: (boolean | "
|
|
58
|
-
"aria-autocomplete"?: "
|
|
57
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
58
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
59
59
|
"aria-braillelabel"?: string | undefined;
|
|
60
60
|
"aria-brailleroledescription"?: string | undefined;
|
|
61
|
-
"aria-busy"?: (boolean | "
|
|
62
|
-
"aria-checked"?: boolean | "
|
|
61
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
62
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
63
63
|
"aria-colcount"?: number | undefined;
|
|
64
64
|
"aria-colindex"?: number | undefined;
|
|
65
65
|
"aria-colindextext"?: string | undefined;
|
|
66
66
|
"aria-colspan"?: number | undefined;
|
|
67
67
|
"aria-controls"?: string | undefined;
|
|
68
|
-
"aria-current"?: boolean | "time" | "
|
|
68
|
+
"aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
69
69
|
"aria-describedby"?: string | undefined;
|
|
70
70
|
"aria-description"?: string | undefined;
|
|
71
71
|
"aria-details"?: string | undefined;
|
|
72
|
-
"aria-disabled"?: (boolean | "
|
|
73
|
-
"aria-dropeffect"?: "link" | "none" | "copy" | "
|
|
72
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
73
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
74
74
|
"aria-errormessage"?: string | undefined;
|
|
75
|
-
"aria-expanded"?: (boolean | "
|
|
75
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
76
76
|
"aria-flowto"?: string | undefined;
|
|
77
|
-
"aria-grabbed"?: (boolean | "
|
|
78
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
79
|
-
"aria-hidden"?: (boolean | "
|
|
80
|
-
"aria-invalid"?: boolean | "
|
|
77
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
78
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
79
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
80
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
81
81
|
"aria-keyshortcuts"?: string | undefined;
|
|
82
82
|
"aria-label"?: string | undefined;
|
|
83
83
|
"aria-labelledby"?: string | undefined;
|
|
84
84
|
"aria-level"?: number | undefined;
|
|
85
85
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
86
|
-
"aria-modal"?: (boolean | "
|
|
87
|
-
"aria-multiline"?: (boolean | "
|
|
88
|
-
"aria-multiselectable"?: (boolean | "
|
|
86
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
89
89
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
90
90
|
"aria-owns"?: string | undefined;
|
|
91
91
|
"aria-placeholder"?: string | undefined;
|
|
92
92
|
"aria-posinset"?: number | undefined;
|
|
93
|
-
"aria-pressed"?: boolean | "
|
|
94
|
-
"aria-readonly"?: (boolean | "
|
|
95
|
-
"aria-relevant"?: "text" | "
|
|
96
|
-
"aria-required"?: (boolean | "
|
|
93
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
94
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
95
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
96
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
97
97
|
"aria-roledescription"?: string | undefined;
|
|
98
98
|
"aria-rowcount"?: number | undefined;
|
|
99
99
|
"aria-rowindex"?: number | undefined;
|
|
100
100
|
"aria-rowindextext"?: string | undefined;
|
|
101
101
|
"aria-rowspan"?: number | undefined;
|
|
102
|
-
"aria-selected"?: (boolean | "
|
|
102
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
103
103
|
"aria-setsize"?: number | undefined;
|
|
104
104
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
105
105
|
"aria-valuemax"?: number | undefined;
|
|
@@ -283,17 +283,17 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
283
283
|
accessKey?: string | undefined;
|
|
284
284
|
autoFocus?: boolean | undefined;
|
|
285
285
|
className?: string | undefined;
|
|
286
|
-
contentEditable?:
|
|
286
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
287
287
|
contextMenu?: string | undefined;
|
|
288
288
|
dir?: string | undefined;
|
|
289
|
-
draggable?: (boolean | "
|
|
289
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
290
290
|
hidden?: boolean | undefined;
|
|
291
291
|
id?: string | undefined;
|
|
292
292
|
lang?: string | undefined;
|
|
293
293
|
nonce?: string | undefined;
|
|
294
294
|
placeholder?: string | undefined;
|
|
295
295
|
slot?: string | undefined;
|
|
296
|
-
spellCheck?: (boolean | "
|
|
296
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
297
297
|
style?: import("react").CSSProperties | undefined;
|
|
298
298
|
tabIndex?: number | undefined;
|
|
299
299
|
title?: string | undefined;
|
|
@@ -323,55 +323,55 @@ export declare const Title: import("styled-components").IStyledComponent<"web",
|
|
|
323
323
|
results?: number | undefined;
|
|
324
324
|
security?: string | undefined;
|
|
325
325
|
unselectable?: "on" | "off" | undefined;
|
|
326
|
-
inputMode?: "
|
|
326
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
327
327
|
is?: string | undefined;
|
|
328
328
|
"aria-activedescendant"?: string | undefined;
|
|
329
|
-
"aria-atomic"?: (boolean | "
|
|
330
|
-
"aria-autocomplete"?: "
|
|
329
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
330
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
331
331
|
"aria-braillelabel"?: string | undefined;
|
|
332
332
|
"aria-brailleroledescription"?: string | undefined;
|
|
333
|
-
"aria-busy"?: (boolean | "
|
|
334
|
-
"aria-checked"?: boolean | "
|
|
333
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
334
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
335
335
|
"aria-colcount"?: number | undefined;
|
|
336
336
|
"aria-colindex"?: number | undefined;
|
|
337
337
|
"aria-colindextext"?: string | undefined;
|
|
338
338
|
"aria-colspan"?: number | undefined;
|
|
339
339
|
"aria-controls"?: string | undefined;
|
|
340
|
-
"aria-current"?: boolean | "time" | "
|
|
340
|
+
"aria-current"?: boolean | "time" | "step" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
341
341
|
"aria-describedby"?: string | undefined;
|
|
342
342
|
"aria-description"?: string | undefined;
|
|
343
343
|
"aria-details"?: string | undefined;
|
|
344
|
-
"aria-disabled"?: (boolean | "
|
|
345
|
-
"aria-dropeffect"?: "link" | "none" | "copy" | "
|
|
344
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
345
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
346
346
|
"aria-errormessage"?: string | undefined;
|
|
347
|
-
"aria-expanded"?: (boolean | "
|
|
347
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
348
348
|
"aria-flowto"?: string | undefined;
|
|
349
|
-
"aria-grabbed"?: (boolean | "
|
|
350
|
-
"aria-haspopup"?: boolean | "dialog" | "menu" | "
|
|
351
|
-
"aria-hidden"?: (boolean | "
|
|
352
|
-
"aria-invalid"?: boolean | "
|
|
349
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
350
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
351
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
352
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
353
353
|
"aria-keyshortcuts"?: string | undefined;
|
|
354
354
|
"aria-label"?: string | undefined;
|
|
355
355
|
"aria-labelledby"?: string | undefined;
|
|
356
356
|
"aria-level"?: number | undefined;
|
|
357
357
|
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
358
|
-
"aria-modal"?: (boolean | "
|
|
359
|
-
"aria-multiline"?: (boolean | "
|
|
360
|
-
"aria-multiselectable"?: (boolean | "
|
|
358
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
359
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
360
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
361
361
|
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
362
362
|
"aria-owns"?: string | undefined;
|
|
363
363
|
"aria-placeholder"?: string | undefined;
|
|
364
364
|
"aria-posinset"?: number | undefined;
|
|
365
|
-
"aria-pressed"?: boolean | "
|
|
366
|
-
"aria-readonly"?: (boolean | "
|
|
367
|
-
"aria-relevant"?: "text" | "
|
|
368
|
-
"aria-required"?: (boolean | "
|
|
365
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
366
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
367
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
368
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
369
369
|
"aria-roledescription"?: string | undefined;
|
|
370
370
|
"aria-rowcount"?: number | undefined;
|
|
371
371
|
"aria-rowindex"?: number | undefined;
|
|
372
372
|
"aria-rowindextext"?: string | undefined;
|
|
373
373
|
"aria-rowspan"?: number | undefined;
|
|
374
|
-
"aria-selected"?: (boolean | "
|
|
374
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
375
375
|
"aria-setsize"?: number | undefined;
|
|
376
376
|
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
377
377
|
"aria-valuemax"?: number | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ProviderProps } from '@reactour/tour';
|
|
2
|
+
import '@stack-spot/portal-theme/dist/theme.css';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
type ComponentsDict = Exclude<ProviderProps['components'], undefined>;
|
|
5
|
+
type NavigationProps = React.ComponentProps<Exclude<ComponentsDict['Navigation'], undefined>>;
|
|
6
|
+
export declare const CustomNavigation: ({ currentStep, steps, setCurrentStep }: NavigationProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=Navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/tour/Navigation.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,yCAAyC,CAAA;AAEhD,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAAA;AACrE,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,YAAY,CAAC,EAAE,SAAS,CAAC,CAAC,CAAA;AAE7F,eAAO,MAAM,gBAAgB,2CAA4C,eAAe,4CAiBvF,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button, Flex, Text } from '@citric/core';
|
|
3
|
+
import '@stack-spot/portal-theme/dist/theme.css';
|
|
4
|
+
import { useTranslate } from '@stack-spot/portal-translate';
|
|
5
|
+
import { finishTour } from './utils.js';
|
|
6
|
+
export const CustomNavigation = ({ currentStep, steps, setCurrentStep }) => {
|
|
7
|
+
const t = useTranslate({ en: { of: 'of', back: 'back' }, pt: { of: 'de', back: 'voltar' } });
|
|
8
|
+
return _jsxs(Flex, { w: 12, px: 5, py: 2, mt: "-1px", bg: "inverse.500", justifyContent: "space-between", children: [_jsxs(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: [currentStep + 1, " ", t.of, " ", steps.length] }), _jsxs(Flex, { sx: { gap: '8px' }, children: [currentStep > 1 &&
|
|
9
|
+
_jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => setCurrentStep(currentStep - 1), size: "sm", colorScheme: "light", children: t.back }), _jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => {
|
|
10
|
+
if (currentStep + 1 == steps.length)
|
|
11
|
+
finishTour();
|
|
12
|
+
setCurrentStep(currentStep + 1);
|
|
13
|
+
}, size: "sm", colorScheme: "light", children: "ok" })] })] });
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.js","sourceRoot":"","sources":["../../../src/components/tour/Navigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAEjD,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,C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AAC,IAAI,EAAC,WAAW,EAAC,OAAO,mBAEvB,IACJ,IACF,CAAA;AACT,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/components/tour/config.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAI9C,eAAO,MAAM,iBAAiB,EAAE,MAAM,IAAI,CAAC,aAAa,EAAE,UAAU,CAkBlE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CustomNavigation } from './Navigation.js';
|
|
2
|
+
import { hasFinishedTour } from './utils.js';
|
|
3
|
+
export const defaultTourConfig = () => ({
|
|
4
|
+
steps: [],
|
|
5
|
+
defaultOpen: !hasFinishedTour(),
|
|
6
|
+
showBadge: false,
|
|
7
|
+
showDots: false,
|
|
8
|
+
showPrevNextButtons: false,
|
|
9
|
+
showCloseButton: false,
|
|
10
|
+
styles: {
|
|
11
|
+
popover: (props) => ({
|
|
12
|
+
...props,
|
|
13
|
+
boxShadow: 'unset',
|
|
14
|
+
backgroundColor: 'transparent',
|
|
15
|
+
padding: '0px 14px', // TODO: find a way to make paddings on y axis so it's possible to use the the pointing arrow.
|
|
16
|
+
}),
|
|
17
|
+
},
|
|
18
|
+
components: {
|
|
19
|
+
Navigation: CustomNavigation,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/components/tour/config.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAEzC,MAAM,CAAC,MAAM,iBAAiB,GAA0C,GAAG,EAAE,CAAC,CAAC;IAC7E,KAAK,EAAE,EAAE;IACT,WAAW,EAAE,CAAC,eAAe,EAAE;IAC/B,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE,KAAK;IACf,mBAAmB,EAAE,KAAK;IAC1B,eAAe,EAAE,KAAK;IACtB,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACnB,GAAG,KAAK;YACR,SAAS,EAAE,OAAO;YAClB,eAAe,EAAE,aAAa;YAC9B,OAAO,EAAE,UAAU,EAAE,8FAA8F;SACpH,CAAC;KACH;IACD,UAAU,EAAE;QACV,UAAU,EAAE,gBAAgB;KAC7B;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PortalSwitcherStep.d.ts","sourceRoot":"","sources":["../../../../src/components/tour/steps/PortalSwitcherStep.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAW,MAAM,gBAAgB,CAAA;AA0BlD,eAAO,MAAM,kBAAkB,EAAE,QAIhC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core';
|
|
3
|
+
import { TimesMini } from '@citric/icons';
|
|
4
|
+
import { useTour } from '@reactour/tour';
|
|
5
|
+
import { useTranslate } from '@stack-spot/portal-translate';
|
|
6
|
+
import { TextWithPointingArrow } from '../utils.js';
|
|
7
|
+
const PortalSwitcherStep = () => {
|
|
8
|
+
const t = useTranslate(translations);
|
|
9
|
+
const { setIsOpen } = useTour();
|
|
10
|
+
return _jsxs(Box, { bg: "inverse.500", children: [_jsx(TextWithPointingArrow, { "$position": "right", children: _jsxs(Flex, { w: 12, pl: 5, py: 3, flexWrap: "nowrap", justifyContent: "space-between", alignItems: "center", children: [_jsxs(Text, { appearance: "body2", colorScheme: "inverse.contrastText", weight: "medium", children: [" ", t.title, " "] }), _jsx(Button, { appearance: "text", size: "sm", onClick: () => setIsOpen(false), children: _jsx(IconBox, { size: "xs", colorIcon: "inverse.contrastText", children: _jsx(TimesMini, {}) }) })] }) }), _jsx(Image, { src: "https://marketing.stackspot.com/switch-v2.gif", alt: "GIF showing how to move from one portal to another" }), _jsx(Box, { px: 5, py: 3, children: _jsx(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: t.description }) })] });
|
|
11
|
+
};
|
|
12
|
+
export const portalSwitcherStep = {
|
|
13
|
+
selector: '.portal-switcher',
|
|
14
|
+
content: PortalSwitcherStep,
|
|
15
|
+
position: 'right',
|
|
16
|
+
};
|
|
17
|
+
const translations = {
|
|
18
|
+
en: {
|
|
19
|
+
title: 'Expand Your Horizons with Stackspot',
|
|
20
|
+
description: 'Easily switch between EDP and HUB to enhance your projects. Access a wide range of resources with just one click and take your projects to a new level of efficiency. Start your journey now!',
|
|
21
|
+
},
|
|
22
|
+
pt: {
|
|
23
|
+
title: 'Expanda Seus Horizontes com Stackspot',
|
|
24
|
+
description: 'Troque facilmente entre EDP e HUB para aprimorar seus projetos. Acesse uma ampla gama de recursos com apenas um clique e leve seus projetos para um novo nível de eficiência. Comece sua jornada agora!',
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=PortalSwitcherStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PortalSwitcherStep.js","sourceRoot":"","sources":["../../../../src/components/tour/steps/PortalSwitcherStep.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AACzC,OAAO,EAAY,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEhD,MAAM,kBAAkB,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,EAAE,+LAA+L;KAC7M;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,yMAAyM;KACvN;CACF,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const TextWithPointingArrow: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
|
+
$position: 'right' | 'top' | 'left';
|
|
4
|
+
$top?: string | undefined;
|
|
5
|
+
$right?: string | undefined;
|
|
6
|
+
}>>;
|
|
7
|
+
export declare const finishTour: () => void;
|
|
8
|
+
export declare const hasFinishedTour: () => boolean;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/tour/utils.tsx"],"names":[],"mappings":";AAGA,eAAO,MAAM,qBAAqB;eACrB,OAAO,GAAG,KAAK,GAAG,MAAM;;;GAgCpC,CAAA;AAmBD,eAAO,MAAM,UAAU,YAAyC,CAAA;AAEhE,eAAO,MAAM,eAAe,eAAmC,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { theme } from '@stack-spot/portal-theme';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
export const TextWithPointingArrow = styled.div `
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
&::after {
|
|
7
|
+
content: '';
|
|
8
|
+
position: absolute;
|
|
9
|
+
border-width: 10px;
|
|
10
|
+
border-style: solid;
|
|
11
|
+
border-color: transparent;
|
|
12
|
+
margin-top: -5px;
|
|
13
|
+
border-right-color: ${theme.color.inverse[500]};
|
|
14
|
+
${({ $position, $top }) => $position === 'right' ?
|
|
15
|
+
`
|
|
16
|
+
top: ${$top || '16px'};
|
|
17
|
+
left: -18px;
|
|
18
|
+
` : ''}
|
|
19
|
+
${({ $position, $right }) => $position === 'top' ?
|
|
20
|
+
`
|
|
21
|
+
bottom: 96%;
|
|
22
|
+
right: ${$right || '16px'};
|
|
23
|
+
transform: rotate(90deg);
|
|
24
|
+
` : ''}
|
|
25
|
+
${({ $position, $top }) => $position === 'left' ?
|
|
26
|
+
`
|
|
27
|
+
top: ${$top || '16px'};
|
|
28
|
+
right: -18px;
|
|
29
|
+
transform: rotate(180deg);
|
|
30
|
+
` : ''}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
const DOMAIN_REGEX = new RegExp(/(\.*(prd|stg|dev)*.stackspot.com)|localhost/);
|
|
34
|
+
const portalUrl = new URL(location.href);
|
|
35
|
+
const cookieDomain = DOMAIN_REGEX.exec(portalUrl.host)?.[0];
|
|
36
|
+
const defaultCookieAttributes = `domain=${cookieDomain}; SameSite=Strict;`;
|
|
37
|
+
const getCookies = () => document.cookie.split('; ').reduce((prev, current) => {
|
|
38
|
+
const [name, ...value] = current.split('=');
|
|
39
|
+
prev[name] = value.join('=');
|
|
40
|
+
return prev;
|
|
41
|
+
}, {});
|
|
42
|
+
const setCookie = (key, value) => {
|
|
43
|
+
document.cookie = `${key}=${value}; ${defaultCookieAttributes}`;
|
|
44
|
+
};
|
|
45
|
+
const getCookie = (key) => getCookies()[key];
|
|
46
|
+
export const finishTour = () => setCookie('welcomeTour', 'done');
|
|
47
|
+
export const hasFinishedTour = () => !!getCookie('welcomeTour');
|
|
48
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/tour/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAI3C;;;;;;;;;;0BAUsB,KAAK,CAAC,KA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AE,EAAE;IAC/C,QAAQ,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,KAAK,KAAK,uBAAuB,EAAE,CAAA;AACjE,CAAC,CAAA;AAED,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAA;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;AAEhE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { Layout, RawLayout } from './Layout.js';
|
|
2
2
|
export { overlay } from './LayoutOverlayManager.js';
|
|
3
3
|
export { Dialog } from './components/Dialog.js';
|
|
4
|
-
export { Toaster } from './components/Toaster.js';
|
|
5
4
|
export { Header, HeaderProps } from './components/Header.js';
|
|
6
5
|
export { OverlayContent } from './components/OverlayContent.js';
|
|
7
6
|
export { PortalSwitcher } from './components/PortalSwitcher.js';
|
|
8
7
|
export { ListAction, SelectionList, SelectionListProps } from './components/SelectionList.js';
|
|
9
|
-
export {
|
|
8
|
+
export { Toaster } from './components/Toaster.js';
|
|
9
|
+
export { ActionItem, MenuContent, MenuGroup, Title } from './components/menu/MenuContent.js';
|
|
10
10
|
export { MenuSections } from './components/menu/MenuSections.js';
|
|
11
11
|
export * from './components/menu/types.js';
|
|
12
|
+
export { TextWithPointingArrow } from './components/tour/utils.js';
|
|
12
13
|
export * from './components/types.js';
|
|
13
14
|
export * from './elements.js';
|
|
14
15
|
export * from './errors.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAClD,cAAc,SAAS,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { Layout, RawLayout } from './Layout.js';
|
|
2
2
|
export { overlay } from './LayoutOverlayManager.js';
|
|
3
3
|
export { Dialog } from './components/Dialog.js';
|
|
4
|
-
export { Toaster } from './components/Toaster.js';
|
|
5
4
|
export { Header } from './components/Header.js';
|
|
6
5
|
export { OverlayContent } from './components/OverlayContent.js';
|
|
7
6
|
export { PortalSwitcher } from './components/PortalSwitcher.js';
|
|
8
7
|
export { SelectionList } from './components/SelectionList.js';
|
|
9
|
-
export {
|
|
8
|
+
export { Toaster } from './components/Toaster.js';
|
|
9
|
+
export { ActionItem, MenuContent, MenuGroup, Title } from './components/menu/MenuContent.js';
|
|
10
10
|
export { MenuSections } from './components/menu/MenuSections.js';
|
|
11
11
|
export * from './components/menu/types.js';
|
|
12
|
+
export { TextWithPointingArrow } from './components/tour/utils.js';
|
|
12
13
|
export * from './components/types.js';
|
|
13
14
|
export * from './elements.js';
|
|
14
15
|
export * from './errors.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAc,aAAa,EAAsB,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAA;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAC7D,cAAc,yBAAyB,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAClD,cAAc,SAAS,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/portal-layout",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"@citric/core": ">=6.0.0",
|
|
13
13
|
"@citric/icons": ">=5.7.1",
|
|
14
14
|
"@citric/ui": ">=5.7.2",
|
|
15
|
+
"@reactour/tour": ">=3.6.2",
|
|
15
16
|
"@stack-spot/portal-theme": ">=0.0.11",
|
|
16
17
|
"@stack-spot/portal-translate": ">=0.0.6",
|
|
17
18
|
"react": ">=18.2.0",
|
package/src/Layout.tsx
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ProviderProps, TourProvider } from '@reactour/tour'
|
|
2
|
+
import { CSSToCitricAdapter, WithStyle, listToClass } from '@stack-spot/portal-theme'
|
|
2
3
|
import '@stack-spot/portal-theme/dist/theme.css'
|
|
3
4
|
import { ReactElement, ReactNode, useEffect } from 'react'
|
|
5
|
+
import { overlay } from './LayoutOverlayManager'
|
|
6
|
+
import { Header, HeaderProps } from './components/Header'
|
|
7
|
+
import { Toaster } from './components/Toaster'
|
|
4
8
|
import { ErrorBoundary } from './components/error/ErrorBoundary'
|
|
5
9
|
import { DescriptionFn, ErrorHandler, ErrorManager } from './components/error/ErrorManager'
|
|
6
10
|
import { SilentErrorBoundary } from './components/error/SilentErrorBoundary'
|
|
7
|
-
import { Header, HeaderProps } from './components/Header'
|
|
8
11
|
import { MenuContent } from './components/menu/MenuContent'
|
|
9
12
|
import { MenuSections } from './components/menu/MenuSections'
|
|
10
13
|
import { MenuProps } from './components/menu/types'
|
|
11
|
-
import {
|
|
14
|
+
import { defaultTourConfig } from './components/tour/config'
|
|
15
|
+
import { portalSwitcherStep } from './components/tour/steps/PortalSwitcherStep'
|
|
12
16
|
import { elementIds, getLayoutElements } from './elements'
|
|
13
17
|
import { LayoutContext, LayoutProvider } from './layout-context'
|
|
14
18
|
import './layout.css'
|
|
15
|
-
import { overlay } from './LayoutOverlayManager'
|
|
16
19
|
|
|
17
20
|
interface Props extends WithStyle, LayoutContext {
|
|
18
21
|
menu: MenuProps,
|
|
@@ -31,10 +34,11 @@ interface RawProps extends WithStyle, LayoutContext {
|
|
|
31
34
|
extra?: ReactNode,
|
|
32
35
|
errorDescriptor?: DescriptionFn,
|
|
33
36
|
onError?: ErrorHandler,
|
|
37
|
+
tourProps?: Omit<ProviderProps, 'children'>,
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
export const RawLayout = (
|
|
37
|
-
{ menuSections, menuContent, header, children,
|
|
41
|
+
{ menuSections, menuContent, header, children, tourProps,
|
|
38
42
|
extra, errorDescriptor, onError, className, style, anchorTag }:
|
|
39
43
|
RawProps,
|
|
40
44
|
) => {
|
|
@@ -50,6 +54,9 @@ export const RawLayout = (
|
|
|
50
54
|
isCompactedOnlyIcons ? 'menu-compact' : undefined,
|
|
51
55
|
]
|
|
52
56
|
|
|
57
|
+
const tourPropsWithDefaults = { ...defaultTourConfig(), ...(tourProps || {}) }
|
|
58
|
+
tourPropsWithDefaults.steps.unshift(portalSwitcherStep)
|
|
59
|
+
|
|
53
60
|
useEffect(() => {
|
|
54
61
|
if (errorDescriptor) ErrorManager.setDescriptionFunction(errorDescriptor)
|
|
55
62
|
if (onError) ErrorManager.setErrorHandler(onError)
|
|
@@ -58,25 +65,28 @@ export const RawLayout = (
|
|
|
58
65
|
return (
|
|
59
66
|
<CSSToCitricAdapter>
|
|
60
67
|
<LayoutProvider anchorTag={anchorTag}>
|
|
61
|
-
<
|
|
62
|
-
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<div id={elementIds.
|
|
74
|
-
<div id={elementIds.
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
<TourProvider {...tourPropsWithDefaults} >
|
|
69
|
+
<div id={elementIds.layout} className={listToClass(classes)} style={style}>
|
|
70
|
+
{children && <div id={elementIds.page}>
|
|
71
|
+
<article id={elementIds.content}><ErrorBoundary>{children}</ErrorBoundary></article>
|
|
72
|
+
</div>}
|
|
73
|
+
{extra && <SilentErrorBoundary>{extra}</SilentErrorBoundary>}
|
|
74
|
+
<aside id={elementIds.menu}>
|
|
75
|
+
<nav role="menu" id={elementIds.menuContent}><SilentErrorBoundary>{menuContent}</SilentErrorBoundary></nav>
|
|
76
|
+
{menuSections &&
|
|
77
|
+
<nav role="menu" id={elementIds.menuSections}><SilentErrorBoundary>{menuSections}</SilentErrorBoundary></nav>}
|
|
78
|
+
</aside>
|
|
79
|
+
{header && <header id={elementIds.header}><SilentErrorBoundary>{header}</SilentErrorBoundary></header>}
|
|
80
|
+
<div id={elementIds.bottomDialog} role="dialog"><ErrorBoundary>{bottomDialog}</ErrorBoundary></div>
|
|
81
|
+
<div id={elementIds.backdrop}>
|
|
82
|
+
<div id={elementIds.rightPanel} aria-modal role="dialog"><ErrorBoundary>{rightPanel}</ErrorBoundary></div>
|
|
83
|
+
<div id={elementIds.modal} aria-modal role="dialog"><ErrorBoundary>{modal}</ErrorBoundary></div>
|
|
84
|
+
</div>
|
|
85
|
+
<Toaster />
|
|
86
|
+
<div id={elementIds.accessibilityAnnouncer} aria-atomic aria-live="assertive">
|
|
87
|
+
</div>
|
|
78
88
|
</div>
|
|
79
|
-
</
|
|
89
|
+
</TourProvider>
|
|
80
90
|
</LayoutProvider>
|
|
81
91
|
</CSSToCitricAdapter>
|
|
82
92
|
)
|
|
@@ -98,7 +98,7 @@ export const PortalSwitcher = ({ portals = [] }: PortalSwitcherProps) => {
|
|
|
98
98
|
setVisible(true)
|
|
99
99
|
announce(`${t.portalSwitcher} ${t.selected}`)
|
|
100
100
|
}}>
|
|
101
|
-
<Flex alignItems="center">
|
|
101
|
+
<Flex alignItems="center" className="portal-switcher">
|
|
102
102
|
{Logos[currentPortal.acronym]}
|
|
103
103
|
<IconBox size="xs" ml={3}>
|
|
104
104
|
<Select />
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Button, Flex, Text } from '@citric/core'
|
|
2
|
+
import { ProviderProps } from '@reactour/tour'
|
|
3
|
+
import '@stack-spot/portal-theme/dist/theme.css'
|
|
4
|
+
import { useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
+
import React from 'react'
|
|
6
|
+
import { finishTour } from './utils'
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
type ComponentsDict = Exclude<ProviderProps['components'], undefined>
|
|
10
|
+
type NavigationProps = React.ComponentProps<Exclude<ComponentsDict['Navigation'], undefined>>
|
|
11
|
+
|
|
12
|
+
export const CustomNavigation = ({ currentStep, steps, setCurrentStep }: NavigationProps) => {
|
|
13
|
+
const t = useTranslate({ en: { of: 'of', back: 'back' }, pt: { of: 'de', back: 'voltar' } })
|
|
14
|
+
return <Flex w={12} px={5} py={2} mt="-1px" bg="inverse.500" justifyContent="space-between">
|
|
15
|
+
<Text appearance="microtext1" colorScheme="inverse.contrastText">{currentStep + 1} {t.of} {steps.length}</Text>
|
|
16
|
+
<Flex sx={{ gap: '8px' }}>
|
|
17
|
+
{currentStep > 1 &&
|
|
18
|
+
<Button sx={{ paddingInline: '20px' }} onClick={() => setCurrentStep(currentStep - 1)} size="sm" colorScheme="light">
|
|
19
|
+
{t.back}
|
|
20
|
+
</Button>}
|
|
21
|
+
<Button sx={{ paddingInline: '20px' }} onClick={() => {
|
|
22
|
+
if (currentStep + 1 == steps.length) finishTour()
|
|
23
|
+
setCurrentStep(currentStep + 1)
|
|
24
|
+
}} size="sm" colorScheme="light">
|
|
25
|
+
ok
|
|
26
|
+
</Button>
|
|
27
|
+
</Flex>
|
|
28
|
+
</Flex>
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ProviderProps } from '@reactour/tour'
|
|
2
|
+
import { CustomNavigation } from './Navigation'
|
|
3
|
+
import { hasFinishedTour } from './utils'
|
|
4
|
+
|
|
5
|
+
export const defaultTourConfig: () => Omit<ProviderProps, 'children'> = () => ({
|
|
6
|
+
steps: [],
|
|
7
|
+
defaultOpen: !hasFinishedTour(),
|
|
8
|
+
showBadge: false,
|
|
9
|
+
showDots: false,
|
|
10
|
+
showPrevNextButtons: false,
|
|
11
|
+
showCloseButton: false,
|
|
12
|
+
styles: {
|
|
13
|
+
popover: (props) => ({
|
|
14
|
+
...props,
|
|
15
|
+
boxShadow: 'unset',
|
|
16
|
+
backgroundColor: 'transparent',
|
|
17
|
+
padding: '0px 14px', // TODO: find a way to make paddings on y axis so it's possible to use the the pointing arrow.
|
|
18
|
+
}),
|
|
19
|
+
},
|
|
20
|
+
components: {
|
|
21
|
+
Navigation: CustomNavigation,
|
|
22
|
+
},
|
|
23
|
+
})
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core'
|
|
2
|
+
import { TimesMini } from '@citric/icons'
|
|
3
|
+
import { StepType, useTour } from '@reactour/tour'
|
|
4
|
+
import { useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
+
import { TextWithPointingArrow } from '../utils'
|
|
6
|
+
|
|
7
|
+
const PortalSwitcherStep = () => {
|
|
8
|
+
const t = useTranslate(translations)
|
|
9
|
+
const { setIsOpen } = useTour()
|
|
10
|
+
return <Box bg="inverse.500">
|
|
11
|
+
<TextWithPointingArrow $position="right">
|
|
12
|
+
<Flex w={12} pl={5} py={3} flexWrap="nowrap" justifyContent="space-between" alignItems="center">
|
|
13
|
+
<Text appearance="body2" colorScheme="inverse.contrastText" weight="medium"> {t.title} </Text>
|
|
14
|
+
<Button appearance="text" size="sm" onClick={() => setIsOpen(false)}>
|
|
15
|
+
<IconBox size="xs" colorIcon="inverse.contrastText">
|
|
16
|
+
<TimesMini />
|
|
17
|
+
</IconBox>
|
|
18
|
+
</Button>
|
|
19
|
+
</Flex>
|
|
20
|
+
</TextWithPointingArrow>
|
|
21
|
+
<Image src="https://marketing.stackspot.com/switch-v2.gif"
|
|
22
|
+
alt="GIF showing how to move from one portal to another" />
|
|
23
|
+
<Box px={5} py={3}>
|
|
24
|
+
<Text appearance="microtext1" colorScheme="inverse.contrastText">{t.description}</Text>
|
|
25
|
+
</Box>
|
|
26
|
+
</Box >
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const portalSwitcherStep: StepType = {
|
|
30
|
+
selector: '.portal-switcher',
|
|
31
|
+
content: PortalSwitcherStep,
|
|
32
|
+
position: 'right',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const translations = {
|
|
36
|
+
en: {
|
|
37
|
+
title: 'Expand Your Horizons with Stackspot',
|
|
38
|
+
description: 'Easily switch between EDP and HUB to enhance your projects. Access a wide range of resources with just one click and take your projects to a new level of efficiency. Start your journey now!',
|
|
39
|
+
},
|
|
40
|
+
pt: {
|
|
41
|
+
title: 'Expanda Seus Horizontes com Stackspot',
|
|
42
|
+
description: 'Troque facilmente entre EDP e HUB para aprimorar seus projetos. Acesse uma ampla gama de recursos com apenas um clique e leve seus projetos para um novo nível de eficiência. Comece sua jornada agora!',
|
|
43
|
+
},
|
|
44
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { theme } from '@stack-spot/portal-theme'
|
|
2
|
+
import styled from 'styled-components'
|
|
3
|
+
|
|
4
|
+
export const TextWithPointingArrow = styled.div < {
|
|
5
|
+
$position: 'right' | 'top' | 'left',
|
|
6
|
+
$top?: string,
|
|
7
|
+
$right?: string,
|
|
8
|
+
} > `
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
&::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
border-width: 10px;
|
|
15
|
+
border-style: solid;
|
|
16
|
+
border-color: transparent;
|
|
17
|
+
margin-top: -5px;
|
|
18
|
+
border-right-color: ${theme.color.inverse[500]};
|
|
19
|
+
${({ $position, $top }) => $position === 'right' ?
|
|
20
|
+
`
|
|
21
|
+
top: ${$top || '16px'};
|
|
22
|
+
left: -18px;
|
|
23
|
+
` : ''}
|
|
24
|
+
${({ $position, $right }) => $position === 'top' ?
|
|
25
|
+
`
|
|
26
|
+
bottom: 96%;
|
|
27
|
+
right: ${$right || '16px'};
|
|
28
|
+
transform: rotate(90deg);
|
|
29
|
+
` : ''}
|
|
30
|
+
${({ $position, $top }) => $position === 'left' ?
|
|
31
|
+
`
|
|
32
|
+
top: ${$top || '16px'};
|
|
33
|
+
right: -18px;
|
|
34
|
+
transform: rotate(180deg);
|
|
35
|
+
` : ''}
|
|
36
|
+
}
|
|
37
|
+
`
|
|
38
|
+
|
|
39
|
+
const DOMAIN_REGEX = new RegExp(/(\.*(prd|stg|dev)*.stackspot.com)|localhost/)
|
|
40
|
+
const portalUrl = new URL(location.href)
|
|
41
|
+
const cookieDomain = DOMAIN_REGEX.exec(portalUrl.host)?.[0]
|
|
42
|
+
const defaultCookieAttributes = `domain=${cookieDomain}; SameSite=Strict;`
|
|
43
|
+
|
|
44
|
+
const getCookies = (): Record<string, string> => document.cookie.split('; ').reduce((prev, current) => {
|
|
45
|
+
const [name, ...value] = current.split('=')
|
|
46
|
+
prev[name] = value.join('=')
|
|
47
|
+
return prev
|
|
48
|
+
}, {} as Record<string, string>)
|
|
49
|
+
|
|
50
|
+
const setCookie = (key: string, value: string) => {
|
|
51
|
+
document.cookie = `${key}=${value}; ${defaultCookieAttributes}`
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const getCookie = (key: string) => getCookies()[key]
|
|
55
|
+
|
|
56
|
+
export const finishTour = () => setCookie('welcomeTour', 'done')
|
|
57
|
+
|
|
58
|
+
export const hasFinishedTour = () => !!getCookie('welcomeTour')
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
export { Layout, RawLayout } from './Layout'
|
|
2
2
|
export { overlay } from './LayoutOverlayManager'
|
|
3
3
|
export { Dialog } from './components/Dialog'
|
|
4
|
-
export { Toaster } from './components/Toaster'
|
|
5
4
|
export { Header, HeaderProps } from './components/Header'
|
|
6
5
|
export { OverlayContent } from './components/OverlayContent'
|
|
7
6
|
export { PortalSwitcher } from './components/PortalSwitcher'
|
|
8
7
|
export { ListAction, SelectionList, SelectionListProps } from './components/SelectionList'
|
|
9
|
-
export {
|
|
8
|
+
export { Toaster } from './components/Toaster'
|
|
9
|
+
export { ActionItem, MenuContent, MenuGroup, Title } from './components/menu/MenuContent'
|
|
10
10
|
export { MenuSections } from './components/menu/MenuSections'
|
|
11
11
|
export * from './components/menu/types'
|
|
12
|
+
export { TextWithPointingArrow } from './components/tour/utils'
|
|
12
13
|
export * from './components/types'
|
|
13
14
|
export * from './elements'
|
|
14
15
|
export * from './errors'
|