@etic-insa/ui 0.2.0 → 0.4.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 (222) hide show
  1. package/README.md +490 -52
  2. package/dist/components/etic/action.d.ts +16 -7
  3. package/dist/components/etic/action.js +25 -25
  4. package/dist/components/etic/action.js.map +1 -1
  5. package/dist/components/etic/app-shell.d.ts +20 -8
  6. package/dist/components/etic/app-shell.js +164 -120
  7. package/dist/components/etic/app-shell.js.map +1 -1
  8. package/dist/components/etic/auth-image.d.ts +29 -6
  9. package/dist/components/etic/auth-image.js +41 -18
  10. package/dist/components/etic/auth-image.js.map +1 -1
  11. package/dist/components/etic/button-link.d.ts +19 -0
  12. package/dist/components/etic/button-link.js +19 -0
  13. package/dist/components/etic/button-link.js.map +1 -0
  14. package/dist/components/etic/centered-screen.d.ts +13 -0
  15. package/dist/components/etic/centered-screen.js +13 -0
  16. package/dist/components/etic/centered-screen.js.map +1 -0
  17. package/dist/components/etic/confirm-dialog.d.ts +33 -3
  18. package/dist/components/etic/confirm-dialog.js +92 -67
  19. package/dist/components/etic/confirm-dialog.js.map +1 -1
  20. package/dist/components/etic/copy-button.d.ts +3 -2
  21. package/dist/components/etic/copy-button.js +3 -3
  22. package/dist/components/etic/copy-button.js.map +1 -1
  23. package/dist/components/etic/data-table-bulk-actions.d.ts +41 -4
  24. package/dist/components/etic/data-table-bulk-actions.js +114 -60
  25. package/dist/components/etic/data-table-bulk-actions.js.map +1 -1
  26. package/dist/components/etic/data-table-focus.d.ts +17 -0
  27. package/dist/components/etic/data-table-focus.js +29 -0
  28. package/dist/components/etic/data-table-focus.js.map +1 -0
  29. package/dist/components/etic/data-table-format.d.ts +3 -10
  30. package/dist/components/etic/data-table-format.js +4 -3
  31. package/dist/components/etic/data-table-format.js.map +1 -1
  32. package/dist/components/etic/data-table-pagination.d.ts +20 -6
  33. package/dist/components/etic/data-table-pagination.js +73 -43
  34. package/dist/components/etic/data-table-pagination.js.map +1 -1
  35. package/dist/components/etic/data-table-toolbar.d.ts +34 -13
  36. package/dist/components/etic/data-table-toolbar.js +66 -62
  37. package/dist/components/etic/data-table-toolbar.js.map +1 -1
  38. package/dist/components/etic/data-table-view-options.d.ts +44 -4
  39. package/dist/components/etic/data-table-view-options.js +145 -98
  40. package/dist/components/etic/data-table-view-options.js.map +1 -1
  41. package/dist/components/etic/data-table.d.ts +183 -17
  42. package/dist/components/etic/data-table.js +396 -241
  43. package/dist/components/etic/data-table.js.map +1 -1
  44. package/dist/components/etic/date-picker.d.ts +5 -1
  45. package/dist/components/etic/date-picker.js +97 -84
  46. package/dist/components/etic/date-picker.js.map +1 -1
  47. package/dist/components/etic/delete-button.d.ts +12 -4
  48. package/dist/components/etic/delete-button.js +21 -22
  49. package/dist/components/etic/delete-button.js.map +1 -1
  50. package/dist/components/etic/detail-list.d.ts +18 -4
  51. package/dist/components/etic/detail-list.js +30 -20
  52. package/dist/components/etic/detail-list.js.map +1 -1
  53. package/dist/components/etic/disclosure.d.ts +52 -0
  54. package/dist/components/etic/disclosure.js +71 -0
  55. package/dist/components/etic/disclosure.js.map +1 -0
  56. package/dist/components/etic/draft-resume-dialog.d.ts +42 -0
  57. package/dist/components/etic/draft-resume-dialog.js +60 -0
  58. package/dist/components/etic/draft-resume-dialog.js.map +1 -0
  59. package/dist/components/etic/error-banner.js +34 -38
  60. package/dist/components/etic/error-banner.js.map +1 -1
  61. package/dist/components/etic/error-boundary.js +4 -3
  62. package/dist/components/etic/error-boundary.js.map +1 -1
  63. package/dist/components/etic/explained-badge.d.ts +26 -0
  64. package/dist/components/etic/explained-badge.js +17 -0
  65. package/dist/components/etic/explained-badge.js.map +1 -0
  66. package/dist/components/etic/file-upload.js +66 -71
  67. package/dist/components/etic/file-upload.js.map +1 -1
  68. package/dist/components/etic/form-dialog.d.ts +25 -2
  69. package/dist/components/etic/form-dialog.js +95 -77
  70. package/dist/components/etic/form-dialog.js.map +1 -1
  71. package/dist/components/etic/icon-toggle.d.ts +27 -9
  72. package/dist/components/etic/icon-toggle.js +31 -19
  73. package/dist/components/etic/icon-toggle.js.map +1 -1
  74. package/dist/components/etic/lien.d.ts +34 -0
  75. package/dist/components/etic/lien.js +17 -0
  76. package/dist/components/etic/lien.js.map +1 -0
  77. package/dist/components/etic/loading.d.ts +0 -8
  78. package/dist/components/etic/loading.js +17 -25
  79. package/dist/components/etic/loading.js.map +1 -1
  80. package/dist/components/etic/page-container.d.ts +10 -0
  81. package/dist/components/etic/page-container.js +9 -5
  82. package/dist/components/etic/page-container.js.map +1 -1
  83. package/dist/components/etic/page-header.d.ts +19 -5
  84. package/dist/components/etic/page-header.js +60 -44
  85. package/dist/components/etic/page-header.js.map +1 -1
  86. package/dist/components/etic/phone-input.d.ts +16 -0
  87. package/dist/components/etic/phone-input.js +71 -65
  88. package/dist/components/etic/phone-input.js.map +1 -1
  89. package/dist/components/etic/query-boundary.d.ts +25 -2
  90. package/dist/components/etic/query-boundary.js +24 -12
  91. package/dist/components/etic/query-boundary.js.map +1 -1
  92. package/dist/components/etic/removable-badge.d.ts +30 -0
  93. package/dist/components/etic/removable-badge.js +39 -0
  94. package/dist/components/etic/removable-badge.js.map +1 -0
  95. package/dist/components/etic/save-bar.d.ts +32 -0
  96. package/dist/components/etic/save-bar.js +45 -0
  97. package/dist/components/etic/save-bar.js.map +1 -0
  98. package/dist/components/etic/search-select.js +1 -1
  99. package/dist/components/etic/search-select.js.map +1 -1
  100. package/dist/components/etic/segmented-control.d.ts +6 -2
  101. package/dist/components/etic/segmented-control.js +28 -27
  102. package/dist/components/etic/segmented-control.js.map +1 -1
  103. package/dist/components/etic/stat-grid.d.ts +15 -0
  104. package/dist/components/etic/stat-grid.js +17 -0
  105. package/dist/components/etic/stat-grid.js.map +1 -0
  106. package/dist/components/etic/stat-tile.d.ts +10 -3
  107. package/dist/components/etic/stat-tile.js +32 -24
  108. package/dist/components/etic/stat-tile.js.map +1 -1
  109. package/dist/components/etic/status-badge.d.ts +2 -4
  110. package/dist/components/etic/status-badge.js +13 -23
  111. package/dist/components/etic/status-badge.js.map +1 -1
  112. package/dist/components/etic/tailles-dialogue.d.ts +8 -0
  113. package/dist/components/etic/tailles-dialogue.js +10 -0
  114. package/dist/components/etic/tailles-dialogue.js.map +1 -0
  115. package/dist/components/etic/theme-menu.d.ts +29 -2
  116. package/dist/components/etic/theme-menu.js +75 -44
  117. package/dist/components/etic/theme-menu.js.map +1 -1
  118. package/dist/components/etic/toggletip.d.ts +36 -0
  119. package/dist/components/etic/toggletip.js +59 -0
  120. package/dist/components/etic/toggletip.js.map +1 -0
  121. package/dist/components/etic/tooltip-button.d.ts +17 -3
  122. package/dist/components/etic/tooltip-button.js +19 -19
  123. package/dist/components/etic/tooltip-button.js.map +1 -1
  124. package/dist/components/etic/unsaved-changes.d.ts +41 -0
  125. package/dist/components/etic/unsaved-changes.js +17 -0
  126. package/dist/components/etic/unsaved-changes.js.map +1 -0
  127. package/dist/components/etic/use-draft-autosave.d.ts +3 -1
  128. package/dist/components/etic/use-draft-autosave.js +74 -78
  129. package/dist/components/etic/use-draft-autosave.js.map +1 -1
  130. package/dist/components/etic/use-unsaved-changes-warning.d.ts +10 -0
  131. package/dist/components/etic/use-unsaved-changes-warning.js +20 -0
  132. package/dist/components/etic/use-unsaved-changes-warning.js.map +1 -0
  133. package/dist/components/ui/alert-dialog.js +2 -2
  134. package/dist/components/ui/alert-dialog.js.map +1 -1
  135. package/dist/components/ui/avatar.d.ts +5 -1
  136. package/dist/components/ui/avatar.js +20 -11
  137. package/dist/components/ui/avatar.js.map +1 -1
  138. package/dist/components/ui/badge.d.ts +3 -2
  139. package/dist/components/ui/badge.js +27 -14
  140. package/dist/components/ui/badge.js.map +1 -1
  141. package/dist/components/ui/breadcrumb.js +13 -13
  142. package/dist/components/ui/button.d.ts +15 -2
  143. package/dist/components/ui/button.js +29 -17
  144. package/dist/components/ui/button.js.map +1 -1
  145. package/dist/components/ui/calendar.js +1 -1
  146. package/dist/components/ui/calendar.js.map +1 -1
  147. package/dist/components/ui/checkbox.js +1 -1
  148. package/dist/components/ui/checkbox.js.map +1 -1
  149. package/dist/components/ui/combobox.d.ts +2 -2
  150. package/dist/components/ui/combobox.js +45 -32
  151. package/dist/components/ui/combobox.js.map +1 -1
  152. package/dist/components/ui/dialog.d.ts +10 -1
  153. package/dist/components/ui/dialog.js +12 -5
  154. package/dist/components/ui/dialog.js.map +1 -1
  155. package/dist/components/ui/input-group.d.ts +1 -1
  156. package/dist/components/ui/popover.d.ts +1 -1
  157. package/dist/components/ui/popover.js +3 -2
  158. package/dist/components/ui/popover.js.map +1 -1
  159. package/dist/components/ui/progress.d.ts +16 -2
  160. package/dist/components/ui/progress.js +34 -26
  161. package/dist/components/ui/progress.js.map +1 -1
  162. package/dist/components/ui/radio-group.js +1 -1
  163. package/dist/components/ui/radio-group.js.map +1 -1
  164. package/dist/components/ui/select.d.ts +10 -2
  165. package/dist/components/ui/select.js +70 -50
  166. package/dist/components/ui/select.js.map +1 -1
  167. package/dist/components/ui/sidebar.d.ts +6 -1
  168. package/dist/components/ui/sidebar.js +92 -92
  169. package/dist/components/ui/sidebar.js.map +1 -1
  170. package/dist/components/ui/spinner.d.ts +7 -1
  171. package/dist/components/ui/spinner.js +9 -1
  172. package/dist/components/ui/spinner.js.map +1 -1
  173. package/dist/components/ui/switch.js +1 -1
  174. package/dist/components/ui/switch.js.map +1 -1
  175. package/dist/components/ui/table.js +1 -1
  176. package/dist/components/ui/table.js.map +1 -1
  177. package/dist/components/ui/tabs.js +2 -2
  178. package/dist/components/ui/tabs.js.map +1 -1
  179. package/dist/components/ui/tooltip.d.ts +7 -2
  180. package/dist/components/ui/tooltip.js +27 -19
  181. package/dist/components/ui/tooltip.js.map +1 -1
  182. package/dist/hooks/use-column-prefs.d.ts +84 -0
  183. package/dist/hooks/use-column-prefs.js +71 -0
  184. package/dist/hooks/use-column-prefs.js.map +1 -0
  185. package/dist/hooks/use-debounced-value.d.ts +13 -0
  186. package/dist/hooks/use-debounced-value.js +12 -0
  187. package/dist/hooks/use-debounced-value.js.map +1 -0
  188. package/dist/hooks/use-document-title.d.ts +5 -0
  189. package/dist/hooks/use-document-title.js +13 -0
  190. package/dist/hooks/use-document-title.js.map +1 -0
  191. package/dist/hooks/use-persisted-state.d.ts +43 -0
  192. package/dist/hooks/use-persisted-state.js +40 -0
  193. package/dist/hooks/use-persisted-state.js.map +1 -0
  194. package/dist/index.d.ts +40 -16
  195. package/dist/index.js +99 -76
  196. package/dist/lib/autofill.d.ts +18 -0
  197. package/dist/lib/autofill.js +10 -0
  198. package/dist/lib/autofill.js.map +1 -0
  199. package/dist/lib/dates.d.ts +20 -0
  200. package/dist/lib/dates.js +16 -0
  201. package/dist/lib/dates.js.map +1 -0
  202. package/dist/lib/focus-rendu.d.ts +24 -0
  203. package/dist/lib/focus-rendu.js +14 -0
  204. package/dist/lib/focus-rendu.js.map +1 -0
  205. package/dist/lib/format.d.ts +54 -0
  206. package/dist/lib/format.js +80 -0
  207. package/dist/lib/format.js.map +1 -0
  208. package/dist/lib/normalize.d.ts +28 -0
  209. package/dist/lib/normalize.js +21 -0
  210. package/dist/lib/normalize.js.map +1 -0
  211. package/dist/lib/ordre-colonnes.d.ts +15 -0
  212. package/dist/lib/ordre-colonnes.js +14 -0
  213. package/dist/lib/ordre-colonnes.js.map +1 -0
  214. package/dist/lib/ton.d.ts +23 -0
  215. package/dist/lib/ton.js +51 -0
  216. package/dist/lib/ton.js.map +1 -0
  217. package/dist/styles.css +141 -56
  218. package/dist/theme.d.ts +34 -0
  219. package/dist/theme.js +45 -0
  220. package/dist/theme.js.map +1 -0
  221. package/package.json +4 -2
  222. package/src/theme-boot.js +22 -0
