trimble-terra 1.0.0 → 1.0.1

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
@@ -7,12 +7,26 @@ A React component library for Trimble MXP2 web experiences. Built with React 19,
7
7
 
8
8
  > **Branch strategy:** The `react19` branch is the active development branch (v1.x) targeting Next.js projects. The `main` branch contains the legacy Gatsby-compatible code (v0.x) and is deprecated — do not publish from `main`.
9
9
 
10
+
11
+
10
12
  ## Storybook
11
13
 
12
14
  Browse all components, props, and usage examples in the live Storybook:
13
15
 
14
16
  **[https://trimble-mxp-terra.netlify.app/](https://trimble-mxp-terra.netlify.app/)**
15
17
 
18
+ ### Associated Storybooks
19
+
20
+ #### Layouts:
21
+ [![Storybook](https://img.shields.io/badge/Storybook-Live-ff4785?logo=storybook&logoColor=white)](https://trimble-mxp-layouts.netlify.app/)
22
+
23
+ #### Icons:
24
+ [![Storybook](https://img.shields.io/badge/Storybook-Live-ff4785?logo=storybook&logoColor=white)](https://trimble-mxp-icons.netlify.app/)
25
+
26
+ #### Flyout:
27
+ [![Storybook](https://img.shields.io/badge/Storybook-Live-ff4785?logo=storybook&logoColor=white)](https://trimble-mxp-flyout.netlify.app/)
28
+
29
+
16
30
  ## Installation
17
31
 
18
32
  ```bash
@@ -1 +1 @@
1
- {"version":3,"file":"InlineMedia.d.ts","sourceRoot":"","sources":["../../../../../src/component/ProductDetail/InlineMedia/InlineMedia.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,iCAAiC,CAAC;AAEzC,OAAO,oBAAoB,CAAC;AAI5B,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,WAAW,GAAI,+DAKzB,gBAAgB,4CA+JlB,CAAC"}
1
+ {"version":3,"file":"InlineMedia.d.ts","sourceRoot":"","sources":["../../../../../src/component/ProductDetail/InlineMedia/InlineMedia.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAGvE,OAAO,iCAAiC,CAAC;AAEzC,OAAO,oBAAoB,CAAC;AAI5B,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,OAAO,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,WAAW,GAAI,+DAKzB,gBAAgB,4CAyJlB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, jsxs as I } from "react/jsx-runtime";
2
- import { useState as n, useRef as k, useEffect as p } from "react";
3
- import { InlineMediaPanel as v } from "./InlineMediaPanel/InlineMediaPanel.js";
2
+ import { useState as n, useRef as k, useEffect as _ } from "react";
3
+ import { InlineMediaPanel as p } from "./InlineMediaPanel/InlineMediaPanel.js";
4
4
  import { Tabs as A, TabList as C, Tab as V, TabPanel as W } from "react-tabs";
5
5
  import './InlineMedia.css';import '../../../../node_modules/react-tabs/style/react-tabs.css';/* empty css */
6
6
  /* empty css */
@@ -8,39 +8,39 @@ import { useScreenSize as R } from "../../../utils/hooks/useScreenSize.js";
8
8
  const Z = ({
9
9
  inlineMediaPanels: i,
10
10
  variant: a,
11
- activeTab: L,
11
+ activeTab: v,
12
12
  onActiveTabChange: d
13
13
  }) => {
14
- const y = R(), [w, S] = n(0), r = k(null), [g, m] = n(!1), [E, u] = n(!1), [s, T] = n(null), N = (l) => {
14
+ const L = R(), [y, w] = n(0), r = k(null), [S, m] = n(!1), [g, u] = n(!1), [s, E] = n(null), T = (l) => {
15
15
  if (d) {
16
16
  d(l);
17
17
  return;
18
18
  }
19
- S(l);
20
- }, x = L ?? w, h = a || "carousel", f = 100, b = (l) => {
19
+ w(l);
20
+ }, N = v ?? y, x = a || "carousel", h = 100, f = (l) => {
21
21
  if (r?.current) {
22
22
  const e = r?.current?.querySelectorAll(
23
23
  ".react-tabs__tab-list"
24
24
  )[0];
25
- let o = f;
26
- l === "left" && (o = -f), e?.scrollBy({ left: o, behavior: "smooth" });
25
+ let o = h;
26
+ l === "left" && (o = -h), e?.scrollBy({ left: o, behavior: "smooth" });
27
27
  }
28
28
  }, c = () => {
29
29
  const l = r?.current?.clientWidth, e = s?.scrollLeft, o = s?.scrollWidth || 0;
30
30
  l === void 0 || e === void 0 || (o > l && m(!0), e > 0 ? u(!0) : u(!1), e + l >= o - 5 && m(!1));
31
31
  };
32
- p(() => {
32
+ _(() => {
33
33
  const l = r?.current?.querySelectorAll(
34
34
  ".react-tabs__tab-list"
35
35
  )[0];
36
- l !== void 0 && T(l);
37
- }, [r]), p(() => {
36
+ l !== void 0 && E(l);
37
+ }, [r]), _(() => {
38
38
  if (s)
39
39
  return c(), s?.addEventListener("scroll", c), () => {
40
40
  s?.removeEventListener("scroll", c);
41
41
  };
42
- }, [y?.width, s, c]);
43
- const _ = () => /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__scroll-indicator--wrapper", children: /* @__PURE__ */ t(
42
+ }, [L?.width, s, c]);
43
+ const b = () => /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__scroll-indicator--wrapper", children: /* @__PURE__ */ t(
44
44
  "svg",
45
45
  {
46
46
  width: "10",
@@ -57,34 +57,34 @@ const Z = ({
57
57
  )
58
58
  }
59
59
  ) });
60
- return /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__inner-wrap", children: /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__items-wrap", children: /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__items", ref: r, children: i && i.length === 1 ? /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__list-carousel-panel-wrap", children: /* @__PURE__ */ t(v, { ...i[0] }) }) : i && i.length > 1 && h === "tabs" ? /* @__PURE__ */ I(
60
+ return /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__inner-wrap", children: /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__items-wrap", children: /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__items", ref: r, children: i && i.length === 1 ? /* @__PURE__ */ t("div", { className: "t2-layout-inline-media__list-carousel-panel-wrap", children: /* @__PURE__ */ t(p, { ...i[0] }) }) : i && i.length > 1 && x === "tabs" ? /* @__PURE__ */ I(
61
61
  A,
62
62
  {
63
- selectedIndex: x,
64
- onSelect: (l) => N(l),
63
+ selectedIndex: N,
64
+ onSelect: (l) => T(l),
65
65
  children: [
66
- E && /* @__PURE__ */ t(
66
+ g && /* @__PURE__ */ t(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- b("left"), c();
70
+ f("left"), c();
71
71
  },
72
72
  className: "t2-layout-inline-media__scroll-indicator t2-layout-inline-media__scroll-indicator--left",
73
- children: /* @__PURE__ */ t(_, {})
73
+ children: /* @__PURE__ */ t(b, {})
74
74
  }
75
75
  ),
76
76
  /* @__PURE__ */ t(C, { children: i.map((l, e) => /* @__PURE__ */ t(V, { tabIndex: "0", children: /* @__PURE__ */ t("h3", { className: "t2-lo-inline-media-tab-title", children: l.publicTitle }) }, e)) }),
77
- g && /* @__PURE__ */ t(
77
+ S && /* @__PURE__ */ t(
78
78
  "div",
79
79
  {
80
80
  onClick: () => {
81
- b("right"), c();
81
+ f("right"), c();
82
82
  },
83
83
  className: "t2-layout-inline-media__scroll-indicator t2-layout-inline-media__scroll-indicator--right",
84
- children: /* @__PURE__ */ t(_, {})
84
+ children: /* @__PURE__ */ t(b, {})
85
85
  }
86
86
  ),
87
- i.map((l, e) => /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(v, { ...l, displayMode: a }) }, e))
87
+ i.map((l, e) => /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(p, { ...l, displayMode: a }) }, e))
88
88
  ]
89
89
  }
90
90
  ) : null }) }) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trimble-terra",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Trimble Terra — React component library for Trimble MXP2 web experiences",
5
5
  "publishConfig": {
6
6
  "access": "public"