@bigbinary/neeto-molecules 1.5.0-beta.0 → 1.6.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.
- package/README.md +1 -0
- package/dist/Builder.js +28 -17
- package/dist/Builder.js.map +1 -1
- package/dist/CalendarView.js +2 -0
- package/dist/CalendarView.js.map +1 -1
- package/dist/FloatingActionMenu.js +1840 -0
- package/dist/FloatingActionMenu.js.map +1 -0
- package/dist/HelpPopover.js +74 -0
- package/dist/HelpPopover.js.map +1 -0
- package/dist/NavigationHeader.js +18 -48
- package/dist/NavigationHeader.js.map +1 -1
- package/dist/Onboarding.js +1319 -0
- package/dist/Onboarding.js.map +1 -0
- package/dist/Rename.js +13 -45
- package/dist/Rename.js.map +1 -1
- package/dist/Sidebar.js +11 -10
- package/dist/Sidebar.js.map +1 -1
- package/dist/cjs/Builder.js +28 -17
- package/dist/cjs/Builder.js.map +1 -1
- package/dist/cjs/CalendarView.js +2 -0
- package/dist/cjs/CalendarView.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +1867 -0
- package/dist/cjs/FloatingActionMenu.js.map +1 -0
- package/dist/cjs/HelpPopover.js +80 -0
- package/dist/cjs/HelpPopover.js.map +1 -0
- package/dist/cjs/NavigationHeader.js +17 -47
- package/dist/cjs/NavigationHeader.js.map +1 -1
- package/dist/cjs/Onboarding.js +1329 -0
- package/dist/cjs/Onboarding.js.map +1 -0
- package/dist/cjs/Rename.js +12 -44
- package/dist/cjs/Rename.js.map +1 -1
- package/dist/cjs/Sidebar.js +11 -10
- package/dist/cjs/Sidebar.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +5 -0
- package/types/Builder.d.ts +3 -1
- package/types/FloatingActionMenu.d.ts +55 -0
- package/types/HelpPopover.d.ts +39 -0
- package/types/NavigationHeader.d.ts +3 -1
- package/types/Onboarding.d.ts +87 -0
- package/types/Sidebar.d.ts +4 -31
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonProps } from "@bigbinary/neetoui";
|
|
3
|
+
interface OnboardingScreen {
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
buttonProps: ButtonProps;
|
|
7
|
+
className: string;
|
|
8
|
+
}
|
|
9
|
+
;
|
|
10
|
+
export
|
|
11
|
+
/**
|
|
12
|
+
*
|
|
13
|
+
* WelcomeScreen is used to show a welcome screen in the onboarding flow of
|
|
14
|
+
*
|
|
15
|
+
* neeto.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
*
|
|
19
|
+
* import {
|
|
20
|
+
* WelcomeScreen,
|
|
21
|
+
* CompletedScreen,
|
|
22
|
+
* } from "@bigbinary/neeto-molecules/Onboarding";
|
|
23
|
+
*
|
|
24
|
+
* const Onboarding = () => {
|
|
25
|
+
* const [currentStep, setCurrentStep] = useState(ONBOARDING_STEPS.WELCOME);
|
|
26
|
+
*
|
|
27
|
+
* return (
|
|
28
|
+
* <>
|
|
29
|
+
* {currentStep === ONBOARDING_STEPS.WELCOME && (
|
|
30
|
+
* <WelcomeScreen
|
|
31
|
+
* title="Welcome to neetoDesk"
|
|
32
|
+
* description="Let's customize neetoDesk so that it meets your needs."
|
|
33
|
+
* />
|
|
34
|
+
* )}
|
|
35
|
+
* {currentStep === ONBOARDING_STEPS.COMPLETED && (
|
|
36
|
+
* <CompletedScreen
|
|
37
|
+
* title="Your neetoDesk is ready."
|
|
38
|
+
* description="If you have any question at any time you can click on the help icon on the left hand side and have a 'live chat' with us."
|
|
39
|
+
* buttonProps={{ label: "Start using neetoDesk" }}
|
|
40
|
+
* />
|
|
41
|
+
* )}
|
|
42
|
+
* </>
|
|
43
|
+
* );
|
|
44
|
+
* };
|
|
45
|
+
* @endexample
|
|
46
|
+
*/
|
|
47
|
+
const WelcomeScreen: React.FC<OnboardingScreen>;
|
|
48
|
+
export
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* CompletedScreen is used to show a completed screen in the onboarding flow of
|
|
52
|
+
*
|
|
53
|
+
* neeto.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
*
|
|
57
|
+
* import {
|
|
58
|
+
* WelcomeScreen,
|
|
59
|
+
* CompletedScreen,
|
|
60
|
+
* } from "@bigbinary/neeto-molecules/Onboarding";
|
|
61
|
+
*
|
|
62
|
+
* const Onboarding = () => {
|
|
63
|
+
* const [currentStep, setCurrentStep] = useState(ONBOARDING_STEPS.WELCOME);
|
|
64
|
+
*
|
|
65
|
+
* return (
|
|
66
|
+
* <>
|
|
67
|
+
* {currentStep === ONBOARDING_STEPS.WELCOME && (
|
|
68
|
+
* <WelcomeScreen
|
|
69
|
+
* title="Welcome to neetoDesk"
|
|
70
|
+
* description="Let's customize neetoDesk so that it meets your needs."
|
|
71
|
+
* />
|
|
72
|
+
* )}
|
|
73
|
+
* {currentStep === ONBOARDING_STEPS.COMPLETED && (
|
|
74
|
+
* <CompletedScreen
|
|
75
|
+
* title="Your neetoDesk is ready."
|
|
76
|
+
* description="If you have any question at any time you can click on the help icon on the left hand side and have a 'live chat' with us."
|
|
77
|
+
* buttonProps={{ label: "Start using neetoDesk" }}
|
|
78
|
+
* />
|
|
79
|
+
* )}
|
|
80
|
+
* </>
|
|
81
|
+
* );
|
|
82
|
+
* };
|
|
83
|
+
* @endexample
|
|
84
|
+
*/
|
|
85
|
+
const CompletedScreen: React.FC<{
|
|
86
|
+
children: React.ReactNode;
|
|
87
|
+
}> & OnboardingScreen;
|
package/types/Sidebar.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NavLinkProps } from "react-router-dom";
|
|
3
|
-
import { AvatarProps } from "@bigbinary/neetoui";
|
|
4
3
|
type NavLinkItemType = {
|
|
5
4
|
to: string;
|
|
6
5
|
label?: React.ReactNode;
|
|
@@ -8,35 +7,13 @@ type NavLinkItemType = {
|
|
|
8
7
|
description?: React.ReactNode;
|
|
9
8
|
isActive: () => boolean;
|
|
10
9
|
} & React.PropsWithoutRef<NavLinkProps<any>> & React.RefAttributes<HTMLAnchorElement>;
|
|
11
|
-
type LinkType = {
|
|
12
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
13
|
-
label?: React.ReactNode;
|
|
14
|
-
icon?: any;
|
|
15
|
-
} & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
|
16
|
-
interface ProfileInfo {
|
|
17
|
-
name?: string;
|
|
18
|
-
email?: string;
|
|
19
|
-
topLinks?: LinkType[];
|
|
20
|
-
bottomLinks?: LinkType[];
|
|
21
|
-
customContent?: React.ReactNode;
|
|
22
|
-
changelogProps?: LinkType;
|
|
23
|
-
helpProps?: LinkType;
|
|
24
|
-
}
|
|
25
|
-
interface HelpLinks {
|
|
26
|
-
liveChatProps?: LinkType;
|
|
27
|
-
helpCenterProps?: LinkType;
|
|
28
|
-
changelogProps?: ChangeLogPropsType;
|
|
29
|
-
keyboardShortcutProps?: LinkType;
|
|
30
|
-
}
|
|
31
10
|
/**
|
|
32
11
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* app switcher etc. App switcher UI & Changelog display UI are all implemented
|
|
12
|
+
* The Sidebar component is used in neeto products for showing navigation links
|
|
36
13
|
*
|
|
37
|
-
*
|
|
14
|
+
* that take the user to different parts of the app. The sidebar is collapsible and
|
|
38
15
|
*
|
|
39
|
-
*
|
|
16
|
+
* can be toggled by clicking on the chevron icon.
|
|
40
17
|
*
|
|
41
18
|
* @example
|
|
42
19
|
*
|
|
@@ -47,7 +24,7 @@ interface HelpLinks {
|
|
|
47
24
|
* // custom app logic
|
|
48
25
|
* return (
|
|
49
26
|
* <div>
|
|
50
|
-
* <Sidebar
|
|
27
|
+
* <Sidebar navLinks={SIDEBAR_LINKS} />
|
|
51
28
|
* {children}
|
|
52
29
|
* </div>
|
|
53
30
|
* );
|
|
@@ -56,10 +33,6 @@ interface HelpLinks {
|
|
|
56
33
|
*/
|
|
57
34
|
const Sidebar: React.FC<{
|
|
58
35
|
navLinks?: NavLinkItemType[];
|
|
59
|
-
profileInfoOverrides?: ProfileInfo & AvatarProps;
|
|
60
|
-
helpLinkOverrides?: HelpLinks;
|
|
61
|
-
extraTopLinks?: LinkType[];
|
|
62
|
-
showAppSwitcher?: boolean;
|
|
63
36
|
customLogo?: any;
|
|
64
37
|
}>;
|
|
65
38
|
export default Sidebar;
|