@helloimjolopez-pathway/pathway-components 0.2.3 → 0.2.4

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.
@@ -513,6 +513,7 @@ function OrgRow({ org, active, onSelect }) {
513
513
  onMouseLeave={() => setHov(false)}
514
514
  aria-current={active ? "true" : undefined}
515
515
  style={{
516
+ position: "relative",
516
517
  display: "flex", alignItems: "center", gap: 12, width: "100%", textAlign: "left",
517
518
  padding: "8px 8px", border: "none", cursor: "pointer", borderRadius: 8,
518
519
  fontFamily: "inherit",
@@ -520,6 +521,17 @@ function OrgRow({ org, active, onSelect }) {
520
521
  transition: noMotion ? "none" : "background var(--motion-duration-2) var(--motion-easing-standard)",
521
522
  }}
522
523
  >
524
+ {/* indicator.stripe on the selected row, as OrgSwitcher.Row State=Selected
525
+ draws it (40018011:16090): 4 wide, 44 tall, right corners rounded 8,
526
+ Fill/Action/Selection/Indicator. The same stripe as the side nav. */}
527
+ {active && (
528
+ <span aria-hidden="true" style={{
529
+ position: "absolute", left: 0, top: "50%", transform: "translateY(-50%)",
530
+ width: 4, height: 44,
531
+ borderRadius: "0 var(--semantic-layout-units-cornerradius-base) var(--semantic-layout-units-cornerradius-base) 0",
532
+ background: "var(--semantic-color-fill-action-selection-indicator)",
533
+ }} />
534
+ )}
523
535
  {/* Logo tile, org initials on brand fill (falls back from a logo image) */}
524
536
  <div style={{
525
537
  width: 44, height: 44, borderRadius: 6, flexShrink: 0, background: PANEL_T.logoBg,
@@ -538,7 +550,8 @@ function OrgRow({ org, active, onSelect }) {
538
550
  <ModuleCluster />
539
551
  </div>
540
552
  {/* Trailing chevron */}
541
- <Icon name="chevron_right" size={20} style={{ color: PANEL_T.icon, flexShrink: 0 }} />
553
+ {/* 12, as OrgSwitcher.Row's trailing chevron in Figma. Was 20. */}
554
+ <Icon name="chevron_right" size={12} style={{ color: PANEL_T.icon, flexShrink: 0 }} />
542
555
  </button>
543
556
  );
544
557
  }
@@ -577,7 +590,8 @@ export function OrgSwitcherPanel({
577
590
  display: "flex", alignItems: "center", gap: "var(--semantic-layout-units-gap-tight)", padding: "var(--semantic-layout-units-padding-xtight)", borderRadius: "var(--semantic-layout-units-cornerradius-base)",
578
591
  border: `1px solid ${PANEL_T.border}`,
579
592
  }}>
580
- <Icon name="search" size={20} style={{ color: PANEL_T.icon }} />
593
+ {/* 18, as OrgSwitcher.Panel's Field.Search icon in Figma. Was 20. */}
594
+ <Icon name="search" size={18} style={{ color: PANEL_T.icon }} />
581
595
  <input
582
596
  type="text"
583
597
  value={query}
@@ -501,7 +501,10 @@ export function PopoverRow({ item, onClick, activeId }) {
501
501
  <div style={{ position: "absolute", left: 0, top: "var(--semantic-layout-units-padding-xtight)",
502
502
  bottom: "var(--semantic-layout-units-padding-xtight)", width: L.stripeW,
503
503
  borderRadius: `0 ${L.stripeRadius} ${L.stripeRadius} 0`,
504
- backgroundColor: isActive ? T.indicator : "transparent",
504
+ // PopoverMenu.Item's Stripe binds Fill/Action/Primary/Strong/Pressed in
505
+ // Figma (40018914:3149), not the nav's Selection/Indicator. Same value
506
+ // in Light; in Midnight they differ, so this follows Figma.
507
+ backgroundColor: isActive ? c("fill-action-primary-strong-pressed") : "transparent",
505
508
  transition: "background-color var(--motion-duration-3) var(--motion-easing-standard)" }} />
506
509
  {/* Label/Menu/Base/Medium: 14 / 500 / 20 / 0.3 (the repo's `spacious`). */}
507
510
  <span style={{ fontFamily: "'Red Hat Text',sans-serif",
@@ -351,9 +351,12 @@ export const DEFAULT_MODULES = MODULES.map((id) => ({ id, label: MODULE_LABELS[i
351
351
  *
352
352
  * THE STATE FILL BELONGS ON THE 28 BOX, not on the touch target.
353
353
  */
354
+ // TopNav.Actions in Figma (40007082:7313): help, settings, notifications_unread,
355
+ // each a 16 glyph in a 28 layer in a 44 target. This drew "notifications" twice.
354
356
  export const DEFAULT_ACTIONS = [
355
- { icon: "notifications", label: "Notifications" },
356
- { icon: "notifications", label: "Alerts" },
357
+ { icon: "help", label: "Help" },
358
+ { icon: "settings", label: "Settings" },
359
+ { icon: "notifications_unread", label: "Notifications" },
357
360
  ];
358
361
 
359
362
  function TopNavActionIcon({ icon, label, onClick }) {
@@ -362,8 +365,11 @@ function TopNavActionIcon({ icon, label, onClick }) {
362
365
  const fill = press ? T.controlPressed : hov ? T.controlHover : "transparent";
363
366
  const fg = press ? T.monoPressed : hov ? T.monoHover : T.monoBase;
364
367
  return (
368
+ // The 44 target is the button itself. It used to be a min-size wrapper
369
+ // with a height:100% button, which a min-height parent does not resolve,
370
+ // so the clickable box collapsed to the 28 layer.
365
371
  <div style={{ display: "flex", alignItems: "center", justifyContent: "center",
366
- minHeight: L.actionTarget, minWidth: L.actionTarget }}>
372
+ width: L.actionTarget, height: L.actionTarget, flexShrink: 0 }}>
367
373
  <button type="button" aria-label={label} onClick={onClick}
368
374
  onMouseEnter={() => setHov(true)} onMouseLeave={() => { setHov(false); setPress(false); }}
369
375
  onMouseDown={() => setPress(true)} onMouseUp={() => setPress(false)} onBlur={() => setPress(false)}
@@ -382,7 +388,8 @@ function TopNavActionIcon({ icon, label, onClick }) {
382
388
  }
383
389
 
384
390
  export function TopNavActions({ breakpoint = "desktop", actions, onNotifications, onMore }) {
385
- const items = (actions || DEFAULT_ACTIONS).map((a) => ({ ...a, onClick: a.onClick || onNotifications }));
391
+ const items = (actions || DEFAULT_ACTIONS).map((a) => ({
392
+ ...a, onClick: a.onClick || (a.icon === "notifications_unread" ? onNotifications : undefined) }));
386
393
  if (breakpoint === "mobile" && items.length > 1) {
387
394
  return (
388
395
  <div style={{ display: "flex", alignItems: "center" }}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helloimjolopez-pathway/pathway-components",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Pathway Design System React components",
5
5
  "type": "module",
6
6
  "sideEffects": false,