@the-portland-company/shell 0.16.1 → 0.16.3

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/chrome.css CHANGED
@@ -349,3 +349,38 @@
349
349
  font-weight: 400;
350
350
  line-height: 1;
351
351
  }
352
+
353
+ /* DevNotes (and any widget-slot popover) — dark-theme inheritance. The
354
+ package's compiled sheet hardcodes light utility colors (bg-white,
355
+ text-gray-*, border-gray-*), so its dropdown rendered light-on-dark. Remap
356
+ those inside the slot to the chrome tokens under `.dark`. */
357
+ .dark .topbar-widget-slot [class*="bg-white"] {
358
+ background-color: var(--panel-elevated);
359
+ }
360
+ .dark .topbar-widget-slot [class*="text-gray-9"],
361
+ .dark .topbar-widget-slot [class*="text-gray-8"],
362
+ .dark .topbar-widget-slot [class*="text-gray-7"],
363
+ .dark .topbar-widget-slot [class*="text-slate-9"],
364
+ .dark .topbar-widget-slot [class*="text-slate-8"] {
365
+ color: var(--foreground);
366
+ }
367
+ .dark .topbar-widget-slot [class*="text-gray-6"],
368
+ .dark .topbar-widget-slot [class*="text-gray-5"],
369
+ .dark .topbar-widget-slot [class*="text-gray-4"],
370
+ .dark .topbar-widget-slot [class*="text-slate-5"] {
371
+ color: var(--muted);
372
+ }
373
+ .dark .topbar-widget-slot [class*="border-gray-"],
374
+ .dark .topbar-widget-slot [class*="border-slate-"] {
375
+ border-color: var(--line);
376
+ }
377
+ .dark .topbar-widget-slot [class*="bg-gray-50"],
378
+ .dark .topbar-widget-slot [class*="bg-gray-100"],
379
+ .dark .topbar-widget-slot [class*="bg-slate-50"],
380
+ .dark .topbar-widget-slot [class*="bg-slate-100"] {
381
+ background-color: var(--panel);
382
+ }
383
+ .dark .topbar-widget-slot [class*="hover:bg-gray-"]:hover,
384
+ .dark .topbar-widget-slot [class*="hover:bg-slate-"]:hover {
385
+ background-color: var(--panel);
386
+ }
package/dist/native.cjs CHANGED
@@ -3,6 +3,7 @@
3
3
 
4
4
  var react = require('react');
5
5
  var fi = require('react-icons/fi');
6
+ var reactDom = require('react-dom');
6
7
  var jsxRuntime = require('react/jsx-runtime');
7
8
 
8
9
  // src/native/index.tsx
@@ -153,6 +154,15 @@ function TopBarTooltip({
153
154
  }
154
155
  );
155
156
  }
157
+ function TopBarPanelArrow() {
158
+ return /* @__PURE__ */ jsxRuntime.jsx(
159
+ "span",
160
+ {
161
+ "aria-hidden": true,
162
+ className: "absolute -top-[5px] right-[11px] h-2.5 w-2.5 rotate-45 border-l border-t border-[color:var(--line)] bg-[color:var(--panel-elevated)]"
163
+ }
164
+ );
165
+ }
156
166
  function TopBarWidgetSlot({
157
167
  title,
158
168
  description,
@@ -311,14 +321,17 @@ function TopBarPopover({
311
321
  ]
312
322
  }
313
323
  ),
314
- open ? /* @__PURE__ */ jsxRuntime.jsx(
324
+ open ? /* @__PURE__ */ jsxRuntime.jsxs(
315
325
  "div",
316
326
  {
317
327
  className: [
318
- "absolute right-0 z-40 mt-2 overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] shadow-[var(--shadow-soft)]",
328
+ "absolute right-0 z-40 mt-2 rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] shadow-[var(--shadow-soft)]",
319
329
  panelClassName ?? "w-80"
320
330
  ].join(" "),
321
- children
331
+ children: [
332
+ /* @__PURE__ */ jsxRuntime.jsx(TopBarPanelArrow, {}),
333
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-xl", children })
334
+ ]
322
335
  }
323
336
  ) : null
324
337
  ] });
