@planningcenter/topbar 12.5.0 → 12.6.0-rc.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.
package/dist/topbar.js CHANGED
@@ -3327,7 +3327,11 @@ const KEYBOARD_SHORTCUTS = {
3327
3327
 
3328
3328
  const isMac = () => /Mac|iPhone|iPad|iPod/.test(navigator.platform);
3329
3329
  const hasCommandKey = event => isMac() ? event.metaKey : event.ctrlKey;
3330
- const matchesShortcut = (shortcut, event) => event.key.toLowerCase() === shortcut.key && !event.altKey && !event.shiftKey && hasCommandKey(event) === shortcut.modifierKey;
3330
+ const matchesShortcut = (shortcut, event) => {
3331
+ var _a;
3332
+ // Chrome's autofill sends a keydown with no key.
3333
+ return ((_a = event.key) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === shortcut.key && !event.altKey && !event.shiftKey && hasCommandKey(event) === shortcut.modifierKey;
3334
+ };
3331
3335
  const isSearchShortcut = event => matchesShortcut(KEYBOARD_SHORTCUTS.openSearch, event);
3332
3336
  // Products opened their own search with `/` before this one replaced it.
3333
3337
  const isLegacySearchShortcut = event => event.key === "/" && !event.altKey && !event.ctrlKey && !event.metaKey && !isTypingIn(event.target);
@@ -3565,6 +3569,23 @@ function groupByType({
3565
3569
  };
3566
3570
  return [...groups.values()].sort((a, b) => rank(a.type) - rank(b.type));
3567
3571
  }
3572
+ const isBlankStateAction = action => typeof action === "object" && action !== null && "label" in action && "url" in action && typeof action.label === "string" && typeof action.url === "string" && (!("query_param" in action) || typeof action.query_param === "string");
3573
+ function blankStateActions({
3574
+ meta
3575
+ }) {
3576
+ const actions = meta === null || meta === void 0 ? void 0 : meta.blank_state_actions;
3577
+ return Array.isArray(actions) ? actions.filter(isBlankStateAction) : [];
3578
+ }
3579
+ // The product reads the search box's text from the action's `query_param`, to
3580
+ // fill in whatever it opens.
3581
+ function blankStateActionUrl({
3582
+ query_param = "search_term",
3583
+ url
3584
+ }, term) {
3585
+ const actionUrl = new URL(url);
3586
+ actionUrl.searchParams.set(query_param, term.trim());
3587
+ return actionUrl.toString();
3588
+ }
3568
3589
 
3569
3590
  function useDebouncedValue(value, delay) {
3570
3591
  const [debounced, setDebounced] = React.useState(value);
@@ -3587,6 +3608,7 @@ function useProductSearch(product, term) {
3587
3608
  // Services tab.
3588
3609
  const visibleResponse = request.status === "done" || settledProduct === product ? response : undefined;
3589
3610
  const groups = React.useMemo(() => visibleResponse && groupByType(visibleResponse), [visibleResponse]);
3611
+ const actions = React.useMemo(() => response ? blankStateActions(response) : [], [response]);
3590
3612
  if (!query) {
3591
3613
  return {
3592
3614
  status: "idle"
@@ -3598,6 +3620,7 @@ function useProductSearch(product, term) {
3598
3620
  };
3599
3621
  } else if (request.status === "done") {
3600
3622
  return {
3623
+ blankStateActions: actions,
3601
3624
  groups: groups !== null && groups !== void 0 ? groups : [],
3602
3625
  status: "done"
3603
3626
  };
@@ -4130,18 +4153,7 @@ function subject(token) {
4130
4153
  return undefined;
4131
4154
  }
4132
4155
  }
4133
- const minting = new Map();
4134
- function mintToken(personId) {
4135
- const running = minting.get(personId);
4136
- if (running) {
4137
- return running;
4138
- } else {
4139
- const run = mint(personId).finally(() => minting.delete(personId));
4140
- minting.set(personId, run);
4141
- return run;
4142
- }
4143
- }
4144
- async function mint(personId) {
4156
+ async function mintToken(personId) {
4145
4157
  const {
4146
4158
  json,
4147
4159
  ok,
@@ -4165,9 +4177,9 @@ async function mint(personId) {
4165
4177
  }
4166
4178
  return token;
4167
4179
  }
4168
- function currentToken(personId) {
4180
+ function hasReadOnlyToken(personId) {
4169
4181
  var _a;
4170
- return (_a = cachedToken(personId)) !== null && _a !== void 0 ? _a : mintToken(personId).catch(() => null);
4182
+ return ((_a = cachedToken(personId)) === null || _a === void 0 ? void 0 : _a.readOnly) === true;
4171
4183
  }
4172
4184
  async function request(personId, key, init = {}, isRetry = false) {
4173
4185
  var _a;
@@ -4321,23 +4333,15 @@ function sync(scope, followUp) {
4321
4333
  function syncRecentlyVisited(scope) {
4322
4334
  return sync(scope, false);
4323
4335
  }
4324
- function record(entry, scope, token) {
4325
- if (!(token === null || token === void 0 ? void 0 : token.readOnly)) {
4326
- writeRecentlyVisited(scope, addVisit(readRecentlyVisited(scope), entry));
4327
- if (token) sync(scope, true);
4328
- }
4329
- }
4336
+ // Staff impersonating someone get a read-only token, and their visits stay out
4337
+ // of that person's list. Until the token is minted the visit is kept, and the
4338
+ // sync that mints it replaces the local list with the synced one, so recording
4339
+ // never waits on the network.
4330
4340
  function recordVisit(visit, scope) {
4331
4341
  const entry = toEntry(visit, new Date());
4332
- if (!isEntry(entry)) {
4333
- return Promise.resolve();
4334
- }
4335
- const token = isUserStoreSyncUnavailable() ? null : currentToken(scope.personId);
4336
- if (token instanceof Promise) {
4337
- return token.then(minted => record(entry, scope, minted));
4338
- } else {
4339
- record(entry, scope, token);
4340
- return Promise.resolve();
4342
+ if (isEntry(entry) && !hasReadOnlyToken(scope.personId)) {
4343
+ writeRecentlyVisited(scope, addVisit(readRecentlyVisited(scope), entry));
4344
+ sync(scope, true);
4341
4345
  }
4342
4346
  }
4343
4347
  function useRecentlyVisited({
@@ -4614,11 +4618,13 @@ function resultItem({
4614
4618
  attributes,
4615
4619
  id
4616
4620
  }, timeZone) {
4621
+ var _a;
4617
4622
  return {
4618
4623
  category: attributes.category,
4619
4624
  imageUrl: attributes.image_url,
4620
4625
  key: id,
4621
4626
  product: attributes.product,
4627
+ subdued: (_a = attributes.subdued) !== null && _a !== void 0 ? _a : false,
4622
4628
  subtitle: summarize(attributes, timeZone),
4623
4629
  title: attributes.title,
4624
4630
  url: attributes.url
@@ -4683,6 +4689,7 @@ function describeVisit(visit, timeZone) {
4683
4689
  category: "generic",
4684
4690
  imageUrl: null,
4685
4691
  product: app,
4692
+ subdued: false,
4686
4693
  subtitle: joinParts(capitalize((_a = metadata === null || metadata === void 0 ? void 0 : metadata.type) !== null && _a !== void 0 ? _a : ""), (_b = metadata === null || metadata === void 0 ? void 0 : metadata.details) !== null && _b !== void 0 ? _b : ""),
4687
4694
  title,
4688
4695
  url: visit.url
@@ -4695,6 +4702,7 @@ function describeVisit(visit, timeZone) {
4695
4702
  category,
4696
4703
  image_url,
4697
4704
  product,
4705
+ subdued,
4698
4706
  title,
4699
4707
  type
4700
4708
  } = attributes;
@@ -4704,6 +4712,7 @@ function describeVisit(visit, timeZone) {
4704
4712
  category,
4705
4713
  imageUrl: image_url,
4706
4714
  product,
4715
+ subdued: subdued !== null && subdued !== void 0 ? subdued : false,
4707
4716
  subtitle: joinParts(kind, summarize(attributes, timeZone)),
4708
4717
  title,
4709
4718
  url: visit.url
@@ -4714,6 +4723,39 @@ function capitalize(word) {
4714
4723
  return word.charAt(0).toUpperCase() + word.slice(1);
4715
4724
  }
4716
4725
 
4726
+ // The first action is the button, and any others wait behind its caret.
4727
+ function BlankStateActions({
4728
+ actions,
4729
+ onOpen,
4730
+ term
4731
+ }) {
4732
+ const [primary, ...others] = actions;
4733
+ if (!primary) return null;
4734
+ const primaryLink = /*#__PURE__*/React.createElement(tapestry.Link, {
4735
+ href: blankStateActionUrl(primary, term),
4736
+ kind: "neutral",
4737
+ label: primary.label,
4738
+ onClick: onOpen,
4739
+ prefix: /*#__PURE__*/React.createElement(Icon, {
4740
+ name: "general.plus"
4741
+ })
4742
+ });
4743
+ if (others.length === 0) return primaryLink;
4744
+ return /*#__PURE__*/React.createElement(tapestry.ButtonGroup, {
4745
+ "aria-label": "Create"
4746
+ }, primaryLink, /*#__PURE__*/React.createElement(tapestry.Dropdown, null, /*#__PURE__*/React.createElement(tapestry.DropdownTrigger, null, /*#__PURE__*/React.createElement(tapestry.DropdownIconButton, {
4747
+ "aria-label": "More to create",
4748
+ icon: null,
4749
+ kind: "neutral"
4750
+ })), /*#__PURE__*/React.createElement(tapestry.DropdownMenu, {
4751
+ placement: "bottom start"
4752
+ }, others.map(action => (/*#__PURE__*/React.createElement(tapestry.DropdownLink, {
4753
+ href: blankStateActionUrl(action, term),
4754
+ id: action.url,
4755
+ key: action.url
4756
+ }, action.label))))));
4757
+ }
4758
+
4717
4759
  var styles$j = {"container":"container-YDdM1","hint":"hint-017Rd","keycap":"keycap-ENJM2","labels":"labels-GHPqL","copied":"copied-DUFa1"};
4718
4760
 
4719
4761
  const SYMBOLS = {
@@ -5396,6 +5438,7 @@ function BlankStateRecentlyVisited(props) {
5396
5438
  var styles$f = {"blank_state":"blank_state-wMOWN","image":"image-uy0Fd"};
5397
5439
 
5398
5440
  function BlankState$1({
5441
+ action,
5399
5442
  image,
5400
5443
  role,
5401
5444
  subtitle,
@@ -5413,7 +5456,7 @@ function BlankState$1({
5413
5456
  direction: "column",
5414
5457
  align: "center",
5415
5458
  gap: 1
5416
- }, /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement("p", null, subtitle)));
5459
+ }, /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement("p", null, subtitle)), action);
5417
5460
  }
5418
5461
 
5419
5462
  function EndOfResultsObserver({
@@ -5434,7 +5477,7 @@ function EndOfResultsObserver({
5434
5477
 
5435
5478
  const resultId = (listboxId, index) => `${listboxId}-result-${index}`;
5436
5479
 
5437
- var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt"};
5480
+ var styles$e = {"result":"result-Thq2C","title":"title-KYUEn","subtitle":"subtitle-R2haq","image":"image-KVDor","avatar":"avatar-6Gh62","photo":"photo-FZR3Q","badge":"badge-trUKt","subdued":"subdued-YzRpa"};
5438
5481
 
5439
5482
  function SearchResult({
5440
5483
  category,
@@ -5446,6 +5489,7 @@ function SearchResult({
5446
5489
  onHighlight,
5447
5490
  onOpen,
5448
5491
  product,
5492
+ subdued,
5449
5493
  subtitle,
5450
5494
  title,
5451
5495
  url
@@ -5494,12 +5538,13 @@ function SearchResult({
5494
5538
  return (
5495
5539
  /*#__PURE__*/
5496
5540
  // Named by the title alone, so screen readers say "Ada Lovelace" rather
5497
- // than the whole row. The section and subtitle are read after a pause.
5541
+ // than the whole row. Whether it's inactive, then the section and
5542
+ // subtitle, are read after a pause.
5498
5543
  React.createElement("a", {
5499
- "aria-describedby": [describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
5544
+ "aria-describedby": [subdued && `${id}-subdued`, describedBy, subtitle && `${id}-subtitle`].filter(Boolean).join(" ") || undefined,
5500
5545
  "aria-labelledby": title ? `${id}-title` : undefined,
5501
5546
  "aria-selected": highlighted,
5502
- className: styles$e.result,
5547
+ className: classnames(styles$e.result, subdued && styles$e.subdued),
5503
5548
  "data-turbo": "false",
5504
5549
  href: url,
5505
5550
  id: id,
@@ -5518,7 +5563,10 @@ function SearchResult({
5518
5563
  }, title), /*#__PURE__*/React.createElement("span", {
5519
5564
  className: styles$e.subtitle,
5520
5565
  id: `${id}-subtitle`
5521
- }, subtitle))
5566
+ }, subtitle), subdued && (/*#__PURE__*/React.createElement("span", {
5567
+ className: styles$k.visuallyHidden,
5568
+ id: `${id}-subdued`
5569
+ }, "Inactive")))
5522
5570
  );
5523
5571
  }
5524
5572
  // A person's photo or the result's own image, badged with its product, or
@@ -5577,6 +5625,7 @@ function ResultListbox({
5577
5625
  onHighlight: () => onHighlight(itemIndex),
5578
5626
  onOpen: onOpen,
5579
5627
  product: item.product,
5628
+ subdued: item.subdued,
5580
5629
  subtitle: item.subtitle,
5581
5630
  title: item.title,
5582
5631
  url: item.url
@@ -6088,6 +6137,7 @@ function LoadingSpinner({
6088
6137
 
6089
6138
  function SearchResults({
6090
6139
  label,
6140
+ noResultsAction,
6091
6141
  sections,
6092
6142
  status,
6093
6143
  term,
@@ -6131,6 +6181,7 @@ function SearchResults({
6131
6181
  if (sections.length === 0) {
6132
6182
  // The panel's result count announces this, so it isn't read twice.
6133
6183
  return /*#__PURE__*/React.createElement(BlankState$1, {
6184
+ action: noResultsAction,
6134
6185
  image: /*#__PURE__*/React.createElement(BlankStateNoResults, null),
6135
6186
  subtitle: "Clear search and try again.",
6136
6187
  title: `No results for “${term.trim()}”`
@@ -6187,6 +6238,20 @@ function SearchPanel({
6187
6238
  const inputRef = React.useRef(null);
6188
6239
  const resultCount = useAnnouncement(hasTerm && search.status === "done" ? `${items.length === 0 ? "No results" : `${items.length} ${items.length === 1 ? "result" : "results"}`} for “${term.trim()}” in ${product.appName}` : null);
6189
6240
  const [announceHighlight, setAnnounceHighlight] = React.useState(false);
6241
+ const blankStateActions = hasTerm && search.status === "done" && items.length === 0 ? search.blankStateActions : [];
6242
+ // With nothing to highlight, Enter takes the first thing the product offers
6243
+ // to create instead, the way the old People search added the person.
6244
+ const handleKeyDown = event => {
6245
+ const [action] = blankStateActions;
6246
+ if (event.key === "Enter" && action && !event.nativeEvent.isComposing) {
6247
+ event.preventDefault();
6248
+ open(blankStateActionUrl(action, term), {
6249
+ newTab: hasCommandKey(event)
6250
+ });
6251
+ } else {
6252
+ navigation.handleKeyDown(event);
6253
+ }
6254
+ };
6190
6255
  // The tabs keep focus while arrowing through results, but only the focused
6191
6256
  // input can point screen readers at the highlight, so from the tabs it's
6192
6257
  // announced instead. Typing goes back to the input, keystroke and all.
@@ -6196,15 +6261,20 @@ function SearchPanel({
6196
6261
  (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
6197
6262
  } else if (verticalStep(event.key)) {
6198
6263
  setAnnounceHighlight(true);
6199
- navigation.handleKeyDown(event);
6264
+ handleKeyDown(event);
6200
6265
  } else {
6201
- navigation.handleKeyDown(event);
6266
+ handleKeyDown(event);
6202
6267
  }
6203
6268
  };
6204
6269
  const results = hasTerm ? (/*#__PURE__*/React.createElement(SearchResults, {
6205
6270
  highlightedIndex: highlightedIndex,
6206
6271
  id: listboxId,
6207
6272
  label: `Results from Planning Center ${product.appName}`,
6273
+ noResultsAction: /*#__PURE__*/React.createElement(BlankStateActions, {
6274
+ actions: blankStateActions,
6275
+ onOpen: onOpenResult,
6276
+ term: term
6277
+ }),
6208
6278
  onHighlight: navigation.highlightIndex,
6209
6279
  onOpen: onOpenResult,
6210
6280
  sections: sections,
@@ -6226,7 +6296,7 @@ function SearchPanel({
6226
6296
  onChange: setTerm,
6227
6297
  onClose: onClose,
6228
6298
  onFocus: () => setAnnounceHighlight(false),
6229
- onKeyDown: navigation.handleKeyDown,
6299
+ onKeyDown: handleKeyDown,
6230
6300
  value: term
6231
6301
  }), mobile ? (/*#__PURE__*/React.createElement(ProductSelect, {
6232
6302
  onSelect: setSelectedSlug,
@@ -36621,9 +36691,9 @@ function HelpdeskComponent({
36621
36691
  const Helpdesk = {
36622
36692
  component: HelpdeskComponent,
36623
36693
  icons: {
36624
- staticDotPath: "",
36625
- staticPath: "M16 10C14.9391 10 13.9217 10.4214 13.1716 11.1716C12.4214 11.9217 12 12.9391 12 14H14C14 13.4696 14.2107 12.9609 14.5858 12.5858C14.9609 12.2107 15.4696 12 16 12C16.5304 12 17.0391 12.2107 17.4142 12.5858C17.7893 12.9609 18 13.4696 18 14C18 16 15 15.75 15 19H17C17 16.75 20 16.5 20 14C20 12.9391 19.5786 11.9217 18.8284 11.1716C18.0783 10.4214 17.0609 10 16 10ZM16 24C14.4178 24 12.871 23.5308 11.5554 22.6518C10.2399 21.7727 9.21447 20.5233 8.60897 19.0615C8.00347 17.5997 7.84504 15.9911 8.15372 14.4393C8.4624 12.8874 9.22433 11.462 10.3432 10.3431C11.462 9.22433 12.8874 8.4624 14.4393 8.15372C15.9911 7.84504 17.5997 8.00346 19.0615 8.60896C20.5233 9.21446 21.7727 10.2398 22.6518 11.5554C23.5308 12.871 24 14.4177 24 16C23.9974 18.1209 23.1537 20.1542 21.6539 21.6539C20.1542 23.1537 18.1209 23.9974 16 24ZM16 6C14.0222 6 12.0888 6.58649 10.4443 7.6853C8.79981 8.78412 7.51809 10.3459 6.76121 12.1732C6.00433 14.0004 5.8063 16.0111 6.19215 17.9509C6.578 19.8907 7.53041 21.6725 8.92894 23.0711C10.3275 24.4696 12.1093 25.422 14.0491 25.8079C15.9889 26.1937 17.9996 25.9957 19.8268 25.2388C21.6541 24.4819 23.2159 23.2002 24.3147 21.5557C25.4135 19.9112 26 17.9778 26 16C26 13.3478 24.9464 10.8043 23.0711 8.92893C21.1957 7.05357 18.6522 6 16 6V6ZM15 22H17V20H15V22Z"
36694
+ path: "M16.9997 19.9977v1.9992h-1.9975v-1.9992z m-0.9987-9.9937c1.0595 0.0001 2.0774 0.4207 2.8266 1.1699 0.7492 0.7508 1.1698 1.7671 1.17 2.8266 0 2.4989-2.9979 2.7488-2.9979 4.9969h-1.9975c0-3.2467 2.9978-2.9981 2.9978-4.9969-0.0001-0.5289-0.2112-1.0388-0.5857-1.4133-0.3746-0.3746-0.8828-0.5856-1.4133-0.5857-0.5304 0-1.0387 0.2114-1.4134 0.5857-0.3746 0.3746-0.5856 0.8844-0.5857 1.4133h-1.9991c0.0001-1.0595 0.4222-2.0758 1.1715-2.8266 0.7493-0.7491 1.7672-1.1699 2.8267-1.1699z m0-3.9966c2.6499 0.0001 5.1917 1.0523 7.0651 2.9271 1.8748 1.8733 2.927 4.4151 2.9271 7.0651 0 1.9762-0.5853 3.9094-1.6835 5.5528-1.0983 1.6418-2.6583 2.9236-4.485 3.6794-1.8249 0.7574-3.835 0.9542-5.7726 0.5684-1.9392-0.3859-3.7204-1.3366-5.1178-2.734-1.3974-1.3974-2.3496-3.1785-2.7355-5.1178-0.3858-1.9376-0.1873-3.9477 0.57-5.7726 0.7558-1.8267 2.0375-3.3867 3.6809-4.485 1.6418-1.0982 3.575-1.6834 5.5513-1.6834z m3.059 2.6068c-1.4616-0.6045-3.07-0.7641-4.62-0.4554-1.5499 0.3088-2.9749 1.07-4.0923 2.1891-1.119 1.1175-1.8788 2.5424-2.1876 4.0923-0.3087 1.5501-0.1508 3.1583 0.4539 4.62 0.6045 1.4598 1.6294 2.7072 2.9444 3.5868 1.3154 0.878 2.8618 1.3458 4.4426 1.3458 2.1192-0.0018 4.1516-0.846 5.6486-2.3446 1.4985-1.4971 2.3429-3.5294 2.3445-5.6486 0-1.5806-0.4679-3.1257-1.3458-4.441-0.8796-1.3154-2.1283-2.3398-3.5883-2.9444z"
36626
36695
  },
36696
+ label: "Help and support",
36627
36697
  name: "Helpdesk",
36628
36698
  storageExemptPaths: ["email", "phone"]
36629
36699
  };
@@ -36896,13 +36966,15 @@ const useNotifications = ({
36896
36966
  return notification.data;
36897
36967
  }
36898
36968
  };
36899
- const updateStateFromJoltMessage = React.useCallback(message => {
36969
+ const updateStateFromJoltMessage = React.useCallback(async message => {
36900
36970
  try {
36901
36971
  const joltMessageNotificationDataPayload = extractPayloadFromJoltMessage(message);
36902
- fetchNotification(joltMessageNotificationDataPayload.data.id).then(resp => {
36903
- const notification = buildNotificationFromApiResponse(resp.data, resp);
36904
- setNotifications(notifications => [...notifications.filter(candidate => candidate.id !== notification.id), notification]);
36905
- });
36972
+ const resp = await fetchNotification(joltMessageNotificationDataPayload.data.id);
36973
+ if (!(resp === null || resp === void 0 ? void 0 : resp.data)) {
36974
+ return;
36975
+ }
36976
+ const notification = buildNotificationFromApiResponse(resp.data, resp);
36977
+ setNotifications(notifications => [...notifications.filter(candidate => candidate.id !== notification.id), notification]);
36906
36978
  } catch (exception) {
36907
36979
  console.error("topbar encountered error when updating state from jolt message", exception);
36908
36980
  }
@@ -37155,13 +37227,12 @@ function NotificationsComponent({
37155
37227
  const Notifications = {
37156
37228
  component: NotificationsComponent,
37157
37229
  icons: {
37158
- staticDotPath: "M18.2189 6.38867C17.5266 6.13717 16.7795 6 16.0003 6C12.4123 6 9.50363 8.90867 9.50363 12.4967V16.5862L6.54505 19.7387C5.34671 21.0156 6.25205 23.1069 8.0032 23.1069H13.3351C13.7865 24.1303 14.8101 24.8438 16.0002 24.8438C17.1903 24.8438 18.2139 24.1303 18.6653 23.1069H23.9974C25.7485 23.1069 26.6539 21.0156 25.4555 19.7387L22.497 16.5863V13.8102C21.7673 13.622 21.0914 13.2999 20.497 12.8718V16.9821V17.3778L20.7679 17.6664L23.9844 21.0938H8.01618L11.2328 17.6663L11.5036 17.3777V16.982V12.4967C11.5036 10.0132 13.5169 8 16.0003 8C16.7262 8 17.4118 8.17197 18.0188 8.47738C18.0064 8.31988 18.0001 8.16068 18.0001 8C18.0001 7.44181 18.0763 6.90141 18.2189 6.38867ZM8.00384 21.1069L8.0048 21.1059V21.1069H8.00384ZM23.9967 21.1069H23.9952V21.1053L23.9967 21.1069Z",
37159
- staticPath: "M16.0003 6C12.4122 6 9.50357 8.90867 9.50357 12.4967V16.5862L6.54499 19.7387C5.34665 21.0156 6.25199 23.1069 8.00314 23.1069H13.335C13.7864 24.1303 14.81 24.8438 16.0001 24.8438C17.1902 24.8438 18.2138 24.1303 18.6653 23.1069H23.9973C25.7484 23.1069 26.6538 21.0156 25.4554 19.7387L22.497 16.5863V12.4967C22.497 8.90867 19.5883 6 16.0003 6ZM11.5036 12.4967C11.5036 10.0132 13.5168 8 16.0003 8C18.4837 8 20.497 10.0132 20.497 12.4967V16.9821V17.3778L20.7678 17.6664L23.9843 21.0938H8.01612L11.2327 17.6663L11.5036 17.3777V16.982V12.4967ZM8.00474 21.1059L8.00378 21.1069H8.00474V21.1059ZM23.9952 21.1069H23.9966L23.9952 21.1053V21.1069Z"
37230
+ path: "M15.9991 6.0078c1.8733 0.0145 3.6659 0.7729 4.9811 2.1075 1.3154 1.3346 2.0464 3.1362 2.0353 5.011v4.4975l2.5078 2.9931c0.2489 0.2923 0.407 0.6509 0.4586 1.0318 0.0515 0.3809-0.0072 0.7691-0.1711 1.118-0.1528 0.3473-0.4041 0.6421-0.7225 0.8496-0.3182 0.2073-0.69 0.3173-1.0693 0.3156h-4.9781c-0.2428 0.6075-0.6612 1.13-1.2029 1.4981-0.5435 0.3666-1.1828 0.5622-1.8389 0.5622-0.6542 0-1.294-0.1957-1.8357-0.5622-0.4742-0.3221-0.8546-0.7629-1.104-1.275l-0.0989-0.2231h-4.9765c-0.3794 0.0032-0.7527-0.1068-1.071-0.314-0.32-0.2074-0.5712-0.5038-0.7239-0.8512-0.1623-0.3489-0.2226-0.7386-0.1712-1.1196 0.0515-0.3808 0.2111-0.7392 0.4585-1.0318l2.5095-2.9915v-4.4975c-0.0111-1.8733 0.7199-3.6764 2.0352-5.011 1.3136-1.3344 3.105-2.0912 4.978-2.1075z m-0.0047 1.9755c-0.6751 0.0001-1.344 0.1338-1.9677 0.3926-0.6239 0.2589-1.1901 0.6374-1.6677 1.115-0.4776 0.4776-0.8561 1.0438-1.1149 1.6677-0.2587 0.6237-0.3894 1.2926-0.3895 1.9677v4.8351c0 0.2395-0.0844 0.4731-0.2387 0.658l-2.712 3.2475 0.0801 0.1476h16.035l0.0768-0.1507-2.7213-3.246c-0.1544-0.1849-0.2388-0.4184-0.2388-0.6595v-4.832c0-0.6752-0.1338-1.3439-0.3925-1.9677-0.2573-0.6238-0.636-1.1902-1.1134-1.6677-0.4775-0.4775-1.0439-0.8561-1.6677-1.115-0.6239-0.2589-1.2939-0.3926-1.9677-0.3926z"
37160
37231
  },
37161
37232
  name: "Notifications"
37162
37233
  };
37163
37234
 
37164
- const SPARKLE_PATH = "M8.7824 18.8791C8.88371 18.5973 9.26996 18.5973 9.37127 18.8791L9.94256 20.465C10.0222 20.6863 10.1914 20.8616 10.4064 20.9435L11.6779 21.4269L11.9484 21.5304L11.9963 21.5539C12.2205 21.6839 12.2047 22.039 11.9484 22.1369L11.6779 22.2394L10.4064 22.7248C10.1915 22.8068 10.0222 22.9812 9.94256 23.2023L9.37127 24.7893L9.34881 24.8381C9.23098 25.054 8.92273 25.0539 8.80486 24.8381L8.7824 24.7893L8.2111 23.2023C8.14141 23.0088 8.0029 22.8513 7.82536 22.76L7.74723 22.7248L6.47573 22.2394L6.20522 22.1369C5.93172 22.0325 5.93164 21.6347 6.20522 21.5304L6.47476 21.4269L7.74723 20.9435C7.96226 20.8616 8.13147 20.6863 8.2111 20.465L8.7824 18.8791ZM17.5706 8.11138C17.8241 7.40747 18.7928 7.40734 19.0462 8.11138L20.472 12.0782C20.6711 12.6318 21.0952 13.0687 21.6331 13.2735L25.4867 14.7413C26.1711 15.002 26.1711 15.9983 25.4867 16.2589L21.6331 17.7267C21.0952 17.9316 20.6711 18.3684 20.472 18.922L19.2649 22.2785L19.0462 22.8889L18.9905 23.0119C18.6956 23.5517 17.9212 23.5515 17.6262 23.0119L17.5706 22.8889L17.3508 22.2795L16.1448 18.922C15.9457 18.3684 15.5206 17.9316 14.9827 17.7267L11.1291 16.2589C10.4449 15.9982 10.4449 15.0021 11.1291 14.7413L14.9827 13.2735C15.4533 13.0943 15.8379 12.7376 16.0598 12.2804L16.1448 12.0782L17.5706 8.11138ZM18.0266 12.755C17.6351 13.8438 16.7916 14.7249 15.6946 15.1427L14.7551 15.5001L15.6946 15.8575C16.7916 16.2753 17.6351 17.1564 18.0266 18.2453L18.3079 19.0275L18.5891 18.2453C18.9806 17.1564 19.8242 16.2753 20.9212 15.8575L21.8597 15.5001L20.9212 15.1427C19.8242 14.7249 18.9806 13.8439 18.5891 12.755L18.3079 11.9718L18.0266 12.755ZM8.7824 6.21097C8.88388 5.9297 9.26982 5.92966 9.37127 6.21097L9.94256 7.7979C10.0222 8.01911 10.1915 8.19346 10.4064 8.27544L11.6779 8.75982L11.8322 9.16607L11.9484 8.86334C12.2218 8.96779 12.2218 9.36542 11.9484 9.46979L11.6779 9.57233L10.4064 10.0567C10.1914 10.1387 10.0222 10.3139 9.94256 10.5352L9.37127 12.1212C9.26996 12.4029 8.88371 12.4029 8.7824 12.1212L8.2111 10.5352C8.14139 10.3415 8.00304 10.1832 7.82536 10.0919L7.74723 10.0567L6.47573 9.57233L6.20522 9.46979C5.9486 9.37195 5.93265 9.01568 6.15737 8.8858L6.20522 8.86334L7.74723 8.27544C7.96214 8.19346 8.13149 8.0191 8.2111 7.7979L8.69451 6.45413L8.7824 6.21097ZM11.9484 8.86334L11.8322 9.16607L11.6779 8.75982L11.9484 8.86334Z";
37235
+ const SPARKLE_PATH = "M9.2474 19.7799c0.2619-0.0002 0.4863 0.1883 0.5324 0.4459 0.0932 0.527 0.2872 0.904 0.5528 1.17 0.2659 0.2658 0.643 0.4594 1.1699 0.5527 0.2577 0.0457 0.447 0.2708 0.4475 0.5325-0.0001 0.2621-0.1893 0.4869-0.4475 0.5322-0.527 0.0928-0.9041 0.2872-1.1699 0.5529-0.2655 0.2656-0.4594 0.6427-0.5528 1.1698-0.0456 0.2583-0.2701 0.4477-0.5324 0.4475-0.2621-0.0002-0.4869-0.1893-0.5323-0.4475-0.0929-0.5274-0.2858-0.9058-0.5512-1.1714-0.2655-0.2653-0.6432-0.4585-1.1699-0.5513-0.2578-0.0457-0.4459-0.2705-0.446-0.5322 0.0005-0.2616 0.1883-0.4868 0.446-0.5325 0.5271-0.0933 0.9043-0.2856 1.1699-0.5512 0.2655-0.2658 0.4584-0.6442 0.5512-1.1715l0.0251-0.0926c0.077-0.2087 0.278-0.3531 0.5072-0.3533z m9.2369-9.6672c0.469 0 0.8756 0.3248 0.9799 0.7821 0.3678 1.6148 1.0327 2.8589 1.9599 3.7861 0.9272 0.9272 2.1714 1.5921 3.7861 1.9598 0.4573 0.1041 0.7818 0.5109 0.782 0.9799 0 0.4691-0.3247 0.8758-0.782 0.98-1.6146 0.3677-2.859 1.0324-3.7861 1.9597-0.9272 0.9275-1.5921 2.1725-1.9599 3.7878-0.104 0.4575-0.5107 0.782-0.9799 0.782-0.469 0-0.8758-0.3247-0.9799-0.782-0.3677-1.6153-1.0324-2.8602-1.9598-3.7878-0.9275-0.9274-2.1724-1.5921-3.7877-1.9597-0.4574-0.1042-0.782-0.5108-0.7821-0.98 0.0001-0.469 0.3247-0.8758 0.7821-0.9799 1.6155-0.3677 2.8602-1.0325 3.7877-1.9598 0.9274-0.9272 1.5921-2.1714 1.9598-3.7861 0.1042-0.4572 0.511-0.7819 0.9799-0.7821z m0 3.9228c-0.4094 0.7713-0.9141 1.4622-1.5185 2.0666-0.6047 0.6045-1.2964 1.1092-2.0682 1.5185 0.7718 0.4094 1.4635 0.914 2.0682 1.5186 0.6043 0.6042 1.1092 1.2954 1.5185 2.0666 0.4092-0.7712 0.9144-1.4624 1.5186-2.0666 0.6045-0.6046 1.2951-1.1107 2.0666-1.5201-0.7711-0.4093-1.4625-0.9128-2.0666-1.517-0.6043-0.6044-1.1092-1.2953-1.5186-2.0666z m-9.2369-7.2189c0.2594 0 0.4822 0.1849 0.5308 0.4397 0.1282 0.6719 0.3843 1.1692 0.7428 1.5279 0.3588 0.3588 0.8571 0.6145 1.5295 0.7428 0.2546 0.0485 0.4395 0.2716 0.4397 0.5308 0 0.2594-0.1849 0.4822-0.4397 0.5308-0.6725 0.1282-1.1707 0.3839-1.5295 0.7427-0.3589 0.3589-0.6146 0.8571-0.7428 1.5296-0.0486 0.2548-0.2714 0.4397-0.5308 0.4397-0.2592-0.0002-0.4822-0.1851-0.5307-0.4397-0.1282-0.6725-0.3842-1.1707-0.7428-1.5296-0.3585-0.3584-0.8552-0.6146-1.5264-0.7427-0.2548-0.0486-0.4397-0.2714-0.4397-0.5308 0.0002-0.2592 0.1851-0.4822 0.4397-0.5308 0.6714-0.1282 1.1679-0.3841 1.5264-0.7428 0.3585-0.3587 0.6145-0.8558 0.7428-1.5279 0.0485-0.2547 0.2716-0.4395 0.5307-0.4397z";
37165
37236
  // Helpdesk reads this context off the email path to open its email form the
37166
37237
  // same way a handoff inside its own drawer does.
37167
37238
  function emailPathWithContext(context = {}) {
@@ -37303,9 +37374,9 @@ function LoadError({
37303
37374
  const Picobot = {
37304
37375
  component: PicobotComponent,
37305
37376
  icons: {
37306
- staticDotPath: SPARKLE_PATH,
37307
- staticPath: SPARKLE_PATH
37377
+ path: SPARKLE_PATH
37308
37378
  },
37379
+ label: "Ask AI",
37309
37380
  name: "Picobot"
37310
37381
  };
37311
37382
 
@@ -37510,8 +37581,7 @@ function JoltEffectV1({
37510
37581
  const Tasks = {
37511
37582
  component: TasksComponent,
37512
37583
  icons: {
37513
- staticDotPath: "M18.3414 6H13.5C12.6716 6 12 6.67157 12 7.5V8H9C7.89543 8 7 8.89543 7 10V24C7 25.1046 7.89543 26 9 26H23C24.1046 26 25 25.1046 25 24V13.917C24.6748 13.9716 24.3407 14 24 14C23.6593 14 23.3252 13.9716 23 13.917V24H9L9 10H12V10.5C12 11.3284 12.6716 12 13.5 12H18.5C18.8029 12 19.0848 11.9102 19.3206 11.7558C18.4944 10.7277 18 9.4216 18 8C18 7.29873 18.1203 6.62556 18.3414 6ZM18 8H14V10H18V8ZM19.0556 14.1464C18.8603 13.9512 18.5437 13.9512 18.3485 14.1464L15.0724 17.4226L13.6642 16.0144C13.469 15.8192 13.1524 15.8192 12.9571 16.0144L11.9433 17.0282C11.7481 17.2235 11.7481 17.5401 11.9433 17.7353L14.7167 20.5088C14.8665 20.6585 15.0875 20.6934 15.2705 20.6135C15.3278 20.5892 15.3814 20.5536 15.4282 20.5069L20.0686 15.8665C20.2638 15.6713 20.2638 15.3547 20.0686 15.1594L19.0556 14.1464Z",
37514
- staticPath: "M14 8V10H18V8H14ZM13.5 6C12.6716 6 12 6.67157 12 7.5V8H9C7.89543 8 7 8.89543 7 10V24C7 25.1046 7.89543 26 9 26H23C24.1046 26 25 25.1046 25 24V10C25 8.89543 24.1046 8 23 8H20V7.5C20 6.67157 19.3284 6 18.5 6H13.5ZM20 10.5V10H23V24H9L9 10H12V10.5C12 11.3284 12.6716 12 13.5 12H18.5C19.3284 12 20 11.3284 20 10.5ZM18.3485 14.1464C18.5437 13.9512 18.8603 13.9512 19.0556 14.1464L20.0686 15.1594C20.2638 15.3547 20.2638 15.6713 20.0686 15.8665L15.4282 20.5069C15.3814 20.5536 15.3278 20.5892 15.2705 20.6135C15.0875 20.6934 14.8665 20.6585 14.7167 20.5088L11.9433 17.7353C11.7481 17.5401 11.7481 17.2235 11.9433 17.0282L12.9571 16.0144C13.1524 15.8192 13.469 15.8192 13.6642 16.0144L15.0724 17.4226L18.3485 14.1464Z"
37584
+ path: "M18.4215 14.5192c0.3756-0.4084 1.0126-0.4352 1.4212-0.0597 0.408 0.3755 0.4345 1.0111 0.0597 1.4196l-3.8537 4.1929c-0.358 0.389-0.957 0.4347-1.3694 0.1037l-2.4827-1.9944c-0.4327-0.3476-0.5014-0.9806-0.1539-1.4134 0.3476-0.4324 0.9807-0.5014 1.4133-0.1539l1.7478 1.404z m-0.3078-8.5114c1.1852 0.0002 2.1569 0.9114 2.255 2.0713h0.9015l0.3282 0.0157c0.7593 0.0756 1.4736 0.4121 2.0178 0.9564 0.6218 0.6221 0.9706 1.4666 0.9706 2.3461v11.2783c-0.0002 0.8798-0.3485 1.7242-0.9706 2.3461-0.622 0.622-1.4664 0.9705-2.346 0.9705h-10.5388c-0.8796 0-1.724-0.3486-2.3461-0.9705-0.622-0.622-0.972-1.4664-0.9721-2.3461v-11.2799c0-0.8798 0.35-1.724 0.9721-2.3461 0.6221-0.6221 1.4663-0.9721 2.3461-0.972h0.9108c0.0988-1.1593 1.0702-2.0697 2.2551-2.0698z m-7.3823 4.0798c-0.3467 0-0.6798 0.138-0.9249 0.3832-0.2451 0.2452-0.3832 0.5783-0.3832 0.9249v11.2799c0.0001 0.3467 0.1381 0.6799 0.3832 0.9249 0.2451 0.2449 0.5785 0.3816 0.9249 0.3816h10.5388c0.3462 0 0.6783-0.137 0.9233-0.3816 0.2451-0.2451 0.383-0.5783 0.3832-0.9249v-11.2783c0-0.3467-0.1381-0.6798-0.3832-0.9249-0.2145-0.2144-0.4956-0.3471-0.7947-0.3769l-0.1286-0.0063h-0.892v0.1822c-0.0003 1.25-1.0145 2.2627-2.2645 2.2628h-4.2164c-1.2502 0-2.2641-1.0127-2.2645-2.2628v-0.1838z m3.1659-2.0697c-0.1403 0-0.2544 0.1141-0.2544 0.2544v1.9991c0.0003 0.14 0.1143 0.2528 0.2544 0.2528h4.2164c0.1399-0.0002 0.2541-0.1129 0.2544-0.2528v-1.1731c-0.0001-0.0047-0.0016-0.0094-0.0016-0.0141 0-0.0052 0.0015-0.0105 0.0016-0.0157v-0.7962c0-0.1402-0.1143-0.2542-0.2544-0.2544z"
37515
37585
  },
37516
37586
  name: "Tasks"
37517
37587
  };
@@ -37634,8 +37704,7 @@ function ChatTool({
37634
37704
  const Chat = {
37635
37705
  component: ChatTool,
37636
37706
  icons: {
37637
- staticDotPath: "M26 13.6586V19C26 20.6569 24.6569 22 23 22H18.9997L17.4141 23.5856L15.9998 24.9998L14.5856 23.5856L13 22H9C7.34315 22 6 20.6569 6 19V10C6 8.34315 7.34315 7 9 7H18.083C18.0284 7.32521 18 7.65929 18 8C18 8.34071 18.0284 8.67479 18.083 9H9C8.44772 9 8 9.44772 8 10V19C8 19.5523 8.44772 20 9 20H13H13.8284L14.4142 20.5858L15.9998 22.1714L17.5855 20.5858L18.1713 20H18.9997H23C23.5523 20 24 19.5523 24 19V14C24.7013 14 25.3744 13.8797 26 13.6586Z",
37638
- staticPath: "M13.8284 20L15.9998 22.1714L18.1713 20H23C23.5523 20 24 19.5523 24 19V10C24 9.44772 23.5523 9 23 9H9C8.44772 9 8 9.44772 8 10V19C8 19.5523 8.44772 20 9 20H13.8284ZM15.9998 24.9998L13 22H9C7.34315 22 6 20.6569 6 19V10C6 8.34315 7.34315 7 9 7H23C24.6569 7 26 8.34315 26 10V19C26 20.6569 24.6569 22 23 22H18.9997L15.9998 24.9998Z"
37707
+ path: "M23.0509 7.005c0.7801 0 1.5293 0.3105 2.0808 0.8621 0.5512 0.5515 0.8605 1.2994 0.8605 2.0792v8.5898c0 0.7797-0.3092 1.5276-0.8605 2.0792-0.5516 0.5516-1.3008 0.8621-2.0808 0.8621h-2.9884l-4.0672 3.5176-4.0688-3.5176h-2.9774c-0.78 0-1.5276-0.3105-2.0792-0.8621-0.5516-0.5516-0.8621-1.2991-0.8621-2.0792v-8.5898c0-0.78 0.3106-1.5276 0.8621-2.0792 0.5516-0.5516 1.2991-0.8621 2.0792-0.8621z m-14.1018 2.01c-0.2469 0-0.4834 0.0986-0.658 0.2733-0.1746 0.1746-0.2732 0.411-0.2732 0.658v8.5898c0 0.2469 0.0986 0.4834 0.2732 0.658 0.1746 0.1746 0.411 0.2732 0.658 0.2733h3.7265l0.2842 0.2449 3.034 2.6241 3.0355-2.6241 0.2842-0.2449h3.7374c0.247 0 0.485-0.0986 0.6596-0.2733 0.1743-0.1746 0.2716-0.4113 0.2716-0.658v-8.5898c0-0.2467-0.0973-0.4834-0.2716-0.658-0.1746-0.1746-0.4126-0.2732-0.6596-0.2733z"
37639
37708
  },
37640
37709
  name: "Chat",
37641
37710
  storageExemptPaths: ["blankstate"]
@@ -37742,8 +37811,7 @@ const usePicobotConfig = ({
37742
37811
  const Profile = {
37743
37812
  component: UserProfile,
37744
37813
  icons: {
37745
- staticDotPath: "",
37746
- staticPath: ""
37814
+ path: ""
37747
37815
  },
37748
37816
  name: "Profile"
37749
37817
  };
@@ -37809,13 +37877,14 @@ function Toolbar({
37809
37877
  } = state;
37810
37878
  const mounted = !!currentContent;
37811
37879
  const storeData = useStore();
37880
+ const devStoreDataOverride = env === "development" ? _storeDataOverride !== null && _storeDataOverride !== void 0 ? _storeDataOverride : {} : {};
37812
37881
  const {
37813
37882
  indicatorVisible,
37814
37883
  joltPromise,
37815
37884
  userId
37816
37885
  } = {
37817
37886
  ...storeData,
37818
- ...(env === "development" ? _storeDataOverride !== null && _storeDataOverride !== void 0 ? _storeDataOverride : {} : {})
37887
+ ...devStoreDataOverride
37819
37888
  };
37820
37889
  const updateStore = useUpdateStore();
37821
37890
  const {
@@ -38073,22 +38142,26 @@ function Toolbar({
38073
38142
  };
38074
38143
  const indicatorState = {
38075
38144
  ...indicatorVisible,
38076
- Chat: unreadIndicator
38145
+ Chat: unreadIndicator,
38146
+ // Chat's dot comes from its own config, so a dev override has to land last.
38147
+ ...devStoreDataOverride.indicatorVisible
38077
38148
  };
38078
38149
  return /*#__PURE__*/React.createElement(tapestryReact.ThemeProvider, {
38079
38150
  theme: topbarTheme
38080
38151
  }, /*#__PURE__*/React.createElement(addOns.UiExtensionDataContext, null, /*#__PURE__*/React.createElement("div", {
38081
38152
  className: styles$2["toolbar"],
38082
38153
  "data-pendo": "toolbar-profile-support-wrapper"
38083
- }, /*#__PURE__*/React.createElement(ToolbarButton, {
38084
- "aria-label": `Open ${userName}’s profile drawer`,
38154
+ }, /*#__PURE__*/React.createElement(ToolbarDrawerButton, {
38155
+ tooltip: "Profile",
38156
+ "aria-label": `Profile, ${userName}`,
38085
38157
  onClick: () => toggleDrawer(Profile),
38086
38158
  "data-pendo": "toolbar-profile",
38087
- className: styles$2["toolbar-button--avatar"]
38088
- }, /*#__PURE__*/React.createElement(Avatar, {
38089
- env: env,
38090
- url: userAvatarPath
38091
- })), /*#__PURE__*/React.createElement(ToolbarButton, {
38159
+ className: styles$2["toolbar-button--avatar"],
38160
+ icon: /*#__PURE__*/React.createElement(Avatar, {
38161
+ env: env,
38162
+ url: userAvatarPath
38163
+ })
38164
+ }), /*#__PURE__*/React.createElement(ToolbarButton, {
38092
38165
  className: styles$2["toolbar-button--home"],
38093
38166
  onClick: () => closeDrawer()
38094
38167
  }, /*#__PURE__*/React.createElement(tapestryReact.Icon, {
@@ -38098,17 +38171,18 @@ function Toolbar({
38098
38171
  var _a;
38099
38172
  const current = open && currentContent === tool;
38100
38173
  const indicator = indicatorState[tool.name];
38101
- return /*#__PURE__*/React.createElement(ToolbarButton, {
38174
+ return /*#__PURE__*/React.createElement(ToolbarDrawerButton, {
38102
38175
  current: current,
38103
38176
  onClick: () => handleToolOnClick(tool),
38104
38177
  id: getDataPendoAttribute(tool.name),
38105
- "aria-label": `Open ${(_a = tool.label) !== null && _a !== void 0 ? _a : tool.name} drawer`,
38178
+ tooltip: (_a = tool.label) !== null && _a !== void 0 ? _a : tool.name,
38106
38179
  "data-pendo": getDataPendoAttribute(tool.name),
38107
- key: tool.name
38108
- }, /*#__PURE__*/React.createElement(ToolbarToolIcon, {
38109
- icons: tool.icons,
38110
- dot: !!indicator
38111
- }));
38180
+ key: tool.name,
38181
+ icon: /*#__PURE__*/React.createElement(ToolbarToolIcon, {
38182
+ icons: tool.icons,
38183
+ dot: !!indicator
38184
+ })
38185
+ });
38112
38186
  })), /*#__PURE__*/React.createElement(DrawerWrap, {
38113
38187
  isVisible: open
38114
38188
  }, mounted && (/*#__PURE__*/React.createElement(Drawer, {
@@ -38132,6 +38206,24 @@ const ToolbarButton = ({
38132
38206
  ...restProps
38133
38207
  }, children);
38134
38208
  };
38209
+ const ToolbarDrawerButton = ({
38210
+ "aria-label": ariaLabel,
38211
+ className,
38212
+ current = false,
38213
+ tooltip,
38214
+ ...restProps
38215
+ }) => {
38216
+ // Below 600px the toolbar sits along the bottom, where tooltips get in the way.
38217
+ const isSideToolbar = useMediaQuery("(min-width: 600px)");
38218
+ return /*#__PURE__*/React.createElement(tapestry.IconButton, {
38219
+ className: classnames(styles$2["toolbar-button"], className, current && styles$2["is-current"]),
38220
+ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : tooltip,
38221
+ tooltip: isSideToolbar ? tooltip : undefined,
38222
+ tooltipPlacement: "left",
38223
+ "data-toolbar-link": "true",
38224
+ ...restProps
38225
+ });
38226
+ };
38135
38227
  function ToolbarToolIcon({
38136
38228
  dot,
38137
38229
  icons
@@ -38140,31 +38232,57 @@ function ToolbarToolIcon({
38140
38232
  return /*#__PURE__*/React.createElement(icons.component, null);
38141
38233
  } else {
38142
38234
  return /*#__PURE__*/React.createElement(ToolbarButtonIcon, {
38143
- path: dot ? icons.staticDotPath : icons.staticPath,
38235
+ path: icons.path,
38144
38236
  dot: dot
38145
38237
  });
38146
38238
  }
38147
38239
  }
38240
+ // The dot sits on the icon's top-right corner. A mask knocks a transparent
38241
+ // ring out of the glyph around it, so the gap reads correctly on any button
38242
+ // background (hover, current, dark mode) without a second, pre-cut path.
38243
+ const DOT = {
38244
+ cx: 24,
38245
+ cy: 8,
38246
+ gap: 2,
38247
+ r: 4
38248
+ };
38249
+ // React 17 has no useId, and mask ids are document-global: count instead so
38250
+ // several toolbars (or icons) on one page never share a mask.
38251
+ let dotMaskCount = 0;
38148
38252
  function ToolbarButtonIcon({
38149
38253
  dot,
38150
38254
  path
38151
38255
  }) {
38256
+ const [maskId] = React.useState(() => `topbar-toolbar-dot-mask-${++dotMaskCount}`);
38152
38257
  return /*#__PURE__*/React.createElement("svg", {
38153
38258
  "aria-hidden": "true",
38154
38259
  width: "32",
38155
38260
  height: "32",
38156
38261
  viewBox: "0 0 32 32",
38157
38262
  xmlns: "http://www.w3.org/2000/svg"
38158
- }, /*#__PURE__*/React.createElement("path", {
38263
+ }, dot && (/*#__PURE__*/React.createElement("mask", {
38264
+ id: maskId,
38265
+ maskUnits: "userSpaceOnUse"
38266
+ }, /*#__PURE__*/React.createElement("rect", {
38267
+ width: "32",
38268
+ height: "32",
38269
+ fill: "white"
38270
+ }), /*#__PURE__*/React.createElement("circle", {
38271
+ cx: DOT.cx,
38272
+ cy: DOT.cy,
38273
+ r: DOT.r + DOT.gap,
38274
+ fill: "black"
38275
+ }))), /*#__PURE__*/React.createElement("path", {
38159
38276
  fill: "currentColor",
38160
38277
  fillRule: "evenodd",
38161
38278
  clipRule: "evenodd",
38162
- d: path
38279
+ d: path,
38280
+ mask: dot ? `url(#${maskId})` : undefined
38163
38281
  }), dot && (/*#__PURE__*/React.createElement("circle", {
38164
38282
  fill: "var(--t-icon-color-status-error)",
38165
- cx: "24",
38166
- cy: "8",
38167
- r: "4"
38283
+ cx: DOT.cx,
38284
+ cy: DOT.cy,
38285
+ r: DOT.r
38168
38286
  })));
38169
38287
  }
38170
38288
  function getDataPendoAttribute(toolName) {