@freedom-code-compliance/fcc-redesign 0.1.27 → 0.1.29
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/index.cjs +1 -1
- package/dist/index.js +98 -91
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,17 +85,17 @@ function ne() {
|
|
|
85
85
|
}
|
|
86
86
|
//#endregion
|
|
87
87
|
//#region src/context/ThemeContext.jsx
|
|
88
|
-
var
|
|
89
|
-
function
|
|
88
|
+
var re = e(void 0), ie = "dark", ae = "fcc-theme";
|
|
89
|
+
function oe(e) {
|
|
90
90
|
if (typeof document > "u") return;
|
|
91
91
|
let t = document.documentElement;
|
|
92
92
|
t.classList.remove("dark", "light"), e === "light" && t.classList.add("light");
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function se({ children: e, defaultTheme: t = ie, storageKey: n = ae }) {
|
|
95
95
|
let [r, i] = u(() => typeof window > "u" ? t : window.localStorage.getItem(n) || t);
|
|
96
96
|
return o(() => {
|
|
97
|
-
typeof window < "u" && window.localStorage.setItem(n, r),
|
|
98
|
-
}, [n, r]), /* @__PURE__ */ z(
|
|
97
|
+
typeof window < "u" && window.localStorage.setItem(n, r), oe(r);
|
|
98
|
+
}, [n, r]), /* @__PURE__ */ z(re.Provider, {
|
|
99
99
|
value: {
|
|
100
100
|
theme: r,
|
|
101
101
|
setTheme: i,
|
|
@@ -106,23 +106,23 @@ function G({ children: e, defaultTheme: t = re, storageKey: n = ie }) {
|
|
|
106
106
|
children: e
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
let e = a(
|
|
109
|
+
function W() {
|
|
110
|
+
let e = a(re);
|
|
111
111
|
if (!e) throw Error("useTheme must be used within a ThemeProvider");
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
114
|
//#endregion
|
|
115
115
|
//#region src/lib/FCCDesignProvider.jsx
|
|
116
|
-
function
|
|
117
|
-
return /* @__PURE__ */ z(
|
|
116
|
+
function ce({ children: e, ...t }) {
|
|
117
|
+
return /* @__PURE__ */ z(se, {
|
|
118
118
|
...t,
|
|
119
119
|
children: /* @__PURE__ */ z(te, { children: e })
|
|
120
120
|
});
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
123
|
//#region src/components/layout/FCCSidePanel.jsx
|
|
124
|
-
var
|
|
125
|
-
function
|
|
124
|
+
var G = (...e) => e.filter(Boolean).join(" "), le = 300;
|
|
125
|
+
function ue({ open: e = !1, width: t = 320, expandedWidth: n, expanded: r = !1, panel: i, children: a, className: s = "", contentClassName: c = "", panelClassName: d = "" }) {
|
|
126
126
|
let f = r && n ? n : t, p = l(null), m = l(null), [h, g] = u(e ? i : null), [_, v] = u(f), [y, b] = u(e && !!i);
|
|
127
127
|
o(() => () => {
|
|
128
128
|
p.current &&= (window.cancelAnimationFrame(p.current), null), m.current &&= (window.clearTimeout(m.current), null);
|
|
@@ -140,29 +140,29 @@ function J({ open: e = !1, width: t = 320, expandedWidth: n, expanded: r = !1, p
|
|
|
140
140
|
]), o(() => {
|
|
141
141
|
if (!(e || !y)) return m.current = window.setTimeout(() => {
|
|
142
142
|
b(!1), g(null), m.current = null;
|
|
143
|
-
},
|
|
143
|
+
}, le), () => {
|
|
144
144
|
m.current &&= (window.clearTimeout(m.current), null);
|
|
145
145
|
};
|
|
146
146
|
}, [e, y]);
|
|
147
147
|
let x = !e && y, S = e ? i : y ? h : null, C = e ? f : y ? _ : f, w = e && !!i || !!S;
|
|
148
148
|
return /* @__PURE__ */ B("div", {
|
|
149
|
-
className:
|
|
149
|
+
className: G("fcc-side-panel-layout", s),
|
|
150
150
|
children: [/* @__PURE__ */ z("div", {
|
|
151
|
-
className:
|
|
151
|
+
className: G("fcc-side-panel-content", c),
|
|
152
152
|
children: a
|
|
153
153
|
}), /* @__PURE__ */ z("div", {
|
|
154
|
-
className:
|
|
154
|
+
className: G("fcc-side-panel-rail", w && "has-panel", e && w && "open", x && "closing"),
|
|
155
155
|
style: { "--fcc-side-panel-width": `${C}px` },
|
|
156
156
|
children: /* @__PURE__ */ z("div", {
|
|
157
|
-
className:
|
|
157
|
+
className: G("fcc-side-panel-inner", d),
|
|
158
158
|
children: S
|
|
159
159
|
})
|
|
160
160
|
})]
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function de({ title: e, subtitle: t, onClose: n, actions: r, className: i = "" }) {
|
|
164
164
|
return /* @__PURE__ */ B("div", {
|
|
165
|
-
className:
|
|
165
|
+
className: G("fcc-side-panel-header", i),
|
|
166
166
|
children: [/* @__PURE__ */ B("div", {
|
|
167
167
|
className: "fcc-side-panel-header-copy",
|
|
168
168
|
children: [/* @__PURE__ */ z("div", {
|
|
@@ -183,25 +183,25 @@ function ce({ title: e, subtitle: t, onClose: n, actions: r, className: i = "" }
|
|
|
183
183
|
})]
|
|
184
184
|
});
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function fe({ children: e, className: t = "" }) {
|
|
187
187
|
return /* @__PURE__ */ z("div", {
|
|
188
|
-
className:
|
|
188
|
+
className: G("fcc-side-panel-body", t),
|
|
189
189
|
children: e
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function pe({ tabs: e = [], activeTab: t = 0, onTabChange: n, className: r = "" }) {
|
|
193
193
|
return /* @__PURE__ */ z("div", {
|
|
194
|
-
className:
|
|
194
|
+
className: G("fcc-side-panel-tabs", r),
|
|
195
195
|
children: e.map((e, r) => /* @__PURE__ */ z("button", {
|
|
196
|
-
className:
|
|
196
|
+
className: G("fcc-side-panel-tab", t === r && "active"),
|
|
197
197
|
onClick: () => n?.(r),
|
|
198
198
|
children: e
|
|
199
199
|
}, e))
|
|
200
200
|
});
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function me({ placeholder: e = "Search...", value: t, onChange: n, className: r = "" }) {
|
|
203
203
|
return /* @__PURE__ */ B("div", {
|
|
204
|
-
className:
|
|
204
|
+
className: G("fcc-side-panel-search", r),
|
|
205
205
|
children: [/* @__PURE__ */ z(N, { size: 13 }), n ? /* @__PURE__ */ z("input", {
|
|
206
206
|
className: "fcc-side-panel-search-input",
|
|
207
207
|
type: "text",
|
|
@@ -214,15 +214,15 @@ function de({ placeholder: e = "Search...", value: t, onChange: n, className: r
|
|
|
214
214
|
})]
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function he({ children: e, className: t = "" }) {
|
|
218
218
|
return /* @__PURE__ */ z("div", {
|
|
219
|
-
className:
|
|
219
|
+
className: G("fcc-side-panel-group-label", t),
|
|
220
220
|
children: e
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ge({ dot: e, label: t, detail: n, time: r, onClick: i, className: a = "" }) {
|
|
224
224
|
return /* @__PURE__ */ B("div", {
|
|
225
|
-
className:
|
|
225
|
+
className: G("fcc-side-panel-item", a),
|
|
226
226
|
onClick: i,
|
|
227
227
|
children: [
|
|
228
228
|
e && /* @__PURE__ */ z("span", {
|
|
@@ -246,9 +246,9 @@ function pe({ dot: e, label: t, detail: n, time: r, onClick: i, className: a = "
|
|
|
246
246
|
]
|
|
247
247
|
});
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function _e({ avatar: e, title: t, detail: n, time: r, unread: i, onClick: a, className: o = "" }) {
|
|
250
250
|
return /* @__PURE__ */ B("div", {
|
|
251
|
-
className:
|
|
251
|
+
className: G("fcc-side-panel-card", o),
|
|
252
252
|
onClick: a,
|
|
253
253
|
children: [/* @__PURE__ */ z("div", {
|
|
254
254
|
className: "fcc-side-panel-card-avatar",
|
|
@@ -272,9 +272,9 @@ function me({ avatar: e, title: t, detail: n, time: r, unread: i, onClick: a, cl
|
|
|
272
272
|
})]
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function ve({ avatar: e, name: t, time: n, active: r, online: i, onClick: a, className: o = "" }) {
|
|
276
276
|
return /* @__PURE__ */ B("div", {
|
|
277
|
-
className:
|
|
277
|
+
className: G("fcc-side-panel-contact", r && "active", o),
|
|
278
278
|
onClick: a,
|
|
279
279
|
children: [
|
|
280
280
|
/* @__PURE__ */ B("div", {
|
|
@@ -292,22 +292,22 @@ function he({ avatar: e, name: t, time: n, active: r, online: i, onClick: a, cla
|
|
|
292
292
|
]
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function ye({ children: e, onClick: t, className: n = "" }) {
|
|
296
296
|
return /* @__PURE__ */ z("div", {
|
|
297
|
-
className:
|
|
297
|
+
className: G("fcc-side-panel-action", n),
|
|
298
298
|
onClick: t,
|
|
299
299
|
children: e
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function be({ children: e, className: t = "" }) {
|
|
303
303
|
return /* @__PURE__ */ z("div", {
|
|
304
|
-
className:
|
|
304
|
+
className: G("fcc-side-panel-chat-wrap", t),
|
|
305
305
|
children: e
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function xe({ title: e, headerActions: t, messages: n = [], input: r, className: i = "" }) {
|
|
309
309
|
return /* @__PURE__ */ B("div", {
|
|
310
|
-
className:
|
|
310
|
+
className: G("fcc-side-panel-conversation", i),
|
|
311
311
|
children: [
|
|
312
312
|
/* @__PURE__ */ B("div", {
|
|
313
313
|
className: "fcc-side-panel-conv-header",
|
|
@@ -330,22 +330,22 @@ function ve({ title: e, headerActions: t, messages: n = [], input: r, className:
|
|
|
330
330
|
]
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function Se({ from: e = "other", meta: t, children: n, className: r = "" }) {
|
|
334
334
|
let i = e === "you";
|
|
335
335
|
return /* @__PURE__ */ B("div", {
|
|
336
|
-
className:
|
|
336
|
+
className: G("fcc-side-panel-msg-row", i ? "fcc-msg-right" : "fcc-msg-left", r),
|
|
337
337
|
children: [t && /* @__PURE__ */ z("div", {
|
|
338
338
|
className: "fcc-side-panel-msg-meta",
|
|
339
339
|
children: t
|
|
340
340
|
}), /* @__PURE__ */ z("div", {
|
|
341
|
-
className:
|
|
341
|
+
className: G("fcc-side-panel-msg-bubble", i ? "fcc-bubble-you" : "fcc-bubble-other"),
|
|
342
342
|
children: n
|
|
343
343
|
})]
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
//#endregion
|
|
347
347
|
//#region src/components/layout/FCCBreadcrumbs.jsx
|
|
348
|
-
function
|
|
348
|
+
function Ce(e, t) {
|
|
349
349
|
let n = [
|
|
350
350
|
"fcc-breadcrumb-item",
|
|
351
351
|
t ? "current" : "",
|
|
@@ -368,7 +368,7 @@ function be(e, t) {
|
|
|
368
368
|
children: e.label
|
|
369
369
|
});
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function we({ items: e = [], className: t = "" }) {
|
|
372
372
|
let n = e.filter((e) => e?.label);
|
|
373
373
|
return n.length === 0 ? null : /* @__PURE__ */ z("nav", {
|
|
374
374
|
className: ["fcc-breadcrumbs", t].filter(Boolean).join(" "),
|
|
@@ -380,25 +380,25 @@ function xe({ items: e = [], className: t = "" }) {
|
|
|
380
380
|
children: [t > 0 && /* @__PURE__ */ z("span", {
|
|
381
381
|
className: "fcc-breadcrumb-sep",
|
|
382
382
|
children: "/"
|
|
383
|
-
}),
|
|
383
|
+
}), Ce(e, r)]
|
|
384
384
|
}, e.key || e.label || t);
|
|
385
385
|
})
|
|
386
386
|
});
|
|
387
387
|
}
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/components/layout/FCCHeaderStatus.jsx
|
|
390
|
-
var
|
|
390
|
+
var Te = {
|
|
391
391
|
success: "fcc-header-status-success",
|
|
392
392
|
warning: "fcc-header-status-warning",
|
|
393
393
|
danger: "fcc-header-status-danger",
|
|
394
394
|
info: "fcc-header-status-info",
|
|
395
395
|
neutral: "fcc-header-status-neutral"
|
|
396
396
|
};
|
|
397
|
-
function
|
|
397
|
+
function K({ label: e, tone: t = "success", dotColor: n, className: r = "" }) {
|
|
398
398
|
return e ? /* @__PURE__ */ B("div", {
|
|
399
399
|
className: [
|
|
400
400
|
"fcc-header-status",
|
|
401
|
-
|
|
401
|
+
Te[t] || Te.neutral,
|
|
402
402
|
r
|
|
403
403
|
].filter(Boolean).join(" "),
|
|
404
404
|
children: [/* @__PURE__ */ z("span", {
|
|
@@ -409,16 +409,16 @@ function Ce({ label: e, tone: t = "success", dotColor: n, className: r = "" }) {
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region src/components/layout/FCCWorkspaceHeader.jsx
|
|
412
|
-
function
|
|
412
|
+
function q({ breadcrumbs: e = [], status: t, actions: n, leftSlot: r, rightSlot: i, className: a = "" }) {
|
|
413
413
|
return /* @__PURE__ */ B("header", {
|
|
414
414
|
className: ["fcc-workspace-header", a].filter(Boolean).join(" "),
|
|
415
415
|
children: [/* @__PURE__ */ z("div", {
|
|
416
416
|
className: "fcc-workspace-header-left",
|
|
417
|
-
children: r || /* @__PURE__ */ z(
|
|
417
|
+
children: r || /* @__PURE__ */ z(we, { items: e })
|
|
418
418
|
}), /* @__PURE__ */ B("div", {
|
|
419
419
|
className: "fcc-workspace-header-right",
|
|
420
420
|
children: [
|
|
421
|
-
t && /* @__PURE__ */ z(
|
|
421
|
+
t && /* @__PURE__ */ z(K, { ...t }),
|
|
422
422
|
n,
|
|
423
423
|
i
|
|
424
424
|
]
|
|
@@ -427,8 +427,8 @@ function we({ breadcrumbs: e = [], status: t, actions: n, leftSlot: r, rightSlot
|
|
|
427
427
|
}
|
|
428
428
|
//#endregion
|
|
429
429
|
//#region src/components/layout/FCCMainWindow.jsx
|
|
430
|
-
function
|
|
431
|
-
let u = o ? /* @__PURE__ */ z(
|
|
430
|
+
function Ee({ breadcrumbs: e = [], status: t, headerActions: n, header: r, children: i, overlay: a, sidePanel: o, className: s = "", headerClassName: c = "", contentClassName: l = "" }) {
|
|
431
|
+
let u = o ? /* @__PURE__ */ z(ue, {
|
|
432
432
|
open: o.open,
|
|
433
433
|
width: o.width,
|
|
434
434
|
expandedWidth: o.expandedWidth,
|
|
@@ -442,7 +442,7 @@ function Te({ breadcrumbs: e = [], status: t, headerActions: n, header: r, child
|
|
|
442
442
|
return /* @__PURE__ */ B("div", {
|
|
443
443
|
className: ["fcc-main-window", s].filter(Boolean).join(" "),
|
|
444
444
|
children: [
|
|
445
|
-
r || /* @__PURE__ */ z(
|
|
445
|
+
r || /* @__PURE__ */ z(q, {
|
|
446
446
|
breadcrumbs: e,
|
|
447
447
|
status: t,
|
|
448
448
|
actions: n,
|
|
@@ -462,7 +462,7 @@ function Te({ breadcrumbs: e = [], status: t, headerActions: n, header: r, child
|
|
|
462
462
|
}
|
|
463
463
|
//#endregion
|
|
464
464
|
//#region src/components/layout/FCCSidebar.jsx
|
|
465
|
-
function
|
|
465
|
+
function De(e, t) {
|
|
466
466
|
if (!e.disabled) {
|
|
467
467
|
if (e.onClick) {
|
|
468
468
|
e.onClick(e);
|
|
@@ -471,10 +471,10 @@ function Ee(e, t) {
|
|
|
471
471
|
t?.(e);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Oe(e, t) {
|
|
475
475
|
return !e.childrenSections?.length || !t ? !1 : e.childrenSections.some((e) => e.items?.some((e) => e.key === t));
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function ke(e, t) {
|
|
478
478
|
if (!t.trim()) return e;
|
|
479
479
|
let n = t.trim().toLowerCase();
|
|
480
480
|
return e.map((e) => ({
|
|
@@ -482,7 +482,7 @@ function Oe(e, t) {
|
|
|
482
482
|
items: e.items.filter((e) => e.label.toLowerCase().includes(n) || e.pageTitle?.toLowerCase().includes(n) || e.summary?.toLowerCase().includes(n))
|
|
483
483
|
})).filter((e) => e.items.length > 0);
|
|
484
484
|
}
|
|
485
|
-
function
|
|
485
|
+
function Ae({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, onNavigate: i, user: a, footer: o, onLogout: s, className: c = "" }) {
|
|
486
486
|
let [l, d] = u({}), [f, p] = u({});
|
|
487
487
|
function m(e, t) {
|
|
488
488
|
p((n) => ({
|
|
@@ -507,7 +507,7 @@ function ke({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
507
507
|
className: "fcc-sidebar-nav",
|
|
508
508
|
"aria-label": `${e} navigation`,
|
|
509
509
|
children: n.map((e) => {
|
|
510
|
-
let t = e.childrenSections?.length > 0, n =
|
|
510
|
+
let t = e.childrenSections?.length > 0, n = Oe(e, r), a = e.key === r || n || (r?.startsWith?.(`${e.key}/`) ?? !1), o = t && (f[e.key] ?? a), s = l[e.key] || "", c = t ? ke(e.childrenSections, s) : [];
|
|
511
511
|
return /* @__PURE__ */ B("div", {
|
|
512
512
|
className: [
|
|
513
513
|
"fcc-sidebar-entry",
|
|
@@ -522,7 +522,7 @@ function ke({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
522
522
|
e.disabled ? "disabled" : ""
|
|
523
523
|
].filter(Boolean).join(" "),
|
|
524
524
|
onClick: () => {
|
|
525
|
-
t && m(e.key, !0),
|
|
525
|
+
t && m(e.key, !0), De(e, i);
|
|
526
526
|
},
|
|
527
527
|
"aria-current": a ? "page" : void 0,
|
|
528
528
|
disabled: e.disabled,
|
|
@@ -584,7 +584,7 @@ function ke({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
584
584
|
children: e.items.map((e) => /* @__PURE__ */ z("button", {
|
|
585
585
|
type: "button",
|
|
586
586
|
className: ["fcc-sidebar-child-item", e.key === r ? "active" : ""].filter(Boolean).join(" "),
|
|
587
|
-
onClick: () =>
|
|
587
|
+
onClick: () => De(e, i),
|
|
588
588
|
title: e.label,
|
|
589
589
|
children: /* @__PURE__ */ z("span", {
|
|
590
590
|
className: "fcc-sidebar-label",
|
|
@@ -633,10 +633,10 @@ function ke({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
633
633
|
}
|
|
634
634
|
//#endregion
|
|
635
635
|
//#region src/components/layout/FCCAppShell.jsx
|
|
636
|
-
function
|
|
636
|
+
function je({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, onNavigate: i, user: a, footer: o, onLogout: s, breadcrumbs: c = [], status: l, headerActions: u, header: d, children: f, overlay: p, sidePanel: m, className: h = "", sidebarClassName: g = "", mainClassName: _ = "", headerClassName: v = "", contentClassName: y = "" }) {
|
|
637
637
|
return /* @__PURE__ */ B("div", {
|
|
638
638
|
className: ["fcc-app-shell", h].filter(Boolean).join(" "),
|
|
639
|
-
children: [/* @__PURE__ */ z(
|
|
639
|
+
children: [/* @__PURE__ */ z(Ae, {
|
|
640
640
|
appName: e,
|
|
641
641
|
logo: t,
|
|
642
642
|
navItems: n,
|
|
@@ -646,7 +646,7 @@ function Ae({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
646
646
|
footer: o,
|
|
647
647
|
onLogout: s,
|
|
648
648
|
className: g
|
|
649
|
-
}), /* @__PURE__ */ z(
|
|
649
|
+
}), /* @__PURE__ */ z(Ee, {
|
|
650
650
|
breadcrumbs: c,
|
|
651
651
|
status: l,
|
|
652
652
|
headerActions: u,
|
|
@@ -662,8 +662,8 @@ function Ae({ appName: e = "FCC", logo: t, navItems: n = [], activeNavKey: r, on
|
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
664
664
|
//#region src/components/layout/FCCBrandLogo.jsx
|
|
665
|
-
function
|
|
666
|
-
let { theme: a } =
|
|
665
|
+
function Me({ darkSrc: e, lightSrc: t, alt: n = "FCC", className: r = "", ...i }) {
|
|
666
|
+
let { theme: a } = W(), o = a === "dark" ? e || t : t || e;
|
|
667
667
|
return o ? /* @__PURE__ */ z("img", {
|
|
668
668
|
src: o,
|
|
669
669
|
alt: n,
|
|
@@ -673,8 +673,8 @@ function je({ darkSrc: e, lightSrc: t, alt: n = "FCC", className: r = "", ...i }
|
|
|
673
673
|
}
|
|
674
674
|
//#endregion
|
|
675
675
|
//#region src/components/layout/FCCThemeToggle.jsx
|
|
676
|
-
function
|
|
677
|
-
let { theme: t, toggleTheme: n } =
|
|
676
|
+
function Ne({ className: e = "" }) {
|
|
677
|
+
let { theme: t, toggleTheme: n } = W(), r = t === "dark";
|
|
678
678
|
return /* @__PURE__ */ z("button", {
|
|
679
679
|
type: "button",
|
|
680
680
|
onClick: n,
|
|
@@ -692,7 +692,7 @@ function Me({ className: e = "" }) {
|
|
|
692
692
|
}
|
|
693
693
|
//#endregion
|
|
694
694
|
//#region src/components/ui/AppLoader.jsx
|
|
695
|
-
function
|
|
695
|
+
function Pe({ label: e = "Loading...", fullscreen: t = !1, className: n = "" }) {
|
|
696
696
|
return t ? /* @__PURE__ */ B("div", {
|
|
697
697
|
className: `loader-fullscreen ${n}`,
|
|
698
698
|
children: [/* @__PURE__ */ z(O, {
|
|
@@ -713,13 +713,13 @@ function Ne({ label: e = "Loading...", fullscreen: t = !1, className: n = "" })
|
|
|
713
713
|
})]
|
|
714
714
|
});
|
|
715
715
|
}
|
|
716
|
-
function
|
|
716
|
+
function Fe({ size: e = 16, className: t = "" }) {
|
|
717
717
|
return /* @__PURE__ */ z(O, {
|
|
718
718
|
size: e,
|
|
719
719
|
className: `loader-spin ${t}`
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Ie({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc: r, lightSrc: i, alt: a = "FCC", className: o = "" }) {
|
|
723
723
|
let s = /* @__PURE__ */ B("div", {
|
|
724
724
|
className: "fcc-loader-stage",
|
|
725
725
|
style: { "--fcc-loader-size": `${n}px` },
|
|
@@ -727,7 +727,7 @@ function Fe({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc
|
|
|
727
727
|
children: [
|
|
728
728
|
/* @__PURE__ */ z("span", { className: "fcc-loader-ring" }),
|
|
729
729
|
/* @__PURE__ */ z("span", { className: "fcc-loader-glow" }),
|
|
730
|
-
/* @__PURE__ */ z(
|
|
730
|
+
/* @__PURE__ */ z(Me, {
|
|
731
731
|
darkSrc: r,
|
|
732
732
|
lightSrc: i,
|
|
733
733
|
alt: a,
|
|
@@ -764,7 +764,7 @@ function Fe({ label: e = "Loading...", fullscreen: t = !1, size: n = 64, darkSrc
|
|
|
764
764
|
}
|
|
765
765
|
//#endregion
|
|
766
766
|
//#region src/components/ui/FCCDetailsPanel.jsx
|
|
767
|
-
function
|
|
767
|
+
function Le({ open: e, onClose: t, title: n, header: r, children: a, loading: s = !1, loadingLabel: c = "Loading...", loaderSize: d = 64, loaderDarkSrc: f, loaderLightSrc: p, width: m, zIndex: h = 1100, showBackdrop: g = !0, resizable: _ = !0, minWidth: v = 360, storageKey: y, className: b = "" }) {
|
|
768
768
|
let [x, S] = u(!1), [C, w] = u(!1), [T, E] = u(!1), [D, O] = u(() => {
|
|
769
769
|
if (!y || typeof window > "u") return null;
|
|
770
770
|
let e = window.localStorage.getItem(y), t = e ? parseInt(e, 10) : NaN;
|
|
@@ -844,7 +844,7 @@ function Ie({ open: e, onClose: t, title: n, header: r, children: a, loading: s
|
|
|
844
844
|
className: "fcc-details-panel-body",
|
|
845
845
|
children: s ? /* @__PURE__ */ z("div", {
|
|
846
846
|
className: "fcc-details-panel-loading",
|
|
847
|
-
children: /* @__PURE__ */ z(
|
|
847
|
+
children: /* @__PURE__ */ z(Ie, {
|
|
848
848
|
label: c,
|
|
849
849
|
size: d,
|
|
850
850
|
darkSrc: f,
|
|
@@ -858,7 +858,7 @@ function Ie({ open: e, onClose: t, title: n, header: r, children: a, loading: s
|
|
|
858
858
|
}
|
|
859
859
|
//#endregion
|
|
860
860
|
//#region src/components/ui/Accordion.jsx
|
|
861
|
-
function
|
|
861
|
+
function Re({ title: e, header: t, defaultOpen: n = !1, className: r = "", children: i }) {
|
|
862
862
|
let [a, o] = u(n);
|
|
863
863
|
return /* @__PURE__ */ B("div", {
|
|
864
864
|
className: `accordion-item ${r}`,
|
|
@@ -886,7 +886,7 @@ function Le({ title: e, header: t, defaultOpen: n = !1, className: r = "", child
|
|
|
886
886
|
})]
|
|
887
887
|
});
|
|
888
888
|
}
|
|
889
|
-
function
|
|
889
|
+
function ze({ items: e = [], className: t = "" }) {
|
|
890
890
|
let [n, r] = u(/* @__PURE__ */ new Set());
|
|
891
891
|
function i(e) {
|
|
892
892
|
r((t) => {
|
|
@@ -928,12 +928,12 @@ function Re({ items: e = [], className: t = "" }) {
|
|
|
928
928
|
}
|
|
929
929
|
//#endregion
|
|
930
930
|
//#region src/components/ui/Avatar.jsx
|
|
931
|
-
var
|
|
931
|
+
var Be = {
|
|
932
932
|
sm: "avatar-sm",
|
|
933
933
|
md: "",
|
|
934
934
|
lg: "avatar-lg",
|
|
935
935
|
xl: "avatar-xl"
|
|
936
|
-
},
|
|
936
|
+
}, Ve = [
|
|
937
937
|
"#5e6ad2",
|
|
938
938
|
"#5bb98e",
|
|
939
939
|
"#c9a84e",
|
|
@@ -942,13 +942,13 @@ var ze = {
|
|
|
942
942
|
"#5a8ebf",
|
|
943
943
|
"#c4a06a"
|
|
944
944
|
];
|
|
945
|
-
function
|
|
945
|
+
function He(e) {
|
|
946
946
|
let t = 0;
|
|
947
947
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
948
|
-
return
|
|
948
|
+
return Ve[Math.abs(t) % Ve.length];
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let [o, s] = u(!1), c = t || (n ? n.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase() : "?"), l = a.background ||
|
|
950
|
+
function J({ imageUrl: e, initials: t, name: n, size: r = "md", className: i = "", style: a = {} }) {
|
|
951
|
+
let [o, s] = u(!1), c = t || (n ? n.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase() : "?"), l = a.background || He(c), d = Be[r] || "";
|
|
952
952
|
return e && !o ? /* @__PURE__ */ z("img", {
|
|
953
953
|
src: e,
|
|
954
954
|
alt: n || "",
|
|
@@ -969,7 +969,7 @@ function Y({ imageUrl: e, initials: t, name: n, size: r = "md", className: i = "
|
|
|
969
969
|
}
|
|
970
970
|
//#endregion
|
|
971
971
|
//#region src/components/ui/Badge.jsx
|
|
972
|
-
var
|
|
972
|
+
var Y = {
|
|
973
973
|
default: "var(--text-quaternary)",
|
|
974
974
|
secondary: "var(--text-quaternary)",
|
|
975
975
|
success: "var(--accent-green)",
|
|
@@ -981,7 +981,7 @@ var He = {
|
|
|
981
981
|
orange: "var(--accent-orange)"
|
|
982
982
|
};
|
|
983
983
|
function X({ variant: e = "default", className: t = "", children: n, showDot: r = !0, ...i }) {
|
|
984
|
-
let a =
|
|
984
|
+
let a = Y[e] || Y.default;
|
|
985
985
|
return /* @__PURE__ */ B("span", {
|
|
986
986
|
className: `badge ${r ? "" : "badge--no-dot"} ${t}`.trim(),
|
|
987
987
|
...i,
|
|
@@ -1307,6 +1307,10 @@ function ct({ icon: e, children: t, shortcut: n, active: r, onClick: i, classNam
|
|
|
1307
1307
|
n && /* @__PURE__ */ z("span", {
|
|
1308
1308
|
className: "dropdown-shortcut",
|
|
1309
1309
|
children: n
|
|
1310
|
+
}),
|
|
1311
|
+
r && /* @__PURE__ */ z(h, {
|
|
1312
|
+
size: 14,
|
|
1313
|
+
className: "dropdown-item-check"
|
|
1310
1314
|
})
|
|
1311
1315
|
]
|
|
1312
1316
|
});
|
|
@@ -1334,7 +1338,7 @@ function dt({ className: e = "" }) {
|
|
|
1334
1338
|
//#endregion
|
|
1335
1339
|
//#region src/components/ui/SearchableSelect.jsx
|
|
1336
1340
|
function ft({ options: e = [], value: t, onChange: n, placeholder: r = "Select...", searchPlaceholder: i = "Search...", allowEmpty: a = !1, disabled: s = !1, className: c = "" }) {
|
|
1337
|
-
let [d, f] = u(!1), [p, m] = u(""), [g, _] = u(
|
|
1341
|
+
let [d, f] = u(!1), [p, m] = u(""), [g, _] = u(-1), y = l(null), b = l(null), x = e.filter((e) => e.label.toLowerCase().includes(p.toLowerCase()) || e.description && e.description.toLowerCase().includes(p.toLowerCase())), S = e.find((e) => e.value === t);
|
|
1338
1342
|
o(() => {
|
|
1339
1343
|
d && b.current && b.current.focus();
|
|
1340
1344
|
}, [d]), o(() => {
|
|
@@ -1344,14 +1348,16 @@ function ft({ options: e = [], value: t, onChange: n, placeholder: r = "Select..
|
|
|
1344
1348
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
1345
1349
|
}, []);
|
|
1346
1350
|
function C(e) {
|
|
1347
|
-
e.key === "ArrowDown" ? (e.preventDefault(), _((e) => Math.min(e + 1, x.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), _((e) => Math.max(e - 1, 0))) : e.key === "Enter" && x[g] ? (n?.(x[g].value), f(!1), m("")) : e.key === "Escape" && (f(!1), m(""));
|
|
1351
|
+
e.key === "ArrowDown" ? (e.preventDefault(), _((e) => Math.min(e + 1, x.length - 1))) : e.key === "ArrowUp" ? (e.preventDefault(), _((e) => Math.max(e - 1, 0))) : e.key === "Enter" && g >= 0 && x[g] ? (n?.(x[g].value), f(!1), m("")) : e.key === "Escape" && (f(!1), m(""));
|
|
1348
1352
|
}
|
|
1349
1353
|
return /* @__PURE__ */ B("div", {
|
|
1350
1354
|
ref: y,
|
|
1351
1355
|
className: `searchable-select ${c}`,
|
|
1352
1356
|
children: [/* @__PURE__ */ B("button", {
|
|
1353
1357
|
className: "searchable-select-trigger",
|
|
1354
|
-
onClick: () =>
|
|
1358
|
+
onClick: () => {
|
|
1359
|
+
s || (d || _(-1), f(!d));
|
|
1360
|
+
},
|
|
1355
1361
|
disabled: s,
|
|
1356
1362
|
type: "button",
|
|
1357
1363
|
children: [/* @__PURE__ */ z("span", {
|
|
@@ -1391,6 +1397,7 @@ function ft({ options: e = [], value: t, onChange: n, placeholder: r = "Select..
|
|
|
1391
1397
|
onClick: () => {
|
|
1392
1398
|
n?.(null), f(!1), m("");
|
|
1393
1399
|
},
|
|
1400
|
+
onMouseEnter: () => _(-1),
|
|
1394
1401
|
children: /* @__PURE__ */ z("span", {
|
|
1395
1402
|
style: {
|
|
1396
1403
|
color: "var(--text-tertiary)",
|
|
@@ -1887,7 +1894,7 @@ function Mt({ items: e = [], className: t = "" }) {
|
|
|
1887
1894
|
className: "activity-item",
|
|
1888
1895
|
children: [/* @__PURE__ */ z("div", {
|
|
1889
1896
|
className: "activity-avatar",
|
|
1890
|
-
children: /* @__PURE__ */ z(
|
|
1897
|
+
children: /* @__PURE__ */ z(J, {
|
|
1891
1898
|
name: e.user,
|
|
1892
1899
|
size: "sm"
|
|
1893
1900
|
})
|
|
@@ -2233,7 +2240,7 @@ function Vt({ priority: e, id: t, statusColor: n = "var(--accent-yellow)", title
|
|
|
2233
2240
|
function R(e) {
|
|
2234
2241
|
D && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), T());
|
|
2235
2242
|
}
|
|
2236
|
-
let V = x || w || b, H = C || (y ? void 0 : { background: "var(--accent-blue)" }), U = g || (h === "warning" ? f : S), ee = v || (y || b || V ? /* @__PURE__ */ z(
|
|
2243
|
+
let V = x || w || b, H = C || (y ? void 0 : { background: "var(--accent-blue)" }), U = g || (h === "warning" ? f : S), ee = v || (y || b || V ? /* @__PURE__ */ z(J, {
|
|
2237
2244
|
imageUrl: y,
|
|
2238
2245
|
initials: b,
|
|
2239
2246
|
name: V,
|
|
@@ -2426,7 +2433,7 @@ function Wt({ notifications: e = [], onMarkRead: t, onMarkAllRead: n, className:
|
|
|
2426
2433
|
className: `notification-item ${e.read ? "" : "unread"}`,
|
|
2427
2434
|
onClick: () => !e.read && t?.(e.id),
|
|
2428
2435
|
children: [
|
|
2429
|
-
/* @__PURE__ */ z(
|
|
2436
|
+
/* @__PURE__ */ z(J, {
|
|
2430
2437
|
name: e.user,
|
|
2431
2438
|
size: "sm"
|
|
2432
2439
|
}),
|
|
@@ -2978,4 +2985,4 @@ function Cn() {
|
|
|
2978
2985
|
});
|
|
2979
2986
|
}
|
|
2980
2987
|
//#endregion
|
|
2981
|
-
export {
|
|
2988
|
+
export { ze as Accordion, Re as AccordionItem, Mt as ActivityFeed, Pe as AppLoader, J as Avatar, X as Badge, yn as BellIcon, Ge as Button, bn as CalendarIcon, qe as Card, Ze as CardContent, Xe as CardDescription, Qe as CardFooter, Je as CardHeader, Ye as CardTitle, _n as CheckIcon, en as ChevronDown, tn as ChevronUp, gn as CloseIcon, Nt as CommandBar, vn as CopyIcon, Tt as DEFAULT_ICON_BY_VALUE, Et as DEFAULT_VIEW_MODE_OPTIONS, Pt as DataTable, et as Dialog, it as DialogBody, rt as DialogDescription, at as DialogFooter, tt as DialogHeader, nt as DialogTitle, st as DropdownMenu, lt as DropdownMenuCheckboxItem, ct as DropdownMenuItem, ut as DropdownMenuLabel, dt as DropdownMenuSeparator, $t as EditIcon, je as FCCAppShell, Me as FCCBrandLogo, we as FCCBreadcrumbs, ce as FCCDesignProvider, Le as FCCDetailsPanel, K as FCCHeaderStatus, Ie as FCCLoader, Ee as FCCMainWindow, ue as FCCSidePanel, ye as FCCSidePanelAction, fe as FCCSidePanelBody, _e as FCCSidePanelCard, be as FCCSidePanelChatWrap, ve as FCCSidePanelContact, xe as FCCSidePanelConversation, he as FCCSidePanelGroupLabel, de as FCCSidePanelHeader, ge as FCCSidePanelItem, Se as FCCSidePanelMessage, me as FCCSidePanelSearch, pe as FCCSidePanelTabs, Ae as FCCSidebar, Ne as FCCThemeToggle, q as FCCWorkspaceHeader, Ft as FilterBar, xn as FilterIcon, Gt as InboxIcon, Yt as InitiativesIcon, ot as Input, Kt as IssuesIcon, Ht as KPICard, It as KanbanBoard, Rt as KanbanCard, Lt as KanbanColumn, Cn as LabelIcon, pn as LinkIcon, Zt as MoreIcon, Wt as NotificationsPanel, un as PriorityHigh, fn as PriorityLow, dn as PriorityMedium, ln as PriorityUrgent, Xt as ProjectsIcon, Jt as PulseIcon, qt as ReviewsIcon, Qt as SearchIcon, ft as SearchableSelect, hn as SettingsIcon, pt as Sheet, mt as SheetFooter, Fe as Spinner, nn as StarIcon, Ut as StatCard, sn as StatusBacklog, cn as StatusCancelled, an as StatusDone, rn as StatusInProgress, _t as StatusMetric, on as StatusTodo, vt as Switch, zt as TableBoard, Bt as TableBoardGroup, Vt as TableBoardRow, yt as Tabs, St as TabsContent, bt as TabsList, xt as TabsTrigger, Ct as Textarea, se as ThemeProvider, te as ToastProvider, wt as Tooltip, mn as TrashIcon, Sn as UserIcon, kt as ViewModeToggle, jt as WorkspaceTabs, W as useTheme, ne as useToast };
|