@peers-app/peers-ui 0.26.3 → 0.26.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.
@@ -31,7 +31,10 @@ interface INetworkStatusPresentation {
31
31
  count: number;
32
32
  colorClass: "text-success" | "text-danger";
33
33
  };
34
- /** Bottom-left yellow upgrade arrow when this device has an app update available. */
34
+ /**
35
+ * Yellow upgrade arrow on the lower-left corner of the status mark when this device
36
+ * has an app update available. Kept on the mark so it does not hang below the tab strip.
37
+ */
35
38
  updateAvailableOverlay?: boolean;
36
39
  }
37
40
  /** Convert host availability and network state into accessible indicator text and styling. */
@@ -352,12 +352,18 @@ function NetworkStatusIndicator({ compact = false }) {
352
352
  fontWeight: 700,
353
353
  right: "-0.28rem",
354
354
  bottom: "-0.32rem",
355
- }, "aria-hidden": "true", children: presentation.disconnectedGroupsOverlay.count })), presentation.updateAvailableOverlay && ((0, jsx_runtime_1.jsx)("i", { className: `network-status-update-badge bi ${app_update_controls_1.APP_UPDATE_ICON_CLASS} text-warning position-absolute`, style: {
356
- fontSize: "0.5rem",
357
- lineHeight: 1,
358
- left: "-0.3rem",
359
- bottom: "-0.32rem",
360
- }, "aria-hidden": "true" }))] }), !compact && ((0, jsx_runtime_1.jsxs)("span", { className: "small", children: [viewState.status?.connectionCount ?? 0, (0, jsx_runtime_1.jsx)("span", { className: "visually-hidden", children: " connections" })] }))] }), open && ((0, jsx_runtime_1.jsx)(NetworkStatusDetails, { detailsId: detailsId, status: viewState.status, appUpdate: appUpdate, unavailable: viewState.availability !== "ready", connectionsLoadState: connectionsLoadState, onUseInvite: () => {
355
+ }, "aria-hidden": "true", children: presentation.disconnectedGroupsOverlay.count })), presentation.updateAvailableOverlay && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("i", { className: `network-status-update-badge bi ${app_update_controls_1.APP_UPDATE_ICON_CLASS} text-warning position-absolute`, style: {
356
+ fontSize: "0.5rem",
357
+ lineHeight: 1,
358
+ width: "0.5rem",
359
+ height: "0.5rem",
360
+ left: "-0.46rem",
361
+ bottom: "-0.08rem",
362
+ }, "aria-hidden": "true" }), (0, jsx_runtime_1.jsx)("style", { children: `
363
+ .network-status-update-badge.bi::before {
364
+ vertical-align: 0;
365
+ }
366
+ ` })] }))] }), !compact && ((0, jsx_runtime_1.jsxs)("span", { className: "small", children: [viewState.status?.connectionCount ?? 0, (0, jsx_runtime_1.jsx)("span", { className: "visually-hidden", children: " connections" })] }))] }), open && ((0, jsx_runtime_1.jsx)(NetworkStatusDetails, { detailsId: detailsId, status: viewState.status, appUpdate: appUpdate, unavailable: viewState.availability !== "ready", connectionsLoadState: connectionsLoadState, onUseInvite: () => {
361
367
  setOpen(false);
362
368
  (0, tabs_state_1.goToTabPath)(identity_routes_1.IDENTITY_ACCEPT_PATH);
363
369
  }, onOpenIdentity: () => {
@@ -362,7 +362,7 @@ describe("NetworkStatusIndicator", () => {
362
362
  view.rerender((0, jsx_runtime_1.jsx)(network_status_indicator_1.NetworkStatusIndicator, {}));
363
363
  const badge = view.container.querySelector(".network-status-update-badge");
364
364
  expect(badge).toHaveClass("bi-arrow-up-circle-fill", "text-warning");
365
- expect(badge).toHaveStyle({ left: "-0.3rem", bottom: "-0.32rem" });
365
+ expect(badge).toHaveStyle({ left: "-0.46rem", bottom: "-0.08rem" });
366
366
  react_1.fireEvent.click(view.getByRole("button", { name: /Version 1\.1\.0 is ready to install/ }));
367
367
  const section = view.getByTestId("app-update-section");
368
368
  expect(section).toHaveTextContent("Installs automatically the next time Peers restarts");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peers-app/peers-ui",
3
- "version": "0.26.3",
3
+ "version": "0.26.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/peers-app/peers-ui.git"
@@ -30,7 +30,7 @@
30
30
  "lint:fix": "biome check --write ."
31
31
  },
32
32
  "peerDependencies": {
33
- "@peers-app/peers-sdk": "^0.26.3",
33
+ "@peers-app/peers-sdk": "^0.26.4",
34
34
  "bootstrap": "^5.3.3",
35
35
  "react": "^18.0.0",
36
36
  "react-dom": "^18.0.0"
@@ -41,7 +41,7 @@
41
41
  "@babel/preset-react": "^7.24.1",
42
42
  "@babel/preset-typescript": "^7.27.1",
43
43
  "@biomejs/biome": "2.3.11",
44
- "@peers-app/peers-sdk": "0.26.3",
44
+ "@peers-app/peers-sdk": "0.26.4",
45
45
  "@testing-library/dom": "^10.4.0",
46
46
  "@testing-library/jest-dom": "^6.6.3",
47
47
  "@testing-library/react": "^16.3.0",
@@ -454,7 +454,7 @@ describe("NetworkStatusIndicator", () => {
454
454
  view.rerender(<NetworkStatusIndicator />);
455
455
  const badge = view.container.querySelector(".network-status-update-badge");
456
456
  expect(badge).toHaveClass("bi-arrow-up-circle-fill", "text-warning");
457
- expect(badge).toHaveStyle({ left: "-0.3rem", bottom: "-0.32rem" });
457
+ expect(badge).toHaveStyle({ left: "-0.46rem", bottom: "-0.08rem" });
458
458
 
459
459
  fireEvent.click(view.getByRole("button", { name: /Version 1\.1\.0 is ready to install/ }));
460
460
  const section = view.getByTestId("app-update-section");
@@ -57,7 +57,10 @@ interface INetworkStatusPresentation {
57
57
  * Green when > 0; red zero when connected devices exist but no groups are live.
58
58
  */
59
59
  connectedGroupsOverlay?: { count: number; colorClass: "text-success" | "text-danger" };
60
- /** Bottom-left yellow upgrade arrow when this device has an app update available. */
60
+ /**
61
+ * Yellow upgrade arrow on the lower-left corner of the status mark when this device
62
+ * has an app update available. Kept on the mark so it does not hang below the tab strip.
63
+ */
61
64
  updateAvailableOverlay?: boolean;
62
65
  }
63
66
 
@@ -679,16 +682,26 @@ export function NetworkStatusIndicator({ compact = false }: { compact?: boolean
679
682
  </span>
680
683
  )}
681
684
  {presentation.updateAvailableOverlay && (
682
- <i
683
- className={`network-status-update-badge bi ${APP_UPDATE_ICON_CLASS} text-warning position-absolute`}
684
- style={{
685
- fontSize: "0.5rem",
686
- lineHeight: 1,
687
- left: "-0.3rem",
688
- bottom: "-0.32rem",
689
- }}
690
- aria-hidden="true"
691
- />
685
+ <>
686
+ <i
687
+ className={`network-status-update-badge bi ${APP_UPDATE_ICON_CLASS} text-warning position-absolute`}
688
+ style={{
689
+ fontSize: "0.5rem",
690
+ lineHeight: 1,
691
+ width: "0.5rem",
692
+ height: "0.5rem",
693
+ left: "-0.46rem",
694
+ bottom: "-0.08rem",
695
+ }}
696
+ aria-hidden="true"
697
+ />
698
+ {/* Bootstrap Icons shift the glyph below the em box; keep it inside this badge. */}
699
+ <style>{`
700
+ .network-status-update-badge.bi::before {
701
+ vertical-align: 0;
702
+ }
703
+ `}</style>
704
+ </>
692
705
  )}
693
706
  </span>
694
707
  {!compact && (