@stack-spot/portal-layout 0.0.64 → 1.0.0

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 (209) hide show
  1. package/dist/Layout.d.ts +57 -5
  2. package/dist/Layout.d.ts.map +1 -1
  3. package/dist/Layout.js +12 -5
  4. package/dist/Layout.js.map +1 -1
  5. package/dist/LayoutOverlayManager.d.ts +173 -6
  6. package/dist/LayoutOverlayManager.d.ts.map +1 -1
  7. package/dist/LayoutOverlayManager.js +118 -9
  8. package/dist/LayoutOverlayManager.js.map +1 -1
  9. package/dist/components/Dialog.d.ts +48 -5
  10. package/dist/components/Dialog.d.ts.map +1 -1
  11. package/dist/components/Dialog.js +7 -2
  12. package/dist/components/Dialog.js.map +1 -1
  13. package/dist/components/Header.d.ts +29 -1
  14. package/dist/components/Header.d.ts.map +1 -1
  15. package/dist/components/Header.js +6 -2
  16. package/dist/components/Header.js.map +1 -1
  17. package/dist/components/OverlayContent.d.ts +22 -0
  18. package/dist/components/OverlayContent.d.ts.map +1 -1
  19. package/dist/components/OverlayContent.js +4 -0
  20. package/dist/components/OverlayContent.js.map +1 -1
  21. package/dist/components/PortalSwitcher.d.ts +14 -0
  22. package/dist/components/PortalSwitcher.d.ts.map +1 -1
  23. package/dist/components/PortalSwitcher.js +9 -6
  24. package/dist/components/PortalSwitcher.js.map +1 -1
  25. package/dist/components/Toaster.d.ts +4 -0
  26. package/dist/components/Toaster.d.ts.map +1 -1
  27. package/dist/components/Toaster.js +5 -1
  28. package/dist/components/Toaster.js.map +1 -1
  29. package/dist/components/UserMenu.d.ts +14 -1
  30. package/dist/components/UserMenu.d.ts.map +1 -1
  31. package/dist/components/UserMenu.js +5 -1
  32. package/dist/components/UserMenu.js.map +1 -1
  33. package/dist/components/error/ErrorBoundary.d.ts +10 -1
  34. package/dist/components/error/ErrorBoundary.d.ts.map +1 -1
  35. package/dist/components/error/ErrorBoundary.js +10 -1
  36. package/dist/components/error/ErrorBoundary.js.map +1 -1
  37. package/dist/components/error/ErrorManager.d.ts +22 -6
  38. package/dist/components/error/ErrorManager.d.ts.map +1 -1
  39. package/dist/components/error/ErrorManager.js +21 -1
  40. package/dist/components/error/ErrorManager.js.map +1 -1
  41. package/dist/components/error/SilentErrorBoundary.d.ts +11 -2
  42. package/dist/components/error/SilentErrorBoundary.d.ts.map +1 -1
  43. package/dist/components/error/SilentErrorBoundary.js +10 -0
  44. package/dist/components/error/SilentErrorBoundary.js.map +1 -1
  45. package/dist/components/menu/MenuContent.d.ts +19 -545
  46. package/dist/components/menu/MenuContent.d.ts.map +1 -1
  47. package/dist/components/menu/MenuContent.js +33 -35
  48. package/dist/components/menu/MenuContent.js.map +1 -1
  49. package/dist/components/menu/MenuSections.d.ts +10 -0
  50. package/dist/components/menu/MenuSections.d.ts.map +1 -1
  51. package/dist/components/menu/MenuSections.js +70 -16
  52. package/dist/components/menu/MenuSections.js.map +1 -1
  53. package/dist/components/menu/PageSelector.d.ts +5 -0
  54. package/dist/components/menu/PageSelector.d.ts.map +1 -1
  55. package/dist/components/menu/PageSelector.js +8 -3
  56. package/dist/components/menu/PageSelector.js.map +1 -1
  57. package/dist/components/menu/types.d.ts +100 -7
  58. package/dist/components/menu/types.d.ts.map +1 -1
  59. package/dist/components/tour/PortalSwitcherStep.d.ts +6 -1
  60. package/dist/components/tour/PortalSwitcherStep.d.ts.map +1 -1
  61. package/dist/components/tour/PortalSwitcherStep.js +6 -1
  62. package/dist/components/tour/PortalSwitcherStep.js.map +1 -1
  63. package/dist/components/types.d.ts +0 -13
  64. package/dist/components/types.d.ts.map +1 -1
  65. package/dist/dictionary.d.ts +3 -0
  66. package/dist/dictionary.d.ts.map +1 -1
  67. package/dist/dictionary.js +3 -0
  68. package/dist/dictionary.js.map +1 -1
  69. package/dist/elements.d.ts +6 -0
  70. package/dist/elements.d.ts.map +1 -1
  71. package/dist/elements.js +6 -0
  72. package/dist/elements.js.map +1 -1
  73. package/dist/index.d.ts +0 -3
  74. package/dist/index.d.ts.map +1 -1
  75. package/dist/index.js +0 -3
  76. package/dist/index.js.map +1 -1
  77. package/dist/layout.css +1 -5
  78. package/dist/toaster.d.ts +74 -9
  79. package/dist/toaster.d.ts.map +1 -1
  80. package/dist/toaster.js +32 -6
  81. package/dist/toaster.js.map +1 -1
  82. package/dist/utils.d.ts +6 -69
  83. package/dist/utils.d.ts.map +1 -1
  84. package/dist/utils.js +9 -130
  85. package/dist/utils.js.map +1 -1
  86. package/package.json +12 -11
  87. package/readme.md +146 -0
  88. package/src/Layout.tsx +78 -28
  89. package/src/LayoutOverlayManager.tsx +184 -9
  90. package/src/components/Dialog.tsx +49 -6
  91. package/src/components/Header.tsx +31 -3
  92. package/src/components/OverlayContent.tsx +22 -0
  93. package/src/components/PortalSwitcher.tsx +22 -8
  94. package/src/components/Toaster.tsx +10 -2
  95. package/src/components/UserMenu.tsx +14 -1
  96. package/src/components/error/ErrorBoundary.tsx +11 -2
  97. package/src/components/error/ErrorManager.ts +22 -6
  98. package/src/components/error/SilentErrorBoundary.tsx +12 -2
  99. package/src/components/menu/MenuContent.tsx +33 -52
  100. package/src/components/menu/MenuSections.tsx +99 -49
  101. package/src/components/menu/PageSelector.tsx +8 -3
  102. package/src/components/menu/types.ts +100 -8
  103. package/src/components/tour/PortalSwitcherStep.tsx +7 -4
  104. package/src/components/types.ts +0 -14
  105. package/src/dictionary.ts +3 -0
  106. package/src/elements.ts +6 -0
  107. package/src/index.ts +0 -3
  108. package/src/layout.css +1 -5
  109. package/src/toaster.tsx +125 -14
  110. package/src/utils.ts +9 -142
  111. package/dist/components/BottomNotification.d.ts +0 -1
  112. package/dist/components/BottomNotification.d.ts.map +0 -1
  113. package/dist/components/BottomNotification.js +0 -2
  114. package/dist/components/BottomNotification.js.map +0 -1
  115. package/dist/components/BottomPanel.d.ts +0 -1
  116. package/dist/components/BottomPanel.d.ts.map +0 -1
  117. package/dist/components/BottomPanel.js +0 -2
  118. package/dist/components/BottomPanel.js.map +0 -1
  119. package/dist/components/SelectionList.d.ts +0 -36
  120. package/dist/components/SelectionList.d.ts.map +0 -1
  121. package/dist/components/SelectionList.js +0 -140
  122. package/dist/components/SelectionList.js.map +0 -1
  123. package/dist/components/error/ErrorDescriptor.d.ts +0 -12
  124. package/dist/components/error/ErrorDescriptor.d.ts.map +0 -1
  125. package/dist/components/error/ErrorDescriptor.js +0 -17
  126. package/dist/components/error/ErrorDescriptor.js.map +0 -1
  127. package/dist/components/error/ErrorFeedback.d.ts +0 -3
  128. package/dist/components/error/ErrorFeedback.d.ts.map +0 -1
  129. package/dist/components/error/ErrorFeedback.js +0 -66
  130. package/dist/components/error/ErrorFeedback.js.map +0 -1
  131. package/dist/components/menu/use-check-text-overflow.d.ts +0 -6
  132. package/dist/components/menu/use-check-text-overflow.d.ts.map +0 -1
  133. package/dist/components/menu/use-check-text-overflow.js +0 -20
  134. package/dist/components/menu/use-check-text-overflow.js.map +0 -1
  135. package/dist/components/menu/use-keyboard-controls.d.ts +0 -23
  136. package/dist/components/menu/use-keyboard-controls.d.ts.map +0 -1
  137. package/dist/components/menu/use-keyboard-controls.js +0 -49
  138. package/dist/components/menu/use-keyboard-controls.js.map +0 -1
  139. package/dist/components/menu/useCheckTextOverflow.d.ts +0 -6
  140. package/dist/components/menu/useCheckTextOverflow.d.ts.map +0 -1
  141. package/dist/components/menu/useCheckTextOverflow.js +0 -20
  142. package/dist/components/menu/useCheckTextOverflow.js.map +0 -1
  143. package/dist/components/tour/Navigation.d.ts +0 -8
  144. package/dist/components/tour/Navigation.d.ts.map +0 -1
  145. package/dist/components/tour/Navigation.js +0 -15
  146. package/dist/components/tour/Navigation.js.map +0 -1
  147. package/dist/components/tour/config.d.ts +0 -3
  148. package/dist/components/tour/config.d.ts.map +0 -1
  149. package/dist/components/tour/config.js +0 -22
  150. package/dist/components/tour/config.js.map +0 -1
  151. package/dist/components/tour/steps/PortalSwitcherStep.d.ts +0 -3
  152. package/dist/components/tour/steps/PortalSwitcherStep.d.ts.map +0 -1
  153. package/dist/components/tour/steps/PortalSwitcherStep.js +0 -30
  154. package/dist/components/tour/steps/PortalSwitcherStep.js.map +0 -1
  155. package/dist/components/tour/utils.d.ts +0 -9
  156. package/dist/components/tour/utils.d.ts.map +0 -1
  157. package/dist/components/tour/utils.js +0 -48
  158. package/dist/components/tour/utils.js.map +0 -1
  159. package/dist/layout-context.d.ts +0 -10
  160. package/dist/layout-context.d.ts.map +0 -1
  161. package/dist/layout-context.js +0 -11
  162. package/dist/layout-context.js.map +0 -1
  163. package/dist/svg/AI.d.ts +0 -6
  164. package/dist/svg/AI.d.ts.map +0 -1
  165. package/dist/svg/AI.js +0 -9
  166. package/dist/svg/AI.js.map +0 -1
  167. package/dist/svg/EDP.d.ts +0 -6
  168. package/dist/svg/EDP.d.ts.map +0 -1
  169. package/dist/svg/EDP.js +0 -5
  170. package/dist/svg/EDP.js.map +0 -1
  171. package/dist/svg/Forbidden.d.ts +0 -6
  172. package/dist/svg/Forbidden.d.ts.map +0 -1
  173. package/dist/svg/Forbidden.js +0 -4
  174. package/dist/svg/Forbidden.js.map +0 -1
  175. package/dist/svg/HUB.d.ts +0 -6
  176. package/dist/svg/HUB.d.ts.map +0 -1
  177. package/dist/svg/HUB.js +0 -5
  178. package/dist/svg/HUB.js.map +0 -1
  179. package/dist/svg/Logo.d.ts +0 -2
  180. package/dist/svg/Logo.d.ts.map +0 -1
  181. package/dist/svg/Logo.js +0 -4
  182. package/dist/svg/Logo.js.map +0 -1
  183. package/dist/svg/NotFound.d.ts +0 -6
  184. package/dist/svg/NotFound.d.ts.map +0 -1
  185. package/dist/svg/NotFound.js +0 -4
  186. package/dist/svg/NotFound.js.map +0 -1
  187. package/dist/svg/ServerError.d.ts +0 -6
  188. package/dist/svg/ServerError.d.ts.map +0 -1
  189. package/dist/svg/ServerError.js +0 -4
  190. package/dist/svg/ServerError.js.map +0 -1
  191. package/dist/svg/Unauthenticated.d.ts +0 -6
  192. package/dist/svg/Unauthenticated.d.ts.map +0 -1
  193. package/dist/svg/Unauthenticated.js +0 -4
  194. package/dist/svg/Unauthenticated.js.map +0 -1
  195. package/src/components/BottomNotification.tsx +0 -0
  196. package/src/components/BottomPanel.tsx +0 -0
  197. package/src/components/SelectionList.tsx +0 -272
  198. package/src/components/error/ErrorFeedback.tsx +0 -114
  199. package/src/components/menu/use-check-text-overflow.tsx +0 -26
  200. package/src/components/menu/use-keyboard-controls.tsx +0 -70
  201. package/src/layout-context.tsx +0 -22
  202. package/src/svg/AI.tsx +0 -37
  203. package/src/svg/EDP.tsx +0 -35
  204. package/src/svg/Forbidden.tsx +0 -22
  205. package/src/svg/HUB.tsx +0 -35
  206. package/src/svg/Logo.tsx +0 -35
  207. package/src/svg/NotFound.tsx +0 -16
  208. package/src/svg/ServerError.tsx +0 -33
  209. package/src/svg/Unauthenticated.tsx +0 -16
