@krosoft/react 0.0.233 → 0.0.235
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/LanguageSelector-C7E51rCQ.js +47 -0
- package/dist/{ThemeSelector-DKhn02V2.js → ThemeSelector-CLi4_epH.js} +20 -19
- package/dist/{Topbar-CPWjqOBF.js → Topbar-Clby5_uj.js} +159 -157
- package/dist/components/core/index.js +3 -3
- package/dist/components/core/language/LanguageSelector.d.ts +3 -1
- package/dist/components/core/language/LanguageSelector.d.ts.map +1 -1
- package/dist/components/core/language/index.js +1 -1
- package/dist/components/core/navbar/NotificationsBell.d.ts +9 -1
- package/dist/components/core/navbar/NotificationsBell.d.ts.map +1 -1
- package/dist/components/core/navbar/index.js +1 -1
- package/dist/components/core/theme/ThemeSelector.d.ts +3 -1
- package/dist/components/core/theme/ThemeSelector.d.ts.map +1 -1
- package/dist/components/core/theme/index.js +1 -1
- package/dist/components/index.js +3 -3
- package/package.json +1 -1
- package/dist/LanguageSelector-D5Ly1SFC.js +0 -46
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import "date-fns/locale";
|
|
3
|
+
import "react-i18next";
|
|
4
|
+
import { u as h } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { b as g, T as f, c as v, B as p, a as b } from "./tooltip-DVeqVwqV.js";
|
|
6
|
+
import { S as T, h as N, i as x, a as S, c as C } from "./select-BpjFWqAY.js";
|
|
7
|
+
import { u as I } from "./useLanguage-C9jI2nwn.js";
|
|
8
|
+
import { LanguagesIcon as i } from "lucide-react";
|
|
9
|
+
function P({ languageOptions: o, variant: n = "select", id: t }) {
|
|
10
|
+
const { t: r } = h(), { currentLanguageOption: a, nextLanguageOption: c, changeLanguage: m, cycleLanguage: d } = I(o);
|
|
11
|
+
if (n === "mini") {
|
|
12
|
+
const l = (a == null ? void 0 : a.icon) ?? i;
|
|
13
|
+
return /* @__PURE__ */ e(g, { children: /* @__PURE__ */ s(f, { children: [
|
|
14
|
+
/* @__PURE__ */ e(v, { asChild: !0, children: /* @__PURE__ */ s(
|
|
15
|
+
p,
|
|
16
|
+
{
|
|
17
|
+
id: t,
|
|
18
|
+
variant: "ghost",
|
|
19
|
+
size: "icon",
|
|
20
|
+
onClick: d,
|
|
21
|
+
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ e(l, { className: "size-4" }),
|
|
24
|
+
/* @__PURE__ */ e("span", { className: "sr-only", children: r("language.current", { language: (a == null ? void 0 : a.label) ?? "" }) })
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
) }),
|
|
28
|
+
/* @__PURE__ */ e(b, { side: "bottom", align: "center", children: r("language.switchTo", { language: (c == null ? void 0 : c.label) ?? "" }) })
|
|
29
|
+
] }) });
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
32
|
+
/* @__PURE__ */ s(T, { value: a == null ? void 0 : a.value, onValueChange: m, children: [
|
|
33
|
+
/* @__PURE__ */ e(N, { id: t, className: "w-full", children: /* @__PURE__ */ e(x, { placeholder: r("select.language") }) }),
|
|
34
|
+
/* @__PURE__ */ e(S, { children: o.map((l) => {
|
|
35
|
+
const u = l.icon ?? i;
|
|
36
|
+
return /* @__PURE__ */ e(C, { value: l.value, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
37
|
+
/* @__PURE__ */ e(u, { className: "size-4" }),
|
|
38
|
+
l.label
|
|
39
|
+
] }) }, l.value);
|
|
40
|
+
}) })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: r("language.description") })
|
|
43
|
+
] });
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
P as L
|
|
47
|
+
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u
|
|
5
|
-
import { b as
|
|
6
|
-
import { S as
|
|
7
|
-
import { u as
|
|
8
|
-
function
|
|
9
|
-
const { t:
|
|
10
|
-
if (
|
|
4
|
+
import { u } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import { b as g, T as f, c as v, B as b, a as p } from "./tooltip-DVeqVwqV.js";
|
|
6
|
+
import { S as N, h as T, i as x, a as C, c as S } from "./select-BpjFWqAY.js";
|
|
7
|
+
import { u as y } from "./useTheme-DS6ZjdzM.js";
|
|
8
|
+
function w({ themeOptions: c, variant: o = "select", id: t }) {
|
|
9
|
+
const { t: i } = u(), { theme: n, handleThemeChange: m, currentThemeOption: e, nextThemeOption: r, cycleTheme: d } = y(c);
|
|
10
|
+
if (o === "mini") {
|
|
11
11
|
const s = e == null ? void 0 : e.icon;
|
|
12
|
-
return /* @__PURE__ */ a(
|
|
13
|
-
/* @__PURE__ */ a(
|
|
14
|
-
|
|
12
|
+
return /* @__PURE__ */ a(g, { children: /* @__PURE__ */ l(f, { children: [
|
|
13
|
+
/* @__PURE__ */ a(v, { asChild: !0, children: /* @__PURE__ */ l(
|
|
14
|
+
b,
|
|
15
15
|
{
|
|
16
|
+
id: t,
|
|
16
17
|
variant: "ghost",
|
|
17
18
|
size: "icon",
|
|
18
|
-
onClick:
|
|
19
|
+
onClick: d,
|
|
19
20
|
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
20
21
|
children: [
|
|
21
22
|
s && /* @__PURE__ */ a(s, { className: "size-4" }),
|
|
@@ -26,19 +27,19 @@ function k({ themeOptions: c, variant: t = "select" }) {
|
|
|
26
27
|
]
|
|
27
28
|
}
|
|
28
29
|
) }),
|
|
29
|
-
/* @__PURE__ */ l(
|
|
30
|
+
/* @__PURE__ */ l(p, { side: "bottom", align: "center", children: [
|
|
30
31
|
"Passer en ",
|
|
31
32
|
r == null ? void 0 : r.label
|
|
32
33
|
] })
|
|
33
34
|
] }) });
|
|
34
35
|
}
|
|
35
36
|
return /* @__PURE__ */ l("div", { className: "space-y-2", children: [
|
|
36
|
-
/* @__PURE__ */ l(
|
|
37
|
-
/* @__PURE__ */ a(
|
|
38
|
-
/* @__PURE__ */ a(
|
|
39
|
-
const
|
|
40
|
-
return /* @__PURE__ */ a(
|
|
41
|
-
/* @__PURE__ */ a(
|
|
37
|
+
/* @__PURE__ */ l(N, { value: n, onValueChange: m, children: [
|
|
38
|
+
/* @__PURE__ */ a(T, { id: t, className: "w-full", children: /* @__PURE__ */ a(x, { placeholder: i("select.theme") }) }),
|
|
39
|
+
/* @__PURE__ */ a(C, { children: c.map((s) => {
|
|
40
|
+
const h = s.icon;
|
|
41
|
+
return /* @__PURE__ */ a(S, { value: s.value, children: /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: [
|
|
42
|
+
/* @__PURE__ */ a(h, { className: "size-4" }),
|
|
42
43
|
s.label
|
|
43
44
|
] }) }, s.value);
|
|
44
45
|
}) })
|
|
@@ -47,5 +48,5 @@ function k({ themeOptions: c, variant: t = "select" }) {
|
|
|
47
48
|
] });
|
|
48
49
|
}
|
|
49
50
|
export {
|
|
50
|
-
|
|
51
|
+
w as T
|
|
51
52
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
1
|
+
import { jsxs as s, Fragment as G, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "date-fns/locale";
|
|
3
3
|
import "react-i18next";
|
|
4
|
-
import { u as
|
|
5
|
-
import * as
|
|
6
|
-
import { SearchIcon as
|
|
4
|
+
import { u as B } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
+
import * as $ from "react";
|
|
6
|
+
import { SearchIcon as _, LoaderCircleIcon as M, BellIcon as Q, Trash2Icon as R, ChevronDownIcon as q, MenuIcon as H } from "lucide-react";
|
|
7
7
|
import { c as l } from "./tailwind.helper-B6yFEsav.js";
|
|
8
|
-
import { B as E, T as
|
|
9
|
-
import { j as
|
|
8
|
+
import { B as E, T as P, c as V, a as X, b as J } from "./tooltip-DVeqVwqV.js";
|
|
9
|
+
import { j as Y, m as Z, o as I, k as ee, l as te, n as re, P as ae, s as se, r as ie, S as ne, I as le, u as oe, w as ce, E as de, x as me } from "./sheet-XYI-ezvY.js";
|
|
10
10
|
import "./sidebar.context-D5nywlmP.js";
|
|
11
|
-
import { u as
|
|
11
|
+
import { u as F } from "./useSidebar-BJuALHqQ.js";
|
|
12
12
|
import "next-themes";
|
|
13
|
-
import { S as
|
|
14
|
-
const
|
|
13
|
+
import { S as W } from "./skeleton-BX4RcsiK.js";
|
|
14
|
+
const Se = ({
|
|
15
15
|
groups: i,
|
|
16
16
|
search: d,
|
|
17
17
|
onSearch: h,
|
|
@@ -23,179 +23,181 @@ const ke = ({
|
|
|
23
23
|
triggerLabel: g,
|
|
24
24
|
shortcut: N = !0,
|
|
25
25
|
shortcutLabel: w = "Ctrl+K",
|
|
26
|
-
placeholder:
|
|
27
|
-
emptyLabel:
|
|
26
|
+
placeholder: S,
|
|
27
|
+
emptyLabel: j,
|
|
28
28
|
loadingLabel: k,
|
|
29
|
-
title:
|
|
30
|
-
description:
|
|
31
|
-
hint:
|
|
32
|
-
className:
|
|
29
|
+
title: T,
|
|
30
|
+
description: A,
|
|
31
|
+
hint: K,
|
|
32
|
+
className: u
|
|
33
33
|
}) => {
|
|
34
|
-
const { t:
|
|
35
|
-
(
|
|
36
|
-
|
|
34
|
+
const { t: b } = B(), [D, t] = $.useState(!1), z = c !== void 0, v = z ? c : D, a = $.useCallback(
|
|
35
|
+
(n) => {
|
|
36
|
+
z || t(n), m == null || m(n);
|
|
37
37
|
},
|
|
38
|
-
[
|
|
38
|
+
[z, m]
|
|
39
39
|
);
|
|
40
|
-
|
|
40
|
+
$.useEffect(() => {
|
|
41
41
|
if (!N) return;
|
|
42
|
-
const
|
|
43
|
-
|
|
42
|
+
const n = (p) => {
|
|
43
|
+
p.key.toLowerCase() !== "k" || !(p.metaKey || p.ctrlKey) || (p.preventDefault(), a(!v));
|
|
44
44
|
};
|
|
45
|
-
return window.addEventListener("keydown",
|
|
46
|
-
window.removeEventListener("keydown",
|
|
45
|
+
return window.addEventListener("keydown", n), () => {
|
|
46
|
+
window.removeEventListener("keydown", n);
|
|
47
47
|
};
|
|
48
|
-
}, [N,
|
|
49
|
-
const
|
|
50
|
-
a(!1), h(""), o(
|
|
51
|
-
},
|
|
52
|
-
return /* @__PURE__ */ s(
|
|
48
|
+
}, [N, v, a]);
|
|
49
|
+
const y = (n) => {
|
|
50
|
+
a(!1), h(""), o(n);
|
|
51
|
+
}, C = i.some((n) => n.items.length > 0);
|
|
52
|
+
return /* @__PURE__ */ s(G, { children: [
|
|
53
53
|
x && /* @__PURE__ */ e(
|
|
54
54
|
E,
|
|
55
55
|
{
|
|
56
56
|
variant: "ghost",
|
|
57
57
|
size: "icon",
|
|
58
|
-
"aria-label": g ??
|
|
59
|
-
title: N ? `${g ??
|
|
58
|
+
"aria-label": g ?? b("search.trigger"),
|
|
59
|
+
title: N ? `${g ?? b("search.trigger")} (${w})` : g ?? b("search.trigger"),
|
|
60
60
|
className: "rounded-full",
|
|
61
61
|
onClick: () => {
|
|
62
62
|
a(!0);
|
|
63
63
|
},
|
|
64
|
-
children: /* @__PURE__ */ e(
|
|
64
|
+
children: /* @__PURE__ */ e(_, { className: "size-4" })
|
|
65
65
|
}
|
|
66
66
|
),
|
|
67
67
|
/* @__PURE__ */ s(
|
|
68
|
-
|
|
68
|
+
Y,
|
|
69
69
|
{
|
|
70
|
-
open:
|
|
70
|
+
open: v,
|
|
71
71
|
onOpenChange: a,
|
|
72
|
-
title:
|
|
73
|
-
description:
|
|
72
|
+
title: T ?? b("search.globalTitle"),
|
|
73
|
+
description: A ?? b("search.globalDescription"),
|
|
74
74
|
shouldFilter: !1,
|
|
75
|
-
className:
|
|
75
|
+
className: u,
|
|
76
76
|
children: [
|
|
77
|
-
/* @__PURE__ */ e(
|
|
78
|
-
/* @__PURE__ */ s(
|
|
77
|
+
/* @__PURE__ */ e(Z, { value: d, onValueChange: h, placeholder: S ?? b("search.placeholder") }),
|
|
78
|
+
/* @__PURE__ */ s(I, { children: [
|
|
79
79
|
r && /* @__PURE__ */ s("div", { className: "flex items-center justify-center gap-2 py-6 text-sm text-muted-foreground", children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
k ??
|
|
80
|
+
/* @__PURE__ */ e(M, { className: "size-4 animate-spin" }),
|
|
81
|
+
k ?? b("search.loading")
|
|
82
82
|
] }),
|
|
83
|
-
!
|
|
83
|
+
!C && !r && /* @__PURE__ */ e(ee, { children: j ?? b("states.noResultDot") }),
|
|
84
84
|
i.map(
|
|
85
|
-
(
|
|
86
|
-
const
|
|
85
|
+
(n) => n.items.length === 0 ? null : /* @__PURE__ */ e(te, { heading: n.heading, children: n.items.map((p) => {
|
|
86
|
+
const O = p.icon;
|
|
87
87
|
return /* @__PURE__ */ s(
|
|
88
|
-
|
|
88
|
+
re,
|
|
89
89
|
{
|
|
90
|
-
value:
|
|
90
|
+
value: p.key,
|
|
91
91
|
className: "gap-3 px-2 py-2",
|
|
92
92
|
onSelect: () => {
|
|
93
|
-
|
|
93
|
+
y(p);
|
|
94
94
|
},
|
|
95
95
|
children: [
|
|
96
|
-
|
|
96
|
+
O && /* @__PURE__ */ e("span", { className: l("flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-muted-foreground", p.iconClassName), children: /* @__PURE__ */ e(O, { className: "size-4" }) }),
|
|
97
97
|
/* @__PURE__ */ s("span", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
98
|
-
/* @__PURE__ */ e("span", { className: "truncate font-medium", children:
|
|
99
|
-
|
|
98
|
+
/* @__PURE__ */ e("span", { className: "truncate font-medium", children: p.label }),
|
|
99
|
+
p.description !== void 0 && p.description !== "" && /* @__PURE__ */ e("span", { className: "truncate text-xs text-muted-foreground", children: p.description })
|
|
100
100
|
] })
|
|
101
101
|
]
|
|
102
102
|
},
|
|
103
|
-
|
|
103
|
+
p.key
|
|
104
104
|
);
|
|
105
|
-
}) },
|
|
105
|
+
}) }, n.heading)
|
|
106
106
|
)
|
|
107
107
|
] }),
|
|
108
|
-
|
|
108
|
+
K !== void 0 && C && !r && /* @__PURE__ */ e("div", { className: "border-t border-border p-2 text-center text-xs text-muted-foreground", children: K })
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
)
|
|
112
112
|
] });
|
|
113
|
-
},
|
|
113
|
+
}, fe = 9, je = ({
|
|
114
114
|
items: i,
|
|
115
115
|
onSelect: d,
|
|
116
116
|
onMarkAllAsRead: h,
|
|
117
117
|
onRemove: o,
|
|
118
118
|
loading: r = !1,
|
|
119
119
|
unreadCount: c,
|
|
120
|
-
maxBadgeCount: m =
|
|
120
|
+
maxBadgeCount: m = fe,
|
|
121
121
|
open: x,
|
|
122
122
|
onOpenChange: g,
|
|
123
123
|
triggerLabel: N,
|
|
124
124
|
title: w,
|
|
125
|
-
emptyLabel:
|
|
126
|
-
loadingLabel:
|
|
125
|
+
emptyLabel: S,
|
|
126
|
+
loadingLabel: j,
|
|
127
127
|
markAllAsReadLabel: k,
|
|
128
|
-
removeLabel:
|
|
129
|
-
className:
|
|
130
|
-
contentClassName:
|
|
131
|
-
badgeClassName:
|
|
128
|
+
removeLabel: T,
|
|
129
|
+
className: A,
|
|
130
|
+
contentClassName: K,
|
|
131
|
+
badgeClassName: u,
|
|
132
|
+
itemClassName: b,
|
|
133
|
+
unreadItemClassName: D
|
|
132
134
|
}) => {
|
|
133
|
-
const { t
|
|
134
|
-
|
|
135
|
-
},
|
|
136
|
-
|
|
135
|
+
const { t } = B(), [z, v] = $.useState(!1), a = x !== void 0, y = a ? x : z, C = (f) => {
|
|
136
|
+
a || v(f), g == null || g(f);
|
|
137
|
+
}, n = c ?? i.filter((f) => !f.read).length, p = N ?? t("notifications.trigger"), O = (f) => {
|
|
138
|
+
C(!1), d == null || d(f);
|
|
137
139
|
};
|
|
138
|
-
return /* @__PURE__ */ s(
|
|
139
|
-
/* @__PURE__ */ e(
|
|
140
|
+
return /* @__PURE__ */ s(ae, { open: y, onOpenChange: C, children: [
|
|
141
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ s(
|
|
140
142
|
E,
|
|
141
143
|
{
|
|
142
144
|
type: "button",
|
|
143
145
|
variant: "ghost",
|
|
144
146
|
size: "icon",
|
|
145
|
-
className: l("relative rounded-full",
|
|
146
|
-
"aria-label":
|
|
147
|
-
title:
|
|
147
|
+
className: l("relative rounded-full", A),
|
|
148
|
+
"aria-label": n > 0 ? `${p} (${String(n)})` : p,
|
|
149
|
+
title: p,
|
|
148
150
|
children: [
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
-
|
|
151
|
+
/* @__PURE__ */ e(Q, { className: "size-4" }),
|
|
152
|
+
n > 0 && /* @__PURE__ */ e(
|
|
151
153
|
"span",
|
|
152
154
|
{
|
|
153
155
|
className: l(
|
|
154
156
|
"absolute right-1 top-1 flex size-4 items-center justify-center rounded-full bg-primary text-[10px] font-bold leading-none text-primary-foreground",
|
|
155
|
-
|
|
157
|
+
u
|
|
156
158
|
),
|
|
157
|
-
children:
|
|
159
|
+
children: n > m ? `${String(m)}+` : n
|
|
158
160
|
}
|
|
159
161
|
)
|
|
160
162
|
]
|
|
161
163
|
}
|
|
162
164
|
) }),
|
|
163
|
-
/* @__PURE__ */ s(
|
|
165
|
+
/* @__PURE__ */ s(ie, { align: "end", className: l("w-80 p-0", K), children: [
|
|
164
166
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-2 border-b px-3 py-2", children: [
|
|
165
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: w ??
|
|
166
|
-
h &&
|
|
167
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: w ?? t("notifications.title") }),
|
|
168
|
+
h && n > 0 && /* @__PURE__ */ e(E, { type: "button", variant: "ghost", size: "sm", className: "h-7 text-xs", onClick: h, children: k ?? t("notifications.markAllAsRead") })
|
|
167
169
|
] }),
|
|
168
|
-
r && /* @__PURE__ */ e("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children:
|
|
169
|
-
!r && i.length === 0 && /* @__PURE__ */ e("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children:
|
|
170
|
-
!r && i.length > 0 && /* @__PURE__ */ e(
|
|
171
|
-
const
|
|
172
|
-
return /* @__PURE__ */ s("li", { className: l("flex items-start gap-2 px-3 py-2", !
|
|
170
|
+
r && /* @__PURE__ */ e("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: j ?? t("states.loading") }),
|
|
171
|
+
!r && i.length === 0 && /* @__PURE__ */ e("p", { className: "px-3 py-6 text-center text-sm text-muted-foreground", children: S ?? t("notifications.empty") }),
|
|
172
|
+
!r && i.length > 0 && /* @__PURE__ */ e(ne, { className: "max-h-96", children: /* @__PURE__ */ e("ul", { className: "divide-y", children: i.map((f) => {
|
|
173
|
+
const U = f.icon;
|
|
174
|
+
return /* @__PURE__ */ s("li", { className: l("flex items-start gap-2 px-3 py-2", !f.read && (D ?? "bg-accent/40"), b), children: [
|
|
173
175
|
/* @__PURE__ */ s(
|
|
174
176
|
"button",
|
|
175
177
|
{
|
|
176
178
|
type: "button",
|
|
177
179
|
className: "flex min-w-0 flex-1 items-start gap-2 rounded-sm text-left focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
178
180
|
onClick: () => {
|
|
179
|
-
f
|
|
181
|
+
O(f);
|
|
180
182
|
},
|
|
181
183
|
children: [
|
|
182
|
-
|
|
184
|
+
U && /* @__PURE__ */ e(
|
|
183
185
|
"span",
|
|
184
186
|
{
|
|
185
187
|
className: l(
|
|
186
188
|
"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",
|
|
187
|
-
|
|
189
|
+
f.iconClassName
|
|
188
190
|
),
|
|
189
|
-
children: /* @__PURE__ */ e(
|
|
191
|
+
children: /* @__PURE__ */ e(U, { className: "size-3.5" })
|
|
190
192
|
}
|
|
191
193
|
),
|
|
192
194
|
/* @__PURE__ */ s("span", { className: "min-w-0 flex-1 space-y-0.5", children: [
|
|
193
195
|
/* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
194
|
-
!
|
|
195
|
-
/* @__PURE__ */ e("span", { className: l("truncate text-sm", !
|
|
196
|
+
!f.read && /* @__PURE__ */ e("span", { className: "size-1.5 shrink-0 rounded-full bg-primary", "aria-hidden": !0 }),
|
|
197
|
+
/* @__PURE__ */ e("span", { className: l("truncate text-sm", !f.read && "font-medium"), children: f.title })
|
|
196
198
|
] }),
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
f.description && /* @__PURE__ */ e("span", { className: "block text-xs text-muted-foreground", children: f.description }),
|
|
200
|
+
f.date && /* @__PURE__ */ e("span", { className: "block text-xs text-muted-foreground/60", children: f.date })
|
|
199
201
|
] })
|
|
200
202
|
]
|
|
201
203
|
}
|
|
@@ -208,20 +210,20 @@ const ke = ({
|
|
|
208
210
|
size: "icon",
|
|
209
211
|
className: "size-7 shrink-0 text-muted-foreground hover:text-destructive",
|
|
210
212
|
onClick: () => {
|
|
211
|
-
o(
|
|
213
|
+
o(f);
|
|
212
214
|
},
|
|
213
|
-
"aria-label":
|
|
214
|
-
title:
|
|
215
|
-
children: /* @__PURE__ */ e(
|
|
215
|
+
"aria-label": T ?? t("notifications.remove"),
|
|
216
|
+
title: T ?? t("notifications.remove"),
|
|
217
|
+
children: /* @__PURE__ */ e(R, { className: "size-3.5" })
|
|
216
218
|
}
|
|
217
219
|
)
|
|
218
|
-
] },
|
|
220
|
+
] }, f.key);
|
|
219
221
|
}) }) })
|
|
220
222
|
] })
|
|
221
223
|
] });
|
|
222
|
-
},
|
|
224
|
+
}, L = (i, d, h) => d === i ? !0 : i === "/" || !d.startsWith(`${i}/`) ? !1 : !h.some(
|
|
223
225
|
(o) => o !== i && o.startsWith(`${i}/`) && (d === o || d.startsWith(`${o}/`))
|
|
224
|
-
),
|
|
226
|
+
), pe = ({
|
|
225
227
|
path: i,
|
|
226
228
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
227
229
|
icon: d,
|
|
@@ -233,34 +235,34 @@ const ke = ({
|
|
|
233
235
|
dense: x = !1,
|
|
234
236
|
onItemClick: g
|
|
235
237
|
}) => {
|
|
236
|
-
const N = (r == null ? void 0 : r.map((
|
|
238
|
+
const N = (r == null ? void 0 : r.map((t) => t.path)) ?? [], [w, S] = $.useState((r == null ? void 0 : r.some((t) => L(t.path, c, N))) ?? !1), j = i ? c === i || i !== "/" && c.startsWith(`${i}/`) : !1, k = r == null ? void 0 : r.some((t) => L(t.path, c, N)), D = /* @__PURE__ */ s(
|
|
237
239
|
"a",
|
|
238
240
|
{
|
|
239
241
|
href: i ?? "#",
|
|
240
|
-
onClick: (
|
|
241
|
-
|
|
242
|
+
onClick: (t) => {
|
|
243
|
+
t.ctrlKey || t.metaKey || t.button === 1 || (t.preventDefault(), r && r.length > 0 ? m || S(!w) : i && g(i));
|
|
242
244
|
},
|
|
243
245
|
className: l(
|
|
244
246
|
"flex items-center cursor-pointer transition-all duration-200 group rounded-control",
|
|
245
247
|
x ? "gap-2.5 mb-0.5" : "gap-3 mb-1",
|
|
246
248
|
m ? x ? "justify-center p-2 h-9 w-9 mx-auto" : "justify-center p-3 h-12 w-12 mx-auto" : x ? "px-3 py-1.5 h-9" : "px-4 py-3 h-12",
|
|
247
|
-
|
|
249
|
+
j || !m && k ? x ? "bg-sidebar-primary text-sidebar-primary-foreground" : "bg-sidebar-primary text-sidebar-primary-foreground shadow-lg" : "hover:bg-sidebar-accent text-sidebar-foreground hover:text-sidebar-accent-foreground"
|
|
248
250
|
),
|
|
249
251
|
children: [
|
|
250
252
|
/* @__PURE__ */ e("div", { className: l("flex-shrink-0 transition-transform group-hover:scale-110", m ? "flex items-center justify-center" : ""), children: /* @__PURE__ */ e(d, { className: "size-4" }) }),
|
|
251
|
-
!m && /* @__PURE__ */ s(
|
|
253
|
+
!m && /* @__PURE__ */ s(G, { children: [
|
|
252
254
|
/* @__PURE__ */ e("span", { className: l("flex-grow transition-opacity duration-150 font-medium", x ? "text-sm" : ""), children: h }),
|
|
253
255
|
o !== void 0 && /* @__PURE__ */ e("span", { className: "bg-red-500 text-white text-xs rounded-full py-1 min-w-[20px] text-center px-2 font-semibold", children: o }),
|
|
254
|
-
r && r.length > 0 && /* @__PURE__ */ e(
|
|
256
|
+
r && r.length > 0 && /* @__PURE__ */ e(q, { className: l("size-4 transition-transform duration-200", w ? "rotate-180" : "") })
|
|
255
257
|
] })
|
|
256
258
|
]
|
|
257
259
|
}
|
|
258
260
|
);
|
|
259
|
-
return /* @__PURE__ */ s(
|
|
260
|
-
m ? /* @__PURE__ */ s(
|
|
261
|
-
/* @__PURE__ */ e(
|
|
261
|
+
return /* @__PURE__ */ s(G, { children: [
|
|
262
|
+
m ? /* @__PURE__ */ s(P, { children: [
|
|
263
|
+
/* @__PURE__ */ e(V, { asChild: !0, children: D }),
|
|
262
264
|
/* @__PURE__ */ e(
|
|
263
|
-
|
|
265
|
+
X,
|
|
264
266
|
{
|
|
265
267
|
side: "right",
|
|
266
268
|
sideOffset: 6,
|
|
@@ -275,7 +277,7 @@ const ke = ({
|
|
|
275
277
|
] }) })
|
|
276
278
|
}
|
|
277
279
|
)
|
|
278
|
-
] }) :
|
|
280
|
+
] }) : D,
|
|
279
281
|
!m && r && r.length > 0 && w && /* @__PURE__ */ e(
|
|
280
282
|
"div",
|
|
281
283
|
{
|
|
@@ -283,53 +285,53 @@ const ke = ({
|
|
|
283
285
|
"flex flex-col ml-4 pl-4 border-l-2 border-sidebar-border/50 animate-in slide-in-from-top-2 fade-in duration-200",
|
|
284
286
|
x ? "gap-0.5 mb-0.5" : "gap-1 mb-2"
|
|
285
287
|
),
|
|
286
|
-
children: r.map((
|
|
287
|
-
const
|
|
288
|
+
children: r.map((t, z) => {
|
|
289
|
+
const v = L(t.path, c, N);
|
|
288
290
|
return /* @__PURE__ */ s(
|
|
289
291
|
"a",
|
|
290
292
|
{
|
|
291
|
-
href:
|
|
293
|
+
href: t.path,
|
|
292
294
|
onClick: (a) => {
|
|
293
|
-
a.ctrlKey || a.metaKey || a.button === 1 || (a.preventDefault(), g(
|
|
295
|
+
a.ctrlKey || a.metaKey || a.button === 1 || (a.preventDefault(), g(t.path));
|
|
294
296
|
},
|
|
295
297
|
className: l(
|
|
296
298
|
"flex items-center justify-between rounded-control text-sm transition-all duration-200",
|
|
297
299
|
x ? "px-3 py-1" : "px-4 py-2",
|
|
298
|
-
|
|
300
|
+
v ? "bg-sidebar-accent/50 text-sidebar-primary font-semibold" : "text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-foreground"
|
|
299
301
|
),
|
|
300
302
|
children: [
|
|
301
|
-
/* @__PURE__ */ e("span", { children:
|
|
302
|
-
|
|
303
|
+
/* @__PURE__ */ e("span", { children: t.label }),
|
|
304
|
+
t.badge !== void 0 && /* @__PURE__ */ e("span", { className: "bg-sidebar-primary/20 text-sidebar-primary text-[10px] rounded-full py-0.5 px-2 font-semibold", children: t.badge })
|
|
303
305
|
]
|
|
304
306
|
},
|
|
305
|
-
|
|
307
|
+
z
|
|
306
308
|
);
|
|
307
309
|
})
|
|
308
310
|
}
|
|
309
311
|
)
|
|
310
312
|
] });
|
|
311
|
-
},
|
|
312
|
-
const { t: x } =
|
|
313
|
-
h(a), k &&
|
|
314
|
-
},
|
|
313
|
+
}, Te = ({ groups: i, currentPath: d, onItemClick: h, slots: o, search: r, dense: c = !1, loading: m = !1 }) => {
|
|
314
|
+
const { t: x } = B(), { enabled: g = !1, placeholder: N } = r ?? {}, { header: w, footer: S } = o ?? {}, { collapsed: j, isMobile: k, setCollapsed: T } = F(), [A, K] = $.useState(""), u = k ? !1 : j, b = !j, D = (a) => {
|
|
315
|
+
h(a), k && T(!0);
|
|
316
|
+
}, t = A.trim().toLowerCase(), z = t === "" ? i : i.map((a) => ({
|
|
315
317
|
...a,
|
|
316
318
|
items: a.items.filter(
|
|
317
|
-
(
|
|
318
|
-
var
|
|
319
|
-
return
|
|
319
|
+
(y) => {
|
|
320
|
+
var C;
|
|
321
|
+
return y.label.toLowerCase().includes(t) || (((C = y.subItems) == null ? void 0 : C.some((n) => n.label.toLowerCase().includes(t))) ?? !1);
|
|
320
322
|
}
|
|
321
323
|
)
|
|
322
|
-
})).filter((a) => a.items.length > 0),
|
|
324
|
+
})).filter((a) => a.items.length > 0), v = /* @__PURE__ */ s("div", { className: "flex flex-col h-full bg-sidebar text-sidebar-foreground", children: [
|
|
323
325
|
w,
|
|
324
|
-
g && !
|
|
325
|
-
/* @__PURE__ */ e(
|
|
326
|
+
g && !u && /* @__PURE__ */ e("div", { className: l("px-4", c ? "pt-2" : "pt-4"), children: /* @__PURE__ */ s("div", { className: "relative", children: [
|
|
327
|
+
/* @__PURE__ */ e(_, { className: "absolute left-3 top-1/2 size-4 -translate-y-1/2 text-sidebar-muted" }),
|
|
326
328
|
/* @__PURE__ */ e(
|
|
327
|
-
|
|
329
|
+
le,
|
|
328
330
|
{
|
|
329
331
|
type: "search",
|
|
330
|
-
value:
|
|
332
|
+
value: A,
|
|
331
333
|
onChange: (a) => {
|
|
332
|
-
|
|
334
|
+
K(a.target.value);
|
|
333
335
|
},
|
|
334
336
|
placeholder: N ?? x("search.placeholder"),
|
|
335
337
|
className: l(
|
|
@@ -339,51 +341,51 @@ const ke = ({
|
|
|
339
341
|
}
|
|
340
342
|
)
|
|
341
343
|
] }) }),
|
|
342
|
-
/* @__PURE__ */ e("div", { className: l("flex-1 overflow-y-auto scrollbar-modern",
|
|
343
|
-
/* @__PURE__ */ e(
|
|
344
|
-
!
|
|
345
|
-
] },
|
|
346
|
-
!
|
|
347
|
-
/* @__PURE__ */ e("nav", { className: l("flex flex-col", c ? "gap-0.5" : "gap-1"), children: a.items.map((
|
|
348
|
-
] },
|
|
349
|
-
|
|
344
|
+
/* @__PURE__ */ e("div", { className: l("flex-1 overflow-y-auto scrollbar-modern", u ? "px-0" : "px-2", c ? "py-2" : "py-4"), children: m ? Array.from({ length: 5 }).map((a, y) => /* @__PURE__ */ s("div", { className: l("flex items-center gap-3", c ? "mb-1 h-9" : "mb-2 h-12", u ? "justify-center px-3" : "px-4"), children: [
|
|
345
|
+
/* @__PURE__ */ e(W, { className: "size-5 flex-shrink-0 rounded-control" }),
|
|
346
|
+
!u && /* @__PURE__ */ e(W, { className: "h-4 flex-1" })
|
|
347
|
+
] }, y)) : z.map((a, y) => /* @__PURE__ */ s("div", { className: c ? "mb-3" : "mb-6", children: [
|
|
348
|
+
!u && a.title !== void 0 && a.title !== "" && /* @__PURE__ */ e("h3", { className: l("px-4 text-xs uppercase tracking-wider font-semibold text-sidebar-muted", c ? "mb-1" : "mb-2"), children: a.title }),
|
|
349
|
+
/* @__PURE__ */ e("nav", { className: l("flex flex-col", c ? "gap-0.5" : "gap-1"), children: a.items.map((C, n) => /* @__PURE__ */ e(pe, { ...C, currentPath: d, collapsed: u, dense: c, onItemClick: D }, n)) })
|
|
350
|
+
] }, y)) }),
|
|
351
|
+
S && /* @__PURE__ */ e("div", { className: l("border-t border-sidebar-border", c ? "p-2" : "p-4", u ? "flex justify-center" : ""), children: S })
|
|
350
352
|
] });
|
|
351
353
|
return k ? /* @__PURE__ */ e(
|
|
352
|
-
|
|
354
|
+
oe,
|
|
353
355
|
{
|
|
354
|
-
open:
|
|
356
|
+
open: b,
|
|
355
357
|
onOpenChange: (a) => {
|
|
356
|
-
|
|
358
|
+
T(!a);
|
|
357
359
|
},
|
|
358
|
-
children: /* @__PURE__ */ s(
|
|
359
|
-
/* @__PURE__ */ e(
|
|
360
|
-
/* @__PURE__ */ e(
|
|
361
|
-
|
|
360
|
+
children: /* @__PURE__ */ s(ce, { side: "left", className: "w-[16rem] p-0 bg-sidebar border-r border-sidebar-border overflow-hidden [&>button]:text-sidebar-foreground", children: [
|
|
361
|
+
/* @__PURE__ */ e(de, { className: "sr-only", children: x("sidebar.menu") }),
|
|
362
|
+
/* @__PURE__ */ e(me, { className: "sr-only", children: x("sidebar.description") }),
|
|
363
|
+
v
|
|
362
364
|
] })
|
|
363
365
|
}
|
|
364
|
-
) : /* @__PURE__ */ e(
|
|
366
|
+
) : /* @__PURE__ */ e(J, { delayDuration: 0, children: /* @__PURE__ */ e(
|
|
365
367
|
"aside",
|
|
366
368
|
{
|
|
367
369
|
className: l(
|
|
368
370
|
"flex flex-col bg-sidebar h-screen border-r border-sidebar-border transition-all duration-300",
|
|
369
|
-
|
|
371
|
+
u ? "w-[--navbar-width-icon]" : "w-[--navbar-width]",
|
|
370
372
|
"flex"
|
|
371
373
|
),
|
|
372
374
|
style: {
|
|
373
375
|
"--navbar-width": "16rem",
|
|
374
376
|
"--navbar-width-icon": "4rem"
|
|
375
377
|
},
|
|
376
|
-
children:
|
|
378
|
+
children: v
|
|
377
379
|
}
|
|
378
380
|
) });
|
|
379
|
-
},
|
|
381
|
+
}, De = ({
|
|
380
382
|
name: i = "appname",
|
|
381
383
|
subName: d = "appsubname",
|
|
382
384
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
383
385
|
icon: h,
|
|
384
386
|
dense: o = !1
|
|
385
387
|
}) => {
|
|
386
|
-
const { collapsed: r, isMobile: c } =
|
|
388
|
+
const { collapsed: r, isMobile: c } = F(), m = c ? !1 : r;
|
|
387
389
|
return /* @__PURE__ */ s("div", { className: l("flex items-center flex-shrink-0 gap-3 px-4", o ? "h-14" : "h-16 md:h-20", m ? "justify-center" : ""), children: [
|
|
388
390
|
h !== void 0 && /* @__PURE__ */ e("div", { className: "flex-shrink-0 text-sidebar-foreground", children: /* @__PURE__ */ e(h, { className: o ? "size-5" : "size-6" }) }),
|
|
389
391
|
!m && /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
@@ -391,7 +393,7 @@ const ke = ({
|
|
|
391
393
|
/* @__PURE__ */ e("span", { className: l("text-sidebar-muted font-medium", o ? "text-[11px]" : "text-xs"), children: d })
|
|
392
394
|
] })
|
|
393
395
|
] });
|
|
394
|
-
},
|
|
396
|
+
}, Ae = ({ collapsed: i, isMobile: d, onToggleSidebar: h, actionsNode: o, userMenuNode: r }) => /* @__PURE__ */ s(
|
|
395
397
|
"header",
|
|
396
398
|
{
|
|
397
399
|
className: l(
|
|
@@ -409,7 +411,7 @@ const ke = ({
|
|
|
409
411
|
size: "icon",
|
|
410
412
|
onClick: h,
|
|
411
413
|
className: "text-topbar-foreground hover:bg-topbar-accent hover:text-topbar-accent-foreground",
|
|
412
|
-
children: /* @__PURE__ */ e(
|
|
414
|
+
children: /* @__PURE__ */ e(H, { className: "size-4" })
|
|
413
415
|
}
|
|
414
416
|
) }),
|
|
415
417
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-2 md:gap-4 flex-shrink-0", children: [
|
|
@@ -420,10 +422,10 @@ const ke = ({
|
|
|
420
422
|
}
|
|
421
423
|
);
|
|
422
424
|
export {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
425
|
+
Se as G,
|
|
426
|
+
je as N,
|
|
427
|
+
Te as S,
|
|
428
|
+
Ae as T,
|
|
429
|
+
De as a,
|
|
430
|
+
pe as b
|
|
429
431
|
};
|
|
@@ -9,18 +9,18 @@ import { G as V } from "../../GenericForm-CydibLHU.js";
|
|
|
9
9
|
import { I as z } from "../../ImageInput-DoOOvvth.js";
|
|
10
10
|
import { D as q, a as w, S as J, b as Q } from "../../SearchInput-DIZ5Yt6L.js";
|
|
11
11
|
import { M as X } from "../../MultiSelect-DbH7LrsD.js";
|
|
12
|
-
import { L as $ } from "../../LanguageSelector-
|
|
12
|
+
import { L as $ } from "../../LanguageSelector-C7E51rCQ.js";
|
|
13
13
|
import { A as ea } from "../../AppActions-BFwztl-1.js";
|
|
14
14
|
import { A as oa, K as sa } from "../../KpiCardsLayout-Ca6otKVw.js";
|
|
15
15
|
import { A as ia } from "../../AppSubTitle-BTN0YAc7.js";
|
|
16
16
|
import { A as pa } from "../../AppTitle-D15YXeMx.js";
|
|
17
|
-
import { G as ma, N as Ca, S as na, a as ba, b as fa, T as Aa } from "../../Topbar-
|
|
17
|
+
import { G as ma, N as Ca, S as na, a as ba, b as fa, T as Aa } from "../../Topbar-Clby5_uj.js";
|
|
18
18
|
import { E as da } from "../../ErrorAlert-B99Xb_Hg.js";
|
|
19
19
|
import { E as Ta } from "../../ErrorState-CkeS_IBT.js";
|
|
20
20
|
import { L as Da } from "../../LoadingState-BN0YaPSs.js";
|
|
21
21
|
import { A as Fa, D as La, S as Pa, T as ua, a as Ea, b as Ha, c as Ia, d as Ka, e as Na, g as Oa, f as Ba, h as Ma } from "../../DataTable-CjrR27Di.js";
|
|
22
22
|
import { A as Ga, a as _a, b as va, c as ya } from "../../AppVerticalTabs-B7XXtAVj.js";
|
|
23
|
-
import { T as Ua } from "../../ThemeSelector-
|
|
23
|
+
import { T as Ua } from "../../ThemeSelector-CLi4_epH.js";
|
|
24
24
|
export {
|
|
25
25
|
Fa as ACTIONS_COLUMN_KEY,
|
|
26
26
|
G as ActiveFilters,
|
|
@@ -3,7 +3,9 @@ import { type LanguageOption } from "../../../hooks/ui/useLanguage";
|
|
|
3
3
|
interface LanguageSelectorProps {
|
|
4
4
|
languageOptions: readonly LanguageOption[];
|
|
5
5
|
variant?: "select" | "mini";
|
|
6
|
+
/** Posé sur le déclencheur, pour qu'un `<Label htmlFor>` de l'application puisse s'y associer. */
|
|
7
|
+
id?: string;
|
|
6
8
|
}
|
|
7
|
-
export declare function LanguageSelector({ languageOptions, variant }: LanguageSelectorProps): React.JSX.Element;
|
|
9
|
+
export declare function LanguageSelector({ languageOptions, variant, id }: LanguageSelectorProps): React.JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=LanguageSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/core/language/LanguageSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG1E,UAAU,qBAAqB;IAC7B,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"LanguageSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/core/language/LanguageSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAe,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG1E,UAAU,qBAAqB;IAC7B,eAAe,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,kGAAkG;IAClG,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,gBAAgB,CAAC,EAAE,eAAe,EAAE,OAAkB,EAAE,EAAE,EAAE,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsDtH"}
|
|
@@ -52,6 +52,14 @@ export interface NotificationsBellProps {
|
|
|
52
52
|
contentClassName?: string;
|
|
53
53
|
/** Classes de la pastille de comptage, pour l'accorder à la charte de l'application. */
|
|
54
54
|
badgeClassName?: string;
|
|
55
|
+
/** Classes ajoutées à chaque entrée de la liste. */
|
|
56
|
+
itemClassName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Classes des entrées non lues. Remplace la mise en avant par défaut (`bg-accent/40`) plutôt
|
|
59
|
+
* que de s'y ajouter : deux fonds concurrents ne se départagent pas, l'ordre des classes
|
|
60
|
+
* Tailwind ne décidant pas du gagnant.
|
|
61
|
+
*/
|
|
62
|
+
unreadItemClassName?: string;
|
|
55
63
|
}
|
|
56
64
|
/**
|
|
57
65
|
* Cloche de notifications : pastille de comptage et panneau listant les messages reçus.
|
|
@@ -60,5 +68,5 @@ export interface NotificationsBellProps {
|
|
|
60
68
|
* les entrées et décide de ce que fait un clic. C'est ce qui lui permet de servir aussi bien un
|
|
61
69
|
* historique stocké en base qu'une liste tenue en mémoire.
|
|
62
70
|
*/
|
|
63
|
-
export declare const NotificationsBell: ({ items, onSelect, onMarkAllAsRead, onRemove, loading, unreadCount, maxBadgeCount, open, onOpenChange, triggerLabel, title, emptyLabel, loadingLabel, markAllAsReadLabel, removeLabel, className, contentClassName, badgeClassName, }: NotificationsBellProps) => React.ReactElement;
|
|
71
|
+
export declare const NotificationsBell: ({ items, onSelect, onMarkAllAsRead, onRemove, loading, unreadCount, maxBadgeCount, open, onOpenChange, triggerLabel, title, emptyLabel, loadingLabel, markAllAsReadLabel, removeLabel, className, contentClassName, badgeClassName, itemClassName, unreadItemClassName, }: NotificationsBellProps) => React.ReactElement;
|
|
64
72
|
//# sourceMappingURL=NotificationsBell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationsBell.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/NotificationsBell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B,gGAAgG;IAChG,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAE5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"NotificationsBell.d.ts","sourceRoot":"","sources":["../../../../src/components/core/navbar/NotificationsBell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,sBAAsB;IACrC,yEAAyE;IACzE,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAE1B,gGAAgG;IAChG,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC5C,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAE5C,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAEvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAID;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,GAAI,2QAqB/B,sBAAsB,KAAG,KAAK,CAAC,YAyHjC,CAAC"}
|
|
@@ -3,7 +3,9 @@ import { type ThemeOption } from "../../../hooks/ui/useTheme";
|
|
|
3
3
|
interface ThemeSelectorProps {
|
|
4
4
|
themeOptions: readonly ThemeOption[];
|
|
5
5
|
variant?: "select" | "mini";
|
|
6
|
+
/** Posé sur le déclencheur, pour qu'un `<Label htmlFor>` de l'application puisse s'y associer. */
|
|
7
|
+
id?: string;
|
|
6
8
|
}
|
|
7
|
-
export declare function ThemeSelector({ themeOptions, variant }: ThemeSelectorProps): React.JSX.Element;
|
|
9
|
+
export declare function ThemeSelector({ themeOptions, variant, id }: ThemeSelectorProps): React.JSX.Element;
|
|
8
10
|
export {};
|
|
9
11
|
//# sourceMappingURL=ThemeSelector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/core/theme/ThemeSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjE,UAAU,kBAAkB;IAC1B,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/core/theme/ThemeSelector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAY,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEjE,UAAU,kBAAkB;IAC1B,YAAY,EAAE,SAAS,WAAW,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IAC5B,kGAAkG;IAClG,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,wBAAgB,aAAa,CAAC,EAAE,YAAY,EAAE,OAAkB,EAAE,EAAE,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqD7G"}
|
package/dist/components/index.js
CHANGED
|
@@ -9,18 +9,18 @@ import { G as as } from "../GenericForm-CydibLHU.js";
|
|
|
9
9
|
import { I as rs } from "../ImageInput-DoOOvvth.js";
|
|
10
10
|
import { D as os, a as ts, S as ns, b as is } from "../SearchInput-DIZ5Yt6L.js";
|
|
11
11
|
import { M as ps } from "../MultiSelect-DbH7LrsD.js";
|
|
12
|
-
import { L as us } from "../LanguageSelector-
|
|
12
|
+
import { L as us } from "../LanguageSelector-C7E51rCQ.js";
|
|
13
13
|
import { A as gs } from "../AppActions-BFwztl-1.js";
|
|
14
14
|
import { A as ds, K as Ss } from "../KpiCardsLayout-Ca6otKVw.js";
|
|
15
15
|
import { A as cs } from "../AppSubTitle-BTN0YAc7.js";
|
|
16
16
|
import { A as Ms } from "../AppTitle-D15YXeMx.js";
|
|
17
|
-
import { G as As, N as hs, S as fs, a as Ps, b as Is, T as ws } from "../Topbar-
|
|
17
|
+
import { G as As, N as hs, S as fs, a as Ps, b as Is, T as ws } from "../Topbar-Clby5_uj.js";
|
|
18
18
|
import { E as Fs } from "../ErrorAlert-B99Xb_Hg.js";
|
|
19
19
|
import { E as Bs } from "../ErrorState-CkeS_IBT.js";
|
|
20
20
|
import { L as ks } from "../LoadingState-BN0YaPSs.js";
|
|
21
21
|
import { A as Ns, D as Rs, S as Os, T as Es, a as ys, b as Vs, c as Ks, d as zs, e as _s, g as js, f as Us, h as qs } from "../DataTable-CjrR27Di.js";
|
|
22
22
|
import { A as Js, a as Qs, b as Ws, c as Xs } from "../AppVerticalTabs-B7XXtAVj.js";
|
|
23
|
-
import { T as $s } from "../ThemeSelector-
|
|
23
|
+
import { T as $s } from "../ThemeSelector-CLi4_epH.js";
|
|
24
24
|
import { A as eo, a as ro, b as so } from "../alert-B9F1N9Qk.js";
|
|
25
25
|
import { A as to, C as no, a as io, b as lo, R as po, c as bo, d as uo, T as Co, e as go } from "../toaster-CyzB1m5z.js";
|
|
26
26
|
import { B as So, T as To, a as co, b as Do, c as Mo, d as xo, e as Ao, f as ho } from "../tooltip-DVeqVwqV.js";
|
package/package.json
CHANGED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
-
import "date-fns/locale";
|
|
3
|
-
import "react-i18next";
|
|
4
|
-
import { u } from "./useKrosoftTranslation-BTp46G94.js";
|
|
5
|
-
import { b as h, T as g, c as f, B as v, a as p } from "./tooltip-DVeqVwqV.js";
|
|
6
|
-
import { S as b, h as T, i as N, a as x, c as S } from "./select-BpjFWqAY.js";
|
|
7
|
-
import { u as C } from "./useLanguage-C9jI2nwn.js";
|
|
8
|
-
import { LanguagesIcon as t } from "lucide-react";
|
|
9
|
-
function K({ languageOptions: o, variant: i = "select" }) {
|
|
10
|
-
const { t: r } = u(), { currentLanguageOption: a, nextLanguageOption: c, changeLanguage: n, cycleLanguage: m } = C(o);
|
|
11
|
-
if (i === "mini") {
|
|
12
|
-
const l = (a == null ? void 0 : a.icon) ?? t;
|
|
13
|
-
return /* @__PURE__ */ e(h, { children: /* @__PURE__ */ s(g, { children: [
|
|
14
|
-
/* @__PURE__ */ e(f, { asChild: !0, children: /* @__PURE__ */ s(
|
|
15
|
-
v,
|
|
16
|
-
{
|
|
17
|
-
variant: "ghost",
|
|
18
|
-
size: "icon",
|
|
19
|
-
onClick: m,
|
|
20
|
-
className: "text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
21
|
-
children: [
|
|
22
|
-
/* @__PURE__ */ e(l, { className: "size-4" }),
|
|
23
|
-
/* @__PURE__ */ e("span", { className: "sr-only", children: r("language.current", { language: (a == null ? void 0 : a.label) ?? "" }) })
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
) }),
|
|
27
|
-
/* @__PURE__ */ e(p, { side: "bottom", align: "center", children: r("language.switchTo", { language: (c == null ? void 0 : c.label) ?? "" }) })
|
|
28
|
-
] }) });
|
|
29
|
-
}
|
|
30
|
-
return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
|
|
31
|
-
/* @__PURE__ */ s(b, { value: a == null ? void 0 : a.value, onValueChange: n, children: [
|
|
32
|
-
/* @__PURE__ */ e(T, { className: "w-full", children: /* @__PURE__ */ e(N, { placeholder: r("select.language") }) }),
|
|
33
|
-
/* @__PURE__ */ e(x, { children: o.map((l) => {
|
|
34
|
-
const d = l.icon ?? t;
|
|
35
|
-
return /* @__PURE__ */ e(S, { value: l.value, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
36
|
-
/* @__PURE__ */ e(d, { className: "size-4" }),
|
|
37
|
-
l.label
|
|
38
|
-
] }) }, l.value);
|
|
39
|
-
}) })
|
|
40
|
-
] }),
|
|
41
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: r("language.description") })
|
|
42
|
-
] });
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
K as L
|
|
46
|
-
};
|