@rafal.lemieszewski/tide-ui 0.85.1 → 0.87.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/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
- package/dist/cjs/components/fundamental/button.cjs +1 -1
- package/dist/cjs/components/fundamental/calendar.cjs +1 -1
- package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -1
- package/dist/cjs/components/fundamental/custom-icons.cjs +1 -1
- package/dist/cjs/components/fundamental/dialog.cjs +1 -1
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
- package/dist/cjs/components/fundamental/icon.cjs +1 -1
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
- package/dist/cjs/components/fundamental/pagination.cjs +1 -1
- package/dist/cjs/components/fundamental/select.cjs +1 -1
- package/dist/cjs/components/fundamental/separator.cjs +1 -1
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
- package/dist/cjs/components/fundamental/toast.cjs +1 -1
- package/dist/cjs/components/fundamental/tree.cjs +1 -1
- package/dist/cjs/components/product/app-frame.cjs +1 -1
- package/dist/cjs/components/product/attributes-list.cjs +1 -1
- package/dist/cjs/components/product/bookmarks.cjs +1 -1
- package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
- package/dist/cjs/components/product/data-table.cjs +1 -1
- package/dist/cjs/components/product/filters.cjs +1 -1
- package/dist/cjs/components/product/fixture-status.cjs +1 -1
- package/dist/cjs/components/product/linked-chart.cjs +1 -1
- package/dist/cjs/components/product/view-mode-menu.cjs +1 -1
- package/dist/es/components/fundamental/button.js +10 -9
- package/dist/es/components/fundamental/calendar.js +18 -17
- package/dist/es/components/fundamental/custom-icons.js +283 -517
- package/dist/es/components/fundamental/dialog.js +25 -24
- package/dist/es/components/fundamental/file-upload.js +17 -16
- package/dist/es/components/fundamental/icon.js +68 -147
- package/dist/es/components/fundamental/month-picker.js +21 -20
- package/dist/es/components/fundamental/pagination.js +44 -43
- package/dist/es/components/fundamental/select.js +40 -39
- package/dist/es/components/fundamental/separator.js +11 -10
- package/dist/es/components/fundamental/sidebar.js +85 -84
- package/dist/es/components/fundamental/toast.js +8 -7
- package/dist/es/components/product/app-frame.js +83 -82
- package/dist/es/components/product/attributes-list.js +61 -60
- package/dist/es/components/product/bookmarks.js +170 -169
- package/dist/es/components/product/data-table-settings-menu.js +38 -37
- package/dist/es/components/product/data-table.js +374 -373
- package/dist/es/components/product/filters.js +93 -92
- package/dist/es/components/product/fixture-status.js +89 -87
- package/dist/es/components/product/linked-chart.js +54 -53
- package/dist/es/components/product/view-mode-menu.js +176 -175
- package/dist/types/components/core-index.d.cts +1 -1
- package/dist/types/components/core-index.d.ts +1 -1
- package/dist/types/components/fundamental/custom-icons.d.ts +32 -36
- package/dist/types/components/fundamental/dropdown-menu.d.ts +2 -1
- package/dist/types/components/fundamental/icon.d.ts +1 -3
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/components/product/fixture-status.d.ts +2 -2
- package/dist/types/lib/index.d.cts +1 -1
- package/dist/types/lib/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,64 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import F from "react";
|
|
3
|
+
import { SquareSlash as A, SquareMinus as q, SquareCheck as g, SquareX as T, SquareChartGantt as R, CirclePlus as L, CircleSlash as O, ClockAlert as x, CircleMinus as I, CircleArrowUp as M, CircleArrowDown as H, CircleHelp as P } from "lucide-react";
|
|
4
|
+
import { SquareDiamond as U, SquareDashedChartGantt as p, SquareCornerCheck as W, SquareCornerPlus as $, SquareDashedCornerPlus as G, CircleCheck2 as _, CircleDiamond as B, CircleDot2 as E, CircleDashedArrowUp as X, CircleDashedArrowDown as J, HexagonMinus as K, HexagonAsterisk as Q, HexagonDashed as V } from "../fundamental/custom-icons.js";
|
|
5
|
+
import { Icon as l } from "../fundamental/icon.js";
|
|
6
|
+
import { Badge as Y } from "../fundamental/badge.js";
|
|
7
|
+
import { cn as a } from "../../lib/utils.js";
|
|
8
|
+
import { TooltipProvider as Z, Tooltip as z, TooltipTrigger as ee, TooltipContent as oe } from "../fundamental/tooltip.js";
|
|
9
|
+
const C = {
|
|
8
10
|
// Order statuses
|
|
9
|
-
"order-draft": { icon:
|
|
10
|
-
"order-distributed": { icon:
|
|
11
|
-
"order-withdrawn": { icon:
|
|
11
|
+
"order-draft": { icon: V, color: "tertiary", objectLabel: "Order", statusLabel: "Draft" },
|
|
12
|
+
"order-distributed": { icon: Q, color: "information", objectLabel: "Order", statusLabel: "Distributed" },
|
|
13
|
+
"order-withdrawn": { icon: K, color: "error", objectLabel: "Order", statusLabel: "Withdrawn" },
|
|
12
14
|
// Negotiation statuses
|
|
13
|
-
"negotiation-indicative-offer": { icon:
|
|
14
|
-
"negotiation-indicative-bid": { icon:
|
|
15
|
-
"negotiation-firm-offer": { icon:
|
|
16
|
-
"negotiation-firm-bid": { icon:
|
|
17
|
-
"negotiation-firm": { icon:
|
|
18
|
-
"negotiation-on-subs": { icon:
|
|
19
|
-
"negotiation-fixed": { icon:
|
|
20
|
-
"negotiation-firm-offer-expired": { icon:
|
|
21
|
-
"negotiation-withdrawn": { icon:
|
|
22
|
-
"negotiation-firm-amendment": { icon:
|
|
23
|
-
"negotiation-subs-expired": { icon:
|
|
24
|
-
"negotiation-subs-failed": { icon:
|
|
25
|
-
"negotiation-on-subs-amendment": { icon:
|
|
15
|
+
"negotiation-indicative-offer": { icon: J, color: "information", objectLabel: "Negotiation", statusLabel: "Indicative offer" },
|
|
16
|
+
"negotiation-indicative-bid": { icon: X, color: "information", objectLabel: "Negotiation", statusLabel: "Indicative bid" },
|
|
17
|
+
"negotiation-firm-offer": { icon: H, color: "information", objectLabel: "Negotiation", statusLabel: "Firm offer" },
|
|
18
|
+
"negotiation-firm-bid": { icon: M, color: "information", objectLabel: "Negotiation", statusLabel: "Firm bid" },
|
|
19
|
+
"negotiation-firm": { icon: E, color: "violet", objectLabel: "Negotiation", statusLabel: "Firm" },
|
|
20
|
+
"negotiation-on-subs": { icon: B, color: "warning", objectLabel: "Negotiation", statusLabel: "On subs" },
|
|
21
|
+
"negotiation-fixed": { icon: _, color: "success", objectLabel: "Negotiation", statusLabel: "Fixed" },
|
|
22
|
+
"negotiation-firm-offer-expired": { icon: x, color: "error", objectLabel: "Negotiation", statusLabel: "(Firm offer) Expired" },
|
|
23
|
+
"negotiation-withdrawn": { icon: I, color: "error", objectLabel: "Negotiation", statusLabel: "Withdrawn" },
|
|
24
|
+
"negotiation-firm-amendment": { icon: L, color: "violet", objectLabel: "Negotiation", statusLabel: "Firm (Amendment)" },
|
|
25
|
+
"negotiation-subs-expired": { icon: x, color: "error", objectLabel: "Negotiation", statusLabel: "Subs expired" },
|
|
26
|
+
"negotiation-subs-failed": { icon: O, color: "error", objectLabel: "Negotiation", statusLabel: "Subs failed" },
|
|
27
|
+
"negotiation-on-subs-amendment": { icon: L, color: "warning", objectLabel: "Negotiation", statusLabel: "On subs (amendment)" },
|
|
26
28
|
// Contract statuses
|
|
27
|
-
"contract-draft": { icon:
|
|
28
|
-
"contract-working-copy": { icon:
|
|
29
|
-
"contract-final": { icon:
|
|
30
|
-
"contract-rejected": { icon:
|
|
29
|
+
"contract-draft": { icon: p, color: "tertiary", objectLabel: "Contract", statusLabel: "Draft" },
|
|
30
|
+
"contract-working-copy": { icon: R, color: "information", objectLabel: "Contract", statusLabel: "Working copy" },
|
|
31
|
+
"contract-final": { icon: g, color: "success", objectLabel: "Contract", statusLabel: "Final" },
|
|
32
|
+
"contract-rejected": { icon: T, color: "error", objectLabel: "Contract", statusLabel: "Rejected" },
|
|
31
33
|
// Addenda statuses
|
|
32
|
-
"addenda-draft": { icon:
|
|
33
|
-
"addenda-working-copy": { icon:
|
|
34
|
-
"addenda-final": { icon:
|
|
34
|
+
"addenda-draft": { icon: G, color: "tertiary", objectLabel: "Addenda", statusLabel: "Draft" },
|
|
35
|
+
"addenda-working-copy": { icon: $, color: "information", objectLabel: "Addenda", statusLabel: "Working copy" },
|
|
36
|
+
"addenda-final": { icon: W, color: "success", objectLabel: "Addenda", statusLabel: "Final" },
|
|
35
37
|
// Recap Manager statuses
|
|
36
|
-
"recap-manager-draft": { icon:
|
|
37
|
-
"recap-manager-on-subs": { icon:
|
|
38
|
-
"recap-manager-fully-fixed": { icon:
|
|
39
|
-
"recap-manager-canceled": { icon:
|
|
40
|
-
"recap-manager-failed": { icon:
|
|
41
|
-
},
|
|
38
|
+
"recap-manager-draft": { icon: p, color: "tertiary", objectLabel: "Recap manager", statusLabel: "Draft" },
|
|
39
|
+
"recap-manager-on-subs": { icon: U, color: "warning", objectLabel: "Recap manager", statusLabel: "On subs" },
|
|
40
|
+
"recap-manager-fully-fixed": { icon: g, color: "success", objectLabel: "Recap manager", statusLabel: "Fully fixed" },
|
|
41
|
+
"recap-manager-canceled": { icon: q, color: "error", objectLabel: "Recap manager", statusLabel: "Canceled" },
|
|
42
|
+
"recap-manager-failed": { icon: A, color: "error", objectLabel: "Recap manager", statusLabel: "Failed" }
|
|
43
|
+
}, j = {
|
|
42
44
|
xs: "text-body-medium-xsm",
|
|
43
45
|
s: "text-body-medium-sm",
|
|
44
46
|
m: "text-body-medium-md",
|
|
45
47
|
l: "text-body-medium-lg"
|
|
46
|
-
},
|
|
48
|
+
}, s = {
|
|
47
49
|
xs: "s",
|
|
48
50
|
s: "s",
|
|
49
51
|
m: "m",
|
|
50
52
|
l: "l"
|
|
51
|
-
},
|
|
53
|
+
}, y = {
|
|
52
54
|
xs: "translate-y-[0.5px]",
|
|
53
55
|
s: "translate-y-[0px]",
|
|
54
56
|
m: "translate-y-[0.5px]",
|
|
55
57
|
l: "translate-y-[0.5px]"
|
|
56
|
-
},
|
|
58
|
+
}, h = {
|
|
57
59
|
xs: "gap-[var(--space-xs)]",
|
|
58
60
|
s: "gap-[var(--space-xs)]",
|
|
59
61
|
m: "gap-[var(--space-s)]",
|
|
60
62
|
l: "gap-[var(--space-s)]"
|
|
61
|
-
},
|
|
63
|
+
}, v = {
|
|
62
64
|
primary: "text-[var(--color-text-primary)]",
|
|
63
65
|
secondary: "text-[var(--color-text-secondary)]",
|
|
64
66
|
tertiary: "text-[var(--color-text-tertiary)]",
|
|
@@ -68,7 +70,7 @@ const f = {
|
|
|
68
70
|
warning: "text-[var(--color-text-warning-bold)]",
|
|
69
71
|
error: "text-[var(--color-text-error-bold)]",
|
|
70
72
|
violet: "text-[var(--violet-500)]"
|
|
71
|
-
},
|
|
73
|
+
}, te = {
|
|
72
74
|
primary: "neutral",
|
|
73
75
|
secondary: "neutral",
|
|
74
76
|
tertiary: "neutral",
|
|
@@ -78,101 +80,101 @@ const f = {
|
|
|
78
80
|
warning: "warning",
|
|
79
81
|
error: "destructive",
|
|
80
82
|
violet: "violet"
|
|
81
|
-
},
|
|
83
|
+
}, ae = {
|
|
82
84
|
xs: "xs",
|
|
83
85
|
s: "s",
|
|
84
86
|
m: "m",
|
|
85
87
|
l: "l"
|
|
86
|
-
},
|
|
88
|
+
}, re = /* @__PURE__ */ F.forwardRef(
|
|
87
89
|
({
|
|
88
|
-
value:
|
|
89
|
-
size:
|
|
90
|
-
showObject:
|
|
91
|
-
iconOnly:
|
|
90
|
+
value: d,
|
|
91
|
+
size: t = "s",
|
|
92
|
+
showObject: w = !1,
|
|
93
|
+
iconOnly: N = !1,
|
|
92
94
|
lowercase: u = !1,
|
|
93
|
-
asBadge:
|
|
95
|
+
asBadge: S = !1,
|
|
94
96
|
className: r,
|
|
95
97
|
...n
|
|
96
|
-
},
|
|
97
|
-
const e =
|
|
98
|
+
}, i) => {
|
|
99
|
+
const e = C[d];
|
|
98
100
|
if (!e)
|
|
99
101
|
return console.warn(
|
|
100
|
-
`Unknown status "${
|
|
101
|
-
Object.keys(
|
|
102
|
-
), /* @__PURE__ */
|
|
102
|
+
`Unknown status "${d}". Available statuses:`,
|
|
103
|
+
Object.keys(C)
|
|
104
|
+
), /* @__PURE__ */ b(
|
|
103
105
|
"div",
|
|
104
106
|
{
|
|
105
|
-
ref:
|
|
106
|
-
className:
|
|
107
|
+
ref: i,
|
|
108
|
+
className: a(
|
|
107
109
|
"inline-flex items-center p-0.5",
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
h[t],
|
|
111
|
+
j[t],
|
|
110
112
|
r
|
|
111
113
|
),
|
|
112
114
|
...n,
|
|
113
115
|
children: [
|
|
114
|
-
/* @__PURE__ */ o("span", { className:
|
|
115
|
-
/* @__PURE__ */ o("span", { className:
|
|
116
|
+
/* @__PURE__ */ o("span", { className: a("flex-shrink-0", y[t]), children: /* @__PURE__ */ o(l, { name: P, size: s[t], color: "secondary" }) }),
|
|
117
|
+
/* @__PURE__ */ o("span", { className: v.secondary, children: "Unknown status" })
|
|
116
118
|
]
|
|
117
119
|
}
|
|
118
120
|
);
|
|
119
|
-
const
|
|
120
|
-
if (
|
|
121
|
-
const
|
|
121
|
+
const D = u ? e.objectLabel.toLowerCase() : e.objectLabel, m = u ? e.statusLabel.toLowerCase() : e.statusLabel, c = w ? `${D} • ${m}` : m;
|
|
122
|
+
if (S) {
|
|
123
|
+
const f = e.color === "tertiary", k = f ? "secondary" : e.color;
|
|
122
124
|
return /* @__PURE__ */ o(
|
|
123
|
-
|
|
125
|
+
Y,
|
|
124
126
|
{
|
|
125
|
-
ref:
|
|
127
|
+
ref: i,
|
|
126
128
|
appearance: "subtle",
|
|
127
|
-
intent:
|
|
128
|
-
size:
|
|
129
|
-
icon: /* @__PURE__ */ o(
|
|
130
|
-
className:
|
|
129
|
+
intent: te[e.color] ?? "neutral",
|
|
130
|
+
size: ae[t],
|
|
131
|
+
icon: /* @__PURE__ */ o(l, { name: e.icon, size: s[t], color: k }),
|
|
132
|
+
className: a(f && "text-[var(--color-text-secondary)]", r),
|
|
131
133
|
...n,
|
|
132
|
-
children:
|
|
134
|
+
children: c
|
|
133
135
|
}
|
|
134
136
|
);
|
|
135
137
|
}
|
|
136
|
-
return
|
|
137
|
-
/* @__PURE__ */ o(
|
|
138
|
+
return N ? /* @__PURE__ */ o(Z, { delayDuration: 200, children: /* @__PURE__ */ b(z, { children: [
|
|
139
|
+
/* @__PURE__ */ o(ee, { asChild: !0, children: /* @__PURE__ */ o(
|
|
138
140
|
"div",
|
|
139
141
|
{
|
|
140
|
-
ref:
|
|
141
|
-
className:
|
|
142
|
+
ref: i,
|
|
143
|
+
className: a("inline-flex p-0.5", r),
|
|
142
144
|
...n,
|
|
143
145
|
children: /* @__PURE__ */ o(
|
|
144
|
-
|
|
146
|
+
l,
|
|
145
147
|
{
|
|
146
148
|
name: e.icon,
|
|
147
|
-
size:
|
|
149
|
+
size: s[t],
|
|
148
150
|
color: e.color,
|
|
149
|
-
"aria-label":
|
|
151
|
+
"aria-label": c
|
|
150
152
|
}
|
|
151
153
|
)
|
|
152
154
|
}
|
|
153
155
|
) }),
|
|
154
|
-
/* @__PURE__ */ o(
|
|
155
|
-
] }) }) : /* @__PURE__ */
|
|
156
|
+
/* @__PURE__ */ o(oe, { children: c })
|
|
157
|
+
] }) }) : /* @__PURE__ */ b(
|
|
156
158
|
"div",
|
|
157
159
|
{
|
|
158
|
-
ref:
|
|
159
|
-
className:
|
|
160
|
+
ref: i,
|
|
161
|
+
className: a(
|
|
160
162
|
"inline-flex items-center p-0.5",
|
|
161
|
-
|
|
162
|
-
|
|
163
|
+
h[t],
|
|
164
|
+
j[t],
|
|
163
165
|
r
|
|
164
166
|
),
|
|
165
167
|
...n,
|
|
166
168
|
children: [
|
|
167
|
-
/* @__PURE__ */ o("span", { className:
|
|
168
|
-
/* @__PURE__ */ o("span", { className:
|
|
169
|
+
/* @__PURE__ */ o("span", { className: a("flex-shrink-0", y[t]), children: /* @__PURE__ */ o(l, { name: e.icon, size: s[t], color: e.color }) }),
|
|
170
|
+
/* @__PURE__ */ o("span", { className: v[e.color], children: c })
|
|
169
171
|
]
|
|
170
172
|
}
|
|
171
173
|
);
|
|
172
174
|
}
|
|
173
175
|
);
|
|
174
|
-
|
|
176
|
+
re.displayName = "FixtureStatus";
|
|
175
177
|
export {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
re as FixtureStatus,
|
|
179
|
+
C as statusConfig
|
|
178
180
|
};
|
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as v, useMemo as
|
|
2
|
+
import { useState as v, useMemo as F, useCallback as m } from "react";
|
|
3
3
|
import { Chart as ee } from "../fundamental/chart.js";
|
|
4
|
-
import { Table as re, TableHeader as
|
|
4
|
+
import { Table as re, TableHeader as te, TableRow as O, TableHead as se, TableBody as le, TableCell as ne } from "../fundamental/table.js";
|
|
5
5
|
import { Card as k, CardContent as z, CardHeader as ae, CardTitle as ie } from "../fundamental/card.js";
|
|
6
|
-
import { Button as
|
|
6
|
+
import { Button as P } from "../fundamental/button.js";
|
|
7
7
|
import { Icon as w } from "../fundamental/icon.js";
|
|
8
|
+
import { Filter as ce, X as de, Info as oe } from "lucide-react";
|
|
8
9
|
import { Badge as H } from "../fundamental/badge.js";
|
|
9
10
|
import { cn as T } from "../../lib/utils.js";
|
|
10
|
-
function
|
|
11
|
+
function ge({
|
|
11
12
|
title: f,
|
|
12
13
|
description: p,
|
|
13
14
|
data: n,
|
|
14
15
|
config: C,
|
|
15
16
|
columns: b,
|
|
16
|
-
type:
|
|
17
|
+
type: U,
|
|
17
18
|
enableFiltering: g = !0,
|
|
18
19
|
enableRowSelection: u = !0,
|
|
19
20
|
onRowSelectionChange: x,
|
|
20
21
|
onDataFilter: y,
|
|
21
|
-
showTable:
|
|
22
|
+
showTable: E = !0,
|
|
22
23
|
tableClassName: R,
|
|
23
24
|
chartClassName: V,
|
|
24
25
|
enableRowFiltering: S = !1,
|
|
25
|
-
className:
|
|
26
|
-
...
|
|
26
|
+
className: X,
|
|
27
|
+
...q
|
|
27
28
|
}) {
|
|
28
|
-
const [a, j] = v(/* @__PURE__ */ new Set()), [A, L] = v(null), [_,
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
|
|
29
|
+
const [a, j] = v(/* @__PURE__ */ new Set()), [A, L] = v(null), [_, I] = v(null), [d, B] = v(/* @__PURE__ */ new Set()), [o, D] = v(!1), i = F(() => d.size > 0 ? n.filter((e, t) => d.has(t)) : o && a.size > 0 ? n.filter((e, t) => a.has(t)) : n, [n, d, a, o]), G = m((e, t) => {
|
|
30
|
+
if (t !== void 0 && e) {
|
|
31
|
+
const s = n.findIndex((c) => c === i[t]);
|
|
32
|
+
I(s !== -1 ? s : null);
|
|
32
33
|
} else
|
|
33
|
-
|
|
34
|
-
}, [n, i]),
|
|
34
|
+
I(null);
|
|
35
|
+
}, [n, i]), J = m((e, t) => {
|
|
35
36
|
if (!g) return;
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
37
|
+
const s = n.findIndex((h) => h === i[t]);
|
|
38
|
+
if (s === -1) return;
|
|
38
39
|
const c = new Set(d);
|
|
39
|
-
c.has(
|
|
40
|
+
c.has(s) ? c.delete(s) : c.add(s), B(c);
|
|
40
41
|
const $ = n.filter((h, Z) => c.has(Z));
|
|
41
42
|
y?.($);
|
|
42
|
-
}, [g, d, n, y, i]),
|
|
43
|
+
}, [g, d, n, y, i]), K = m((e) => {
|
|
43
44
|
if (!u) return;
|
|
44
|
-
const
|
|
45
|
-
|
|
45
|
+
const t = new Set(a);
|
|
46
|
+
t.has(e) ? t.delete(e) : t.add(e), j(t), x?.(Array.from(t));
|
|
46
47
|
}, [u, a, x]), M = m((e) => {
|
|
47
48
|
L(e);
|
|
48
|
-
}, []),
|
|
49
|
-
j(/* @__PURE__ */ new Set()), B(/* @__PURE__ */ new Set()), L(null),
|
|
50
|
-
}, [x, y]),
|
|
51
|
-
if (
|
|
52
|
-
return
|
|
53
|
-
switch (
|
|
49
|
+
}, []), Q = m(() => {
|
|
50
|
+
j(/* @__PURE__ */ new Set()), B(/* @__PURE__ */ new Set()), L(null), I(null), D(!1), x?.([]), y?.([]);
|
|
51
|
+
}, [x, y]), W = m((e, t, s) => {
|
|
52
|
+
if (t.format)
|
|
53
|
+
return t.format(e, s);
|
|
54
|
+
switch (t.type) {
|
|
54
55
|
case "currency":
|
|
55
56
|
return typeof e == "number" ? `$${e.toLocaleString()}` : e;
|
|
56
57
|
case "percentage":
|
|
@@ -60,13 +61,13 @@ function be({
|
|
|
60
61
|
default:
|
|
61
62
|
return e;
|
|
62
63
|
}
|
|
63
|
-
}, []),
|
|
64
|
-
if (
|
|
65
|
-
const e = i.findIndex((
|
|
64
|
+
}, []), N = A ?? _, Y = F(() => {
|
|
65
|
+
if (N !== null) {
|
|
66
|
+
const e = i.findIndex((t) => n[N] === t);
|
|
66
67
|
return e !== -1 ? e : void 0;
|
|
67
68
|
}
|
|
68
|
-
}, [
|
|
69
|
-
return /* @__PURE__ */ l("div", { className: T("space-y-[var(--space-l)]",
|
|
69
|
+
}, [N, i, n]);
|
|
70
|
+
return /* @__PURE__ */ l("div", { className: T("space-y-[var(--space-l)]", X), children: [
|
|
70
71
|
(f || p) && /* @__PURE__ */ l("div", { className: "space-y-[var(--space-s)]", children: [
|
|
71
72
|
f && /* @__PURE__ */ r("h3", { className: "text-heading-md", children: f }),
|
|
72
73
|
p && /* @__PURE__ */ r("p", { className: "text-body-md text-[var(--color-text-secondary)]", children: p })
|
|
@@ -85,19 +86,19 @@ function be({
|
|
|
85
86
|
] }),
|
|
86
87
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-[var(--space-s)]", children: [
|
|
87
88
|
S && a.size > 0 && /* @__PURE__ */ l(
|
|
88
|
-
|
|
89
|
+
P,
|
|
89
90
|
{
|
|
90
91
|
size: "s",
|
|
91
92
|
variant: o ? "default" : "ghost",
|
|
92
93
|
onClick: () => D(!o),
|
|
93
94
|
children: [
|
|
94
|
-
/* @__PURE__ */ r(w, { name:
|
|
95
|
+
/* @__PURE__ */ r(w, { name: ce, size: "s", className: "mr-[var(--space-xs)]" }),
|
|
95
96
|
"Filter selected"
|
|
96
97
|
]
|
|
97
98
|
}
|
|
98
99
|
),
|
|
99
|
-
(a.size > 0 || d.size > 0 || o) && /* @__PURE__ */ l(
|
|
100
|
-
/* @__PURE__ */ r(w, { name:
|
|
100
|
+
(a.size > 0 || d.size > 0 || o) && /* @__PURE__ */ l(P, { variant: "ghost", size: "s", onClick: Q, children: [
|
|
101
|
+
/* @__PURE__ */ r(w, { name: de, size: "s", className: "mr-[var(--space-s)]" }),
|
|
101
102
|
"Clear all"
|
|
102
103
|
] })
|
|
103
104
|
] })
|
|
@@ -105,17 +106,17 @@ function be({
|
|
|
105
106
|
/* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(z, { className: "p-[var(--space-l)]", children: /* @__PURE__ */ r(
|
|
106
107
|
ee,
|
|
107
108
|
{
|
|
108
|
-
...
|
|
109
|
-
type:
|
|
109
|
+
...q,
|
|
110
|
+
type: U,
|
|
110
111
|
data: i,
|
|
111
112
|
config: C,
|
|
112
|
-
onDataPointClick:
|
|
113
|
-
onDataPointHover:
|
|
113
|
+
onDataPointClick: J,
|
|
114
|
+
onDataPointHover: G,
|
|
114
115
|
highlightedIndex: Y,
|
|
115
116
|
className: V
|
|
116
117
|
}
|
|
117
118
|
) }) }),
|
|
118
|
-
|
|
119
|
+
E && /* @__PURE__ */ l(k, { children: [
|
|
119
120
|
/* @__PURE__ */ r(ae, { children: /* @__PURE__ */ l(ie, { className: "text-heading-sm flex items-center justify-between", children: [
|
|
120
121
|
"Data Table",
|
|
121
122
|
/* @__PURE__ */ l(H, { intent: "neutral", appearance: "subtle", size: "s", children: [
|
|
@@ -124,30 +125,30 @@ function be({
|
|
|
124
125
|
] })
|
|
125
126
|
] }) }),
|
|
126
127
|
/* @__PURE__ */ r(z, { children: /* @__PURE__ */ r("div", { className: T("rounded-m border border-[var(--color-border-primary-subtle)]", R), children: /* @__PURE__ */ l(re, { children: [
|
|
127
|
-
/* @__PURE__ */ r(
|
|
128
|
-
/* @__PURE__ */ r(le, { children: i.map((e,
|
|
129
|
-
const
|
|
128
|
+
/* @__PURE__ */ r(te, { children: /* @__PURE__ */ r(O, { children: b.map((e) => /* @__PURE__ */ r(se, { children: e.label }, e.key)) }) }),
|
|
129
|
+
/* @__PURE__ */ r(le, { children: i.map((e, t) => {
|
|
130
|
+
const s = n.indexOf(e), c = a.has(s);
|
|
130
131
|
return /* @__PURE__ */ r(
|
|
131
|
-
|
|
132
|
+
O,
|
|
132
133
|
{
|
|
133
|
-
onClick: () =>
|
|
134
|
-
onMouseEnter: () => M(
|
|
134
|
+
onClick: () => K(s),
|
|
135
|
+
onMouseEnter: () => M(s),
|
|
135
136
|
onMouseLeave: () => M(null),
|
|
136
137
|
variant: c ? "selected" : "default",
|
|
137
138
|
className: T(
|
|
138
139
|
"cursor-pointer transition-colors",
|
|
139
|
-
(A ===
|
|
140
|
+
(A === s || _ === s) && "bg-[var(--color-background-neutral-subtlest-hovered)]",
|
|
140
141
|
u && "hover:bg-[var(--color-background-neutral-subtlest-hovered)]"
|
|
141
142
|
),
|
|
142
|
-
children: b.map((h) => /* @__PURE__ */ r(ne, { children:
|
|
143
|
+
children: b.map((h) => /* @__PURE__ */ r(ne, { children: W(e[h.key], h, e) }, h.key))
|
|
143
144
|
},
|
|
144
|
-
|
|
145
|
+
s
|
|
145
146
|
);
|
|
146
147
|
}) })
|
|
147
148
|
] }) }) })
|
|
148
149
|
] }),
|
|
149
150
|
g && /* @__PURE__ */ r(k, { className: "border-[var(--color-border-info-bold)]", children: /* @__PURE__ */ r(z, { className: "p-[var(--space-m)]", children: /* @__PURE__ */ l("div", { className: "flex items-start gap-[var(--space-s)]", children: [
|
|
150
|
-
/* @__PURE__ */ r(w, { name:
|
|
151
|
+
/* @__PURE__ */ r(w, { name: oe, size: "s", color: "information", className: "mt-1" }),
|
|
151
152
|
/* @__PURE__ */ l("div", { className: "space-y-[var(--space-xs)] text-body-sm text-[var(--color-text-secondary)]", children: [
|
|
152
153
|
/* @__PURE__ */ r("p", { children: /* @__PURE__ */ r("strong", { children: "Interactive Features:" }) }),
|
|
153
154
|
/* @__PURE__ */ l("ul", { className: "list-disc list-inside space-y-[var(--space-xs)]", children: [
|
|
@@ -161,7 +162,7 @@ function be({
|
|
|
161
162
|
] }) }) })
|
|
162
163
|
] });
|
|
163
164
|
}
|
|
164
|
-
const
|
|
165
|
+
const Ie = (f, p = []) => {
|
|
165
166
|
const n = Object.entries(f).map(([C, b]) => ({
|
|
166
167
|
key: C,
|
|
167
168
|
label: b.label,
|
|
@@ -174,6 +175,6 @@ const xe = (f, p = []) => {
|
|
|
174
175
|
];
|
|
175
176
|
};
|
|
176
177
|
export {
|
|
177
|
-
|
|
178
|
-
|
|
178
|
+
ge as LinkedChart,
|
|
179
|
+
Ie as createLinkedChartColumns
|
|
179
180
|
};
|