@dmsi/wedgekit-react 2.1.0 → 2.1.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.
- package/dist/components/DataGrid/index.d.ts.map +1 -1
- package/dist/components/DataGrid/index.js +239 -236
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +25 -22
- package/dist/components/MainBar.d.ts.map +1 -1
- package/dist/components/MainBar.js +26 -23
- package/dist/components/MobileNavMenu.d.ts.map +1 -1
- package/dist/components/MobileNavMenu.js +45 -44
- package/package.json +1 -1
|
@@ -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,
|
|
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,2CAy7BlB;AAeD,YAAY,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,eAAe,QAAQ,CAAC"}
|
|
@@ -1,158 +1,158 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as n, jsxs as d, Fragment as Nt } from "react/jsx-runtime";
|
|
3
|
-
import $t, { useImperativeHandle as Pt, useState as
|
|
3
|
+
import $t, { useImperativeHandle as Pt, useState as g, useCallback as q, useEffect as ce, useRef as ae, useId as kt, useLayoutEffect as Dt } from "react";
|
|
4
4
|
import { useInfiniteScroll as Lt } from "../../hooks/useInfiniteScroll.js";
|
|
5
5
|
import { useTableLayout as Et } from "../../hooks/useTableLayout/useTableLayout.js";
|
|
6
|
-
import { componentGap as
|
|
7
|
-
import { Button as
|
|
6
|
+
import { componentGap as Ee, componentPadding as Me } from "../../classNames.js";
|
|
7
|
+
import { Button as Te } from "../Button.js";
|
|
8
8
|
import { Checkbox as Mt } from "../Checkbox.js";
|
|
9
9
|
import { DraggableCellHeader as Tt, DataGridCell as jt } from "../DataGridCell.js";
|
|
10
|
-
import { Icon as
|
|
10
|
+
import { Icon as je } from "../Icon.js";
|
|
11
11
|
import { Label as Wt } from "../Label.js";
|
|
12
12
|
import { Menu as _t } from "../Menu.js";
|
|
13
13
|
import { MenuOption as At } from "../MenuOption.js";
|
|
14
|
-
import { Paragraph as
|
|
14
|
+
import { Paragraph as y } from "../Paragraph.js";
|
|
15
15
|
import { Select as Ft } from "../Select.js";
|
|
16
16
|
import { Subheader as $ } from "../Subheader.js";
|
|
17
17
|
import { useReactTable as Gt, flexRender as Ot } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
|
|
18
|
-
import { useSensors as Ht, useSensor as
|
|
18
|
+
import { useSensors as Ht, useSensor as de, DndContext as qt, closestCenter as Kt, KeyboardSensor as Vt, TouchSensor as Zt, MouseSensor as Bt } from "../../node_modules/@dnd-kit/core/dist/core.esm.js";
|
|
19
19
|
import { SortableContext as Jt, horizontalListSortingStrategy as Qt, arrayMove as Xt } from "../../node_modules/@dnd-kit/sortable/dist/sortable.esm.js";
|
|
20
20
|
import { restrictToHorizontalAxis as Yt } from "../../node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js";
|
|
21
21
|
import { Notification as Ut } from "../Notification.js";
|
|
22
22
|
import { useVirtualizer as eo } from "../../node_modules/@tanstack/react-virtual/dist/esm/index.js";
|
|
23
|
-
import { clsx as
|
|
24
|
-
import { PinnedColumns as
|
|
25
|
-
import { getSortIcon as
|
|
23
|
+
import { clsx as v } from "../../node_modules/clsx/dist/clsx.js";
|
|
24
|
+
import { PinnedColumns as We } from "./PinnedColumns.js";
|
|
25
|
+
import { getSortIcon as _e } from "./utils.js";
|
|
26
26
|
import { TableBody as to } from "./TableBody/index.js";
|
|
27
27
|
import { SummaryRow as oo } from "./SummaryRow/index.js";
|
|
28
|
-
import { Spinner as
|
|
29
|
-
import { Tooltip as
|
|
30
|
-
import
|
|
28
|
+
import { Spinner as me } from "../Spinner.js";
|
|
29
|
+
import { Tooltip as Ae } from "../Tooltip.js";
|
|
30
|
+
import Fe from "../../static/no-results-image.png.js";
|
|
31
31
|
import { getExpandedRowModel as no, getGroupedRowModel as ro, getFilteredRowModel as lo, getSortedRowModel as so, getCoreRowModel as io } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
|
|
32
|
-
const co = [5, 10, 15, 20, 25, 30, 35],
|
|
32
|
+
const co = [5, 10, 15, 20, 25, 30, 35], Ge = "h-[185px]";
|
|
33
33
|
function Fo({
|
|
34
34
|
id: s,
|
|
35
|
-
rowIdAccessor:
|
|
35
|
+
rowIdAccessor: b,
|
|
36
36
|
testid: l,
|
|
37
37
|
data: k,
|
|
38
|
-
columns:
|
|
38
|
+
columns: Oe,
|
|
39
39
|
status: D,
|
|
40
40
|
isLoadingMore: L = !1,
|
|
41
|
-
onLoadMore:
|
|
41
|
+
onLoadMore: He,
|
|
42
42
|
pagination: r,
|
|
43
43
|
showFilterRow: K = !1,
|
|
44
44
|
hasMore: V = !1,
|
|
45
|
-
sorting:
|
|
46
|
-
onSortingChange:
|
|
47
|
-
columnFilters:
|
|
45
|
+
sorting: ue,
|
|
46
|
+
onSortingChange: qe,
|
|
47
|
+
columnFilters: fe,
|
|
48
48
|
onColumnFiltersChange: Ke,
|
|
49
49
|
rowSelection: Z,
|
|
50
50
|
onRowSelectionChange: E,
|
|
51
|
-
filteredSortedData:
|
|
51
|
+
filteredSortedData: ge,
|
|
52
52
|
totalRowCount: M,
|
|
53
53
|
hideStatusBar: Ve,
|
|
54
54
|
centerHeader: Ze,
|
|
55
55
|
enableColumnSelector: he,
|
|
56
|
-
predeterminedLeftPins:
|
|
57
|
-
predeterminedRightPins:
|
|
58
|
-
useMenuDefaultMinWidth:
|
|
59
|
-
rowDisabled:
|
|
60
|
-
rowDisabledAccessor:
|
|
56
|
+
predeterminedLeftPins: Be = [],
|
|
57
|
+
predeterminedRightPins: Je = [],
|
|
58
|
+
useMenuDefaultMinWidth: Qe,
|
|
59
|
+
rowDisabled: Xe,
|
|
60
|
+
rowDisabledAccessor: Ye,
|
|
61
61
|
isLoading: h = !1,
|
|
62
|
-
loadingMessage:
|
|
63
|
-
loadingDescription:
|
|
62
|
+
loadingMessage: Ue = "Loading Results",
|
|
63
|
+
loadingDescription: pe,
|
|
64
64
|
maxHeight: T,
|
|
65
|
-
fillHeight:
|
|
66
|
-
manualFiltering:
|
|
67
|
-
notifications:
|
|
68
|
-
summaryRow:
|
|
65
|
+
fillHeight: C = !1,
|
|
66
|
+
manualFiltering: B = !1,
|
|
67
|
+
notifications: J,
|
|
68
|
+
summaryRow: Se,
|
|
69
69
|
groupBy: j,
|
|
70
|
-
groupRowMode:
|
|
71
|
-
groupDefaultExpand:
|
|
72
|
-
allowUserGrouping:
|
|
73
|
-
groupSelectionMode:
|
|
74
|
-
hideGroupedColumns:
|
|
75
|
-
grouping:
|
|
76
|
-
onGroupingChange:
|
|
70
|
+
groupRowMode: Q = "spanning",
|
|
71
|
+
groupDefaultExpand: ve = "none",
|
|
72
|
+
allowUserGrouping: X,
|
|
73
|
+
groupSelectionMode: Y = "row",
|
|
74
|
+
hideGroupedColumns: et,
|
|
75
|
+
grouping: R,
|
|
76
|
+
onGroupingChange: tt,
|
|
77
77
|
expanded: W,
|
|
78
|
-
onExpandedChange:
|
|
79
|
-
ref:
|
|
78
|
+
onExpandedChange: ot,
|
|
79
|
+
ref: nt
|
|
80
80
|
}) {
|
|
81
|
-
Pt(
|
|
82
|
-
getSavedLayout: () =>
|
|
81
|
+
Pt(nt, () => ({
|
|
82
|
+
getSavedLayout: () => lt()
|
|
83
83
|
}));
|
|
84
|
-
const [
|
|
85
|
-
columns:
|
|
86
|
-
setColumns:
|
|
87
|
-
getSavedLayout:
|
|
88
|
-
resetToDefaults:
|
|
89
|
-
} = Et(
|
|
90
|
-
|
|
91
|
-
), [
|
|
84
|
+
const [be, xe] = g([]), [we, ye] = g([]), [rt, Ce] = g({}), [U, ee] = g(null), {
|
|
85
|
+
columns: x,
|
|
86
|
+
setColumns: te,
|
|
87
|
+
getSavedLayout: lt,
|
|
88
|
+
resetToDefaults: Re
|
|
89
|
+
} = Et(Oe, s ?? l), [ze, oe] = g(
|
|
90
|
+
x.map((e) => e.id)
|
|
91
|
+
), [Ie, st] = g(
|
|
92
92
|
Object.fromEntries(
|
|
93
|
-
|
|
93
|
+
x.filter((e) => !!e.id).map((e) => [e.id, e.meta?.visible ?? !0])
|
|
94
94
|
)
|
|
95
|
-
),
|
|
95
|
+
), Ne = q(
|
|
96
96
|
(e) => {
|
|
97
|
-
|
|
97
|
+
st(
|
|
98
98
|
Object.fromEntries(
|
|
99
|
-
|
|
99
|
+
x.filter((o) => !!o.id).map((o) => [o.id, o.meta?.visible ?? !0])
|
|
100
100
|
)
|
|
101
|
-
), e &&
|
|
101
|
+
), e && oe(x.map((o) => o.id));
|
|
102
102
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
105
|
-
|
|
106
|
-
}, [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}, [
|
|
110
|
-
const
|
|
103
|
+
[x]
|
|
104
|
+
), it = q(() => {
|
|
105
|
+
Re();
|
|
106
|
+
}, [Re]);
|
|
107
|
+
ce(() => {
|
|
108
|
+
Ne(!0);
|
|
109
|
+
}, [Ne]);
|
|
110
|
+
const ct = r ? ue ?? be : be, at = r ? (e) => {
|
|
111
111
|
const o = typeof e == "function" ? e(
|
|
112
|
-
|
|
112
|
+
ue ?? []
|
|
113
113
|
) : e;
|
|
114
|
-
(
|
|
115
|
-
} :
|
|
116
|
-
const o = typeof e == "function" ? e(
|
|
117
|
-
(Ke ??
|
|
118
|
-
} :
|
|
119
|
-
|
|
120
|
-
const
|
|
114
|
+
(qe ?? xe)(o);
|
|
115
|
+
} : xe, $e = r != null || B, dt = $e ? fe ?? we : we, mt = $e ? (e) => {
|
|
116
|
+
const o = typeof e == "function" ? e(fe ?? []) : e;
|
|
117
|
+
(Ke ?? ye)(o);
|
|
118
|
+
} : ye, z = Z ?? rt, I = ae(z);
|
|
119
|
+
I.current = z;
|
|
120
|
+
const Pe = q(
|
|
121
121
|
(e) => {
|
|
122
122
|
if (r) {
|
|
123
|
-
const o = typeof e == "function" ? e(
|
|
124
|
-
|
|
123
|
+
const o = typeof e == "function" ? e(I.current) : e;
|
|
124
|
+
I.current = o, (E ?? Ce)(o);
|
|
125
125
|
} else if (Z && E) {
|
|
126
|
-
const o = typeof e == "function" ? e(
|
|
127
|
-
|
|
126
|
+
const o = typeof e == "function" ? e(I.current) : e;
|
|
127
|
+
I.current = o, E(o);
|
|
128
128
|
} else
|
|
129
|
-
|
|
129
|
+
Ce(e);
|
|
130
130
|
},
|
|
131
131
|
[Z, E, r]
|
|
132
|
-
), [
|
|
132
|
+
), [ut, ke] = g(
|
|
133
133
|
j ?? []
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, [j,
|
|
138
|
-
const
|
|
135
|
+
ce(() => {
|
|
136
|
+
R === void 0 && j !== void 0 && ke(j);
|
|
137
|
+
}, [j, R]);
|
|
138
|
+
const ne = R ?? ut, ft = R !== void 0 ? (e) => {
|
|
139
139
|
const o = typeof e == "function" ? e(
|
|
140
|
-
|
|
140
|
+
R
|
|
141
141
|
) : e;
|
|
142
|
-
|
|
143
|
-
} :
|
|
144
|
-
() =>
|
|
145
|
-
), ht = W ??
|
|
142
|
+
tt?.(o);
|
|
143
|
+
} : ke, [gt, De] = g(
|
|
144
|
+
() => ve === "all" ? !0 : {}
|
|
145
|
+
), ht = W ?? gt, pt = W !== void 0 ? (e) => {
|
|
146
146
|
const o = typeof e == "function" ? e(
|
|
147
147
|
W
|
|
148
148
|
) : e;
|
|
149
|
-
|
|
150
|
-
} :
|
|
151
|
-
...
|
|
152
|
-
...Object.fromEntries(
|
|
153
|
-
} :
|
|
149
|
+
ot?.(o);
|
|
150
|
+
} : De, St = et ? {
|
|
151
|
+
...Ie,
|
|
152
|
+
...Object.fromEntries(ne.map((e) => [e, !1]))
|
|
153
|
+
} : Ie, vt = kt(), f = ae(null), Le = ae(!1), bt = q(
|
|
154
154
|
(e, o) => {
|
|
155
|
-
|
|
155
|
+
te((t) => t.map((a) => a.id === e ? {
|
|
156
156
|
...a,
|
|
157
157
|
meta: {
|
|
158
158
|
...a.meta,
|
|
@@ -160,14 +160,14 @@ function Fo({
|
|
|
160
160
|
}
|
|
161
161
|
} : a));
|
|
162
162
|
},
|
|
163
|
-
[
|
|
163
|
+
[te]
|
|
164
164
|
), c = Gt({
|
|
165
|
-
columns:
|
|
165
|
+
columns: x,
|
|
166
166
|
data: k,
|
|
167
167
|
defaultColumn: { minSize: 50 },
|
|
168
168
|
getCoreRowModel: io(),
|
|
169
169
|
getSortedRowModel: so(),
|
|
170
|
-
getFilteredRowModel:
|
|
170
|
+
getFilteredRowModel: B ? void 0 : lo(),
|
|
171
171
|
getGroupedRowModel: ro(),
|
|
172
172
|
getExpandedRowModel: no(),
|
|
173
173
|
// Grouping only ever happens client-side in this grid — there is no
|
|
@@ -182,31 +182,31 @@ function Fo({
|
|
|
182
182
|
// internal state update on every grouping change.
|
|
183
183
|
autoResetPageIndex: !1,
|
|
184
184
|
autoResetExpanded: !1,
|
|
185
|
-
manualFiltering:
|
|
185
|
+
manualFiltering: B,
|
|
186
186
|
columnResizeMode: "onChange",
|
|
187
|
-
getRowId:
|
|
187
|
+
getRowId: b ? (e) => String(e[b]) : (e, o) => String(e.id ?? o + 1),
|
|
188
188
|
state: {
|
|
189
|
-
columnOrder:
|
|
190
|
-
sorting:
|
|
191
|
-
columnFilters:
|
|
192
|
-
rowSelection:
|
|
193
|
-
columnVisibility:
|
|
194
|
-
grouping:
|
|
189
|
+
columnOrder: ze,
|
|
190
|
+
sorting: ct,
|
|
191
|
+
columnFilters: dt,
|
|
192
|
+
rowSelection: z,
|
|
193
|
+
columnVisibility: St,
|
|
194
|
+
grouping: ne,
|
|
195
195
|
expanded: ht
|
|
196
196
|
},
|
|
197
197
|
initialState: {
|
|
198
198
|
columnPinning: {
|
|
199
|
-
left:
|
|
200
|
-
right:
|
|
199
|
+
left: Be,
|
|
200
|
+
right: Je
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
enableColumnPinning: !0,
|
|
204
|
-
onColumnOrderChange:
|
|
205
|
-
onSortingChange: P(
|
|
206
|
-
onColumnFiltersChange: P(
|
|
207
|
-
onRowSelectionChange: P(
|
|
208
|
-
onGroupingChange: P(
|
|
209
|
-
onExpandedChange: P(
|
|
204
|
+
onColumnOrderChange: oe,
|
|
205
|
+
onSortingChange: P(at),
|
|
206
|
+
onColumnFiltersChange: P(mt),
|
|
207
|
+
onRowSelectionChange: P(Pe),
|
|
208
|
+
onGroupingChange: P(ft),
|
|
209
|
+
onExpandedChange: P(pt),
|
|
210
210
|
filterFns: {
|
|
211
211
|
startsWith: (e, o, t) => {
|
|
212
212
|
const i = e?.getValue(o);
|
|
@@ -218,23 +218,23 @@ function Fo({
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
|
-
|
|
222
|
-
if (
|
|
221
|
+
ce(() => {
|
|
222
|
+
if (ve !== "first" || W !== void 0)
|
|
223
223
|
return;
|
|
224
224
|
const e = {};
|
|
225
225
|
let o = c.getGroupedRowModel().rows.find((t) => t.depth === 0 && t.getIsGrouped());
|
|
226
226
|
for (; o; )
|
|
227
227
|
e[o.id] = !0, o = o.subRows.find((t) => t.getIsGrouped());
|
|
228
|
-
Object.keys(e).length > 0 &&
|
|
229
|
-
}, [
|
|
230
|
-
const _ = r ?
|
|
228
|
+
Object.keys(e).length > 0 && De(e);
|
|
229
|
+
}, [ne]);
|
|
230
|
+
const _ = r ? ge?.map((e) => String(e.id)) ?? [] : Array.from(
|
|
231
231
|
{ length: M ?? k.length },
|
|
232
232
|
(e, o) => String(o + 1)
|
|
233
|
-
),
|
|
234
|
-
(e) =>
|
|
235
|
-
),
|
|
236
|
-
|
|
237
|
-
if (!
|
|
233
|
+
), re = _.every(
|
|
234
|
+
(e) => z[e]
|
|
235
|
+
), xt = !re && _.some((e) => z[e]), wt = () => {
|
|
236
|
+
Pe((e) => {
|
|
237
|
+
if (!re) {
|
|
238
238
|
const t = {};
|
|
239
239
|
for (const i of _)
|
|
240
240
|
t[i] = !0;
|
|
@@ -248,108 +248,111 @@ function Fo({
|
|
|
248
248
|
});
|
|
249
249
|
};
|
|
250
250
|
Lt({
|
|
251
|
-
containerRef:
|
|
252
|
-
onLoadMore:
|
|
251
|
+
containerRef: f,
|
|
252
|
+
onLoadMore: He ?? (() => {
|
|
253
253
|
}),
|
|
254
254
|
isLoading: L,
|
|
255
255
|
enabled: !r
|
|
256
256
|
}), Dt(() => {
|
|
257
|
-
if (
|
|
258
|
-
const e =
|
|
257
|
+
if (Le.current || !f.current) return;
|
|
258
|
+
const e = f.current.offsetWidth;
|
|
259
259
|
if (e === 0) return;
|
|
260
|
-
const o = c.getLeftLeafColumns().reduce((
|
|
260
|
+
const o = c.getLeftLeafColumns().reduce((u, S) => u + S.getSize(), 0), t = c.getRightLeafColumns().reduce((u, S) => u + S.getSize(), 0), i = e - o - t, a = c.getCenterLeafColumns();
|
|
261
261
|
if (a.length === 0) return;
|
|
262
|
-
const m =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
262
|
+
const m = a.reduce(
|
|
263
|
+
(u, S) => u + S.getSize(),
|
|
264
|
+
0
|
|
265
|
+
), O = m > 0 ? i / m : 1, H = {};
|
|
266
|
+
a.forEach((u) => {
|
|
267
|
+
H[u.id] = Math.max(Math.floor(u.getSize() * O), 50);
|
|
268
|
+
}), c.setColumnSizing(H), Le.current = !0;
|
|
266
269
|
}, []);
|
|
267
|
-
const
|
|
270
|
+
const yt = (e) => {
|
|
268
271
|
const { active: o, over: t } = e;
|
|
269
|
-
o && t && o.id !== t.id &&
|
|
270
|
-
const a = i.indexOf(o.id), m = i.indexOf(t.id),
|
|
271
|
-
return
|
|
272
|
+
o && t && o.id !== t.id && oe((i) => {
|
|
273
|
+
const a = i.indexOf(o.id), m = i.indexOf(t.id), O = Xt(i, a, m);
|
|
274
|
+
return te((H) => O.map((S) => H.find((It) => It.id === S)).filter(Boolean)), O;
|
|
272
275
|
});
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
),
|
|
278
|
-
(e) =>
|
|
276
|
+
}, Ct = Ht(
|
|
277
|
+
de(Bt),
|
|
278
|
+
de(Zt),
|
|
279
|
+
de(Vt)
|
|
280
|
+
), le = c.getCenterLeafColumns(), Rt = le.map((e) => e.id), zt = ze.filter(
|
|
281
|
+
(e) => Rt.includes(e)
|
|
279
282
|
), A = eo({
|
|
280
|
-
count:
|
|
281
|
-
estimateSize: (e) =>
|
|
282
|
-
getScrollElement: () =>
|
|
283
|
+
count: le.length,
|
|
284
|
+
estimateSize: (e) => le[e].getSize(),
|
|
285
|
+
getScrollElement: () => f.current,
|
|
283
286
|
horizontal: !0,
|
|
284
287
|
overscan: 8
|
|
285
|
-
}),
|
|
286
|
-
let F,
|
|
287
|
-
A &&
|
|
288
|
-
const G = c.getRowModel().rows.length === 0,
|
|
288
|
+
}), p = A.getVirtualItems();
|
|
289
|
+
let F, N;
|
|
290
|
+
A && p?.length && (F = p[0]?.start ?? 0, N = A.getTotalSize() - (p[p.length - 1]?.end ?? 0));
|
|
291
|
+
const G = c.getRowModel().rows.length === 0, w = Se && !G ? Se : void 0, se = w ? c.getFilteredRowModel().rows.map((e) => e.original) : [], ie = w ? r ? ge ?? k : k : [];
|
|
289
292
|
return /* @__PURE__ */ n(
|
|
290
|
-
|
|
293
|
+
qt,
|
|
291
294
|
{
|
|
292
|
-
id:
|
|
293
|
-
collisionDetection:
|
|
295
|
+
id: vt,
|
|
296
|
+
collisionDetection: Kt,
|
|
294
297
|
modifiers: [Yt],
|
|
295
|
-
onDragEnd:
|
|
296
|
-
sensors:
|
|
298
|
+
onDragEnd: yt,
|
|
299
|
+
sensors: Ct,
|
|
297
300
|
children: /* @__PURE__ */ n(
|
|
298
301
|
Jt,
|
|
299
302
|
{
|
|
300
|
-
items:
|
|
303
|
+
items: zt,
|
|
301
304
|
strategy: Qt,
|
|
302
305
|
children: /* @__PURE__ */ d(
|
|
303
306
|
"div",
|
|
304
307
|
{
|
|
305
|
-
className:
|
|
308
|
+
className: v(
|
|
306
309
|
"flex flex-col gap-2 w-full",
|
|
307
|
-
|
|
310
|
+
C ? "grow min-h-0" : "grow-0 h-fit"
|
|
308
311
|
),
|
|
309
312
|
children: [
|
|
310
|
-
|
|
313
|
+
J && J.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-col gap-2 shrink-0 [color:initial]", children: J.map((e, o) => /* @__PURE__ */ n(Ut, { ...e }, e.id ?? o)) }),
|
|
311
314
|
/* @__PURE__ */ d(
|
|
312
315
|
"div",
|
|
313
316
|
{
|
|
314
317
|
id: s,
|
|
315
318
|
"data-testid": l,
|
|
316
|
-
className:
|
|
319
|
+
className: v(
|
|
317
320
|
"flex flex-col rounded border border-border-primary-normal overflow-hidden text-text-primary-normal",
|
|
318
|
-
|
|
321
|
+
C ? "flex-1 min-h-0" : "grow-0 h-fit"
|
|
319
322
|
),
|
|
320
323
|
children: [
|
|
321
324
|
/* @__PURE__ */ d(
|
|
322
325
|
"div",
|
|
323
326
|
{
|
|
324
|
-
className:
|
|
327
|
+
className: v(
|
|
325
328
|
"flex overflow-auto scrollbar-thin relative contain-paint will-change-transform",
|
|
326
|
-
G ? "overflow-y-hidden" : !
|
|
327
|
-
|
|
329
|
+
G ? "overflow-y-hidden" : !C && "min-h-[120px]",
|
|
330
|
+
C && "flex-1 min-h-0"
|
|
328
331
|
),
|
|
329
332
|
style: T !== void 0 ? { maxHeight: typeof T == "number" ? `${T}px` : T } : void 0,
|
|
330
|
-
ref:
|
|
333
|
+
ref: f,
|
|
331
334
|
inert: h || void 0,
|
|
332
335
|
"aria-busy": h || void 0,
|
|
333
336
|
children: [
|
|
334
337
|
/* @__PURE__ */ n(
|
|
335
|
-
|
|
338
|
+
We,
|
|
336
339
|
{
|
|
337
340
|
testid: l,
|
|
338
341
|
pinDirection: "left",
|
|
339
342
|
table: c,
|
|
340
|
-
tableContainerRef:
|
|
343
|
+
tableContainerRef: f,
|
|
341
344
|
pagination: r,
|
|
342
345
|
isLoadingMore: L,
|
|
343
346
|
hasMore: V,
|
|
344
347
|
showFilterRow: K,
|
|
345
|
-
groupRowMode:
|
|
346
|
-
groupSelectionMode:
|
|
347
|
-
allowUserGrouping:
|
|
348
|
-
hoveredRowId:
|
|
349
|
-
setHoveredRowId:
|
|
350
|
-
summaryRow:
|
|
351
|
-
filteredRows:
|
|
352
|
-
allRows:
|
|
348
|
+
groupRowMode: Q,
|
|
349
|
+
groupSelectionMode: Y,
|
|
350
|
+
allowUserGrouping: X,
|
|
351
|
+
hoveredRowId: U,
|
|
352
|
+
setHoveredRowId: ee,
|
|
353
|
+
summaryRow: w,
|
|
354
|
+
filteredRows: se,
|
|
355
|
+
allRows: ie,
|
|
353
356
|
totalRowCount: M
|
|
354
357
|
}
|
|
355
358
|
),
|
|
@@ -370,7 +373,7 @@ function Fo({
|
|
|
370
373
|
}
|
|
371
374
|
)
|
|
372
375
|
) : null,
|
|
373
|
-
|
|
376
|
+
p.map((o) => {
|
|
374
377
|
const t = e.headers[o.index];
|
|
375
378
|
if (t) {
|
|
376
379
|
if (typeof t.column.columnDef.header == "string") {
|
|
@@ -384,9 +387,9 @@ function Fo({
|
|
|
384
387
|
header: t,
|
|
385
388
|
locked: t.column.columnDef.meta?.locked,
|
|
386
389
|
center: Ze,
|
|
387
|
-
allowUserGrouping:
|
|
388
|
-
isLast: !
|
|
389
|
-
className:
|
|
390
|
+
allowUserGrouping: X,
|
|
391
|
+
isLast: !N && o.index === p[p.length - 1]?.index,
|
|
392
|
+
className: v(
|
|
390
393
|
t.column.getCanSort() ? "cursor-pointer" : "cursor-grab",
|
|
391
394
|
"group",
|
|
392
395
|
{
|
|
@@ -394,10 +397,10 @@ function Fo({
|
|
|
394
397
|
"justify-end": a === "right"
|
|
395
398
|
}
|
|
396
399
|
),
|
|
397
|
-
useMenuDefaultMinWidth:
|
|
400
|
+
useMenuDefaultMinWidth: Qe,
|
|
398
401
|
children: [
|
|
399
402
|
a === "left" && /* @__PURE__ */ n(
|
|
400
|
-
|
|
403
|
+
Ae,
|
|
401
404
|
{
|
|
402
405
|
showOnTruncation: !0,
|
|
403
406
|
message: t.column.columnDef.header,
|
|
@@ -405,14 +408,14 @@ function Fo({
|
|
|
405
408
|
children: /* @__PURE__ */ n($, { as: "p", addOverflow: !0, tall: !0, children: t.column.columnDef.header })
|
|
406
409
|
}
|
|
407
410
|
),
|
|
408
|
-
|
|
409
|
-
!t.column.getIsSorted() && t.column.getCanSort() && !c.getState().columnSizingInfo.isResizingColumn &&
|
|
411
|
+
_e(t.column.getIsSorted()),
|
|
412
|
+
!t.column.getIsSorted() && t.column.getCanSort() && !c.getState().columnSizingInfo.isResizingColumn && _e(
|
|
410
413
|
t.column.getNextSortingOrder(),
|
|
411
414
|
!0
|
|
412
415
|
),
|
|
413
416
|
t.column.getSortIndex() !== -1 && c.getState().sorting.length > 1 && /* @__PURE__ */ n($, { tall: !0, children: t.column.getSortIndex() + 1 }),
|
|
414
417
|
a === "right" && /* @__PURE__ */ n(
|
|
415
|
-
|
|
418
|
+
Ae,
|
|
416
419
|
{
|
|
417
420
|
showOnTruncation: !0,
|
|
418
421
|
message: t.column.columnDef.header,
|
|
@@ -453,9 +456,9 @@ function Fo({
|
|
|
453
456
|
{
|
|
454
457
|
id: s ? `${s}-select-all-checkbox` : void 0,
|
|
455
458
|
testid: l ? `${l}-select-all-checkbox` : void 0,
|
|
456
|
-
checked:
|
|
457
|
-
indeterminate:
|
|
458
|
-
onChange:
|
|
459
|
+
checked: re,
|
|
460
|
+
indeterminate: xt,
|
|
461
|
+
onChange: wt
|
|
459
462
|
}
|
|
460
463
|
)
|
|
461
464
|
}
|
|
@@ -465,12 +468,12 @@ function Fo({
|
|
|
465
468
|
) }, t.id);
|
|
466
469
|
}
|
|
467
470
|
}),
|
|
468
|
-
|
|
471
|
+
N ? (
|
|
469
472
|
//fake empty column to the right for virtualization scroll padding
|
|
470
473
|
/* @__PURE__ */ n(
|
|
471
474
|
"th",
|
|
472
475
|
{
|
|
473
|
-
style: { display: "flex", width:
|
|
476
|
+
style: { display: "flex", width: N }
|
|
474
477
|
}
|
|
475
478
|
)
|
|
476
479
|
) : null
|
|
@@ -485,59 +488,59 @@ function Fo({
|
|
|
485
488
|
testid: l,
|
|
486
489
|
columnVirtualizer: A,
|
|
487
490
|
table: c,
|
|
488
|
-
tableContainerRef:
|
|
491
|
+
tableContainerRef: f,
|
|
489
492
|
virtualPaddingLeft: F,
|
|
490
|
-
virtualPaddingRight:
|
|
493
|
+
virtualPaddingRight: N,
|
|
491
494
|
pagination: r,
|
|
492
495
|
isLoadingMore: L,
|
|
493
496
|
hasMore: V,
|
|
494
497
|
showFilterRow: K,
|
|
495
498
|
enableColumnSelector: he,
|
|
496
|
-
groupRowMode:
|
|
497
|
-
groupSelectionMode:
|
|
498
|
-
rowDisabled:
|
|
499
|
-
rowDisabledAccessor:
|
|
500
|
-
hoveredRowId:
|
|
501
|
-
setHoveredRowId:
|
|
499
|
+
groupRowMode: Q,
|
|
500
|
+
groupSelectionMode: Y,
|
|
501
|
+
rowDisabled: Xe,
|
|
502
|
+
rowDisabledAccessor: Ye,
|
|
503
|
+
hoveredRowId: U,
|
|
504
|
+
setHoveredRowId: ee
|
|
502
505
|
}
|
|
503
506
|
),
|
|
504
|
-
|
|
507
|
+
w && /* @__PURE__ */ n(
|
|
505
508
|
oo,
|
|
506
509
|
{
|
|
507
510
|
id: s,
|
|
508
511
|
testid: l,
|
|
509
512
|
table: c,
|
|
510
|
-
summaryConfig:
|
|
511
|
-
filteredRows:
|
|
512
|
-
allRows:
|
|
513
|
+
summaryConfig: w,
|
|
514
|
+
filteredRows: se,
|
|
515
|
+
allRows: ie,
|
|
513
516
|
totalRowCount: M,
|
|
514
517
|
locked: !1
|
|
515
518
|
}
|
|
516
519
|
)
|
|
517
520
|
] }),
|
|
518
521
|
/* @__PURE__ */ n(
|
|
519
|
-
|
|
522
|
+
We,
|
|
520
523
|
{
|
|
521
524
|
id: s,
|
|
522
525
|
enableColumnSelector: he,
|
|
523
|
-
toggleColumnVisibility:
|
|
524
|
-
resetColumnVisibility:
|
|
526
|
+
toggleColumnVisibility: bt,
|
|
527
|
+
resetColumnVisibility: it,
|
|
525
528
|
testid: l,
|
|
526
529
|
pinDirection: "right",
|
|
527
530
|
table: c,
|
|
528
|
-
tableContainerRef:
|
|
531
|
+
tableContainerRef: f,
|
|
529
532
|
pagination: r,
|
|
530
533
|
isLoadingMore: L,
|
|
531
534
|
hasMore: V,
|
|
532
535
|
showFilterRow: K,
|
|
533
|
-
groupRowMode:
|
|
534
|
-
groupSelectionMode:
|
|
535
|
-
allowUserGrouping:
|
|
536
|
-
hoveredRowId:
|
|
537
|
-
setHoveredRowId:
|
|
538
|
-
summaryRow:
|
|
539
|
-
filteredRows:
|
|
540
|
-
allRows:
|
|
536
|
+
groupRowMode: Q,
|
|
537
|
+
groupSelectionMode: Y,
|
|
538
|
+
allowUserGrouping: X,
|
|
539
|
+
hoveredRowId: U,
|
|
540
|
+
setHoveredRowId: ee,
|
|
541
|
+
summaryRow: w,
|
|
542
|
+
filteredRows: se,
|
|
543
|
+
allRows: ie,
|
|
541
544
|
totalRowCount: M
|
|
542
545
|
}
|
|
543
546
|
)
|
|
@@ -547,34 +550,34 @@ function Fo({
|
|
|
547
550
|
h && G && /* @__PURE__ */ d(
|
|
548
551
|
"div",
|
|
549
552
|
{
|
|
550
|
-
className:
|
|
551
|
-
|
|
553
|
+
className: v(
|
|
554
|
+
Ge,
|
|
552
555
|
"flex flex-col items-center justify-center",
|
|
553
|
-
|
|
554
|
-
|
|
556
|
+
Ee,
|
|
557
|
+
Me
|
|
555
558
|
),
|
|
556
559
|
children: [
|
|
557
|
-
/* @__PURE__ */ n(
|
|
558
|
-
/* @__PURE__ */ n($, { color: "text-secondary-normal", children:
|
|
559
|
-
|
|
560
|
+
/* @__PURE__ */ n(me, { size: "large" }),
|
|
561
|
+
/* @__PURE__ */ n($, { color: "text-secondary-normal", children: Ue }),
|
|
562
|
+
pe && /* @__PURE__ */ n(y, { color: "text-secondary-normal", children: pe })
|
|
560
563
|
]
|
|
561
564
|
}
|
|
562
565
|
),
|
|
563
566
|
!h && G && /* @__PURE__ */ d(
|
|
564
567
|
"div",
|
|
565
568
|
{
|
|
566
|
-
className:
|
|
567
|
-
|
|
569
|
+
className: v(
|
|
570
|
+
Ge,
|
|
568
571
|
"flex flex-col items-center justify-center",
|
|
569
|
-
|
|
570
|
-
|
|
572
|
+
Ee,
|
|
573
|
+
Me
|
|
571
574
|
),
|
|
572
575
|
"data-testid": l ? `${l}-no-results` : void 0,
|
|
573
576
|
children: [
|
|
574
577
|
/* @__PURE__ */ n(
|
|
575
578
|
"img",
|
|
576
579
|
{
|
|
577
|
-
src:
|
|
580
|
+
src: Fe?.src ?? Fe,
|
|
578
581
|
alt: "No Results",
|
|
579
582
|
className: "h-30 opacity-20",
|
|
580
583
|
width: 120,
|
|
@@ -582,15 +585,15 @@ function Fo({
|
|
|
582
585
|
}
|
|
583
586
|
),
|
|
584
587
|
/* @__PURE__ */ n($, { color: "text-secondary-normal", children: "No Results" }),
|
|
585
|
-
/* @__PURE__ */ n(
|
|
588
|
+
/* @__PURE__ */ n(y, { color: "text-secondary-normal", children: "To view results, enter or update your search criteria." })
|
|
586
589
|
]
|
|
587
590
|
}
|
|
588
591
|
),
|
|
589
|
-
!Ve && /* @__PURE__ */ d("div", { className:
|
|
592
|
+
!Ve && /* @__PURE__ */ d("div", { className: v("p-2 pt-[7px] border-t border-border-primary-normal min-h-[34px]", !C && "h-full"), children: [
|
|
590
593
|
r && /* @__PURE__ */ d("div", { className: "flex justify-between items-center", children: [
|
|
591
594
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 w-min", children: h ? /* @__PURE__ */ d("div", { className: "flex items-center gap-2 whitespace-nowrap", children: [
|
|
592
|
-
/* @__PURE__ */ n(
|
|
593
|
-
/* @__PURE__ */ n(
|
|
595
|
+
/* @__PURE__ */ n(me, { size: "small" }),
|
|
596
|
+
/* @__PURE__ */ n(y, { children: D || "Loading..." })
|
|
594
597
|
] }) : /* @__PURE__ */ d(Nt, { children: [
|
|
595
598
|
/* @__PURE__ */ n(
|
|
596
599
|
Ft,
|
|
@@ -624,18 +627,18 @@ function Fo({
|
|
|
624
627
|
] }) }),
|
|
625
628
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
626
629
|
/* @__PURE__ */ n(
|
|
627
|
-
|
|
630
|
+
Te,
|
|
628
631
|
{
|
|
629
632
|
id: s ? `${s}-prev-page-button` : void 0,
|
|
630
633
|
testid: l ? `${l}-prev-page-button` : void 0,
|
|
631
634
|
iconOnly: !0,
|
|
632
|
-
leftIcon: /* @__PURE__ */ n(
|
|
635
|
+
leftIcon: /* @__PURE__ */ n(je, { name: "chevron_left" }),
|
|
633
636
|
onClick: () => r.onPageChange(r.pageIndex - 1),
|
|
634
637
|
variant: "tertiary",
|
|
635
638
|
disabled: r.pageIndex === 0
|
|
636
639
|
}
|
|
637
640
|
),
|
|
638
|
-
/* @__PURE__ */ d(
|
|
641
|
+
/* @__PURE__ */ d(y, { children: [
|
|
639
642
|
r.pageIndex * r.pageSize + 1,
|
|
640
643
|
" -",
|
|
641
644
|
" ",
|
|
@@ -648,12 +651,12 @@ function Fo({
|
|
|
648
651
|
r.total
|
|
649
652
|
] }),
|
|
650
653
|
/* @__PURE__ */ n(
|
|
651
|
-
|
|
654
|
+
Te,
|
|
652
655
|
{
|
|
653
656
|
id: s ? `${s}-next-page-button` : void 0,
|
|
654
657
|
testid: l ? `${l}-next-page-button` : void 0,
|
|
655
658
|
iconOnly: !0,
|
|
656
|
-
leftIcon: /* @__PURE__ */ n(
|
|
659
|
+
leftIcon: /* @__PURE__ */ n(je, { name: "chevron_right" }),
|
|
657
660
|
onClick: () => r.onPageChange(r.pageIndex + 1),
|
|
658
661
|
variant: "tertiary",
|
|
659
662
|
disabled: (r.pageIndex + 1) * r.pageSize >= r.total
|
|
@@ -662,11 +665,11 @@ function Fo({
|
|
|
662
665
|
] })
|
|
663
666
|
] }),
|
|
664
667
|
!r && h && /* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
665
|
-
/* @__PURE__ */ n(
|
|
666
|
-
/* @__PURE__ */ n(
|
|
668
|
+
/* @__PURE__ */ n(me, { size: "small" }),
|
|
669
|
+
/* @__PURE__ */ n(y, { testid: l ? `${l}-status-text` : void 0, children: D || "Loading..." })
|
|
667
670
|
] }),
|
|
668
671
|
!r && !h && D && /* @__PURE__ */ n(
|
|
669
|
-
|
|
672
|
+
y,
|
|
670
673
|
{
|
|
671
674
|
testid: l ? `${l}-status-text` : void 0,
|
|
672
675
|
children: D
|
|
@@ -685,9 +688,9 @@ function Fo({
|
|
|
685
688
|
);
|
|
686
689
|
}
|
|
687
690
|
function P(s) {
|
|
688
|
-
return (
|
|
691
|
+
return (b) => {
|
|
689
692
|
s(
|
|
690
|
-
(l) => typeof
|
|
693
|
+
(l) => typeof b == "function" ? b(l) : b
|
|
691
694
|
);
|
|
692
695
|
};
|
|
693
696
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,MAAM,MAAM,SAAS,GAAG,OAAO,GAC7B,cAAc,GACd,eAAe,GAAG;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,wBAAgB,IAAI,CAAC,EACnB,EAAQ,EACR,SAAS,EACT,OAAmB,EACnB,eAA6B,EAC7B,QAAgB,EAChB,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAiB,EACjB,MAAM,EACN,MAAM,EACN,KAAa,EACb,WAAW,EACX,GAAG,KAAK,EACT,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,MAAM,MAAM,SAAS,GAAG,OAAO,GAC7B,cAAc,GACd,eAAe,GAAG;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C,eAAe,CAAC,EAAE,WAAW,GAAG,SAAS,GAAG,YAAY,CAAC;IACzD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEJ,wBAAgB,IAAI,CAAC,EACnB,EAAQ,EACR,SAAS,EACT,OAAmB,EACnB,eAA6B,EAC7B,QAAgB,EAChB,KAAK,EACL,OAAO,EACP,KAAK,EACL,SAAiB,EACjB,MAAM,EACN,MAAM,EACN,KAAa,EACb,WAAW,EACX,GAAG,KAAK,EACT,EAAE,SAAS,2CAsFX"}
|
package/dist/components/Link.js
CHANGED
|
@@ -1,64 +1,67 @@
|
|
|
1
1
|
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
-
import { clsx as
|
|
2
|
+
import { clsx as r } from "../node_modules/clsx/dist/clsx.js";
|
|
3
3
|
import { baseTransition as D, typography as l, componentPaddingY as I } from "../classNames.js";
|
|
4
4
|
function T({
|
|
5
|
-
as:
|
|
6
|
-
className:
|
|
7
|
-
variant:
|
|
5
|
+
as: s = "a",
|
|
6
|
+
className: x,
|
|
7
|
+
variant: i = "primary",
|
|
8
8
|
typographyStyle: o = "paragraph",
|
|
9
9
|
disabled: t = !1,
|
|
10
|
-
color:
|
|
10
|
+
color: n,
|
|
11
11
|
paddedY: p,
|
|
12
|
-
align:
|
|
12
|
+
align: e,
|
|
13
13
|
underline: d = !1,
|
|
14
14
|
testid: f,
|
|
15
|
-
active:
|
|
15
|
+
active: c,
|
|
16
16
|
block: m = !1,
|
|
17
17
|
addOverflow: u,
|
|
18
18
|
...a
|
|
19
19
|
}) {
|
|
20
|
-
const y =
|
|
21
|
-
|
|
20
|
+
const y = s, v = i === "primary" && !t && r(
|
|
21
|
+
c ? "text-text-link-active" : "text-text-link-normal",
|
|
22
22
|
"hover:text-text-link-hover active:text-text-link-active"
|
|
23
|
-
), h =
|
|
24
|
-
|
|
23
|
+
), h = i === "secondary" && !t && r(
|
|
24
|
+
c ? "text-text-link-active" : "text-text-primary-normal",
|
|
25
25
|
"hover:text-text-link-hover active:text-text-link-active"
|
|
26
|
-
), S =
|
|
27
|
-
|
|
26
|
+
), S = i === "critical" && !t && r(
|
|
27
|
+
c ? "text-text-action-critical-active" : "text-text-action-critical-normal",
|
|
28
28
|
"hover:text-text-action-critical-hover active:text-text-action-critical-active"
|
|
29
|
-
), k = t &&
|
|
29
|
+
), k = t && i === "critical" && r("text-text-action-critical-disabled"), w = t && ["primary", "secondary"].includes(i) && r("text-text-link-disabled"), g = t && r("pointer-events-none cursor-default"), j = d ? "decoration-current" : "decoration-decoration-underline", Y = p && I;
|
|
30
30
|
return /* @__PURE__ */ C(
|
|
31
31
|
y,
|
|
32
32
|
{
|
|
33
|
-
className:
|
|
33
|
+
className: r(
|
|
34
34
|
"inline",
|
|
35
35
|
t ? "cursor-default" : "cursor-pointer",
|
|
36
36
|
"underline decoration-[10%] underline-offset-[32%]",
|
|
37
37
|
!t && "hover:decoration-current",
|
|
38
38
|
!t && "active:decoration-decoration-underline",
|
|
39
|
-
"flex flex-col
|
|
39
|
+
"flex flex-col justify-center",
|
|
40
|
+
(!e || e === "center") && "items-center",
|
|
41
|
+
e === "left" && "items-start",
|
|
42
|
+
e === "right" && "items-end",
|
|
40
43
|
D,
|
|
41
44
|
v,
|
|
42
45
|
h,
|
|
43
46
|
S,
|
|
44
47
|
k,
|
|
45
|
-
g,
|
|
46
48
|
w,
|
|
49
|
+
g,
|
|
47
50
|
j,
|
|
48
51
|
o === "caption" && l.caption,
|
|
49
52
|
o === "paragraph" && l.paragraph,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
+
e === "left" && "text-left",
|
|
54
|
+
e === "center" && "text-center",
|
|
55
|
+
e === "right" && "text-right",
|
|
53
56
|
Y,
|
|
54
57
|
u && "whitespace-nowrap text-ellipsis overflow-hidden",
|
|
55
|
-
|
|
58
|
+
x,
|
|
56
59
|
m ? "w-full" : "w-fit"
|
|
57
60
|
),
|
|
58
61
|
...a,
|
|
59
62
|
style: {
|
|
60
63
|
...a.style,
|
|
61
|
-
color:
|
|
64
|
+
color: n ? `var(--color-${n})` : void 0
|
|
62
65
|
},
|
|
63
66
|
"aria-disabled": t,
|
|
64
67
|
tabIndex: t ? -1 : void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainBar.d.ts","sourceRoot":"","sources":["../../src/components/MainBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASlD,KAAK,YAAY,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oQAAoQ;IACpQ,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,EAAE,EACF,MAAM,EACN,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,KAAK,EACnB,iBAAiB,EAAE,UAAU,EAC7B,kBAAkB,EAAE,WAAW,EAC/B,MAAc,EACd,aAAqB,EACrB,IAAI,GACL,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"MainBar.d.ts","sourceRoot":"","sources":["../../src/components/MainBar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASlD,KAAK,YAAY,GAAG;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAE/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oQAAoQ;IACpQ,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,wBAAgB,OAAO,CAAC,EACtB,EAAE,EACF,MAAM,EACN,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,KAAK,EACnB,iBAAiB,EAAE,UAAU,EAC7B,kBAAkB,EAAE,WAAW,EAC/B,MAAc,EACd,aAAqB,EACrB,IAAI,GACL,EAAE,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,2CAkEtC"}
|
|
@@ -1,45 +1,48 @@
|
|
|
1
|
-
import { jsx as e, Fragment as
|
|
1
|
+
import { jsx as e, Fragment as h, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { clsx as n } from "../node_modules/clsx/dist/clsx.js";
|
|
3
|
-
import { layoutGap as
|
|
4
|
-
function
|
|
5
|
-
id:
|
|
6
|
-
testid:
|
|
7
|
-
leftContent:
|
|
3
|
+
import { layoutGap as l, layoutGroupGap as k, containerPaddingX as u, containerPaddingY as g, componentPaddingTopUsingComponentGap2xMobile as b } from "../classNames.js";
|
|
4
|
+
function C({
|
|
5
|
+
id: r,
|
|
6
|
+
testid: m,
|
|
7
|
+
leftContent: s,
|
|
8
8
|
rightContent: o,
|
|
9
9
|
mobileLeftContent: i,
|
|
10
|
-
mobileRightContent:
|
|
11
|
-
footer:
|
|
12
|
-
centerContent:
|
|
10
|
+
mobileRightContent: p,
|
|
11
|
+
footer: x = !1,
|
|
12
|
+
centerContent: f = !1,
|
|
13
13
|
cart: t
|
|
14
14
|
}) {
|
|
15
|
-
|
|
15
|
+
const a = !!(s || o || t), d = !!(i || p);
|
|
16
|
+
return !a && !d ? /* @__PURE__ */ e(h, {}) : /* @__PURE__ */ c(
|
|
16
17
|
"div",
|
|
17
18
|
{
|
|
18
|
-
id:
|
|
19
|
-
"data-testid":
|
|
19
|
+
id: r,
|
|
20
|
+
"data-testid": m,
|
|
20
21
|
className: n(
|
|
21
22
|
"min-h-mobile-container-padding",
|
|
22
23
|
"bg-background-brand-normal items-center justify-between",
|
|
23
24
|
"z-10 shadow-4",
|
|
24
|
-
"flex",
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
a && d && "flex",
|
|
26
|
+
a && !d && "hidden desktop:flex",
|
|
27
|
+
!a && d && "flex desktop:hidden",
|
|
28
|
+
k,
|
|
29
|
+
u,
|
|
30
|
+
x ? g : f ? "py-[calc((var(--spacing-mobile-component-gap)_+_8px)_/_2)] desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap" : b
|
|
28
31
|
),
|
|
29
32
|
children: [
|
|
30
|
-
|
|
33
|
+
s && /* @__PURE__ */ e(
|
|
31
34
|
"div",
|
|
32
35
|
{
|
|
33
|
-
className: n("hidden desktop:flex items-center flex-1 min-w-0 overflow-x-auto no-scrollbar",
|
|
34
|
-
children:
|
|
36
|
+
className: n("hidden desktop:flex items-center flex-1 min-w-0 overflow-x-auto no-scrollbar", l),
|
|
37
|
+
children: s
|
|
35
38
|
}
|
|
36
39
|
),
|
|
37
|
-
(o || t) && /* @__PURE__ */
|
|
40
|
+
(o || t) && /* @__PURE__ */ c(
|
|
38
41
|
"div",
|
|
39
42
|
{
|
|
40
43
|
className: n(
|
|
41
44
|
"hidden desktop:flex items-center ml-auto",
|
|
42
|
-
|
|
45
|
+
l
|
|
43
46
|
),
|
|
44
47
|
children: [
|
|
45
48
|
o,
|
|
@@ -49,11 +52,11 @@ function w({
|
|
|
49
52
|
}
|
|
50
53
|
),
|
|
51
54
|
i && /* @__PURE__ */ e("div", { className: n("flex items-center desktop:hidden flex-1 min-w-0 overflow-x-auto no-scrollbar"), children: i }),
|
|
52
|
-
|
|
55
|
+
p && /* @__PURE__ */ e("div", { className: n("flex items-center desktop:hidden"), children: p })
|
|
53
56
|
]
|
|
54
57
|
}
|
|
55
58
|
);
|
|
56
59
|
}
|
|
57
60
|
export {
|
|
58
|
-
|
|
61
|
+
C as MainBar
|
|
59
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileNavMenu.d.ts","sourceRoot":"","sources":["../../src/components/MobileNavMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAc,eAAe,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAYlF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,sDAAsD;IACtD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;CAC5C,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,MAAM,EACN,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,SAAkB,EAClB,MAAM,EACN,mBAA2B,EAC3B,KAAe,EACf,kBAAkB,GACnB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"MobileNavMenu.d.ts","sourceRoot":"","sources":["../../src/components/MobileNavMenu.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,EAKV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAc,eAAe,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAYlF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,WAAW,EAAE,eAAe,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAC9C,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC7B,sDAAsD;IACtD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,qFAAqF;IACrF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;CAC5C,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAC5B,EAAE,EACF,MAAM,EACN,WAAW,EACX,IAAI,EACJ,OAAO,EACP,UAAU,EACV,SAAkB,EAClB,MAAM,EACN,mBAA2B,EAC3B,KAAe,EACf,kBAAkB,GACnB,EAAE,kBAAkB,sCA6MpB"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as a, Fragment as
|
|
3
|
-
import { useState as g, useRef as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import { NestedMenu as
|
|
6
|
-
import { MenuOption as
|
|
2
|
+
import { jsxs as a, Fragment as $, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useState as g, useRef as I, useLayoutEffect as j, useEffect as w } from "react";
|
|
4
|
+
import { createPortal as A } from "react-dom";
|
|
5
|
+
import { NestedMenu as D } from "./NestedMenu.js";
|
|
6
|
+
import { MenuOption as H } from "./MenuOption.js";
|
|
7
7
|
import { Icon as m } from "./Icon.js";
|
|
8
8
|
import { Stack as k } from "./Stack.js";
|
|
9
|
-
import { Button as
|
|
10
|
-
import { Heading1 as
|
|
11
|
-
import { Theme as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { Button as L } from "./Button.js";
|
|
10
|
+
import { Heading1 as R } from "./Heading.js";
|
|
11
|
+
import { Theme as X } from "./Theme.js";
|
|
12
|
+
import { useMatchesMobile as Y } from "../hooks/useMatchesMedia.js";
|
|
13
|
+
import { useMounted as K } from "../hooks/useMounted.js";
|
|
14
|
+
import { useKeydown as O } from "../hooks/useKeydown.js";
|
|
15
|
+
import { findDocumentRoot as T } from "../utils.js";
|
|
15
16
|
import { clsx as v } from "../node_modules/clsx/dist/clsx.js";
|
|
16
|
-
function
|
|
17
|
+
function re({
|
|
17
18
|
id: c,
|
|
18
|
-
testid:
|
|
19
|
+
testid: n,
|
|
19
20
|
currentMenu: i,
|
|
20
21
|
open: r,
|
|
21
22
|
onClose: l,
|
|
@@ -23,17 +24,17 @@ function te({
|
|
|
23
24
|
direction: b = "left",
|
|
24
25
|
footer: E,
|
|
25
26
|
hideFooterOnSubMenu: x = !1,
|
|
26
|
-
theme:
|
|
27
|
-
pinnedSubMenuEntry:
|
|
27
|
+
theme: M = "brand",
|
|
28
|
+
pinnedSubMenuEntry: C
|
|
28
29
|
}) {
|
|
29
30
|
const [s, d] = g(
|
|
30
31
|
null
|
|
31
|
-
), [
|
|
32
|
+
), [p, u] = g(0), z = K(), S = Y(), y = I(null), N = {
|
|
32
33
|
transform: r ? "translateX(0)" : b === "right" ? "translateX(100%)" : "translateX(-100%)"
|
|
33
34
|
};
|
|
34
|
-
|
|
35
|
+
j(() => {
|
|
35
36
|
r && (d(null), u(0));
|
|
36
|
-
}, [r]),
|
|
37
|
+
}, [r]), O(
|
|
37
38
|
{
|
|
38
39
|
ArrowUp: () => {
|
|
39
40
|
const e = i.subEntries?.length || 0;
|
|
@@ -44,7 +45,7 @@ function te({
|
|
|
44
45
|
e !== 0 && u((t) => t >= e - 1 ? 0 : t + 1);
|
|
45
46
|
},
|
|
46
47
|
"Enter/Space": () => {
|
|
47
|
-
const e = (i.subEntries || [])[
|
|
48
|
+
const e = (i.subEntries || [])[p];
|
|
48
49
|
e && f(
|
|
49
50
|
e,
|
|
50
51
|
e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
|
|
@@ -79,9 +80,9 @@ function te({
|
|
|
79
80
|
}
|
|
80
81
|
e.url && (h?.(e), l());
|
|
81
82
|
}
|
|
82
|
-
return z ?
|
|
83
|
-
/* @__PURE__ */ a(
|
|
84
|
-
/* @__PURE__ */
|
|
83
|
+
return !z || !S ? null : A(
|
|
84
|
+
/* @__PURE__ */ a($, { children: [
|
|
85
|
+
/* @__PURE__ */ o(
|
|
85
86
|
"div",
|
|
86
87
|
{
|
|
87
88
|
className: v(
|
|
@@ -97,8 +98,8 @@ function te({
|
|
|
97
98
|
"div",
|
|
98
99
|
{
|
|
99
100
|
id: c,
|
|
100
|
-
"data-testid":
|
|
101
|
-
ref:
|
|
101
|
+
"data-testid": n,
|
|
102
|
+
ref: y,
|
|
102
103
|
role: "dialog",
|
|
103
104
|
"aria-modal": "true",
|
|
104
105
|
className: v(
|
|
@@ -107,9 +108,9 @@ function te({
|
|
|
107
108
|
"transition-transform duration-300 ease-in-out",
|
|
108
109
|
b === "right" ? "right-0" : "left-0"
|
|
109
110
|
),
|
|
110
|
-
style:
|
|
111
|
+
style: N,
|
|
111
112
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ o(X, { theme: M, children: /* @__PURE__ */ a(
|
|
113
114
|
k,
|
|
114
115
|
{
|
|
115
116
|
horizontal: !0,
|
|
@@ -120,14 +121,14 @@ function te({
|
|
|
120
121
|
justify: "between",
|
|
121
122
|
backgroundColor: "background-primary-normal",
|
|
122
123
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
/* @__PURE__ */ o(R, { color: "text-primary-normal", children: s?.label ?? i.label }),
|
|
125
|
+
/* @__PURE__ */ o(
|
|
126
|
+
L,
|
|
126
127
|
{
|
|
127
128
|
id: c ? `${c}-close-button` : void 0,
|
|
128
|
-
testid:
|
|
129
|
+
testid: n ? `${n}-close-button` : void 0,
|
|
129
130
|
iconOnly: !0,
|
|
130
|
-
leftIcon: /* @__PURE__ */
|
|
131
|
+
leftIcon: /* @__PURE__ */ o(m, { className: "icon", name: "close", size: 24 }),
|
|
131
132
|
variant: "tertiary",
|
|
132
133
|
onClick: l
|
|
133
134
|
}
|
|
@@ -136,25 +137,25 @@ function te({
|
|
|
136
137
|
}
|
|
137
138
|
) }),
|
|
138
139
|
/* @__PURE__ */ a(k, { justify: "between", overflowY: "auto", grow: !0, children: [
|
|
139
|
-
/* @__PURE__ */
|
|
140
|
-
|
|
140
|
+
/* @__PURE__ */ o("div", { className: "my-4", children: s ? /* @__PURE__ */ o(
|
|
141
|
+
D,
|
|
141
142
|
{
|
|
142
|
-
testid:
|
|
143
|
+
testid: n ? `${n}-nested-menu` : void 0,
|
|
143
144
|
currentMenu: s,
|
|
144
145
|
onMenuClick: f,
|
|
145
|
-
pinnedEntry:
|
|
146
|
+
pinnedEntry: C
|
|
146
147
|
}
|
|
147
|
-
) : (i.subEntries ?? []).map((e, t) => /* @__PURE__ */
|
|
148
|
-
|
|
148
|
+
) : (i.subEntries ?? []).map((e, t) => /* @__PURE__ */ o(
|
|
149
|
+
H,
|
|
149
150
|
{
|
|
150
|
-
testid:
|
|
151
|
-
selected:
|
|
151
|
+
testid: n ? `${n}-${e.id}` : void 0,
|
|
152
|
+
selected: p === t,
|
|
152
153
|
onClick: () => f(
|
|
153
154
|
e,
|
|
154
155
|
e.subEntries?.length ? "subEntry" : e.onClick ? "onClick" : void 0
|
|
155
156
|
),
|
|
156
|
-
before: e.icon ? /* @__PURE__ */
|
|
157
|
-
after: e.subEntries?.length ? /* @__PURE__ */
|
|
157
|
+
before: e.icon ? /* @__PURE__ */ o(m, { name: e.icon }) : void 0,
|
|
158
|
+
after: e.subEntries?.length ? /* @__PURE__ */ o(m, { name: "chevron_right", className: "icon", size: 24 }) : void 0,
|
|
158
159
|
children: e.label
|
|
159
160
|
},
|
|
160
161
|
e.id
|
|
@@ -165,9 +166,9 @@ function te({
|
|
|
165
166
|
}
|
|
166
167
|
)
|
|
167
168
|
] }),
|
|
168
|
-
|
|
169
|
-
)
|
|
169
|
+
T(y.current)
|
|
170
|
+
);
|
|
170
171
|
}
|
|
171
172
|
export {
|
|
172
|
-
|
|
173
|
+
re as MobileNavMenu
|
|
173
174
|
};
|