@stack-spot/portal-layout 1.1.2 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/Layout.d.ts +2 -11
  3. package/dist/Layout.d.ts.map +1 -1
  4. package/dist/Layout.js +6 -13
  5. package/dist/Layout.js.map +1 -1
  6. package/dist/WelcomeTour.d.ts +2 -0
  7. package/dist/WelcomeTour.d.ts.map +1 -0
  8. package/dist/WelcomeTour.js +8 -0
  9. package/dist/WelcomeTour.js.map +1 -0
  10. package/dist/components/PortalSwitcher.d.ts +6 -0
  11. package/dist/components/PortalSwitcher.d.ts.map +1 -1
  12. package/dist/components/PortalSwitcher.js +34 -2
  13. package/dist/components/PortalSwitcher.js.map +1 -1
  14. package/dist/components/error/ErrorBoundary.d.ts +10 -1
  15. package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
  16. package/dist/components/error/ErrorBoundary.js +1 -1
  17. package/dist/components/error/ErrorBoundary.js.map +1 -1
  18. package/dist/components/error/ErrorManager.d.ts +1 -1
  19. package/dist/components/error/ErrorManager.d.ts.map +1 -1
  20. package/dist/components/error/SilentErrorBoundary.d.ts +10 -1
  21. package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
  22. package/dist/components/tour/StepContainer.d.ts +29 -0
  23. package/dist/components/tour/StepContainer.d.ts.map +1 -0
  24. package/dist/components/tour/StepContainer.js +52 -0
  25. package/dist/components/tour/StepContainer.js.map +1 -0
  26. package/dist/components/tour/StepNavigation.d.ts +29 -0
  27. package/dist/components/tour/StepNavigation.d.ts.map +1 -0
  28. package/dist/components/tour/StepNavigation.js +36 -0
  29. package/dist/components/tour/StepNavigation.js.map +1 -0
  30. package/dist/components/tour/StepTitle.d.ts +17 -0
  31. package/dist/components/tour/StepTitle.d.ts.map +1 -0
  32. package/dist/components/tour/StepTitle.js +9 -0
  33. package/dist/components/tour/StepTitle.js.map +1 -0
  34. package/dist/components/tour/hook.d.ts +3 -0
  35. package/dist/components/tour/hook.d.ts.map +1 -0
  36. package/dist/components/tour/hook.js +10 -0
  37. package/dist/components/tour/hook.js.map +1 -0
  38. package/dist/components/tour/index.d.ts +5 -0
  39. package/dist/components/tour/index.d.ts.map +1 -0
  40. package/dist/components/tour/index.js +5 -0
  41. package/dist/components/tour/index.js.map +1 -0
  42. package/dist/components/tour/manager.d.ts +32 -0
  43. package/dist/components/tour/manager.d.ts.map +1 -0
  44. package/dist/components/tour/manager.js +98 -0
  45. package/dist/components/tour/manager.js.map +1 -0
  46. package/dist/components/tour/utils.d.ts +50 -0
  47. package/dist/components/tour/utils.d.ts.map +1 -0
  48. package/dist/components/tour/utils.js +60 -0
  49. package/dist/components/tour/utils.js.map +1 -0
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/index.js +1 -0
  53. package/dist/index.js.map +1 -1
  54. package/dist/layout.css +1 -1
  55. package/package.json +7 -4
  56. package/readme.md +2 -0
  57. package/src/Layout.tsx +23 -41
  58. package/src/WelcomeTour.tsx +8 -0
  59. package/src/components/PortalSwitcher.tsx +42 -1
  60. package/src/components/error/ErrorBoundary.tsx +1 -1
  61. package/src/components/error/ErrorManager.ts +1 -1
  62. package/src/components/error/SilentErrorBoundary.tsx +1 -1
  63. package/src/components/tour/StepContainer.tsx +83 -0
  64. package/src/components/tour/StepNavigation.tsx +70 -0
  65. package/src/components/tour/StepTitle.tsx +27 -0
  66. package/src/components/tour/hook.ts +12 -0
  67. package/src/components/tour/index.ts +6 -0
  68. package/src/components/tour/manager.tsx +111 -0
  69. package/src/components/tour/utils.tsx +100 -0
  70. package/src/index.ts +1 -0
  71. package/src/layout.css +1 -1
  72. package/dist/components/tour/PortalSwitcherStep.d.ts +0 -8
  73. package/dist/components/tour/PortalSwitcherStep.d.ts.map +0 -1
  74. package/dist/components/tour/PortalSwitcherStep.js +0 -34
  75. package/dist/components/tour/PortalSwitcherStep.js.map +0 -1
  76. package/src/components/tour/PortalSwitcherStep.tsx +0 -39
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.0.0...portal-layout@v2.0.1) (2024-07-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * default BG color on layout ([8c7d525](https://github.com/stack-spot/portal-commons/commit/8c7d5253d8c7da7318e75d08868e1f90b45a05c2))
9
+
10
+ ## [2.0.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v1.1.2...portal-layout@v2.0.0) (2024-06-28)
11
+
12
+
13
+ ### ⚠ BREAKING CHANGES
14
+
15
+ * **portal-components:** removed Tour related componets
16
+ * **portal-layout:** Adds a new reworked Tour structure compatible with module federation
17
+ * new Tour strategy
18
+
19
+ ### Features
20
+
21
+ * new Tour strategy ([d6daf23](https://github.com/stack-spot/portal-commons/commit/d6daf238f9956e2c913a36773db9b34080fd17a5))
22
+ * **portal-components:** removed Tour related componets ([d6daf23](https://github.com/stack-spot/portal-commons/commit/d6daf238f9956e2c913a36773db9b34080fd17a5))
23
+ * **portal-layout:** Adds a new reworked Tour structure compatible with module federation ([d6daf23](https://github.com/stack-spot/portal-commons/commit/d6daf238f9956e2c913a36773db9b34080fd17a5))
24
+
3
25
  ## [1.1.2](https://github.com/stack-spot/portal-commons/compare/portal-layout@v1.1.1...portal-layout@v1.1.2) (2024-06-26)
4
26
 
5
27
 
package/dist/Layout.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import { TourProps } from '@stack-spot/portal-components/Tour';
2
1
  import { WithStyle } from '@stack-spot/portal-theme';
3
2
  import '@stack-spot/portal-theme/dist/theme.css';
4
3
  import { ReactElement, ReactNode } from 'react';
@@ -31,10 +30,6 @@ interface Props extends WithStyle {
31
30
  * A function to run whenever an error is catch by an error boundary.
32
31
  */
33
32
  onError?: ErrorHandler;
34
- /**
35
- * The options for the React Tour's tutorial.
36
- */
37
- tourProps?: TourProps;
38
33
  }
39
34
  interface RawProps extends WithStyle {
40
35
  /**
@@ -65,20 +60,16 @@ interface RawProps extends WithStyle {
65
60
  * A function to run whenever an error is catch by an error boundary.
66
61
  */
67
62
  onError?: ErrorHandler;
68
- /**
69
- * The options for the React Tour's tutorial.
70
- */
71
- tourProps?: TourProps;
72
63
  }
73
64
  /**
74
65
  * Renders the layout with the React elements passed in the props.
75
66
  * @param props the component's props {@link RawProps}.
76
67
  */
77
- export declare const RawLayout: ({ menuSections, menuContent, header, children, tourProps, extra, errorDescriptor, onError, className, style }: RawProps) => import("react/jsx-runtime").JSX.Element;
68
+ export declare const RawLayout: ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style }: RawProps) => import("react/jsx-runtime").JSX.Element;
78
69
  /**
79
70
  * Renders the layout with a menu and header that follow the config objects passed as parameter.
80
71
  * @param props the component's props {@link Props}.
81
72
  */
82
- export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style, tourProps }: Props) => import("react/jsx-runtime").JSX.Element;
73
+ export declare const Layout: ({ menu, header, children, extra, errorDescriptor, onError, className, style }: Props) => import("react/jsx-runtime").JSX.Element;
83
74
  export {};
84
75
  //# sourceMappingURL=Layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkD,MAAM,oCAAoC,CAAA;AAC9G,OAAO,EAAsB,SAAS,EAAe,MAAM,0BAA0B,CAAA;AACrF,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAE1D,OAAO,EAAU,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGzD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAgB,MAAM,iCAAiC,CAAA;AAI3F,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,OAAO,cAAc,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AAM,iCAAiC,CAAA;AAI3F,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,cAAc,CAAA;AAErB,UAAU,KAAM,SAAQ,SAAS;IAC/B;;OAEG;IACH,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,MAAM,EAAE,WAAW,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,UAAU,QAAS,SAAQ,SAAS;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,aAAa,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,uGAGlB,QAAQ,4CA4CX,CAAA;AAOD;;;GAGG;AACH,eAAO,MAAM,MAAM,kFAAmF,KAAK,4CAgB1G,CAAA"}
package/dist/Layout.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { TourProvider, defaultTourConfig, isNewTourStep } from '@stack-spot/portal-components/Tour';
3
2
  import { CSSToCitricAdapter, listToClass } from '@stack-spot/portal-theme';
4
3
  import '@stack-spot/portal-theme/dist/theme.css';
5
4
  import { useEffect } from 'react';
6
5
  import { overlay } from './LayoutOverlayManager.js';
6
+ import { WelcomeTour } from './WelcomeTour.js';
7
7
  import { Header } from './components/Header.js';
8
8
  import { Toaster } from './components/Toaster.js';
9
9
  import { ErrorBoundary } from './components/error/ErrorBoundary.js';
@@ -11,38 +11,31 @@ import { ErrorManager } from './components/error/ErrorManager.js';
11
11
  import { SilentErrorBoundary } from './components/error/SilentErrorBoundary.js';
12
12
  import { MenuContent } from './components/menu/MenuContent.js';
13
13
  import { MenuSections } from './components/menu/MenuSections.js';
14
- import { usePortalSwitcherStep } from './components/tour/PortalSwitcherStep.js';
15
14
  import { elementIds, getLayoutElements } from './elements.js';
16
15
  import './layout.css';
17
16
  /**
18
17
  * Renders the layout with the React elements passed in the props.
19
18
  * @param props the component's props {@link RawProps}.
20
19
  */
21
- export const RawLayout = ({ menuSections, menuContent, header, children, tourProps, extra, errorDescriptor, onError, className, style }) => {
20
+ export const RawLayout = ({ menuSections, menuContent, header, children, extra, errorDescriptor, onError, className, style }) => {
22
21
  // @ts-ignore
23
22
  const { bottomDialog, modal, rightPanel } = overlay.useOverlays();
24
23
  const { layout } = getLayoutElements();
25
24
  const isCompactedOnlyIcons = layout?.classList.contains('menu-compact');
26
- const portalSwitcherStep = usePortalSwitcherStep();
27
25
  const classes = [
28
26
  menuContent && !isCompactedOnlyIcons ? 'menu-content-visible' : undefined,
29
27
  menuSections ? undefined : 'no-menu-sections',
30
28
  className,
31
29
  isCompactedOnlyIcons ? 'menu-compact' : undefined,
32
30
  ];
33
- const tourPropsWithDefaults = { ...defaultTourConfig, ...(tourProps || {}) };
34
- tourPropsWithDefaults.steps = [
35
- portalSwitcherStep,
36
- ...tourPropsWithDefaults.steps,
37
- ].filter(isNewTourStep);
38
31
  useEffect(() => {
39
32
  if (errorDescriptor)
40
33
  ErrorManager.setDescriptionFunction(errorDescriptor);
41
34
  if (onError)
42
35
  ErrorManager.setErrorHandler(onError);
43
36
  }, []);
44
- return (_jsx(CSSToCitricAdapter, { children: _jsx(TourProvider, { config: tourPropsWithDefaults, children: _jsxs("div", { id: elementIds.layout, className: listToClass(classes), style: style, children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [_jsx("nav", { role: "menubar", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
45
- _jsx("nav", { role: "menubar", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) })] }), children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), _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" })] }) }) }));
37
+ return (_jsxs(CSSToCitricAdapter, { children: [_jsx(WelcomeTour, {}), _jsxs("div", { id: elementIds.layout, className: listToClass(classes), style: style, children: [header && _jsx("header", { id: elementIds.header, children: _jsx(SilentErrorBoundary, { children: header }) }), extra && _jsx(SilentErrorBoundary, { children: extra }), _jsxs("aside", { id: elementIds.menu, children: [_jsx("nav", { role: "menubar", id: elementIds.menuContent, children: _jsx(SilentErrorBoundary, { children: menuContent }) }), menuSections &&
38
+ _jsx("nav", { role: "menubar", id: elementIds.menuSections, children: _jsx(SilentErrorBoundary, { children: menuSections }) })] }), children && _jsx("div", { id: elementIds.page, children: _jsx("article", { id: elementIds.content, children: _jsx(ErrorBoundary, { children: children }) }) }), _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" })] })] }));
46
39
  };
47
40
  const MenuContentRenderer = ({ content }) => {
48
41
  const menuContent = typeof content === 'function' ? content() : content;
@@ -52,7 +45,7 @@ const MenuContentRenderer = ({ content }) => {
52
45
  * Renders the layout with a menu and header that follow the config objects passed as parameter.
53
46
  * @param props the component's props {@link Props}.
54
47
  */
55
- export const Layout = ({ menu, header, children, extra, errorDescriptor, onError, className, style, tourProps }) => (_jsx(RawLayout, { header: _jsx(Header, { ...header }), menuSections: menu.sections ? _jsx(MenuSections, { ...menu }) : undefined, menuContent: menu.content
48
+ export const Layout = ({ menu, header, children, extra, errorDescriptor, onError, className, style }) => (_jsx(RawLayout, { header: _jsx(Header, { ...header }), menuSections: menu.sections ? _jsx(MenuSections, { ...menu }) : undefined, menuContent: menu.content
56
49
  ? _jsx(MenuContentRenderer, { content: menu.content }, 'contentKey' in menu ? menu.contentKey : undefined)
57
- : undefined, errorDescriptor: errorDescriptor, onError: onError, extra: extra, className: className, style: style, tourProps: tourProps, children: children }));
50
+ : undefined, errorDescriptor: errorDescriptor, onError: onError, extra: extra, className: className, style: style, children: children }));
58
51
  //# sourceMappingURL=Layout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.js","sourceRoot":"","sources":["../src/Layout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAC9G,OAAO,EAAE,kBAAkB,EAAa,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACrF,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAA2B,SAAS,EAAE,MAAM,OAAO,CAAA;AAC1D,OAAO,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AAE,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"}
@@ -0,0 +1,2 @@
1
+ export declare const WelcomeTour: () => import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=WelcomeTour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeTour.d.ts","sourceRoot":"","sources":["../src/WelcomeTour.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,+CAKvB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { WelcomeTour as WelcomeTourComponent, useTour } from './components/tour/index.js';
3
+ export const WelcomeTour = () => {
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+ const { currentStep, addStep, finishStep, ...tourConfig } = useTour();
6
+ return _jsx(WelcomeTourComponent, { ...tourConfig });
7
+ };
8
+ //# sourceMappingURL=WelcomeTour.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeTour.js","sourceRoot":"","sources":["../src/WelcomeTour.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEhF,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,EAAE;IAC9B,6DAA6D;IAC7D,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,EAAE,GAAG,OAAO,EAAE,CAAA;IAErE,OAAO,KAAC,oBAAoB,OAAK,UAAU,GAAI,CAAA;AACjD,CAAC,CAAA"}
@@ -21,4 +21,10 @@ export interface PortalSwitcherProps {
21
21
  * @param props the component Props {@link PortalSwitcherProps}.
22
22
  */
23
23
  export declare const PortalSwitcher: ({ portals }: PortalSwitcherProps) => import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * Tutorial: a React hook for retrieving the React Tour step that explains how the portal switcher works. The portal switcher is a component
26
+ * at the top left corner of the layout (header) that allows the user to switch between the different Stackspot portals.
27
+ * @returns the React Tour step for the PortalSwitcher.
28
+ */
29
+ export declare const usePortalSwitcherTourStep: () => void;
24
30
  //# sourceMappingURL=PortalSwitcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAQvC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CA8CnE,CAAA"}
1
+ {"version":3,"file":"PortalSwitcher.d.ts","sourceRoot":"","sources":["../../src/components/PortalSwitcher.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAQvC,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC;IACvB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AA0DD;;;;GAIG;AACH,eAAO,MAAM,cAAc,gBAAsB,mBAAmB,4CA+CnE,CAAA;AAqBD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,YAkBrC,CAAA"}
@@ -1,5 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Flex, IconBox, Text } from '@citric/core';
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core';
3
3
  import { ArrowRight, CheckCircleFill, Select } from '@citric/icons';
4
4
  import { SelectionList } from '@stack-spot/portal-components/SelectionList';
5
5
  import { AI, EDP, HUB, Logo } from '@stack-spot/portal-components/svg';
@@ -8,6 +8,7 @@ import { useTranslate } from '@stack-spot/portal-translate';
8
8
  import { useState } from 'react';
9
9
  import styled from 'styled-components';
10
10
  import { announce } from '../utils.js';
11
+ import { useTour } from './tour/index.js';
11
12
  const Logos = {
12
13
  'AI': _jsx(AI, {}),
13
14
  'EDP': _jsx(EDP, {}),
@@ -77,6 +78,7 @@ export const PortalSwitcher = ({ portals = [] }) => {
77
78
  const [visible, setVisible] = useState(false);
78
79
  const t = useTranslate(translations);
79
80
  const currentPortal = portals?.find(portal => location.href.startsWith(portal.url));
81
+ usePortalSwitcherTourStep();
80
82
  return _jsxs(PortalSwitcherBox, { children: [currentPortal ?
81
83
  _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: () => {
82
84
  setVisible(true);
@@ -110,4 +112,34 @@ const translations = {
110
112
  selected: 'selecionado',
111
113
  },
112
114
  };
115
+ /**
116
+ * Tutorial: a React hook for retrieving the React Tour step that explains how the portal switcher works. The portal switcher is a component
117
+ * at the top left corner of the layout (header) that allows the user to switch between the different Stackspot portals.
118
+ * @returns the React Tour step for the PortalSwitcher.
119
+ */
120
+ export const usePortalSwitcherTourStep = () => {
121
+ const t = useTranslate(tourTranslations);
122
+ const { addStep } = useTour();
123
+ addStep({
124
+ selector: '.portal-switcher',
125
+ title: t.title,
126
+ content: _jsxs(_Fragment, { children: [_jsx(Image, { src: "https://marketing.stackspot.com/switch-v2.gif", alt: t.imageAlt }), _jsx(Box, { px: 5, py: 3, children: _jsx(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: t.description }) })] }),
127
+ position: 'right',
128
+ style: {
129
+ width: '300px',
130
+ },
131
+ });
132
+ };
133
+ const tourTranslations = {
134
+ en: {
135
+ title: 'Expand Your Horizons with Stackspot',
136
+ description: 'Easily switch between EDP and AI 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!',
137
+ imageAlt: 'GIF describing how to use product switcher and navigate between AI and EDP portals',
138
+ },
139
+ pt: {
140
+ title: 'Expanda Seus Horizontes com Stackspot',
141
+ description: 'Troque facilmente entre EDP e AI 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!',
142
+ imageAlt: 'GIF mostrando como usar o alternador de produtos e navegar entre os portais AI e EDP',
143
+ },
144
+ };
113
145
  //# sourceMappingURL=PortalSwitcher.js.map
@@ -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,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC3E,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,M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C,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,gBAAgB,GAAG;IACvB,EAAE,EAAE;QACF,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EAAE,8LAA8L;QAC3M,QAAQ,EAAE,oFAAoF;KAC/F;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,wMAAwM;QACrN,QAAQ,EAAE,sFAAsF;KACjG;CACF,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ErrorDescription } from '@stack-spot/portal-components/ErrorFeedback';
1
+ import { ErrorDescription } from '@stack-spot/portal-components/error';
2
2
  import { Component } from 'react';
3
3
  interface State extends ErrorDescription {
4
4
  hasError: boolean;
@@ -21,6 +21,15 @@ export declare class ErrorBoundary extends Component<Props, State> {
21
21
  code?: number | undefined;
22
22
  message?: string | undefined;
23
23
  debug?: boolean | undefined;
24
+ title?: string | undefined;
25
+ description?: string | undefined;
26
+ help?: string | undefined;
27
+ action?: {
28
+ label: string;
29
+ onClick: () => void;
30
+ } | undefined;
31
+ body?: import("react").ReactNode;
32
+ image?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
24
33
  hasError: boolean;
25
34
  };
26
35
  componentDidCatch(error: any, errorInfo: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,6CAA6C,CAAA;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,UAAU,KAAM,SAAQ,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;IAI1C,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAKP"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiB,MAAM,qCAAqC,CAAA;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,UAAU,KAAM,SAAQ,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAC5C,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;;;;;;;;;;IAI1C,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAKP"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { ErrorFeedback } from '@stack-spot/portal-components/ErrorFeedback';
2
+ import { ErrorFeedback } from '@stack-spot/portal-components/error';
3
3
  import { Component } from 'react';
4
4
  import { ErrorManager } from './ErrorManager.js';
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../../src/components/error/ErrorBoundary.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAoB,aAAa,EAAE,MAAM,6CAA6C,CAAA;AAC7F,OAAO,EAAE,SAAS,EAAE,M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SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAU7C;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAc,SAAQ,SAAuB;IACxD,YAAY,KAAY;QACtB,KAAK,CAAC,KAAK,CAAC,CAAA;QACZ,IAAI,CAAC,KAAK,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;IAClC,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAU;QACxC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,YAAY,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAA;IAC5D,CAAC;IAED,iBAAiB,CAAC,KAAU,EAAE,SAAc;QAC1C,sCAAsC;QACtC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;QAC/B,YAAY,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;IACrC,CAAC;IAED,kBAAkB,CAAC,SAA0B;QAC3C,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,QAAQ;YAAE,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAA;IACpF,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ;YACxB,CAAC,CAAC,KAAC,aAAa,IAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,GAAI;YAChG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAA;IACzB,CAAC;CACF"}
@@ -1,4 +1,4 @@
1
- import { ErrorDescription } from '@stack-spot/portal-components/ErrorFeedback';
1
+ import { ErrorDescription } from '@stack-spot/portal-components/error';
2
2
  export type DescriptionFn = (error: any) => ErrorDescription;
3
3
  export type ErrorHandler = (error: any) => void;
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorManager.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA;AAE9E,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,gBAAgB,CAAA;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;AAE/C;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAEhC;IACF,OAAO,CAAC,MAAM,CAAC,YAAY,CAA0B;IAErD;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,EAAE,EAAE,aAAa;IAI/C;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,YAAY;IAI5C;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG;IAI1B;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG;CAGlC"}
1
+ {"version":3,"file":"ErrorManager.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAEtE,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,gBAAgB,CAAA;AAC5D,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;AAE/C;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAEhC;IACF,OAAO,CAAC,MAAM,CAAC,YAAY,CAA0B;IAErD;;;OAGG;IACH,MAAM,CAAC,sBAAsB,CAAC,EAAE,EAAE,aAAa;IAI/C;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,YAAY;IAI5C;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG;IAI1B;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG;CAGlC"}
@@ -1,4 +1,4 @@
1
- import { ErrorDescription } from '@stack-spot/portal-components/ErrorFeedback';
1
+ import { ErrorDescription } from '@stack-spot/portal-components/error';
2
2
  import { Component } from 'react';
3
3
  interface State extends ErrorDescription {
4
4
  hasError: boolean;
@@ -22,6 +22,15 @@ export declare class SilentErrorBoundary extends Component<Props, State> {
22
22
  code?: number | undefined;
23
23
  message?: string | undefined;
24
24
  debug?: boolean | undefined;
25
+ title?: string | undefined;
26
+ description?: string | undefined;
27
+ help?: string | undefined;
28
+ action?: {
29
+ label: string;
30
+ onClick: () => void;
31
+ } | undefined;
32
+ body?: import("react").ReactNode;
33
+ image?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
25
34
  hasError: boolean;
26
35
  };
27
36
  componentDidCatch(error: any, errorInfo: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"SilentErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/SilentErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAA;AAE9E,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,UAAU,KAAM,SAAQ,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAClD,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;IAI1C,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAoBP"}
1
+ {"version":3,"file":"SilentErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/error/SilentErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAA;AAEtE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjC,UAAU,KAAM,SAAQ,gBAAgB;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;gBAClD,KAAK,EAAE,KAAK;IAKxB,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG;;;;;;;;;;;;;;;IAI1C,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IAM5C,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC,KAAK,CAAC;IAI7C,MAAM;CAoBP"}
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { NavigationProps } from './StepNavigation.js';
3
+ interface StepContainerProps {
4
+ children: ReactNode;
5
+ /**
6
+ * The unique identifier for the step.
7
+ */
8
+ stepKey: string;
9
+ /**
10
+ * The title for the step.
11
+ */
12
+ title: string;
13
+ /**
14
+ * The position of the tour overlay related to the content being explained.
15
+ */
16
+ position: PointingArrowPosition;
17
+ /**
18
+ * A customizable set of buttons for navigating the tour steps.
19
+ */
20
+ customNavigation?: Omit<NavigationProps, 'stepKey'>;
21
+ }
22
+ /**
23
+ * Tutorial: the overlay component for showing a step on React Tour.
24
+ * @param props the react props for the component {@link StepContainerProps}.
25
+ */
26
+ export declare const StepContainer: ({ title, stepKey, customNavigation, position, children }: StepContainerProps) => import("react/jsx-runtime").JSX.Element;
27
+ export type PointingArrowPosition = 'right' | 'top' | 'left' | 'bottom';
28
+ export {};
29
+ //# sourceMappingURL=StepContainer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepContainer.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepContainer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,eAAe,EAAkB,MAAM,kBAAkB,CAAA;AAIlE,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,qBAAqB,CAAC;IAChC;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;CACrD;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,6DAA8D,kBAAkB,4CAOzG,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAA"}
@@ -0,0 +1,52 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { theme } from '@stack-spot/portal-theme';
3
+ import { styled } from 'styled-components';
4
+ import { StepNavigation } from './StepNavigation.js';
5
+ import { StepTitle } from './StepTitle.js';
6
+ import { useTour } from './hook.js';
7
+ /**
8
+ * Tutorial: the overlay component for showing a step on React Tour.
9
+ * @param props the react props for the component {@link StepContainerProps}.
10
+ */
11
+ export const StepContainer = ({ title, stepKey, customNavigation, position, children }) => {
12
+ const { finishStep } = useTour();
13
+ return _jsxs(BoxWithPointingArrow, { "$position": position, children: [_jsx(StepTitle, { title: title, onClose: () => finishStep(stepKey) }), children, _jsx(StepNavigation, { stepKey: stepKey, ...(customNavigation || {}) })] });
14
+ };
15
+ const BoxWithPointingArrow = styled.div `
16
+ position: relative;
17
+ width: 100%;
18
+ background-color: ${theme.color.inverse[500]};
19
+ &::after {
20
+ content: '';
21
+ position: absolute;
22
+ border-width: 10px;
23
+ border-style: solid;
24
+ border-color: transparent;
25
+ margin-top: -5px;
26
+ border-right-color: ${theme.color.inverse[500]};
27
+ ${({ $position, $top }) => $position === 'right' ?
28
+ `
29
+ top: ${$top || '16px'};
30
+ left: -18px;
31
+ ` : ''}
32
+ ${({ $position, $right }) => $position === 'top' ?
33
+ `
34
+ bottom: 96%;
35
+ right: ${$right || '16px'};
36
+ transform: rotate(90deg);
37
+ ` : ''}
38
+ ${({ $position, $top }) => $position === 'left' ?
39
+ `
40
+ top: ${$top || '16px'};
41
+ right: -18px;
42
+ transform: rotate(180deg);
43
+ ` : ''}
44
+ ${({ $position, $right }) => $position === 'bottom' ?
45
+ `
46
+ top: -13px;
47
+ right: ${$right || '16px'};
48
+ transform: rotate(90deg);
49
+ ` : ''}
50
+ }
51
+ `;
52
+ //# sourceMappingURL=StepContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepContainer.js","sourceRoot":"","sources":["../../../src/components/tour/StepContainer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAmB,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAsBhC;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAsB,EAAE,EAAE;IAC5G,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAA;IAChC,OAAO,MAAC,oBAAoB,iBAAY,QAAQ,aAC9C,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,GAAI,EAC9D,QAAQ,EACT,KAAC,cAAc,IAAC,OAAO,EAAE,OAAO,KAAM,CAAC,gBAAgB,IAAI,EAAE,CAAC,GAAI,IAC7C,CAAA;AACzB,CAAC,CAAA;AAID,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAInC;;;sBAGkB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;;;;;;;;0BAQpB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;MAC5C,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,OAAO,CAAC,CAAC;IAClD;aACS,IAAI,IAAI,MAAM;;KAEtB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,KAAK,CAAC,CAAC;IAClD;;aAES,MAAM,IAAI,MAAM;;KAExB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC;IACjD;aACS,IAAI,IAAI,MAAM;;;KAGtB,CAAC,CAAC,CAAC,EAAE;MACJ,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,SAAS,KAAK,QAAQ,CAAC,CAAC;IACrD;;aAES,MAAM,IAAI,MAAM;;KAExB,CAAC,CAAC,CAAC,EAAE;;CAET,CAAA"}
@@ -0,0 +1,29 @@
1
+ import '@stack-spot/portal-theme/dist/theme.css';
2
+ interface CustomNavigationButton {
3
+ /**
4
+ * The text content to render.
5
+ */
6
+ text: string;
7
+ onClick?: () => void;
8
+ }
9
+ export interface NavigationProps {
10
+ /**
11
+ * The unique identifier of the step.
12
+ */
13
+ stepKey: string;
14
+ /**
15
+ * The text and click handler for the button "next".
16
+ */
17
+ nextButton?: CustomNavigationButton;
18
+ /**
19
+ * The text and click handler for the button "previous".
20
+ */
21
+ prevButton?: CustomNavigationButton;
22
+ }
23
+ /**
24
+ * Tutorial: the component in a React Tour overlay that shows the next and previous buttons (for step navigation).
25
+ * @param props the react props for the component {@link NavigationProps}.
26
+ */
27
+ export declare const StepNavigation: ({ stepKey, nextButton, prevButton }: NavigationProps) => import("react/jsx-runtime").JSX.Element;
28
+ export {};
29
+ //# sourceMappingURL=StepNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepNavigation.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepNavigation.tsx"],"names":[],"mappings":"AACA,OAAO,yCAAyC,CAAA;AAIhD,UAAU,sBAAsB;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC;CACrC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,wCAAyC,eAAe,4CAsBlF,CAAA"}
@@ -0,0 +1,36 @@
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 { useTour } from './hook.js';
6
+ /**
7
+ * Tutorial: the component in a React Tour overlay that shows the next and previous buttons (for step navigation).
8
+ * @param props the react props for the component {@link NavigationProps}.
9
+ */
10
+ export const StepNavigation = ({ stepKey, nextButton, prevButton }) => {
11
+ const { currentStep, steps, prevStep, finishStep } = useTour();
12
+ const t = useTranslate(translations);
13
+ return _jsxs(Flex, { w: 12, px: 5, py: 2, mt: "-1px", bg: "inverse.500", justifyContent: "space-between", alignItems: "center", children: [_jsxs(Text, { appearance: "microtext1", colorScheme: "inverse.contrastText", children: [currentStep + 1, " ", t.of, " ", steps.length] }), _jsxs(Flex, { sx: { gap: '8px' }, children: [currentStep >= 1 &&
14
+ _jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => {
15
+ prevStep?.();
16
+ prevButton?.onClick?.();
17
+ }, size: "sm", appearance: "text", colorScheme: "light", children: prevButton?.text || t.back }), _jsx(Button, { sx: { paddingInline: '20px' }, onClick: () => {
18
+ nextButton?.onClick?.();
19
+ finishStep(stepKey);
20
+ }, size: "sm", colorScheme: "light", children: nextButton?.text || (currentStep < steps.length - 1 ? t.next : t.done) })] })] });
21
+ };
22
+ const translations = {
23
+ en: {
24
+ of: 'of',
25
+ back: 'Back',
26
+ next: 'Next',
27
+ done: 'Done',
28
+ },
29
+ pt: {
30
+ of: 'de',
31
+ back: 'Voltar',
32
+ next: 'Próximo',
33
+ done: 'Finalizado',
34
+ },
35
+ };
36
+ //# sourceMappingURL=StepNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepNavigation.js","sourceRoot":"","sources":["../../../src/components/tour/StepNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,yCAAyC,CAAA;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAyBhC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAmB,EAAE,EAAE;IACrF,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,CAAA;IAC9D,MAAM,CAAC,GAAG,YAAY,CAAC,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AE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;KACb;IACD,EAAE,EAAE;QACF,EAAE,EAAE,IAAI;QACR,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,YAAY;KACnB;CACF,CAAA"}
@@ -0,0 +1,17 @@
1
+ interface StepTitleProps {
2
+ /**
3
+ * The step's title.
4
+ */
5
+ title: string;
6
+ /**
7
+ * A function to run once the step is closed.
8
+ */
9
+ onClose?: () => void;
10
+ }
11
+ /**
12
+ * Tutorial: the component in a React Tour overlay that renders the title.
13
+ * @param props the react props for the component {@link StepTitleProps}.
14
+ */
15
+ export declare const StepTitle: ({ title, onClose }: StepTitleProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=StepTitle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepTitle.d.ts","sourceRoot":"","sources":["../../../src/components/tour/StepTitle.tsx"],"names":[],"mappings":"AAGA,UAAU,cAAc;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,uBAAwB,cAAc,4CAQnD,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button, Flex, IconBox, Text } from '@citric/core';
3
+ import { TimesMini } from '@citric/icons';
4
+ /**
5
+ * Tutorial: the component in a React Tour overlay that renders the title.
6
+ * @param props the react props for the component {@link StepTitleProps}.
7
+ */
8
+ export const StepTitle = ({ title, onClose }) => _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: [" ", title, " "] }), _jsx(Button, { appearance: "text", size: "sm", onClick: () => onClose?.(), sx: { ':hover': { borderColor: 'transparent !important' } }, children: _jsx(IconBox, { size: "xs", colorIcon: "inverse.contrastText", children: _jsx(TimesMini, {}) }) })] });
9
+ //# sourceMappingURL=StepTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepTitle.js","sourceRoot":"","sources":["../../../src/components/tour/StepTitle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAazC;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAkB,EAAE,EAAE,CAC9D,MAAC,IAAI,IAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,eAAe,EAAC,UAAU,EAAC,QAAQ,aAC7F,MAAC,IAAI,IAAC,UAAU,EAAC,OAAO,EAAC,WAAW,EAAC,sBAAsB,EAAC,MAAM,EAAC,QAAQ,kBAAG,KAAK,SAAS,EAC5F,KAAC,MAAM,IAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,wBAAwB,EAAE,EAAE,YACzH,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,sBAAsB,YACjD,KAAC,SAAS,KAAG,GACL,GACH,IACJ,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { TourConfigExtra } from './manager.js';
2
+ export declare const useTour: () => TourConfigExtra;
3
+ //# sourceMappingURL=hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/components/tour/hook.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAe,MAAM,WAAW,CAAA;AAExD,eAAO,MAAM,OAAO,uBAQnB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { useEffect, useState } from 'react';
2
+ import { tourManager } from './manager.js';
3
+ export const useTour = () => {
4
+ const [tourConfig, setTourConfig] = useState(tourManager.config);
5
+ useEffect(() => tourManager.subscribe((config) => {
6
+ setTourConfig(config);
7
+ }), []);
8
+ return tourConfig;
9
+ };
10
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook.js","sourceRoot":"","sources":["../../../src/components/tour/hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,EAAmB,WAAW,EAAE,MAAM,WAAW,CAAA;AAExD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IAC1B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAkB,WAAW,CAAC,MAAM,CAAC,CAAA;IAEjF,SAAS,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE;QAC/C,aAAa,CAAC,MAAM,CAAC,CAAA;IACvB,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IAEP,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ export { StepContainer } from './StepContainer.js';
2
+ export { useTour } from './hook.js';
3
+ export { TourConfig, TourConfigListener, TourStep, WelcomeTour, tourManager } from './manager.js';
4
+ export { StackspotTourStep, hasFinishedTourStep, isNewTourStep, tourStepBuilder } from './utils.js';
5
+ //# sourceMappingURL=index.d.ts.map