asma-ui-core 3.87.5 → 3.88.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.
@@ -1,18 +1,19 @@
1
- import { CloseIcon as l } from "../../../icons/close-icon/CloseIcon.js";
2
- import { StyledTooltip as i } from "../../../data-display/tooltip/StyledTooltip.js";
1
+ import { CloseIcon as i } from "../../../icons/close-icon/CloseIcon.js";
2
+ import { StyledTooltip as n } from "../../../data-display/tooltip/StyledTooltip.js";
3
3
  import { StyledButton as a } from "../../../inputs/button/StyledButton.js";
4
4
  import "react";
5
5
  import { jsx as t } from "react/jsx-runtime";
6
- var f = ({ showCloseIcon: e, tooltipTitle: r, onClick: o }) => e ? /* @__PURE__ */ t(i, {
6
+ var h = ({ showCloseIcon: e, tooltipTitle: r, onClick: o, buttonRef: l }) => e ? /* @__PURE__ */ t(n, {
7
7
  title: r,
8
8
  placement: "top",
9
9
  children: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(a, {
10
10
  dataTest: "close-button",
11
+ refLink: l,
11
12
  "aria-label": r,
12
13
  variant: "textGray",
13
14
  size: "small",
14
15
  onClick: o,
15
- endIcon: /* @__PURE__ */ t(l, {
16
+ endIcon: /* @__PURE__ */ t(i, {
16
17
  height: 20,
17
18
  width: 20,
18
19
  color: "text-delta-700"
@@ -20,5 +21,5 @@ var f = ({ showCloseIcon: e, tooltipTitle: r, onClick: o }) => e ? /* @__PURE__
20
21
  }) })
21
22
  }) : null;
22
23
  export {
23
- f as CloseBtn
24
+ h as CloseBtn
24
25
  };
@@ -1,37 +1,46 @@
1
- import { cn as s } from "../../../../helpers/cn.js";
2
- import { firstTabbable as q } from "../../../../helpers/focusable.js";
3
- import { StyledTooltip as E } from "../../../data-display/tooltip/StyledTooltip.js";
4
- import { useMobileMediaQuery as P } from "../../../../hooks/useMediaQuery.hook.js";
5
- import { useFocusTrap as V } from "../../../../hooks/useFocusTrap.hook.js";
6
- import { CloseBtn as w } from "../components/CloseBtn.js";
7
- import { MinimizeBtn as C } from "../components/MinimizeBtn.js";
8
- import { FullScreenBtn as W } from "../components/FullscreenBtn.js";
9
- import c from "./MinimizableDialogV2.module.js";
10
- import { useTranslations as _ } from "./useTranslations.js";
11
- import { useControlledProps as $ } from "./useControlledProps.js";
12
- import H from "clsx";
13
- import { useLayoutEffect as L, useRef as F } from "react";
14
- import { Fragment as O, jsx as e, jsxs as o } from "react/jsx-runtime";
15
- var ae = (h) => {
16
- const { showCloseIcon: v = !0, showMinimizeIcon: S = !0, showExpandIcon: T = !0, enableFullscreen: M = !0, title: n, label: d, children: k, open: g, onClose: I, classNameOverrides: f = {
1
+ import { cn as a } from "../../../../helpers/cn.js";
2
+ import { firstTabbable as M } from "../../../../helpers/focusable.js";
3
+ import { StyledTooltip as $ } from "../../../data-display/tooltip/StyledTooltip.js";
4
+ import { useMobileMediaQuery as H } from "../../../../hooks/useMediaQuery.hook.js";
5
+ import { useFocusTrap as L } from "../../../../hooks/useFocusTrap.hook.js";
6
+ import { CloseBtn as k } from "../components/CloseBtn.js";
7
+ import { MinimizeBtn as B } from "../components/MinimizeBtn.js";
8
+ import { FullScreenBtn as Q } from "../components/FullscreenBtn.js";
9
+ import p from "./MinimizableDialogV2.module.js";
10
+ import { useTranslations as G } from "./useTranslations.js";
11
+ import { useControlledProps as J } from "./useControlledProps.js";
12
+ import K from "clsx";
13
+ import { useLayoutEffect as I, useRef as u } from "react";
14
+ import { Fragment as U, jsx as e, jsxs as n } from "react/jsx-runtime";
15
+ var ue = (g) => {
16
+ const { showCloseIcon: z = !0, showMinimizeIcon: j = !0, showExpandIcon: A = !0, enableFullscreen: D = !0, title: o, label: x, children: O, open: m, onClose: q, classNameOverrides: h = {
17
17
  maximized: "",
18
18
  minimized: "",
19
19
  fullscreen: ""
20
- }, dataTest: j, actionNode: A, locale: R = "en", style: b } = h, r = P(), a = _(R), m = F(null), p = F(null), { minimized: i, setMinimized: z, fullScreen: t, setFullScreen: y } = $(h), l = t && !i, u = () => {
21
- z(!1), I();
20
+ }, dataTest: E, actionNode: P, locale: V = "en", style: y, initialFocusRef: w } = g, r = H(), s = G(V), d = u(null), f = u(null), N = u(null), C = u(null), F = u(!1), { minimized: t, setMinimized: S, fullScreen: i, setFullScreen: R } = J(g), l = i && !t, v = () => {
21
+ S(!1), q();
22
22
  };
23
- L(() => {
24
- m.current?.toggleAttribute("inert", i), p.current?.toggleAttribute("inert", !i);
25
- }, [i]);
26
- const N = () => {
27
- const D = i ? m : p;
28
- z(!i), requestAnimationFrame(() => {
29
- const x = D.current;
30
- x && (x.querySelector('[data-testid="toggle-minimize-btn"]') ?? q(x))?.focus({ preventScroll: !0 });
23
+ I(() => {
24
+ d.current?.toggleAttribute("inert", t), f.current?.toggleAttribute("inert", !t);
25
+ }, [t]), I(() => {
26
+ const b = m && !F.current;
27
+ if (F.current = m, !b) return;
28
+ const c = t ? f.current : d.current, _ = t ? C.current : N.current;
29
+ (w?.current ?? _ ?? (c ? M(c) : void 0))?.focus({ preventScroll: !0 });
30
+ }, [
31
+ w,
32
+ t,
33
+ m
34
+ ]);
35
+ const T = () => {
36
+ const b = t ? d : f;
37
+ S(!t), requestAnimationFrame(() => {
38
+ const c = b.current;
39
+ c && (c.querySelector('[data-testid="toggle-minimize-btn"]') ?? M(c))?.focus({ preventScroll: !0 });
31
40
  });
32
41
  };
33
- V(g && l, m, u);
34
- const B = l ? r ? {
42
+ L(m && l, d, v);
43
+ const W = l ? r ? {
35
44
  inset: 0,
36
45
  maxHeight: "100dvh",
37
46
  maxWidth: "100dvw",
@@ -48,38 +57,39 @@ var ae = (h) => {
48
57
  maxWidth: "min(1000px, calc(100vw - 32px))",
49
58
  height: "95dvh"
50
59
  } : void 0;
51
- return g ? /* @__PURE__ */ o(O, { children: [
60
+ return m ? /* @__PURE__ */ n(U, { children: [
52
61
  /* @__PURE__ */ e("div", {
53
- ref: p,
62
+ ref: f,
54
63
  style: {
55
64
  zIndex: 51,
56
- ...b
65
+ ...y
57
66
  },
58
- className: s(c["minimized-dialog"], !i && c.hidden, f.minimized),
59
- children: /* @__PURE__ */ o("div", {
60
- className: H("flex items-center justify-between", !i && "hidden"),
61
- "data-testid": j,
67
+ className: a(p["minimized-dialog"], !t && p.hidden, h.minimized),
68
+ children: /* @__PURE__ */ n("div", {
69
+ className: K("flex items-center justify-between", !t && "hidden"),
70
+ "data-testid": E,
62
71
  children: [/* @__PURE__ */ e("div", {
63
72
  className: "max-w-[303px] truncate pr-1 text-lg font-semibold text-delta-800",
64
- children: /* @__PURE__ */ e(E, {
65
- title: n,
73
+ children: /* @__PURE__ */ e($, {
74
+ title: o,
66
75
  placement: "top",
67
76
  children: /* @__PURE__ */ e("div", {
68
77
  className: "truncate",
69
- children: n
78
+ children: o
70
79
  })
71
80
  })
72
- }), /* @__PURE__ */ o("div", {
81
+ }), /* @__PURE__ */ n("div", {
73
82
  className: "flex items-center gap-x-1",
74
- children: [/* @__PURE__ */ e(C, {
83
+ children: [/* @__PURE__ */ e(B, {
75
84
  type: "expand",
76
- visibility: T,
77
- onClick: N,
78
- tooltipTitle: a.expand
79
- }), /* @__PURE__ */ e(w, {
80
- showCloseIcon: v,
81
- onClick: u,
82
- tooltipTitle: a.close
85
+ visibility: A,
86
+ onClick: T,
87
+ tooltipTitle: s.expand
88
+ }), /* @__PURE__ */ e(k, {
89
+ buttonRef: C,
90
+ showCloseIcon: z,
91
+ onClick: v,
92
+ tooltipTitle: s.close
83
93
  })]
84
94
  })]
85
95
  })
@@ -87,66 +97,67 @@ var ae = (h) => {
87
97
  l && /* @__PURE__ */ e("div", {
88
98
  className: "fixed inset-0 z-[52] bg-[rgb(98,110,126)] bg-opacity-70",
89
99
  onClick: () => {
90
- y(!1);
100
+ R(!1);
91
101
  }
92
102
  }),
93
- /* @__PURE__ */ o("div", {
103
+ /* @__PURE__ */ n("div", {
94
104
  style: {
95
105
  zIndex: 51,
96
- ...b,
97
- ...B
106
+ ...y,
107
+ ...W
98
108
  },
99
- ref: m,
109
+ ref: d,
100
110
  role: l ? "dialog" : void 0,
101
111
  "aria-modal": l ? !0 : void 0,
102
- "aria-label": l && typeof n == "string" ? n : void 0,
103
- className: s(c.dialog, i && c.hidden, !t && f.maximized, t && f.fullscreen, l && "fixed z-[53] duration-0"),
104
- children: [/* @__PURE__ */ o("div", {
105
- className: s("flex flex-col border-b-[1px] border-delta-200 px-4", r ? "py-3" : "py-4"),
106
- children: [/* @__PURE__ */ o("div", {
112
+ "aria-label": l && typeof o == "string" ? o : void 0,
113
+ className: a(p.dialog, t && p.hidden, !i && h.maximized, i && h.fullscreen, l && "fixed z-[53] duration-0"),
114
+ children: [/* @__PURE__ */ n("div", {
115
+ className: a("flex flex-col border-b-[1px] border-delta-200 px-4", r ? "py-3" : "py-4"),
116
+ children: [/* @__PURE__ */ n("div", {
107
117
  className: "flex items-center justify-between",
108
- children: [d ? /* @__PURE__ */ e("div", {
118
+ children: [x ? /* @__PURE__ */ e("div", {
109
119
  className: "text-sm text-delta-700",
110
- children: d
120
+ children: x
111
121
  }) : /* @__PURE__ */ e("div", {
112
- className: s("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
113
- children: n
114
- }), /* @__PURE__ */ o("div", {
122
+ className: a("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
123
+ children: o
124
+ }), /* @__PURE__ */ n("div", {
115
125
  className: "flex items-center gap-x-1",
116
126
  children: [
117
- A,
118
- /* @__PURE__ */ e(C, {
119
- visibility: S && !r && !t,
127
+ P,
128
+ /* @__PURE__ */ e(B, {
129
+ visibility: j && !r && !i,
120
130
  type: "minimize",
121
- onClick: N,
122
- tooltipTitle: a.minimize
131
+ onClick: T,
132
+ tooltipTitle: s.minimize
123
133
  }),
124
- /* @__PURE__ */ e(W, {
125
- showFullScreenIcon: M && !r,
126
- fullScreen: t,
134
+ /* @__PURE__ */ e(Q, {
135
+ showFullScreenIcon: D && !r,
136
+ fullScreen: i,
127
137
  onClick: () => {
128
- y(!t);
138
+ R(!i);
129
139
  },
130
- tooltipTitle: t ? a.exitFullscreen : a.fullscreen
140
+ tooltipTitle: i ? s.exitFullscreen : s.fullscreen
131
141
  }),
132
- /* @__PURE__ */ e(w, {
133
- showCloseIcon: v,
134
- onClick: u,
135
- tooltipTitle: a.close
142
+ /* @__PURE__ */ e(k, {
143
+ buttonRef: N,
144
+ showCloseIcon: z,
145
+ onClick: v,
146
+ tooltipTitle: s.close
136
147
  })
137
148
  ]
138
149
  })]
139
- }), d && /* @__PURE__ */ e("div", {
140
- className: s("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
141
- children: n
150
+ }), x && /* @__PURE__ */ e("div", {
151
+ className: a("font-semibold text-delta-800", r ? "line-clamp-2 text-xl" : "line-clamp-1 text-2xl"),
152
+ children: o
142
153
  })]
143
154
  }), /* @__PURE__ */ e("div", {
144
- className: s(i && "hidden", "flex flex-grow flex-col overflow-y-auto"),
145
- children: k
155
+ className: a(t && "hidden", "flex flex-grow flex-col overflow-y-auto"),
156
+ children: O
146
157
  })]
147
158
  })
148
159
  ] }) : null;
149
160
  };
150
161
  export {
151
- ae as MinimizableDialogV2
162
+ ue as MinimizableDialogV2
152
163
  };
@@ -3,4 +3,5 @@ export declare const CloseBtn: React.FC<{
3
3
  showCloseIcon: boolean;
4
4
  onClick: () => void;
5
5
  tooltipTitle: string;
6
+ buttonRef?: React.Ref<HTMLButtonElement>;
6
7
  }>;
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, RefObject } from 'react';
2
2
  export type ILocale = 'en' | 'no';
3
3
  /**
4
4
  * @figmaNode wXrXt5uKNNzV2DnQCgyYZH#20049-111828 (Design-System · "Dialog minimized")
@@ -32,6 +32,11 @@ export interface IMinimizableDialogV2Props {
32
32
  locale?: ILocale;
33
33
  dataTest: string;
34
34
  style?: React.CSSProperties;
35
+ /**
36
+ * Overrides the Close button as the focus target when the dialog opens.
37
+ * Docked dialogs remain non-modal and do not trap subsequent keyboard navigation.
38
+ */
39
+ initialFocusRef?: RefObject<HTMLElement | null>;
35
40
  minimizedState?: boolean;
36
41
  handleMinimizedState?: (minimized: boolean) => void;
37
42
  enableFullscreen?: boolean;
@@ -1,37 +1,37 @@
1
1
  import { ACTIONS_COLUMN_ID as j } from "../types.js";
2
- import { useRootContext as ge } from "../context/RootContext.js";
2
+ import { useRootContext as he } from "../context/RootContext.js";
3
3
  import n from "./StyledTable.module.js";
4
- import { compact as he } from "../../helpers/arrays.js";
4
+ import { compact as pe } from "../../helpers/arrays.js";
5
5
  import q from "clsx";
6
- import { Fragment as pe, useCallback as K, useEffect as xe, useLayoutEffect as be, useMemo as m, useRef as Ce, useState as Re } from "react";
7
- import { Fragment as Se, jsx as s, jsxs as C } from "react/jsx-runtime";
8
- import { useSortable as De } from "@dnd-kit/sortable";
6
+ import { Fragment as xe, useCallback as K, useEffect as be, useLayoutEffect as Ce, useMemo as m, useRef as Re, useState as Se } from "react";
7
+ import { Fragment as De, jsx as s, jsxs as C } from "react/jsx-runtime";
8
+ import { useSortable as ve } from "@dnd-kit/sortable";
9
9
  import { flexRender as ye } from "@tanstack/react-table";
10
10
  import { CSS as Ne } from "@dnd-kit/utilities";
11
- var ve = (R) => {
11
+ var Fe = (R) => {
12
12
  const t = R.closest("table");
13
13
  if (!t) return !1;
14
14
  const r = Array.from(document.querySelectorAll('a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [tabindex]:not([tabindex="-1"])')).find((g) => !t.contains(g) && !!(t.compareDocumentPosition(g) & Node.DOCUMENT_POSITION_FOLLOWING));
15
15
  return r ? (r.focus(), document.activeElement === r) : !1;
16
16
  };
17
- function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWindow: { paddingLeft: h, paddingRight: p, indexes: T } }) {
18
- const { loading: G, getRowClassName: l, rowHeight: x, onRowClick: S, expandArrow: V, enableDnd: w, disableDndForRow: Y, tdClassName: A, customSubRowData: B, renderSubRows: J, defaultExpanded: Q, actions: D, customActionsNode: X, textExpandArrow: L, enableMultiRowSelection: Z, enableRowSelection: ee, singleSelectionRow: te } = R, y = Y?.(t), { transform: ne, transition: oe, setNodeRef: M, isDragging: H } = De({
17
+ function Ue({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWindow: { paddingLeft: h, paddingRight: p, indexes: T } }) {
18
+ const { loading: G, getRowClassName: l, rowHeight: x, onRowClick: S, expandArrow: V, enableDnd: w, disableDndForRow: Y, tdClassName: A, customSubRowData: B, renderSubRows: J, defaultExpanded: Q, actions: D, customActionsNode: X, textExpandArrow: L, enableMultiRowSelection: Z, enableRowSelection: ee, singleSelectionRow: te } = R, v = Y?.(t), { transform: ne, transition: oe, setNodeRef: M, isDragging: H } = ve({
19
19
  id: t.original.id,
20
- disabled: !w || y
20
+ disabled: !w || v
21
21
  }), ie = {
22
22
  transform: Ne.Transform.toString(ne),
23
23
  transition: oe,
24
24
  opacity: H ? 0.8 : 1,
25
25
  zIndex: H ? 1 : 0,
26
26
  position: "relative"
27
- }, { isResizing: se, disableResizingFlag: le } = ge(), N = t.isExpanded(), b = Ce(null), [ae, ce] = Re(void 0);
28
- be(() => {
29
- !N && b.current && ce(b.current.cells[0]?.clientHeight ?? b.current.offsetHeight);
30
- }, [N]);
27
+ }, { isResizing: se, disableResizingFlag: le } = he(), y = t.isExpanded(), b = Re(null), [ae, ce] = Se(void 0);
28
+ Ce(() => {
29
+ !y && b.current && ce(b.current.cells[0]?.clientHeight ?? b.current.offsetHeight);
30
+ }, [y]);
31
31
  const de = K((e) => {
32
- b.current = e, y || M(e);
33
- }, [y, M]), O = N ? ae ?? x : x;
34
- xe(() => {
32
+ b.current = e, v || M(e);
33
+ }, [v, M]), O = y ? ae ?? x : x;
34
+ be(() => {
35
35
  Q && t.getCanExpand() && !t.getIsExpanded() && t.toggleExpand();
36
36
  }, []);
37
37
  const U = (e) => {
@@ -40,16 +40,39 @@ function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWin
40
40
  !i && L && o ? t.toggleExpand() : i && o && S(e, t), le();
41
41
  }, re = (e) => {
42
42
  e.target.classList.contains("MuiModal-backdrop") || e.target.nodeName === "INPUT" || e.target.nodeName === "BUTTON" || e.target.nodeName === "LI" || e.target.closest("li") || U(e);
43
+ }, ue = (e) => {
44
+ if (e.target === e.currentTarget)
45
+ switch (e.key) {
46
+ case "Tab":
47
+ if (e.shiftKey) {
48
+ if (t.focusPrevRow()) {
49
+ e.preventDefault();
50
+ break;
51
+ }
52
+ const o = e.currentTarget.closest("table")?.querySelector('thead tr[tabindex="0"]');
53
+ o && (e.preventDefault(), o.focus());
54
+ } else (t.focusNextRow() || Fe(e.currentTarget)) && e.preventDefault();
55
+ break;
56
+ case "ArrowDown":
57
+ t.focusNextRow() && e.preventDefault();
58
+ break;
59
+ case "ArrowUp":
60
+ t.focusPrevRow() && e.preventDefault();
61
+ break;
62
+ case "Enter":
63
+ e.preventDefault(), U(e);
64
+ break;
65
+ }
43
66
  }, u = t.getVisibleCells().map((e, o, i) => ({
44
67
  ...e,
45
68
  left: i.slice(0, o).reduce((c, d) => c + (d.column.getSize() ?? 0), 0)
46
69
  })), W = m(() => u.filter((e) => !e.column.columnDef.fixedLeft && !e.column.columnDef.fixedRight && e.column.id !== "actions"), [u]), a = m(() => u.filter((e) => !!e.column.columnDef.fixedRight || e.column.id === "actions").map((e, o, i) => ({
47
70
  ...e,
48
71
  right: i.slice(o + 1).reduce((c, d) => c + (d.column.getSize() ?? 0), 0)
49
- })), [u]), _ = m(() => a.some((e) => e.column.id === j), [a]), z = !!D || !!X, P = m(() => a.some((e) => !!e.column.columnDef.fixedRight), [a]), f = m(() => u.filter((e) => e.column.columnDef.fixedLeft), [u]), v = !Z && !ee && te, F = t.getIsSelected() && v, k = S instanceof Function, $ = T.length > 0 ? he(T.map((e) => W[e])) : W, E = K((e, o) => {
50
- const i = e.column.id === j, c = e.column.columnDef.fixedLeft, d = !!e.column.columnDef.fixedRight, ue = e.id === f.at(-1)?.id, fe = e.id === a.at(0)?.id && !i, me = t.isExpanded(), I = o === 0;
72
+ })), [u]), _ = m(() => a.some((e) => e.column.id === j), [a]), z = !!D || !!X, P = m(() => a.some((e) => !!e.column.columnDef.fixedRight), [a]), f = m(() => u.filter((e) => e.column.columnDef.fixedLeft), [u]), N = !Z && !ee && te, F = t.getIsSelected() && N, k = S instanceof Function, $ = T.length > 0 ? pe(T.map((e) => W[e])) : W, E = K((e, o) => {
73
+ const i = e.column.id === j, c = e.column.columnDef.fixedLeft, d = !!e.column.columnDef.fixedRight, fe = e.id === f.at(-1)?.id, me = e.id === a.at(0)?.id && !i, ge = t.isExpanded(), I = o === 0;
51
74
  return /* @__PURE__ */ s("td", {
52
- className: q(n["t-cell"], k && "cursor-pointer", A, i && n["action-cell"], i && (!z || P) && n["action-cell--no-shadow"], i && !!D && f.length && n.shadowed, i && (l?.(t) ? l?.(t) : n["action-cell-default-background"]), c && n["fixed-cell"], d && n["fixed-right-cell"], ue && n.shadowed, fe && n["shadowed-right"], t.getIsSelected() && n.selected, c && (l?.(t) ? l?.(t) : n["fixed-cell-default-background"]), d && (l?.(t) ? l?.(t) : n["fixed-right-cell-default-background"]), me && n.expanded_row, !!F && n["single-selection"]),
75
+ className: q(n["t-cell"], k && "cursor-pointer", A, i && n["action-cell"], i && (!z || P) && n["action-cell--no-shadow"], i && !!D && f.length && n.shadowed, i && (l?.(t) ? l?.(t) : n["action-cell-default-background"]), c && n["fixed-cell"], d && n["fixed-right-cell"], fe && n.shadowed, me && n["shadowed-right"], t.getIsSelected() && n.selected, c && (l?.(t) ? l?.(t) : n["fixed-cell-default-background"]), d && (l?.(t) ? l?.(t) : n["fixed-right-cell-default-background"]), ge && n.expanded_row, !!F && n["single-selection"]),
53
76
  style: {
54
77
  left: c ? e.left : void 0,
55
78
  right: d ? e.right + (_ ? -1 : 0) : void 0
@@ -71,10 +94,10 @@ function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWin
71
94
  top: "50%",
72
95
  transform: "translateY(-50%)"
73
96
  },
74
- children: /* @__PURE__ */ s(Fe, {})
97
+ children: /* @__PURE__ */ s(ke, {})
75
98
  }), /* @__PURE__ */ s("span", {
76
99
  style: {
77
- marginLeft: I && v ? 30 : 0,
100
+ marginLeft: I && N ? 30 : 0,
78
101
  width: "100%"
79
102
  },
80
103
  children: ye(e.column.columnDef.cell, e.getContext())
@@ -93,10 +116,10 @@ function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWin
93
116
  a,
94
117
  t,
95
118
  z,
96
- v,
119
+ N,
97
120
  A
98
121
  ]);
99
- return /* @__PURE__ */ C(pe, { children: [/* @__PURE__ */ C("tr", {
122
+ return /* @__PURE__ */ C(xe, { children: [/* @__PURE__ */ C("tr", {
100
123
  "aria-selected": t.getIsSelected() || t.isFocused() ? "true" : "false",
101
124
  tabIndex: t.isFocused() || r === 0 && !g ? 0 : -1,
102
125
  "data-index": r,
@@ -115,29 +138,7 @@ function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWin
115
138
  onMouseDown: (e) => {
116
139
  e.detail > 1 && !k && L && e.preventDefault();
117
140
  },
118
- onKeyDown: (e) => {
119
- switch (e.key) {
120
- case "Tab":
121
- if (e.shiftKey) {
122
- if (t.focusPrevRow()) {
123
- e.preventDefault();
124
- break;
125
- }
126
- const o = e.currentTarget.closest("table")?.querySelector('thead tr[tabindex="0"]');
127
- o && (e.preventDefault(), o.focus());
128
- } else (t.focusNextRow() || ve(e.currentTarget)) && e.preventDefault();
129
- break;
130
- case "ArrowDown":
131
- t.focusNextRow() && e.preventDefault();
132
- break;
133
- case "ArrowUp":
134
- t.focusPrevRow() && e.preventDefault();
135
- break;
136
- case "Enter":
137
- U(e);
138
- break;
139
- }
140
- },
141
+ onKeyDownCapture: ue,
141
142
  children: [
142
143
  f.map((e, o) => E(e, o)),
143
144
  h > 0 && /* @__PURE__ */ s("td", {
@@ -165,12 +166,12 @@ function Oe({ styledTableProps: R, row: t, index: r, hasFocusedRow: g, columnWin
165
166
  }),
166
167
  a.map((e, o) => E(e, f.length + $.length + o))
167
168
  ]
168
- }), t.getIsExpanded() && /* @__PURE__ */ s(Se, { children: B && J?.({
169
+ }), t.getIsExpanded() && /* @__PURE__ */ s(De, { children: B && J?.({
169
170
  rows: B.get(t.original.id.toString()) ?? [],
170
171
  row: t.original
171
172
  }) })] }, t.id);
172
173
  }
173
- var Fe = () => /* @__PURE__ */ C("svg", {
174
+ var ke = () => /* @__PURE__ */ C("svg", {
174
175
  xmlns: "http://www.w3.org/2000/svg",
175
176
  width: "20",
176
177
  height: "20",
@@ -182,5 +183,5 @@ var Fe = () => /* @__PURE__ */ C("svg", {
182
183
  })]
183
184
  });
184
185
  export {
185
- Oe as TableRow
186
+ Ue as TableRow
186
187
  };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.87.5",
6
+ "version": "3.88.1",
7
7
  "type": "module",
8
8
  "sideEffects": [
9
9
  "**/*.css",