@vygruppen/spor-react 7.2.2 → 8.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.
@@ -1,61 +0,0 @@
1
- import {
2
- DarkMode,
3
- Popover,
4
- PopoverArrow,
5
- PopoverCloseButton,
6
- PopoverContent,
7
- PopoverProps,
8
- PopoverTrigger,
9
- } from "@chakra-ui/react";
10
- import * as React from "react";
11
- import { PopoverWizardBody } from "./PopoverWizardBody";
12
-
13
- export type WizardPopoverProps = PopoverProps & {
14
- /** Steps in the wizard. Each item is its own step */
15
- children: React.ReactNode;
16
- /** The element that triggers the wizard */
17
- triggerElement: React.ReactNode;
18
- /**
19
- * Where the popover should be placed by default.
20
- *
21
- * Note - this is a suggestion, and may be overridden by space concerns.
22
- */
23
- placement?: "top" | "bottom" | "left" | "right";
24
- /** Should the popover have a close button? */
25
- withCloseButton?: boolean;
26
- };
27
- /**
28
- * A popover that displays its children one at a time, with a step indicator
29
- *
30
- * Each child is its own step. If you want several components inside a
31
- * single slide, you want to wrap them in an external component (like a Stack).
32
- *
33
- * ```tsx
34
- * <WizardPopover triggerElement={<Button>Click me</Button>}>
35
- * <Text>First step</Text>
36
- * <Text>Second step</Text>
37
- * <Stack>
38
- * <Text>Third step is special.</Text>
39
- * <Text>It even has several paragraphs 🤯</Text>
40
- * </Stack>
41
- * </WizardPopover>
42
- * ```
43
- */
44
- export const WizardPopover = ({
45
- children,
46
- triggerElement,
47
- withCloseButton = false,
48
- }: WizardPopoverProps) => {
49
- return (
50
- <DarkMode>
51
- <Popover size="lg">
52
- <PopoverTrigger>{triggerElement}</PopoverTrigger>
53
- <PopoverContent>
54
- <PopoverArrow />
55
- {withCloseButton && <PopoverCloseButton />}
56
- <PopoverWizardBody>{children}</PopoverWizardBody>
57
- </PopoverContent>
58
- </Popover>
59
- </DarkMode>
60
- );
61
- };
@@ -1,23 +0,0 @@
1
- export {
2
- Popover,
3
- PopoverAnchor,
4
- PopoverArrow,
5
- PopoverBody,
6
- PopoverCloseButton,
7
- PopoverContent,
8
- PopoverFooter,
9
- PopoverHeader,
10
- PopoverTrigger,
11
- } from "@chakra-ui/react";
12
- export type {
13
- PopoverArrowProps,
14
- PopoverBodyProps,
15
- PopoverCloseButtonProps,
16
- PopoverContentProps,
17
- PopoverFooterProps,
18
- PopoverHeaderProps,
19
- PopoverProps,
20
- } from "@chakra-ui/react";
21
- export * from "./PopoverWizardBody";
22
- export * from "./SimplePopover";
23
- export * from "./WizardPopover";