@planningcenter/topbar 8.3.1 → 8.3.2-home-team.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 (190) hide show
  1. package/README.md +67 -11
  2. package/dist/topbar.css +1 -1
  3. package/dist/topbar.css.map +1 -1
  4. package/dist/topbar.js +1 -1
  5. package/dist/topbar.js.map +1 -1
  6. package/dist/topbar.modern.js +1 -1
  7. package/dist/topbar.modern.js.map +1 -1
  8. package/dist/topbar.module.js +1 -1
  9. package/dist/topbar.module.js.map +1 -1
  10. package/dist/topbar.umd.js +1 -1
  11. package/dist/topbar.umd.js.map +1 -1
  12. package/dist/types/__tests__/canary.test.d.ts +1 -0
  13. package/dist/types/__tests__/canary.test.d.ts.map +1 -0
  14. package/dist/types/dev/dev.d.ts +2 -0
  15. package/dist/types/dev/dev.d.ts.map +1 -0
  16. package/dist/types/index.d.ts +1 -0
  17. package/dist/types/index.d.ts.map +1 -1
  18. package/dist/types/jest.config.d.ts +5 -0
  19. package/dist/types/jest.config.d.ts.map +1 -0
  20. package/dist/types/modules/app_symbols.d.ts +34 -0
  21. package/dist/types/modules/app_symbols.d.ts.map +1 -0
  22. package/dist/types/modules/apps_provider.d.ts +1 -1
  23. package/dist/types/modules/apps_provider.d.ts.map +1 -1
  24. package/dist/types/modules/avatar.d.ts +2 -3
  25. package/dist/types/modules/avatar.d.ts.map +1 -1
  26. package/dist/types/modules/client_storage.d.ts +2 -2
  27. package/dist/types/modules/client_storage.d.ts.map +1 -1
  28. package/dist/types/modules/color_app_icon.d.ts +0 -1
  29. package/dist/types/modules/color_app_icon.d.ts.map +1 -1
  30. package/dist/types/modules/color_app_squircles.d.ts +0 -1
  31. package/dist/types/modules/color_app_squircles.d.ts.map +1 -1
  32. package/dist/types/modules/components/apps_button.d.ts +0 -1
  33. package/dist/types/modules/components/apps_button.d.ts.map +1 -1
  34. package/dist/types/modules/components/apps_menu.d.ts +0 -1
  35. package/dist/types/modules/components/apps_menu.d.ts.map +1 -1
  36. package/dist/types/modules/components/conditional_wrap.d.ts +1 -1
  37. package/dist/types/modules/components/conditional_wrap.d.ts.map +1 -1
  38. package/dist/types/modules/components/eyebrow.d.ts +1 -1
  39. package/dist/types/modules/components/eyebrow.d.ts.map +1 -1
  40. package/dist/types/modules/components/hoverable.d.ts +1 -1
  41. package/dist/types/modules/components/hoverable.d.ts.map +1 -1
  42. package/dist/types/modules/components/hoverable_list_item.d.ts +1 -1
  43. package/dist/types/modules/components/hoverable_list_item.d.ts.map +1 -1
  44. package/dist/types/modules/components/notification_bell.d.ts +0 -1
  45. package/dist/types/modules/components/notification_bell.d.ts.map +1 -1
  46. package/dist/types/modules/components/notification_item.d.ts +0 -1
  47. package/dist/types/modules/components/notification_item.d.ts.map +1 -1
  48. package/dist/types/modules/components/notifications_menu.d.ts +0 -1
  49. package/dist/types/modules/components/notifications_menu.d.ts.map +1 -1
  50. package/dist/types/modules/components/notifications_menu_blank_state.d.ts +2 -2
  51. package/dist/types/modules/components/notifications_menu_blank_state.d.ts.map +1 -1
  52. package/dist/types/modules/components/notifications_menu_wrapper.d.ts +1 -1
  53. package/dist/types/modules/components/notifications_menu_wrapper.d.ts.map +1 -1
  54. package/dist/types/modules/components/outsider.d.ts +1 -1
  55. package/dist/types/modules/components/outsider.d.ts.map +1 -1
  56. package/dist/types/modules/components/popover_root.d.ts +1 -1
  57. package/dist/types/modules/components/popover_root.d.ts.map +1 -1
  58. package/dist/types/modules/components/popup.d.ts +1 -1
  59. package/dist/types/modules/components/popup.d.ts.map +1 -1
  60. package/dist/types/modules/components/popup_root.d.ts +1 -1
  61. package/dist/types/modules/components/popup_root.d.ts.map +1 -1
  62. package/dist/types/modules/components/spinner.d.ts +0 -1
  63. package/dist/types/modules/components/spinner.d.ts.map +1 -1
  64. package/dist/types/modules/connected_people_provider.d.ts +3 -3
  65. package/dist/types/modules/connected_people_provider.d.ts.map +1 -1
  66. package/dist/types/modules/display_switch.d.ts +2 -2
  67. package/dist/types/modules/display_switch.d.ts.map +1 -1
  68. package/dist/types/modules/dummy_data.d.ts +4 -0
  69. package/dist/types/modules/dummy_data.d.ts.map +1 -0
  70. package/dist/types/modules/error_boundary.d.ts +25 -0
  71. package/dist/types/modules/error_boundary.d.ts.map +1 -0
  72. package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
  73. package/dist/types/modules/hooks/use_topbar_api.d.ts +2 -2
  74. package/dist/types/modules/hooks/use_topbar_api.d.ts.map +1 -1
  75. package/dist/types/modules/interfaces.d.ts +99 -47
  76. package/dist/types/modules/interfaces.d.ts.map +1 -1
  77. package/dist/types/modules/mfa_status.d.ts +0 -1
  78. package/dist/types/modules/mfa_status.d.ts.map +1 -1
  79. package/dist/types/modules/mono_app_icon.d.ts +0 -1
  80. package/dist/types/modules/mono_app_icon.d.ts.map +1 -1
  81. package/dist/types/modules/mono_app_name.d.ts +0 -1
  82. package/dist/types/modules/mono_app_name.d.ts.map +1 -1
  83. package/dist/types/modules/mono_app_symbols.d.ts +0 -1
  84. package/dist/types/modules/mono_app_symbols.d.ts.map +1 -1
  85. package/dist/types/modules/mono_app_text.d.ts +0 -1
  86. package/dist/types/modules/mono_app_text.d.ts.map +1 -1
  87. package/dist/types/modules/not_small_topbar.d.ts +1 -1
  88. package/dist/types/modules/not_small_topbar.d.ts.map +1 -1
  89. package/dist/types/modules/pco_url.d.ts +3 -0
  90. package/dist/types/modules/pco_url.d.ts.map +1 -0
  91. package/dist/types/modules/platform_announcements.d.ts +3 -3
  92. package/dist/types/modules/platform_announcements.d.ts.map +1 -1
  93. package/dist/types/modules/product_announcement.d.ts +1 -1
  94. package/dist/types/modules/product_announcement.d.ts.map +1 -1
  95. package/dist/types/modules/profile_container.d.ts +9 -9
  96. package/dist/types/modules/small_topbar.d.ts +0 -1
  97. package/dist/types/modules/small_topbar.d.ts.map +1 -1
  98. package/dist/types/modules/styled_root.d.ts +0 -1
  99. package/dist/types/modules/styled_root.d.ts.map +1 -1
  100. package/dist/types/modules/symbols.d.ts +2 -2
  101. package/dist/types/modules/symbols.d.ts.map +1 -1
  102. package/dist/types/modules/toolbar/components/drawer.d.ts +5 -0
  103. package/dist/types/modules/toolbar/components/drawer.d.ts.map +1 -0
  104. package/dist/types/modules/toolbar/components/drawer_header.d.ts +5 -0
  105. package/dist/types/modules/toolbar/components/drawer_header.d.ts.map +1 -0
  106. package/dist/types/modules/toolbar/components/drawer_heading.d.ts +5 -0
  107. package/dist/types/modules/toolbar/components/drawer_heading.d.ts.map +1 -0
  108. package/dist/types/modules/toolbar/components/header.d.ts +8 -0
  109. package/dist/types/modules/toolbar/components/header.d.ts.map +1 -0
  110. package/dist/types/modules/toolbar/components/index.d.ts +6 -0
  111. package/dist/types/modules/toolbar/components/index.d.ts.map +1 -0
  112. package/dist/types/modules/toolbar/components/switch_view.d.ts +8 -0
  113. package/dist/types/modules/toolbar/components/switch_view.d.ts.map +1 -0
  114. package/dist/types/modules/toolbar/components/user_profile.d.ts +11 -0
  115. package/dist/types/modules/toolbar/components/user_profile.d.ts.map +1 -0
  116. package/dist/types/modules/toolbar/hooks/index.d.ts +2 -0
  117. package/dist/types/modules/toolbar/hooks/index.d.ts.map +1 -0
  118. package/dist/types/modules/toolbar/hooks/use_toolbar_reducer.d.ts +20 -0
  119. package/dist/types/modules/toolbar/hooks/use_toolbar_reducer.d.ts.map +1 -0
  120. package/dist/types/modules/toolbar/index.d.ts +10 -0
  121. package/dist/types/modules/toolbar/index.d.ts.map +1 -0
  122. package/dist/types/modules/toolbar/tools/index.d.ts +3 -0
  123. package/dist/types/modules/toolbar/tools/index.d.ts.map +1 -0
  124. package/dist/types/modules/toolbar/tools/notifications.d.ts +4 -0
  125. package/dist/types/modules/toolbar/tools/notifications.d.ts.map +1 -0
  126. package/dist/types/modules/toolbar/tools/tasks.d.ts +4 -0
  127. package/dist/types/modules/toolbar/tools/tasks.d.ts.map +1 -0
  128. package/dist/types/modules/topbar_context.d.ts +1 -0
  129. package/dist/types/modules/topbar_context.d.ts.map +1 -1
  130. package/dist/types/modules/unbutton.d.ts +0 -1
  131. package/dist/types/modules/unbutton.d.ts.map +1 -1
  132. package/package.json +9 -6
  133. package/CHANGELOG.md +0 -210
  134. package/dist/index.d.ts +0 -10
  135. package/dist/modules/api_request.d.ts +0 -18
  136. package/dist/modules/apps_provider.d.ts +0 -30
  137. package/dist/modules/avatar.d.ts +0 -7
  138. package/dist/modules/client_storage.d.ts +0 -12
  139. package/dist/modules/color_app_icon.d.ts +0 -5
  140. package/dist/modules/color_app_squircles.d.ts +0 -14
  141. package/dist/modules/colors.d.ts +0 -46
  142. package/dist/modules/components/NotificationsMenuBlankState.d.ts +0 -12
  143. package/dist/modules/components/apps_button.d.ts +0 -10
  144. package/dist/modules/components/apps_menu.d.ts +0 -11
  145. package/dist/modules/components/conditional_wrap.d.ts +0 -7
  146. package/dist/modules/components/eyebrow.d.ts +0 -6
  147. package/dist/modules/components/hoverable.d.ts +0 -11
  148. package/dist/modules/components/hoverable_list_item.d.ts +0 -9
  149. package/dist/modules/components/notification_bell.d.ts +0 -6
  150. package/dist/modules/components/notification_item.d.ts +0 -11
  151. package/dist/modules/components/notifications_inbox.d.ts +0 -18
  152. package/dist/modules/components/notifications_menu.d.ts +0 -17
  153. package/dist/modules/components/notifications_menu_Wrapper.d.ts +0 -7
  154. package/dist/modules/components/notifications_menu_blank_state.d.ts +0 -8
  155. package/dist/modules/components/outsider.d.ts +0 -13
  156. package/dist/modules/components/popover_root.d.ts +0 -6
  157. package/dist/modules/components/popup.d.ts +0 -9
  158. package/dist/modules/components/popup_root.d.ts +0 -6
  159. package/dist/modules/components/spinner.d.ts +0 -4
  160. package/dist/modules/connected_people_provider.d.ts +0 -21
  161. package/dist/modules/display_switch.d.ts +0 -26
  162. package/dist/modules/dummy_data.d.ts +0 -3
  163. package/dist/modules/formatters.d.ts +0 -3
  164. package/dist/modules/get_apps_switch_product_path.d.ts +0 -1
  165. package/dist/modules/hooks/use_hover.d.ts +0 -3
  166. package/dist/modules/hooks/use_local_storage.d.ts +0 -10
  167. package/dist/modules/hooks/use_notifications.d.ts +0 -16
  168. package/dist/modules/hooks/use_topbar_api.d.ts +0 -8
  169. package/dist/modules/medium_topbar.d.ts +0 -46
  170. package/dist/modules/mono_app_icon.d.ts +0 -7
  171. package/dist/modules/mono_app_name.d.ts +0 -6
  172. package/dist/modules/mono_app_symbols.d.ts +0 -57
  173. package/dist/modules/mono_app_text.d.ts +0 -66
  174. package/dist/modules/not_small_topbar.d.ts +0 -91
  175. package/dist/modules/platform_announcements.d.ts +0 -31
  176. package/dist/modules/product_announcement.d.ts +0 -20
  177. package/dist/modules/small_topbar.d.ts +0 -48
  178. package/dist/modules/styled_root.d.ts +0 -6
  179. package/dist/modules/styles.d.ts +0 -9
  180. package/dist/modules/symbols.d.ts +0 -16
  181. package/dist/modules/topbar_context.d.ts +0 -5
  182. package/dist/modules/unbutton.d.ts +0 -11
  183. package/dist/topbar +0 -2
  184. package/dist/topbar.map +0 -1
  185. package/dist/topbar.modern.css +0 -2
  186. package/dist/topbar.modern.css.map +0 -1
  187. package/dist/topbar.module.css +0 -2
  188. package/dist/topbar.module.css.map +0 -1
  189. package/dist/types/modules/medium_topbar.d.ts +0 -39
  190. package/dist/types/modules/medium_topbar.d.ts.map +0 -1
