@seamapi/react 1.37.0 → 1.38.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.
package/README.md CHANGED
@@ -78,7 +78,7 @@ export function App() {
78
78
  <seam-device-table publishable-key="your_publishable_key"></seam-device-table>
79
79
  <script
80
80
  type="module"
81
- src="https://react.seam.co/v/1.37.0/dist/elements.js"
81
+ src="https://react.seam.co/v/1.38.0/dist/elements.js"
82
82
  ></script>
83
83
  </body>
84
84
  ```
package/dist/elements.js CHANGED
@@ -8080,7 +8080,7 @@ const Dm = "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;60
8080
8080
  const n = globalThis.document.createElement("link");
8081
8081
  n.rel = "stylesheet", n.type = "text/css", n.href = Dm, globalThis.document.head.appendChild(n);
8082
8082
  }, [t]);
8083
- }, yO = "1.37.0", gO = "https://react.seam.co", vO = ({
8083
+ }, yO = "1.38.0", gO = "https://react.seam.co", vO = ({
8084
8084
  disabled: t = !1,
8085
8085
  unminified: e = !1
8086
8086
  }) => {
@@ -24996,23 +24996,29 @@ function KT(t) {
24996
24996
  );
24997
24997
  }
24998
24998
  function uS(t) {
24999
- var e;
25000
- return /* @__PURE__ */ h.jsx("div", { className: "seam-battery-status", children: /* @__PURE__ */ h.jsx(YT, { status: (e = t.device.properties.battery) == null ? void 0 : e.status }) });
24999
+ var e, n;
25000
+ return /* @__PURE__ */ h.jsx("div", { className: "seam-battery-status", children: /* @__PURE__ */ h.jsx(
25001
+ YT,
25002
+ {
25003
+ status: (e = t.device.properties.battery) == null ? void 0 : e.status,
25004
+ level: (n = t.device.properties.battery) == null ? void 0 : n.level
25005
+ }
25006
+ ) });
25001
25007
  }
25002
25008
  function YT(t) {
25003
- const { status: e } = t;
25009
+ const { status: e, level: n } = t, r = n != null ? ` (${Math.floor(n * 100)}%)` : null;
25004
25010
  return e === "full" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
25005
25011
  /* @__PURE__ */ h.jsx(WT, {}),
25006
- /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: ql.full })
25012
+ /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: `${ql.full}${r ?? ""}` })
25007
25013
  ] }) : e === "good" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
25008
25014
  /* @__PURE__ */ h.jsx(ZT, {}),
25009
- /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: ql.high })
25015
+ /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: `${ql.high}${r ?? ""}` })
25010
25016
  ] }) : e === "low" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
25011
25017
  /* @__PURE__ */ h.jsx(KT, {}),
25012
- /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: ql.low })
25018
+ /* @__PURE__ */ h.jsx("span", { className: "seam-status-text", children: `${ql.low}${r ?? ""}` })
25013
25019
  ] }) : e === "critical" ? /* @__PURE__ */ h.jsxs(h.Fragment, { children: [
25014
25020
  /* @__PURE__ */ h.jsx(QT, {}),
25015
- /* @__PURE__ */ h.jsx("span", { className: "seam-text-danger", children: ql.critical })
25021
+ /* @__PURE__ */ h.jsx("span", { className: "seam-text-danger", children: `${ql.critical}${r ?? ""}` })
25016
25022
  ] }) : null;
25017
25023
  }
25018
25024
  const ql = {