@etic-insa/ui 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/README.md +496 -12
  2. package/dist/components/etic/action.d.ts +33 -0
  3. package/dist/components/etic/action.js +43 -0
  4. package/dist/components/etic/action.js.map +1 -0
  5. package/dist/components/etic/app-shell.d.ts +7 -4
  6. package/dist/components/etic/app-shell.js +119 -81
  7. package/dist/components/etic/app-shell.js.map +1 -1
  8. package/dist/components/etic/auth-image.d.ts +48 -0
  9. package/dist/components/etic/auth-image.js +44 -0
  10. package/dist/components/etic/auth-image.js.map +1 -0
  11. package/dist/components/etic/checkbox-list.d.ts +30 -0
  12. package/dist/components/etic/checkbox-list.js +56 -0
  13. package/dist/components/etic/checkbox-list.js.map +1 -0
  14. package/dist/components/etic/confirm-dialog.d.ts +63 -0
  15. package/dist/components/etic/confirm-dialog.js +84 -0
  16. package/dist/components/etic/confirm-dialog.js.map +1 -0
  17. package/dist/components/etic/copy-button.d.ts +24 -0
  18. package/dist/components/etic/copy-button.js +46 -0
  19. package/dist/components/etic/copy-button.js.map +1 -0
  20. package/dist/components/etic/data-table-bulk-actions.d.ts +29 -0
  21. package/dist/components/etic/data-table-bulk-actions.js +97 -0
  22. package/dist/components/etic/data-table-bulk-actions.js.map +1 -0
  23. package/dist/components/etic/data-table-format.d.ts +12 -0
  24. package/dist/components/etic/data-table-format.js +8 -0
  25. package/dist/components/etic/data-table-format.js.map +1 -0
  26. package/dist/components/etic/data-table-pagination.d.ts +22 -0
  27. package/dist/components/etic/data-table-pagination.js +104 -0
  28. package/dist/components/etic/data-table-pagination.js.map +1 -0
  29. package/dist/components/etic/data-table-toolbar.d.ts +69 -0
  30. package/dist/components/etic/data-table-toolbar.js +127 -0
  31. package/dist/components/etic/data-table-toolbar.js.map +1 -0
  32. package/dist/components/etic/data-table-view-options.d.ts +16 -0
  33. package/dist/components/etic/data-table-view-options.js +151 -0
  34. package/dist/components/etic/data-table-view-options.js.map +1 -0
  35. package/dist/components/etic/data-table.d.ts +263 -0
  36. package/dist/components/etic/data-table.js +403 -0
  37. package/dist/components/etic/data-table.js.map +1 -0
  38. package/dist/components/etic/date-picker.d.ts +32 -0
  39. package/dist/components/etic/date-picker.js +162 -0
  40. package/dist/components/etic/date-picker.js.map +1 -0
  41. package/dist/components/etic/delete-button.d.ts +57 -0
  42. package/dist/components/etic/delete-button.js +38 -0
  43. package/dist/components/etic/delete-button.js.map +1 -0
  44. package/dist/components/etic/detail-list.d.ts +14 -0
  45. package/dist/components/etic/detail-list.js +36 -0
  46. package/dist/components/etic/detail-list.js.map +1 -0
  47. package/dist/components/etic/empty-state.d.ts +20 -0
  48. package/dist/components/etic/empty-state.js +20 -0
  49. package/dist/components/etic/empty-state.js.map +1 -0
  50. package/dist/components/etic/error-banner.d.ts +50 -0
  51. package/dist/components/etic/error-banner.js +89 -0
  52. package/dist/components/etic/error-banner.js.map +1 -0
  53. package/dist/components/etic/error-boundary.d.ts +53 -0
  54. package/dist/components/etic/error-boundary.js +82 -0
  55. package/dist/components/etic/error-boundary.js.map +1 -0
  56. package/dist/components/etic/file-upload.d.ts +52 -0
  57. package/dist/components/etic/file-upload.js +142 -0
  58. package/dist/components/etic/file-upload.js.map +1 -0
  59. package/dist/components/etic/form-dialog.d.ts +45 -0
  60. package/dist/components/etic/form-dialog.js +136 -0
  61. package/dist/components/etic/form-dialog.js.map +1 -0
  62. package/dist/components/etic/form-field-context.d.ts +66 -0
  63. package/dist/components/etic/form-field-context.js +28 -0
  64. package/dist/components/etic/form-field-context.js.map +1 -0
  65. package/dist/components/etic/form-field.d.ts +53 -0
  66. package/dist/components/etic/form-field.js +105 -0
  67. package/dist/components/etic/form-field.js.map +1 -0
  68. package/dist/components/etic/icon-toggle.d.ts +33 -0
  69. package/dist/components/etic/icon-toggle.js +28 -0
  70. package/dist/components/etic/icon-toggle.js.map +1 -0
  71. package/dist/components/etic/loading.d.ts +45 -0
  72. package/dist/components/etic/loading.js +82 -0
  73. package/dist/components/etic/loading.js.map +1 -0
  74. package/dist/components/etic/page-container.d.ts +17 -0
  75. package/dist/components/etic/page-container.js +20 -0
  76. package/dist/components/etic/page-container.js.map +1 -0
  77. package/dist/components/etic/page-header.d.ts +58 -0
  78. package/dist/components/etic/page-header.js +104 -0
  79. package/dist/components/etic/page-header.js.map +1 -0
  80. package/dist/components/etic/phone-input.d.ts +31 -0
  81. package/dist/components/etic/phone-input.js +133 -0
  82. package/dist/components/etic/phone-input.js.map +1 -0
  83. package/dist/components/etic/query-boundary.d.ts +50 -0
  84. package/dist/components/etic/query-boundary.js +25 -0
  85. package/dist/components/etic/query-boundary.js.map +1 -0
  86. package/dist/components/etic/search-select.d.ts +41 -0
  87. package/dist/components/etic/search-select.js +126 -0
  88. package/dist/components/etic/search-select.js.map +1 -0
  89. package/dist/components/etic/section-card.d.ts +12 -0
  90. package/dist/components/etic/section-card.js +23 -0
  91. package/dist/components/etic/section-card.js.map +1 -0
  92. package/dist/components/etic/segmented-control.d.ts +29 -0
  93. package/dist/components/etic/segmented-control.js +44 -0
  94. package/dist/components/etic/segmented-control.js.map +1 -0
  95. package/dist/components/etic/stat-tile.d.ts +18 -0
  96. package/dist/components/etic/stat-tile.js +39 -0
  97. package/dist/components/etic/stat-tile.js.map +1 -0
  98. package/dist/components/etic/status-badge.d.ts +16 -0
  99. package/dist/components/etic/status-badge.js +30 -0
  100. package/dist/components/etic/status-badge.js.map +1 -0
  101. package/dist/components/etic/theme-menu.d.ts +5 -3
  102. package/dist/components/etic/theme-menu.js +38 -32
  103. package/dist/components/etic/theme-menu.js.map +1 -1
  104. package/dist/components/etic/tooltip-button.d.ts +29 -0
  105. package/dist/components/etic/tooltip-button.js +39 -0
  106. package/dist/components/etic/tooltip-button.js.map +1 -0
  107. package/dist/components/etic/use-draft-autosave.d.ts +68 -0
  108. package/dist/components/etic/use-draft-autosave.js +102 -0
  109. package/dist/components/etic/use-draft-autosave.js.map +1 -0
  110. package/dist/components/ui/alert-dialog.js +31 -31
  111. package/dist/components/ui/alert.d.ts +10 -0
  112. package/dist/components/ui/alert.js +47 -0
  113. package/dist/components/ui/alert.js.map +1 -0
  114. package/dist/components/ui/badge.d.ts +7 -0
  115. package/dist/components/ui/badge.js +32 -0
  116. package/dist/components/ui/badge.js.map +1 -0
  117. package/dist/components/ui/breadcrumb.d.ts +10 -0
  118. package/dist/components/ui/breadcrumb.js +73 -0
  119. package/dist/components/ui/breadcrumb.js.map +1 -0
  120. package/dist/components/ui/button-group.d.ts +10 -0
  121. package/dist/components/ui/button-group.js +42 -0
  122. package/dist/components/ui/button-group.js.map +1 -0
  123. package/dist/components/ui/button.d.ts +1 -1
  124. package/dist/components/ui/button.js +8 -8
  125. package/dist/components/ui/button.js.map +1 -1
  126. package/dist/components/ui/calendar.d.ts +10 -0
  127. package/dist/components/ui/calendar.js +96 -0
  128. package/dist/components/ui/calendar.js.map +1 -0
  129. package/dist/components/ui/card.d.ts +11 -0
  130. package/dist/components/ui/card.js +57 -0
  131. package/dist/components/ui/card.js.map +1 -0
  132. package/dist/components/ui/checkbox.d.ts +3 -0
  133. package/dist/components/ui/checkbox.js +20 -0
  134. package/dist/components/ui/checkbox.js.map +1 -0
  135. package/dist/components/ui/collapsible.d.ts +5 -0
  136. package/dist/components/ui/collapsible.js +25 -0
  137. package/dist/components/ui/collapsible.js.map +1 -0
  138. package/dist/components/ui/combobox.d.ts +24 -0
  139. package/dist/components/ui/combobox.js +165 -0
  140. package/dist/components/ui/combobox.js.map +1 -0
  141. package/dist/components/ui/dialog.d.ts +17 -0
  142. package/dist/components/ui/dialog.js +92 -0
  143. package/dist/components/ui/dialog.js.map +1 -0
  144. package/dist/components/ui/dropdown-menu.js +36 -36
  145. package/dist/components/ui/empty.d.ts +11 -0
  146. package/dist/components/ui/empty.js +60 -0
  147. package/dist/components/ui/empty.js.map +1 -0
  148. package/dist/components/ui/field.d.ts +24 -0
  149. package/dist/components/ui/field.js +108 -0
  150. package/dist/components/ui/field.js.map +1 -0
  151. package/dist/components/ui/input-group.d.ts +18 -0
  152. package/dist/components/ui/input-group.js +79 -0
  153. package/dist/components/ui/input-group.js.map +1 -0
  154. package/dist/components/ui/item.d.ts +22 -0
  155. package/dist/components/ui/item.js +122 -0
  156. package/dist/components/ui/item.js.map +1 -0
  157. package/dist/components/ui/kbd.d.ts +3 -0
  158. package/dist/components/ui/kbd.js +20 -0
  159. package/dist/components/ui/kbd.js.map +1 -0
  160. package/dist/components/ui/label.d.ts +3 -0
  161. package/dist/components/ui/label.js +14 -0
  162. package/dist/components/ui/label.js.map +1 -0
  163. package/dist/components/ui/native-select.d.ts +8 -0
  164. package/dist/components/ui/native-select.js +39 -0
  165. package/dist/components/ui/native-select.js.map +1 -0
  166. package/dist/components/ui/pagination.d.ts +17 -0
  167. package/dist/components/ui/pagination.js +81 -0
  168. package/dist/components/ui/pagination.js.map +1 -0
  169. package/dist/components/ui/popover.d.ts +9 -0
  170. package/dist/components/ui/popover.js +55 -0
  171. package/dist/components/ui/popover.js.map +1 -0
  172. package/dist/components/ui/progress.d.ts +7 -0
  173. package/dist/components/ui/progress.js +45 -0
  174. package/dist/components/ui/progress.js.map +1 -0
  175. package/dist/components/ui/radio-group.d.ts +5 -0
  176. package/dist/components/ui/radio-group.js +27 -0
  177. package/dist/components/ui/radio-group.js.map +1 -0
  178. package/dist/components/ui/scroll-area.d.ts +4 -0
  179. package/dist/components/ui/scroll-area.js +36 -0
  180. package/dist/components/ui/scroll-area.js.map +1 -0
  181. package/dist/components/ui/select.d.ts +15 -0
  182. package/dist/components/ui/select.js +99 -0
  183. package/dist/components/ui/select.js.map +1 -0
  184. package/dist/components/ui/sidebar.js +47 -47
  185. package/dist/components/ui/sidebar.js.map +1 -1
  186. package/dist/components/ui/slider.d.ts +3 -0
  187. package/dist/components/ui/slider.js +36 -0
  188. package/dist/components/ui/slider.js.map +1 -0
  189. package/dist/components/ui/spinner.d.ts +2 -0
  190. package/dist/components/ui/spinner.js +16 -0
  191. package/dist/components/ui/spinner.js.map +1 -0
  192. package/dist/components/ui/switch.d.ts +5 -0
  193. package/dist/components/ui/switch.js +20 -0
  194. package/dist/components/ui/switch.js.map +1 -0
  195. package/dist/components/ui/table.d.ts +10 -0
  196. package/dist/components/ui/table.js +67 -0
  197. package/dist/components/ui/table.js.map +1 -0
  198. package/dist/components/ui/tabs.d.ts +10 -0
  199. package/dist/components/ui/tabs.js +46 -0
  200. package/dist/components/ui/tabs.js.map +1 -0
  201. package/dist/components/ui/textarea.d.ts +3 -0
  202. package/dist/components/ui/textarea.js +14 -0
  203. package/dist/components/ui/textarea.js.map +1 -0
  204. package/dist/components/ui/toggle-group.d.ts +11 -0
  205. package/dist/components/ui/toggle-group.js +54 -0
  206. package/dist/components/ui/toggle-group.js.map +1 -0
  207. package/dist/components/ui/toggle.d.ts +8 -0
  208. package/dist/components/ui/toggle.js +36 -0
  209. package/dist/components/ui/toggle.js.map +1 -0
  210. package/dist/index.d.ts +66 -0
  211. package/dist/index.js +76 -13
  212. package/dist/styles.css +39 -4
  213. package/package.json +18 -7