package/README.md CHANGED
@@ -31,7 +31,7 @@ For a handful of reasons (not least of which is because we pay per Jolt connecti
31
31
  **Note that this connection sharing is entirely optional for the parent app, but strongly encouraged.**
32
32
  If a Jolt connection is not shared with topbar, it will gladly initiate its own connection specifically for its purposes.
33
33
 
34
- To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/ministrycentered/jolt-client/) connection.
34
+ To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/planningcenter/jolt-client/) connection.
35
35
  If nothing is passed—or if a Promise is passed that resolves to `undefined` or `void`—topbar will initiate its own connection.
36
36
 
37
37
  Topbar hooks into `pco-page-expired` and will `disconnect` when the session is invalidated (i.e. logged out in a different tab).
@@ -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.
@@ -137,13 +193,13 @@ If you like history, here are the initial release notes with technical considera
137
193
 
138
194
  ## Example product implementations
139
195
 
140
- - [API](https://github.com/ministrycentered/api/blob/master/app/javascript/components/api_topbar.jsx)
141
- - [Accounts](https://github.com/ministrycentered/accounts/blob/master/app/javascript/components/accounts_topbar.jsx)
142
- - [Calendar](https://github.com/ministrycentered/resources/blob/master/app/javascript/components/CalendarTopbar.jsx)
143
- - [Check-Ins](https://github.com/ministrycentered/check-ins/blob/master/app/javascript/components/checkins_topbar.js)
144
- - [Giving](https://github.com/ministrycentered/giving/blob/master/app/javascript/application/components/giving_topbar.jsx)
145
- - [Groups](https://github.com/ministrycentered/groups/blob/master/app/javascript/application/components/groups_topbar.js)
146
- - [People](https://github.com/ministrycentered/people/blob/master/app/javascript/components/people_topbar.jsx)
147
- - [Publishing](https://github.com/ministrycentered/publishing/blob/master/app/javascript/src/PublishingTopbar.js)
148
- - [Registrations](https://github.com/ministrycentered/registrations/blob/master/app/javascript/components/registrations_topbar.jsx)
149
- - [Services](https://github.com/ministrycentered/services/blob/master/app/javascript/components/ServicesTopbar.js)
196
+ - [API](https://github.com/planningcenter/api/blob/master/app/javascript/components/api_topbar.jsx)
197
+ - [Accounts](https://github.com/planningcenter/accounts/blob/master/app/javascript/components/accounts_topbar.jsx)
198
+ - [Calendar](https://github.com/planningcenter/calendar/blob/master/app/javascript/components/CalendarTopbar.jsx)
199
+ - [Check-Ins](https://github.com/planningcenter/check-ins/blob/master/app/javascript/components/checkins_topbar.js)
200
+ - [Giving](https://github.com/planningcenter/giving/blob/master/app/javascript/application/components/giving_topbar.jsx)
201
+ - [Groups](https://github.com/planningcenter/groups/blob/master/app/javascript/application/components/groups_topbar.js)
202
+ - [People](https://github.com/planningcenter/people/blob/master/app/javascript/components/people_topbar.jsx)
203
+ - [Publishing](https://github.com/planningcenter/publishing/blob/master/app/javascript/src/PublishingTopbar.js)
204
+ - [Registrations](https://github.com/planningcenter/registrations/blob/master/app/javascript/components/registrations_topbar.jsx)
205
+ - [Services](https://github.com/planningcenter/services/blob/master/app/javascript/components/ServicesTopbar.js)
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"]}