@@ -4,16 +4,23 @@ import { cn as a } from "cn";
4
4
  import * as o from "react";
5
5
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  import { CheckIcon as l, ChevronDownIcon as u, XIcon as d } from "lucide-react";
7
- import { Combobox as f } from "@base-ui/react";
7
+ import { Combobox as f } from "@base-ui/react/combobox";
8
8
  // src/components/ui/combobox.tsx
9
- var p = f.Root;
10
- function m({ ...e }) {
9
+ var p = o.createContext(null), m = o.createContext(!1);
10
+ function h(e) {
11
+ let t = o.useRef(null);
12
+ return /* @__PURE__ */ s(p.Provider, {
13
+ value: t,
14
+ children: /* @__PURE__ */ s(f.Root, { ...e })
15
+ });
16
+ }
17
+ function g({ ...e }) {
11
18
  return /* @__PURE__ */ s(f.Value, {
12
19
  "data-slot": "combobox-value",
13
20
  ...e
14
21
  });
15
22
  }
16
- function h({ className: e, children: t, ...n }) {
23
+ function _({ className: e, children: t, ...n }) {
17
24
  return /* @__PURE__ */ c(f.Trigger, {
18
25
  "data-slot": "combobox-trigger",
19
26
  "aria-label": "Afficher les options",
@@ -22,7 +29,7 @@ function h({ className: e, children: t, ...n }) {
22
29
  children: [t, /* @__PURE__ */ s(u, { className: "pointer-events-none size-4 text-muted-foreground" })]
23
30
  });
24
31
  }
25
- function g({ className: e, ...t }) {
32
+ function v({ className: e, ...t }) {
26
33
  return /* @__PURE__ */ s(f.Clear, {
27
34
  "data-slot": "combobox-clear",
28
35
  "aria-label": "Effacer",
@@ -35,53 +42,59 @@ function g({ className: e, ...t }) {
35
42
  children: /* @__PURE__ */ s(d, { className: "pointer-events-none" })
36
43
  });
37
44
  }
38
- function _({ className: e, children: o, disabled: l = !1, showTrigger: u = !0, showClear: d = !1, ...p }) {
45
+ function y({ className: e, children: l, disabled: u = !1, showTrigger: d = !0, showClear: h = !1, ...g }) {
46
+ let y = o.useContext(m), b = o.useContext(p);
39
47
  return /* @__PURE__ */ c(t, {
48
+ ref: y ? void 0 : b ?? void 0,
40
49
  className: a("w-auto", e),
41
50
  children: [
42
51
  /* @__PURE__ */ s(f.Input, {
43
- render: /* @__PURE__ */ s(i, { disabled: l }),
44
- ...p
52
+ render: /* @__PURE__ */ s(i, { disabled: u }),
53
+ ...g
45
54
  }),
46
55
  /* @__PURE__ */ c(n, {
47
56
  align: "inline-end",
48
- children: [u && /* @__PURE__ */ s(r, {
57
+ children: [d && /* @__PURE__ */ s(r, {
49
58
  size: "icon-xs",
50
59
  variant: "ghost",
51
- render: /* @__PURE__ */ s(h, {}),
60
+ render: /* @__PURE__ */ s(_, {}),
52
61
  "data-slot": "input-group-button",
53
62
  className: "group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent",
54
- disabled: l
55
- }), d && /* @__PURE__ */ s(g, { disabled: l })]
63
+ disabled: u
64
+ }), h && /* @__PURE__ */ s(v, { disabled: u })]
56
65
  }),
57
- o
66
+ l
58
67
  ]
59
68
  });
60
69
  }
61
- function v({ className: e, side: t = "bottom", sideOffset: n = 6, align: r = "start", alignOffset: i = 0, anchor: o, ...c }) {
70
+ function b({ className: e, side: t = "bottom", sideOffset: n = 6, align: r = "start", alignOffset: i = 0, anchor: c, ...l }) {
71
+ let u = o.useContext(p);
62
72
  return /* @__PURE__ */ s(f.Portal, { children: /* @__PURE__ */ s(f.Positioner, {
63
73
  side: t,
64
74
  sideOffset: n,
65
75
  align: r,
66
76
  alignOffset: i,
67
- anchor: o,
77
+ anchor: c ?? u,
68
78
  className: "isolate z-50",
69
- children: /* @__PURE__ */ s(f.Popup, {
70
- "data-slot": "combobox-content",
71
- "data-chips": !!o,
72
- className: a("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
73
- ...c
79
+ children: /* @__PURE__ */ s(m.Provider, {
80
+ value: !0,
81
+ children: /* @__PURE__ */ s(f.Popup, {
82
+ "data-slot": "combobox-content",
83
+ "data-chips": !!c,
84
+ className: a("group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-(--anchor-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", e),
85
+ ...l
86
+ })
74
87
  })
75
88
  }) });
76
89
  }
77
- function y({ className: e, ...t }) {
90
+ function x({ className: e, ...t }) {
78
91
  return /* @__PURE__ */ s(f.List, {
79
92
  "data-slot": "combobox-list",
80
93
  className: a("no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0", e),
81
94
  ...t
82
95
  });
83
96
  }
84
- function b({ className: e, children: t, ...n }) {
97
+ function S({ className: e, children: t, ...n }) {
85
98
  return /* @__PURE__ */ c(f.Item, {
86
99
  "data-slot": "combobox-item",
87
100
  className: a("relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
@@ -92,48 +105,48 @@ function b({ className: e, children: t, ...n }) {
92
105
  })]
93
106
  });
94
107
  }
95
- function x({ className: e, ...t }) {
108
+ function C({ className: e, ...t }) {
96
109
  return /* @__PURE__ */ s(f.Group, {
97
110
  "data-slot": "combobox-group",
98
111
  className: a(e),
99
112
  ...t
100
113
  });
101
114
  }
102
- function S({ className: e, ...t }) {
115
+ function w({ className: e, ...t }) {
103
116
  return /* @__PURE__ */ s(f.GroupLabel, {
104
117
  "data-slot": "combobox-label",
105
118
  className: a("px-2 py-1.5 text-xs text-muted-foreground", e),
106
119
  ...t
107
120
  });
108
121
  }
109
- function C({ ...e }) {
122
+ function T({ ...e }) {
110
123
  return /* @__PURE__ */ s(f.Collection, {
111
124
  "data-slot": "combobox-collection",
112
125
  ...e
113
126
  });
114
127
  }
115
- function w({ className: e, ...t }) {
128
+ function E({ className: e, ...t }) {
116
129
  return /* @__PURE__ */ s(f.Empty, {
117
130
  "data-slot": "combobox-empty",
118
131
  className: a("hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex", e),
119
132
  ...t
120
133
  });
121
134
  }
122
- function T({ className: e, ...t }) {
135
+ function D({ className: e, ...t }) {
123
136
  return /* @__PURE__ */ s(f.Separator, {
124
137
  "data-slot": "combobox-separator",
125
138
  className: a("-mx-1 my-1 h-px bg-border", e),
126
139
  ...t
127
140
  });
128
141
  }
129
- function E({ className: e, ...t }) {
142
+ function O({ className: e, ...t }) {
130
143
  return /* @__PURE__ */ s(f.Chips, {
131
144
  "data-slot": "combobox-chips",
132
145
  className: a("flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40", e),
133
146
  ...t
134
147
  });
135
148
  }
136
- function D({ className: t, children: n, showRemove: r = !0, ...i }) {
149
+ function k({ className: t, children: n, showRemove: r = !0, ...i }) {
137
150
  return /* @__PURE__ */ c(f.Chip, {
138
151
  "data-slot": "combobox-chip",
139
152
  className: a("flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0", t),
@@ -150,16 +163,16 @@ function D({ className: t, children: n, showRemove: r = !0, ...i }) {
150
163
  })]
151
164
  });
152
165
  }
153
- function O({ className: e, ...t }) {
166
+ function A({ className: e, ...t }) {
154
167
  return /* @__PURE__ */ s(f.Input, {
155
168
  "data-slot": "combobox-chip-input",
156
169
  className: a("min-w-16 flex-1 outline-none", e),
157
170
  ...t
158
171
  });
159
172
  }
160
- function k() {
173
+ function j() {
161
174
  return o.useRef(null);
162
175
  }
163
- export { p as Combobox, D as ComboboxChip, E as ComboboxChips, O as ComboboxChipsInput, C as ComboboxCollection, v as ComboboxContent, w as ComboboxEmpty, x as ComboboxGroup, _ as ComboboxInput, b as ComboboxItem, S as ComboboxLabel, y as ComboboxList, T as ComboboxSeparator, h as ComboboxTrigger, m as ComboboxValue, k as useComboboxAnchor };
176
+ export { h as Combobox, k as ComboboxChip, O as ComboboxChips, A as ComboboxChipsInput, T as ComboboxCollection, b as ComboboxContent, E as ComboboxEmpty, C as ComboboxGroup, y as ComboboxInput, S as ComboboxItem, w as ComboboxLabel, x as ComboboxList, D as ComboboxSeparator, _ as ComboboxTrigger, g as ComboboxValue, j as useComboboxAnchor };
164
177
 
165
178
  //# sourceMappingURL=combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","names":["Combobox","ComboboxPrimitive","React","Combobox$1","Combobox","ComboboxValue","props","ComboboxTrigger","cn","className","children","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","InputGroup","InputGroupInput","InputGroupAddon","showTrigger","showClear","ComboboxContent","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor"],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@etic-ui/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@etic-ui/components/ui/input-group\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\n\nconst Combobox = ComboboxPrimitive.Root\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n aria-label=\"Afficher les options\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n aria-label=\"Effacer\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n return (\n <InputGroup className={cn(\"w-auto\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n render={<ComboboxTrigger />}\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n \"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n aria-label=\"Retirer\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"mappings":";;;;;;;;AAaA,IAAMA,IAAWC,EAAkB;AAEnC,SAASI,EAAc,EAAE,GAAGC,KAAwC;CAClE,OAAO,kBAACL,EAAkB,OAAnB;EAAyB,aAAU;EAAiB,GAAIK;CAAQ,CAAA;AACzE;AAEA,SAASC,EAAgB,EACvB,cACA,aACA,GAAGD,KAC+B;CAClC,OACE,kBAACL,EAAkB,SAAnB;EACE,aAAU;EACV,cAAW;EACX,WAAWO,EAAG,wCAAwCC,CAAS;EAC/D,GAAIH;EAJN,UAAA,CAMGI,GACD,kBAACC,GAAD,EAAiB,WAAU,mDAAoD,CAAA,CACtD;;AAE/B;AAEA,SAASC,EAAc,EAAE,cAAW,GAAGN,KAAwC;CAC7E,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,kBAACL,EAAkB,MAAnB;EACE,aAAU;EACV,WAAWO,EACT,8RACAC,CACF;EACA,GAAIH;EANN,UAAA,CAQGI,GACAuB,KACC,kBAAChC,EAAkB,YAAnB;GACE,QAAQ,kBAACiC,GAAD;IAAQ,SAAQ;IAAQ,MAAK;GAAW,CAAA;GAChD,WAAU;GACV,aAAU;GACV,cAAW;GAEX,UAAA,kBAACpB,GAAD,EAAO,WAAU,sBAAuB,CAAA;EACZ,CAAA,CAEV;;AAE5B;AAEA,SAASqB,EAAmB,EAC1B,cACA,GAAG7B,KAC6B;CAChC,OACE,kBAACL,EAAkB,OAAnB;EACE,aAAU;EACV,WAAWO,EAAG,gCAAgCC,CAAS;EACvD,GAAIH;CACL,CAAA;AAEL;AAEA,SAAS8B,IAAoB;CAC3B,OAAOlC,EAAM,OAA8B,IAAI;AACjD"}
1
+ {"version":3,"file":"combobox.js","names":["Combobox","ComboboxPrimitive","React","CadreContext","DansLaListeContext","Combobox$1","cadre","Combobox","props","ComboboxValue","ComboboxTrigger","cn","className","children","ChevronDownIcon","ComboboxClear","InputGroupButton","XIcon","ComboboxInput","dansLaListe","InputGroup","InputGroupInput","InputGroupAddon","showTrigger","showClear","ComboboxContent","anchor","ComboboxList","ComboboxItem","CheckIcon","ComboboxGroup","ComboboxLabel","ComboboxCollection","ComboboxEmpty","ComboboxSeparator","ComboboxChips","ComboboxChip","showRemove","Button","ComboboxChipsInput","useComboboxAnchor"],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["import * as React from \"react\"\n// Écart avec shadcn : import par sous-chemin, pas par la racine de Base UI\n// (qui fait charger tous ses composants aux outils sans tree-shaking).\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@etic-ui/components/ui/button\"\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@etic-ui/components/ui/input-group\"\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\"\n\n// Écart avec shadcn : la liste s'ancre sur le cadre (`InputGroup`) du\n// `ComboboxInput`, et non sur le seul champ, que décale un addon de tête\n// (loupe…). `Combobox` porte une ref vers ce cadre, que `ComboboxInput`\n// remplit et que `ComboboxContent` passe à `anchor` : Base UI la lit à\n// l'ouverture, `defaultOpen` compris, sans rendu de plus. Une `anchor`\n// explicite (puces) l'emporte ; sans `ComboboxInput` hors de la liste, la\n// ref reste vide et Base UI ancre sur le déclencheur, comme shadcn. Un\n// `ComboboxInput` placé dans la liste (recherche d'un sélecteur ouvert par\n// un bouton) ne s'enregistre pas.\nconst CadreContext =\n React.createContext<React.RefObject<HTMLDivElement | null> | null>(null)\nconst DansLaListeContext = React.createContext(false)\n\nfunction Combobox<\n Value,\n Multiple extends boolean | undefined = false,\n Item = Value,\n>(props: ComboboxPrimitive.Root.Props<Value, Multiple, Item>) {\n const cadre = React.useRef<HTMLDivElement | null>(null)\n return (\n <CadreContext.Provider value={cadre}>\n <ComboboxPrimitive.Root {...props} />\n </CadreContext.Provider>\n )\n}\n\nfunction ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Trigger.Props) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n aria-label=\"Afficher les options\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"pointer-events-none size-4 text-muted-foreground\" />\n </ComboboxPrimitive.Trigger>\n )\n}\n\nfunction ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n aria-label=\"Effacer\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n )\n}\n\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxPrimitive.Input.Props & {\n showTrigger?: boolean\n showClear?: boolean\n}) {\n const dansLaListe = React.useContext(DansLaListeContext)\n const cadre = React.useContext(CadreContext)\n return (\n <InputGroup\n ref={dansLaListe ? undefined : (cadre ?? undefined)}\n className={cn(\"w-auto\", className)}\n >\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n render={<ComboboxTrigger />}\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n )\n}\n\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >) {\n const cadre = React.useContext(CadreContext)\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor ?? cadre}\n className=\"isolate z-50\"\n >\n <DansLaListeContext.Provider value={true}>\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n // Écart : `min-w-(--anchor-width)` au lieu de l'ancre + 28 px\n // de shadcn, qui couvraient l'addon d'un champ seul ; ancrée\n // sur le cadre entier, la liste en prend la largeur exacte.\n \"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-(--anchor-width) origin-(--transform-origin) overflow-hidden rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </DansLaListeContext.Provider>\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n )\n}\n\nfunction ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...props\n}: ComboboxPrimitive.Item.Props) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n )\n}\n\nfunction ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxLabel({\n className,\n ...props\n}: ComboboxPrimitive.GroupLabel.Props) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"px-2 py-1.5 text-xs text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n )\n}\n\nfunction ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxSeparator({\n className,\n ...props\n}: ComboboxPrimitive.Separator.Props) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction ComboboxChips({\n className,\n ...props\n}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &\n ComboboxPrimitive.Chips.Props) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxPrimitive.Chip.Props & {\n showRemove?: boolean\n}) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0\",\n className\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n aria-label=\"Retirer\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n )\n}\n\nfunction ComboboxChipsInput({\n className,\n ...props\n}: ComboboxPrimitive.Input.Props) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n )\n}\n\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null)\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n}\n"],"mappings":";;;;;;;;AAwBA,IAAMG,IACJD,EAAM,cAA6D,IAAI,GACnEE,IAAqBF,EAAM,cAAc,EAAK;AAEpD,SAASF,EAIP,GAA4D;CAC5D,IAAMM,IAAQJ,EAAM,OAA8B,IAAI;CACtD,OACE,kBAACC,EAAa,UAAd;EAAuB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B;CAC3B,OAAOtC,EAAM,OAA8B,IAAI;AACjD"}
@@ -8,10 +8,19 @@ declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop
8
8
  declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
9
9
  showCloseButton?: boolean;
10
10
  }): React.JSX.Element;
11
+ /**
12
+ * Corps d'un dialogue (absent de shadcn), entre l'en-tête et le pied : seul
13
+ * à défiler quand le dialogue atteint sa hauteur maximale, en-tête, croix et
14
+ * pied restant visibles. Il déborde dans la marge du dialogue (`-mx-4 px-4`,
15
+ * `-my-1 py-1`) pour que la barre de défilement soit au bord et que l'anneau
16
+ * de focus d'un champ ne soit pas rogné. Sans lui, tout le contenu défile.
17
+ * Sert aussi dans un `AlertDialogContent`.
18
+ */
19
+ declare function DialogBody({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
20
  declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
21
  declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
13
22
  showCloseButton?: boolean;
14
23
  }): React.JSX.Element;
15
24
  declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
16
25
  declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
17
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
26
+ export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -39,7 +39,7 @@ function u({ className: e, ...r }) {
39
39
  function d({ className: o, children: s, showCloseButton: l = !0, ...d }) {
40
40
  return /* @__PURE__ */ r(c, { children: [/* @__PURE__ */ n(u, {}), /* @__PURE__ */ r(a.Popup, {
41
41
  "data-slot": "dialog-content",
42
- className: t("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
42
+ className: t("fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-x-hidden overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", o),
43
43
  ...d,
44
44
  children: [s, l && /* @__PURE__ */ r(a.Close, {
45
45
  "data-slot": "dialog-close",
@@ -56,13 +56,20 @@ function d({ className: o, children: s, showCloseButton: l = !0, ...d }) {
56
56
  })] });
57
57
  }
58
58
  function f({ className: e, ...r }) {
59
+ return /* @__PURE__ */ n("div", {
60
+ "data-slot": "dialog-body",
61
+ className: t("-mx-4 -my-1 grid min-h-0 auto-rows-min grid-cols-1 gap-4 overflow-x-hidden overflow-y-auto px-4 py-1", e),
62
+ ...r
63
+ });
64
+ }
65
+ function p({ className: e, ...r }) {
59
66
  return /* @__PURE__ */ n("div", {
60
67
  "data-slot": "dialog-header",
61
68
  className: t("flex flex-col gap-2", e),
62
69
  ...r
63
70
  });
64
71
  }
65
- function p({ className: i, showCloseButton: o = !1, children: s, ...c }) {
72
+ function m({ className: i, showCloseButton: o = !1, children: s, ...c }) {
66
73
  return /* @__PURE__ */ r("div", {
67
74
  "data-slot": "dialog-footer",
68
75
  className: t("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end", i),
@@ -73,20 +80,20 @@ function p({ className: i, showCloseButton: o = !1, children: s, ...c }) {
73
80
  })]
74
81
  });
75
82
  }
76
- function m({ className: e, ...r }) {
83
+ function h({ className: e, ...r }) {
77
84
  return /* @__PURE__ */ n(a.Title, {
78
85
  "data-slot": "dialog-title",
79
86
  className: t("font-heading text-base leading-none font-medium", e),
80
87
  ...r
81
88
  });
82
89
  }
83
- function h({ className: e, ...r }) {
90
+ function g({ className: e, ...r }) {
84
91
  return /* @__PURE__ */ n(a.Description, {
85
92
  "data-slot": "dialog-description",
86
93
  className: t("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", e),
87
94
  ...r
88
95
  });
89
96
  }
90
- export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
97
+ export { o as Dialog, f as DialogBody, l as DialogClose, d as DialogContent, g as DialogDescription, m as DialogFooter, p as DialogHeader, u as DialogOverlay, c as DialogPortal, h as DialogTitle, s as DialogTrigger };
91
98
 
92
99
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":["Dialog","DialogPrimitive","Dialog$1","props","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","cn","className","DialogContent","children","showCloseButton","Button","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@etic-ui/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">Fermer</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Fermer\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;AAOA,SAASA,EAAO,EAAE,GAAGG,KAAqC;CACxD,OAAO,kBAACF,EAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAIE;CAAQ,CAAA;AAC9D;AAEA,SAASE,EAAc,EAAE,GAAGF,KAAwC;CAClE,OAAO,kBAACF,EAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAIE;CAAQ,CAAA;AACzE;AAEA,SAASG,EAAa,EAAE,GAAGH,KAAuC;CAChE,OAAO,kBAACF,EAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAIE;CAAQ,CAAA;AACvE;AAEA,SAASI,EAAY,EAAE,GAAGJ,KAAsC;CAC9D,OAAO,kBAACF,EAAgB,OAAjB;EAAuB,aAAU;EAAe,GAAIE;CAAQ,CAAA;AACrE;AAEA,SAASK,EAAc,EACrB,cACA,G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CACpC,OACE,kBAACF,EAAgB,aAAjB;EACE,aAAU;EACV,WAAWQ,EACT,sGACAC,CACF;EACA,GAAIP;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"dialog.js","names":["Dialog","DialogPrimitive","Dialog$1","props","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","cn","className","DialogContent","children","showCloseButton","Button","XIcon","DialogBody","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\nimport { cn } from \"cn\"\n\nimport { Button } from \"@etic-ui/components/ui/button\"\nimport { XIcon } from \"lucide-react\"\n\nfunction Dialog({ ...props }: DialogPrimitive.Root.Props) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogPrimitive.Close.Props) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogPrimitive.Backdrop.Props) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogPrimitive.Popup.Props & {\n showCloseButton?: boolean\n}) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-2rem)] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 flex-col gap-4 overflow-x-hidden overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">Fermer</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\n/**\n * Corps d'un dialogue (absent de shadcn), entre l'en-tête et le pied : seul\n * à défiler quand le dialogue atteint sa hauteur maximale, en-tête, croix et\n * pied restant visibles. Il déborde dans la marge du dialogue (`-mx-4 px-4`,\n * `-my-1 py-1`) pour que la barre de défilement soit au bord et que l'anneau\n * de focus d'un champ ne soit pas rogné. Sans lui, tout le contenu défile.\n * Sert aussi dans un `AlertDialogContent`.\n */\nfunction DialogBody({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn(\n // Grille à lignes `min-content` : ses enfants gardent leur hauteur\n // (une liste qui défile elle-même n'est pas écrasée), le corps défile.\n // Une colonne `minmax(0, 1fr)` : un mot trop long ne l'élargit pas.\n \"-mx-4 -my-1 grid min-h-0 auto-rows-min grid-cols-1 gap-4 overflow-x-hidden overflow-y-auto px-4 py-1\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Fermer\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\n \"font-heading text-base leading-none font-medium\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogPrimitive.Description.Props) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogBody,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;AAOA,SAASA,EAAO,EAAE,GAAGG,KAAqC;CACxD,OAAO,kBAACF,EAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAIE;CAAQ,CAAA;AAC9D;AAEA,SAASE,EAAc,EAAE,GAAGF,KAAwC;CAClE,OAAO,kBAACF,EAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAIE;CAAQ,CAAA;AACzE;AAEA,SAASG,EAAa,EAAE,GAAGH,KAAuC;CAChE,OAAO,kBAACF,EAAgB,QAAjB;EAAwB,aAAU;EAAgB,GAAIE;CAAQ,CAAA;AACvE;AAEA,SAASI,EAAY,EAAE,GAAGJ,KAAsC;CAC9D,OAAO,kBAACF,EAAgB,OAAjB;EAAuB,aA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AEtB;;AAET;AAEA,SAASK,EAAY,EAAE,cAAW,GAAGhB,KAAsC;CACzE,OACE,kBAACF,EAAgB,OAAjB;EACE,aAAU;EACV,WAAWQ,EACT,mDACAC,CACF;EACA,GAAIP;CACL,CAAA;AAEL;AAEA,SAASiB,EAAkB,EACzB,cACA,GAAGjB,KACiC;CACpC,OACE,kBAACF,EAAgB,aAAjB;EACE,aAAU;EACV,WAAWQ,EACT,sGACAC,CACF;EACA,GAAIP;CACL,CAAA;AAEL"}
@@ -3,7 +3,7 @@ import { Button } from './button';
3
3
  import * as React from "react";
4
4
  declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
5
  declare const inputGroupAddonVariants: (props?: ({
6
- align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
6
+ align?: "inline-start" | "inline-end" | "block-end" | "block-start" | null | undefined;
7
7
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
8
  declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
9
9
  declare const inputGroupButtonVariants: (props?: ({
@@ -2,7 +2,7 @@ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
2
2
  import * as React from "react";
3
3
  declare function Popover({ ...props }: PopoverPrimitive.Root.Props): React.JSX.Element;
4
4
  declare function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props): React.JSX.Element;
5
- declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): React.JSX.Element;
5
+ declare function PopoverContent({ className, align, alignOffset, side, sideOffset, anchor, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "anchor">): React.JSX.Element;
6
6
  declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
7
  declare function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): React.JSX.Element;
8
8
  declare function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): React.JSX.Element;
@@ -15,8 +15,9 @@ function i({ ...e }) {
15
15
  ...e
16
16
  });
17
17
  }
18
- function a({ className: r, align: i = "center", alignOffset: a = 0, side: o = "bottom", sideOffset: s = 4, ...c }) {
18
+ function a({ className: r, align: i = "center", alignOffset: a = 0, side: o = "bottom", sideOffset: s = 4, anchor: c, ...l }) {
19
19
  return /* @__PURE__ */ t(n.Portal, { children: /* @__PURE__ */ t(n.Positioner, {
20
+ anchor: c,
20
21
  align: i,
21
22
  alignOffset: a,
22
23
  side: o,
@@ -25,7 +26,7 @@ function a({ className: r, align: i = "center", alignOffset: a = 0, side: o = "b
25
26
  children: /* @__PURE__ */ t(n.Popup, {
26
27
  "data-slot": "popover-content",
27
28
  className: e("z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", r),
28
- ...c
29
+ ...l
29
30
  })
30
31
  }) });
31
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"popover.js","names":["Popover","PopoverPrimitive","Popover$1","props","Popover","PopoverTrigger","PopoverContent","cn","className","PopoverHeader","PopoverTitle","PopoverDescription"],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;AAIA,SAASA,EAAQ,EAAE,GAAGG,KAAsC;CAC1D,OAAO,kBAACF,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIE;CAAQ,CAAA;AAChE;AAEA,SAASE,EAAe,EAAE,GAAGF,KAAyC;CACpE,OAAO,kBAACF,EAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAIE;CAAQ,CAAA;AAC3E;AAEA,SAASG,EAAe,EACtB,cACA,WAAQ,UACR,iBAAc,GACd,UAAO,UACP,gBAAa,GACb,GAAGH,KAKA;CACH,OACE,kBAACF,EAAiB,QAAlB,EAAA,UACE,kBAACA,EAAiB,YAAlB;EACS;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,kBAACA,EAAiB,OAAlB;GACE,aAAU;GACV,WAAWM,EACT,ujBACAC,CACF;GACA,GAAIL;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B;AAEA,SAASM,EAAc,EAAE,cAAW,GAAGN,KAAsC;CAC3E,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAWI,EAAG,iCAAiCC,CAAS;EACxD,GAAIL;CACL,CAAA;AAEL;AAEA,SAASO,EAAa,EAAE,cAAW,GAAGP,KAAuC;CAC3E,OACE,kBAACF,EAAiB,OAAlB;EACE,aAAU;EACV,WAAWM,EAAG,eAAeC,CAAS;EACtC,GAAIL;CACL,CAAA;AAEL;AAEA,SAASQ,EAAmB,EAC1B,cACA,GAAGR,KACkC;CACrC,OACE,kBAACF,EAAiB,aAAlB;EACE,aAAU;EACV,WAAWM,EAAG,yBAAyBC,CAAS;EAChD,GAAIL;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"popover.js","names":["Popover","PopoverPrimitive","Popover$1","props","Popover","PopoverTrigger","PopoverContent","cn","className","PopoverHeader","PopoverTitle","PopoverDescription"],"sources":["../../../src/components/ui/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\nimport { cn } from \"cn\"\n\nfunction Popover({ ...props }: PopoverPrimitive.Root.Props) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n anchor,\n ...props\n}: PopoverPrimitive.Popup.Props &\n // Ajout ETIC : `anchor`, pour un popover sans `PopoverTrigger`\n // (`Toggletip`, ancré sur l'élément qu'il explique).\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"anchor\"\n >) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n anchor={anchor}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-0.5 text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction PopoverDescription({\n className,\n ...props\n}: PopoverPrimitive.Description.Props) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n}\n"],"mappings":";;;;;AAIA,SAASA,EAAQ,EAAE,GAAGG,KAAsC;CAC1D,OAAO,kBAACF,EAAiB,MAAlB;EAAuB,aAAU;EAAU,GAAIE;CAAQ,CAAA;AAChE;AAEA,SAASE,EAAe,EAAE,GAAGF,KAAyC;CACpE,OAAO,kBAACF,EAAiB,SAAlB;EAA0B,aAAU;EAAkB,GAAIE;CAAQ,CAAA;AAC3E;AAEA,SAASG,EAAe,EACtB,cACA,WAAQ,UACR,iBAAc,GACd,UAAO,UACP,gBAAa,GACb,WACA,GAAGH,KAOA;CACH,OACE,kBAACF,EAAiB,QAAlB,EAAA,UACE,kBAACA,EAAiB,YAAlB;EACU;EACD;EACM;EACP;EACM;EACZ,WAAU;EAEV,UAAA,kBAACA,EAAiB,OAAlB;GACE,aAAU;GACV,WAAWM,EACT,ujBACAC,CACF;GACA,GAAIL;EACL,CAAA;CAC0B,CAAA,EACN,CAAA;AAE7B;AAEA,SAASM,EAAc,EAAE,cAAW,GAAGN,KAAsC;CAC3E,OACE,kBAAC,OAAD;EACE,aAAU;EACV,WAAWI,EAAG,iCAAiCC,CAAS;EACxD,GAAIL;CACL,CAAA;AAEL;AAEA,SAASO,EAAa,EAAE,cAAW,GAAGP,KAAuC;CAC3E,OACE,kBAACF,EAAiB,OAAlB;EACE,aAAU;EACV,WAAWM,EAAG,eAAeC,CAAS;EACtC,GAAIL;CACL,CAAA;AAEL;AAEA,SAASQ,EAAmB,EAC1B,cACA,GAAGR,KACkC;CACrC,OACE,kBAACF,EAAiB,aAAlB;EACE,aAAU;EACV,WAAWM,EAAG,yBAAyBC,CAAS;EAChD,GAAIL;CACL,CAAA;AAEL"}
@@ -1,7 +1,21 @@
1
1
  import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
2
- declare function Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props): import("react").JSX.Element;
2
+ import { StatusTon } from '../../lib/ton';
3
+ declare const TAILLES: {
4
+ readonly default: "";
5
+ readonly lg: "h-2";
6
+ };
7
+ type ProgressProps = ProgressPrimitive.Root.Props & {
8
+ /** Couleur de la piste et du remplissage : « warning » au-delà d'un seuil
9
+ * d'alerte, « destructive » quand c'est plein. « neutral » (par défaut) :
10
+ * l'accent. */
11
+ ton?: StatusTon;
12
+ /** Épaisseur de la piste : 4 px par défaut, comme shadcn ; « lg » (8 px)
13
+ * pour une jauge qui se lit seule. */
14
+ size?: keyof typeof TAILLES;
15
+ };
16
+ declare function Progress({ className, children, value, ton, size, ...props }: ProgressProps): import("react").JSX.Element;
3
17
  declare function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props): import("react").JSX.Element;
4
18
  declare function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props): import("react").JSX.Element;
5
19
  declare function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props): import("react").JSX.Element;
6
20
  declare function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props): import("react").JSX.Element;
7
- export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
21
+ export { Progress, type ProgressProps, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
@@ -1,45 +1,53 @@
1
1
  "use client";
2
- import { cn as e } from "cn";
3
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
- import { Progress as r } from "@base-ui/react/progress";
2
+ import { TONS as e } from "../../lib/ton.js";
3
+ import { cn as t } from "cn";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { Progress as i } from "@base-ui/react/progress";
5
6
  // src/components/ui/progress.tsx
6
- function i({ className: i, children: s, value: c, ...l }) {
7
- return /* @__PURE__ */ n(r.Root, {
8
- value: c,
7
+ var a = {
8
+ default: "",
9
+ lg: "h-2"
10
+ };
11
+ function o({ className: o, children: l, value: u, ton: d = "neutral", size: f = "default", ...p }) {
12
+ return /* @__PURE__ */ r(i.Root, {
13
+ value: u,
9
14
  "data-slot": "progress",
10
- className: e("flex flex-wrap gap-3", i),
11
- ...l,
12
- children: [s, /* @__PURE__ */ t(a, { children: /* @__PURE__ */ t(o, {}) })]
15
+ className: t("flex flex-wrap gap-3", o),
16
+ ...p,
17
+ children: [l, /* @__PURE__ */ n(s, {
18
+ className: t(e[d].piste, a[f]),
19
+ children: /* @__PURE__ */ n(c, { className: e[d].remplissage })
20
+ })]
13
21
  });
14
22
  }
15
- function a({ className: n, ...i }) {
16
- return /* @__PURE__ */ t(r.Track, {
17
- className: e("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", n),
23
+ function s({ className: e, ...r }) {
24
+ return /* @__PURE__ */ n(i.Track, {
25
+ className: t("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", e),
18
26
  "data-slot": "progress-track",
19
- ...i
27
+ ...r
20
28
  });
21
29
  }
22
- function o({ className: n, ...i }) {
23
- return /* @__PURE__ */ t(r.Indicator, {
30
+ function c({ className: e, ...r }) {
31
+ return /* @__PURE__ */ n(i.Indicator, {
24
32
  "data-slot": "progress-indicator",
25
- className: e("h-full bg-primary transition-all", n),
26
- ...i
33
+ className: t("h-full bg-primary transition-all", e),
34
+ ...r
27
35
  });
28
36
  }
29
- function s({ className: n, ...i }) {
30
- return /* @__PURE__ */ t(r.Label, {
31
- className: e("text-sm font-medium", n),
37
+ function l({ className: e, ...r }) {
38
+ return /* @__PURE__ */ n(i.Label, {
39
+ className: t("text-sm font-medium", e),
32
40
  "data-slot": "progress-label",
33
- ...i
41
+ ...r
34
42
  });
35
43
  }
36
- function c({ className: n, ...i }) {
37
- return /* @__PURE__ */ t(r.Value, {
38
- className: e("ml-auto text-sm text-muted-foreground tabular-nums", n),
44
+ function u({ className: e, ...r }) {
45
+ return /* @__PURE__ */ n(i.Value, {
46
+ className: t("ml-auto text-sm text-muted-foreground tabular-nums", e),
39
47
  "data-slot": "progress-value",
40
- ...i
48
+ ...r
41
49
  });
42
50
  }
43
- export { i as Progress, o as ProgressIndicator, s as ProgressLabel, a as ProgressTrack, c as ProgressValue };
51
+ export { o as Progress, c as ProgressIndicator, l as ProgressLabel, s as ProgressTrack, u as ProgressValue };
44
52
 
45
53
  //# sourceMappingURL=progress.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":["Progress","ProgressPrimitive","Progress$1","props","Progress","cn","className","children","ProgressTrack","ProgressIndicator","ProgressLabel","ProgressValue"],"sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\"\n\nimport { Progress as ProgressPrimitive } from \"@base-ui/react/progress\"\nimport { cn } from \"cn\"\n\nfunction Progress({\n className,\n children,\n value,\n ...props\n}: ProgressPrimitive.Root.Props) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot=\"progress\"\n className={cn(\"flex flex-wrap gap-3\", className)}\n {...props}\n >\n {children}\n <ProgressTrack>\n <ProgressIndicator />\n </ProgressTrack>\n </ProgressPrimitive.Root>\n )\n}\n\nfunction ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n \"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted\",\n className\n )}\n data-slot=\"progress-track\"\n {...props}\n />\n )\n}\n\nfunction ProgressIndicator({\n className,\n ...props\n}: ProgressPrimitive.Indicator.Props) {\n return (\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\"h-full bg-primary transition-all\", className)}\n {...props}\n />\n )\n}\n\nfunction ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {\n return (\n <ProgressPrimitive.Label\n className={cn(\"text-sm font-medium\", className)}\n data-slot=\"progress-label\"\n {...props}\n />\n )\n}\n\nfunction ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {\n return (\n <ProgressPrimitive.Value\n className={cn(\n \"ml-auto text-sm text-muted-foreground tabular-nums\",\n className\n )}\n data-slot=\"progress-value\"\n {...props}\n />\n )\n}\n\nexport {\n Progress,\n ProgressTrack,\n ProgressIndicator,\n ProgressLabel,\n ProgressValue,\n}\n"],"mappings":";;;;;AAKA,SAASA,EAAS,EAChB,cACA,aACA,UACA,GAAGG,KAC4B;CAC/B,OACE,kBAACF,EAAkB,MAAnB;EACS;EACP,aAAU;EACV,WAAWI,EAAG,wBAAwBC,CAAS;EAC/C,GAAIH;EAJN,UAAA,CAMGI,GACD,kBAACC,GAAD,EAAA,UACE,kBAACC,GAAD,CAAoB,CAAA,EACP,CAAA,CACO;;AAE5B;AAEA,SAASD,EAAc,EAAE,cAAW,GAAGL,KAAwC;CAC7E,OACE,kBAACF,EAAkB,OAAnB;EACE,WAAWI,EACT,iFACAC,CACF;EACA,aAAU;EACV,GAAIH;CACL,CAAA;AAEL;AAEA,SAASM,EAAkB,EACzB,cACA,GAAGN,KACiC;CACpC,OACE,kBAACF,EAAkB,WAAnB;EACE,aAAU;EACV,WAAWI,EAAG,oCAAoCC,CAAS;EAC3D,GAAIH;CACL,CAAA;AAEL;AAEA,SAASO,EAAc,EAAE,cAAW,GAAGP,KAAwC;CAC7E,OACE,kBAACF,EAAkB,OAAnB;EACE,WAAWI,EAAG,uBAAuBC,CAAS;EAC9C,aAAU;EACV,GAAIH;CACL,CAAA;AAEL;AAEA,SAASQ,EAAc,EAAE,cAAW,GAAGR,KAAwC;CAC7E,OACE,kBAACF,EAAkB,OAAnB;EACE,WAAWI,EACT,sDACAC,CACF;EACA,aAAU;EACV,GAAIH;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"progress.js","names":["Progress","ProgressPrimitive","TAILLES","Progress$1","props","Progress","cn","className","children","ProgressTrack","TONS","ton","size","ProgressIndicator","ProgressLabel","ProgressValue"],"sources":["../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\"\n\nimport { Progress as ProgressPrimitive } from \"@base-ui/react/progress\"\nimport { cn } from \"cn\"\n\nimport { TONS, type StatusTon } from \"@etic-ui/lib/ton\"\n\n// Écart avec shadcn : `ton` et `size` (voir ecarts-shadcn.test.ts), pour\n// qu'une jauge d'occupation change de couleur et d'épaisseur sans viser ses\n// parties par sélecteurs `[data-slot=…]`. « neutral » garde l'accent de\n// shadcn.\nconst TAILLES = { default: \"\", lg: \"h-2\" } as const\n\ntype ProgressProps = ProgressPrimitive.Root.Props & {\n /** Couleur de la piste et du remplissage : « warning » au-delà d'un seuil\n * d'alerte, « destructive » quand c'est plein. « neutral » (par défaut) :\n * l'accent. */\n ton?: StatusTon\n /** Épaisseur de la piste : 4 px par défaut, comme shadcn ; « lg » (8 px)\n * pour une jauge qui se lit seule. */\n size?: keyof typeof TAILLES\n}\n\nfunction Progress({\n className,\n children,\n value,\n ton = \"neutral\",\n size = \"default\",\n ...props\n}: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot=\"progress\"\n className={cn(\"flex flex-wrap gap-3\", className)}\n {...props}\n >\n {children}\n <ProgressTrack className={cn(TONS[ton].piste, TAILLES[size])}>\n <ProgressIndicator className={TONS[ton].remplissage} />\n </ProgressTrack>\n </ProgressPrimitive.Root>\n )\n}\n\nfunction ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n \"relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted\",\n className\n )}\n data-slot=\"progress-track\"\n {...props}\n />\n )\n}\n\nfunction ProgressIndicator({\n className,\n ...props\n}: ProgressPrimitive.Indicator.Props) {\n return (\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\"h-full bg-primary transition-all\", className)}\n {...props}\n />\n )\n}\n\nfunction ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {\n return (\n <ProgressPrimitive.Label\n className={cn(\"text-sm font-medium\", className)}\n data-slot=\"progress-label\"\n {...props}\n />\n )\n}\n\nfunction ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {\n return (\n <ProgressPrimitive.Value\n className={cn(\n \"ml-auto text-sm text-muted-foreground tabular-nums\",\n className\n )}\n data-slot=\"progress-value\"\n {...props}\n />\n )\n}\n\nexport {\n Progress,\n type ProgressProps,\n ProgressTrack,\n ProgressIndicator,\n ProgressLabel,\n ProgressValue,\n}\n"],"mappings":";;;;;;AAWA,IAAME,IAAU;CAAE,SAAS;CAAI,IAAI;AAAM;AAYzC,SAASF,EAAS,EAChB,cACA,aACA,UACA,SAAM,WACN,UAAO,WACP,GAAGI,KACa;CAChB,OACE,kBAACH,EAAkB,MAAnB;EACS;EACP,aAAU;EACV,WAAWK,EAAG,wBAAwBC,CAAS;EAC/C,GAAIH;EAJN,UAAA,CAMGI,GACD,kBAACC,GAAD;GAAe,WAAWH,EAAGI,EAAKC,EAAI,CAAC,OAAOT,EAAQU,EAAK;GACzD,UAAA,kBAACC,GAAD,EAAmB,WAAWH,EAAKC,EAAI,CAAC,YAAc,CAAA;EACzC,CAAA,CACO;;AAE5B;AAEA,SAASF,EAAc,EAAE,cAAW,GAAGL,KAAwC;CAC7E,OACE,kBAACH,EAAkB,OAAnB;EACE,WAAWK,EACT,iFACAC,CACF;EACA,aAAU;EACV,GAAIH;CACL,CAAA;AAEL;AAEA,SAASS,EAAkB,EACzB,cACA,GAAGT,KACiC;CACpC,OACE,kBAACH,EAAkB,WAAnB;EACE,aAAU;EACV,WAAWK,EAAG,oCAAoCC,CAAS;EAC3D,GAAIH;CACL,CAAA;AAEL;AAEA,SAASU,EAAc,EAAE,cAAW,GAAGV,KAAwC;CAC7E,OACE,kBAACH,EAAkB,OAAnB;EACE,WAAWK,EAAG,uBAAuBC,CAAS;EAC9C,aAAU;EACV,GAAIH;CACL,CAAA;AAEL;AAEA,SAASW,EAAc,EAAE,cAAW,GAAGX,KAAwC;CAC7E,OACE,kBAACH,EAAkB,OAAnB;EACE,WAAWK,EACT,sDACAC,CACF;EACA,aAAU;EACV,GAAIH;CACL,CAAA;AAEL"}
@@ -13,7 +13,7 @@ function i({ className: n, ...i }) {
13
13
  function a({ className: r, ...i }) {
14
14
  return /* @__PURE__ */ t(n.Root, {
15
15
  "data-slot": "radio-group-item",
16
- className: e("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", r),
16
+ className: e("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-(--control-border) outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-(--control-border) after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary", r),
17
17
  ...i,
18
18
  children: /* @__PURE__ */ t(n.Indicator, {
19
19
  "data-slot": "radio-group-indicator",
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","names":["RadioGroup","RadioGroupPrimitive","RadioPrimitive","RadioGroup$1","props","RadioGroup","cn","className","RadioGroupItem","Radio"],"sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["import { Radio as RadioPrimitive } from \"@base-ui/react/radio\"\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\"\nimport { cn } from \"cn\"\n\nfunction RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {\n return (\n <RadioGroupPrimitive\n data-slot=\"radio-group\"\n className={cn(\"grid w-full gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex size-4 items-center justify-center\"\n >\n <span className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground\" />\n </RadioPrimitive.Indicator>\n </RadioPrimitive.Root>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;AAIA,SAASA,EAAW,EAAE,cAAW,GAAGI,KAAoC;CACtE,OACE,kBAACH,GAAD;EACE,aAAU;EACV,WAAWK,EAAG,qBAAqBC,CAAS;EAC5C,GAAIH;CACL,CAAA;AAEL;AAEA,SAASI,EAAe,EAAE,cAAW,GAAGJ,KAAoC;CAC1E,OACE,kBAACF,EAAe,MAAhB;EACE,aAAU;EACV,WAAWI,EACT,6yBACAC,CACF;EACA,GAAIH;EAEJ,UAAA,kBAACF,EAAe,WAAhB;GACE,aAAU;GACV,WAAU;GAEV,UAAA,kBAAC,QAAD,EAAM,WAAU,wGAAyG,CAAA;EACjG,CAAA;CACP,CAAA;AAEzB"}
1
+ {"version":3,"file":"radio-group.js","names":["RadioGroup","RadioGroupPrimitive","RadioPrimitive","RadioGroup$1","props","RadioGroup","cn","className","RadioGroupItem","Radio"],"sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["import { Radio as RadioPrimitive } from \"@base-ui/react/radio\"\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\"\nimport { cn } from \"cn\"\n\nfunction RadioGroup({ className, ...props }: RadioGroupPrimitive.Props) {\n return (\n <RadioGroupPrimitive\n data-slot=\"radio-group\"\n className={cn(\"grid w-full gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-(--control-border) outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-(--control-border) after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary\",\n className\n )}\n {...props}\n >\n <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"flex size-4 items-center justify-center\"\n >\n <span className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground\" />\n </RadioPrimitive.Indicator>\n </RadioPrimitive.Root>\n )\n}\n\nexport { RadioGroup, RadioGroupItem }\n"],"mappings":";;;;;AAIA,SAASA,EAAW,EAAE,cAAW,GAAGI,KAAoC;CACtE,OACE,kBAACH,GAAD;EACE,aAAU;EACV,WAAWK,EAAG,qBAAqBC,CAAS;EAC5C,GAAIH;CACL,CAAA;AAEL;AAEA,SAASI,EAAe,EAAE,cAAW,GAAGJ,KAAoC;CAC1E,OACE,kBAACF,EAAe,MAAhB;EACE,aAAU;EACV,WAAWI,EACT,u0BACAC,CACF;EACA,GAAIH;EAEJ,UAAA,kBAACF,EAAe,WAAhB;GACE,aAAU;GACV,WAAU;GAEV,UAAA,kBAAC,QAAD,EAAM,WAAU,wGAAyG,CAAA;EACjG,CAAA;CACP,CAAA;AAEzB"}