@camunda/camunda-composite-components 0.0.41 → 0.0.42
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 +2 -1
- package/lib/esm/api/api.d.ts +19 -19
- package/lib/esm/api/api.js +65 -67
- package/lib/esm/api/endpoints.const.d.ts +12 -12
- package/lib/esm/api/endpoints.const.js +24 -25
- package/lib/esm/api/jwt.utils.d.ts +3 -3
- package/lib/esm/api/jwt.utils.js +23 -21
- package/lib/esm/api/notifications.d.ts +64 -35
- package/lib/esm/api/notifications.js +168 -159
- package/lib/esm/components/c3-empty-state/c3-empty-state.d.ts +8 -2
- package/lib/esm/components/c3-empty-state/c3-empty-state.js +58 -17
- package/lib/esm/components/c3-empty-state/c3-empty-state.types.d.ts +19 -19
- package/lib/esm/components/c3-empty-state/c3-empty-state.types.js +1 -1
- package/lib/esm/components/c3-navigation/c3-info-button.d.ts +3 -3
- package/lib/esm/components/c3-navigation/c3-info-button.js +13 -5
- package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.d.ts +5 -5
- package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.js +21 -8
- package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.d.ts +5 -5
- package/lib/esm/components/c3-navigation/c3-navigation-actions/c3-action-buttons.types.js +1 -1
- package/lib/esm/components/c3-navigation/c3-navigation-appbar.d.ts +3 -3
- package/lib/esm/components/c3-navigation/c3-navigation-appbar.js +157 -68
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.d.ts +5 -5
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-info-sidebar.js +58 -37
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.d.ts +9 -9
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar-element.js +56 -33
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.d.ts +8 -8
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.js +114 -54
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.d.ts +70 -60
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-navigation-sidebar.types.js +1 -1
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.d.ts +4 -4
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-notification-sidebar.js +142 -88
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.d.ts +5 -5
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-org-sidebar.js +105 -51
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.d.ts +26 -24
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.js +38 -25
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.d.ts +5 -5
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-user-sidebar.js +125 -43
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/components.d.ts +6 -1
- package/lib/esm/components/c3-navigation/c3-navigation-sidebar/components.js +4 -4
- package/lib/esm/components/c3-navigation/c3-navigation.d.ts +13 -2
- package/lib/esm/components/c3-navigation/c3-navigation.js +210 -88
- package/lib/esm/components/c3-navigation/c3-navigation.types.d.ts +69 -63
- package/lib/esm/components/c3-navigation/c3-navigation.types.js +1 -1
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.d.ts +30 -13
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-container.js +114 -70
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-provider.d.ts +29 -27
- package/lib/esm/components/c3-navigation/c3-notification-provider/c3-notification-provider.js +118 -90
- package/lib/esm/components/c3-navigation/helpers.d.ts +5 -3
- package/lib/esm/components/c3-navigation/helpers.js +53 -49
- package/lib/esm/components/c3-navigation/index.d.ts +4 -2
- package/lib/esm/components/c3-navigation/index.js +3 -3
- package/lib/esm/components/c3-navigation/story-helpers.d.ts +23 -18
- package/lib/esm/components/c3-navigation/story-helpers.js +189 -186
- package/lib/esm/components/c3-navigation/story-templates.d.ts +8 -8
- package/lib/esm/components/c3-navigation/story-templates.js +66 -33
- package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.d.ts +20 -16
- package/lib/esm/components/c3-user-configuration/c3-user-configuration-provider.js +9 -4
- package/lib/esm/icons/c3-icons.d.ts +7 -5
- package/lib/esm/icons/c3-icons.js +82 -14
- package/lib/esm/icons/c3-icons.types.d.ts +1 -1
- package/lib/esm/icons/c3-icons.types.js +1 -1
- package/lib/esm/index.d.ts +14 -9
- package/lib/esm/index.js +4 -4
- package/package.json +2 -1
|
@@ -1,52 +1,106 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import { Button, FormLabel } from "@carbon/react"
|
|
3
|
-
import { Enterprise } from "@carbon/react/icons"
|
|
4
|
-
import C3NavigationSideBar from "./c3-navigation-sidebar"
|
|
5
|
-
import { SwitcherDivider } from "./components"
|
|
6
|
-
import { useOrgSidebarState } from "./c3-sidebar-state-provider"
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Button, FormLabel } from "@carbon/react"
|
|
3
|
+
import { Enterprise } from "@carbon/react/icons"
|
|
4
|
+
import C3NavigationSideBar from "./c3-navigation-sidebar"
|
|
5
|
+
import { SwitcherDivider } from "./components"
|
|
6
|
+
import { useOrgSidebarState } from "./c3-sidebar-state-provider"
|
|
7
7
|
const C3OrgSidebar = ({ sideBar }) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
8
|
+
const { customElements, ...sideBarProps } = sideBar
|
|
9
|
+
const activeOrganization = customElements?.activeOrganization
|
|
10
|
+
const { isOpen, setIsOpen } = useOrgSidebarState()
|
|
11
|
+
const itemTabIndex = isOpen ? undefined : -1
|
|
12
|
+
return React.createElement(
|
|
13
|
+
C3NavigationSideBar,
|
|
14
|
+
{
|
|
15
|
+
sideBar: {
|
|
16
|
+
...sideBarProps,
|
|
17
|
+
ariaLabel: sideBarProps.ariaLabel || "Organization Sidebars",
|
|
18
|
+
},
|
|
19
|
+
icon: React.createElement(Enterprise, { size: 20 }),
|
|
20
|
+
},
|
|
21
|
+
activeOrganization &&
|
|
22
|
+
React.createElement(
|
|
23
|
+
React.Fragment,
|
|
24
|
+
null,
|
|
25
|
+
React.createElement(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
style: {
|
|
29
|
+
padding: "1rem",
|
|
30
|
+
paddingTop: "1.5rem",
|
|
31
|
+
paddingBottom: ".5rem",
|
|
32
|
+
display: "grid",
|
|
33
|
+
gridAutoFlow: "column",
|
|
34
|
+
gap: ".25rem",
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
React.createElement(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
style: {
|
|
41
|
+
overflow: "hidden",
|
|
42
|
+
display: "grid",
|
|
43
|
+
gap: "4px",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
React.createElement(
|
|
47
|
+
FormLabel,
|
|
48
|
+
null,
|
|
49
|
+
activeOrganization.activeLabel,
|
|
50
|
+
),
|
|
51
|
+
React.createElement(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
className: "textPrimary",
|
|
55
|
+
style: {
|
|
56
|
+
height: "20px",
|
|
57
|
+
lineHeight: "20px",
|
|
58
|
+
fontSize: "14px",
|
|
59
|
+
textOverflow: "ellipsis",
|
|
60
|
+
overflow: "hidden",
|
|
61
|
+
whiteSpace: "nowrap",
|
|
62
|
+
},
|
|
63
|
+
title: activeOrganization.orgName,
|
|
64
|
+
},
|
|
65
|
+
activeOrganization.orgName,
|
|
66
|
+
),
|
|
67
|
+
),
|
|
68
|
+
React.createElement(
|
|
69
|
+
Button,
|
|
70
|
+
{
|
|
71
|
+
size: "md",
|
|
72
|
+
kind: "ghost",
|
|
73
|
+
key: "org-management",
|
|
74
|
+
onClick: () => {
|
|
75
|
+
activeOrganization.action.onClick()
|
|
76
|
+
if (sideBar.closeOnClick !== false) {
|
|
77
|
+
setIsOpen(false)
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
tabIndex: itemTabIndex,
|
|
81
|
+
},
|
|
82
|
+
activeOrganization.action.label,
|
|
83
|
+
),
|
|
84
|
+
),
|
|
85
|
+
sideBar.elements &&
|
|
86
|
+
sideBar.elements.length > 0 &&
|
|
87
|
+
React.createElement(
|
|
88
|
+
React.Fragment,
|
|
89
|
+
null,
|
|
90
|
+
React.createElement(SwitcherDivider, null),
|
|
91
|
+
React.createElement(
|
|
92
|
+
FormLabel,
|
|
93
|
+
{
|
|
94
|
+
style: {
|
|
95
|
+
paddingTop: ".5rem",
|
|
96
|
+
paddingLeft: "1rem",
|
|
97
|
+
paddingBottom: ".25rem",
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
activeOrganization.otherLabel,
|
|
101
|
+
),
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
export default C3OrgSidebar
|
package/lib/esm/components/c3-navigation/c3-navigation-sidebar/c3-sidebar-state-provider.d.ts
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import React, { FC } from "react"
|
|
1
|
+
import React, { FC } from "react"
|
|
2
2
|
declare type DefaultValues = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
3
|
+
isNotificationSidebarOpen?: boolean
|
|
4
|
+
isOrgSidebarOpen?: boolean
|
|
5
|
+
isInfoSidebarOpen?: boolean
|
|
6
|
+
isUserSidebarOpen?: boolean
|
|
7
|
+
}
|
|
8
8
|
declare type SideBarState = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
9
|
+
isOpen: boolean
|
|
10
|
+
setIsOpen: (isOpen: boolean) => void
|
|
11
|
+
}
|
|
12
12
|
declare type C3SidebarsState = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
export declare const C3SidebarStateContext: React.Context<C3SidebarsState | null
|
|
19
|
-
export declare const C3SidebarStateProvider: FC<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export
|
|
13
|
+
notifications: SideBarState
|
|
14
|
+
org: SideBarState
|
|
15
|
+
info: SideBarState
|
|
16
|
+
user: SideBarState
|
|
17
|
+
}
|
|
18
|
+
export declare const C3SidebarStateContext: React.Context<C3SidebarsState | null>
|
|
19
|
+
export declare const C3SidebarStateProvider: FC<
|
|
20
|
+
DefaultValues & {
|
|
21
|
+
children?: React.ReactNode
|
|
22
|
+
}
|
|
23
|
+
>
|
|
24
|
+
export declare const useSidebarState: () => C3SidebarsState
|
|
25
|
+
export declare const useNotificationSidebarState: () => SideBarState
|
|
26
|
+
export declare const useOrgSidebarState: () => SideBarState
|
|
27
|
+
export declare const useInfoSidebarState: () => SideBarState
|
|
28
|
+
export declare const useUserSidebarState: () => SideBarState
|
|
29
|
+
export {}
|
|
@@ -1,27 +1,40 @@
|
|
|
1
|
-
import React, { useContext, useState } from "react"
|
|
2
|
-
export const C3SidebarStateContext = React.createContext(null)
|
|
1
|
+
import React, { useContext, useState } from "react"
|
|
2
|
+
export const C3SidebarStateContext = React.createContext(null)
|
|
3
3
|
export const C3SidebarStateProvider = ({ children, ...value }) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const [isNotificationSidebarOpen, setIsNotificationSidebarOpen] = useState(
|
|
5
|
+
value.isNotificationSidebarOpen || false,
|
|
6
|
+
)
|
|
7
|
+
const [isOrgSidebarOpen, setIsOrgSidebarOpen] = useState(
|
|
8
|
+
value.isOrgSidebarOpen || false,
|
|
9
|
+
)
|
|
10
|
+
const [isInfoSidebarOpen, setIsInfoSidebarOpen] = useState(
|
|
11
|
+
value.isInfoSidebarOpen || false,
|
|
12
|
+
)
|
|
13
|
+
const [isUserSidebarOpen, setIsUserSidebarOpen] = useState(
|
|
14
|
+
value.isUserSidebarOpen || false,
|
|
15
|
+
)
|
|
16
|
+
return React.createElement(
|
|
17
|
+
C3SidebarStateContext.Provider,
|
|
18
|
+
{
|
|
19
|
+
value: {
|
|
20
|
+
notifications: {
|
|
21
|
+
isOpen: isNotificationSidebarOpen,
|
|
22
|
+
setIsOpen: setIsNotificationSidebarOpen,
|
|
23
|
+
},
|
|
24
|
+
org: { isOpen: isOrgSidebarOpen, setIsOpen: setIsOrgSidebarOpen },
|
|
25
|
+
info: { isOpen: isInfoSidebarOpen, setIsOpen: setIsInfoSidebarOpen },
|
|
26
|
+
user: { isOpen: isUserSidebarOpen, setIsOpen: setIsUserSidebarOpen },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
children,
|
|
30
|
+
)
|
|
31
|
+
}
|
|
18
32
|
export const useSidebarState = () => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const useUserSidebarState = () => useSidebarState().user;
|
|
33
|
+
const value = useContext(C3SidebarStateContext)
|
|
34
|
+
if (!value) throw new Error("No C3SidebarStateContextProvider found.")
|
|
35
|
+
return value
|
|
36
|
+
}
|
|
37
|
+
export const useNotificationSidebarState = () => useSidebarState().notifications
|
|
38
|
+
export const useOrgSidebarState = () => useSidebarState().org
|
|
39
|
+
export const useInfoSidebarState = () => useSidebarState().info
|
|
40
|
+
export const useUserSidebarState = () => useSidebarState().user
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from "react"
|
|
2
|
-
import { C3NavigationUserSideBarProps } from "./c3-navigation-sidebar.types"
|
|
1
|
+
import { FC } from "react"
|
|
2
|
+
import { C3NavigationUserSideBarProps } from "./c3-navigation-sidebar.types"
|
|
3
3
|
declare const C3UserSidebar: FC<{
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export default C3UserSidebar
|
|
4
|
+
sideBar: C3NavigationUserSideBarProps
|
|
5
|
+
}>
|
|
6
|
+
export default C3UserSidebar
|
|
@@ -1,44 +1,126 @@
|
|
|
1
|
-
import React from "react"
|
|
2
|
-
import C3NavigationSideBar from "./c3-navigation-sidebar"
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React from "react"
|
|
2
|
+
import C3NavigationSideBar from "./c3-navigation-sidebar"
|
|
3
|
+
import {
|
|
4
|
+
FormLabel,
|
|
5
|
+
RadioButton,
|
|
6
|
+
RadioButtonGroup,
|
|
7
|
+
Stack,
|
|
8
|
+
SwitcherDivider,
|
|
9
|
+
Toggle,
|
|
10
|
+
} from "@carbon/react"
|
|
11
|
+
import { UserAvatar } from "@carbon/react/icons"
|
|
12
|
+
import { useUserSidebarState } from "./c3-sidebar-state-provider"
|
|
6
13
|
const C3UserSidebar = ({ sideBar }) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
|
|
14
|
+
const { customElements, ...sideBarProps } = sideBar
|
|
15
|
+
const profile = customElements?.profile
|
|
16
|
+
const themeSelector = customElements?.themeSelector
|
|
17
|
+
const stageToggle = customElements?.stageToggle
|
|
18
|
+
const customSection = customElements?.customSection
|
|
19
|
+
const { isOpen } = useUserSidebarState()
|
|
20
|
+
const itemTabIndex = isOpen ? undefined : -1
|
|
21
|
+
return React.createElement(
|
|
22
|
+
C3NavigationSideBar,
|
|
23
|
+
{
|
|
24
|
+
sideBar: {
|
|
25
|
+
...sideBarProps,
|
|
26
|
+
ariaLabel: sideBarProps.ariaLabel || "User Sidebar",
|
|
27
|
+
},
|
|
28
|
+
icon: React.createElement(UserAvatar, { size: 20 }),
|
|
29
|
+
bottomChildren: customSection,
|
|
30
|
+
},
|
|
31
|
+
profile &&
|
|
32
|
+
React.createElement(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
padding: "1rem",
|
|
37
|
+
paddingTop: "1.5rem",
|
|
38
|
+
paddingBottom: ".5rem",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
React.createElement(
|
|
42
|
+
Stack,
|
|
43
|
+
{ gap: 2 },
|
|
44
|
+
React.createElement(FormLabel, null, profile.label),
|
|
45
|
+
React.createElement(
|
|
46
|
+
Stack,
|
|
47
|
+
null,
|
|
48
|
+
React.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{ className: "textPrimary", style: { fontSize: "14px" } },
|
|
51
|
+
profile.user.name,
|
|
52
|
+
),
|
|
53
|
+
React.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{ className: "textPrimary", style: { fontSize: "12px" } },
|
|
56
|
+
profile.user.email,
|
|
57
|
+
),
|
|
58
|
+
),
|
|
59
|
+
),
|
|
60
|
+
),
|
|
61
|
+
themeSelector &&
|
|
62
|
+
React.createElement(
|
|
63
|
+
React.Fragment,
|
|
64
|
+
null,
|
|
65
|
+
React.createElement(SwitcherDivider, null),
|
|
66
|
+
React.createElement(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
style: {
|
|
70
|
+
padding: ".5rem 1rem",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
React.createElement(
|
|
74
|
+
RadioButtonGroup,
|
|
75
|
+
{
|
|
76
|
+
name: "theme-radio-group",
|
|
77
|
+
defaultSelected: themeSelector.currentTheme,
|
|
78
|
+
legendText: "Theme",
|
|
79
|
+
orientation: "vertical",
|
|
80
|
+
onChange: (newValue) => {
|
|
81
|
+
themeSelector.onChange(newValue)
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
React.createElement(RadioButton, {
|
|
85
|
+
id: "light",
|
|
86
|
+
labelText: "Light",
|
|
87
|
+
value: "light",
|
|
88
|
+
tabIndex: itemTabIndex,
|
|
89
|
+
}),
|
|
90
|
+
React.createElement(RadioButton, {
|
|
91
|
+
id: "system",
|
|
92
|
+
labelText: "System",
|
|
93
|
+
value: "system",
|
|
94
|
+
tabIndex: itemTabIndex,
|
|
95
|
+
}),
|
|
96
|
+
React.createElement(RadioButton, {
|
|
97
|
+
id: "dark",
|
|
98
|
+
labelText: "Dark",
|
|
99
|
+
value: "dark",
|
|
100
|
+
tabIndex: itemTabIndex,
|
|
101
|
+
}),
|
|
102
|
+
),
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
|
+
stageToggle &&
|
|
106
|
+
React.createElement(
|
|
107
|
+
React.Fragment,
|
|
108
|
+
null,
|
|
109
|
+
React.createElement(SwitcherDivider, null),
|
|
110
|
+
React.createElement(
|
|
111
|
+
"div",
|
|
112
|
+
{ style: { padding: ".5rem 1rem" } },
|
|
113
|
+
React.createElement(Toggle, {
|
|
114
|
+
size: "sm",
|
|
115
|
+
id: "toggle-productionfeatures",
|
|
116
|
+
defaultToggled: stageToggle.prodFeaturesEnabled,
|
|
117
|
+
onClick: stageToggle.toggle,
|
|
118
|
+
labelText: "Simulate Production Features",
|
|
119
|
+
tabIndex: itemTabIndex,
|
|
120
|
+
"aria-label": "Simulate Production Features",
|
|
121
|
+
}),
|
|
122
|
+
),
|
|
123
|
+
),
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
export default C3UserSidebar
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
/// <reference path="../../../../../src/carbon.d.ts" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
|
-
export declare const SwitcherDivider: import("styled-components").StyledComponent<
|
|
3
|
+
export declare const SwitcherDivider: import("styled-components").StyledComponent<
|
|
4
|
+
import("react").FC<import("@carbon/react").SwitcherDividerProps>,
|
|
5
|
+
any,
|
|
6
|
+
{},
|
|
7
|
+
never
|
|
8
|
+
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SwitcherDivider as CarbonSwitcherDivider } from "@carbon/react"
|
|
2
|
-
import styled from "styled-components"
|
|
3
|
-
export const SwitcherDivider = styled(CarbonSwitcherDivider)
|
|
1
|
+
import { SwitcherDivider as CarbonSwitcherDivider } from "@carbon/react"
|
|
2
|
+
import styled from "styled-components"
|
|
3
|
+
export const SwitcherDivider = styled(CarbonSwitcherDivider)`
|
|
4
4
|
margin: auto;
|
|
5
|
-
|
|
5
|
+
`
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { C3NavigationProps } from "./c3-navigation.types"
|
|
3
|
-
export declare const C3Navigation: ({
|
|
2
|
+
import { C3NavigationProps } from "./c3-navigation.types"
|
|
3
|
+
export declare const C3Navigation: ({
|
|
4
|
+
app,
|
|
5
|
+
appBar,
|
|
6
|
+
forwardRef,
|
|
7
|
+
navbar,
|
|
8
|
+
orgSideBar,
|
|
9
|
+
infoSideBar,
|
|
10
|
+
infoButton,
|
|
11
|
+
actionButtons,
|
|
12
|
+
userSideBar,
|
|
13
|
+
notificationSideBar,
|
|
14
|
+
}: C3NavigationProps) => JSX.Element
|