@@ -545,66 +558,69 @@ function SupportAction() {
545
558
  ]
546
559
  }
547
560
  ),
548
- open ? /* @__PURE__ */ jsxRuntime.jsx(
549
- "div",
550
- {
551
- className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
552
- role: "dialog",
553
- "aria-modal": "true",
554
- "aria-label": "Support request",
555
- onMouseDown: (e) => {
556
- if (e.target === e.currentTarget) close();
557
- },
558
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full max-w-md rounded-2xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] p-6 shadow-[var(--shadow-soft)]", children: [
559
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold tracking-[-0.01em] text-[color:var(--foreground)]", children: "Contact Support" }),
560
- state === "sent" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
561
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-[color:var(--muted)]", children: "Your request was sent. The team will reply by email." }),
562
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
563
- "button",
564
- {
565
- type: "button",
566
- onClick: close,
567
- className: "rounded-full bg-[color:var(--color-race-red)] px-4 py-2 text-sm font-semibold text-white hover:opacity-90",
568
- children: "Done"
569
- }
570
- ) })
571
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
572
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-[color:var(--muted)]", children: "Describe the problem or question. Your account details ride along automatically." }),
573
- /* @__PURE__ */ jsxRuntime.jsx(
574
- "textarea",
575
- {
576
- value: message,
577
- onChange: (e) => setMessage(e.target.value),
578
- rows: 5,
579
- placeholder: "How can we help?",
580
- className: "mt-4 w-full resize-y rounded-lg border border-[color:var(--line)] bg-[color:var(--panel)] px-3 py-2 text-sm text-[color:var(--foreground)] placeholder:text-[color:var(--muted)] focus:outline-none focus:ring-2 focus:ring-[color:var(--color-race-red)]"
581
- }
582
- ),
583
- state === "error" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-[color:var(--color-race-red)]", children: "Sending failed \u2014 try again." }) : null,
584
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
585
- /* @__PURE__ */ jsxRuntime.jsx(
561
+ open && typeof document !== "undefined" ? reactDom.createPortal(
562
+ /* @__PURE__ */ jsxRuntime.jsx(
563
+ "div",
564
+ {
565
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
566
+ role: "dialog",
567
+ "aria-modal": "true",
568
+ "aria-label": "Support request",
569
+ onMouseDown: (e) => {
570
+ if (e.target === e.currentTarget) close();
571
+ },
572
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full max-w-md rounded-2xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] p-6 shadow-[var(--shadow-soft)]", children: [
573
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-bold tracking-[-0.01em] text-[color:var(--foreground)]", children: "Contact Support" }),
574
+ state === "sent" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
575
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-3 text-sm text-[color:var(--muted)]", children: "Your request was sent. The team will reply by email." }),
576
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
586
577
  "button",
587
578
  {
588
579
  type: "button",
589
580
  onClick: close,
590
- className: "rounded-full border border-[color:var(--line)] px-4 py-2 text-sm font-semibold text-[color:var(--foreground)] hover:bg-[color:var(--panel)]",
591
- children: "Cancel"
581
+ className: "rounded-full bg-[color:var(--color-race-red)] px-4 py-2 text-sm font-semibold text-white hover:opacity-90",
582
+ children: "Done"
592
583
  }
593
- ),
584
+ ) })
585
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
586
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-[color:var(--muted)]", children: "Describe the problem or question. Your account details ride along automatically." }),
594
587
  /* @__PURE__ */ jsxRuntime.jsx(
595
- "button",
588
+ "textarea",
596
589
  {
597
- type: "button",
598
- onClick: submit,
599
- disabled: !message.trim() || state === "sending",
600
- className: "rounded-full bg-[color:var(--color-race-red)] px-4 py-2 text-sm font-semibold text-white transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
601
- children: state === "sending" ? "Sending\u2026" : "Send request"
590
+ value: message,
591
+ onChange: (e) => setMessage(e.target.value),
592
+ rows: 5,
593
+ placeholder: "How can we help?",
594
+ className: "mt-4 w-full resize-y rounded-lg border border-[color:var(--line)] bg-[color:var(--panel)] px-3 py-2 text-sm text-[color:var(--foreground)] placeholder:text-[color:var(--muted)] focus:outline-none focus:ring-2 focus:ring-[color:var(--color-race-red)]"
602
595
  }
603
- )
596
+ ),
597
+ state === "error" ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-[color:var(--color-race-red)]", children: "Sending failed \u2014 try again." }) : null,
598
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 flex justify-end gap-2", children: [
599
+ /* @__PURE__ */ jsxRuntime.jsx(
600
+ "button",
601
+ {
602
+ type: "button",
603
+ onClick: close,
604
+ className: "rounded-full border border-[color:var(--line)] px-4 py-2 text-sm font-semibold text-[color:var(--foreground)] hover:bg-[color:var(--panel)]",
605
+ children: "Cancel"
606
+ }
607
+ ),
608
+ /* @__PURE__ */ jsxRuntime.jsx(
609
+ "button",
610
+ {
611
+ type: "button",
612
+ onClick: submit,
613
+ disabled: !message.trim() || state === "sending",
614
+ className: "rounded-full bg-[color:var(--color-race-red)] px-4 py-2 text-sm font-semibold text-white transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
615
+ children: state === "sending" ? "Sending\u2026" : "Send request"
616
+ }
617
+ )
618
+ ] })
604
619
  ] })