@@ -22,9 +22,9 @@ export type AppShellEntreeCompte = {
22
22
  icone?: LucideIcon;
23
23
  } & ({
24
24
  href: string;
25
- onSelect?: never;
25
+ onChoisir?: never;
26
26
  } | {
27
- onSelect: () => void;
27
+ onChoisir: () => void;
28
28
  href?: never;
29
29
  });
30
30
  export interface AppShellCompte {
@@ -40,7 +40,7 @@ export interface AppShellCompte {
40
40
  /** Entrées du menu du compte, avant « Se déconnecter ». */
41
41
  entrees?: AppShellEntreeCompte[];
42
42
  /** Appelé après confirmation. */
43
- seDeconnecter: () => void;
43
+ onSeDeconnecter: () => void;
44
44
  }
45
45
  export interface AppShellProps {
46
46
  application: {
@@ -53,7 +53,7 @@ export interface AppShellProps {
53
53
  };
54
54
  sections: AppShellSection[];
55
55
  compte?: AppShellCompte;
56
- theme?: Pick<ThemeMenuProps, "valeur" | "changer">;
56
+ theme?: Pick<ThemeMenuProps, "valeur" | "onValeurChange">;
57
57
  lien?: AppShellLienComposant;
58
58
  /** Au-dessus du contenu, sur toute sa largeur (bandeau d'erreur…). */
59
59
  bandeau?: ReactNode;
@@ -65,5 +65,8 @@ export interface AppShellProps {
65
65
  * sous 1 025 px, ouvert par une barre du haut. Le tiroir se referme quand on
66
66
  * suit un de ses liens. Ne connaît ni le routeur ni l'authentification : l'application
67
67
  * fournit les liens, l'état actif, le compte et le thème.
68
+ *
69
+ * Un lien « Aller au contenu », visible au focus, ouvre la tabulation : il
70
+ * saute la navigation et met le focus sur le `<main>`.
68
71
  */
69
72
  export declare function AppShell({ application, sections, compte, theme, lien: Lien, bandeau, children, }: AppShellProps): import("react").JSX.Element;
@@ -4,38 +4,53 @@ import { DropdownMenu as d, DropdownMenuContent as f, DropdownMenuGroup as p, Dr
4
4
  import { Sidebar as _, SidebarContent as v, SidebarFooter as y, SidebarGroup as b, SidebarGroupContent as x, SidebarGroupLabel as S, SidebarHeader as C, SidebarInset as w, SidebarMenu as T, SidebarMenuButton as E, SidebarMenuItem as D, SidebarProvider as O, SidebarRail as k, SidebarTrigger as A, useSidebar as j } from "../ui/sidebar.js";
5
5
  import { TooltipProvider as M } from "../ui/tooltip.js";
6
6
  import { ThemeMenu as N } from "./theme-menu.js";
7
- import { cn as P } from "cn";
8
- import { useState as F } from "react";
9
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
10
- import { ChevronsUpDownIcon as z, LogOutIcon as B } from "lucide-react";
7
+ import { TooltipButton as P } from "./tooltip-button.js";
8
+ import { cn as F } from "cn";
9
+ import { useId as I, useState as L } from "react";
10
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
11
+ import { ChevronsUpDownIcon as V, LogOutIcon as H, PanelLeftIcon as U } from "lucide-react";
11
12
  // src/components/etic/app-shell.tsx
12
- function V({ application: e, sections: t, compte: n, theme: r, lien: i = "a", bandeau: a, children: o }) {
13
- return /* @__PURE__ */ L(M, { children: /* @__PURE__ */ R(O, {
14
- defaultOpen: !H(),
15
- children: [/* @__PURE__ */ R(W, { children: [
16
- /* @__PURE__ */ L(C, { children: /* @__PURE__ */ L(K, {
17
- application: e,
18
- Lien: i
19
- }) }),
20
- /* @__PURE__ */ L(v, { children: /* @__PURE__ */ L(q, {
13
+ function W({ application: e, sections: t, compte: n, theme: r, lien: i = "a", bandeau: a, children: o }) {
14
+ let s = I();
15
+ return /* @__PURE__ */ B(M, { children: [/* @__PURE__ */ z("a", {
16
+ href: `#${s}`,
17
+ "data-slot": "app-shell-skip-link",
18
+ onClick: (e) => {
19
+ e.preventDefault(), document.getElementById(s)?.focus();
20
+ },
21
+ className: "sr-only rounded-md bg-background px-3 py-2 text-sm font-medium shadow-md ring-3 ring-ring/50 outline-none focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50",
22
+ children: "Aller au contenu"
23
+ }), /* @__PURE__ */ B(O, {
24
+ defaultOpen: !G(),
25
+ children: [/* @__PURE__ */ B(J, { children: [
26
+ /* @__PURE__ */ B(C, {
27
+ className: "flex-row items-center group-data-[collapsible=icon]:flex-col",
28
+ children: [/* @__PURE__ */ z(X, {
29
+ application: e,
30
+ Lien: i
31
+ }), /* @__PURE__ */ z(q, {})]
32
+ }),
33
+ /* @__PURE__ */ z(v, { children: /* @__PURE__ */ z(Z, {
21
34
  sections: t,
22
35
  Lien: i
23
36
  }) }),
24
- n || r ? /* @__PURE__ */ R(y, {
37
+ n || r ? /* @__PURE__ */ B(y, {
25
38
  className: "flex-row items-center gap-2 group-data-[collapsible=icon]:flex-col",
26
- children: [n ? /* @__PURE__ */ L(J, {
39
+ children: [n ? /* @__PURE__ */ z(Q, {
27
40
  compte: n,
28
41
  Lien: i
29
- }) : null, r ? /* @__PURE__ */ L(N, {
42
+ }) : null, r ? /* @__PURE__ */ z(N, {
30
43
  ...r,
31
44
  side: "top",
32
45
  className: "size-12 shrink-0 bg-sidebar group-data-[collapsible=icon]:size-8"
33
46
  }) : null]
34
47
  }) : null
35
- ] }), /* @__PURE__ */ R(w, {
36
- className: "min-w-0",
48
+ ] }), /* @__PURE__ */ B(w, {
49
+ id: s,
50
+ tabIndex: -1,
51
+ className: "min-w-0 outline-none",
37
52
  children: [
38
- /* @__PURE__ */ L(Y, {
53
+ /* @__PURE__ */ z($, {
39
54
  application: e,
40
55
  Lien: i
41
56
  }),
@@ -43,138 +58,161 @@ function V({ application: e, sections: t, compte: n, theme: r, lien: i = "a", ba
43
58
  o
44
59
  ]
45
60
  })]
46
- }) });
61
+ })] });
47
62
  }
48
- function H() {
63
+ function G() {
49
64
  return typeof document < "u" && /(?:^|;\s*)sidebar_state=false(?:;|$)/.test(document.cookie);
50
65
  }
51
- var U = "data-ferme-tiroir";
52
- function W({ children: e }) {
66
+ var K = "data-ferme-tiroir";
67
+ function q() {
68
+ let { isMobile: e, open: t, toggleSidebar: n } = j();
69
+ if (e) return null;
70
+ let r = t ? "Replier le menu" : "Déplier le menu";
71
+ return /* @__PURE__ */ z(P, {
72
+ variant: "ghost",
73
+ size: "icon-sm",
74
+ "aria-label": r,
75
+ infobulle: `${r} (Ctrl+B)`,
76
+ "aria-keyshortcuts": "Control+B Meta+B",
77
+ "data-slot": "app-shell-collapse",
78
+ className: "shrink-0",
79
+ onClick: n,
80
+ children: /* @__PURE__ */ z(U, {})
81
+ });
82
+ }
83
+ function J({ children: e }) {
53
84
  let { isMobile: t, setOpenMobile: n } = j();
54
- return /* @__PURE__ */ R(_, {
85
+ return /* @__PURE__ */ B(_, {
55
86
  collapsible: "icon",
56
- children: [/* @__PURE__ */ L("div", {
87
+ children: [/* @__PURE__ */ z("div", {
57
88
  className: "contents",
58
89
  onClick: (e) => {
59
- !t || e.ctrlKey || e.metaKey || e.shiftKey || e.target.closest(`a[href], [${U}]`) && n(!1);
90
+ !t || e.ctrlKey || e.metaKey || e.shiftKey || e.target.closest(`a[href], [${K}]`) && n(!1);
60
91
  },
61
92
  children: e
62
- }), /* @__PURE__ */ L(k, {})]
93
+ }), /* @__PURE__ */ z(k, {})]
63
94
  });
64
95
  }
65
- function G({ application: e, className: t }) {
66
- return e.logo ? /* @__PURE__ */ L("span", {
67
- className: P("flex shrink-0 items-center justify-center [&_img]:size-full [&_svg]:size-full", t),
96
+ function Y({ application: e, className: t }) {
97
+ return e.logo ? /* @__PURE__ */ z("span", {
98
+ className: F("flex shrink-0 items-center justify-center [&_img]:size-full [&_svg]:size-full", t),
68
99
  children: e.logo
69
100
  }) : null;
70
101
  }
71
- function K({ application: e, Lien: t }) {
72
- return /* @__PURE__ */ L(T, { children: /* @__PURE__ */ L(D, { children: /* @__PURE__ */ R(E, {
73
- size: "lg",
74
- render: /* @__PURE__ */ L(t, { href: e.href ?? "/" }),
75
- children: [/* @__PURE__ */ L(G, {
76
- application: e,
77
- className: "size-7"
78
- }), /* @__PURE__ */ R("span", {
79
- className: "grid flex-1 text-left leading-tight",
80
- children: [/* @__PURE__ */ L("span", {
81
- className: "truncate font-semibold",
82
- children: e.nom
83
- }), e.sousTitre ? /* @__PURE__ */ L("span", {
84
- className: "truncate text-xs text-muted-foreground",
85
- children: e.sousTitre
86
- }) : null]
87
- })]
88
- }) }) });
102
+ function X({ application: e, Lien: t }) {
103
+ return /* @__PURE__ */ z(T, {
104
+ className: "min-w-0 flex-1",
105
+ children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ B(E, {
106
+ size: "lg",
107
+ render: /* @__PURE__ */ z(t, { href: e.href ?? "/" }),
108
+ children: [/* @__PURE__ */ z(Y, {
109
+ application: e,
110
+ className: "size-7"
111
+ }), /* @__PURE__ */ B("span", {
112
+ className: "grid flex-1 text-left leading-tight",
113
+ children: [/* @__PURE__ */ z("span", {
114
+ className: "truncate font-semibold",
115
+ children: e.nom
116
+ }), e.sousTitre ? /* @__PURE__ */ z("span", {
117
+ className: "truncate text-xs text-muted-foreground",
118
+ children: e.sousTitre
119
+ }) : null]
120
+ })]
121
+ }) })
122
+ });
89
123
  }
90
- function q({ sections: e, Lien: t }) {
91
- return /* @__PURE__ */ L("nav", {
124
+ function Z({ sections: e, Lien: t }) {
125
+ return /* @__PURE__ */ z("nav", {
92
126
  "aria-label": "Navigation principale",
93
- children: e.map((e, n) => /* @__PURE__ */ R(b, { children: [e.titre ? /* @__PURE__ */ L(S, { children: e.titre }) : null, /* @__PURE__ */ L(x, { children: /* @__PURE__ */ L(T, { children: e.liens.map(({ libelle: e, href: n, icone: r, actif: i }, a) => /* @__PURE__ */ L(D, { children: /* @__PURE__ */ R(E, {
127
+ children: e.map((e, n) => /* @__PURE__ */ B(b, { children: [e.titre ? /* @__PURE__ */ z(S, { children: e.titre }) : null, /* @__PURE__ */ z(x, { children: /* @__PURE__ */ z(T, { children: e.liens.map(({ libelle: e, href: n, icone: r, actif: i }, a) => /* @__PURE__ */ z(D, { children: /* @__PURE__ */ B(E, {
94
128
  isActive: i,
95
129
  tooltip: e,
96
- render: /* @__PURE__ */ L(t, {
130
+ render: /* @__PURE__ */ z(t, {
97
131
  href: n,
98
132
  "aria-current": i ? "page" : void 0
99
133
  }),
100
- children: [r ? /* @__PURE__ */ L(r, {}) : null, /* @__PURE__ */ L("span", { children: e })]
134
+ children: [r ? /* @__PURE__ */ z(r, {}) : null, /* @__PURE__ */ z("span", {
135
+ title: e,
136
+ children: e
137
+ })]
101
138
  }) }, a)) }) })] }, n))
102
139
  });
103
140
  }
104
- function J({ compte: _, Lien: v }) {
105
- let [y, b] = F(!1);
106
- return /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(T, {
141
+ function Q({ compte: _, Lien: v }) {
142
+ let [y, b] = L(!1);
143
+ return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(T, {
107
144
  className: "min-w-0 flex-1",
108
- children: /* @__PURE__ */ L(D, { children: /* @__PURE__ */ R(d, { children: [/* @__PURE__ */ R(g, {
109
- render: /* @__PURE__ */ L(E, {
145
+ children: /* @__PURE__ */ z(D, { children: /* @__PURE__ */ B(d, { children: [/* @__PURE__ */ B(g, {
146
+ render: /* @__PURE__ */ z(E, {
110
147
  size: "lg",
111
148
  isActive: _.actif,
112
149
  "aria-label": `${_.nom}, menu du compte`,
113
150
  className: "data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground"
114
151
  }),
115
152
  children: [
116
- /* @__PURE__ */ R(c, { children: [_.photo ? /* @__PURE__ */ L(u, {
153
+ /* @__PURE__ */ B(c, { children: [_.photo ? /* @__PURE__ */ z(u, {
117
154
  src: _.photo,
118
155
  alt: ""
119
- }) : null, /* @__PURE__ */ L(l, { children: _.initiales })] }),
120
- /* @__PURE__ */ R("span", {
156
+ }) : null, /* @__PURE__ */ z(l, { children: _.initiales })] }),
157
+ /* @__PURE__ */ B("span", {
121
158
  className: "grid flex-1 text-left leading-tight",
122
- children: [/* @__PURE__ */ L("span", {
159
+ children: [/* @__PURE__ */ z("span", {
123
160
  className: "truncate font-medium",
124
161
  children: _.nom
125
- }), _.detail ? /* @__PURE__ */ L("span", {
162
+ }), _.detail ? /* @__PURE__ */ z("span", {
126
163
  className: "truncate text-xs text-muted-foreground",
127
164
  children: _.detail
128
165
  }) : null]
129
166
  }),
130
- /* @__PURE__ */ L(z, { className: "ml-auto" })
167
+ /* @__PURE__ */ z(V, { className: "ml-auto" })
131
168
  ]
132
- }), /* @__PURE__ */ R(f, {
169
+ }), /* @__PURE__ */ B(f, {
133
170
  side: "top",
134
171
  align: "start",
135
172
  className: "min-w-56",
136
- children: [_.entrees?.length ? /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(p, { children: _.entrees.map(({ libelle: e, icone: t, href: n, onSelect: r }, i) => /* @__PURE__ */ R(m, {
137
- render: n ? /* @__PURE__ */ L(v, { href: n }) : void 0,
173
+ children: [_.entrees?.length ? /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(p, { children: _.entrees.map(({ libelle: e, icone: t, href: n, onChoisir: r }, i) => /* @__PURE__ */ B(m, {
174
+ render: n ? /* @__PURE__ */ z(v, { href: n }) : void 0,
138
175
  onClick: r,
139
- [U]: !0,
140
- children: [t ? /* @__PURE__ */ L(t, {}) : null, e]
141
- }, i)) }), /* @__PURE__ */ L(h, {})] }) : null, /* @__PURE__ */ R(m, {
176
+ [K]: !0,
177
+ children: [t ? /* @__PURE__ */ z(t, {}) : null, e]
178
+ }, i)) }), /* @__PURE__ */ z(h, {})] }) : null, /* @__PURE__ */ B(m, {
142
179
  onClick: () => b(!0),
143
- children: [/* @__PURE__ */ L(B, {}), "Se déconnecter"]
180
+ children: [/* @__PURE__ */ z(H, {}), "Se déconnecter"]
144
181
  })]
145
182
  })] }) })
146
- }), /* @__PURE__ */ L(e, {
183
+ }), /* @__PURE__ */ z(e, {
147
184
  open: y,
148
185
  onOpenChange: b,
149
- children: /* @__PURE__ */ R(r, { children: [/* @__PURE__ */ R(o, { children: [/* @__PURE__ */ L(s, { children: "Se déconnecter" }), /* @__PURE__ */ L(i, { children: "Voulez-vous vraiment vous déconnecter ?" })] }), /* @__PURE__ */ R(a, { children: [/* @__PURE__ */ L(n, { children: "Annuler" }), /* @__PURE__ */ L(t, {
186
+ children: /* @__PURE__ */ B(r, { children: [/* @__PURE__ */ B(o, { children: [/* @__PURE__ */ z(s, { children: "Se déconnecter" }), /* @__PURE__ */ z(i, { children: "Voulez-vous vraiment vous déconnecter ?" })] }), /* @__PURE__ */ B(a, { children: [/* @__PURE__ */ z(n, { children: "Annuler" }), /* @__PURE__ */ z(t, {
150
187
  onClick: () => {
151
- b(!1), _.seDeconnecter();
188
+ b(!1), _.onSeDeconnecter();
152
189
  },
153
190
  children: "Se déconnecter"
154
191
  })] })] })
155
192
  })] });
156
193
  }
157
- function Y({ application: e, Lien: t }) {
194
+ function $({ application: e, Lien: t }) {
158
195
  let { isMobile: n, openMobile: r } = j();
159
- return n ? /* @__PURE__ */ R("header", {
196
+ return n ? /* @__PURE__ */ B("header", {
197
+ "data-slot": "app-shell-mobile-bar",
160
198
  className: "sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b bg-background px-2",
161
- children: [/* @__PURE__ */ L(A, {
199
+ children: [/* @__PURE__ */ z(A, {
162
200
  "aria-label": "Ouvrir le menu",
163
201
  "aria-expanded": r,
164
202
  className: "size-9"
165
- }), /* @__PURE__ */ R(t, {
203
+ }), /* @__PURE__ */ B(t, {
166
204
  href: e.href ?? "/",
167
205
  className: "flex min-w-0 items-center gap-2 rounded-md px-1 font-semibold outline-none focus-visible:ring-2 focus-visible:ring-ring",
168
- children: [/* @__PURE__ */ L(G, {
206
+ children: [/* @__PURE__ */ z(Y, {
169
207
  application: e,
170
208
  className: "size-6"
171
- }), /* @__PURE__ */ L("span", {
209
+ }), /* @__PURE__ */ z("span", {
172
210
  className: "truncate",
173
211
  children: e.nom
174
212
  })]
175
213
  })]
176
214
  }) : null;
177
215
  }
178
- export { V as AppShell };
216
+ export { W as AppShell };
179
217
 
180
218
  //# sourceMappingURL=app-shell.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-shell.js","names":["_Fragment","AppShell","Lien","TooltipProvider","SidebarProvider","colonneRepliee","Colonne","SidebarHeader","Marque","SidebarContent","Navigation","compte","theme","SidebarFooter","MenuCompte","ThemeMenu","SidebarInset","BarreMobile","bandeau","children","FERME_TIROIR","useSidebar","Sidebar","isMobile","event","setOpenMobile","SidebarRail","Logo","application","cn","className","SidebarMenu","SidebarMenuItem","SidebarMenuButton","sections","SidebarGroup","section","SidebarGroupLabel","SidebarGroupContent","Icone","actif","libelle","i","index","confirmer","setConfirmer","useState","Fragment","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","ChevronsUpDownIcon","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","href","onSelect","DropdownMenuSeparator","LogOutIcon","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","SidebarTrigger","openMobile"],"sources":["../../../src/components/etic/app-shell.tsx"],"sourcesContent":["import {\n useState,\n type ComponentProps,\n type ComponentType,\n type ReactNode,\n} from \"react\"\nimport { cn } from \"cn\"\nimport { ChevronsUpDownIcon, LogOutIcon, type LucideIcon } from \"lucide-react\"\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"@etic-ui/components/ui/alert-dialog\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@etic-ui/components/ui/avatar\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@etic-ui/components/ui/dropdown-menu\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarRail,\n SidebarTrigger,\n useSidebar,\n} from \"@etic-ui/components/ui/sidebar\"\nimport { TooltipProvider } from \"@etic-ui/components/ui/tooltip\"\nimport {\n ThemeMenu,\n type ThemeMenuProps,\n} from \"@etic-ui/components/etic/theme-menu\"\n\n/** Lien du routeur de l'application (react-router, TanStack Router…), qui\n * reçoit `href` comme un `<a>`. Par défaut, un `<a>` : rechargement complet. */\nexport type AppShellLienComposant = ComponentType<ComponentProps<\"a\">> | \"a\"\n\nexport interface AppShellLien {\n libelle: string\n href: string\n icone?: LucideIcon\n /** Page à l'écran. Calculé par l'application, seule à savoir qu'une fiche\n * appartient à telle rubrique. */\n actif?: boolean\n}\n\nexport interface AppShellSection {\n titre?: string\n liens: AppShellLien[]\n}\n\n/** Entrée du menu du compte : un lien, ou une action. */\nexport type AppShellEntreeCompte = {\n libelle: string\n icone?: LucideIcon\n} & (\n { href: string; onSelect?: never } | { onSelect: () => void; href?: never }\n)\n\nexport interface AppShellCompte {\n /** « Prénom Nom », ou le rôle d'un compte fonctionnel. */\n nom: string\n /** Seconde ligne, l'adresse par exemple. */\n detail?: string\n initiales: string\n /** Photo ; les initiales s'affichent tant qu'elle manque ou charge. */\n photo?: string | null\n /** La fiche du compte est la page à l'écran. */\n actif?: boolean\n /** Entrées du menu du compte, avant « Se déconnecter ». */\n entrees?: AppShellEntreeCompte[]\n /** Appelé après confirmation. */\n seDeconnecter: () => void\n}\n\nexport interface AppShellProps {\n application: {\n nom: string\n sousTitre?: string\n /** Image ou icône, 28 px de côté environ. */\n logo?: ReactNode\n /** Lien de la marque ; « / » par défaut. */\n href?: string\n }\n sections: AppShellSection[]\n compte?: AppShellCompte\n theme?: Pick<ThemeMenuProps, \"valeur\" | \"changer\">\n lien?: AppShellLienComposant\n /** Au-dessus du contenu, sur toute sa largeur (bandeau d'erreur…). */\n bandeau?: ReactNode\n children: ReactNode\n}\n\n/**\n * Coquille commune des applications ETIC : la barre latérale de shadcn\n * (navigation par rubriques, menu du compte, thème), qui devient un tiroir\n * sous 1 025 px, ouvert par une barre du haut. Le tiroir se referme quand on\n * suit un de ses liens. Ne connaît ni le routeur ni l'authentification : l'application\n * fournit les liens, l'état actif, le compte et le thème.\n */\nexport function AppShell({\n application,\n sections,\n compte,\n theme,\n lien: Lien = \"a\",\n bandeau,\n children,\n}: AppShellProps) {\n return (\n <TooltipProvider>\n <SidebarProvider defaultOpen={!colonneRepliee()}>\n <Colonne>\n <SidebarHeader>\n <Marque application={application} Lien={Lien} />\n </SidebarHeader>\n <SidebarContent>\n <Navigation sections={sections} Lien={Lien} />\n </SidebarContent>\n {compte || theme ? (\n <SidebarFooter className=\"flex-row items-center gap-2 group-data-[collapsible=icon]:flex-col\">\n {compte ? <MenuCompte compte={compte} Lien={Lien} /> : null}\n {theme ? (\n <ThemeMenu\n {...theme}\n side=\"top\"\n className=\"size-12 shrink-0 bg-sidebar group-data-[collapsible=icon]:size-8\"\n />\n ) : null}\n </SidebarFooter>\n ) : null}\n </Colonne>\n <SidebarInset className=\"min-w-0\">\n <BarreMobile application={application} Lien={Lien} />\n {bandeau}\n {children}\n </SidebarInset>\n </SidebarProvider>\n </TooltipProvider>\n )\n}\n\n/** Colonne repliée lors de la dernière visite : shadcn écrit le cookie\n * `sidebar_state` à chaque repli, sans le relire. */\nfunction colonneRepliee() {\n return (\n typeof document !== \"undefined\" &&\n /(?:^|;\\s*)sidebar_state=false(?:;|$)/.test(document.cookie)\n )\n}\n\n/** Attribut des éléments, autres que les liens, qui referment le tiroir. */\nconst FERME_TIROIR = \"data-ferme-tiroir\"\n\n/**\n * La barre latérale. Sur ordinateur, elle se replie en colonne d'icônes\n * (rail, ou Ctrl+B), comme dans shadcn. Sur mobile, le tiroir se referme dès\n * qu'on suit un de ses liens dans la page, ou une entrée marquée\n * `data-ferme-tiroir` : un seul écouteur, qui reçoit aussi les clics des\n * menus ouverts depuis le tiroir (React fait remonter les évènements des\n * portails dans l'arbre des composants). Un clic qui ouvre un nouvel onglet\n * (Ctrl, Cmd, Maj) le laisse ouvert.\n */\nfunction Colonne({ children }: { children: ReactNode }) {\n const { isMobile, setOpenMobile } = useSidebar()\n return (\n <Sidebar collapsible=\"icon\">\n <div\n className=\"contents\"\n onClick={(event) => {\n if (!isMobile || event.ctrlKey || event.metaKey || event.shiftKey) {\n return\n }\n const cible = event.target as Element\n if (cible.closest(`a[href], [${FERME_TIROIR}]`)) setOpenMobile(false)\n }}\n >\n {children}\n </div>\n <SidebarRail />\n </Sidebar>\n )\n}\n\nfunction Logo({\n application,\n className,\n}: Pick<AppShellProps, \"application\"> & { className: string }) {\n return application.logo ? (\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center [&_img]:size-full [&_svg]:size-full\",\n className\n )}\n >\n {application.logo}\n </span>\n ) : null\n}\n\nfunction Marque({\n application,\n Lien,\n}: Pick<AppShellProps, \"application\"> & { Lien: AppShellLienComposant }) {\n return (\n <SidebarMenu>\n <SidebarMenuItem>\n <SidebarMenuButton\n size=\"lg\"\n render={<Lien href={application.href ?? \"/\"} />}\n >\n <Logo application={application} className=\"size-7\" />\n <span className=\"grid flex-1 text-left leading-tight\">\n <span className=\"truncate font-semibold\">{application.nom}</span>\n {application.sousTitre ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {application.sousTitre}\n </span>\n ) : null}\n </span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n )\n}\n\nfunction Navigation({\n sections,\n Lien,\n}: Pick<AppShellProps, \"sections\"> & { Lien: AppShellLienComposant }) {\n return (\n <nav aria-label=\"Navigation principale\">\n {sections.map((section, index) => (\n <SidebarGroup key={index}>\n {section.titre ? (\n <SidebarGroupLabel>{section.titre}</SidebarGroupLabel>\n ) : null}\n <SidebarGroupContent>\n <SidebarMenu>\n {section.liens.map(\n ({ libelle, href, icone: Icone, actif }, i) => (\n <SidebarMenuItem key={i}>\n <SidebarMenuButton\n isActive={actif}\n tooltip={libelle}\n render={\n <Lien\n href={href}\n aria-current={actif ? \"page\" : undefined}\n />\n }\n >\n {Icone ? <Icone /> : null}\n <span>{libelle}</span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n )\n )}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n ))}\n </nav>\n )\n}\n\nfunction MenuCompte({\n compte,\n Lien,\n}: {\n compte: AppShellCompte\n Lien: AppShellLienComposant\n}) {\n const [confirmer, setConfirmer] = useState(false)\n\n return (\n <>\n <SidebarMenu className=\"min-w-0 flex-1\">\n <SidebarMenuItem>\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <SidebarMenuButton\n size=\"lg\"\n isActive={compte.actif}\n aria-label={`${compte.nom}, menu du compte`}\n className=\"data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground\"\n />\n }\n >\n <Avatar>\n {compte.photo ? (\n <AvatarImage src={compte.photo} alt=\"\" />\n ) : null}\n <AvatarFallback>{compte.initiales}</AvatarFallback>\n </Avatar>\n <span className=\"grid flex-1 text-left leading-tight\">\n <span className=\"truncate font-medium\">{compte.nom}</span>\n {compte.detail ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {compte.detail}\n </span>\n ) : null}\n </span>\n <ChevronsUpDownIcon className=\"ml-auto\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent side=\"top\" align=\"start\" className=\"min-w-56\">\n {compte.entrees?.length ? (\n <>\n <DropdownMenuGroup>\n {compte.entrees.map(\n ({ libelle, icone: Icone, href, onSelect }, i) => (\n <DropdownMenuItem\n key={i}\n render={href ? <Lien href={href} /> : undefined}\n onClick={onSelect}\n {...{ [FERME_TIROIR]: true }}\n >\n {Icone ? <Icone /> : null}\n {libelle}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n </>\n ) : null}\n <DropdownMenuItem onClick={() => setConfirmer(true)}>\n <LogOutIcon />\n Se déconnecter\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </SidebarMenuItem>\n </SidebarMenu>\n\n <AlertDialog open={confirmer} onOpenChange={setConfirmer}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Se déconnecter</AlertDialogTitle>\n <AlertDialogDescription>\n Voulez-vous vraiment vous déconnecter ?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Annuler</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => {\n setConfirmer(false)\n compte.seDeconnecter()\n }}\n >\n Se déconnecter\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </>\n )\n}\n\n/** Sous le seuil mobile, la barre latérale n'est plus à l'écran : cette barre\n * porte le bouton qui l'ouvre en tiroir, et la marque. */\nfunction BarreMobile({\n application,\n Lien,\n}: Pick<AppShellProps, \"application\"> & { Lien: AppShellLienComposant }) {\n const { isMobile, openMobile } = useSidebar()\n if (!isMobile) return null\n return (\n <header className=\"sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b bg-background px-2\">\n <SidebarTrigger\n aria-label=\"Ouvrir le menu\"\n aria-expanded={openMobile}\n className=\"size-9\"\n />\n <Lien\n href={application.href ?? \"/\"}\n className=\"flex min-w-0 items-center gap-2 rounded-md px-1 font-semibold outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Logo application={application} className=\"size-6\" />\n <span className=\"truncate\">{application.nom}</span>\n </Lien>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;AA0HA,SAAgBC,EAAS,EACvB,gBACA,aACA,WACA,UACA,MAAMC,IAAO,KACb,YACA,eACgB;CAChB,OACE,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD;EAAiB,aAAa,CAACC,EAAe;EAA9C,UAAA,CACE,kBAACC,GAAD,EAAA,UAAA;GACE,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD;IAAqB;IAAmB;GAAO,CAAA,EAClC,CAAA;GACf,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD;IAAsB;IAAgB;GAAO,CAAA,EAC/B,CAAA;GACfC,KAAUC,IACT,kBAACC,GAAD;IAAe,WAAU;IAAzB,UAAA,CACGF,IAAS,kBAACG,GAAD;KAAoB;KAAc;IAAO,CAAA,IAAI,MACtDF,IACC,kBAACG,GAAD;KACE,GAAIH;KACJ,MAAK;KACL,WAAU;IACX,CAAA,IACC,IACS;GACb,CAAA,IAAA;EACG,EAAA,CAAA,GACT,kBAACI,GAAD;GAAc,WAAU;GAAxB,UAAA;IACE,kBAACC,GAAD;KAA0B;KAAmB;IAAO,CAAA;IACnDC;IACAC;GACW;EACC,CAAA,CAAA;CACF,CAAA,EAAA,CAAA;AAErB;AAIA,SAASd,IAAiB;CACxB,OACE,OAAO,WAAa,OACpB,uCAAuC,KAAK,SAAS,MAAM;AAE/D;AAGA,IAAMe,IAAe;AAWrB,SAASd,EAAQ,EAAE,eAAqC;CACtD,IAAM,EAAE,aAAU,qBAAkBe,EAAW;CAC/C,OACE,kBAACC,GAAD;EAAS,aAAY;EAArB,UAAA,CACE,kBAAC,OAAD;GACE,WAA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MAAM0B,EAAY,QAAQ;GAC1B,WAAU;GAFZ,UAAA,CAIE,kBAACD,GAAD;IAAmB;IAAa,WAAU;GAAU,CAAA,GACpD,kBAAC,QAAD;IAAM,WAAU;IAAY,UAAAC,EAAY;GAAU,CAAA,CAC9C;EACA,CAAA,CAAA;C,KAfY;AAiBxB"}
1
+ {"version":3,"file":"app-shell.js","names":["_Fragment","Fragment$1","AppShell","Lien","idContenu","useId","TooltipProvider","event","SidebarProvider","colonneRepliee","Colonne","SidebarHeader","Marque","BoutonRepli","SidebarContent","Navigation","compte","theme","SidebarFooter","MenuCompte","ThemeMenu","SidebarInset","BarreMobile","bandeau","children","FERME_TIROIR","useSidebar","isMobile","libelle","open","TooltipButton","toggleSidebar","PanelLeftIcon","Sidebar","setOpenMobile","SidebarRail","Logo","application","cn","className","SidebarMenu","SidebarMenuItem","SidebarMenuButton","sections","SidebarGroup","section","SidebarGroupLabel","SidebarGroupContent","Icone","actif","i","index","confirmer","setConfirmer","useState","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","ChevronsUpDownIcon","DropdownMenuContent","DropdownMenuGroup","DropdownMenuItem","href","onChoisir","DropdownMenuSeparator","LogOutIcon","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction","SidebarTrigger","openMobile"],"sources":["../../../src/components/etic/app-shell.tsx"],"sourcesContent":["import {\n useId,\n useState,\n type ComponentProps,\n type ComponentType,\n type ReactNode,\n} from \"react\"\nimport { cn } from \"cn\"\nimport {\n ChevronsUpDownIcon,\n LogOutIcon,\n PanelLeftIcon,\n type LucideIcon,\n} from \"lucide-react\"\n\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"@etic-ui/components/ui/alert-dialog\"\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@etic-ui/components/ui/avatar\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"@etic-ui/components/ui/dropdown-menu\"\nimport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarProvider,\n SidebarRail,\n SidebarTrigger,\n useSidebar,\n} from \"@etic-ui/components/ui/sidebar\"\nimport { TooltipProvider } from \"@etic-ui/components/ui/tooltip\"\nimport {\n ThemeMenu,\n type ThemeMenuProps,\n} from \"@etic-ui/components/etic/theme-menu\"\nimport { TooltipButton } from \"@etic-ui/components/etic/tooltip-button\"\n\n/** Lien du routeur de l'application (react-router, TanStack Router…), qui\n * reçoit `href` comme un `<a>`. Par défaut, un `<a>` : rechargement complet. */\nexport type AppShellLienComposant = ComponentType<ComponentProps<\"a\">> | \"a\"\n\nexport interface AppShellLien {\n libelle: string\n href: string\n icone?: LucideIcon\n /** Page à l'écran. Calculé par l'application, seule à savoir qu'une fiche\n * appartient à telle rubrique. */\n actif?: boolean\n}\n\nexport interface AppShellSection {\n titre?: string\n liens: AppShellLien[]\n}\n\n/** Entrée du menu du compte : un lien, ou une action. */\nexport type AppShellEntreeCompte = {\n libelle: string\n icone?: LucideIcon\n} & (\n { href: string; onChoisir?: never } | { onChoisir: () => void; href?: never }\n)\n\nexport interface AppShellCompte {\n /** « Prénom Nom », ou le rôle d'un compte fonctionnel. */\n nom: string\n /** Seconde ligne, l'adresse par exemple. */\n detail?: string\n initiales: string\n /** Photo ; les initiales s'affichent tant qu'elle manque ou charge. */\n photo?: string | null\n /** La fiche du compte est la page à l'écran. */\n actif?: boolean\n /** Entrées du menu du compte, avant « Se déconnecter ». */\n entrees?: AppShellEntreeCompte[]\n /** Appelé après confirmation. */\n onSeDeconnecter: () => void\n}\n\nexport interface AppShellProps {\n application: {\n nom: string\n sousTitre?: string\n /** Image ou icône, 28 px de côté environ. */\n logo?: ReactNode\n /** Lien de la marque ; « / » par défaut. */\n href?: string\n }\n sections: AppShellSection[]\n compte?: AppShellCompte\n theme?: Pick<ThemeMenuProps, \"valeur\" | \"onValeurChange\">\n lien?: AppShellLienComposant\n /** Au-dessus du contenu, sur toute sa largeur (bandeau d'erreur…). */\n bandeau?: ReactNode\n children: ReactNode\n}\n\n/**\n * Coquille commune des applications ETIC : la barre latérale de shadcn\n * (navigation par rubriques, menu du compte, thème), qui devient un tiroir\n * sous 1 025 px, ouvert par une barre du haut. Le tiroir se referme quand on\n * suit un de ses liens. Ne connaît ni le routeur ni l'authentification : l'application\n * fournit les liens, l'état actif, le compte et le thème.\n *\n * Un lien « Aller au contenu », visible au focus, ouvre la tabulation : il\n * saute la navigation et met le focus sur le `<main>`.\n */\nexport function AppShell({\n application,\n sections,\n compte,\n theme,\n lien: Lien = \"a\",\n bandeau,\n children,\n}: AppShellProps) {\n const idContenu = useId()\n return (\n <TooltipProvider>\n <a\n href={`#${idContenu}`}\n data-slot=\"app-shell-skip-link\"\n onClick={(event) => {\n // Le focus, pas seulement le défilement ; et pas de `#…` ajouté à\n // l'adresse, que le routeur de l'application lirait.\n event.preventDefault()\n document.getElementById(idContenu)?.focus()\n }}\n className=\"sr-only rounded-md bg-background px-3 py-2 text-sm font-medium shadow-md ring-3 ring-ring/50 outline-none focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-50\"\n >\n Aller au contenu\n </a>\n <SidebarProvider defaultOpen={!colonneRepliee()}>\n <Colonne>\n <SidebarHeader className=\"flex-row items-center group-data-[collapsible=icon]:flex-col\">\n <Marque application={application} Lien={Lien} />\n <BoutonRepli />\n </SidebarHeader>\n <SidebarContent>\n <Navigation sections={sections} Lien={Lien} />\n </SidebarContent>\n {compte || theme ? (\n <SidebarFooter className=\"flex-row items-center gap-2 group-data-[collapsible=icon]:flex-col\">\n {compte ? <MenuCompte compte={compte} Lien={Lien} /> : null}\n {theme ? (\n <ThemeMenu\n {...theme}\n side=\"top\"\n className=\"size-12 shrink-0 bg-sidebar group-data-[collapsible=icon]:size-8\"\n />\n ) : null}\n </SidebarFooter>\n ) : null}\n </Colonne>\n <SidebarInset\n id={idContenu}\n tabIndex={-1}\n className=\"min-w-0 outline-none\"\n >\n <BarreMobile application={application} Lien={Lien} />\n {bandeau}\n {children}\n </SidebarInset>\n </SidebarProvider>\n </TooltipProvider>\n )\n}\n\n/** Colonne repliée lors de la dernière visite : shadcn écrit le cookie\n * `sidebar_state` à chaque repli, sans le relire. */\nfunction colonneRepliee() {\n return (\n typeof document !== \"undefined\" &&\n /(?:^|;\\s*)sidebar_state=false(?:;|$)/.test(document.cookie)\n )\n}\n\n/** Attribut des éléments, autres que les liens, qui referment le tiroir. */\nconst FERME_TIROIR = \"data-ferme-tiroir\"\n\n/**\n * Sur ordinateur, le bouton visible qui replie ou déplie la colonne (le rail\n * de shadcn n'est ni visible ni atteignable au clavier, et Ctrl+B ne se\n * devine pas). Sur mobile, la barre du haut s'en charge.\n */\nfunction BoutonRepli() {\n const { isMobile, open, toggleSidebar } = useSidebar()\n if (isMobile) return null\n const libelle = open ? \"Replier le menu\" : \"Déplier le menu\"\n return (\n <TooltipButton\n variant=\"ghost\"\n size=\"icon-sm\"\n aria-label={libelle}\n infobulle={`${libelle} (Ctrl+B)`}\n aria-keyshortcuts=\"Control+B Meta+B\"\n data-slot=\"app-shell-collapse\"\n className=\"shrink-0\"\n onClick={toggleSidebar}\n >\n <PanelLeftIcon />\n </TooltipButton>\n )\n}\n\n/**\n * La barre latérale. Sur ordinateur, elle se replie en colonne d'icônes\n * (bouton de l'en-tête, rail, ou Ctrl+B hors d'un champ de saisie). Sur mobile, le tiroir se referme dès\n * qu'on suit un de ses liens dans la page, ou une entrée marquée\n * `data-ferme-tiroir` : un seul écouteur, qui reçoit aussi les clics des\n * menus ouverts depuis le tiroir (React fait remonter les évènements des\n * portails dans l'arbre des composants). Un clic qui ouvre un nouvel onglet\n * (Ctrl, Cmd, Maj) le laisse ouvert.\n */\nfunction Colonne({ children }: { children: ReactNode }) {\n const { isMobile, setOpenMobile } = useSidebar()\n return (\n <Sidebar collapsible=\"icon\">\n <div\n className=\"contents\"\n onClick={(event) => {\n if (!isMobile || event.ctrlKey || event.metaKey || event.shiftKey) {\n return\n }\n const cible = event.target as Element\n if (cible.closest(`a[href], [${FERME_TIROIR}]`)) setOpenMobile(false)\n }}\n >\n {children}\n </div>\n <SidebarRail />\n </Sidebar>\n )\n}\n\nfunction Logo({\n application,\n className,\n}: Pick<AppShellProps, \"application\"> & { className: string }) {\n return application.logo ? (\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center [&_img]:size-full [&_svg]:size-full\",\n className\n )}\n >\n {application.logo}\n </span>\n ) : null\n}\n\nfunction Marque({\n application,\n Lien,\n}: Pick<AppShellProps, \"application\"> & { Lien: AppShellLienComposant }) {\n return (\n <SidebarMenu className=\"min-w-0 flex-1\">\n <SidebarMenuItem>\n <SidebarMenuButton\n size=\"lg\"\n render={<Lien href={application.href ?? \"/\"} />}\n >\n <Logo application={application} className=\"size-7\" />\n <span className=\"grid flex-1 text-left leading-tight\">\n <span className=\"truncate font-semibold\">{application.nom}</span>\n {application.sousTitre ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {application.sousTitre}\n </span>\n ) : null}\n </span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n </SidebarMenu>\n )\n}\n\nfunction Navigation({\n sections,\n Lien,\n}: Pick<AppShellProps, \"sections\"> & { Lien: AppShellLienComposant }) {\n return (\n <nav aria-label=\"Navigation principale\">\n {sections.map((section, index) => (\n <SidebarGroup key={index}>\n {section.titre ? (\n <SidebarGroupLabel>{section.titre}</SidebarGroupLabel>\n ) : null}\n <SidebarGroupContent>\n <SidebarMenu>\n {section.liens.map(\n ({ libelle, href, icone: Icone, actif }, i) => (\n <SidebarMenuItem key={i}>\n <SidebarMenuButton\n isActive={actif}\n tooltip={libelle}\n render={\n <Lien\n href={href}\n aria-current={actif ? \"page\" : undefined}\n />\n }\n >\n {Icone ? <Icone /> : null}\n {/* Tronqué s'il est trop long : `title` le donne en\n entier au survol, barre dépliée. */}\n <span title={libelle}>{libelle}</span>\n </SidebarMenuButton>\n </SidebarMenuItem>\n )\n )}\n </SidebarMenu>\n </SidebarGroupContent>\n </SidebarGroup>\n ))}\n </nav>\n )\n}\n\nfunction MenuCompte({\n compte,\n Lien,\n}: {\n compte: AppShellCompte\n Lien: AppShellLienComposant\n}) {\n const [confirmer, setConfirmer] = useState(false)\n\n return (\n <>\n <SidebarMenu className=\"min-w-0 flex-1\">\n <SidebarMenuItem>\n <DropdownMenu>\n <DropdownMenuTrigger\n render={\n <SidebarMenuButton\n size=\"lg\"\n isActive={compte.actif}\n aria-label={`${compte.nom}, menu du compte`}\n className=\"data-popup-open:bg-sidebar-accent data-popup-open:text-sidebar-accent-foreground\"\n />\n }\n >\n <Avatar>\n {compte.photo ? (\n <AvatarImage src={compte.photo} alt=\"\" />\n ) : null}\n <AvatarFallback>{compte.initiales}</AvatarFallback>\n </Avatar>\n <span className=\"grid flex-1 text-left leading-tight\">\n <span className=\"truncate font-medium\">{compte.nom}</span>\n {compte.detail ? (\n <span className=\"truncate text-xs text-muted-foreground\">\n {compte.detail}\n </span>\n ) : null}\n </span>\n <ChevronsUpDownIcon className=\"ml-auto\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent side=\"top\" align=\"start\" className=\"min-w-56\">\n {compte.entrees?.length ? (\n <>\n <DropdownMenuGroup>\n {compte.entrees.map(\n ({ libelle, icone: Icone, href, onChoisir }, i) => (\n <DropdownMenuItem\n key={i}\n render={href ? <Lien href={href} /> : undefined}\n onClick={onChoisir}\n {...{ [FERME_TIROIR]: true }}\n >\n {Icone ? <Icone /> : null}\n {libelle}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n </>\n ) : null}\n <DropdownMenuItem onClick={() => setConfirmer(true)}>\n <LogOutIcon />\n Se déconnecter\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </SidebarMenuItem>\n </SidebarMenu>\n\n <AlertDialog open={confirmer} onOpenChange={setConfirmer}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Se déconnecter</AlertDialogTitle>\n <AlertDialogDescription>\n Voulez-vous vraiment vous déconnecter&#8239;?\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Annuler</AlertDialogCancel>\n <AlertDialogAction\n onClick={() => {\n setConfirmer(false)\n compte.onSeDeconnecter()\n }}\n >\n Se déconnecter\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </>\n )\n}\n\n/** Sous le seuil mobile, la barre latérale n'est plus à l'écran : cette barre\n * porte le bouton qui l'ouvre en tiroir, et la marque. */\nfunction BarreMobile({\n application,\n Lien,\n}: Pick<AppShellProps, \"application\"> & { Lien: AppShellLienComposant }) {\n const { isMobile, openMobile } = useSidebar()\n if (!isMobile) return null\n return (\n // Sa hauteur (h-12) est reprise par le `scroll-padding-top` de styles.css :\n // une ancre ne passe pas sous la barre collante.\n <header\n data-slot=\"app-shell-mobile-bar\"\n className=\"sticky top-0 z-10 flex h-12 shrink-0 items-center gap-2 border-b bg-background px-2\"\n >\n <SidebarTrigger\n aria-label=\"Ouvrir le menu\"\n aria-expanded={openMobile}\n className=\"size-9\"\n />\n <Lien\n href={application.href ?? \"/\"}\n className=\"flex min-w-0 items-center gap-2 rounded-md px-1 font-semibold outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n >\n <Logo application={application} className=\"size-6\" />\n <span className=\"truncate\">{application.nom}</span>\n </Lien>\n </header>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAoIA,SAAgBE,EAAS,EACvB,gBACA,aACA,WACA,UACA,MAAMC,IAAO,KACb,YACA,eACgB;C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;GACD,UAAA;EAEkB,CAAA,CACF,EAAA,CAAA,CACD,EAAA,CAAA;CACT,CAAA,CACb,EAAA,CAAA;AAEN;AAIA,SAASM,EAAY,EACnB,gBACA,WACuE;CACvE,IAAM,EAAE,aAAU,kBAAeI,EAAW;CAE5C,OADKC,IAIH,kBAAC,UAAD;EACE,aAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAACiD,GAAD;GACE,cAAW;GACX,iBAAeC;GACf,WAAU;EACX,CAAA,GACD,kBAAC1E,GAAD;GACE,MAAMkC,EAAY,QAAQ;GAC1B,WAAU;GAFZ,UAAA,CAIE,kBAACD,GAAD;IAAmB;IAAa,WAAU;GAAU,CAAA,GACpD,kBAAC,QAAD;IAAM,WAAU;IAAY,UAAAC,EAAY;GAAU,CAAA,CAC9C;EACA,CAAA,CAAA;C,KApBY;AAsBxB"}
@@ -0,0 +1,48 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ import { Avatar } from '../ui/avatar';
3
+ /**
4
+ * Récupère les octets d'une image : l'application y met son appel
5
+ * authentifié (en-tête `Authorization`, cookie…). `signal` est interrompu
6
+ * quand l'image n'est plus voulue.
7
+ */
8
+ export type AuthImageCharger = (src: string, signal: AbortSignal) => Promise<Blob>;
9
+ /**
10
+ * URL locale (`blob:`) d'une image qu'un simple `<img src>` ne peut pas
11
+ * obtenir, faute de pouvoir s'authentifier. Les octets sont récupérés par
12
+ * `charger`, puis l'URL est révoquée au démontage ou quand `src` change.
13
+ * `null` pendant le chargement, en cas d'échec, ou sans `src`.
14
+ *
15
+ * `cle` force un nouveau chargement quand les octets changent derrière une
16
+ * même `src` (photo remplacée). `charger` peut changer à chaque rendu : seul
17
+ * le dernier sert, sans relancer de chargement.
18
+ */
19
+ export declare function useAuthObjectUrl(src: string | null | undefined, charger: AuthImageCharger, cle?: unknown): string | null;
20
+ export interface AuthImageProps extends Omit<ComponentProps<"img">, "src"> {
21
+ /** Adresse de l'image, transmise à `charger`. */
22
+ src: string | null | undefined;
23
+ charger: AuthImageCharger;
24
+ /** Changer cette valeur recharge l'image (voir `useAuthObjectUrl`). */
25
+ cle?: unknown;
26
+ /** Affiché pendant le chargement, en cas d'échec ou sans `src`. */
27
+ secours?: ReactNode;
28
+ }
29
+ /** Image servie par une adresse authentifiée : l'application fournit la
30
+ * fonction qui en récupère les octets. */
31
+ export declare function AuthImage({ src, charger, cle, secours, alt, ...props }: AuthImageProps): import("react").JSX.Element;
32
+ export interface AuthAvatarProps extends Omit<ComponentProps<typeof Avatar>, "children"> {
33
+ /** Toujours affichées tant que la photo manque, charge ou échoue. */
34
+ initiales: string;
35
+ /** Adresse de la photo, transmise à `charger` ; `null` sans photo. */
36
+ src?: string | null;
37
+ charger: AuthImageCharger;
38
+ /** Changer cette valeur recharge la photo (photo remplacée). */
39
+ cle?: unknown;
40
+ /** Texte alternatif de la photo ; vide par défaut, le nom figurant en
41
+ * général à côté. */
42
+ alt?: string;
43
+ }
44
+ /**
45
+ * Photo de profil servie par une adresse authentifiée, sur l'`Avatar` de
46
+ * shadcn : les initiales tant que la photo manque, charge ou échoue.
47
+ */
48
+ export declare function AuthAvatar({ initiales, src, charger, cle, alt, className, ...props }: AuthAvatarProps): import("react").JSX.Element;
@@ -0,0 +1,44 @@
1
+ import { Avatar as e, AvatarFallback as t, AvatarImage as n } from "../ui/avatar.js";
2
+ import { useEffect as r, useEffectEvent as i, useState as a } from "react";
3
+ import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ // src/components/etic/auth-image.tsx
5
+ function l(e, t, n) {
6
+ let [o, s] = a(null), c = i((e, n) => t(e, n));
7
+ return r(() => {
8
+ if (!e) return;
9
+ let t = !0, r = null, i = new AbortController();
10
+ return c(e, i.signal).then((i) => {
11
+ t && (r = URL.createObjectURL(i), s({
12
+ src: e,
13
+ cle: n,
14
+ url: r
15
+ }));
16
+ }).catch(() => {
17
+ t && s(null);
18
+ }), () => {
19
+ t = !1, i.abort(), r && URL.revokeObjectURL(r);
20
+ };
21
+ }, [e, n]), e && o?.src === e && Object.is(o.cle, n) ? o.url : null;
22
+ }
23
+ function u({ src: e, charger: t, cle: n, secours: r = null, alt: i = "", ...a }) {
24
+ let c = l(e, t, n);
25
+ return c ? /* @__PURE__ */ s("img", {
26
+ src: c,
27
+ alt: i,
28
+ ...a
29
+ }) : /* @__PURE__ */ s(o, { children: r });
30
+ }
31
+ function d({ initiales: r, src: i, charger: a, cle: o, alt: u = "", className: d, ...f }) {
32
+ let p = l(i, a, o);
33
+ return /* @__PURE__ */ c(e, {
34
+ className: d,
35
+ ...f,
36
+ children: [p ? /* @__PURE__ */ s(n, {
37
+ src: p,
38
+ alt: u
39
+ }) : null, /* @__PURE__ */ s(t, { children: r })]
40
+ });
41
+ }
42
+ export { d as AuthAvatar, u as AuthImage, l as useAuthObjectUrl };
43
+
44
+ //# sourceMappingURL=auth-image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-image.js","names":["_Fragment","Fragment$1","useAuthObjectUrl","url","setUrl","useState","chargerActuel","useEffectEvent","charger","adresse","signal","useEffect","src","actif","creee","controleur","blob","cle","AuthImage","props","secours","AuthAvatar","Avatar","AvatarImage","AvatarFallback","initiales"],"sources":["../../../src/components/etic/auth-image.tsx"],"sourcesContent":["import {\n useEffect,\n useEffectEvent,\n useState,\n type ComponentProps,\n type ReactNode,\n} from \"react\"\n\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n} from \"@etic-ui/components/ui/avatar\"\n\n/**\n * Récupère les octets d'une image : l'application y met son appel\n * authentifié (en-tête `Authorization`, cookie…). `signal` est interrompu\n * quand l'image n'est plus voulue.\n */\nexport type AuthImageCharger = (\n src: string,\n signal: AbortSignal\n) => Promise<Blob>\n\n/**\n * URL locale (`blob:`) d'une image qu'un simple `<img src>` ne peut pas\n * obtenir, faute de pouvoir s'authentifier. Les octets sont récupérés par\n * `charger`, puis l'URL est révoquée au démontage ou quand `src` change.\n * `null` pendant le chargement, en cas d'échec, ou sans `src`.\n *\n * `cle` force un nouveau chargement quand les octets changent derrière une\n * même `src` (photo remplacée). `charger` peut changer à chaque rendu : seul\n * le dernier sert, sans relancer de chargement.\n */\nexport function useAuthObjectUrl(\n src: string | null | undefined,\n charger: AuthImageCharger,\n cle?: unknown\n): string | null {\n const [url, setUrl] = useState<{\n src: string\n cle: unknown\n url: string\n } | null>(null)\n // La dernière fonction reçue, lue au moment du chargement.\n const chargerActuel = useEffectEvent((adresse: string, signal: AbortSignal) =>\n charger(adresse, signal)\n )\n\n useEffect(() => {\n if (!src) return\n let actif = true\n let creee: string | null = null\n const controleur = new AbortController()\n chargerActuel(src, controleur.signal)\n .then((blob) => {\n if (!actif) return\n creee = URL.createObjectURL(blob)\n setUrl({ src, cle, url: creee })\n })\n .catch(() => {\n if (actif) setUrl(null)\n })\n return () => {\n actif = false\n controleur.abort()\n if (creee) URL.revokeObjectURL(creee)\n }\n }, [src, cle])\n\n // L'URL d'une ancienne `src` (ou d'une ancienne `cle`, déjà révoquée)\n // n'est jamais rendue.\n return src && url?.src === src && Object.is(url.cle, cle) ? url.url : null\n}\n\nexport interface AuthImageProps extends Omit<ComponentProps<\"img\">, \"src\"> {\n /** Adresse de l'image, transmise à `charger`. */\n src: string | null | undefined\n charger: AuthImageCharger\n /** Changer cette valeur recharge l'image (voir `useAuthObjectUrl`). */\n cle?: unknown\n /** Affiché pendant le chargement, en cas d'échec ou sans `src`. */\n secours?: ReactNode\n}\n\n/** Image servie par une adresse authentifiée : l'application fournit la\n * fonction qui en récupère les octets. */\nexport function AuthImage({\n src,\n charger,\n cle,\n secours = null,\n alt = \"\",\n ...props\n}: AuthImageProps) {\n const url = useAuthObjectUrl(src, charger, cle)\n if (!url) return <>{secours}</>\n return <img src={url} alt={alt} {...props} />\n}\n\nexport interface AuthAvatarProps extends Omit<\n ComponentProps<typeof Avatar>,\n \"children\"\n> {\n /** Toujours affichées tant que la photo manque, charge ou échoue. */\n initiales: string\n /** Adresse de la photo, transmise à `charger` ; `null` sans photo. */\n src?: string | null\n charger: AuthImageCharger\n /** Changer cette valeur recharge la photo (photo remplacée). */\n cle?: unknown\n /** Texte alternatif de la photo ; vide par défaut, le nom figurant en\n * général à côté. */\n alt?: string\n}\n\n/**\n * Photo de profil servie par une adresse authentifiée, sur l'`Avatar` de\n * shadcn : les initiales tant que la photo manque, charge ou échoue.\n */\nexport function AuthAvatar({\n initiales,\n src,\n charger,\n cle,\n alt = \"\",\n className,\n ...props\n}: AuthAvatarProps) {\n const url = useAuthObjectUrl(src, charger, cle)\n return (\n <Avatar className={className} {...props}>\n {url ? <AvatarImage src={url} alt={alt} /> : null}\n <AvatarFallback>{initiales}</AvatarFallback>\n </Avatar>\n )\n}\n"],"mappings":";;;;AAkCA,SAAgBE,EACd,GACA,GACA,GACe;CACf,IAAM,CAACC,GAAKC,KAAUC,EAIZ,IAAI,GAERC,IAAgBC,GAAgB,GAAiB,MACrDC,EAAQC,GAASC,CAAM,CACzB;CAyBA,OAvBAC,QAAgB;EACd,IAAI,CAACC,GAAK;EACV,IAAIC,IAAQ,IACRC,IAAuB,MACrBC,IAAa,IAAI,gBAAgB;EAUvC,OATAT,EAAcM,GAAKG,EAAW,MAAM,CAAC,CAClC,MAAM,MAAS;GACd,AAAKF,MACL,IAAQ,IAAI,gBAAgBG,CAAI,GAChCZ,EAAO;IAAE;IAAK;IAAK,KAAKU;GAAM,CAAC;EACjC,CAAC,CAAC,CACD,YAAY;GACX,AAAID,KAAOT,EAAO,IAAI;EACxB,CAAC,SACU;GAGX,AAFA,IAAQ,IACRW,EAAW,MAAM,GACbD,KAAO,IAAI,gBAAgBA,CAAK;EACtC;CACF,GAAG,CAACF,GAAKK,CAAG,CAAC,GAINL,KAAOT,GAAK,QAAQS,KAAO,OAAO,GAAGT,EAAI,KAAKc,CAAG,IAAId,EAAI,MAAM;AACxE;AAcA,SAAgBe,EAAU,EACxB,QACA,YACA,QACA,aAAU,MACV,SAAM,IACN,GAAGC,KACc;CACjB,IAAMhB,IAAMD,EAAiBU,GAAKJ,GAASS,CAAG;CAE9C,OADKd,IACE,kBAAC,OAAD;EAAK,KAAKA;EAAU;EAAK,GAAIgB;CAAQ,CAAA,IAD3B,kBAAAnB,GAAA,EAAA,UAAGoB,EAAU,CAAA;AAEhC;AAsBA,SAAgBC,EAAW,EACzB,cACA,QACA,YACA,QACA,SAAM,IACN,cACA,GAAGF,KACe;CAClB,IAAMhB,IAAMD,EAAiBU,GAAKJ,GAASS,CAAG;CAC9C,OACE,kBAACK,GAAD;EAAmB;EAAW,GAAIH;EAAlC,UAAA,CACGhB,IAAM,kBAACoB,GAAD;GAAa,KAAKpB;GAAU;EAAM,CAAA,IAAI,MAC7C,kBAACqB,GAAD,EAAA,UAAiBC,EAA0B,CAAA,CACrC;;AAEZ"}
@@ -0,0 +1,30 @@
1
+ import { ComponentProps, ReactNode } from 'react';
2
+ export interface CheckboxListOption {
3
+ /** Valeur portée par la sélection. */
4
+ valeur: string;
5
+ libelle: ReactNode;
6
+ /** Précision sous le libellé (pourquoi la case est figée…), reliée à la
7
+ * case par `aria-describedby`. */
8
+ description?: ReactNode;
9
+ /** Fige la case dans son état actuel. */
10
+ disabled?: boolean;
11
+ }
12
+ export interface CheckboxListProps extends Omit<ComponentProps<"div">, "children" | "defaultValue"> {
13
+ options: CheckboxListOption[];
14
+ /** Valeurs cochées. */
15
+ valeurs: string[];
16
+ onValeursChange: (valeurs: string[]) => void;
17
+ /** Affiché à la place de la liste quand il n'y a rien à cocher. */
18
+ vide?: ReactNode;
19
+ disabled?: boolean;
20
+ /** Au moins une case à cocher : le groupe se dit « obligatoire » (un
21
+ * groupe n'admet pas `aria-required`). Par défaut, celui du `FormField`.
22
+ * La vérification reste à l'application. */
23
+ required?: boolean;
24
+ }
25
+ /**
26
+ * Choix de plusieurs valeurs parmi une liste : le groupe de cases de Base UI
27
+ * (`CheckboxGroup`), chaque case en `Field` horizontal de shadcn, en grille.
28
+ * Le titre du groupe vient de son contexte (`FormField`, `aria-label`…).
29
+ */
30
+ export declare function CheckboxList({ options, valeurs, onValeursChange, vide, disabled, required, className, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, ...props }: CheckboxListProps): import("react").JSX.Element;