@helloimjolopez-pathway/pathway-components 0.7.2 → 0.8.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.
@@ -385,26 +385,28 @@ export function ModuleIcon({
385
385
  }
386
386
 
387
387
  /**
388
- * Module.Mark, Size=Large, Style=Emphasis (Figma): the module's mark in a 28
389
- * tinted box beside its name. Used in the SideNav header of a module shell.
390
- * box 28, CornerRadius/Small, Fill/Static/Brand/Faint
391
- * glyph ModuleIcon at 20, mono, Fill/Static/Brand/Strongest
392
- * label 16 / 600, Fill/Static/Brand/Strongest, gap Gap/XXTight
388
+ * Module.Mark (Figma): the module's mark in a 22 tinted box beside its name.
389
+ * Used in the SideNav header of a module shell (SideNav.Local.Accounting,
390
+ * read 2026-11-12).
391
+ * box 22, CornerRadius/Small, Fill/Static/Brand/Faint
392
+ * glyph ModuleIcon at 16, mono, Fill/Static/Brand/Strongest
393
+ * label Text/Body/Small/Semibold: 14 / 600 / 20 / 0.3 (the repo's `spacious`),
394
+ * Fill/Static/Brand/Strongest, gap Gap/XXTight
393
395
  */
394
396
  export function ModuleMark({ module, label }) {
395
397
  const ink = "var(--semantic-color-fill-static-brand-strongest)";
396
398
  return (
397
399
  <span style={{ display: "inline-flex", alignItems: "center", minWidth: 0,
398
400
  gap: "var(--semantic-layout-units-gap-xxtight)", paddingRight: "var(--semantic-layout-units-padding-xxxtight)" }}>
399
- <span aria-hidden="true" style={{ width: 28, height: 28, flexShrink: 0, display: "inline-flex",
401
+ <span aria-hidden="true" style={{ width: 22, height: 22, flexShrink: 0, display: "inline-flex",
400
402
  alignItems: "center", justifyContent: "center",
401
403
  borderRadius: "var(--semantic-layout-units-cornerradius-small)",
402
404
  background: "var(--semantic-color-fill-static-brand-faint)", color: ink }}>
403
- <ModuleIcon module={module} size={20} color="mono" />
405
+ <ModuleIcon module={module} size={16} color="mono" />
404
406
  </span>
405
407
  <span style={{ fontFamily: "var(--semantic-type-family-brand)", fontWeight: "var(--semantic-type-weight-semibold)",
406
- fontSize: "var(--semantic-type-font-size-r)", lineHeight: "var(--semantic-type-line-height-r-single)",
407
- color: ink, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{label}</span>
408
+ fontSize: "var(--semantic-type-font-size-s)", lineHeight: "var(--semantic-type-line-height-s-single)",
409
+ letterSpacing: "var(--semantic-type-letter-spacing-spacious)", color: ink, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }}>{label}</span>
408
410
  </span>
409
411
  );
410
412
  }
@@ -89,6 +89,10 @@ export function NavShell({
89
89
  user,
90
90
  onModuleSelect,
91
91
  onOrgSelect,
92
+ // TopNav Slot.RowEnd. Undefined follows the module: an appSwitcher may carry
93
+ // `topNav: { showSearch, showActions }` (Accounting turns both off).
94
+ showSearch,
95
+ showActions,
92
96
 
93
97
  // SideNav
94
98
  navItems,
@@ -233,6 +237,8 @@ export function NavShell({
233
237
  onModuleSelect={onModuleSelect}
234
238
  onOrgSelect={onOrgSelect}
235
239
  onSideNavToggle={handleSideNavToggle}
240
+ showSearch={showSearch ?? (appSwitcher && appSwitcher.topNav && appSwitcher.topNav.showSearch) ?? true}
241
+ showActions={showActions ?? (appSwitcher && appSwitcher.topNav && appSwitcher.topNav.showActions) ?? true}
236
242
  />
237
243
  </div>
238
244
 
@@ -51,6 +51,9 @@ export const ACCOUNTING_APP_SWITCHER = {
51
51
  icon: "apps",
52
52
  // The module's mark in the SideNav header (Figma Module.Mark, Accounting).
53
53
  moduleMark: { module: "accounting", label: "Financials" },
54
+ // The Accounting TopNav is TopNav.Global with Search and Actions hidden
55
+ // (Figma 40007879:18072): module switcher, org switcher and profile only.
56
+ topNav: { showSearch: false, showActions: false },
54
57
  // Title of the mobile BottomSheet (Figma "Financial Applications").
55
58
  sheetTitle: "Financial Applications",
56
59
  home: { id: "financials-home", label: "Financials Home",
@@ -1137,13 +1137,18 @@ export function SideNav({
1137
1137
  // inset the thumb by 16px expanded / 12px on the 72px rail, badly off on the rail).
1138
1138
  // negated through calc() because these are var() references, and negating
1139
1139
  // a string would produce NaN
1140
- marginRight: neg(collapsed ? L.navColPadH : L.navPadH) }}
1140
+ marginRight: neg(collapsed ? L.navColPadH : L.navPadH),
1141
+ // The rows' focus ring hugs their edge, outside it, so the scroll view
1142
+ // (which clips) starts one ring-width further left and pads it back:
1143
+ // nothing moves, and the ring's left edge is no longer cut off.
1144
+ marginLeft: neg("var(--contextual-layout-units-focusring-width)") }}
1141
1145
  viewStyle={{ display: "flex", flexDirection: "column", gap: L.menuGap,
1142
1146
  paddingTop: L.menuPadT,
1143
1147
  // Re-add the content's right inset INSIDE the scroll view so items keep their
1144
1148
  // position; only the thumb moves to the edge. (Spec rule: padding on viewStyle,
1145
1149
  // never on the wrapper, keeps the thumb flush on any scroll surface.)
1146
- paddingRight: collapsed ? L.navColPadH : L.navPadH }}
1150
+ paddingRight: collapsed ? L.navColPadH : L.navPadH,
1151
+ paddingLeft: "var(--contextual-layout-units-focusring-width)" }}
1147
1152
  >
1148
1153
 
1149
1154
  {appSwitcher && <AppSwitcher {...appSwitcher} collapsed={collapsed} />}
@@ -1030,6 +1030,10 @@ function TopNavNewCo({ navRef, className, breakpoint, org, user, openPanel, togg
1030
1030
  * onSideNavToggle, () => void (mobile only)
1031
1031
  * actions, Array<{icon, label, onClick}> Figma TopNav.Actions slot (default: two bells).
1032
1032
  * On mobile, more than one folds into more_vert.
1033
+ * showSearch, boolean, default true. Figma TopNav.Search in Slot.RowEnd.
1034
+ * showActions, boolean, default true. Figma TopNav.Actions in Slot.RowEnd.
1035
+ * A module whose bar hides them in Figma turns them off
1036
+ * (Accounting, 40007879:18072: module, org and profile only).
1033
1037
  * onNotifications, () => void
1034
1038
  * onMore, () => void
1035
1039
  * className, string
@@ -1054,6 +1058,8 @@ export function TopNav({
1054
1058
  onSearchOpen,
1055
1059
  onSideNavToggle,
1056
1060
  actions,
1061
+ showSearch = true,
1062
+ showActions = true,
1057
1063
  onNotifications,
1058
1064
  onMore,
1059
1065
  className = "",
@@ -1259,15 +1265,17 @@ export function TopNav({
1259
1265
  {/* Collapsed search pill. Opening it triggers the full-bar takeover
1260
1266
  overlay below (never an inline expand), so it cannot overlap the
1261
1267
  OrgSwitcher. */}
1262
- <TopNavSearch
1263
- expanded={false}
1264
- onExpandChange={setSearchExpanded}
1265
- breakpoint={breakpoint}
1266
- onSearchOpen={onSearchOpen}
1267
- searchProps={{ value: searchQuery, onChange: setSearchQuery, onClear: () => setSearchQuery("") }}
1268
- />
1268
+ {showSearch && (
1269
+ <TopNavSearch
1270
+ expanded={false}
1271
+ onExpandChange={setSearchExpanded}
1272
+ breakpoint={breakpoint}
1273
+ onSearchOpen={onSearchOpen}
1274
+ searchProps={{ value: searchQuery, onChange: setSearchQuery, onClear: () => setSearchQuery("") }}
1275
+ />
1276
+ )}
1269
1277
 
1270
- <TopNavActions breakpoint={breakpoint} actions={actions} onNotifications={onNotifications} onMore={onMore} />
1278
+ {showActions && <TopNavActions breakpoint={breakpoint} actions={actions} onNotifications={onNotifications} onMore={onMore} />}
1271
1279
 
1272
1280
  <TopNavProfile
1273
1281
  user={user}