605
620
  ] })
606
- ] })
607
- }
621
+ }
622
+ ),
623
+ document.body
608
624
  ) : null
609
625
  ] });
610
626
  }
@@ -1229,7 +1245,7 @@ function NavTopBar({
1229
1245
  themeToggle,
1230
1246
  /* @__PURE__ */ jsxRuntime.jsxs("details", { className: "group/acct relative", children: [
1231
1247
  /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "group/tbtip relative flex cursor-pointer list-none items-center gap-2.5 rounded-full py-1 pl-1 pr-2 transition hover:bg-[color:var(--panel-elevated)] [&::-webkit-details-marker]:hidden", children: [
1232
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-9 w-9 items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-race-red)] text-xs font-bold text-white", children: user?.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: user.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : initials }),
1248
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-[var(--topbar-icon-button-size,32px)] w-[var(--topbar-icon-button-size,32px)] items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-race-red)] text-xs font-bold text-white", children: user?.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: user.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : initials }),
1233
1249
  /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden flex-col leading-tight md:flex", children: [
1234
1250
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-[color:var(--foreground)]", children: user?.name ?? "Signed in" }),
1235
1251
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[color:var(--muted)]", children: secondary })
@@ -1251,7 +1267,8 @@ function NavTopBar({
1251
1267
  }
1252
1268
  ) })
1253
1269
  ] }),
1254
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 z-30 mt-2 w-72 overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: [
1270
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute right-0 z-30 mt-2 w-72 rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: [
1271
+ /* @__PURE__ */ jsxRuntime.jsx(TopBarPanelArrow, {}),
1255
1272
  userMenu?.myProfileHref ? /* @__PURE__ */ jsxRuntime.jsxs(
1256
1273
  "a",
1257
1274
  {
@@ -1572,6 +1589,7 @@ exports.NavTopBar = NavTopBar;
1572
1589
  exports.NotificationsAction = NotificationsAction;
1573
1590
  exports.SupportAction = SupportAction;
1574
1591
  exports.TopBarCountBadge = TopBarCountBadge;
1592
+ exports.TopBarPanelArrow = TopBarPanelArrow;
1575
1593
  exports.TopBarTooltip = TopBarTooltip;
1576
1594
  exports.TopBarWidgetSlot = TopBarWidgetSlot;
1577
1595
  exports.envChipClasses = envChipClasses;