chordia-ui 3.2.4 → 3.2.6
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/FileUploadingState.cjs.js +7 -0
- package/dist/FileUploadingState.cjs.js.map +1 -0
- package/dist/FileUploadingState.es.js +779 -0
- package/dist/FileUploadingState.es.js.map +1 -0
- package/dist/IntegrationCard.cjs.js +1 -1
- package/dist/IntegrationCard.cjs.js.map +1 -1
- package/dist/IntegrationCard.es.js +137 -160
- package/dist/IntegrationCard.es.js.map +1 -1
- package/dist/UploadInteraction.cjs.js +1 -1
- package/dist/UploadInteraction.cjs.js.map +1 -1
- package/dist/UploadInteraction.es.js +36 -36
- package/dist/UploadInteraction.es.js.map +1 -1
- package/dist/components/common.cjs.js +1 -1
- package/dist/components/common.es.js +21 -15
- package/dist/components/navigation.cjs.js +1 -1
- package/dist/components/navigation.cjs.js.map +1 -1
- package/dist/components/navigation.es.js +212 -203
- package/dist/components/navigation.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs2.js +1 -1
- package/dist/index.cjs2.js.map +1 -1
- package/dist/index.es.js +67 -61
- package/dist/index.es2.js +2 -2
- package/dist/index.es2.js.map +1 -1
- package/package.json +1 -1
- package/src/components/common/FileUploadingState.jsx +256 -0
- package/src/components/common/SideDrawer.jsx +388 -0
- package/src/components/common/index.js +2 -0
- package/src/components/index.js +1 -1
- package/src/components/layout/IntegrationCard.jsx +157 -141
- package/src/components/login/LoginPage.jsx +2 -2
- package/src/components/navigation/Sidebar.jsx +59 -39
- package/src/components/onboarding/UploadInteraction.jsx +3 -3
- package/dist/AutoSearch.cjs.js +0 -2
- package/dist/AutoSearch.cjs.js.map +0 -1
- package/dist/AutoSearch.es.js +0 -190
- package/dist/AutoSearch.es.js.map +0 -1
|
@@ -1,86 +1,89 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { PanelLeft as
|
|
1
|
+
import { jsxs as d, jsx as t, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import j, { useState as w } from "react";
|
|
3
|
+
import { PanelLeft as P, PanelLeftClose as D, ChevronDown as M, SquareDot as C, Home as H, FolderClosed as T, Users as A, LayoutDashboard as O, Clock3 as I, Activity as E, Lightbulb as $, Bell as G, Plug as _, Settings as U, BarChart3 as Y, FileText as z, Headphones as q, Shield as N, Sliders as V, Workflow as X, LogOut as J } from "lucide-react";
|
|
4
4
|
const K = {
|
|
5
|
-
home:
|
|
5
|
+
home: H,
|
|
6
6
|
projects: T,
|
|
7
7
|
folder: T,
|
|
8
|
-
organization:
|
|
9
|
-
users:
|
|
10
|
-
dashboard:
|
|
8
|
+
organization: A,
|
|
9
|
+
users: A,
|
|
10
|
+
dashboard: O,
|
|
11
11
|
history: I,
|
|
12
12
|
sessions: I,
|
|
13
|
-
monitoring:
|
|
14
|
-
activity:
|
|
13
|
+
monitoring: E,
|
|
14
|
+
activity: E,
|
|
15
15
|
insights: $,
|
|
16
16
|
notifications: G,
|
|
17
17
|
integrations: _,
|
|
18
18
|
settings: U,
|
|
19
19
|
usage: Y,
|
|
20
|
-
docs:
|
|
21
|
-
documentation:
|
|
20
|
+
docs: z,
|
|
21
|
+
documentation: z,
|
|
22
22
|
agents: q,
|
|
23
23
|
security: N,
|
|
24
24
|
configuration: V,
|
|
25
25
|
workflow: X
|
|
26
26
|
};
|
|
27
|
-
function
|
|
27
|
+
function L(e) {
|
|
28
28
|
return e ? typeof e == "string" ? K[e.toLowerCase()] || C : e : C;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function oe({
|
|
31
31
|
menuItems: e = [],
|
|
32
|
-
activeId:
|
|
33
|
-
onNavigate:
|
|
34
|
-
collapsed:
|
|
35
|
-
onToggleCollapse:
|
|
32
|
+
activeId: r,
|
|
33
|
+
onNavigate: o,
|
|
34
|
+
collapsed: i,
|
|
35
|
+
onToggleCollapse: g,
|
|
36
36
|
header: p,
|
|
37
|
-
footer:
|
|
38
|
-
width:
|
|
39
|
-
collapsedWidth:
|
|
37
|
+
footer: s,
|
|
38
|
+
width: c = 244,
|
|
39
|
+
collapsedWidth: h = 56
|
|
40
40
|
}) {
|
|
41
|
-
const [
|
|
41
|
+
const [n, y] = w(!1), l = i !== void 0 ? i : n, x = g || (() => y(!n)), [v, f] = w(() => {
|
|
42
42
|
const a = {};
|
|
43
|
-
return e.forEach((
|
|
43
|
+
return e.forEach((u) => {
|
|
44
44
|
var b;
|
|
45
|
-
if ((b =
|
|
46
|
-
const
|
|
47
|
-
a[
|
|
45
|
+
if ((b = u.children) != null && b.length) {
|
|
46
|
+
const F = u.children.some((S) => S.id === r || S.active);
|
|
47
|
+
a[u.id] = F;
|
|
48
48
|
}
|
|
49
49
|
}), a;
|
|
50
|
-
}),
|
|
51
|
-
|
|
52
|
-
},
|
|
50
|
+
}), W = (a) => {
|
|
51
|
+
f((u) => ({ ...u, [a]: !u[a] }));
|
|
52
|
+
}, m = l ? h : c;
|
|
53
53
|
return /* @__PURE__ */ d(
|
|
54
54
|
"nav",
|
|
55
55
|
{
|
|
56
56
|
style: {
|
|
57
|
-
width:
|
|
58
|
-
minWidth:
|
|
57
|
+
width: m,
|
|
58
|
+
minWidth: m,
|
|
59
59
|
height: "100%",
|
|
60
60
|
display: "flex",
|
|
61
61
|
flexDirection: "column",
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
alignItems: "flex-start",
|
|
63
|
+
padding: l ? "0" : "0 0 24px 24px",
|
|
64
|
+
gap: 24,
|
|
65
|
+
background: "var(--Background-Inverse, #0B0B0B)",
|
|
64
66
|
fontFamily: "var(--font-sans)",
|
|
65
67
|
transition: "width 0.2s ease, min-width 0.2s ease",
|
|
66
68
|
overflow: "hidden",
|
|
67
69
|
flexShrink: 0
|
|
68
70
|
},
|
|
69
71
|
children: [
|
|
70
|
-
p && !l && /* @__PURE__ */
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
+
p && !l && /* @__PURE__ */ t("div", { style: { padding: "16px 16px 8px", flexShrink: 0, width: "100%" }, children: p }),
|
|
73
|
+
/* @__PURE__ */ t(
|
|
72
74
|
"div",
|
|
73
75
|
{
|
|
74
76
|
style: {
|
|
75
77
|
display: "flex",
|
|
76
78
|
justifyContent: l ? "center" : "flex-end",
|
|
77
|
-
padding: l ? "12px 0" : "8px
|
|
78
|
-
flexShrink: 0
|
|
79
|
+
padding: l ? "12px 0" : "8px 0 0",
|
|
80
|
+
flexShrink: 0,
|
|
81
|
+
width: "100%"
|
|
79
82
|
},
|
|
80
|
-
children: /* @__PURE__ */
|
|
83
|
+
children: /* @__PURE__ */ t(
|
|
81
84
|
"button",
|
|
82
85
|
{
|
|
83
|
-
onClick:
|
|
86
|
+
onClick: x,
|
|
84
87
|
title: l ? "Expand sidebar" : "Collapse sidebar",
|
|
85
88
|
style: {
|
|
86
89
|
display: "flex",
|
|
@@ -91,34 +94,35 @@ function ae({
|
|
|
91
94
|
borderRadius: "var(--radius-sm)",
|
|
92
95
|
border: "none",
|
|
93
96
|
background: "transparent",
|
|
94
|
-
color: "
|
|
97
|
+
color: "rgba(255, 255, 255, 0.5)",
|
|
95
98
|
cursor: "pointer",
|
|
96
99
|
transition: "background 0.15s ease, color 0.15s ease"
|
|
97
100
|
},
|
|
98
101
|
onMouseEnter: (a) => {
|
|
99
|
-
a.currentTarget.style.background = "
|
|
102
|
+
a.currentTarget.style.background = "rgba(255, 255, 255, 0.08)", a.currentTarget.style.color = "rgba(255, 255, 255, 0.8)";
|
|
100
103
|
},
|
|
101
104
|
onMouseLeave: (a) => {
|
|
102
|
-
a.currentTarget.style.background = "transparent", a.currentTarget.style.color = "
|
|
105
|
+
a.currentTarget.style.background = "transparent", a.currentTarget.style.color = "rgba(255, 255, 255, 0.5)";
|
|
103
106
|
},
|
|
104
|
-
children: l ? /* @__PURE__ */
|
|
107
|
+
children: l ? /* @__PURE__ */ t(P, { size: 16 }) : /* @__PURE__ */ t(D, { size: 16 })
|
|
105
108
|
}
|
|
106
109
|
)
|
|
107
110
|
}
|
|
108
111
|
),
|
|
109
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ t(
|
|
110
113
|
"div",
|
|
111
114
|
{
|
|
112
115
|
style: {
|
|
113
116
|
flex: 1,
|
|
114
117
|
overflowY: "auto",
|
|
115
118
|
overflowX: "hidden",
|
|
116
|
-
padding: l ? "0 8px" : "0
|
|
119
|
+
padding: l ? "0 8px" : "0",
|
|
120
|
+
width: "100%"
|
|
117
121
|
},
|
|
118
|
-
children: e.map((a,
|
|
122
|
+
children: e.map((a, u) => {
|
|
119
123
|
var b;
|
|
120
|
-
return /* @__PURE__ */ d(
|
|
121
|
-
a.section && !l && /* @__PURE__ */
|
|
124
|
+
return /* @__PURE__ */ d(j.Fragment, { children: [
|
|
125
|
+
a.section && !l && /* @__PURE__ */ t(
|
|
122
126
|
"div",
|
|
123
127
|
{
|
|
124
128
|
style: {
|
|
@@ -126,95 +130,99 @@ function ae({
|
|
|
126
130
|
fontWeight: 650,
|
|
127
131
|
letterSpacing: "0.08em",
|
|
128
132
|
textTransform: "uppercase",
|
|
129
|
-
color: "
|
|
133
|
+
color: "rgba(255, 255, 255, 0.35)",
|
|
130
134
|
padding: "16px 8px 6px",
|
|
131
135
|
lineHeight: 1
|
|
132
136
|
},
|
|
133
137
|
children: a.section
|
|
134
138
|
}
|
|
135
139
|
),
|
|
136
|
-
(b = a.children) != null && b.length ? /* @__PURE__ */
|
|
140
|
+
(b = a.children) != null && b.length ? /* @__PURE__ */ t(
|
|
137
141
|
Q,
|
|
138
142
|
{
|
|
139
143
|
item: a,
|
|
140
|
-
activeId:
|
|
141
|
-
expanded: !!
|
|
142
|
-
onToggle: () =>
|
|
143
|
-
onNavigate:
|
|
144
|
+
activeId: r,
|
|
145
|
+
expanded: !!v[a.id],
|
|
146
|
+
onToggle: () => W(a.id),
|
|
147
|
+
onNavigate: o,
|
|
144
148
|
collapsed: l
|
|
145
149
|
}
|
|
146
|
-
) : /* @__PURE__ */
|
|
147
|
-
|
|
150
|
+
) : /* @__PURE__ */ t(
|
|
151
|
+
R,
|
|
148
152
|
{
|
|
149
153
|
item: a,
|
|
150
|
-
active: a.id ===
|
|
151
|
-
onNavigate:
|
|
154
|
+
active: a.id === r || a.active,
|
|
155
|
+
onNavigate: o,
|
|
152
156
|
collapsed: l
|
|
153
157
|
}
|
|
154
158
|
)
|
|
155
|
-
] }, a.id ||
|
|
159
|
+
] }, a.id || u);
|
|
156
160
|
})
|
|
157
161
|
}
|
|
158
162
|
),
|
|
159
|
-
|
|
163
|
+
s && !l && /* @__PURE__ */ t(
|
|
160
164
|
"div",
|
|
161
165
|
{
|
|
162
166
|
style: {
|
|
163
167
|
padding: "12px 16px",
|
|
164
|
-
borderTop: "1px solid
|
|
165
|
-
flexShrink: 0
|
|
168
|
+
borderTop: "1px solid rgba(255, 255, 255, 0.08)",
|
|
169
|
+
flexShrink: 0,
|
|
170
|
+
width: "100%"
|
|
166
171
|
},
|
|
167
|
-
children:
|
|
172
|
+
children: s
|
|
168
173
|
}
|
|
169
174
|
)
|
|
170
175
|
]
|
|
171
176
|
}
|
|
172
177
|
);
|
|
173
178
|
}
|
|
174
|
-
function
|
|
175
|
-
const
|
|
179
|
+
function R({ item: e, active: r, onNavigate: o, collapsed: i }) {
|
|
180
|
+
const g = L(e.icon), p = typeof e.icon != "string" && typeof e.icon < "u";
|
|
176
181
|
return /* @__PURE__ */ d(
|
|
177
182
|
"button",
|
|
178
183
|
{
|
|
179
|
-
onClick: () =>
|
|
180
|
-
title:
|
|
184
|
+
onClick: () => o == null ? void 0 : o(e.href || e.id),
|
|
185
|
+
title: i ? e.label : void 0,
|
|
181
186
|
style: {
|
|
182
187
|
display: "flex",
|
|
183
188
|
alignItems: "center",
|
|
184
|
-
gap:
|
|
185
|
-
justifyContent:
|
|
189
|
+
gap: i ? 0 : 12,
|
|
190
|
+
justifyContent: i ? "center" : "flex-start",
|
|
186
191
|
width: "100%",
|
|
187
|
-
padding:
|
|
188
|
-
borderRadius: "
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
192
|
+
padding: i ? "10px 0" : "12px 24px 12px 12px",
|
|
193
|
+
borderRadius: r ? "4px 0 0 4px" : "4px",
|
|
194
|
+
borderRight: r ? "2px solid #00A66E" : "2px solid transparent",
|
|
195
|
+
borderTop: "none",
|
|
196
|
+
borderBottom: "none",
|
|
197
|
+
borderLeft: "none",
|
|
198
|
+
background: r ? "var(--Background-MonoPressed, #323232)" : "transparent",
|
|
199
|
+
color: r ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
|
|
200
|
+
fontWeight: r ? 550 : 400,
|
|
193
201
|
fontSize: "var(--text-sm)",
|
|
194
202
|
fontFamily: "var(--font-sans)",
|
|
195
203
|
cursor: "pointer",
|
|
196
204
|
textAlign: "left",
|
|
197
|
-
transition: "background 0.15s ease, color 0.1s ease",
|
|
205
|
+
transition: "background 0.15s ease, color 0.1s ease, border-color 0.15s ease",
|
|
198
206
|
marginBottom: 2
|
|
199
207
|
},
|
|
200
|
-
onMouseEnter: (
|
|
201
|
-
|
|
208
|
+
onMouseEnter: (s) => {
|
|
209
|
+
r || (s.currentTarget.style.background = "var(--Background-MonoPressed, #323232)", s.currentTarget.style.color = "#00A66E");
|
|
202
210
|
},
|
|
203
|
-
onMouseLeave: (
|
|
204
|
-
|
|
211
|
+
onMouseLeave: (s) => {
|
|
212
|
+
r || (s.currentTarget.style.background = "transparent", s.currentTarget.style.color = "var(--Content-TertiaryInverse, #B2AEA8)");
|
|
205
213
|
},
|
|
206
214
|
children: [
|
|
207
|
-
p ? /* @__PURE__ */
|
|
208
|
-
|
|
215
|
+
p ? /* @__PURE__ */ t("span", { style: { flexShrink: 0, display: "flex" }, children: e.icon }) : /* @__PURE__ */ t(
|
|
216
|
+
g,
|
|
209
217
|
{
|
|
210
|
-
size:
|
|
218
|
+
size: 18,
|
|
211
219
|
style: {
|
|
212
220
|
flexShrink: 0,
|
|
213
|
-
color:
|
|
221
|
+
color: "inherit"
|
|
214
222
|
}
|
|
215
223
|
}
|
|
216
224
|
),
|
|
217
|
-
!
|
|
225
|
+
!i && /* @__PURE__ */ t(
|
|
218
226
|
"span",
|
|
219
227
|
{
|
|
220
228
|
style: {
|
|
@@ -229,13 +237,13 @@ function j({ item: e, active: t, onNavigate: n, collapsed: o }) {
|
|
|
229
237
|
}
|
|
230
238
|
);
|
|
231
239
|
}
|
|
232
|
-
function Q({ item: e, activeId:
|
|
233
|
-
var
|
|
234
|
-
const
|
|
235
|
-
return p ? /* @__PURE__ */
|
|
240
|
+
function Q({ item: e, activeId: r, expanded: o, onToggle: i, onNavigate: g, collapsed: p }) {
|
|
241
|
+
var h;
|
|
242
|
+
const s = L(e.icon), c = (h = e.children) == null ? void 0 : h.some((n) => n.id === r || n.active);
|
|
243
|
+
return p ? /* @__PURE__ */ t(
|
|
236
244
|
"button",
|
|
237
245
|
{
|
|
238
|
-
onClick:
|
|
246
|
+
onClick: i,
|
|
239
247
|
title: e.label,
|
|
240
248
|
style: {
|
|
241
249
|
display: "flex",
|
|
@@ -243,25 +251,25 @@ function Q({ item: e, activeId: t, expanded: n, onToggle: o, onNavigate: u, coll
|
|
|
243
251
|
justifyContent: "center",
|
|
244
252
|
width: "100%",
|
|
245
253
|
padding: "10px 0",
|
|
246
|
-
borderRadius: "
|
|
254
|
+
borderRadius: "4px",
|
|
247
255
|
border: "none",
|
|
248
|
-
background:
|
|
249
|
-
color:
|
|
256
|
+
background: c ? "var(--Background-MonoPressed, #323232)" : "transparent",
|
|
257
|
+
color: c ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
|
|
250
258
|
cursor: "pointer",
|
|
251
259
|
marginBottom: 2,
|
|
252
260
|
transition: "background 0.15s ease"
|
|
253
261
|
},
|
|
254
|
-
onMouseEnter: (
|
|
255
|
-
|
|
262
|
+
onMouseEnter: (n) => {
|
|
263
|
+
c || (n.currentTarget.style.background = "var(--Background-MonoPressed, #323232)", n.currentTarget.style.color = "#00A66E");
|
|
256
264
|
},
|
|
257
|
-
onMouseLeave: (
|
|
258
|
-
|
|
265
|
+
onMouseLeave: (n) => {
|
|
266
|
+
c || (n.currentTarget.style.background = "transparent", n.currentTarget.style.color = "var(--Content-TertiaryInverse, #B2AEA8)");
|
|
259
267
|
},
|
|
260
|
-
children: /* @__PURE__ */
|
|
261
|
-
|
|
268
|
+
children: /* @__PURE__ */ t(
|
|
269
|
+
s,
|
|
262
270
|
{
|
|
263
|
-
size:
|
|
264
|
-
style: { color:
|
|
271
|
+
size: 18,
|
|
272
|
+
style: { color: "inherit" }
|
|
265
273
|
}
|
|
266
274
|
)
|
|
267
275
|
}
|
|
@@ -269,42 +277,42 @@ function Q({ item: e, activeId: t, expanded: n, onToggle: o, onNavigate: u, coll
|
|
|
269
277
|
/* @__PURE__ */ d(
|
|
270
278
|
"button",
|
|
271
279
|
{
|
|
272
|
-
onClick:
|
|
280
|
+
onClick: i,
|
|
273
281
|
style: {
|
|
274
282
|
display: "flex",
|
|
275
283
|
alignItems: "center",
|
|
276
|
-
gap:
|
|
284
|
+
gap: 12,
|
|
277
285
|
width: "100%",
|
|
278
|
-
padding: "
|
|
279
|
-
borderRadius: "
|
|
286
|
+
padding: "12px 24px 12px 12px",
|
|
287
|
+
borderRadius: "4px",
|
|
280
288
|
border: "none",
|
|
281
289
|
background: "transparent",
|
|
282
|
-
color:
|
|
283
|
-
fontWeight:
|
|
290
|
+
color: c ? "#00A66E" : "var(--Content-TertiaryInverse, #B2AEA8)",
|
|
291
|
+
fontWeight: c ? 550 : 400,
|
|
284
292
|
fontSize: "var(--text-sm)",
|
|
285
293
|
fontFamily: "var(--font-sans)",
|
|
286
294
|
cursor: "pointer",
|
|
287
295
|
textAlign: "left",
|
|
288
|
-
transition: "background 0.15s ease"
|
|
296
|
+
transition: "background 0.15s ease, color 0.15s ease"
|
|
289
297
|
},
|
|
290
|
-
onMouseEnter: (
|
|
291
|
-
|
|
298
|
+
onMouseEnter: (n) => {
|
|
299
|
+
n.currentTarget.style.background = "var(--Background-MonoPressed, #323232)", n.currentTarget.style.color = "#00A66E";
|
|
292
300
|
},
|
|
293
|
-
onMouseLeave: (
|
|
294
|
-
|
|
301
|
+
onMouseLeave: (n) => {
|
|
302
|
+
n.currentTarget.style.background = "transparent", c ? n.currentTarget.style.color = "#00A66E" : n.currentTarget.style.color = "var(--Content-TertiaryInverse, #B2AEA8)";
|
|
295
303
|
},
|
|
296
304
|
children: [
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
|
|
305
|
+
/* @__PURE__ */ t(
|
|
306
|
+
s,
|
|
299
307
|
{
|
|
300
|
-
size:
|
|
308
|
+
size: 18,
|
|
301
309
|
style: {
|
|
302
310
|
flexShrink: 0,
|
|
303
|
-
color:
|
|
311
|
+
color: "inherit"
|
|
304
312
|
}
|
|
305
313
|
}
|
|
306
314
|
),
|
|
307
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ t(
|
|
308
316
|
"span",
|
|
309
317
|
{
|
|
310
318
|
style: {
|
|
@@ -316,14 +324,15 @@ function Q({ item: e, activeId: t, expanded: n, onToggle: o, onNavigate: u, coll
|
|
|
316
324
|
children: e.label
|
|
317
325
|
}
|
|
318
326
|
),
|
|
319
|
-
/* @__PURE__ */
|
|
320
|
-
|
|
327
|
+
/* @__PURE__ */ t(
|
|
328
|
+
M,
|
|
321
329
|
{
|
|
322
330
|
size: 14,
|
|
323
331
|
style: {
|
|
324
332
|
flexShrink: 0,
|
|
325
|
-
color: "
|
|
326
|
-
|
|
333
|
+
color: "inherit",
|
|
334
|
+
opacity: 0.7,
|
|
335
|
+
transform: o ? "rotate(0deg)" : "rotate(-90deg)",
|
|
327
336
|
transition: "transform 0.2s ease"
|
|
328
337
|
}
|
|
329
338
|
}
|
|
@@ -331,19 +340,19 @@ function Q({ item: e, activeId: t, expanded: n, onToggle: o, onNavigate: u, coll
|
|
|
331
340
|
]
|
|
332
341
|
}
|
|
333
342
|
),
|
|
334
|
-
|
|
335
|
-
|
|
343
|
+
o && /* @__PURE__ */ t("div", { style: { paddingLeft: 18, marginTop: 2 }, children: e.children.map((n, y) => /* @__PURE__ */ t(
|
|
344
|
+
R,
|
|
336
345
|
{
|
|
337
|
-
item:
|
|
338
|
-
active:
|
|
339
|
-
onNavigate:
|
|
346
|
+
item: n,
|
|
347
|
+
active: n.id === r || n.active,
|
|
348
|
+
onNavigate: g,
|
|
340
349
|
collapsed: !1
|
|
341
350
|
},
|
|
342
|
-
|
|
351
|
+
n.id || y
|
|
343
352
|
)) })
|
|
344
353
|
] });
|
|
345
354
|
}
|
|
346
|
-
const
|
|
355
|
+
const k = [
|
|
347
356
|
"#5a8a6e",
|
|
348
357
|
// sage green
|
|
349
358
|
"#b07d4f",
|
|
@@ -363,27 +372,27 @@ const m = [
|
|
|
363
372
|
];
|
|
364
373
|
function Z(e) {
|
|
365
374
|
if (!e)
|
|
366
|
-
return
|
|
367
|
-
let
|
|
368
|
-
for (let
|
|
369
|
-
|
|
370
|
-
return
|
|
375
|
+
return k[0];
|
|
376
|
+
let r = 0;
|
|
377
|
+
for (let o = 0; o < e.length; o++)
|
|
378
|
+
r = (r << 5) - r + e.charCodeAt(o) | 0;
|
|
379
|
+
return k[Math.abs(r) % k.length];
|
|
371
380
|
}
|
|
372
|
-
function
|
|
381
|
+
function ae({
|
|
373
382
|
logo: e,
|
|
374
|
-
title:
|
|
375
|
-
userName:
|
|
376
|
-
userEmail:
|
|
377
|
-
userInitials:
|
|
383
|
+
title: r,
|
|
384
|
+
userName: o,
|
|
385
|
+
userEmail: i,
|
|
386
|
+
userInitials: g,
|
|
378
387
|
userRole: p,
|
|
379
|
-
onSignOut:
|
|
380
|
-
children:
|
|
381
|
-
trailing:
|
|
382
|
-
userMenu:
|
|
383
|
-
height:
|
|
388
|
+
onSignOut: s,
|
|
389
|
+
children: c,
|
|
390
|
+
trailing: h,
|
|
391
|
+
userMenu: n,
|
|
392
|
+
height: y = 48,
|
|
384
393
|
style: l
|
|
385
394
|
}) {
|
|
386
|
-
const
|
|
395
|
+
const x = o || i || "", v = g || ee(x);
|
|
387
396
|
return /* @__PURE__ */ d(
|
|
388
397
|
"header",
|
|
389
398
|
{
|
|
@@ -392,7 +401,7 @@ function oe({
|
|
|
392
401
|
alignItems: "center",
|
|
393
402
|
justifyContent: "space-between",
|
|
394
403
|
padding: "0 20px",
|
|
395
|
-
height:
|
|
404
|
+
height: y,
|
|
396
405
|
borderBottom: "1px solid var(--border)",
|
|
397
406
|
background: "var(--paper-elevated)",
|
|
398
407
|
flexShrink: 0,
|
|
@@ -404,35 +413,35 @@ function oe({
|
|
|
404
413
|
},
|
|
405
414
|
children: [
|
|
406
415
|
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 10, flexShrink: 0 }, children: [
|
|
407
|
-
e !== void 0 ? e : /* @__PURE__ */
|
|
416
|
+
e !== void 0 ? e : /* @__PURE__ */ t("span", { style: {
|
|
408
417
|
fontSize: "var(--text-lg)",
|
|
409
418
|
fontWeight: 700,
|
|
410
419
|
fontFamily: "var(--font-display)",
|
|
411
420
|
color: "var(--text-ink)",
|
|
412
421
|
letterSpacing: "-0.01em"
|
|
413
422
|
}, children: "Chordia" }),
|
|
414
|
-
|
|
415
|
-
/* @__PURE__ */
|
|
423
|
+
r && /* @__PURE__ */ d(B, { children: [
|
|
424
|
+
/* @__PURE__ */ t("span", { style: {
|
|
416
425
|
width: 1,
|
|
417
426
|
height: 18,
|
|
418
427
|
background: "var(--border)",
|
|
419
428
|
flexShrink: 0
|
|
420
429
|
} }),
|
|
421
|
-
/* @__PURE__ */
|
|
430
|
+
/* @__PURE__ */ t("span", { style: {
|
|
422
431
|
fontSize: "var(--text-md)",
|
|
423
432
|
fontWeight: 500,
|
|
424
433
|
color: "var(--text-muted)"
|
|
425
|
-
}, children:
|
|
434
|
+
}, children: r })
|
|
426
435
|
] })
|
|
427
436
|
] }),
|
|
428
|
-
|
|
437
|
+
c && /* @__PURE__ */ t("div", { style: {
|
|
429
438
|
display: "flex",
|
|
430
439
|
alignItems: "center",
|
|
431
440
|
gap: 8,
|
|
432
441
|
flex: 1,
|
|
433
442
|
justifyContent: "center",
|
|
434
443
|
minWidth: 0
|
|
435
|
-
}, children:
|
|
444
|
+
}, children: c }),
|
|
436
445
|
/* @__PURE__ */ d(
|
|
437
446
|
"div",
|
|
438
447
|
{
|
|
@@ -443,41 +452,41 @@ function oe({
|
|
|
443
452
|
flexShrink: 0
|
|
444
453
|
},
|
|
445
454
|
children: [
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
/* @__PURE__ */
|
|
455
|
+
h,
|
|
456
|
+
n || x && /* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
457
|
+
/* @__PURE__ */ t("div", { style: {
|
|
449
458
|
width: 30,
|
|
450
459
|
height: 30,
|
|
451
460
|
borderRadius: "50%",
|
|
452
|
-
background: Z(
|
|
461
|
+
background: Z(x),
|
|
453
462
|
display: "flex",
|
|
454
463
|
alignItems: "center",
|
|
455
464
|
justifyContent: "center",
|
|
456
465
|
flexShrink: 0
|
|
457
|
-
}, children: /* @__PURE__ */
|
|
466
|
+
}, children: /* @__PURE__ */ t("span", { style: {
|
|
458
467
|
fontSize: 11,
|
|
459
468
|
fontWeight: 600,
|
|
460
469
|
color: "#fff",
|
|
461
470
|
letterSpacing: "0.02em",
|
|
462
471
|
lineHeight: 1
|
|
463
|
-
}, children:
|
|
472
|
+
}, children: v }) }),
|
|
464
473
|
/* @__PURE__ */ d("div", { style: { display: "flex", flexDirection: "column", gap: 1 }, children: [
|
|
465
|
-
/* @__PURE__ */
|
|
474
|
+
/* @__PURE__ */ t("span", { style: {
|
|
466
475
|
fontSize: "var(--text-sm)",
|
|
467
476
|
fontWeight: 550,
|
|
468
477
|
color: "var(--text-strong)",
|
|
469
478
|
lineHeight: 1.2
|
|
470
|
-
}, children:
|
|
471
|
-
p && /* @__PURE__ */
|
|
479
|
+
}, children: x }),
|
|
480
|
+
p && /* @__PURE__ */ t("span", { style: {
|
|
472
481
|
fontSize: "var(--text-xs)",
|
|
473
482
|
color: "var(--text-muted)",
|
|
474
483
|
lineHeight: 1.2
|
|
475
484
|
}, children: p })
|
|
476
485
|
] }),
|
|
477
|
-
|
|
486
|
+
s && /* @__PURE__ */ t(
|
|
478
487
|
"button",
|
|
479
488
|
{
|
|
480
|
-
onClick:
|
|
489
|
+
onClick: s,
|
|
481
490
|
title: "Sign out",
|
|
482
491
|
style: {
|
|
483
492
|
display: "flex",
|
|
@@ -492,13 +501,13 @@ function oe({
|
|
|
492
501
|
cursor: "pointer",
|
|
493
502
|
transition: "background 0.15s ease, color 0.15s ease"
|
|
494
503
|
},
|
|
495
|
-
onMouseEnter: (
|
|
496
|
-
|
|
504
|
+
onMouseEnter: (f) => {
|
|
505
|
+
f.currentTarget.style.background = "var(--hover-warm)", f.currentTarget.style.color = "var(--text-muted)";
|
|
497
506
|
},
|
|
498
|
-
onMouseLeave: (
|
|
499
|
-
|
|
507
|
+
onMouseLeave: (f) => {
|
|
508
|
+
f.currentTarget.style.background = "transparent", f.currentTarget.style.color = "var(--text-faint)";
|
|
500
509
|
},
|
|
501
|
-
children: /* @__PURE__ */
|
|
510
|
+
children: /* @__PURE__ */ t(J, { size: 14 })
|
|
502
511
|
}
|
|
503
512
|
)
|
|
504
513
|
] })
|
|
@@ -509,11 +518,11 @@ function oe({
|
|
|
509
518
|
}
|
|
510
519
|
);
|
|
511
520
|
}
|
|
512
|
-
function ie({ label: e, color:
|
|
521
|
+
function ie({ label: e, color: r = "var(--text-muted)", active: o, onClick: i }) {
|
|
513
522
|
return /* @__PURE__ */ d(
|
|
514
523
|
"button",
|
|
515
524
|
{
|
|
516
|
-
onClick:
|
|
525
|
+
onClick: i,
|
|
517
526
|
style: {
|
|
518
527
|
display: "flex",
|
|
519
528
|
alignItems: "center",
|
|
@@ -523,26 +532,26 @@ function ie({ label: e, color: t = "var(--text-muted)", active: n, onClick: o })
|
|
|
523
532
|
fontFamily: "var(--font-sans)",
|
|
524
533
|
padding: "4px 10px",
|
|
525
534
|
borderRadius: "var(--radius-sm)",
|
|
526
|
-
border: `1px solid color-mix(in srgb, ${
|
|
527
|
-
background: `color-mix(in srgb, ${
|
|
528
|
-
color:
|
|
535
|
+
border: `1px solid color-mix(in srgb, ${r} 30%, transparent)`,
|
|
536
|
+
background: `color-mix(in srgb, ${r} 10%, transparent)`,
|
|
537
|
+
color: r,
|
|
529
538
|
cursor: "pointer",
|
|
530
539
|
transition: "background 0.15s ease, border-color 0.15s ease"
|
|
531
540
|
},
|
|
532
|
-
onMouseEnter: (
|
|
533
|
-
|
|
541
|
+
onMouseEnter: (g) => {
|
|
542
|
+
g.currentTarget.style.background = `color-mix(in srgb, ${r} 18%, transparent)`;
|
|
534
543
|
},
|
|
535
|
-
onMouseLeave: (
|
|
536
|
-
|
|
544
|
+
onMouseLeave: (g) => {
|
|
545
|
+
g.currentTarget.style.background = `color-mix(in srgb, ${r} 10%, transparent)`;
|
|
537
546
|
},
|
|
538
547
|
children: [
|
|
539
548
|
e,
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
|
|
549
|
+
/* @__PURE__ */ t(
|
|
550
|
+
M,
|
|
542
551
|
{
|
|
543
552
|
size: 12,
|
|
544
553
|
style: {
|
|
545
|
-
transform:
|
|
554
|
+
transform: o ? "rotate(180deg)" : "rotate(0deg)",
|
|
546
555
|
transition: "transform 0.2s ease",
|
|
547
556
|
opacity: 0.7
|
|
548
557
|
}
|
|
@@ -552,19 +561,19 @@ function ie({ label: e, color: t = "var(--text-muted)", active: n, onClick: o })
|
|
|
552
561
|
}
|
|
553
562
|
);
|
|
554
563
|
}
|
|
555
|
-
function se({ open: e, onClose:
|
|
556
|
-
return e ? /* @__PURE__ */ d(
|
|
557
|
-
/* @__PURE__ */
|
|
564
|
+
function se({ open: e, onClose: r, children: o, align: i = "left" }) {
|
|
565
|
+
return e ? /* @__PURE__ */ d(B, { children: [
|
|
566
|
+
/* @__PURE__ */ t(
|
|
558
567
|
"div",
|
|
559
568
|
{
|
|
560
|
-
onClick:
|
|
569
|
+
onClick: r,
|
|
561
570
|
style: { position: "fixed", inset: 0, zIndex: 99, background: "rgba(0,0,0,0.03)" }
|
|
562
571
|
}
|
|
563
572
|
),
|
|
564
|
-
/* @__PURE__ */
|
|
573
|
+
/* @__PURE__ */ t("div", { style: {
|
|
565
574
|
position: "absolute",
|
|
566
575
|
top: "100%",
|
|
567
|
-
[
|
|
576
|
+
[i === "right" ? "right" : "left"]: 0,
|
|
568
577
|
marginTop: 4,
|
|
569
578
|
zIndex: 100,
|
|
570
579
|
background: "#fff",
|
|
@@ -575,37 +584,37 @@ function se({ open: e, onClose: t, children: n, align: o = "left" }) {
|
|
|
575
584
|
maxHeight: 280,
|
|
576
585
|
overflowY: "auto",
|
|
577
586
|
boxShadow: "0 8px 24px rgba(0,0,0,0.12)"
|
|
578
|
-
}, children:
|
|
587
|
+
}, children: o })
|
|
579
588
|
] }) : null;
|
|
580
589
|
}
|
|
581
|
-
function le({ label: e, active:
|
|
582
|
-
return /* @__PURE__ */
|
|
590
|
+
function le({ label: e, active: r, onClick: o }) {
|
|
591
|
+
return /* @__PURE__ */ t(
|
|
583
592
|
"div",
|
|
584
593
|
{
|
|
585
|
-
onClick:
|
|
594
|
+
onClick: o,
|
|
586
595
|
style: {
|
|
587
596
|
padding: "8px 10px",
|
|
588
597
|
borderRadius: "var(--radius-sm)",
|
|
589
598
|
cursor: "pointer",
|
|
590
599
|
fontSize: "var(--text-sm)",
|
|
591
|
-
color:
|
|
592
|
-
fontWeight:
|
|
600
|
+
color: r ? "var(--text-ink)" : "var(--text-base)",
|
|
601
|
+
fontWeight: r ? 600 : 400,
|
|
593
602
|
fontFamily: "var(--font-sans)",
|
|
594
|
-
background:
|
|
603
|
+
background: r ? "var(--hover-warm)" : "transparent",
|
|
595
604
|
transition: "background 0.1s ease"
|
|
596
605
|
},
|
|
597
|
-
onMouseEnter: (
|
|
598
|
-
|
|
606
|
+
onMouseEnter: (i) => {
|
|
607
|
+
r || (i.currentTarget.style.background = "var(--hover-warm-subtle)");
|
|
599
608
|
},
|
|
600
|
-
onMouseLeave: (
|
|
601
|
-
|
|
609
|
+
onMouseLeave: (i) => {
|
|
610
|
+
r || (i.currentTarget.style.background = "transparent");
|
|
602
611
|
},
|
|
603
612
|
children: e
|
|
604
613
|
}
|
|
605
614
|
);
|
|
606
615
|
}
|
|
607
|
-
function de({ connected: e, label:
|
|
608
|
-
return /* @__PURE__ */
|
|
616
|
+
function de({ connected: e, label: r }) {
|
|
617
|
+
return /* @__PURE__ */ t("span", { style: {
|
|
609
618
|
fontSize: "var(--text-xs)",
|
|
610
619
|
fontFamily: "var(--font-sans)",
|
|
611
620
|
padding: "3px 10px",
|
|
@@ -614,20 +623,20 @@ function de({ connected: e, label: t }) {
|
|
|
614
623
|
color: e ? "var(--state-present)" : "var(--text-faint)",
|
|
615
624
|
background: e ? "rgba(37,163,114,0.08)" : "transparent",
|
|
616
625
|
transition: "all 0.2s ease"
|
|
617
|
-
}, children:
|
|
626
|
+
}, children: r || (e ? "Connected" : "Disconnected") });
|
|
618
627
|
}
|
|
619
628
|
function ee(e) {
|
|
620
629
|
if (!e)
|
|
621
630
|
return "?";
|
|
622
|
-
const
|
|
623
|
-
return
|
|
631
|
+
const r = e.trim().split(/\s+/);
|
|
632
|
+
return r.length >= 2 ? (r[0][0] + r[r.length - 1][0]).toUpperCase() : e.slice(0, 2).toUpperCase();
|
|
624
633
|
}
|
|
625
634
|
export {
|
|
626
635
|
se as NavDropdown,
|
|
627
636
|
le as NavDropdownItem,
|
|
628
637
|
ie as NavPill,
|
|
629
|
-
|
|
630
|
-
|
|
638
|
+
ae as NavigationBar,
|
|
639
|
+
oe as Sidebar,
|
|
631
640
|
de as StatusIndicator
|
|
632
641
|
};
|
|
633
642
|
//# sourceMappingURL=navigation.es.js.map
|