@planningcenter/topbar 12.8.0 → 12.8.1-rc.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.
@@ -5,16 +5,17 @@ import pcoUrl$1, { pcoUrl as pcoUrl$2, pcoApiUrl } from '@planningcenter/url';
5
5
  import * as general from '@planningcenter/icons/paths/general';
6
6
  import Jolt from '@planningcenter/jolt-client';
7
7
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
8
+ import * as churchCenter from '@planningcenter/icons/paths/church-center';
9
+ import { home } from '@planningcenter/icons/paths/church-center';
10
+ import 'react/jsx-runtime';
8
11
  import * as accounts from '@planningcenter/icons/paths/accounts';
9
12
  import * as toolbar from '@planningcenter/icons/paths/toolbar';
10
- import 'react/jsx-runtime';
11
13
  import datetimeFmt from '@planningcenter/datetime-fmt';
12
14
  import pluralize from 'pluralize';
13
15
  import * as logomarks from '@planningcenter/icons/paths/logomark';
14
16
  import { ThemeProvider, Divider, Button as Button$1, StackView as StackView$2, Text, Icon as Icon$1, designSystem, Box, Heading, GridView, Avatar as Avatar$1, Link as Link$1, HeadingUppercase, List, Spinner, Combobox, Logo, Dropdown as Dropdown$1, Badge } from '@planningcenter/tapestry-react';
15
17
  import { createPortal } from 'react-dom';
16
18
  import { components, UiExtensionFirstPartyComponent, UiExtensionDataContext } from '@planningcenter/add-ons';
17
- import * as churchCenter from '@planningcenter/icons/paths/church-center';
18
19
  import * as people from '@planningcenter/icons/paths/people';
19
20
  import { InlineWidget } from 'react-calendly';
20
21
  import algoliasearch from 'algoliasearch';
@@ -1759,36 +1760,30 @@ function MonoAppIcon({
1759
1760
 
1760
1761
  var styles$p = {"name":"name-UNqbW"};
1761
1762
 
1762
- const collections = {
1763
- accounts,
1764
- general,
1765
- toolbar
1766
- };
1767
- const paths = collections;
1768
- function Icon({
1769
- name,
1770
- size = 16,
1771
- style,
1772
- theme,
1773
- title,
1774
- ...props
1763
+ // Draws Church Center's 16-unit home icon inside a 20-unit box at the same
1764
+ // proportions as the app symbols, like Account settings' gear, which fill
1765
+ // about 14 of their 20 units. Callers' CSS that sizes the svg then scales it
1766
+ // in step with those symbols.
1767
+ const SCALE = 14 / 16;
1768
+ const OFFSET = 10 - 8 * SCALE;
1769
+ function ChurchCenterIcon({
1770
+ size
1775
1771
  }) {
1776
- const [collection, symbol] = name.split(".");
1777
1772
  return /*#__PURE__*/React__default.createElement("svg", {
1778
- "aria-hidden": title ? undefined : true,
1773
+ "aria-hidden": true,
1779
1774
  fill: "currentColor",
1780
1775
  height: size,
1781
- role: title ? "img" : undefined,
1782
1776
  style: {
1783
- color: theme && `var(${theme})`,
1784
- flexShrink: 0,
1785
- ...style
1777
+ color: "var(--t-icon-color)",
1778
+ display: "block",
1779
+ flexShrink: 0
1786
1780
  },
1787
- viewBox: "0 0 16 16",
1781
+ viewBox: "0 0 20 20",
1788
1782
  width: size,
1789
- ...props
1790
- }, title && /*#__PURE__*/React__default.createElement("title", null, title), /*#__PURE__*/React__default.createElement("path", {
1791
- d: paths[collection][symbol]
1783
+ xmlns: "http://www.w3.org/2000/svg"
1784
+ }, /*#__PURE__*/React__default.createElement("path", {
1785
+ d: home,
1786
+ transform: `translate(${OFFSET} ${OFFSET}) scale(${SCALE})`
1792
1787
  }));
1793
1788
  }
1794
1789
 
@@ -1807,10 +1802,8 @@ const AppRow = ({
1807
1802
  }, "Account settings"));
1808
1803
  }
1809
1804
  if (appName === "Church Center") {
1810
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Icon, {
1811
- name: "accounts.churchCenterO",
1812
- size: iconSize,
1813
- theme: "--t-icon-color"
1805
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ChurchCenterIcon, {
1806
+ size: iconSize
1814
1807
  }), /*#__PURE__*/React__default.createElement("span", {
1815
1808
  className: styles$p.name
1816
1809
  }, "Church Center"));
@@ -1844,6 +1837,8 @@ const AppsButton = /*#__PURE__*/React__default.forwardRef(({
1844
1837
  appName: "Accounts",
1845
1838
  colors: colors,
1846
1839
  size: 24
1840
+ })) : appName === "Church Center" ? (/*#__PURE__*/React__default.createElement(ChurchCenterIcon, {
1841
+ size: 24
1847
1842
  })) : (/*#__PURE__*/React__default.createElement(ColorAppIcon, {
1848
1843
  appName: appName.replace(/[\s-]/, ""),
1849
1844
  size: 24
@@ -2719,6 +2714,39 @@ const useUpdateStore = () => useCallback(updates => {
2719
2714
  });
2720
2715
  }, []);
2721
2716
 
2717
+ const collections = {
2718
+ accounts,
2719
+ general,
2720
+ toolbar
2721
+ };
2722
+ const paths = collections;
2723
+ function Icon({
2724
+ name,
2725
+ size = 16,
2726
+ style,
2727
+ theme,
2728
+ title,
2729
+ ...props
2730
+ }) {
2731
+ const [collection, symbol] = name.split(".");
2732
+ return /*#__PURE__*/React__default.createElement("svg", {
2733
+ "aria-hidden": title ? undefined : true,
2734
+ fill: "currentColor",
2735
+ height: size,
2736
+ role: title ? "img" : undefined,
2737
+ style: {
2738
+ color: theme && `var(${theme})`,
2739
+ flexShrink: 0,
2740
+ ...style
2741
+ },
2742
+ viewBox: "0 0 16 16",
2743
+ width: size,
2744
+ ...props
2745
+ }, title && /*#__PURE__*/React__default.createElement("title", null, title), /*#__PURE__*/React__default.createElement("path", {
2746
+ d: paths[collection][symbol]
2747
+ }));
2748
+ }
2749
+
2722
2750
  const SEARCHABLE_PRODUCTS = [{
2723
2751
  appName: "Calendar",
2724
2752
  slug: "calendar"
@@ -6668,9 +6696,11 @@ const AppsSwitcher = ({
6668
6696
  className: styles$7.trigger,
6669
6697
  onClick: onTriggerClick,
6670
6698
  type: "button"
6671
- }, /*#__PURE__*/React__default.createElement(ColorAppIcon, {
6699
+ }, appName === "Church Center" ? (/*#__PURE__*/React__default.createElement(ChurchCenterIcon, {
6700
+ size: 32
6701
+ })) : (/*#__PURE__*/React__default.createElement(ColorAppIcon, {
6672
6702
  appName: appName.replace(/[\s-]/, "")
6673
- })), /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
6703
+ }))), /*#__PURE__*/createPortal(/*#__PURE__*/React__default.createElement("div", {
6674
6704
  ref: containerRef,
6675
6705
  className: classnames(styles$7.layer, {
6676
6706
  [styles$7["layer--visible"]]: visible