@planningcenter/topbar 8.4.0-alpha.0 → 8.4.0-alpha.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.
Files changed (104) hide show
  1. package/README.md +56 -0
  2. package/dist/modules/api_request.d.ts +5 -0
  3. package/dist/modules/colors.d.ts +46 -0
  4. package/dist/modules/components/apps_button.d.ts +10 -0
  5. package/dist/modules/components/conditional_wrap.d.ts +7 -0
  6. package/dist/modules/components/eyebrow.d.ts +6 -0
  7. package/dist/modules/components/hoverable.d.ts +11 -0
  8. package/dist/modules/components/notification_bell.d.ts +6 -0
  9. package/dist/modules/components/notification_item.d.ts +11 -0
  10. package/dist/modules/components/notifications_menu.d.ts +19 -0
  11. package/dist/modules/components/notifications_menu_blank_state.d.ts +8 -0
  12. package/dist/modules/components/notifications_menu_wrapper.d.ts +7 -0
  13. package/dist/modules/components/outsider.d.ts +1 -1
  14. package/dist/modules/components/popup_root.d.ts +6 -0
  15. package/dist/modules/components/spinner.d.ts +4 -0
  16. package/dist/modules/hooks/use_hover.d.ts +3 -0
  17. package/dist/modules/hooks/use_notifications.d.ts +15 -0
  18. package/dist/modules/medium_topbar.d.ts +34 -38
  19. package/dist/modules/mono_app_text.d.ts +5 -0
  20. package/dist/modules/not_small_topbar.d.ts +39 -82
  21. package/dist/modules/small_topbar.d.ts +39 -42
  22. package/dist/modules/symbols.d.ts +34 -8
  23. package/dist/topbar.css +1 -1
  24. package/dist/topbar.css.map +1 -1
  25. package/dist/topbar.js +1 -1
  26. package/dist/topbar.js.map +1 -1
  27. package/dist/topbar.modern.js +1 -1
  28. package/dist/topbar.modern.js.map +1 -1
  29. package/dist/topbar.module.js +1 -1
  30. package/dist/topbar.module.js.map +1 -1
  31. package/dist/topbar.umd.js +1 -1
  32. package/dist/topbar.umd.js.map +1 -1
  33. package/dist/types/modules/apps_provider.d.ts +3 -13
  34. package/dist/types/modules/apps_provider.d.ts.map +1 -1
  35. package/dist/types/modules/colors.d.ts +3 -0
  36. package/dist/types/modules/colors.d.ts.map +1 -1
  37. package/dist/types/modules/components/hoverable.d.ts +1 -1
  38. package/dist/types/modules/components/hoverable.d.ts.map +1 -1
  39. package/dist/types/modules/components/notification_item.d.ts.map +1 -1
  40. package/dist/types/modules/components/notifications_menu.d.ts +2 -9
  41. package/dist/types/modules/components/notifications_menu.d.ts.map +1 -1
  42. package/dist/types/modules/components/notifications_menu_blank_state.d.ts +2 -1
  43. package/dist/types/modules/components/notifications_menu_blank_state.d.ts.map +1 -1
  44. package/dist/types/modules/connected_people_provider.d.ts +4 -3
  45. package/dist/types/modules/connected_people_provider.d.ts.map +1 -1
  46. package/dist/types/modules/dummy_data.d.ts +4 -0
  47. package/dist/types/modules/dummy_data.d.ts.map +1 -0
  48. package/dist/types/modules/get_login_profile_path.d.ts +2 -2
  49. package/dist/types/modules/get_login_profile_path.d.ts.map +1 -1
  50. package/dist/types/modules/hooks/use_local_notifications.d.ts +9 -0
  51. package/dist/types/modules/hooks/use_local_notifications.d.ts.map +1 -0
  52. package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
  53. package/dist/types/modules/hooks/use_store.d.ts +3 -0
  54. package/dist/types/modules/hooks/use_store.d.ts.map +1 -0
  55. package/dist/types/modules/mfa_status.d.ts.map +1 -1
  56. package/dist/types/modules/mono_app_icon.d.ts.map +1 -1
  57. package/dist/types/modules/not_small_topbar/helpdesk_trigger.d.ts +4 -0
  58. package/dist/types/modules/not_small_topbar/helpdesk_trigger.d.ts.map +1 -0
  59. package/dist/types/modules/not_small_topbar/index.d.ts +0 -1
  60. package/dist/types/modules/not_small_topbar/index.d.ts.map +1 -1
  61. package/dist/types/modules/not_small_topbar/user_menu.d.ts +23 -0
  62. package/dist/types/modules/not_small_topbar/user_menu.d.ts.map +1 -0
  63. package/dist/types/modules/not_small_topbar/user_menu_trigger.d.ts +16 -0
  64. package/dist/types/modules/not_small_topbar/user_menu_trigger.d.ts.map +1 -0
  65. package/dist/types/modules/not_small_topbar.d.ts.map +1 -1
  66. package/dist/types/modules/small_topbar/account_settings_link.d.ts +5 -0
  67. package/dist/types/modules/small_topbar/account_settings_link.d.ts.map +1 -0
  68. package/dist/types/modules/small_topbar/close_menu_button.d.ts +6 -0
  69. package/dist/types/modules/small_topbar/close_menu_button.d.ts.map +1 -0
  70. package/dist/types/modules/small_topbar/index.d.ts +17 -0
  71. package/dist/types/modules/small_topbar/index.d.ts.map +1 -0
  72. package/dist/types/modules/small_topbar/linked_accounts.d.ts +11 -0
  73. package/dist/types/modules/small_topbar/linked_accounts.d.ts.map +1 -0
  74. package/dist/types/modules/small_topbar/login_settings_link.d.ts +9 -0
  75. package/dist/types/modules/small_topbar/login_settings_link.d.ts.map +1 -0
  76. package/dist/types/modules/small_topbar/profile_link.d.ts +5 -0
  77. package/dist/types/modules/small_topbar/profile_link.d.ts.map +1 -0
  78. package/dist/types/modules/small_topbar/user_info.d.ts +13 -0
  79. package/dist/types/modules/small_topbar/user_info.d.ts.map +1 -0
  80. package/dist/types/modules/small_topbar/user_menu_trigger.d.ts +9 -0
  81. package/dist/types/modules/small_topbar/user_menu_trigger.d.ts.map +1 -0
  82. package/dist/types/modules/small_topbar/user_name.d.ts +5 -0
  83. package/dist/types/modules/small_topbar/user_name.d.ts.map +1 -0
  84. package/dist/types/modules/small_topbar.d.ts.map +1 -1
  85. package/dist/types/modules/symbols.d.ts +2 -1
  86. package/dist/types/modules/symbols.d.ts.map +1 -1
  87. package/dist/types/modules/theme.d.ts +5 -0
  88. package/dist/types/modules/theme.d.ts.map +1 -0
  89. package/dist/types/modules/toolbar/components/index.d.ts +1 -0
  90. package/dist/types/modules/toolbar/components/index.d.ts.map +1 -1
  91. package/dist/types/modules/toolbar/components/switch_view.d.ts +8 -0
  92. package/dist/types/modules/toolbar/components/switch_view.d.ts.map +1 -0
  93. package/dist/types/modules/toolbar/hooks/use-toolbar-reducer.d.ts +1 -1
  94. package/dist/types/modules/toolbar/hooks/use-toolbar-reducer.d.ts.map +1 -1
  95. package/dist/types/modules/toolbar/index.d.ts +12 -7
  96. package/dist/types/modules/toolbar/index.d.ts.map +1 -1
  97. package/dist/types/modules/toolbar/tools/notifications.d.ts.map +1 -1
  98. package/dist/types/modules/toolbar/useStore.d.ts +3 -0
  99. package/dist/types/modules/toolbar/useStore.d.ts.map +1 -0
  100. package/dist/types/modules/utils.d.ts +1 -0
  101. package/dist/types/modules/utils.d.ts.map +1 -1
  102. package/package.json +12 -4
  103. package/dist/types/modules/toolbar/tools/profile.d.ts +0 -7
  104. package/dist/types/modules/toolbar/tools/profile.d.ts.map +0 -1
