@dmsi/wedgekit-react 3.0.1 → 3.0.2

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.
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as d } from "react/jsx-runtime";
3
- import m, { useState as v, useLayoutEffect as k } from "react";
4
- import { clsx as c } from "../node_modules/clsx/dist/clsx.js";
2
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
3
+ import m, { useState as g, useLayoutEffect as k } from "react";
4
+ import { clsx as l } from "../node_modules/clsx/dist/clsx.js";
5
5
  import { Link as x } from "./Link.js";
6
6
  import { Icon as b } from "./Icon.js";
7
7
  function y({
@@ -9,23 +9,23 @@ function y({
9
9
  children: o,
10
10
  onClick: r,
11
11
  id: n,
12
- testid: t
12
+ testid: e
13
13
  }) {
14
- const i = c(
14
+ const i = l(
15
15
  "!text-text-link-normal whitespace-nowrap",
16
16
  "py-mobile-component-padding",
17
17
  "desktop:py-desktop-layout-group-padding",
18
18
  "compact:py-desktop-compact-component-padding"
19
19
  );
20
- return /* @__PURE__ */ e("li", { id: n, "data-testid": t, className: "flex items-center", children: /* @__PURE__ */ e(
20
+ return /* @__PURE__ */ t("li", { id: n, "data-testid": e, className: "flex items-center", children: /* @__PURE__ */ t(
21
21
  x,
22
22
  {
23
23
  id: n ? `${n}-link` : void 0,
24
- "data-testid": t ? `${t}-link` : void 0,
25
- className: c(
24
+ "data-testid": e ? `${e}-link` : void 0,
25
+ className: l(
26
26
  i,
27
27
  "!text-caption-desktop",
28
- "!decoration-transparent"
28
+ "!decoration-transparent hover:!decoration-current"
29
29
  ),
30
30
  href: a,
31
31
  typographyStyle: "caption",
@@ -34,23 +34,23 @@ function y({
34
34
  }
35
35
  ) }, a);
36
36
  }
37
- const w = () => /* @__PURE__ */ e("li", { className: "flex items-center", "aria-hidden": "true", children: /* @__PURE__ */ e(b, { name: "chevron_right", size: 16 }) });
37
+ const w = () => /* @__PURE__ */ t("li", { className: "flex items-center", "aria-hidden": "true", children: /* @__PURE__ */ t(b, { name: "chevron_right", size: 16 }) });
38
38
  function O({
39
39
  asCardStyle: a,
40
40
  id: o,
41
41
  testid: r,
42
42
  crumbs: n
43
43
  }) {
44
- const t = m.useRef(null), [i, u] = v(!1);
44
+ const e = m.useRef(null), [i, u] = g(!1);
45
45
  k(() => {
46
- t.current?.scrollTo({
47
- left: t.current?.scrollWidth ?? 0,
46
+ e.current?.scrollTo({
47
+ left: e.current?.scrollWidth ?? 0,
48
48
  behavior: "instant"
49
49
  }), p();
50
- }, [t, n]);
50
+ }, [e, n]);
51
51
  const p = () => {
52
- t.current && u(
53
- t.current.scrollWidth !== t.current.clientWidth && t.current.scrollLeft > 0
52
+ e.current && u(
53
+ e.current.scrollWidth !== e.current.clientWidth && e.current.scrollLeft > 0
54
54
  );
55
55
  };
56
56
  return /* @__PURE__ */ d(
@@ -58,7 +58,7 @@ function O({
58
58
  {
59
59
  id: o,
60
60
  "data-testid": r,
61
- className: c(
61
+ className: l(
62
62
  "relative select-none flex items-center max-w-full w-full",
63
63
  {
64
64
  "bg-white rounded-base shadow-4 px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding": a,
@@ -67,16 +67,16 @@ function O({
67
67
  ),
68
68
  "aria-label": "Breadcrumb",
69
69
  children: [
70
- /* @__PURE__ */ e(
70
+ /* @__PURE__ */ t(
71
71
  "div",
72
72
  {
73
- className: c(
73
+ className: l(
74
74
  i ? "opacity-100" : "opacity-0",
75
75
  "absolute left-6 top-0 h-full w-12 bg-gradient-to-r from-white to-transparent pointer-events-none z-10 transition"
76
76
  )
77
77
  }
78
78
  ),
79
- /* @__PURE__ */ e(
79
+ /* @__PURE__ */ t(
80
80
  "ol",
81
81
  {
82
82
  id: o ? `${o}-list` : void 0,
@@ -85,23 +85,23 @@ function O({
85
85
  style: { scrollbarWidth: "none" },
86
86
  onScroll: p,
87
87
  ref: (s) => {
88
- t.current = s;
88
+ e.current = s;
89
89
  },
90
- children: n.map((s, l) => {
91
- const { href: f, children: h, onClick: g } = s;
90
+ children: n.map((s, c) => {
91
+ const { href: f, children: h, onClick: v } = s;
92
92
  return /* @__PURE__ */ d(m.Fragment, { children: [
93
- l > 0 && /* @__PURE__ */ e(w, {}),
94
- /* @__PURE__ */ e(
93
+ c > 0 && /* @__PURE__ */ t(w, {}),
94
+ /* @__PURE__ */ t(
95
95
  y,
96
96
  {
97
97
  href: f,
98
- onClick: g,
99
- id: o ? `${o}-crumb-${l}` : void 0,
100
- testid: r ? `${r}-crumb-${l}` : void 0,
98
+ onClick: v,
99
+ id: o ? `${o}-crumb-${c}` : void 0,
100
+ testid: r ? `${r}-crumb-${c}` : void 0,
101
101
  children: h
102
102
  }
103
103
  )
104
- ] }, l);
104
+ ] }, c);
105
105
  })
106
106
  }
107
107
  )
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/index.tsx"],"names":[],"mappings":"AAsDA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgBxC,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC1D,EAAE,EACF,aAAa,EACb,MAAM,EACN,IAAI,EACJ,OAAO,EACP,MAAM,EACN,aAAqB,EACrB,UAAU,EACV,UAAU,EACV,aAAqB,EACrB,OAAe,EACf,OAAO,EAAE,eAAe,EACxB,eAAe,EACf,aAAa,EAAE,qBAAqB,EACpC,qBAAqB,EACrB,YAAY,EAAE,oBAAoB,EAClC,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAA0B,EAC1B,sBAA2B,EAC3B,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,SAAiB,EACjB,cAAkC,EAClC,kBAAkB,EAClB,SAAS,EACT,UAAkB,EAClB,eAAuB,EACvB,aAAa,EACb,UAAU,EACV,OAAO,EACP,YAAyB,EACzB,kBAA2B,EAC3B,iBAAiB,EACjB,kBAA0B,EAC1B,kBAAkB,EAClB,QAAQ,EAAE,gBAAgB,EAC1B,gBAAgB,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,gBAAgB,EAChB,GAAG,GACJ,EAAE,aAAa,CAAC,CAAC,CAAC,2CAw+BlB;AAeD,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/DataGrid/index.tsx"],"names":[],"mappings":"AAsDA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAgBxC,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC1D,EAAE,EACF,aAAa,EACb,MAAM,EACN,IAAI,EACJ,OAAO,EACP,MAAM,EACN,aAAqB,EACrB,UAAU,EACV,UAAU,EACV,aAAqB,EACrB,OAAe,EACf,OAAO,EAAE,eAAe,EACxB,eAAe,EACf,aAAa,EAAE,qBAAqB,EACpC,qBAAqB,EACrB,YAAY,EAAE,oBAAoB,EAClC,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAA0B,EAC1B,sBAA2B,EAC3B,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,SAAiB,EACjB,cAAkC,EAClC,kBAAkB,EAClB,SAAS,EACT,UAAkB,EAClB,eAAuB,EACvB,aAAa,EACb,UAAU,EACV,OAAO,EACP,YAAyB,EACzB,kBAA2B,EAC3B,iBAAiB,EACjB,kBAA0B,EAC1B,kBAAkB,EAClB,QAAQ,EAAE,gBAAgB,EAC1B,gBAAgB,EAChB,QAAQ,EAAE,gBAAgB,EAC1B,gBAAgB,EAChB,GAAG,GACJ,EAAE,aAAa,CAAC,CAAC,CAAC,2CAo/BlB;AAeD,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAe,QAAQ,CAAC"}