@stack-spot/portal-layout 0.0.58 → 0.0.59
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.
|
@@ -1 +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;
|
|
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"}
|
|
@@ -3,11 +3,14 @@ import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core';
|
|
|
3
3
|
import { TimesMini } from '@citric/icons';
|
|
4
4
|
import { useTour } from '@reactour/tour';
|
|
5
5
|
import { useTranslate } from '@stack-spot/portal-translate';
|
|
6
|
-
import { TextWithPointingArrow } from '../utils.js';
|
|
6
|
+
import { TextWithPointingArrow, finishTour } from '../utils.js';
|
|
7
7
|
const PortalSwitcherStep = () => {
|
|
8
8
|
const t = useTranslate(translations);
|
|
9
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: () =>
|
|
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 }) })] });
|
|
11
14
|
};
|
|
12
15
|
export const portalSwitcherStep = {
|
|
13
16
|
selector: '.portal-switcher',
|
|
@@ -1 +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;
|
|
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,YA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,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,+LAA+L;KAC7M;IACD,EAAE,EAAE;QACF,KAAK,EAAE,uCAAuC;QAC9C,WAAW,EAAE,yMAAyM;KACvN;CACF,CAAA"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { Box, Button, Flex, IconBox, Image, Text } from '@citric/core'
|
|
|
2
2
|
import { TimesMini } from '@citric/icons'
|
|
3
3
|
import { StepType, useTour } from '@reactour/tour'
|
|
4
4
|
import { useTranslate } from '@stack-spot/portal-translate'
|
|
5
|
-
import { TextWithPointingArrow } from '../utils'
|
|
5
|
+
import { TextWithPointingArrow, finishTour } from '../utils'
|
|
6
6
|
|
|
7
7
|
const PortalSwitcherStep = () => {
|
|
8
8
|
const t = useTranslate(translations)
|
|
@@ -11,7 +11,10 @@ const PortalSwitcherStep = () => {
|
|
|
11
11
|
<TextWithPointingArrow $position="right">
|
|
12
12
|
<Flex w={12} pl={5} py={3} flexWrap="nowrap" justifyContent="space-between" alignItems="center">
|
|
13
13
|
<Text appearance="body2" colorScheme="inverse.contrastText" weight="medium"> {t.title} </Text>
|
|
14
|
-
<Button appearance="text" size="sm" onClick={() =>
|
|
14
|
+
<Button appearance="text" size="sm" onClick={() => {
|
|
15
|
+
finishTour()
|
|
16
|
+
setIsOpen(false)
|
|
17
|
+
}}>
|
|
15
18
|
<IconBox size="xs" colorIcon="inverse.contrastText">
|
|
16
19
|
<TimesMini />
|
|
17
20
|
</IconBox>
|