@@ -1,36 +0,0 @@
1
- import { WithStyle } from '@stack-spot/portal-theme';
2
- import { ReactElement } from 'react';
3
- import { Action } from './types.js';
4
- interface ItemWithIcon {
5
- icon?: React.ReactElement;
6
- iconRight?: React.ReactElement;
7
- }
8
- export interface ListAction extends ItemWithIcon, Action {
9
- active?: boolean;
10
- }
11
- interface ListGroup {
12
- type?: 'section' | 'collapsible';
13
- children: ListItem[];
14
- }
15
- interface ListSection extends ListGroup {
16
- type: 'section';
17
- label?: string;
18
- }
19
- interface ListCollapsible extends ListGroup, ItemWithIcon {
20
- type?: 'collapsible';
21
- label: string;
22
- }
23
- type ListItem = ListSection | ListCollapsible | ListAction;
24
- export interface SelectionListProps extends WithStyle {
25
- id: string;
26
- visible?: boolean;
27
- items: ListItem[];
28
- onHide?: () => void;
29
- maxHeight?: string;
30
- before?: ReactElement;
31
- after?: ReactElement;
32
- scroll?: boolean;
33
- }
34
- export declare const SelectionList: ({ id, items, className, style, visible, maxHeight, onHide, before, after, scroll, }: SelectionListProps) => import("react/jsx-runtime").JSX.Element;
35
- export {};
36
- //# sourceMappingURL=SelectionList.d.ts.map
@@ -1 +0,0 @@
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 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Flex, IconBox, Text } from '@citric/core';
3
- import { ArrowLeft, Check, ChevronRight } from '@citric/icons';
4
- import { IconButton } from '@citric/ui';
5
- import { listToClass, theme } from '@stack-spot/portal-theme';
6
- import { useTranslate } from '@stack-spot/portal-translate';
7
- import { useCallback, useEffect, useMemo, useState } from 'react';
8
- import { styled } from 'styled-components';
9
- import { useAnchorTag } from '../layout-context.js';
10
- import { useKeyboardControls } from './menu/use-keyboard-controls.js';
11
- const ANIMATION_DURATION_MS = 300;
12
- const MAX_HEIGHT_TRANSITION = `max-height ease-in ${ANIMATION_DURATION_MS / 1000}s`;
13
- const SelectionBox = styled.div `
14
- max-height: 0;
15
- overflow-y: ${({ $scroll }) => $scroll ? 'auto' : 'hidden'};
16
- overflow-x: hidden;
17
- transition: ${MAX_HEIGHT_TRANSITION}, visibility 0s ${ANIMATION_DURATION_MS / 1000}s;
18
- z-index: 1;
19
- box-shadow: 4px 4px 48px #000;
20
- border-radius: 0.5rem;
21
- visibility: hidden;
22
-
23
- .selection-list-content {
24
- display: flex;
25
- flex-direction: column;
26
- background: ${theme.color.light['500']};
27
- border-radius: 0.5rem;
28
- border: 1px solid ${theme.color.light['600']};
29
- background-color: ${theme.color.light['300']};
30
- }
31
-
32
- .section-title, li > a {
33
- height: 40px;
34
- padding: 0 8px;
35
- display: flex;
36
- flex-direction: row;
37
- align-items: center;
38
- }
39
-
40
- li > a {
41
- gap: 4px;
42
- transition: background-color 0.2s;
43
- &:hover, &:focus {
44
- background: ${theme.color.light['400']};
45
- }
46
- .label {
47
- flex: 1;
48
- white-space: nowrap;
49
- overflow: hidden;
50
- text-overflow: ellipsis;
51
- }
52
- }
53
-
54
- li.section {
55
- border-bottom: 2px solid ${theme.color.light['600']};
56
- &:last-child {
57
- border-bottom: none;
58
- }
59
- }
60
-
61
- &.visible {
62
- max-height: ${({ $maxHeight }) => $maxHeight};
63
- visibility: visible;
64
- transition: ${MAX_HEIGHT_TRANSITION};
65
- }
66
- `;
67
- function renderAction({ label, href, onClick, icon, iconRight, active, target, iconActive = _jsx(Check, {}), }, { onClose, Link }) {
68
- function handleClick() {
69
- onClick?.();
70
- onClose?.();
71
- }
72
- const isTextLabel = typeof label === 'string';
73
- return (_jsx("li", { className: "action", children: _jsxs(Link, { href: href, onClick: handleClick, target: target, tabIndex: 0, "aria-selected": active, children: [icon && _jsx(IconBox, { children: icon }), isTextLabel ? _jsx(Text, { appearance: "body2", className: "label", children: label }) : label.element, iconRight && _jsx(IconBox, { children: iconRight }), active && _jsx(IconBox, { children: iconActive })] }) }, isTextLabel ? label : label.id));
74
- }
75
- function renderCollapsible({ label, icon, iconRight, children }, { setCurrent, controllerId, Link }) {
76
- function handleClick(ev) {
77
- // accessibility: this will tell the screen reader the section was expanded before this link is removed from the DOM.
78
- ev.target?.setAttribute?.('aria-expanded', 'true');
79
- setCurrent({ items: children, label });
80
- }
81
- return (_jsx("li", { className: "collapsible", children: _jsxs(Link, { onClick: handleClick, tabIndex: 0, "aria-expanded": false, "aria-controls": controllerId, children: [icon && _jsx(IconBox, { children: icon }), _jsx(Text, { appearance: "body2", className: "label", children: label }), iconRight && _jsx(IconBox, { children: iconRight }), _jsx(IconBox, { children: _jsx(ChevronRight, {}) })] }) }, label));
82
- }
83
- function renderSection({ label, children }, options) {
84
- return (_jsxs("li", { className: "section", children: [label && _jsx(Text, { appearance: "overheader2", colorScheme: "primary", className: "section-title", children: label }), _jsx("ul", { children: children.map(i => renderItem(i, options)) })] }, label ?? children.map(c => c.label).join('-')));
85
- }
86
- function renderItem(item, options) {
87
- if ('children' in item) {
88
- return item.type === 'section' ? renderSection(item, options) : renderCollapsible(item, options);
89
- }
90
- return renderAction(item, options);
91
- }
92
- export const SelectionList = ({ id, items, className, style, visible = true, maxHeight = '300px', onHide, before, after, scroll, }) => {
93
- const Link = useAnchorTag();
94
- const t = useTranslate(dictionary);
95
- const [current, setCurrent] = useState({ items });
96
- const { keyboardControlledElement: wrapper, attachKeyboardListeners, detachKeyboardListeners } = useKeyboardControls({ onPressEscape: onHide, querySelectors: 'li.action a, li.collapsible a, button' });
97
- const listItems = useMemo(() => current.items.map(i => renderItem(i, {
98
- setCurrent: (next) => setCurrent({ ...next, parent: current }),
99
- onClose: onHide,
100
- controllerId: id,
101
- Link,
102
- })), [current]);
103
- const hide = useCallback((event) => {
104
- const target = event.target;
105
- // if the element is not in the DOM anymore, we'll consider the click was inside the selection list
106
- const isClickInsideSelectionList = !target?.isConnected || wrapper.current?.contains(target);
107
- const isAction = target?.classList?.contains('action') || !!target?.closest('.action');
108
- if (!isClickInsideSelectionList || isAction)
109
- onHide?.();
110
- }, []);
111
- useEffect(() => {
112
- if (visible) {
113
- setCurrent({ items });
114
- attachKeyboardListeners();
115
- if (onHide)
116
- setTimeout(() => document.addEventListener('click', hide), 50);
117
- }
118
- else {
119
- detachKeyboardListeners();
120
- document.removeEventListener('click', hide);
121
- }
122
- }, [visible]);
123
- return (_jsx(SelectionBox, { id: id, ref: wrapper, "$maxHeight": maxHeight, style: style, className: listToClass(['selection-list', visible ? 'visible' : undefined, className]), "$scroll": scroll, "aria-hidden": !visible, children: _jsxs("div", { className: "selection-list-content", children: [before, current.parent
124
- ? (_jsxs(Flex, { mt: 5, mb: 1, alignItems: "center", children: [_jsx(IconButton, { onClick: (ev) => {
125
- // accessibility: this will tell the screen reader the section was collapsed before this button is removed from the DOM.
126
- ev.target?.setAttribute?.('aria-expanded', 'false');
127
- setCurrent(current.parent ?? { items });
128
- }, sx: { mr: 3 }, title: t.back, "aria-controls": id, "aria-expanded": true, children: _jsx(ArrowLeft, {}) }), _jsx(Text, { appearance: "microtext1", children: current.label })] }))
129
- : undefined, _jsxs("ul", { children: [listItems, after &&
130
- _jsx("li", { className: "action", children: after })] })] }) }));
131
- };
132
- const dictionary = {
133
- en: {
134
- back: 'Go back',
135
- },
136
- pt: {
137
- back: 'Voltar',
138
- },
139
- };
140
- //# sourceMapping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ACd,wHAAwH;oCACvH,EAAE,CAAC,MAAsB,EAAE,YAAY,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC,CAAA;oCACpE,UAAU,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,KAAK,EAAE,CAAC,CAAA;gCACzC,CAAC,EACD,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EACb,KAAK,EAAE,CAAC,CAAC,IAAI,mBACE,EAAE,mBACF,IAAI,YAEnB,KAAC,SAAS,KAAG,GACF,EACb,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,YAAE,OAAO,CAAC,KAAK,GAAQ,IAC/C,CACR;oBACD,CAAC,CAAC,SAAS,EAEb,yBACG,SAAS,EACT,KAAK;4BACJ,aAAI,SAAS,EAAC,QAAQ,YACnB,KAAK,GACH,IAEJ,IACD,GACO,CAChB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,IAAI,EAAE,SAAS;KAChB;IACD,EAAE,EAAE;QACF,IAAI,EAAE,QAAQ;KACf;CACmB,CAAA"}
@@ -1,12 +0,0 @@
1
- export interface ErrorDescription {
2
- code?: number;
3
- message?: string;
4
- debug?: boolean;
5
- }
6
- export type DescriptionFn = (error: any) => ErrorDescription;
7
- export declare class ErrorDescriptor {
8
- private static descriptionFunction;
9
- static setDescriptionFunction(fn: DescriptionFn): void;
10
- static describe(error: any): ErrorDescription;
11
- }
12
- //# sourceMappingURL=ErrorDescriptor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDescriptor.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorDescriptor.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,gBAAgB,CAAA;AAE5D,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAEhC;IAEF,MAAM,CAAC,sBAAsB,CAAC,EAAE,EAAE,aAAa;IAI/C,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG;CAG3B"}
@@ -1,17 +0,0 @@
1
- export class ErrorDescriptor {
2
- static setDescriptionFunction(fn) {
3
- this.descriptionFunction = fn;
4
- }
5
- static describe(error) {
6
- return this.descriptionFunction(error);
7
- }
8
- }
9
- Object.defineProperty(ErrorDescriptor, "descriptionFunction", {
10
- enumerable: true,
11
- configurable: true,
12
- writable: true,
13
- value: error => ({
14
- message: error.message || `${error}`,
15
- })
16
- });
17
- //# sourceMappingURL=ErrorDescriptor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorDescriptor.js","sourceRoot":"","sources":["../../../src/components/error/ErrorDescriptor.ts"],"names":[],"mappings":"AAQA,MAAM,OAAO,eAAe;IAK1B,MAAM,CAAC,sBAAsB,CAAC,EAAiB;QAC7C,IAAI,CAAC,mBAAmB,GAAG,EAAE,CAAA;IAC/B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,KAAU;QACxB,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAA;IACxC,CAAC;;AAVc;;;;WAAqC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5D,OAAO,EAAE,KAAK,CAAC,OAAO,IAAI,GAAG,KAAK,EAAE;KACrC,CAAC;GAAA"}
@@ -1,3 +0,0 @@
1
- import { ErrorDescription } from './ErrorManager.js';
2
- export declare const ErrorFeedback: ({ code, message, debug }: ErrorDescription) => import("react/jsx-runtime").JSX.Element;
3
- //# sourceMappingURL=ErrorFeedback.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAajD,eAAO,MAAM,aAAa,6BAAkC,gBAAgB,4CAgD3E,CAAA"}
@@ -1,66 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Box, Button, Container, Flex, LinkBox, Text } from '@citric/core';
3
- import { useTranslate } from '@stack-spot/portal-translate';
4
- import { useState } from 'react';
5
- import { Forbidden } from '../../svg/Forbidden.js';
6
- import { Logo } from '../../svg/Logo.js';
7
- import { NotFound } from '../../svg/NotFound.js';
8
- import { ServerError } from '../../svg/ServerError.js';
9
- import { Unauthenticated } from '../../svg/Unauthenticated.js';
10
- const imageStyle = {
11
- width: '200px',
12
- height: '200px',
13
- };
14
- const imageMap = {
15
- 401: _jsx(Unauthenticated, { style: imageStyle }),
16
- 403: _jsx(Forbidden, { style: imageStyle }),
17
- 404: _jsx(NotFound, { style: imageStyle }),
18
- };
19
- export const ErrorFeedback = ({ code = 0, message, debug }) => {
20
- const t = useTranslate(dictionary);
21
- const [showDetails, setShowDetails] = useState(false);
22
- return (_jsx(Box, { bg: "light.400", children: _jsx(Container, { children: _jsxs(Flex, { alignItems: "center", sx: { padding: 12 }, children: [_jsx(Box, { width: 5, sx: { display: ['block', 'none'] }, children: _jsx(Flex, { justifyContent: "flex-end", pr: 20, children: imageMap[code] ?? _jsx(ServerError, { style: imageStyle }) }) }), _jsxs(Box, { width: [7, 12], children: [_jsx(LinkBox, { href: "/", children: _jsx(Logo, { style: { width: '130px', height: '30px' } }) }), _jsxs(Box, { w: [7, 12], children: [_jsxs(Text, { appearance: "h4", mt: 5, colorScheme: "inverse", children: [code ? `${code}. ` : '', _jsx(Text, { appearance: "h4", as: "span", colorScheme: "light.700", children: t[`${code}.title`] })] }), _jsx(Text, { appearance: "body1", mt: 5, colorScheme: "inverse", children: t[`${code}.description`] }), _jsx(Text, { appearance: "body1", colorScheme: "light.700", mt: 1, children: t[`${code}.help`] }), debug && message && (_jsx(Button, { appearance: "outlined", colorScheme: "inverse", onClick: () => setShowDetails(v => !v), children: showDetails ? t.hideDetails : t.showDetails })), showDetails && (_jsx(Box, { bg: "danger", mt: 8, p: 4, sx: { borderRadius: '5px' }, children: _jsx(Text, { appearance: "microtext1", colorScheme: "danger.contrastText", children: message }) }))] })] })] }) }) }));
23
- };
24
- const dictionary = {
25
- en: {
26
- altLogo: 'Logo Stackspot',
27
- '0.title': 'Unknown client error',
28
- '0.description': 'An unknown error happened while trying to load the resource.',
29
- '0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
30
- '401.title': 'Not authorized',
31
- '401.description': 'There was a failure loading credentials for this page.',
32
- '401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
33
- '403.title': 'Private access',
34
- '403.description': 'The page you have tried to visit is private.',
35
- '403.help': 'Log in with another account or request access from the person who manages your organization.',
36
- '404.title': 'Resource not found',
37
- '404.description': 'This resource no longer exists.',
38
- '404.help': 'Please try again or request a new URL from the person who manages your organization.',
39
- '500.title': 'Server error',
40
- '500.description': "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
41
- '500.help': 'Please try again after a few minutes.',
42
- showDetails: 'Show Details',
43
- hideDetails: 'Hide Details',
44
- },
45
- pt: {
46
- altLogo: 'Logo Stackspot',
47
- '0.title': 'Erro desconhecido (cliente)',
48
- '0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
49
- '0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
50
- '401.title': 'Não autorizado',
51
- '401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
52
- '401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
53
- '403.title': 'Acesso privado',
54
- '403.description': '"A página que você tentou visualizar é particular."',
55
- '403.help': 'Solicite acesso com o administrador da sua organização.',
56
- '404.title': 'Recurso não encontrado',
57
- '404.description': 'Este recurso não existe mais.',
58
- '404.help': 'Tente novamente ou fale com o administrador da sua organização.',
59
- '500.title': 'Erro ao exibir o recurso',
60
- '500.description': 'Mas não se preocupe, já estamos investigando o que aconteceu.',
61
- '500.help': 'Tente novamente após alguns minutos.',
62
- showDetails: 'Ver Detalhes',
63
- hideDetails: 'Esconder Detalhes',
64
- },
65
- };
66
- //# sourceMappingURL=ErrorFeedback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorFeedback.js","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAG3D,MAAM,UAAU,GAAwB;IACtC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;CAChB,CAAA;AAED,MAAM,QAAQ,GAAuC;IACnD,GAAG,EAAE,KAAC,eAAe,IAAC,KAAK,EAAE,UAAU,GAAI;IAC3C,GAAG,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,UAAU,GAAI;IACrC,GAAG,EAAE,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,GAAI;CACrC,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAoB,EAAE,EAAE;IAC9E,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAA2B,CAAA;IAC5D,MAAM,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AE,cAAc;KAC5B;IACD,EAAE,EAAE;QACF,OAAO,EAAE,gBAAgB;QACzB,SAAS,EAAE,6BAA6B;QACxC,eAAe,EAAE,sDAAsD;QACvE,QAAQ,EAAE,6FAA6F;QACvG,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,8DAA8D;QACjF,UAAU,EAAE,mGAAmG;QAC/G,WAAW,EAAE,gBAAgB;QAC7B,iBAAiB,EAAE,qDAAqD;QACxE,UAAU,EAAE,yDAAyD;QACrE,WAAW,EAAE,wBAAwB;QACrC,iBAAiB,EAAE,+BAA+B;QAClD,UAAU,EAAE,iEAAiE;QAC7E,WAAW,EAAE,0BAA0B;QACvC,iBAAiB,EAAE,+DAA+D;QAClF,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,mBAAmB;KACjC;CACmB,CAAA"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useCheckTextOverflow(): {
3
- overflow: boolean;
4
- ref: import("react").RefObject<HTMLParagraphElement>;
5
- };
6
- //# sourceMappingURL=use-check-text-overflow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-check-text-overflow.d.ts","sourceRoot":"","sources":["../../../src/components/menu/use-check-text-overflow.tsx"],"names":[],"mappings":";AAEA,wBAAgB,oBAAoB;;;EAuBnC"}
@@ -1,20 +0,0 @@
1
- import { useState, useRef, useEffect } from 'react';
2
- export function useCheckTextOverflow() {
3
- const [overflow, setOverflow] = useState(false);
4
- const ref = useRef(null);
5
- const checkOverflow = () => {
6
- if (!ref.current) {
7
- return;
8
- }
9
- const hasOverflow = ref.current.offsetWidth < ref.current.scrollWidth;
10
- if (hasOverflow === overflow) {
11
- return;
12
- }
13
- setOverflow(hasOverflow);
14
- };
15
- useEffect(() => {
16
- checkOverflow();
17
- }, [ref.current]);
18
- return { overflow, ref };
19
- }
20
- //# sourceMappingURL=use-check-text-overflow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-check-text-overflow.js","sourceRoot":"","sources":["../../../src/components/menu/use-check-text-overflow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEnD,MAAM,UAAU,oBAAoB;IAClC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IACxD,MAAM,GAAG,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAA;IAE9C,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,OAAM;SACP;QAED,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAA;QAErE,IAAI,WAAW,KAAK,QAAQ,EAAE;YAC5B,OAAM;SACP;QAED,WAAW,CAAC,WAAW,CAAC,CAAA;IAC1B,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,EAAE,CAAA;IACjB,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAEjB,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAA;AAC1B,CAAC"}
@@ -1,23 +0,0 @@
1
- /// <reference types="react" />
2
- interface Props {
3
- /**
4
- * A query selector that returns every html element that must be navigable through the keyboard.
5
- */
6
- querySelectors: string;
7
- /**
8
- * Function to call when ESC is pressed. or when TAB is pressed at the last item in the list of items returned by the query selector.
9
- */
10
- onPressEscape?: () => void;
11
- /**
12
- * Function to call when TAB is pressed at the last item in the list of items returned by the query selector. Will be the same as
13
- * onPressEscape if not specified.
14
- */
15
- onPressLastTab?: () => void;
16
- }
17
- export declare function useKeyboardControls({ querySelectors, onPressEscape, onPressLastTab }: Props): {
18
- keyboardControlledElement: import("react").RefObject<HTMLDivElement>;
19
- attachKeyboardListeners: () => void;
20
- detachKeyboardListeners: () => void;
21
- };
22
- export {};
23
- //# sourceMappingURL=use-keyboard-controls.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-keyboard-controls.d.ts","sourceRoot":"","sources":["../../../src/components/menu/use-keyboard-controls.tsx"],"names":[],"mappings":";AAEA,UAAU,KAAK;IACb;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,cAA8B,EAAE,EAAE,KAAK;;;;EAmD3G"}
@@ -1,49 +0,0 @@
1
- import { useCallback, useRef } from 'react';
2
- export function useKeyboardControls({ querySelectors, onPressEscape, onPressLastTab = onPressEscape }) {
3
- const keyboardControlledElement = useRef(null);
4
- const listeners = useRef({});
5
- listeners.current = { onPressEscape, onPressLastTab };
6
- const keyboardControls = useCallback((event) => {
7
- const target = event?.target;
8
- function getSelectableAnchors() {
9
- return keyboardControlledElement.current?.querySelectorAll(querySelectors) ?? [];
10
- }
11
- function handleArrows(key = event.key) {
12
- const anchors = getSelectableAnchors();
13
- let i = 0;
14
- while (i < anchors.length && document.activeElement !== anchors[i])
15
- i++;
16
- const next = key === 'ArrowDown' ? (anchors[i + 1] ?? anchors[0]) : (anchors[i - 1] ?? anchors[anchors.length - 1]);
17
- next?.focus?.();
18
- }
19
- const handlers = {
20
- Escape: () => {
21
- listeners.current.onPressEscape?.();
22
- event.stopPropagation();
23
- event.preventDefault();
24
- },
25
- Enter: () => {
26
- target?.click();
27
- },
28
- Tab: () => {
29
- const anchors = getSelectableAnchors();
30
- if (document.activeElement === anchors[anchors.length - 1])
31
- listeners.current.onPressLastTab?.();
32
- else
33
- handleArrows('ArrowDown');
34
- event.preventDefault();
35
- },
36
- ArrowUp: handleArrows,
37
- ArrowDown: handleArrows,
38
- };
39
- handlers[event.key]?.();
40
- }, []);
41
- const attachKeyboardListeners = useCallback(() => {
42
- document.addEventListener('keydown', keyboardControls);
43
- }, []);
44
- const detachKeyboardListeners = useCallback(() => {
45
- document.removeEventListener('keydown', keyboardControls);
46
- }, []);
47
- return { keyboardControlledElement, attachKeyboardListeners, detachKeyboardListeners };
48
- }
49
- //# sourceMappingURL=use-keyboard-controls.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-keyboard-controls.js","sourceRoot":"","sources":["../../../src/components/menu/use-keyboard-controls.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAkB3C,MAAM,UAAU,mBAAmB,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,GAAG,aAAa,EAAS;IAC1G,MAAM,yBAAyB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAA;IAC9D,MAAM,SAAS,GAAG,MAAM,CAAkD,EAAE,CAAC,CAAA;IAC7E,SAAS,CAAC,OAAO,GAAG,EAAE,aAAa,EAAE,cAAc,EAAE,CAAA;IAErD,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,KAAoB,EAAE,EAAE;QAC5D,MAAM,MAAM,GAAG,KAAK,EAAE,MAA4B,CAAA;QAElD,SAAS,oBAAoB;YAC3B,OAAO,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,CAAC,cAAc,CAAC,IAAI,EAAE,CAAA;QAClF,CAAC;QAED,SAAS,YAAY,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG;YACnC,MAAM,OAAO,GAAG,oBAAoB,EAAE,CAAA;YACtC,IAAI,CAAC,GAAG,CAAC,CAAA;YACT,OAAO,CAAC,GAAG,OAAO,CAAC,MAAM,IAAI,QAAQ,CAAC,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC;gBAAE,CAAC,EAAE,CAAA;YACvE,MAAM,IAAI,GAAQ,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,CAAC,OAAO,C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BAAgB,CAAC,CAAA;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,CAAA;AACxF,CAAC"}
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useCheckTextOverflow(): {
3
- overflow: boolean;
4
- ref: import("react").RefObject<HTMLParagraphElement>;
5
- };
6
- //# sourceMappingURL=useCheckTextOverflow.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckTextOverflow.d.ts","sourceRoot":"","sources":["../../../src/components/menu/useCheckTextOverflow.tsx"],"names":[],"mappings":";AAEA,wBAAgB,oBAAoB;;;EAuBnC"}
@@ -1,20 +0,0 @@
1
- import { useState, useRef, useEffect } from 'react';
2
- export function useCheckTextOverflow() {
3
- const [overflow, setOverflow] = useState(false);
4
- const ref = useRef(null);
5
- const checkOverflow = () => {
6
- if (!ref.current) {
7
- return;
8
- }
9
- const hasOverflow = ref.current.offsetWidth < ref.current.scrollWidth;
10
- if (hasOverflow === overflow) {
11
- return;
12
- }
13
- setOverflow(hasOverflow);
14
- };
15
- useEffect(() => {
16
- checkOverflow();
17
- }, [ref.current]);
18
- return { overflow, ref };
19
- }
20
- //# sourceMappingURL=useCheckTextOverflow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCheckTextOverflow.js","sourceRoot":"","sources":["../../../src/components/menu/useCheckTextOverflow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,MAAM,UAAU,oBAAoB;IAClC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAA;IACxD,MAAM,GAAG,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAA;IAE9C,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE;YAChB,OAAM;SACP;QAED,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAA;QAErE,IAAI,WAAW,KAAK,QAAQ,EAAE;YAC5B,OAAM;SACP;QAED,WAAW,CAAC,WAAW,CAAC,CAAA;IAC1B,CAAC,CAAA;IAED,SAAS,CAAC,GAAG,EAAE;QACb,aAAa,EAAE,CAAA;IACjB,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAA;IAEjB,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAA;AAC1B,CAAC"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
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,CAAA;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAMpC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAmB,EAAE,EAAE;IAC1F,MAAM,CAAC,GAAG,YAAY,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;IAC5F,OAAO,MAAC,IAAI,IAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,aAAa,EAAC,cAAc,EAAC,eAAe,aACzF,MAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,aAAE,WAAW,GAAG,CAAC,OAAG,CAAC,CAAC,EAAE,OAAG,KAAK,CAAC,MAAM,IAAQ,EAC/G,MAAC,IAAI,IAAC,EAAE,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,aACrB,WAAW,GAAG,CAAC;wBACd,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE,IAAI,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,YACjH,CAAC,CAAC,IAAI,GACA,EACX,KAAC,MAAM,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;4BACnD,IAAI,WAAW,GAAG,CAAC,IAAI,KAAK,CAAC,MAAM;gCAAE,UAAU,EAAE,CAAA;4BACjD,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC,CAAA;wBACjC,CAAC,EAAE,IAAI,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,mBAEvB,IACJ,IACF,CAAA;AACT,CAAC,CAAA"}
@@ -1,3 +0,0 @@
1
- import { ProviderProps } from '@reactour/tour';
2
- export declare const defaultTourConfig: () => Omit<ProviderProps, 'children'>;
3
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
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"}
@@ -1,22 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,3 +0,0 @@
1
- import { StepType } from '@reactour/tour';
2
- export declare const portalSwitcherStep: StepType;
3
- //# sourceMappingURL=PortalSwitcherStep.d.ts.map
@@ -1 +0,0 @@
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;AA6BlD,eAAO,MAAM,kBAAkB,EAAE,QAIhC,CAAA"}
@@ -1,30 +0,0 @@
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, finishTour } 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: () => {
11
- finishTour();
12
- setIsOpen(false);
13
- }, 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 }) })] });
14
- };
15
- export const portalSwitcherStep = {
16
- selector: '.portal-switcher',
17
- content: PortalSwitcherStep,
18
- position: 'right',
19
- };
20
- const translations = {
21
- en: {
22
- title: 'Expand Your Horizons with Stackspot',
23
- 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!',
24
- },
25
- pt: {
26
- title: 'Expanda Seus Horizontes com Stackspot',
27
- 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!',
28
- },
29
- };
30
- //# sourceMappingURL=PortalSwitcherStep.js.map
@@ -1 +0,0 @@
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,UAAU,EAAE,MAAM,UAAU,CAAA;AAE5D,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC9B,MAAM,CAAC,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;IACpC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAA;IAC/B,OAAO,MAAC,GAAG,IAAC,EAAE,EAAC,aAAa,aAC1B,KAAC,qBAAqB,iBAAW,OAAO,YACtC,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,CAAC,CAAC,KAAK,SAAS,EAC9F,KAAC,MAAM,IAAC,UAAU,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAE,GAAG,EAAE;gCAChD,UAAU,EAAE,CAAA;gCACZ,SAAS,CAAC,KAAK,CAAC,CAAA;4BAClB,CAAC,YACC,KAAC,OAAO,IAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,sBAAsB,YACjD,KAAC,SAAS,KAAG,GACL,GACH,IACJ,GACe,EACxB,KAAC,KAAK,IAAC,GAAG,EAAC,+CAA+C,EACxD,GAAG,EAAC,oDAAoD,GAAG,EAC7D,KAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,UAAU,EAAC,YAAY,EAAC,WAAW,EAAC,sBAAsB,YAAE,CAAC,CAAC,WAAW,GAAQ,GACnF,IACD,CAAA;AACT,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAa;IAC1C,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,kBAAkB;IAC3B,QAAQ,EAAE,OAAO;CAClB,CAAA;AAED,MAAM,YAAY,GAAG;IACnB,EAAE,EAAE;QACF,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EAAE,8LAA8L;KAC5M;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,wMAAwM;KACtN;CACF,CAAA"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const TextWithPointingArrow: import("styled-components/dist/types").IStyledComponentBase<"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
- }>> & string;
7
- export declare const finishTour: () => void;
8
- export declare const hasFinishedTour: () => boolean;
9
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
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;;;YAgCpC,CAAA;AAmBD,eAAO,MAAM,UAAU,YAAyC,CAAA;AAEhE,eAAO,MAAM,eAAe,eAAmC,CAAA"}