package/README.md CHANGED
@@ -114,6 +114,62 @@ If you are passing your own Jolt client object into Topbar via props, you can co
114
114
  If you are relying on Topbar to create its own Jolt connection and would like to enable logging, pass `enableJoltLogging={true}` as a prop to whichever topbar
115
115
  you are using (`SmallTopbar`/`NotSmallTopbar`).
116
116
 
117
+ ## Toolbar
118
+
119
+ Toolbar lives alongside Topbar on the right side of the viewport. It is responsible for the global concerns of Profile, Help Desk, Tasks, Notifications, and Core Messaging.
120
+
121
+ ### Contributing
122
+
123
+ Tool implementations are self-contained modules that live in the `modules/toolbar/tools/` directory.
124
+
125
+ A tool module is required to have a named export which adheres to the following `ToolbarTool` interface.
126
+
127
+ ```ts
128
+ interface ToolbarTool {
129
+ component: unknown // A React component. Stronger typing is in the works.
130
+ icon: string
131
+ name: string
132
+ }
133
+ ```
134
+
135
+ - `component`: the React component that will be rendered into the drawer when the tool is selected.
136
+ - `icon`: the name of the [`tapestry-react` icon](https://planningcenter.github.io/tapestry-react/icon#preview-icons) that will be rendered as the button in Toolbar.
137
+ - `name`: the formal name of the tool. For now, this is only surfaced for accessibility concerns on the tool's toolbar `Button`.
138
+
139
+ ### Example
140
+
141
+ The following example implements an example tool using the shared `DrawerHeader` and `DrawerHeading` components.
142
+
143
+ - `DrawerHeader` handles the placement and styling of the close button.
144
+ - `DrawerHeading` handles the styling of the drawer heading.
145
+
146
+ ```ts
147
+ // tool_name.tsx
148
+
149
+ import { DrawerHeader, DrawerHeading } from "../components"
150
+
151
+ import { ToolbarTool } from "../types"
152
+
153
+ function ToolComponent({ closeDrawer }) {
154
+ return (
155
+ <>
156
+ <DrawerHeader closeDrawer={closeDrawer}>
157
+ <DrawerHeading>Tool name</DrawerHeading>
158
+ </DrawerHeader>
159
+ {/* Tool drawer content implementation */}
160
+ </>
161
+ )
162
+ }
163
+
164
+ const ToolName: ToolbarTool = {
165
+ component: ToolComponent,
166
+ icon: "general.toolbarIconName",
167
+ name: "Tool name",
168
+ }
169
+
170
+ export { ToolName }
171
+ ```
172
+
117
173
  ## Migrate
118
174
 
119
175
  These migration docs will guide you thru the process of updating to recent major releases.
@@ -1,5 +1,10 @@
1
+ import { Environment } from "@planningcenter/url";
1
2
  declare global {
2
3
  interface Window {
4
+ railsEnv?: Environment;
5
+ currentPerson?: {
6
+ id: number;
7
+ };
3
8
  Rails?: {
4
9
  csrfToken: () => string;
5
10
  };
@@ -0,0 +1,46 @@
1
+ declare const colors: {
2
+ danger43: string;
3
+ danger45: string;
4
+ danger47: string;
5
+ danger93: string;
6
+ danger97: string;
7
+ darkNeutral07: string;
8
+ darkNeutral12: string;
9
+ darkNeutral15: string;
10
+ darkNeutral17: string;
11
+ darkNeutral19: string;
12
+ darkNeutral24: string;
13
+ darkNeutral32: string;
14
+ darkNeutral50: string;
15
+ darkNeutral68: string;
16
+ darkNeutral88: string;
17
+ darkNeutral98: string;
18
+ interaction45: string;
19
+ interaction50: string;
20
+ interaction55: string;
21
+ interaction66: string;
22
+ interaction91: string;
23
+ interaction93: string;
24
+ lightNeutral100: string;
25
+ lightNeutral12: string;
26
+ lightNeutral24: string;
27
+ lightNeutral45: string;
28
+ lightNeutral62: string;
29
+ lightNeutral81: string;
30
+ lightNeutral88: string;
31
+ lightNeutral93: string;
32
+ lightNeutral95: string;
33
+ lightNeutral97: string;
34
+ lightNeutral98: string;
35
+ success23: string;
36
+ success25: string;
37
+ success27: string;
38
+ success91: string;
39
+ success97: string;
40
+ warning49: string;
41
+ warning55: string;
42
+ warning63: string;
43
+ warning94: string;
44
+ warning97: string;
45
+ };
46
+ export default colors;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ declare const AppsButton: ({ appName, colors, displayIconOnly, expanded, onClick, style, ...nativeProps }: {
3
+ appName: string;
4
+ colors: any;
5
+ displayIconOnly?: boolean;
6
+ expanded: boolean;
7
+ onClick: any;
8
+ style?: object;
9
+ }) => JSX.Element;
10
+ export default AppsButton;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const ConditionalWrap: ({ children, condition, wrap, ...props }: {
3
+ children: React.ReactNode;
4
+ condition?: boolean;
5
+ wrap: any;
6
+ }) => any;
7
+ export default ConditionalWrap;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ declare const Eyebrow: ({ style, ...props }: {
3
+ children?: React.ReactNode;
4
+ style?: object;
5
+ }) => JSX.Element;
6
+ export default Eyebrow;
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare const Hoverable: ({ active, component: C, hover, style, ...nativeProps }: {
3
+ active?: any;
4
+ children?: React.ReactNode;
5
+ component?: any;
6
+ hover?: any;
7
+ onClick?: any;
8
+ style?: object;
9
+ type?: string;
10
+ }) => JSX.Element;
11
+ export default Hoverable;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const NotificationBell: ({ indicatorVisible, style, ...props }: {
3
+ indicatorVisible?: boolean;
4
+ style?: object;
5
+ }) => JSX.Element;
6
+ export default NotificationBell;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import { Notification } from "../interfaces";
3
+ declare const NotificationItem: ({ mobile, isLast, onMarkAsRead, onToggleRead, showBottomBorder, notification, }: {
4
+ mobile?: boolean;
5
+ isLast?: boolean;
6
+ onMarkAsRead?: (notification: Notification) => any;
7
+ onToggleRead: any;
8
+ showBottomBorder?: boolean;
9
+ notification: Notification;
10
+ }) => JSX.Element;
11
+ export default NotificationItem;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import * as PCO_URL from "@planningcenter/url";
3
+ import { Notification } from "../interfaces";
4
+ declare const NotificationsMenu: ({ env, handleMarkAllAsRead, handleMarkAsRead, handleToggleRead, hasError, isLoading, mobile, notifications: { read, unread }, toggle, visible, }: {
5
+ env: PCO_URL.Environment;
6
+ handleMarkAllAsRead: () => any;
7
+ handleMarkAsRead: (notification: Notification) => any;
8
+ handleToggleRead: (notification: Notification) => any;
9
+ hasError?: boolean;
10
+ isLoading?: boolean;
11
+ mobile?: boolean;
12
+ notifications: {
13
+ read: Notification[];
14
+ unread: Notification[];
15
+ };
16
+ toggle?: any;
17
+ visible?: boolean;
18
+ }) => JSX.Element;
19
+ export default NotificationsMenu;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const NotificationsMenuBlankState: ({ dark, description, style, title, ...props }: {
3
+ dark?: boolean;
4
+ description: string;
5
+ style?: object;
6
+ title?: string;
7
+ }) => JSX.Element;
8
+ export default NotificationsMenuBlankState;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ declare const NotificationsMenuWrapper: ({ children, toggle, visible, ...nativeProps }: {
3
+ children: React.ReactNode;
4
+ toggle: any;
5
+ visible: boolean;
6
+ }) => JSX.Element;
7
+ export default NotificationsMenuWrapper;
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  export default class Outsider extends React.Component<{
3
- component: any;
4
3
  cleanup: boolean;
4
+ component: any;
5
5
  onOutsideClick: any;
6
6
  visible: boolean;
7
7
  }, {}> {
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ declare const PopupRoot: ({ style, ...nativeProps }: {
3
+ children?: React.ReactNode;
4
+ style?: object;
5
+ }) => JSX.Element;
6
+ export default PopupRoot;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import "./spinner.css";
3
+ declare const Spinner: (props: any) => JSX.Element;
4
+ export default Spinner;
@@ -0,0 +1,3 @@
1
+ import { RefObject } from "react";
2
+ declare function useHover<T extends HTMLElement = HTMLElement>(elementRef: RefObject<T>): boolean;
3
+ export default useHover;
@@ -0,0 +1,15 @@
1
+ import * as PCO_URL from "@planningcenter/url";
2
+ import { Notification } from "../interfaces";
3
+ declare const useNotifications: ({ env, userId, }: {
4
+ env: PCO_URL.Environment;
5
+ userId: string;
6
+ }) => {
7
+ handleMarkAllAsRead: () => any;
8
+ handleMarkAsRead: (notification: Notification) => any;
9
+ handleToggleRead: (notification: Notification) => any;
10
+ hasError: boolean;
11
+ isLoading: boolean;
12
+ read: Notification[];
13
+ unread: Notification[];
14
+ };
15
+ export default useNotifications;
@@ -1,46 +1,42 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- export declare class Topbar extends React.Component<{
4
- apps: {
5
- attributes: {
6
- name: string;
7
- url: string;
8
- };
9
- }[];
10
- env: PCO_URL.Environment;
11
- appName: string;
12
- routes: any;
13
- colors: any;
14
- userAvatarPath: string;
15
- userId: string;
16
- userName: string;
17
- orgName: string;
18
- connectedPeople: any;
19
- search?: any;
20
- style?: any;
21
- showOrgName?: boolean;
22
- notifications?: any;
23
- requestAppsFetch: any;
24
- requestConnectedPeopleFetch: any;
25
- requestUnlinkConnectedPeople: any;
26
- requestSwitchConnectedPerson: any;
27
- requestClearAppsCache: any;
28
- requestClearConnectedPeopleCache: any;
29
- linkToProfile?: boolean;
30
- }, {
31
- appsMenuVisible: boolean;
32
- routesMenuVisible: boolean;
33
- userMenuVisible: boolean;
34
- }> {
35
- constructor(props: any);
36
- static defaultProps: {
3
+ declare const Topbar: {
4
+ (props: {
5
+ apps: {
6
+ attributes: {
7
+ name: string;
8
+ url: string;
9
+ };
10
+ }[];
11
+ env: PCO_URL.Environment;
12
+ appName: string;
13
+ routes: any;
14
+ colors: any;
15
+ userAvatarPath: string;
16
+ userId: string;
17
+ userName: string;
18
+ orgName: string;
19
+ connectedPeople: any;
20
+ search?: any;
21
+ style?: any;
22
+ showOrgName?: boolean;
23
+ notifications?: any;
24
+ requestAppsFetch: any;
25
+ requestConnectedPeopleFetch: any;
26
+ requestUnlinkConnectedPeople: any;
27
+ requestSwitchConnectedPerson: any;
28
+ requestClearAppsCache: any;
29
+ requestClearConnectedPeopleCache: any;
30
+ linkToProfile?: boolean;
31
+ }): JSX.Element;
32
+ defaultProps: {
37
33
  currentRouteComponent: (props: any) => JSX.Element;
38
34
  };
39
- render(): JSX.Element;
40
- }
41
- export declare const Route: ({ active, style, name, ...props }: {
35
+ };
36
+ declare const Route: ({ active, style, name, ...props }: {
42
37
  [x: string]: any;
43
38
  active: any;
44
39
  style: any;
45
40
  name?: string;
46
41
  }) => JSX.Element;
42
+ export { Route, Topbar };
@@ -1,4 +1,9 @@
1
1
  /// <reference types="react" />
2
+ export declare function Accounts({ color, size, ...platformProps }: {
3
+ [x: string]: any;
4
+ color: any;
5
+ size?: number;
6
+ }): JSX.Element;
2
7
  export declare function API({ color, size, ...platformProps }: {
3
8
  [x: string]: any;
4
9
  color: any;
@@ -1,91 +1,48 @@
1
1
  import * as React from "react";
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- export declare class AppsButton extends React.Component<{
4
- appName: string;
5
- colors: any;
6
- expanded: boolean;
7
- style?: object;
8
- onClick: any;
9
- displayIconOnly?: boolean;
10
- }, {
11
- entered: boolean;
12
- down: boolean;
13
- }> {
14
- constructor(props: any);
15
- static defaultProps: {
16
- displayIconOnly: boolean;
17
- };
18
- render(): JSX.Element;
19
- }
20
- export declare class Hoverable extends React.Component<{
21
- component?: any;
22
- style?: object;
23
- hover?: any;
24
- active?: any;
25
- type?: string;
26
- onClick?: any;
27
- }, {
28
- entered: boolean;
29
- down: boolean;
30
- }> {
31
- constructor(props: any);
32
- render(): JSX.Element;
33
- }
34
- export declare class Topbar extends React.Component<{
35
- apps: {
36
- attributes: {
37
- name: string;
38
- url: string;
39
- };
40
- }[];
41
- activeRoute: string;
42
- env: PCO_URL.Environment;
43
- appName: string;
44
- routes: any;
45
- colors: any;
46
- userAvatarPath: string;
47
- userId: string;
48
- userName: string;
49
- orgName: string;
50
- connectedPeople: any;
51
- search?: any;
52
- style?: any;
53
- showOrgName?: boolean;
54
- notifications?: any;
55
- requestAppsFetch: any;
56
- requestConnectedPeopleFetch: any;
57
- requestUnlinkConnectedPeople: any;
58
- requestSwitchConnectedPerson: any;
59
- requestClearAppsCache: any;
60
- requestClearConnectedPeopleCache: any;
61
- linkToProfile?: boolean;
62
- onLinkToProfileClick?: () => any;
63
- }, {
64
- appsMenuVisible: boolean;
65
- userMenuVisible: boolean;
66
- routesVisible: boolean;
67
- }> {
68
- static defaultProps: {
69
- notifications: () => any;
3
+ declare const Topbar: {
4
+ (props: {
5
+ apps: {
6
+ attributes: {
7
+ name: string;
8
+ url: string;
9
+ };
10
+ }[];
11
+ activeRoute: string;
12
+ env: PCO_URL.Environment;
13
+ appName: string;
14
+ routes: any;
15
+ colors: any;
16
+ userAvatarPath: string;
17
+ userId: string;
18
+ userName: string;
19
+ orgName: string;
20
+ connectedPeople: any;
21
+ search?: any;
22
+ style?: any;
23
+ showOrgName?: boolean;
24
+ requestAppsFetch: any;
25
+ requestConnectedPeopleFetch: any;
26
+ requestUnlinkConnectedPeople: any;
27
+ requestSwitchConnectedPerson: any;
28
+ requestClearAppsCache: any;
29
+ requestClearConnectedPeopleCache: any;
30
+ useDummyNotifications?: boolean;
31
+ linkToProfile?: boolean;
32
+ onLinkToProfileClick?: () => any;
33
+ }): JSX.Element;
34
+ defaultProps: {
70
35
  search: () => any;
71
36
  linkToProfile: boolean;
72
37
  showOrgName: boolean;
38
+ useDummyNotifications: boolean;
73
39
  };
74
- constructor(props: any);
75
- hideRoutes(): void;
76
- showRoutes(): void;
77
- getTextColor(): any;
78
- render(): JSX.Element;
79
- }
80
- export declare class Route extends React.Component<{
40
+ };
41
+ declare const Route: ({ active, colors, style, ...nativeProps }: {
81
42
  active: boolean;
43
+ children: React.ReactNode;
82
44
  colors: any;
83
- style?: object;
84
45
  href?: string;
85
- }, {
86
- entered: boolean;
87
- down: boolean;
88
- }> {
89
- constructor(props: any);
90
- render(): JSX.Element;
91
- }
46
+ style?: object;
47
+ }) => JSX.Element;
48
+ export { Topbar, Route };
@@ -1,48 +1,45 @@
1
- import * as React from "react";
1
+ /// <reference types="react" />
2
2
  import * as PCO_URL from "@planningcenter/url";
3
- export declare class Topbar extends React.Component<{
4
- apps: {
5
- attributes: {
6
- name: string;
7
- url: string;
8
- };
9
- }[];
10
- env: PCO_URL.Environment;
11
- appName: string;
12
- routes: any;
13
- colors: any;
14
- userAvatarPath: string;
15
- userId: string;
16
- userName: string;
17
- orgName: string;
18
- connectedPeople: {
19
- id: number;
20
- attributes: {
21
- name: string;
22
- organization_name: string;
23
- };
24
- }[];
25
- style?: any;
26
- currentRouteComponent?: any;
27
- requestAppsFetch: any;
28
- requestConnectedPeopleFetch: any;
29
- requestUnlinkConnectedPeople: any;
30
- requestSwitchConnectedPerson: any;
31
- requestClearAppsCache: any;
32
- requestClearConnectedPeopleCache: any;
33
- notifications?: any;
34
- }, {
35
- routesMenuVisible: boolean;
36
- userMenuVisible: boolean;
37
- }> {
38
- constructor(props: any);
39
- static defaultProps: {
3
+ declare const Topbar: {
4
+ (props: {
5
+ apps: {
6
+ attributes: {
7
+ name: string;
8
+ url: string;
9
+ };
10
+ }[];
11
+ env: PCO_URL.Environment;
12
+ appName: string;
13
+ routes: any;
14
+ colors: any;
15
+ userAvatarPath: string;
16
+ userId: string;
17
+ userName: string;
18
+ orgName: string;
19
+ connectedPeople: {
20
+ id: number;
21
+ attributes: {
22
+ name: string;
23
+ organization_name: string;
24
+ };
25
+ }[];
26
+ style?: any;
27
+ currentRouteComponent?: any;
28
+ requestAppsFetch: any;
29
+ requestConnectedPeopleFetch: any;
30
+ requestUnlinkConnectedPeople: any;
31
+ requestSwitchConnectedPerson: any;
32
+ requestClearAppsCache: any;
33
+ requestClearConnectedPeopleCache: any;
34
+ useDummyNotifications?: boolean;
35
+ notifications?: any;
36
+ }): JSX.Element;
37
+ defaultProps: {
40
38
  currentRouteComponent: (props: any) => JSX.Element;
41
39
  };
42
- componentDidUpdate(): "" | "hidden";
43
- render(): JSX.Element;
44
- }
45
- export declare const Route: ({ active, ...props }: {
40
+ };
41
+ declare const Route: ({ active, ...props }: {
46
42
  [x: string]: any;
47
43
  active: any;
48
44
  }) => JSX.Element;
45
+ export { Route, Topbar };
@@ -1,16 +1,42 @@
1
- import * as React from "react";
2
- export declare const Bell: React.StatelessComponent<{
1
+ /// <reference types="react" />
2
+ export declare const Bell: ({ dot, dotFill, fill, style, ...props }: {
3
3
  dot?: boolean;
4
4
  dotFill?: string;
5
5
  fill?: string;
6
- stroke?: string;
7
6
  style?: object;
8
- }>;
9
- export declare const Spyglass: React.StatelessComponent<{
7
+ }) => JSX.Element;
8
+ export declare const BlankStateIcon: ({ dark, style, ...nativeProps }: {
9
+ dark?: boolean;
10
+ style?: object;
11
+ }) => JSX.Element;
12
+ export declare const ChevronIcon: ({ fill, size, style, ...nativeProps }: {
13
+ fill?: string;
14
+ size?: number;
15
+ style?: object;
16
+ }) => JSX.Element;
17
+ export declare const Cog: ({ fill, size, style, ...nativeProps }: {
18
+ fill?: string;
19
+ size?: number;
20
+ style?: object;
21
+ }) => JSX.Element;
22
+ export declare const DisclosureChevronIcon: ({ colors, style, ...nativeProps }: {
23
+ colors: any;
24
+ style?: object;
25
+ }) => JSX.Element;
26
+ export declare const HelpIcon: ({ colors, style, ...nativeProps }: {
27
+ colors: any;
28
+ style?: object;
29
+ }) => JSX.Element;
30
+ export declare const ExclamationTriangle: ({ fill, size, style, ...nativeProps }: {
31
+ fill?: string;
32
+ size: number;
33
+ style?: object;
34
+ }) => JSX.Element;
35
+ export declare const Spyglass: ({ fill, style, ...nativeProps }: {
10
36
  fill?: string;
11
37
  style?: object;
12
- }>;
13
- export declare const X: React.StatelessComponent<{
38
+ }) => JSX.Element;
39
+ export declare const X: ({ fill, style, ...nativeProps }: {
14
40
  fill?: string;
15
41
  style?: object;
16
- }>;
42
+ }) => JSX.Element;
package/dist/topbar.css CHANGED
@@ -1,2 +1,2 @@
1
- .hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}@-webkit-keyframes spinning{to{transform:rotate(1turn)}}@keyframes spinning{to{transform:rotate(1turn)}}.spinner{align-self:center;-webkit-animation:spinning .5s linear infinite;animation:spinning .5s linear infinite;border:2px solid #f7f7f7;border-radius:50%;border-top-color:#9e9e9e;display:inline;height:16px;transform:rotate(0deg);vertical-align:middle;width:16px}
1
+ .hide-scrollbar{-ms-overflow-style:none;scrollbar-width:none}.hide-scrollbar::-webkit-scrollbar{display:none}
2
2
  /*# sourceMappingURL=topbar.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.css","spinner.css"],"names":[],"mappings":"AAAA,gBACE,uBAAwB,CACxB,oBACF,CACA,mCACE,YACF,CCNA,4BACE,GAEE,uBACF,CACF,CACA,oBACE,GAEE,uBACF,CACF,CAEA,SACE,iBAAkB,CAClB,8CAAyC,CAAzC,sCAAyC,CAKzC,wBAAiB,CAHjB,iBAAkB,CAGlB,wBAAiB,CACjB,cAAe,CACf,WAAY,CACZ,sBAAuB,CACvB,qBAAsB,CACtB,UACF","file":"topbar.css","sourcesContent":[".hide-scrollbar {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.hide-scrollbar::-webkit-scrollbar {\n display: none; /* Chrome, Safari, and Opera */\n}\n","@-webkit-keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n@keyframes spinning {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n.spinner {\n align-self: center;\n animation: spinning 500ms infinite linear;\n border-color: hsl(0 0% 97%);\n border-radius: 50%;\n border-style: solid;\n border-top-color: hsl(0 0% 62%);\n border-width: 2px;\n display: inline;\n height: 16px;\n transform: rotate(0deg);\n vertical-align: middle;\n width: 16px;\n}\n"]}
1
+ {"version":3,"sources":["utils.css"],"names":[],"mappings":"AAAA,gBACE,uBAAwB,CACxB,oBACF,CACA,mCACE,YACF","file":"topbar.css","sourcesContent":[".hide-scrollbar {\n -ms-overflow-style: none; /* IE and Edge */\n scrollbar-width: none; /* Firefox */\n}\n.hide-scrollbar::-webkit-scrollbar {\n display: none; /* Chrome, Safari, and Opera */\n}\n"]}