design-zystem 1.0.433 → 1.0.435

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui/index.js CHANGED
@@ -2266,6 +2266,7 @@ var Tabs = ({
2266
2266
  // src/ui/components/ui/Modal.tsx
2267
2267
  var import_react23 = require("react");
2268
2268
  var RadixDialog = __toESM(require("@radix-ui/react-dialog"));
2269
+ var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer");
2269
2270
 
2270
2271
  // src/ui/lib/layers.ts
2271
2272
  var MODAL_LAYER = "z-[1000]";
@@ -2369,6 +2370,8 @@ var Modal = ({
2369
2370
  const lastPointRef = (0, import_react23.useRef)({ x: 0, y: 0 });
2370
2371
  const contentRef = (0, import_react23.useRef)(null);
2371
2372
  const overlayRef = (0, import_react23.useRef)(null);
2373
+ const markOverlaySurface = (0, import_react_dismissable_layer.useDismissableLayerSurface)();
2374
+ const markContentSurface = (0, import_react_dismissable_layer.useDismissableLayerSurface)();
2372
2375
  useAllowPortalScroll(open, contentRef, overlayRef);
2373
2376
  useKeepLayersAboveUsable(open, contentRef);
2374
2377
  (0, import_react23.useEffect)(() => {
@@ -2406,7 +2409,10 @@ var Modal = ({
2406
2409
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2407
2410
  RadixDialog.Overlay,
2408
2411
  {
2409
- ref: overlayRef,
2412
+ ref: (node) => {
2413
+ overlayRef.current = node;
2414
+ markOverlaySurface(node);
2415
+ },
2410
2416
  "data-drawer-keep-open": true,
2411
2417
  onClick: (event) => event.stopPropagation(),
2412
2418
  className: cn(
@@ -2420,7 +2426,10 @@ var Modal = ({
2420
2426
  /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2421
2427
  RadixDialog.Content,
2422
2428
  {
2423
- ref: contentRef,
2429
+ ref: (node) => {
2430
+ contentRef.current = node;
2431
+ markContentSurface(node);
2432
+ },
2424
2433
  onOpenAutoFocus,
2425
2434
  onInteractOutside: (event) => {
2426
2435
  if (isMountedAbove(event.target, contentRef.current))
@@ -3665,7 +3674,7 @@ var TableBody = ({
3665
3674
  {
3666
3675
  className: cn(
3667
3676
  "text-neutral-800",
3668
- useEvenBackground && "[&>tr:nth-child(even)]:bg-grey-100",
3677
+ useEvenBackground ? "[&>tr:nth-child(even)>td[data-sticky]]:bg-grey-100 [&>tr:nth-child(even)]:bg-grey-100 [&>tr:nth-child(odd):hover>td[data-sticky]]:[box-shadow:inset_0_0_0_100vmax_rgb(0_0_0/0.025)]" : "[&>tr:hover>td[data-sticky]]:[box-shadow:inset_0_0_0_100vmax_rgb(0_0_0/0.025)]",
3669
3678
  isLined && "[&>tr>td]:border-t [&>tr>td]:border-grey-200 [&>tr>th]:border-t [&>tr>th]:border-grey-200",
3670
3679
  className
3671
3680
  ),
@@ -4207,8 +4216,24 @@ var TableRow = (0, import_react29.forwardRef)(
4207
4216
  );
4208
4217
  TableRow.displayName = "TableRow";
4209
4218
 
4210
- // src/ui/components/ui/table/TableCell.tsx
4219
+ // src/ui/components/ui/table/TableCellSecondary.tsx
4211
4220
  var import_jsx_runtime47 = require("react/jsx-runtime");
4221
+ var TableCellSecondary = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "block truncate text-[11px] font-normal leading-3 text-grey-600", children });
4222
+
4223
+ // src/ui/components/ui/table/TableExpandChevron.tsx
4224
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4225
+ var TableExpandChevron = ({ isExpanded }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4226
+ Icon,
4227
+ {
4228
+ name: isExpanded ? "chevron-down" : "chevron-right",
4229
+ size: "xs",
4230
+ "aria-hidden": "true",
4231
+ "data-testid": "table-expand-chevron"
4232
+ }
4233
+ );
4234
+
4235
+ // src/ui/components/ui/table/TableCell.tsx
4236
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4212
4237
  var SURFACE_CLASS2 = {
4213
4238
  white: "bg-white",
4214
4239
  "grey-100": "bg-grey-100"
@@ -4218,6 +4243,8 @@ var CURSOR_CLASS = {
4218
4243
  };
4219
4244
  var TableCell = ({
4220
4245
  children,
4246
+ secondary,
4247
+ isExpanded,
4221
4248
  width,
4222
4249
  centerContent,
4223
4250
  sticky,
@@ -4242,10 +4269,19 @@ var TableCell = ({
4242
4269
  "borderLeft",
4243
4270
  "le style du tableau ne se r\xE8gle plus page par page"
4244
4271
  );
4245
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
4272
+ const lines = secondary ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
4273
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "block truncate leading-3", children }),
4274
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableCellSecondary, { children: secondary })
4275
+ ] }) : children;
4276
+ const content = isExpanded === void 0 ? lines : /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4277
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(TableExpandChevron, { isExpanded }),
4278
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0", children: lines })
4279
+ ] });
4280
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
4246
4281
  "td",
4247
4282
  {
4248
4283
  colSpan,
4284
+ "data-sticky": sticky,
4249
4285
  className: cn(
4250
4286
  "text-ellipsis whitespace-nowrap h-10 px-2 py-2 text-center text-xs font-semibold",
4251
4287
  // Une cellule fusionnée (section/groupe) ne tronque pas son contenu, et
@@ -4269,14 +4305,14 @@ var TableCell = ({
4269
4305
  backgroundColor,
4270
4306
  borderLeftColor: accentColor
4271
4307
  },
4272
- children: centerContent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Layout, { justify: "center", children }) : children
4308
+ children: centerContent ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Layout, { justify: "center", children: content }) : content
4273
4309
  }
4274
4310
  );
4275
4311
  };
4276
4312
 
4277
4313
  // src/ui/components/ui/table/TableFooter.tsx
4278
- var import_jsx_runtime48 = require("react/jsx-runtime");
4279
- var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
4314
+ var import_jsx_runtime50 = require("react/jsx-runtime");
4315
+ var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4280
4316
  "tfoot",
4281
4317
  {
4282
4318
  className: cn(
@@ -4288,17 +4324,17 @@ var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_ru
4288
4324
  );
4289
4325
 
4290
4326
  // src/ui/components/ui/table/TableFooterRow.tsx
4291
- var import_jsx_runtime49 = require("react/jsx-runtime");
4292
- var TableFooterRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tr", { className: "[&>td]:border-t [&>td]:border-grey-300 [&>th]:border-t [&>th]:border-grey-300", children });
4327
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4328
+ var TableFooterRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("tr", { className: "[&>td]:border-t [&>td]:border-grey-300 [&>th]:border-t [&>th]:border-grey-300", children });
4293
4329
 
4294
4330
  // src/ui/components/ui/table/TableFooterCell.tsx
4295
- var import_jsx_runtime50 = require("react/jsx-runtime");
4331
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4296
4332
  var TableFooterCell = ({
4297
4333
  children,
4298
4334
  width,
4299
4335
  borderLeft = false,
4300
4336
  className
4301
- }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4337
+ }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4302
4338
  "td",
4303
4339
  {
4304
4340
  className: cn(
@@ -4312,15 +4348,16 @@ var TableFooterCell = ({
4312
4348
  );
4313
4349
 
4314
4350
  // src/ui/components/ui/table/TableGroupLabel.tsx
4315
- var import_jsx_runtime51 = require("react/jsx-runtime");
4351
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4316
4352
  var TableGroupLabel = ({
4317
4353
  title,
4318
4354
  count,
4355
+ counts = [],
4319
4356
  isCollapsed = false,
4320
4357
  onToggleCollapse,
4321
4358
  selection
4322
- }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4323
- onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4359
+ }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4360
+ onToggleCollapse && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4324
4361
  Icon,
4325
4362
  {
4326
4363
  name: isCollapsed ? "chevron-right" : "chevron-down",
@@ -4330,7 +4367,7 @@ var TableGroupLabel = ({
4330
4367
  onClick: onToggleCollapse
4331
4368
  }
4332
4369
  ),
4333
- selection && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4370
+ selection && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4334
4371
  Checkbox,
4335
4372
  {
4336
4373
  "aria-label": selection.label,
@@ -4338,48 +4375,49 @@ var TableGroupLabel = ({
4338
4375
  onChange: selection.onToggle
4339
4376
  }
4340
4377
  ),
4341
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { children: title }),
4342
- count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "font-semibold text-grey-600", children: count })
4378
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { children: title }),
4379
+ count !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "font-semibold text-grey-600", children: count }),
4380
+ counts.map(({ value, theme, label }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Badge, { theme, title: label, children: value }, label))
4343
4381
  ] });
4344
4382
 
4345
4383
  // src/ui/components/ui/table/TableSectionRow.tsx
4346
- var import_jsx_runtime52 = require("react/jsx-runtime");
4384
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4347
4385
  var TableSectionRow = (_a) => {
4348
4386
  var _b = _a, {
4349
4387
  colSpan
4350
4388
  } = _b, label = __objRest(_b, [
4351
4389
  "colSpan"
4352
4390
  ]);
4353
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4391
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4354
4392
  "td",
4355
4393
  {
4356
4394
  colSpan,
4357
4395
  className: "h-8 bg-grey-300 px-2 text-left text-[11px] font-bold uppercase tracking-wide text-neutral-800",
4358
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TableGroupLabel, __spreadValues({}, label))
4396
+ children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableGroupLabel, __spreadValues({}, label))
4359
4397
  }
4360
4398
  ) });
4361
4399
  };
4362
4400
 
4363
4401
  // src/ui/components/ui/table/TableSubgroupRow.tsx
4364
- var import_jsx_runtime53 = require("react/jsx-runtime");
4402
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4365
4403
  var TableSubgroupRow = (_a) => {
4366
4404
  var _b = _a, {
4367
4405
  colSpan
4368
4406
  } = _b, label = __objRest(_b, [
4369
4407
  "colSpan"
4370
4408
  ]);
4371
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4409
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4372
4410
  "td",
4373
4411
  {
4374
4412
  colSpan,
4375
4413
  className: "h-9 bg-grey-200 py-0 pl-6 pr-2 text-left text-xs font-semibold text-neutral-800",
4376
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableGroupLabel, __spreadValues({}, label))
4414
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableGroupLabel, __spreadValues({}, label))
4377
4415
  }
4378
4416
  ) });
4379
4417
  };
4380
4418
 
4381
4419
  // src/ui/components/ui/table/TableAlertRow.tsx
4382
- var import_jsx_runtime54 = require("react/jsx-runtime");
4420
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4383
4421
  var ALERT_TONES = {
4384
4422
  red: { theme: "red-500", icon: "circle-exclamation" },
4385
4423
  yellow: { theme: "yellow-500", icon: "triangle-exclamation" },
@@ -4393,7 +4431,7 @@ var TableAlertRow = ({
4393
4431
  action
4394
4432
  }) => {
4395
4433
  const { theme, icon } = ALERT_TONES[tone];
4396
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4434
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4397
4435
  "td",
4398
4436
  {
4399
4437
  colSpan,
@@ -4402,12 +4440,12 @@ var TableAlertRow = ({
4402
4440
  "h-10 px-2 text-left text-xs font-semibold",
4403
4441
  THEME_VARIANT_CLASSES.pale[theme]
4404
4442
  ),
4405
- children: /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Layout, { row: true, gap: 2, align: "center", justify: "between", children: [
4406
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4407
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(Icon, { name: icon, size: "xs", theme }),
4408
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { children })
4443
+ children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Layout, { row: true, gap: 2, align: "center", justify: "between", children: [
4444
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4445
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Icon, { name: icon, size: "xs", theme }),
4446
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { children })
4409
4447
  ] }),
4410
- action && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4448
+ action && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4411
4449
  Button,
4412
4450
  {
4413
4451
  size: "xs",
@@ -4423,8 +4461,8 @@ var TableAlertRow = ({
4423
4461
  };
4424
4462
 
4425
4463
  // src/ui/components/ui/table/TableExpandedRow.tsx
4426
- var import_jsx_runtime55 = require("react/jsx-runtime");
4427
- var TableExpandedRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "bg-grey-100 hover:bg-grey-100", children });
4464
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4465
+ var TableExpandedRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableRow, { className: "bg-grey-100 hover:bg-grey-100", children });
4428
4466
 
4429
4467
  // src/utils/string/capitalizeFirstLetter.ts
4430
4468
  var capitalizeFirstLetter = (str) => {
@@ -4548,7 +4586,7 @@ var formatNameWithInitial = (firstname, lastname) => {
4548
4586
  // src/ui/components/ui/Avatar.tsx
4549
4587
  var import_react30 = require("react");
4550
4588
  var RadixAvatar = __toESM(require("@radix-ui/react-avatar"));
4551
- var import_jsx_runtime56 = require("react/jsx-runtime");
4589
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4552
4590
  var AvatarSizeContext = (0, import_react30.createContext)(40);
4553
4591
  var useAvatarSize = () => (0, import_react30.useContext)(AvatarSizeContext);
4554
4592
  var BADGE_BG_CLASS = {
@@ -4609,7 +4647,7 @@ var Avatar = (0, import_react30.forwardRef)(
4609
4647
  "children"
4610
4648
  ]);
4611
4649
  var _a2;
4612
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4650
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4613
4651
  RadixAvatar.Root,
4614
4652
  __spreadProps(__spreadValues({
4615
4653
  ref,
@@ -4620,9 +4658,9 @@ var Avatar = (0, import_react30.forwardRef)(
4620
4658
  ),
4621
4659
  style: __spreadValues({ width: size, height: size, backgroundColor }, style)
4622
4660
  }, props), {
4623
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
4624
- src && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(AvatarImage, { src, alt: name }),
4625
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4661
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
4662
+ src && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AvatarImage, { src, alt: name }),
4663
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4626
4664
  AvatarFallback,
4627
4665
  {
4628
4666
  color,
@@ -4631,7 +4669,7 @@ var Avatar = (0, import_react30.forwardRef)(
4631
4669
  children: getInitials({ name })
4632
4670
  }
4633
4671
  ),
4634
- badge && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4672
+ badge && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4635
4673
  FaIcon,
4636
4674
  {
4637
4675
  name: badge.icon,
@@ -4648,7 +4686,7 @@ var Avatar = (0, import_react30.forwardRef)(
4648
4686
  Avatar.displayName = "Avatar";
4649
4687
  var AvatarImage = (0, import_react30.forwardRef)((_a, ref) => {
4650
4688
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4651
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4689
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4652
4690
  RadixAvatar.Image,
4653
4691
  __spreadValues({
4654
4692
  ref,
@@ -4688,7 +4726,7 @@ var AvatarFallback = (0, import_react30.forwardRef)(
4688
4726
  "style"
4689
4727
  ]);
4690
4728
  const size = useAvatarSize();
4691
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4729
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4692
4730
  RadixAvatar.Fallback,
4693
4731
  __spreadValues({
4694
4732
  ref,
@@ -4712,7 +4750,7 @@ var AvatarBadge = (0, import_react30.forwardRef)(
4712
4750
  var _b = _a, { size, className, style } = _b, props = __objRest(_b, ["size", "className", "style"]);
4713
4751
  const avatarSize = useAvatarSize();
4714
4752
  const badgeSize = size != null ? size : Math.round(avatarSize * 0.35);
4715
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4753
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4716
4754
  "div",
4717
4755
  __spreadValues({
4718
4756
  ref,
@@ -4743,7 +4781,7 @@ var AvatarGroup = (_a) => {
4743
4781
  );
4744
4782
  const visible = max ? items.slice(0, max) : items;
4745
4783
  const overflow = max ? items.length - max : 0;
4746
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
4784
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
4747
4785
  visible.map(
4748
4786
  (child, index) => (0, import_react30.cloneElement)(child, {
4749
4787
  key: index,
@@ -4751,7 +4789,7 @@ var AvatarGroup = (_a) => {
4751
4789
  className: cn("ring-2 ring-white", child.props.className)
4752
4790
  })
4753
4791
  ),
4754
- overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4792
+ overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4755
4793
  Layout,
4756
4794
  {
4757
4795
  align: "center",
@@ -4771,56 +4809,90 @@ var AvatarGroup = (_a) => {
4771
4809
  ] }));
4772
4810
  };
4773
4811
 
4812
+ // src/ui/components/ui/table/TableCellNameButton.tsx
4813
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4814
+ var TableCellNameButton = ({
4815
+ children,
4816
+ onClick
4817
+ }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4818
+ "button",
4819
+ {
4820
+ type: "button",
4821
+ className: "max-w-full truncate leading-[inherit] hover:underline",
4822
+ onClick: (event) => {
4823
+ event.stopPropagation();
4824
+ onClick();
4825
+ },
4826
+ children
4827
+ }
4828
+ );
4829
+
4774
4830
  // src/ui/components/ui/table/TablePersonCell.tsx
4775
- var import_jsx_runtime57 = require("react/jsx-runtime");
4831
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4776
4832
  var AVATAR_SIZE = 24;
4777
4833
  var TablePersonCell = ({
4778
4834
  firstName,
4779
4835
  lastName,
4780
4836
  src,
4837
+ avatarBadge,
4838
+ secondary,
4839
+ onNameClick,
4840
+ isExpanded,
4781
4841
  width
4782
- }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableCell, { width, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4783
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4784
- Avatar,
4785
- {
4786
- size: AVATAR_SIZE,
4787
- name: `${firstName} ${lastName != null ? lastName : ""}`.trim(),
4788
- src
4789
- }
4790
- ),
4791
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate", children: formatNameWithInitial(firstName, lastName != null ? lastName : null) })
4792
- ] }) });
4842
+ }) => {
4843
+ const fullName = `${firstName} ${lastName != null ? lastName : ""}`.trim();
4844
+ const shortName = formatNameWithInitial(firstName, lastName != null ? lastName : null);
4845
+ const name = onNameClick ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCellNameButton, { onClick: onNameClick, children: shortName }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "truncate", children: shortName });
4846
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCell, { width, isExpanded, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4847
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(Avatar, { size: AVATAR_SIZE, children: [
4848
+ src && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarImage, { src, alt: fullName }),
4849
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(AvatarFallback, { children: getInitials({ name: fullName }) }),
4850
+ avatarBadge
4851
+ ] }),
4852
+ secondary ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "flex min-w-0 flex-col text-left leading-3", children: [
4853
+ name,
4854
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCellSecondary, { children: secondary })
4855
+ ] }) : name
4856
+ ] }) });
4857
+ };
4793
4858
 
4794
4859
  // src/ui/components/ui/table/TableClientCell.tsx
4795
- var import_jsx_runtime58 = require("react/jsx-runtime");
4796
- var TableClientCell = ({
4797
- name,
4798
- color,
4799
- width
4800
- }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { width, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4801
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4802
- "span",
4803
- {
4804
- "aria-hidden": "true",
4805
- "data-testid": "client-dot",
4806
- className: "h-2 w-2 shrink-0 rounded-full",
4807
- style: { backgroundColor: color }
4808
- }
4809
- ),
4810
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "truncate", children: name })
4811
- ] }) });
4860
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4861
+ var TableClientCell = (_a) => {
4862
+ var _b = _a, {
4863
+ name,
4864
+ color,
4865
+ onNameClick
4866
+ } = _b, cell = __objRest(_b, [
4867
+ "name",
4868
+ "color",
4869
+ "onNameClick"
4870
+ ]);
4871
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, __spreadProps(__spreadValues({}, cell), { children: /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4872
+ /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4873
+ "span",
4874
+ {
4875
+ "aria-hidden": "true",
4876
+ "data-testid": "client-dot",
4877
+ className: "h-2 w-2 shrink-0 rounded-full",
4878
+ style: { backgroundColor: color }
4879
+ }
4880
+ ),
4881
+ onNameClick ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCellNameButton, { onClick: onNameClick, children: name }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { className: "truncate", children: name })
4882
+ ] }) }));
4883
+ };
4812
4884
 
4813
4885
  // src/ui/components/ui/table/TableStatusCell.tsx
4814
- var import_jsx_runtime59 = require("react/jsx-runtime");
4886
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4815
4887
  var TableStatusCell = ({
4816
4888
  children,
4817
4889
  theme,
4818
4890
  width
4819
- }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Badge, { size: "l", theme, children }) });
4891
+ }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Badge, { size: "l", theme, children }) });
4820
4892
 
4821
4893
  // src/ui/components/ui/Popover.tsx
4822
4894
  var RadixPopover4 = __toESM(require("@radix-ui/react-popover"));
4823
- var import_jsx_runtime60 = require("react/jsx-runtime");
4895
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4824
4896
  var Popover = ({
4825
4897
  trigger,
4826
4898
  items,
@@ -4832,9 +4904,9 @@ var Popover = ({
4832
4904
  onOpenChange,
4833
4905
  width,
4834
4906
  className
4835
- }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(RadixPopover4.Root, { open, onOpenChange, children: [
4836
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4837
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(RadixPopover4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4907
+ }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(RadixPopover4.Root, { open, onOpenChange, children: [
4908
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4909
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(RadixPopover4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4838
4910
  RadixPopover4.Content,
4839
4911
  {
4840
4912
  align,
@@ -4847,7 +4919,7 @@ var Popover = ({
4847
4919
  "data-[state=open]:animate-[fade-in_150ms_ease-out]",
4848
4920
  className
4849
4921
  ),
4850
- children: items ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4922
+ children: items ? /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4851
4923
  RadixPopover4.Close,
4852
4924
  {
4853
4925
  onClick: item.action,
@@ -4862,12 +4934,57 @@ var Popover = ({
4862
4934
  ) })
4863
4935
  ] });
4864
4936
 
4865
- // src/ui/components/ui/table/TableActionsCell.tsx
4866
- var import_jsx_runtime61 = require("react/jsx-runtime");
4937
+ // src/ui/components/ui/table/splitTableActions.ts
4867
4938
  var MAX_INLINE_TABLE_ACTIONS = 3;
4939
+ var splitTableActions = (actions) => {
4940
+ if (actions.length <= MAX_INLINE_TABLE_ACTIONS)
4941
+ return { inline: actions, menu: [] };
4942
+ const unreadCount = actions.filter(({ hasUnread }) => hasUnread).length;
4943
+ const readSlots = Math.max(MAX_INLINE_TABLE_ACTIONS - unreadCount, 0);
4944
+ const visibleReadActions = actions.filter(({ hasUnread }) => !hasUnread).slice(0, readSlots);
4945
+ const isInline = (action) => action.hasUnread || visibleReadActions.includes(action);
4946
+ return {
4947
+ inline: actions.filter(isInline),
4948
+ menu: actions.filter((action) => !isInline(action))
4949
+ };
4950
+ };
4951
+
4952
+ // src/ui/components/ui/table/TableActionsCell.tsx
4953
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4954
+ var TableActionIcon = ({
4955
+ label,
4956
+ icon,
4957
+ onClick,
4958
+ disabled,
4959
+ disabledReason,
4960
+ hasUnread
4961
+ }) => {
4962
+ const button = /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4963
+ Icon,
4964
+ {
4965
+ name: icon,
4966
+ "aria-label": label,
4967
+ title: disabledReason ? void 0 : label,
4968
+ disabled,
4969
+ onClick
4970
+ }
4971
+ );
4972
+ const action = hasUnread ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "relative inline-flex", children: [
4973
+ button,
4974
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4975
+ "span",
4976
+ {
4977
+ role: "img",
4978
+ "aria-label": "Non lu",
4979
+ className: "pointer-events-none absolute right-1 top-1 h-2 w-2 rounded-full bg-red-500 ring-2 ring-white"
4980
+ }
4981
+ )
4982
+ ] }) : button;
4983
+ return disabled && disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Tooltip, { content: disabledReason, children: action }) : action;
4984
+ };
4868
4985
  var TableActionsCell = ({ actions, width }) => {
4869
- const hasMenu = actions.length > MAX_INLINE_TABLE_ACTIONS;
4870
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4986
+ const { inline, menu } = splitTableActions(actions);
4987
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4871
4988
  Layout,
4872
4989
  {
4873
4990
  row: true,
@@ -4875,59 +4992,49 @@ var TableActionsCell = ({ actions, width }) => {
4875
4992
  align: "center",
4876
4993
  justify: "center",
4877
4994
  onClick: (event) => event.stopPropagation(),
4878
- children: hasMenu ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4879
- Popover,
4880
- {
4881
- trigger: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4882
- Icon,
4883
- {
4884
- name: "ellipsis-vertical",
4885
- "aria-label": "Plus d'actions",
4886
- onClick: () => void 0
4887
- }
4888
- ),
4889
- items: actions.map(
4890
- ({ label, onClick, disabled, disabledReason }) => ({
4995
+ children: [
4996
+ inline.map((action) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(TableActionIcon, __spreadValues({}, action), action.label)),
4997
+ menu.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4998
+ Popover,
4999
+ {
5000
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5001
+ Icon,
5002
+ {
5003
+ name: "ellipsis-vertical",
5004
+ "aria-label": "Plus d'actions",
5005
+ onClick: () => void 0
5006
+ }
5007
+ ),
5008
+ items: menu.map(({ label, onClick, disabled, disabledReason }) => ({
4891
5009
  label,
4892
5010
  action: onClick,
4893
5011
  disabled,
4894
5012
  title: disabled ? disabledReason : void 0
4895
- })
4896
- )
4897
- }
4898
- ) : actions.map(({ label, icon, onClick, disabled, disabledReason }) => {
4899
- const action = /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4900
- Icon,
4901
- {
4902
- name: icon,
4903
- "aria-label": label,
4904
- title: disabledReason ? void 0 : label,
4905
- disabled,
4906
- onClick
4907
- },
4908
- label
4909
- );
4910
- return disabled && disabledReason ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Tooltip, { content: disabledReason, children: action }, label) : action;
4911
- })
5013
+ }))
5014
+ }
5015
+ )
5016
+ ]
4912
5017
  }
4913
5018
  ) });
4914
5019
  };
4915
5020
 
4916
5021
  // src/ui/components/ui/table/TableSelectCell.tsx
4917
5022
  var import_react31 = require("react");
4918
- var import_jsx_runtime62 = require("react/jsx-runtime");
5023
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4919
5024
  var TableSelectCell = ({
4920
5025
  isSelected,
4921
5026
  onToggle,
4922
5027
  label,
5028
+ disabled,
4923
5029
  width = "40px"
4924
5030
  }) => {
4925
5031
  const isRange = (0, import_react31.useRef)(false);
4926
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TableCell, { width, centerContent: true, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
5032
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TableCell, { width, centerContent: true, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4927
5033
  Checkbox,
4928
5034
  {
4929
5035
  "aria-label": label,
4930
5036
  checked: isSelected,
5037
+ disabled,
4931
5038
  onClick: (event) => {
4932
5039
  isRange.current = event.shiftKey;
4933
5040
  },
@@ -4937,12 +5044,12 @@ var TableSelectCell = ({
4937
5044
  };
4938
5045
 
4939
5046
  // src/ui/components/ui/table/TableSelectHeaderCell.tsx
4940
- var import_jsx_runtime63 = require("react/jsx-runtime");
5047
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4941
5048
  var TableSelectHeaderCell = ({
4942
5049
  state,
4943
5050
  onToggle,
4944
5051
  width = "40px"
4945
- }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(TableHeaderCell, { width, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Layout, { justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5052
+ }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TableHeaderCell, { width, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Layout, { justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4946
5053
  Checkbox,
4947
5054
  {
4948
5055
  "aria-label": "S\xE9lectionner toutes les lignes de la page",
@@ -5016,7 +5123,7 @@ var useRowSelection = ({
5016
5123
  // src/ui/components/ui/Radio.tsx
5017
5124
  var RadixRadioGroup = __toESM(require("@radix-ui/react-radio-group"));
5018
5125
  var import_class_variance_authority12 = require("class-variance-authority");
5019
- var import_jsx_runtime64 = require("react/jsx-runtime");
5126
+ var import_jsx_runtime67 = require("react/jsx-runtime");
5020
5127
  var radioVariants = (0, import_class_variance_authority12.cva)(
5021
5128
  "relative h-[22px] w-[22px] shrink-0 rounded-full border-2 border-grey-300 outline-none transition-colors",
5022
5129
  {
@@ -5071,23 +5178,23 @@ var Radio = ({
5071
5178
  color,
5072
5179
  width,
5073
5180
  className
5074
- }) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5181
+ }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5075
5182
  RadixRadioGroup.Root,
5076
5183
  {
5077
5184
  value,
5078
5185
  onValueChange: onChange,
5079
5186
  disabled,
5080
5187
  asChild: true,
5081
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
5188
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
5082
5189
  const itemId = `radio-${item.value}`;
5083
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
5084
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5190
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
5191
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5085
5192
  RadixRadioGroup.Item,
5086
5193
  {
5087
5194
  id: itemId,
5088
5195
  value: item.value,
5089
5196
  className: radioVariants({ color }),
5090
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5197
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5091
5198
  RadixRadioGroup.Indicator,
5092
5199
  {
5093
5200
  className: indicatorVariants({ color })
@@ -5095,7 +5202,7 @@ var Radio = ({
5095
5202
  )
5096
5203
  }
5097
5204
  ),
5098
- item.label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5205
+ item.label && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5099
5206
  Text,
5100
5207
  {
5101
5208
  as: "label",
@@ -5114,7 +5221,7 @@ var Radio = ({
5114
5221
  var RadixProgress = __toESM(require("@radix-ui/react-progress"));
5115
5222
  var RadixSlider = __toESM(require("@radix-ui/react-slider"));
5116
5223
  var import_class_variance_authority13 = require("class-variance-authority");
5117
- var import_jsx_runtime65 = require("react/jsx-runtime");
5224
+ var import_jsx_runtime68 = require("react/jsx-runtime");
5118
5225
  var trackVariants2 = (0, import_class_variance_authority13.cva)(
5119
5226
  "relative w-full overflow-hidden rounded-full bg-grey-200",
5120
5227
  {
@@ -5183,15 +5290,15 @@ var ProgressBar = ({
5183
5290
  const editable = Boolean(onChange);
5184
5291
  if (segments) {
5185
5292
  const visible = segments.filter((segment) => segment.value > 0);
5186
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5187
- label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5188
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5293
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5294
+ label && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5295
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5189
5296
  "div",
5190
5297
  {
5191
5298
  role: "img",
5192
5299
  "aria-label": ariaLabel != null ? ariaLabel : label,
5193
5300
  className: cn(trackVariants2({ height }), "flex gap-0.5"),
5194
- children: visible.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5301
+ children: visible.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5195
5302
  "span",
5196
5303
  {
5197
5304
  className: "h-full",
@@ -5209,16 +5316,16 @@ var ProgressBar = ({
5209
5316
  }
5210
5317
  if (!editable) {
5211
5318
  const readOnlyPercent = Math.max(0, Math.min(100, percent));
5212
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5213
- label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5214
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Layout, { fullWidth: true, align: "center", gap: 2, children: [
5215
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5319
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5320
+ label && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5321
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Layout, { fullWidth: true, align: "center", gap: 2, children: [
5322
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5216
5323
  RadixProgress.Root,
5217
5324
  {
5218
5325
  value: readOnlyPercent,
5219
5326
  "aria-label": ariaLabel != null ? ariaLabel : label,
5220
5327
  className: trackVariants2({ height }),
5221
- children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5328
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5222
5329
  RadixProgress.Indicator,
5223
5330
  {
5224
5331
  className: cn(
@@ -5233,11 +5340,11 @@ var ProgressBar = ({
5233
5340
  )
5234
5341
  }
5235
5342
  ),
5236
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
5343
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
5237
5344
  ] })
5238
5345
  ] });
5239
5346
  }
5240
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5347
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5241
5348
  Layout,
5242
5349
  {
5243
5350
  column: true,
@@ -5245,9 +5352,9 @@ var ProgressBar = ({
5245
5352
  gap: 1,
5246
5353
  className: cn(disabled && "cursor-not-allowed opacity-60", className),
5247
5354
  children: [
5248
- label && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5249
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "relative w-full pt-6", children: [
5250
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5355
+ label && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5356
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "relative w-full pt-6", children: [
5357
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5251
5358
  "span",
5252
5359
  {
5253
5360
  className: "absolute top-0 -translate-x-1/2 text-xs font-semibold text-neutral-800",
@@ -5255,7 +5362,7 @@ var ProgressBar = ({
5255
5362
  children: display(current)
5256
5363
  }
5257
5364
  ),
5258
- /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
5365
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
5259
5366
  RadixSlider.Root,
5260
5367
  {
5261
5368
  value: [current],
@@ -5266,7 +5373,7 @@ var ProgressBar = ({
5266
5373
  disabled,
5267
5374
  className: "relative flex h-5 w-full touch-none select-none items-center",
5268
5375
  children: [
5269
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5376
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5270
5377
  RadixSlider.Range,
5271
5378
  {
5272
5379
  className: cn(
@@ -5276,7 +5383,7 @@ var ProgressBar = ({
5276
5383
  style: { backgroundColor: hexColor }
5277
5384
  }
5278
5385
  ) }),
5279
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5386
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5280
5387
  RadixSlider.Thumb,
5281
5388
  {
5282
5389
  className: cn(
@@ -5291,9 +5398,9 @@ var ProgressBar = ({
5291
5398
  }
5292
5399
  )
5293
5400
  ] }),
5294
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(Layout, { align: "center", justify: "between", children: [
5295
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xs text-grey-600", children: display(min) }),
5296
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "text-xs text-grey-600", children: display(max) })
5401
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(Layout, { align: "center", justify: "between", children: [
5402
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-xs text-grey-600", children: display(min) }),
5403
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "text-xs text-grey-600", children: display(max) })
5297
5404
  ] })
5298
5405
  ]
5299
5406
  }
@@ -5302,7 +5409,7 @@ var ProgressBar = ({
5302
5409
 
5303
5410
  // src/ui/components/ui/Collapsible.tsx
5304
5411
  var RadixCollapsible = __toESM(require("@radix-ui/react-collapsible"));
5305
- var import_jsx_runtime66 = require("react/jsx-runtime");
5412
+ var import_jsx_runtime69 = require("react/jsx-runtime");
5306
5413
  var Collapsible = RadixCollapsible.Root;
5307
5414
  var CollapsibleTrigger = RadixCollapsible.Trigger;
5308
5415
  var CollapsibleContent = (_a) => {
@@ -5311,7 +5418,7 @@ var CollapsibleContent = (_a) => {
5311
5418
  } = _b, props = __objRest(_b, [
5312
5419
  "className"
5313
5420
  ]);
5314
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5421
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5315
5422
  RadixCollapsible.Content,
5316
5423
  __spreadValues({
5317
5424
  className: "overflow-hidden data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] " + (className != null ? className : "")
@@ -5323,6 +5430,7 @@ var CollapsibleContent = (_a) => {
5323
5430
  var import_react33 = require("react");
5324
5431
  var import_vaul = require("vaul");
5325
5432
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
5433
+ var import_react_dismissable_layer2 = require("@radix-ui/react-dismissable-layer");
5326
5434
 
5327
5435
  // src/ui/lib/drawer/nestedDrawerAttributes.ts
5328
5436
  var NESTED_DRAWER_ATTRIBUTES = {
@@ -5391,7 +5499,7 @@ var swallowRestOfClick = () => {
5391
5499
  };
5392
5500
 
5393
5501
  // src/ui/components/ui/Drawer.tsx
5394
- var import_jsx_runtime67 = require("react/jsx-runtime");
5502
+ var import_jsx_runtime70 = require("react/jsx-runtime");
5395
5503
  var KEEP_OPEN_SELECTOR = '[role="dialog"], [role="listbox"], [data-drawer-keep-open]';
5396
5504
  var CONTENT_POSITION = {
5397
5505
  top: "inset-x-4 top-4 rounded-2xl",
@@ -5413,6 +5521,8 @@ var Drawer = ({
5413
5521
  const contentRef = (0, import_react33.useRef)(null);
5414
5522
  const [panel, setPanel] = (0, import_react33.useState)(null);
5415
5523
  const overlayRef = (0, import_react33.useRef)(null);
5524
+ const markOverlaySurface = (0, import_react_dismissable_layer2.useDismissableLayerSurface)();
5525
+ const markContentSurface = (0, import_react_dismissable_layer2.useDismissableLayerSurface)();
5416
5526
  useAllowPortalScroll(modal && open, contentRef, overlayRef);
5417
5527
  useKeepLayersAboveUsable(modal && open, contentRef);
5418
5528
  (0, import_react33.useEffect)(() => {
@@ -5457,11 +5567,14 @@ var Drawer = ({
5457
5567
  return () => cancelAnimationFrame(frame);
5458
5568
  }, [modal, open]);
5459
5569
  const closeOnDismiss = (next) => !next && closeDrawer();
5460
- const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_vaul.Drawer.Portal, { children: [
5461
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5570
+ const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(import_vaul.Drawer.Portal, { children: [
5571
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5462
5572
  import_vaul.Drawer.Overlay,
5463
5573
  {
5464
- ref: overlayRef,
5574
+ ref: (node) => {
5575
+ overlayRef.current = node;
5576
+ markOverlaySurface(node);
5577
+ },
5465
5578
  onClick: (event) => event.stopPropagation(),
5466
5579
  className: cn(
5467
5580
  MODAL_LAYER,
@@ -5470,12 +5583,13 @@ var Drawer = ({
5470
5583
  )
5471
5584
  }
5472
5585
  ),
5473
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5586
+ /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5474
5587
  import_vaul.Drawer.Content,
5475
5588
  __spreadProps(__spreadValues({
5476
5589
  ref: (node) => {
5477
5590
  contentRef.current = node;
5478
5591
  setPanel(node);
5592
+ markContentSurface(node);
5479
5593
  }
5480
5594
  }, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
5481
5595
  onPointerDownOutside: (event) => {
@@ -5502,14 +5616,14 @@ var Drawer = ({
5502
5616
  })
5503
5617
  )
5504
5618
  ] });
5505
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5619
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5506
5620
  import_vaul.Drawer.Root,
5507
5621
  {
5508
5622
  direction,
5509
5623
  modal,
5510
5624
  open,
5511
5625
  onOpenChange: closeOnDismiss,
5512
- children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5626
+ children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5513
5627
  DialogPrimitive.Root,
5514
5628
  {
5515
5629
  modal: false,
@@ -5527,7 +5641,7 @@ var DrawerHeader = (_a) => {
5527
5641
  } = _b, props = __objRest(_b, [
5528
5642
  "className"
5529
5643
  ]);
5530
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5644
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5531
5645
  "div",
5532
5646
  __spreadValues({
5533
5647
  className: cn("flex w-full items-center justify-between", className)
@@ -5540,7 +5654,7 @@ var DrawerTitle = (_a) => {
5540
5654
  } = _b, props = __objRest(_b, [
5541
5655
  "className"
5542
5656
  ]);
5543
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5657
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5544
5658
  import_vaul.Drawer.Title,
5545
5659
  __spreadValues({
5546
5660
  className: cn("text-base font-bold text-neutral-800", className)
@@ -5553,7 +5667,7 @@ var DrawerDescription = (_a) => {
5553
5667
  } = _b, props = __objRest(_b, [
5554
5668
  "className"
5555
5669
  ]);
5556
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
5670
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5557
5671
  import_vaul.Drawer.Description,
5558
5672
  __spreadValues({
5559
5673
  className: cn("text-sm text-grey-500", className)
@@ -5566,7 +5680,7 @@ var DrawerBody = (_a) => {
5566
5680
  } = _b, props = __objRest(_b, [
5567
5681
  "className"
5568
5682
  ]);
5569
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
5683
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
5570
5684
  };
5571
5685
  var DrawerFooter = (_a) => {
5572
5686
  var _b = _a, {
@@ -5574,7 +5688,7 @@ var DrawerFooter = (_a) => {
5574
5688
  } = _b, props = __objRest(_b, [
5575
5689
  "className"
5576
5690
  ]);
5577
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
5691
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
5578
5692
  };
5579
5693
  var DrawerClose = import_vaul.Drawer.Close;
5580
5694
 
@@ -5588,11 +5702,11 @@ var SidebarCollapsedProvider = SidebarCollapsedContext.Provider;
5588
5702
  var useSidebarCollapsed = () => (0, import_react34.useContext)(SidebarCollapsedContext);
5589
5703
 
5590
5704
  // src/ui/components/ui/sidebar/Sidebar.tsx
5591
- var import_jsx_runtime68 = require("react/jsx-runtime");
5705
+ var import_jsx_runtime71 = require("react/jsx-runtime");
5592
5706
  var Sidebar = (0, import_react35.forwardRef)(
5593
5707
  (_a, ref) => {
5594
5708
  var _b = _a, { collapsed = false, className, children } = _b, props = __objRest(_b, ["collapsed", "className", "children"]);
5595
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
5709
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5596
5710
  "aside",
5597
5711
  __spreadProps(__spreadValues({
5598
5712
  ref,
@@ -5611,10 +5725,10 @@ Sidebar.displayName = "Sidebar";
5611
5725
 
5612
5726
  // src/ui/components/ui/sidebar/SidebarTrigger.tsx
5613
5727
  var import_react36 = require("react");
5614
- var import_jsx_runtime69 = require("react/jsx-runtime");
5728
+ var import_jsx_runtime72 = require("react/jsx-runtime");
5615
5729
  var SidebarTrigger = (0, import_react36.forwardRef)((_a, ref) => {
5616
5730
  var _b = _a, { collapsed, className } = _b, props = __objRest(_b, ["collapsed", "className"]);
5617
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5731
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5618
5732
  "button",
5619
5733
  __spreadProps(__spreadValues({
5620
5734
  ref,
@@ -5625,7 +5739,7 @@ var SidebarTrigger = (0, import_react36.forwardRef)((_a, ref) => {
5625
5739
  className
5626
5740
  )
5627
5741
  }, props), {
5628
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5742
+ children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
5629
5743
  FaIcon,
5630
5744
  {
5631
5745
  name: collapsed ? "chevrons-right" : "chevrons-left",
@@ -5640,11 +5754,11 @@ SidebarTrigger.displayName = "SidebarTrigger";
5640
5754
 
5641
5755
  // src/ui/components/ui/sidebar/SidebarHeader.tsx
5642
5756
  var import_react37 = require("react");
5643
- var import_jsx_runtime70 = require("react/jsx-runtime");
5757
+ var import_jsx_runtime73 = require("react/jsx-runtime");
5644
5758
  var SidebarHeader = (0, import_react37.forwardRef)(
5645
5759
  (_a, ref) => {
5646
5760
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5647
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
5761
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5648
5762
  "div",
5649
5763
  __spreadValues({
5650
5764
  ref,
@@ -5657,11 +5771,11 @@ SidebarHeader.displayName = "SidebarHeader";
5657
5771
 
5658
5772
  // src/ui/components/ui/sidebar/SidebarContent.tsx
5659
5773
  var import_react38 = require("react");
5660
- var import_jsx_runtime71 = require("react/jsx-runtime");
5774
+ var import_jsx_runtime74 = require("react/jsx-runtime");
5661
5775
  var SidebarContent = (0, import_react38.forwardRef)(
5662
5776
  (_a, ref) => {
5663
5777
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5664
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
5778
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5665
5779
  "div",
5666
5780
  __spreadValues({
5667
5781
  ref,
@@ -5678,20 +5792,20 @@ SidebarContent.displayName = "SidebarContent";
5678
5792
 
5679
5793
  // src/ui/components/ui/sidebar/SidebarGroup.tsx
5680
5794
  var import_react39 = require("react");
5681
- var import_jsx_runtime72 = require("react/jsx-runtime");
5795
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5682
5796
  var SidebarGroup = (0, import_react39.forwardRef)(
5683
5797
  (_a, ref) => {
5684
5798
  var _b = _a, { label, className, children } = _b, props = __objRest(_b, ["label", "className", "children"]);
5685
5799
  const collapsed = useSidebarCollapsed();
5686
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5800
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
5687
5801
  "div",
5688
5802
  __spreadProps(__spreadValues({
5689
5803
  ref,
5690
5804
  className: cn("flex w-full flex-col p-2", className)
5691
5805
  }, props), {
5692
5806
  children: [
5693
- label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
5694
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "flex flex-col gap-1", children })
5807
+ label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
5808
+ /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "flex flex-col gap-1", children })
5695
5809
  ]
5696
5810
  })
5697
5811
  );
@@ -5701,7 +5815,7 @@ SidebarGroup.displayName = "SidebarGroup";
5701
5815
 
5702
5816
  // src/ui/components/ui/sidebar/SidebarMenuButton.tsx
5703
5817
  var import_react40 = require("react");
5704
- var import_jsx_runtime73 = require("react/jsx-runtime");
5818
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5705
5819
  var SidebarMenuButton = (0, import_react40.forwardRef)(
5706
5820
  (_a, ref) => {
5707
5821
  var _b = _a, {
@@ -5724,7 +5838,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
5724
5838
  "className"
5725
5839
  ]);
5726
5840
  const collapsed = useSidebarCollapsed();
5727
- const button = /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
5841
+ const button = /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5728
5842
  "button",
5729
5843
  __spreadProps(__spreadValues({
5730
5844
  ref,
@@ -5740,7 +5854,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
5740
5854
  )
5741
5855
  }, props), {
5742
5856
  children: [
5743
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5857
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5744
5858
  FaIcon,
5745
5859
  {
5746
5860
  name: icon,
@@ -5749,7 +5863,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
5749
5863
  className: "shrink-0"
5750
5864
  }
5751
5865
  ),
5752
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5866
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5753
5867
  Text,
5754
5868
  {
5755
5869
  as: "span",
@@ -5760,8 +5874,8 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
5760
5874
  children: label
5761
5875
  }
5762
5876
  ),
5763
- !collapsed && shortcut && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("kbd", { className: "shrink-0 rounded border border-white/15 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-white/50", children: shortcut }),
5764
- !!badge && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5877
+ !collapsed && shortcut && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("kbd", { className: "shrink-0 rounded border border-white/15 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-white/50", children: shortcut }),
5878
+ !!badge && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5765
5879
  "span",
5766
5880
  {
5767
5881
  className: cn(
@@ -5776,14 +5890,14 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
5776
5890
  })
5777
5891
  );
5778
5892
  if (!collapsed) return button;
5779
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Tooltip, { content: label, side: "right", children: button });
5893
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Tooltip, { content: label, side: "right", children: button });
5780
5894
  }
5781
5895
  );
5782
5896
  SidebarMenuButton.displayName = "SidebarMenuButton";
5783
5897
 
5784
5898
  // src/ui/components/ui/sidebar/SidebarActionCard.tsx
5785
5899
  var import_react41 = require("react");
5786
- var import_jsx_runtime74 = require("react/jsx-runtime");
5900
+ var import_jsx_runtime77 = require("react/jsx-runtime");
5787
5901
  var SidebarActionCard = (0, import_react41.forwardRef)(
5788
5902
  (_a, ref) => {
5789
5903
  var _b = _a, {
@@ -5804,11 +5918,11 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
5804
5918
  const collapsed = useSidebarCollapsed();
5805
5919
  const tooltip = subtitle ? `${title} ${subtitle}` : title;
5806
5920
  const counter = badge ? badge > 99 ? "99+" : badge : null;
5807
- const iconBadge = /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
5808
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }),
5809
- collapsed && counter && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "absolute -right-1.5 -top-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter })
5921
+ const iconBadge = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
5922
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }),
5923
+ collapsed && counter && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "absolute -right-1.5 -top-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter })
5810
5924
  ] });
5811
- const button = /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
5925
+ const button = /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
5812
5926
  "button",
5813
5927
  __spreadProps(__spreadValues({
5814
5928
  ref,
@@ -5823,12 +5937,12 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
5823
5937
  }, props), {
5824
5938
  children: [
5825
5939
  iconBadge,
5826
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(import_jsx_runtime74.Fragment, { children: [
5827
- /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5828
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate text-sm font-bold text-white", children: title }),
5829
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "truncate text-xs text-white/60", children: subtitle })
5940
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(import_jsx_runtime77.Fragment, { children: [
5941
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5942
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "truncate text-sm font-bold text-white", children: title }),
5943
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "truncate text-xs text-white/60", children: subtitle })
5830
5944
  ] }),
5831
- counter ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter }) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5945
+ counter ? /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter }) : /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5832
5946
  FaIcon,
5833
5947
  {
5834
5948
  name: "chevron-right",
@@ -5842,18 +5956,18 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
5842
5956
  })
5843
5957
  );
5844
5958
  if (!collapsed) return button;
5845
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Tooltip, { content: tooltip, side: "right", children: button });
5959
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Tooltip, { content: tooltip, side: "right", children: button });
5846
5960
  }
5847
5961
  );
5848
5962
  SidebarActionCard.displayName = "SidebarActionCard";
5849
5963
 
5850
5964
  // src/ui/components/ui/sidebar/SidebarMenuSub.tsx
5851
5965
  var import_react42 = require("react");
5852
- var import_jsx_runtime75 = require("react/jsx-runtime");
5966
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5853
5967
  var SidebarMenuSub = (0, import_react42.forwardRef)(
5854
5968
  (_a, ref) => {
5855
5969
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5856
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5970
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5857
5971
  "ul",
5858
5972
  __spreadValues({
5859
5973
  ref,
@@ -5869,23 +5983,23 @@ SidebarMenuSub.displayName = "SidebarMenuSub";
5869
5983
 
5870
5984
  // src/ui/components/ui/sidebar/SidebarMenuSubItem.tsx
5871
5985
  var import_react43 = require("react");
5872
- var import_jsx_runtime76 = require("react/jsx-runtime");
5986
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5873
5987
  var SidebarMenuSubItem = (0, import_react43.forwardRef)((_a, ref) => {
5874
5988
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5875
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("li", __spreadValues({ ref, className: cn("relative", className) }, props));
5989
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("li", __spreadValues({ ref, className: cn("relative", className) }, props));
5876
5990
  });
5877
5991
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
5878
5992
 
5879
5993
  // src/ui/components/ui/sidebar/SidebarMenuSubButton.tsx
5880
5994
  var import_react44 = require("react");
5881
- var import_jsx_runtime77 = require("react/jsx-runtime");
5995
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5882
5996
  var SIZE_CLASS = {
5883
5997
  default: "h-10",
5884
5998
  lg: "h-14"
5885
5999
  };
5886
6000
  var SidebarMenuSubButton = (0, import_react44.forwardRef)((_a, ref) => {
5887
6001
  var _b = _a, { active, size = "default", className } = _b, props = __objRest(_b, ["active", "size", "className"]);
5888
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
6002
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5889
6003
  "button",
5890
6004
  __spreadValues({
5891
6005
  ref,
@@ -5905,11 +6019,11 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
5905
6019
 
5906
6020
  // src/ui/components/ui/sidebar/SidebarFooter.tsx
5907
6021
  var import_react45 = require("react");
5908
- var import_jsx_runtime78 = require("react/jsx-runtime");
6022
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5909
6023
  var SidebarFooter = (0, import_react45.forwardRef)(
5910
6024
  (_a, ref) => {
5911
6025
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5912
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
6026
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
5913
6027
  "div",
5914
6028
  __spreadValues({
5915
6029
  ref,
@@ -5921,7 +6035,7 @@ var SidebarFooter = (0, import_react45.forwardRef)(
5921
6035
  SidebarFooter.displayName = "SidebarFooter";
5922
6036
 
5923
6037
  // src/ui/components/ui/sidebar/SidebarSupportInfo.tsx
5924
- var import_jsx_runtime79 = require("react/jsx-runtime");
6038
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5925
6039
  var SidebarSupportInfo = ({
5926
6040
  phone,
5927
6041
  hours,
@@ -5930,27 +6044,27 @@ var SidebarSupportInfo = ({
5930
6044
  className
5931
6045
  }) => {
5932
6046
  const collapsed = useSidebarCollapsed();
5933
- const badge = /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
6047
+ const badge = /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
5934
6048
  if (collapsed) {
5935
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
6049
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
5936
6050
  }
5937
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
6051
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
5938
6052
  badge,
5939
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex min-w-0 flex-col leading-tight", children: [
5940
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "truncate text-sm font-bold text-white", children: phone }),
5941
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "truncate text-xs text-white/50", children: hours })
6053
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "flex min-w-0 flex-col leading-tight", children: [
6054
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate text-sm font-bold text-white", children: phone }),
6055
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "truncate text-xs text-white/50", children: hours })
5942
6056
  ] })
5943
6057
  ] });
5944
6058
  };
5945
6059
 
5946
6060
  // src/ui/components/ui/sidebar/SidebarMenuSearchInput.tsx
5947
6061
  var import_react46 = require("react");
5948
- var import_jsx_runtime80 = require("react/jsx-runtime");
6062
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5949
6063
  var SidebarMenuSearchInput = (0, import_react46.forwardRef)((_a, ref) => {
5950
6064
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5951
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(InputGroup, { children: [
5952
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
5953
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
6065
+ return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(InputGroup, { children: [
6066
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
6067
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
5954
6068
  Input,
5955
6069
  __spreadValues({
5956
6070
  ref,
@@ -5967,7 +6081,7 @@ SidebarMenuSearchInput.displayName = "SidebarMenuSearchInput";
5967
6081
  // src/ui/components/ui/sidebar/SidebarUserMenu.tsx
5968
6082
  var import_react47 = require("react");
5969
6083
  var RadixPopover5 = __toESM(require("@radix-ui/react-popover"));
5970
- var import_jsx_runtime81 = require("react/jsx-runtime");
6084
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5971
6085
  var panelClassName = cn(
5972
6086
  "z-[9999] min-w-[220px] rounded-lg border border-white/10 bg-blue-800 p-1 shadow-[0_4px_16px_rgba(0,0,0,0.4)]",
5973
6087
  "data-[state=open]:animate-[fade-in_150ms_ease-out]"
@@ -5989,8 +6103,8 @@ var SidebarUserMenu = ({
5989
6103
  action();
5990
6104
  setOpen(false);
5991
6105
  };
5992
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
5993
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
6106
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
6107
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
5994
6108
  "button",
5995
6109
  {
5996
6110
  type: "button",
@@ -6000,10 +6114,10 @@ var SidebarUserMenu = ({
6000
6114
  className
6001
6115
  ),
6002
6116
  children: [
6003
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
6004
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
6005
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
6006
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6117
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
6118
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
6119
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
6120
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6007
6121
  Text,
6008
6122
  {
6009
6123
  as: "span",
@@ -6014,10 +6128,10 @@ var SidebarUserMenu = ({
6014
6128
  children: name
6015
6129
  }
6016
6130
  ),
6017
- email && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
6018
- subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
6131
+ email && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
6132
+ subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
6019
6133
  ] }),
6020
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6134
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6021
6135
  FaIcon,
6022
6136
  {
6023
6137
  name: "sort",
@@ -6030,7 +6144,7 @@ var SidebarUserMenu = ({
6030
6144
  ]
6031
6145
  }
6032
6146
  ) }),
6033
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
6147
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6034
6148
  RadixPopover5.Content,
6035
6149
  {
6036
6150
  align: "end",
@@ -6038,10 +6152,10 @@ var SidebarUserMenu = ({
6038
6152
  sideOffset: 6,
6039
6153
  className: panelClassName,
6040
6154
  children: [
6041
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
6042
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Avatar, { name, src: avatarSrc, size: 32 }),
6043
- /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
6044
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6155
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
6156
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Avatar, { name, src: avatarSrc, size: 32 }),
6157
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
6158
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6045
6159
  Text,
6046
6160
  {
6047
6161
  as: "span",
@@ -6052,20 +6166,20 @@ var SidebarUserMenu = ({
6052
6166
  children: name
6053
6167
  }
6054
6168
  ),
6055
- email && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
6056
- subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
6169
+ email && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
6170
+ subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
6057
6171
  ] })
6058
6172
  ] }),
6059
- actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6173
+ actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6060
6174
  "div",
6061
6175
  {
6062
6176
  className: "border-t border-white/10 py-1 first:border-t-0",
6063
6177
  children: group.map(
6064
6178
  (item) => {
6065
6179
  var _a;
6066
- return item.renderPanel || item.subActions ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(RadixPopover5.Root, { children: [
6067
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("button", { type: "button", className: rowClassName, children: [
6068
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6180
+ return item.renderPanel || item.subActions ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(RadixPopover5.Root, { children: [
6181
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("button", { type: "button", className: rowClassName, children: [
6182
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6069
6183
  FaIcon,
6070
6184
  {
6071
6185
  name: item.icon,
@@ -6074,8 +6188,8 @@ var SidebarUserMenu = ({
6074
6188
  className: "shrink-0 text-white/70"
6075
6189
  }
6076
6190
  ),
6077
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { className: "flex-1", children: item.label }),
6078
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6191
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "flex-1", children: item.label }),
6192
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6079
6193
  FaIcon,
6080
6194
  {
6081
6195
  name: "chevron-right",
@@ -6084,21 +6198,21 @@ var SidebarUserMenu = ({
6084
6198
  }
6085
6199
  )
6086
6200
  ] }) }),
6087
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6201
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6088
6202
  RadixPopover5.Content,
6089
6203
  {
6090
6204
  align: "end",
6091
6205
  side: "right",
6092
6206
  sideOffset: 6,
6093
6207
  className: panelClassName,
6094
- children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
6208
+ children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6095
6209
  "button",
6096
6210
  {
6097
6211
  type: "button",
6098
6212
  onClick: () => runAndClose(sub.action),
6099
6213
  className: rowClassName,
6100
6214
  children: [
6101
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6215
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6102
6216
  FaIcon,
6103
6217
  {
6104
6218
  name: sub.icon,
@@ -6114,14 +6228,14 @@ var SidebarUserMenu = ({
6114
6228
  ))
6115
6229
  }
6116
6230
  ) })
6117
- ] }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
6231
+ ] }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
6118
6232
  "button",
6119
6233
  {
6120
6234
  type: "button",
6121
6235
  onClick: () => runAndClose(item.action),
6122
6236
  className: rowClassName,
6123
6237
  children: [
6124
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
6238
+ /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6125
6239
  FaIcon,
6126
6240
  {
6127
6241
  name: item.icon,
@@ -6148,15 +6262,15 @@ var SidebarUserMenu = ({
6148
6262
 
6149
6263
  // src/ui/components/ui/Toaster.tsx
6150
6264
  var import_sonner = require("sonner");
6151
- var import_jsx_runtime82 = require("react/jsx-runtime");
6152
- var Toaster = () => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_sonner.Toaster, { position: "bottom-right", gap: 8 });
6265
+ var import_jsx_runtime85 = require("react/jsx-runtime");
6266
+ var Toaster = () => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_sonner.Toaster, { position: "bottom-right", gap: 8 });
6153
6267
 
6154
6268
  // src/ui/lib/toast.tsx
6155
6269
  var import_sonner3 = require("sonner");
6156
6270
 
6157
6271
  // src/ui/components/ui/ToastCard.tsx
6158
6272
  var import_sonner2 = require("sonner");
6159
- var import_jsx_runtime83 = require("react/jsx-runtime");
6273
+ var import_jsx_runtime86 = require("react/jsx-runtime");
6160
6274
  var ICON = {
6161
6275
  success: "circle-check",
6162
6276
  error: "circle-xmark",
@@ -6198,7 +6312,7 @@ var ToastCard = ({
6198
6312
  title,
6199
6313
  message,
6200
6314
  timeOut
6201
- }) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
6315
+ }) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
6202
6316
  Layout,
6203
6317
  {
6204
6318
  role: "status",
@@ -6210,14 +6324,14 @@ var ToastCard = ({
6210
6324
  ACCENT_BORDER[type]
6211
6325
  ),
6212
6326
  children: [
6213
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6327
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6214
6328
  "span",
6215
6329
  {
6216
6330
  className: cn(
6217
6331
  "flex h-7 w-7 shrink-0 items-center justify-center rounded-full",
6218
6332
  ACCENT_BG[type]
6219
6333
  ),
6220
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6334
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6221
6335
  FaIcon,
6222
6336
  {
6223
6337
  name: ICON[type],
@@ -6230,21 +6344,21 @@ var ToastCard = ({
6230
6344
  )
6231
6345
  }
6232
6346
  ),
6233
- /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
6234
- title && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-sm font-bold text-neutral-800", children: title }),
6235
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("p", { className: "text-sm text-neutral-800", children: message })
6347
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
6348
+ title && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-sm font-bold text-neutral-800", children: title }),
6349
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "text-sm text-neutral-800", children: message })
6236
6350
  ] }),
6237
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6351
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6238
6352
  "button",
6239
6353
  {
6240
6354
  type: "button",
6241
6355
  "aria-label": "Fermer",
6242
6356
  onClick: () => import_sonner2.toast.dismiss(id),
6243
6357
  className: "absolute right-2.5 top-2.5 text-grey-500 hover:text-neutral-800",
6244
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FaIcon, { name: "xmark", size: 14 })
6358
+ children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(FaIcon, { name: "xmark", size: 14 })
6245
6359
  }
6246
6360
  ),
6247
- type !== "loading" && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
6361
+ type !== "loading" && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6248
6362
  "div",
6249
6363
  {
6250
6364
  className: cn(
@@ -6259,13 +6373,13 @@ var ToastCard = ({
6259
6373
  );
6260
6374
 
6261
6375
  // src/ui/lib/toast.tsx
6262
- var import_jsx_runtime84 = require("react/jsx-runtime");
6376
+ var import_jsx_runtime87 = require("react/jsx-runtime");
6263
6377
  var DEFAULT_TIMEOUT = 4e3;
6264
6378
  var show = (type, message, options) => {
6265
6379
  var _a;
6266
6380
  const timeOut = type === "loading" ? Infinity : (_a = options == null ? void 0 : options.timeOut) != null ? _a : DEFAULT_TIMEOUT;
6267
6381
  return import_sonner3.toast.custom(
6268
- (id) => /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
6382
+ (id) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6269
6383
  ToastCard,
6270
6384
  {
6271
6385
  id,
@@ -6305,7 +6419,7 @@ var toast = {
6305
6419
  // src/ui/components/ui/PageContainer.tsx
6306
6420
  var import_react48 = require("react");
6307
6421
  var import_class_variance_authority14 = require("class-variance-authority");
6308
- var import_jsx_runtime85 = require("react/jsx-runtime");
6422
+ var import_jsx_runtime88 = require("react/jsx-runtime");
6309
6423
  var pageContainerVariants = (0, import_class_variance_authority14.cva)(
6310
6424
  "flex h-full w-full flex-col overflow-auto rounded-[10px] bg-grey-200 shadow-[0_1px_4px_rgba(0,0,0,0.16)]",
6311
6425
  {
@@ -6323,7 +6437,7 @@ var pageContainerVariants = (0, import_class_variance_authority14.cva)(
6323
6437
  var PageContainer = (0, import_react48.forwardRef)(
6324
6438
  (_a, ref) => {
6325
6439
  var _b = _a, { padding, className } = _b, props = __objRest(_b, ["padding", "className"]);
6326
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
6440
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6327
6441
  "div",
6328
6442
  __spreadValues({
6329
6443
  ref,
@@ -6336,7 +6450,7 @@ PageContainer.displayName = "PageContainer";
6336
6450
 
6337
6451
  // src/ui/components/ui/IconTabs.tsx
6338
6452
  var import_react49 = require("react");
6339
- var import_jsx_runtime86 = require("react/jsx-runtime");
6453
+ var import_jsx_runtime89 = require("react/jsx-runtime");
6340
6454
  var IconTabs = ({
6341
6455
  items,
6342
6456
  value,
@@ -6367,8 +6481,8 @@ var IconTabs = ({
6367
6481
  if (listRef.current) ro.observe(listRef.current);
6368
6482
  return () => ro.disconnect();
6369
6483
  }, [updateBar]);
6370
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Layout, { column: true, className, children: [
6371
- /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
6484
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { column: true, className, children: [
6485
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
6372
6486
  Layout,
6373
6487
  {
6374
6488
  ref: listRef,
@@ -6377,7 +6491,7 @@ var IconTabs = ({
6377
6491
  gap: 1,
6378
6492
  className: "relative rounded-[5px] bg-grey-100 p-1",
6379
6493
  children: [
6380
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6494
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6381
6495
  "div",
6382
6496
  {
6383
6497
  className: "absolute rounded-[5px] bg-blue-50 transition-all duration-300",
@@ -6393,7 +6507,7 @@ var IconTabs = ({
6393
6507
  var _a2;
6394
6508
  const disabled = disabledIndexes.includes(index);
6395
6509
  const active = value === index;
6396
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
6510
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
6397
6511
  "button",
6398
6512
  {
6399
6513
  type: "button",
@@ -6410,14 +6524,14 @@ var IconTabs = ({
6410
6524
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
6411
6525
  ),
6412
6526
  children: [
6413
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6527
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6414
6528
  "i",
6415
6529
  {
6416
6530
  className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
6417
6531
  style: { fontSize: 16 }
6418
6532
  }
6419
6533
  ),
6420
- item.caption && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
6534
+ item.caption && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6421
6535
  "span",
6422
6536
  {
6423
6537
  className: cn(
@@ -6435,13 +6549,13 @@ var IconTabs = ({
6435
6549
  ]
6436
6550
  }
6437
6551
  ),
6438
- ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
6552
+ ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
6439
6553
  ] });
6440
6554
  };
6441
6555
 
6442
6556
  // src/ui/components/ui/Banner.tsx
6443
6557
  var import_class_variance_authority15 = require("class-variance-authority");
6444
- var import_jsx_runtime87 = require("react/jsx-runtime");
6558
+ var import_jsx_runtime90 = require("react/jsx-runtime");
6445
6559
  var bannerVariants = (0, import_class_variance_authority15.cva)("rounded-[6px] px-4 py-2", {
6446
6560
  variants: {
6447
6561
  theme: {
@@ -6498,14 +6612,14 @@ var Banner = ({
6498
6612
  }) => {
6499
6613
  const align = textAlignByJustify[justify];
6500
6614
  const textClass = TEXT_CLASS2[theme != null ? theme : "blue-700"];
6501
- const content = children ? children : message ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Layout, { column: true, align: justify, gap: 1, children: [
6502
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Layout, { align: "center", gap: 2, children: [
6503
- badge && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
6504
- title && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
6615
+ const content = children ? children : message ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { column: true, align: justify, gap: 1, children: [
6616
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { align: "center", gap: 2, children: [
6617
+ badge && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
6618
+ title && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
6505
6619
  ] }),
6506
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text, { size: "xs", align, className: textClass, children: subtitle })
6620
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "xs", align, className: textClass, children: subtitle })
6507
6621
  ] });
6508
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
6622
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6509
6623
  Layout,
6510
6624
  {
6511
6625
  role: "alert",
@@ -6516,15 +6630,15 @@ var Banner = ({
6516
6630
  width,
6517
6631
  className: cn(bannerVariants({ theme }), className),
6518
6632
  children: [
6519
- justify === "start" ? content : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
6520
- toggle ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
6633
+ justify === "start" ? content : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
6634
+ toggle ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6521
6635
  Switch,
6522
6636
  {
6523
6637
  checked: toggle.checked,
6524
6638
  onChange: toggle.onChange,
6525
6639
  disabled: toggle.disabled
6526
6640
  }
6527
- ) : action && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
6641
+ ) : action && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6528
6642
  Button,
6529
6643
  {
6530
6644
  variant: "outline",
@@ -6635,7 +6749,7 @@ var resolveArcPlacement = (request) => {
6635
6749
  };
6636
6750
 
6637
6751
  // src/ui/components/ui/FloatingButton.tsx
6638
- var import_jsx_runtime88 = require("react/jsx-runtime");
6752
+ var import_jsx_runtime91 = require("react/jsx-runtime");
6639
6753
  var readStoredOffset = (key) => {
6640
6754
  if (!key || typeof window === "undefined") return { x: 0, y: 0 };
6641
6755
  try {
@@ -6833,7 +6947,7 @@ var FloatingButton = ({
6833
6947
  const { itemSize } = placement.geometry;
6834
6948
  const translateX = offset.x + (isOpen ? placement.shift.x : 0);
6835
6949
  const translateY = offset.y + (isOpen ? placement.shift.y : 0);
6836
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6950
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
6837
6951
  "div",
6838
6952
  {
6839
6953
  ref: containerRef,
@@ -6851,7 +6965,7 @@ var FloatingButton = ({
6851
6965
  actions.map((action, index) => {
6852
6966
  var _a;
6853
6967
  const itemOffset = arcOffset(index, actions.length, placement.geometry);
6854
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6968
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
6855
6969
  "button",
6856
6970
  {
6857
6971
  type: "button",
@@ -6869,14 +6983,14 @@ var FloatingButton = ({
6869
6983
  transform: isOpen ? `translate(${itemOffset.x}px, ${itemOffset.y}px)` : "scale(0.4)"
6870
6984
  },
6871
6985
  children: [
6872
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: SUB_ICON[color], children: action.icon }),
6873
- ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: action.badge })
6986
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: SUB_ICON[color], children: action.icon }),
6987
+ ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: action.badge })
6874
6988
  ]
6875
6989
  },
6876
6990
  action.id
6877
6991
  );
6878
6992
  }),
6879
- /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6993
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
6880
6994
  "button",
6881
6995
  {
6882
6996
  type: "button",
@@ -6893,8 +7007,8 @@ var FloatingButton = ({
6893
7007
  touchAction: draggable ? "none" : void 0
6894
7008
  },
6895
7009
  children: [
6896
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FaIcon, { name: "xmark", size: 20 }) : icon,
6897
- !isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: mainBadge })
7010
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FaIcon, { name: "xmark", size: 20 }) : icon,
7011
+ !isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: mainBadge })
6898
7012
  ]
6899
7013
  }
6900
7014
  )
@@ -6905,7 +7019,7 @@ var FloatingButton = ({
6905
7019
 
6906
7020
  // src/ui/components/ui/ActivityFeedPanel.tsx
6907
7021
  var import_react51 = require("react");
6908
- var import_jsx_runtime89 = require("react/jsx-runtime");
7022
+ var import_jsx_runtime92 = require("react/jsx-runtime");
6909
7023
  var PANEL_WIDTH = 500;
6910
7024
  var PANEL_MAX_HEIGHT = 750;
6911
7025
  var GAP = 8;
@@ -6972,7 +7086,7 @@ var ActivityFeedPanel = ({
6972
7086
  return () => window.removeEventListener("resize", recompute);
6973
7087
  }, [open, offset]);
6974
7088
  if (!open) return null;
6975
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
7089
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
6976
7090
  Layout,
6977
7091
  {
6978
7092
  ref: panelRef,
@@ -6980,7 +7094,7 @@ var ActivityFeedPanel = ({
6980
7094
  className: "fixed z-30 w-[500px] max-w-[calc(100vw-32px)] overflow-hidden rounded-[10px] border border-grey-200 bg-white shadow-[0_20px_50px_-18px_rgba(15,36,48,0.35)]",
6981
7095
  style: __spreadProps(__spreadValues({}, placement), { maxHeight: PANEL_MAX_HEIGHT }),
6982
7096
  children: [
6983
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
7097
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
6984
7098
  Layout,
6985
7099
  {
6986
7100
  align: "center",
@@ -6988,12 +7102,12 @@ var ActivityFeedPanel = ({
6988
7102
  padding: 4,
6989
7103
  className: "border-b border-grey-200",
6990
7104
  children: [
6991
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
6992
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", weight: "bold", children: title })
7105
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
7106
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "s", weight: "bold", children: title })
6993
7107
  ]
6994
7108
  }
6995
7109
  ),
6996
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
7110
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6997
7111
  "div",
6998
7112
  {
6999
7113
  style: {
@@ -7004,10 +7118,10 @@ var ActivityFeedPanel = ({
7004
7118
  scrollbarWidth: "none"
7005
7119
  },
7006
7120
  className: "[&::-webkit-scrollbar]:hidden",
7007
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
7008
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Spinner, {}) }),
7009
- !isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
7010
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
7121
+ children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
7122
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Spinner, {}) }),
7123
+ !isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
7124
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
7011
7125
  Layout,
7012
7126
  {
7013
7127
  gap: 3,
@@ -7015,7 +7129,7 @@ var ActivityFeedPanel = ({
7015
7129
  className: "cursor-pointer items-start rounded-[8px] p-2 hover:bg-grey-100",
7016
7130
  onClick: item.onClick,
7017
7131
  children: [
7018
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
7132
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
7019
7133
  IconBadge,
7020
7134
  {
7021
7135
  name: item.icon,
@@ -7024,9 +7138,9 @@ var ActivityFeedPanel = ({
7024
7138
  iconColor: item.iconColor
7025
7139
  }
7026
7140
  ),
7027
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
7028
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "xs", children: item.text }),
7029
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
7141
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
7142
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", children: item.text }),
7143
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
7030
7144
  ] })
7031
7145
  ]
7032
7146
  },
@@ -7041,7 +7155,7 @@ var ActivityFeedPanel = ({
7041
7155
  };
7042
7156
 
7043
7157
  // src/ui/components/ui/MetricCard.tsx
7044
- var import_jsx_runtime90 = require("react/jsx-runtime");
7158
+ var import_jsx_runtime93 = require("react/jsx-runtime");
7045
7159
  var ICON_WRAP_CLASS = {
7046
7160
  "blue-700": "bg-blue-50 text-blue-700",
7047
7161
  "blue-900": "bg-blue-50 text-blue-900",
@@ -7070,7 +7184,7 @@ var MetricCard = ({
7070
7184
  selected = false,
7071
7185
  children,
7072
7186
  className
7073
- }) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
7187
+ }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7074
7188
  "div",
7075
7189
  {
7076
7190
  onClick,
@@ -7080,25 +7194,25 @@ var MetricCard = ({
7080
7194
  selected && "border-blue-700",
7081
7195
  className
7082
7196
  ),
7083
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { align: "center", gap: 3, fullWidth: true, children: [
7084
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
7197
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "center", gap: 3, fullWidth: true, children: [
7198
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7085
7199
  "span",
7086
7200
  {
7087
7201
  className: cn(
7088
7202
  "flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
7089
7203
  ICON_WRAP_CLASS[accent]
7090
7204
  ),
7091
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
7205
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
7092
7206
  }
7093
7207
  ),
7094
- children ? children : layout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { align: "center", gap: 1, children: [
7095
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
7096
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", color: "grey-600", children: title })
7097
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { column: true, gap: 1, children: [
7098
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", color: "grey-600", children: title }),
7099
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(Layout, { align: "baseline", gap: 1, children: [
7100
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
7101
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Text, { size: "xs", color: "grey-600", children: subtitle })
7208
+ children ? children : layout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "center", gap: 1, children: [
7209
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
7210
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "s", color: "grey-600", children: title })
7211
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { column: true, gap: 1, children: [
7212
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "s", color: "grey-600", children: title }),
7213
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "baseline", gap: 1, children: [
7214
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
7215
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", color: "grey-600", children: subtitle })
7102
7216
  ] })
7103
7217
  ] })
7104
7218
  ] })
@@ -7106,7 +7220,7 @@ var MetricCard = ({
7106
7220
  );
7107
7221
 
7108
7222
  // src/ui/components/ui/Tile.tsx
7109
- var import_jsx_runtime91 = require("react/jsx-runtime");
7223
+ var import_jsx_runtime94 = require("react/jsx-runtime");
7110
7224
  var Tile = ({
7111
7225
  children,
7112
7226
  onClick,
@@ -7116,7 +7230,7 @@ var Tile = ({
7116
7230
  className
7117
7231
  }) => {
7118
7232
  const isOutline = variant === "outline";
7119
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
7233
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
7120
7234
  "div",
7121
7235
  {
7122
7236
  className: cn(
@@ -7127,7 +7241,7 @@ var Tile = ({
7127
7241
  className
7128
7242
  ),
7129
7243
  children: [
7130
- onClick ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
7244
+ onClick ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
7131
7245
  "button",
7132
7246
  {
7133
7247
  type: "button",
@@ -7140,7 +7254,7 @@ var Tile = ({
7140
7254
  children
7141
7255
  }
7142
7256
  ) : children,
7143
- expandedContent && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
7257
+ expandedContent && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
7144
7258
  ]
7145
7259
  }
7146
7260
  );
@@ -7295,16 +7409,16 @@ var formatName = (person, fallback = "") => {
7295
7409
  };
7296
7410
 
7297
7411
  // src/ui/components/ui/history/HistoryChangeRow.tsx
7298
- var import_jsx_runtime92 = require("react/jsx-runtime");
7412
+ var import_jsx_runtime95 = require("react/jsx-runtime");
7299
7413
  var HistoryChangeRow = ({ change }) => {
7300
7414
  const { label, previousValue, nextValue, href, onClick } = change;
7301
7415
  const hasValues = Boolean(previousValue || nextValue);
7302
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", gap: 1.5, wrap: true, children: [
7303
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
7304
- previousValue && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", color: "grey-600", children: previousValue }),
7305
- previousValue && nextValue && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
7306
- nextValue && href && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Link, { href, newTab: true, size: "xs", children: nextValue }),
7307
- nextValue && onClick && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
7416
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { align: "center", gap: 1.5, wrap: true, children: [
7417
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
7418
+ previousValue && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xs", color: "grey-600", children: previousValue }),
7419
+ previousValue && nextValue && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
7420
+ nextValue && href && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Link, { href, newTab: true, size: "xs", children: nextValue }),
7421
+ nextValue && onClick && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7308
7422
  "button",
7309
7423
  {
7310
7424
  type: "button",
@@ -7316,27 +7430,27 @@ var HistoryChangeRow = ({ change }) => {
7316
7430
  children: nextValue
7317
7431
  }
7318
7432
  ),
7319
- nextValue && !href && !onClick && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", weight: "semibold", children: nextValue })
7433
+ nextValue && !href && !onClick && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xs", weight: "semibold", children: nextValue })
7320
7434
  ] });
7321
7435
  };
7322
7436
 
7323
7437
  // src/ui/components/ui/history/HistoryEntryCard.tsx
7324
- var import_jsx_runtime93 = require("react/jsx-runtime");
7438
+ var import_jsx_runtime96 = require("react/jsx-runtime");
7325
7439
  var CARD_CLASS = "group rounded-lg border border-grey-300 bg-white";
7326
7440
  var HistoryEntryCard = ({ entry }) => {
7327
7441
  const { title, date, author, badge, changes = [] } = entry;
7328
7442
  const hasChanges = changes.length > 0;
7329
- const summary = /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { column: true, gap: 1, fullWidth: true, children: [
7330
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
7331
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
7332
- author && /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_jsx_runtime93.Fragment, { children: [
7333
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
7334
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
7443
+ const summary = /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { column: true, gap: 1, fullWidth: true, children: [
7444
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
7445
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
7446
+ author && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
7447
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
7448
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
7335
7449
  ] }),
7336
- badge && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Badge, { theme: badge.theme, size: "s", children: badge.label })
7450
+ badge && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Badge, { theme: badge.theme, size: "s", children: badge.label })
7337
7451
  ] }),
7338
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
7339
- date && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7452
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
7453
+ date && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7340
7454
  Text,
7341
7455
  {
7342
7456
  size: "xxs",
@@ -7346,7 +7460,7 @@ var HistoryEntryCard = ({ entry }) => {
7346
7460
  children: formatDate(date, "dateTime", "fr")
7347
7461
  }
7348
7462
  ),
7349
- hasChanges && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7463
+ hasChanges && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7350
7464
  Icon,
7351
7465
  {
7352
7466
  name: "chevron-down",
@@ -7357,14 +7471,14 @@ var HistoryEntryCard = ({ entry }) => {
7357
7471
  )
7358
7472
  ] })
7359
7473
  ] }),
7360
- title && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
7474
+ title && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
7361
7475
  ] });
7362
7476
  if (!hasChanges) {
7363
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `${CARD_CLASS} p-3`, children: summary });
7477
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: `${CARD_CLASS} p-3`, children: summary });
7364
7478
  }
7365
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Collapsible, { className: CARD_CLASS, children: [
7366
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
7367
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7479
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Collapsible, { className: CARD_CLASS, children: [
7480
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
7481
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7368
7482
  Layout,
7369
7483
  {
7370
7484
  column: true,
@@ -7372,7 +7486,7 @@ var HistoryEntryCard = ({ entry }) => {
7372
7486
  paddingX: 3,
7373
7487
  paddingBottom: 3,
7374
7488
  className: author ? "pl-[64px]" : void 0,
7375
- children: changes.map((change, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
7489
+ children: changes.map((change, index) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7376
7490
  HistoryChangeRow,
7377
7491
  {
7378
7492
  change
@@ -7385,7 +7499,7 @@ var HistoryEntryCard = ({ entry }) => {
7385
7499
  };
7386
7500
 
7387
7501
  // src/ui/components/ui/history/HistoryList.tsx
7388
- var import_jsx_runtime94 = require("react/jsx-runtime");
7502
+ var import_jsx_runtime97 = require("react/jsx-runtime");
7389
7503
  var SKELETON_COUNT = 4;
7390
7504
  var HistoryList = ({
7391
7505
  entries,
@@ -7397,8 +7511,8 @@ var HistoryList = ({
7397
7511
  emptyLabel = "Aucun historique",
7398
7512
  emptyDescription = "Aucune action enregistr\xE9e pour le moment.",
7399
7513
  notice
7400
- }) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
7401
- filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
7514
+ }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
7515
+ filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7402
7516
  TagBubble,
7403
7517
  {
7404
7518
  label: filter.label,
@@ -7409,22 +7523,22 @@ var HistoryList = ({
7409
7523
  },
7410
7524
  filter.value
7411
7525
  )) }),
7412
- isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Skeleton, { height: "72px" }, index)),
7413
- !isLoading && isError && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
7414
- !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
7526
+ isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Skeleton, { height: "72px" }, index)),
7527
+ !isLoading && isError && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
7528
+ !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7415
7529
  EmptyState,
7416
7530
  {
7417
- icon: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(FaIcon, { name: "clock-rotate-left", size: 20 }),
7531
+ icon: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FaIcon, { name: "clock-rotate-left", size: 20 }),
7418
7532
  title: emptyLabel,
7419
7533
  description: emptyDescription
7420
7534
  }
7421
7535
  ),
7422
- !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(HistoryEntryCard, { entry }, entry.id)),
7423
- !isLoading && !isError && notice && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
7536
+ !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(HistoryEntryCard, { entry }, entry.id)),
7537
+ !isLoading && !isError && notice && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
7424
7538
  ] });
7425
7539
 
7426
7540
  // src/ui/components/ui/history/HistoryDrawer.tsx
7427
- var import_jsx_runtime95 = require("react/jsx-runtime");
7541
+ var import_jsx_runtime98 = require("react/jsx-runtime");
7428
7542
  var HistoryDrawer = (_a) => {
7429
7543
  var _b = _a, {
7430
7544
  open,
@@ -7435,7 +7549,7 @@ var HistoryDrawer = (_a) => {
7435
7549
  "onClose",
7436
7550
  "title"
7437
7551
  ]);
7438
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
7552
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
7439
7553
  Drawer,
7440
7554
  {
7441
7555
  open,
@@ -7443,9 +7557,9 @@ var HistoryDrawer = (_a) => {
7443
7557
  className: "z-[1060]",
7444
7558
  overlayClassName: "z-[1050]",
7445
7559
  children: [
7446
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(DrawerHeader, { children: [
7447
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DrawerTitle, { className: "uppercase", children: title }),
7448
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7560
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(DrawerHeader, { children: [
7561
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DrawerTitle, { className: "uppercase", children: title }),
7562
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7449
7563
  Icon,
7450
7564
  {
7451
7565
  name: "xmark",
@@ -7455,7 +7569,7 @@ var HistoryDrawer = (_a) => {
7455
7569
  }
7456
7570
  ) })
7457
7571
  ] }),
7458
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(HistoryList, __spreadValues({}, listProps)) })
7572
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(HistoryList, __spreadValues({}, listProps)) })
7459
7573
  ]
7460
7574
  }
7461
7575
  );
@@ -7463,7 +7577,7 @@ var HistoryDrawer = (_a) => {
7463
7577
 
7464
7578
  // src/ui/components/ui/history/HistoryButton.tsx
7465
7579
  var import_react52 = require("react");
7466
- var import_jsx_runtime96 = require("react/jsx-runtime");
7580
+ var import_jsx_runtime99 = require("react/jsx-runtime");
7467
7581
  var LABEL = "Historique";
7468
7582
  var SHORT_TOOLTIP = "Voir l\u2019historique des actions";
7469
7583
  var HistoryButton = (_a) => {
@@ -7484,10 +7598,10 @@ var HistoryButton = (_a) => {
7484
7598
  onOpenChange == null ? void 0 : onOpenChange(nextIsOpen);
7485
7599
  };
7486
7600
  const open = () => changeOpen(true);
7487
- const icon = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(FaIcon, { name: "clock-rotate-left", size: 14 });
7488
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
7489
- variant === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { label: LABEL, iconLeft: icon, onClick: open }),
7490
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7601
+ const icon = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FaIcon, { name: "clock-rotate-left", size: 14 });
7602
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_jsx_runtime99.Fragment, { children: [
7603
+ variant === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Button, { label: LABEL, iconLeft: icon, onClick: open }),
7604
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7491
7605
  HistoryDrawer,
7492
7606
  __spreadValues({
7493
7607
  open: isOpen,
@@ -7499,7 +7613,7 @@ var HistoryButton = (_a) => {
7499
7613
  };
7500
7614
 
7501
7615
  // src/ui/components/ui/Gantt.tsx
7502
- var import_jsx_runtime97 = require("react/jsx-runtime");
7616
+ var import_jsx_runtime100 = require("react/jsx-runtime");
7503
7617
  var Gantt = ({
7504
7618
  days,
7505
7619
  rows,
@@ -7515,7 +7629,7 @@ var Gantt = ({
7515
7629
  const bodyHeight = rows.length * rowHeight;
7516
7630
  const clickable = Boolean(onRowClick);
7517
7631
  const gridCols = { gridTemplateColumns: `${labelWidth}px minmax(0, 1fr)` };
7518
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
7632
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7519
7633
  "div",
7520
7634
  {
7521
7635
  className: cn(
@@ -7523,13 +7637,13 @@ var Gantt = ({
7523
7637
  className
7524
7638
  ),
7525
7639
  children: [
7526
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
7640
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7527
7641
  "div",
7528
7642
  {
7529
7643
  className: "grid border-b border-grey-300 bg-grey-100",
7530
7644
  style: gridCols,
7531
7645
  children: [
7532
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7646
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7533
7647
  Layout,
7534
7648
  {
7535
7649
  align: "center",
@@ -7537,7 +7651,7 @@ var Gantt = ({
7537
7651
  children: labelHeader
7538
7652
  }
7539
7653
  ),
7540
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7654
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7541
7655
  Layout,
7542
7656
  {
7543
7657
  fullHeight: true,
@@ -7551,13 +7665,13 @@ var Gantt = ({
7551
7665
  ]
7552
7666
  }
7553
7667
  ),
7554
- /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
7668
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7555
7669
  "div",
7556
7670
  {
7557
7671
  className: "grid overflow-y-auto overflow-x-hidden",
7558
7672
  style: __spreadProps(__spreadValues({}, gridCols), { maxHeight }),
7559
7673
  children: [
7560
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7674
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7561
7675
  Layout,
7562
7676
  {
7563
7677
  column: true,
@@ -7574,8 +7688,8 @@ var Gantt = ({
7574
7688
  },
7575
7689
  row.key
7576
7690
  )) }),
7577
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
7578
- days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7691
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
7692
+ days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7579
7693
  "div",
7580
7694
  {
7581
7695
  className: cn(
@@ -7586,7 +7700,7 @@ var Gantt = ({
7586
7700
  },
7587
7701
  day.key
7588
7702
  )),
7589
- bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7703
+ bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7590
7704
  "div",
7591
7705
  {
7592
7706
  title: band.title,
@@ -7597,7 +7711,7 @@ var Gantt = ({
7597
7711
  )),
7598
7712
  rows.map((row, i) => {
7599
7713
  var _a, _b, _c;
7600
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7714
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7601
7715
  "div",
7602
7716
  {
7603
7717
  className: cn(
@@ -7605,7 +7719,7 @@ var Gantt = ({
7605
7719
  i === 0 ? "border-t-0" : "border-t border-grey-200"
7606
7720
  ),
7607
7721
  style: { top: i * rowHeight, height: rowHeight },
7608
- children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7722
+ children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7609
7723
  Layout,
7610
7724
  {
7611
7725
  align: "center",
@@ -7620,7 +7734,7 @@ var Gantt = ({
7620
7734
  background: row.bar.color,
7621
7735
  borderColor: row.bar.color
7622
7736
  },
7623
- children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7737
+ children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7624
7738
  "span",
7625
7739
  {
7626
7740
  className: "overflow-hidden text-ellipsis whitespace-nowrap text-[10px] font-semibold",
@@ -7642,7 +7756,7 @@ var Gantt = ({
7642
7756
  }
7643
7757
  );
7644
7758
  };
7645
- var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7759
+ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7646
7760
  "span",
7647
7761
  {
7648
7762
  className: "inline-block h-[9px] w-[9px] shrink-0 rounded-[3px]",
@@ -7652,7 +7766,7 @@ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7652
7766
  var GanttSwatch = ({
7653
7767
  color,
7654
7768
  filled = true
7655
- }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7769
+ }) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7656
7770
  "span",
7657
7771
  {
7658
7772
  className: "box-border inline-block h-3 w-[18px] shrink-0 rounded-[3px] border-[1.5px]",
@@ -7661,7 +7775,7 @@ var GanttSwatch = ({
7661
7775
  );
7662
7776
 
7663
7777
  // src/ui/components/ui/Timeline.tsx
7664
- var import_jsx_runtime98 = require("react/jsx-runtime");
7778
+ var import_jsx_runtime101 = require("react/jsx-runtime");
7665
7779
  var Timeline = ({
7666
7780
  items,
7667
7781
  lineColor = "#F1F5F9",
@@ -7669,22 +7783,22 @@ var Timeline = ({
7669
7783
  className
7670
7784
  }) => {
7671
7785
  if (items.length === 0) {
7672
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Text, { size: "s", color: "grey-600", children: emptyLabel });
7786
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Text, { size: "s", color: "grey-600", children: emptyLabel });
7673
7787
  }
7674
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Layout, { column: true, className, children: items.map((item, index) => {
7788
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Layout, { column: true, className, children: items.map((item, index) => {
7675
7789
  var _a;
7676
7790
  const isLast = index === items.length - 1;
7677
7791
  const dotColor = (_a = item.color) != null ? _a : "#377EA1";
7678
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { gap: 3, children: [
7679
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { column: true, align: "center", className: "w-4", children: [
7680
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7792
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Layout, { gap: 3, children: [
7793
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Layout, { column: true, align: "center", className: "w-4", children: [
7794
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7681
7795
  "span",
7682
7796
  {
7683
7797
  className: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
7684
7798
  style: { background: dotColor }
7685
7799
  }
7686
7800
  ),
7687
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7801
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7688
7802
  "span",
7689
7803
  {
7690
7804
  className: "w-0.5 flex-1 min-h-[16px]",
@@ -7692,10 +7806,10 @@ var Timeline = ({
7692
7806
  }
7693
7807
  )
7694
7808
  ] }),
7695
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
7696
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
7697
- item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
7698
- item.description && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "text-xs italic text-neutral-800", children: item.description })
7809
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
7810
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
7811
+ item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
7812
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-xs italic text-neutral-800", children: item.description })
7699
7813
  ] })
7700
7814
  ] }, item.id);
7701
7815
  }) });
@@ -7704,7 +7818,7 @@ var Timeline = ({
7704
7818
  // src/ui/components/ui/ColorPicker.tsx
7705
7819
  var import_react53 = require("react");
7706
7820
  var import_class_variance_authority16 = require("class-variance-authority");
7707
- var import_jsx_runtime99 = require("react/jsx-runtime");
7821
+ var import_jsx_runtime102 = require("react/jsx-runtime");
7708
7822
  var swatchVariants = (0, import_class_variance_authority16.cva)(
7709
7823
  "inline-flex shrink-0 overflow-hidden rounded-[6px] border border-grey-300",
7710
7824
  {
@@ -7748,7 +7862,7 @@ var ColorPicker = (0, import_react53.forwardRef)(
7748
7862
  if (value === void 0) setInternalColor(next);
7749
7863
  onChange == null ? void 0 : onChange(next);
7750
7864
  };
7751
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
7865
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
7752
7866
  Layout,
7753
7867
  {
7754
7868
  column: true,
@@ -7756,21 +7870,21 @@ var ColorPicker = (0, import_react53.forwardRef)(
7756
7870
  gap: 1.5,
7757
7871
  className: cn(disabled && "opacity-60", className),
7758
7872
  children: [
7759
- label && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7760
- /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Layout, { gap: 2, children: [
7761
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7873
+ label && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7874
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(Layout, { gap: 2, children: [
7875
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7762
7876
  "label",
7763
7877
  {
7764
7878
  className: cn(
7765
7879
  swatchVariants({ size }),
7766
7880
  disabled ? "cursor-not-allowed" : "cursor-pointer"
7767
7881
  ),
7768
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7882
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7769
7883
  "span",
7770
7884
  {
7771
7885
  className: "relative block h-full w-full",
7772
7886
  style: { backgroundColor: currentColor },
7773
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7887
+ children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7774
7888
  "input",
7775
7889
  {
7776
7890
  ref,
@@ -7785,7 +7899,7 @@ var ColorPicker = (0, import_react53.forwardRef)(
7785
7899
  )
7786
7900
  }
7787
7901
  ),
7788
- /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7902
+ /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7789
7903
  "input",
7790
7904
  __spreadProps(__spreadValues({
7791
7905
  type: "text",
@@ -7825,7 +7939,7 @@ var COLOR_TOKENS = [
7825
7939
  ];
7826
7940
 
7827
7941
  // src/ui/components/ui/ColorTokenPicker.tsx
7828
- var import_jsx_runtime100 = require("react/jsx-runtime");
7942
+ var import_jsx_runtime103 = require("react/jsx-runtime");
7829
7943
  var SWATCH_CLASS = {
7830
7944
  "blue-700": "bg-blue-700",
7831
7945
  "blue-900": "bg-blue-900",
@@ -7847,13 +7961,13 @@ var ColorTokenPicker = ({
7847
7961
  disabled = false
7848
7962
  }) => {
7849
7963
  const [open, setOpen] = (0, import_react54.useState)(false);
7850
- return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7964
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7851
7965
  Popover,
7852
7966
  {
7853
7967
  open,
7854
7968
  onOpenChange: disabled ? void 0 : setOpen,
7855
7969
  align: "start",
7856
- trigger: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7970
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7857
7971
  "button",
7858
7972
  {
7859
7973
  type: "button",
@@ -7864,7 +7978,7 @@ var ColorTokenPicker = ({
7864
7978
  "focus-visible:ring-2 focus-visible:ring-blue-200",
7865
7979
  disabled && "cursor-not-allowed opacity-50"
7866
7980
  ),
7867
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7981
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7868
7982
  "span",
7869
7983
  {
7870
7984
  className: cn(
@@ -7875,7 +7989,7 @@ var ColorTokenPicker = ({
7875
7989
  )
7876
7990
  }
7877
7991
  ),
7878
- children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7992
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7879
7993
  "button",
7880
7994
  {
7881
7995
  type: "button",
@@ -7899,7 +8013,7 @@ var ColorTokenPicker = ({
7899
8013
 
7900
8014
  // src/ui/components/ui/FileUploadZone.tsx
7901
8015
  var import_react55 = require("react");
7902
- var import_jsx_runtime101 = require("react/jsx-runtime");
8016
+ var import_jsx_runtime104 = require("react/jsx-runtime");
7903
8017
  var ACCEPT_MAP = {
7904
8018
  png: "image/png",
7905
8019
  jpg: "image/jpeg",
@@ -8027,7 +8141,7 @@ var FileUploadZone = ({
8027
8141
  onRemove == null ? void 0 : onRemove();
8028
8142
  };
8029
8143
  if (previewUrl) {
8030
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
8144
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
8031
8145
  Layout,
8032
8146
  {
8033
8147
  column: true,
@@ -8039,14 +8153,14 @@ var FileUploadZone = ({
8039
8153
  className
8040
8154
  ),
8041
8155
  children: [
8042
- fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
8156
+ fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8043
8157
  "embed",
8044
8158
  {
8045
8159
  src: previewUrl,
8046
8160
  type: "application/pdf",
8047
8161
  className: "h-[500px] w-full rounded"
8048
8162
  }
8049
- ) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
8163
+ ) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8050
8164
  "img",
8051
8165
  {
8052
8166
  src: previewUrl,
@@ -8054,13 +8168,13 @@ var FileUploadZone = ({
8054
8168
  className: "max-h-[400px] max-w-full rounded object-contain"
8055
8169
  }
8056
8170
  ),
8057
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
8171
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8058
8172
  Button,
8059
8173
  {
8060
8174
  label: "Supprimer",
8061
8175
  theme: "red-900",
8062
8176
  size: "s",
8063
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(FaIcon, { name: "trash", size: 14 }),
8177
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "trash", size: 14 }),
8064
8178
  onClick: handleRemove
8065
8179
  }
8066
8180
  )
@@ -8069,14 +8183,14 @@ var FileUploadZone = ({
8069
8183
  );
8070
8184
  }
8071
8185
  const showBrowse = !compact && browseLabel !== false;
8072
- return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
8186
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
8073
8187
  Layout,
8074
8188
  {
8075
8189
  column: true,
8076
8190
  gap: 1,
8077
8191
  className: cn(fullWidth ? "w-full" : "w-fit", className),
8078
8192
  children: [
8079
- /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
8193
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
8080
8194
  "label",
8081
8195
  {
8082
8196
  onDragOver: handleDragOver,
@@ -8090,7 +8204,7 @@ var FileUploadZone = ({
8090
8204
  isDragging ? "border-solid border-blue-100 bg-blue-50" : cn(compact ? "border-grey-300" : "border-blue-50", "bg-grey-100")
8091
8205
  ),
8092
8206
  children: [
8093
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
8207
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8094
8208
  "input",
8095
8209
  {
8096
8210
  ref: inputRef,
@@ -8102,11 +8216,11 @@ var FileUploadZone = ({
8102
8216
  className: "hidden"
8103
8217
  }
8104
8218
  ),
8105
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
8106
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-center text-sm text-grey-600", children: label }),
8107
- showBrowse && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
8108
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
8109
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
8219
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
8220
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-center text-sm text-grey-600", children: label }),
8221
+ showBrowse && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
8222
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
8223
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8110
8224
  Button,
8111
8225
  {
8112
8226
  label: browseLabel,
@@ -8120,15 +8234,15 @@ var FileUploadZone = ({
8120
8234
  }
8121
8235
  )
8122
8236
  ] }),
8123
- sublabel && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-center text-xs text-grey-500", children: sublabel })
8237
+ sublabel && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-center text-xs text-grey-500", children: sublabel })
8124
8238
  ]
8125
8239
  }
8126
8240
  ),
8127
- showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(Layout, { align: "center", justify: "center", gap: 2, children: [
8128
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
8129
- /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-sm text-green-700", children: fileName })
8241
+ showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(Layout, { align: "center", justify: "center", gap: 2, children: [
8242
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
8243
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-sm text-green-700", children: fileName })
8130
8244
  ] }),
8131
- inlineError && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("span", { className: "text-center text-sm text-red-900", children: inlineError })
8245
+ inlineError && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-center text-sm text-red-900", children: inlineError })
8132
8246
  ]
8133
8247
  }
8134
8248
  );
@@ -8136,7 +8250,7 @@ var FileUploadZone = ({
8136
8250
 
8137
8251
  // src/ui/components/ui/FilePicker.tsx
8138
8252
  var import_react56 = require("react");
8139
- var import_jsx_runtime102 = require("react/jsx-runtime");
8253
+ var import_jsx_runtime105 = require("react/jsx-runtime");
8140
8254
  var FilePicker = ({
8141
8255
  label,
8142
8256
  onSelect,
@@ -8151,8 +8265,8 @@ var FilePicker = ({
8151
8265
  className
8152
8266
  }) => {
8153
8267
  const inputRef = (0, import_react56.useRef)(null);
8154
- return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
8155
- /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
8268
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
8269
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8156
8270
  "input",
8157
8271
  {
8158
8272
  ref: inputRef,
@@ -8168,20 +8282,20 @@ var FilePicker = ({
8168
8282
  }
8169
8283
  }
8170
8284
  ),
8171
- variant === "button" ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
8285
+ variant === "button" ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8172
8286
  Button,
8173
8287
  {
8174
8288
  variant: "outline",
8175
8289
  label,
8176
8290
  disabled,
8177
8291
  className,
8178
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
8292
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
8179
8293
  onClick: () => {
8180
8294
  var _a;
8181
8295
  return (_a = inputRef.current) == null ? void 0 : _a.click();
8182
8296
  }
8183
8297
  }
8184
- ) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Tooltip, { content: label, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
8298
+ ) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { content: label, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8185
8299
  Icon,
8186
8300
  {
8187
8301
  name: icon,
@@ -8203,7 +8317,7 @@ var FilePicker = ({
8203
8317
  // src/ui/components/ui/Item.tsx
8204
8318
  var import_react57 = require("react");
8205
8319
  var import_class_variance_authority17 = require("class-variance-authority");
8206
- var import_jsx_runtime103 = require("react/jsx-runtime");
8320
+ var import_jsx_runtime106 = require("react/jsx-runtime");
8207
8321
  var itemVariants = (0, import_class_variance_authority17.cva)(
8208
8322
  "group/item flex items-center rounded-[6px] border border-transparent transition-colors",
8209
8323
  {
@@ -8224,7 +8338,7 @@ var itemVariants = (0, import_class_variance_authority17.cva)(
8224
8338
  var Item4 = (0, import_react57.forwardRef)(
8225
8339
  (_a, ref) => {
8226
8340
  var _b = _a, { variant, size, className } = _b, props = __objRest(_b, ["variant", "size", "className"]);
8227
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
8341
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8228
8342
  "div",
8229
8343
  __spreadValues({
8230
8344
  ref,
@@ -8249,7 +8363,7 @@ var itemMediaVariants = (0, import_class_variance_authority17.cva)(
8249
8363
  );
8250
8364
  var ItemMedia = (_a) => {
8251
8365
  var _b = _a, { variant, className } = _b, props = __objRest(_b, ["variant", "className"]);
8252
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
8366
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
8253
8367
  };
8254
8368
  var ItemContent = (_a) => {
8255
8369
  var _b = _a, {
@@ -8257,7 +8371,7 @@ var ItemContent = (_a) => {
8257
8371
  } = _b, props = __objRest(_b, [
8258
8372
  "className"
8259
8373
  ]);
8260
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
8374
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8261
8375
  "div",
8262
8376
  __spreadValues({
8263
8377
  className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
@@ -8270,7 +8384,7 @@ var ItemTitle = (_a) => {
8270
8384
  } = _b, props = __objRest(_b, [
8271
8385
  "className"
8272
8386
  ]);
8273
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
8387
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8274
8388
  "div",
8275
8389
  __spreadValues({
8276
8390
  className: cn(
@@ -8286,7 +8400,7 @@ var ItemDescription = (_a) => {
8286
8400
  } = _b, props = __objRest(_b, [
8287
8401
  "className"
8288
8402
  ]);
8289
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
8403
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
8290
8404
  };
8291
8405
  var ItemActions = (_a) => {
8292
8406
  var _b = _a, {
@@ -8294,7 +8408,7 @@ var ItemActions = (_a) => {
8294
8408
  } = _b, props = __objRest(_b, [
8295
8409
  "className"
8296
8410
  ]);
8297
- return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
8411
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8298
8412
  "div",
8299
8413
  __spreadValues({
8300
8414
  className: cn("flex shrink-0 items-center gap-2", className)
@@ -8303,7 +8417,7 @@ var ItemActions = (_a) => {
8303
8417
  };
8304
8418
 
8305
8419
  // src/ui/components/ui/Attachment.tsx
8306
- var import_jsx_runtime104 = require("react/jsx-runtime");
8420
+ var import_jsx_runtime107 = require("react/jsx-runtime");
8307
8421
  var Attachment = ({
8308
8422
  name,
8309
8423
  size,
@@ -8317,7 +8431,7 @@ var Attachment = ({
8317
8431
  }) => {
8318
8432
  const isUploading = status === "uploading";
8319
8433
  const isError = status === "error";
8320
- return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
8434
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
8321
8435
  Item4,
8322
8436
  {
8323
8437
  variant: "outline",
@@ -8329,12 +8443,12 @@ var Attachment = ({
8329
8443
  ),
8330
8444
  style: { width },
8331
8445
  children: [
8332
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8446
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8333
8447
  ItemMedia,
8334
8448
  {
8335
8449
  variant: "icon",
8336
8450
  className: cn(isError && "border-red-900 bg-red-50"),
8337
- children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8451
+ children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8338
8452
  FaIcon,
8339
8453
  {
8340
8454
  name: isError ? "triangle-exclamation" : "file",
@@ -8344,33 +8458,33 @@ var Attachment = ({
8344
8458
  )
8345
8459
  }
8346
8460
  ),
8347
- /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(ItemContent, { children: [
8348
- /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ItemTitle, { children: name }),
8349
- isUploading ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(ItemDescription, { className: "text-xs", children: [
8461
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(ItemContent, { children: [
8462
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ItemTitle, { children: name }),
8463
+ isUploading ? /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(ItemDescription, { className: "text-xs", children: [
8350
8464
  "Uploading - ",
8351
8465
  progress,
8352
8466
  "%"
8353
- ] }) : isError ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ItemDescription, { className: "text-xs", children: size })
8467
+ ] }) : isError ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(ItemDescription, { className: "text-xs", children: size })
8354
8468
  ] }),
8355
- (onRetry || onRemove) && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(ItemActions, { children: [
8356
- isError && onRetry && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8469
+ (onRetry || onRemove) && /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(ItemActions, { children: [
8470
+ isError && onRetry && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8357
8471
  "button",
8358
8472
  {
8359
8473
  type: "button",
8360
8474
  onClick: onRetry,
8361
8475
  "aria-label": `R\xE9essayer l'envoi de ${name}`,
8362
8476
  className: "text-grey-400 hover:text-grey-600",
8363
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "rotate-right", size: 12 })
8477
+ children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(FaIcon, { name: "rotate-right", size: 12 })
8364
8478
  }
8365
8479
  ),
8366
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
8480
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8367
8481
  "button",
8368
8482
  {
8369
8483
  type: "button",
8370
8484
  onClick: onRemove,
8371
8485
  "aria-label": `Retirer ${name}`,
8372
8486
  className: "text-grey-400 hover:text-grey-600",
8373
- children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "xmark", size: 12 })
8487
+ children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(FaIcon, { name: "xmark", size: 12 })
8374
8488
  }
8375
8489
  )
8376
8490
  ] })
@@ -8382,7 +8496,7 @@ var Attachment = ({
8382
8496
  // src/ui/components/ui/PdfPreview.tsx
8383
8497
  var import_react58 = require("react");
8384
8498
  var import_react_pdf = require("react-pdf");
8385
- var import_jsx_runtime105 = require("react/jsx-runtime");
8499
+ var import_jsx_runtime108 = require("react/jsx-runtime");
8386
8500
  import_react_pdf.pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${import_react_pdf.pdfjs.version}/build/pdf.worker.min.mjs`;
8387
8501
  var PdfPreview = ({
8388
8502
  file,
@@ -8393,9 +8507,9 @@ var PdfPreview = ({
8393
8507
  const [hasError, setHasError] = (0, import_react58.useState)(false);
8394
8508
  const [numPages, setNumPages] = (0, import_react58.useState)(0);
8395
8509
  const height = Math.round(width * 1.3);
8396
- const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Skeleton, { width, height });
8510
+ const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Skeleton, { width, height });
8397
8511
  if (hasError) {
8398
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
8512
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8399
8513
  Layout,
8400
8514
  {
8401
8515
  column: true,
@@ -8408,13 +8522,13 @@ var PdfPreview = ({
8408
8522
  ),
8409
8523
  style: { width, height },
8410
8524
  children: [
8411
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
8412
- /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
8525
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
8526
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
8413
8527
  ]
8414
8528
  }
8415
8529
  );
8416
8530
  }
8417
- return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8531
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8418
8532
  "div",
8419
8533
  {
8420
8534
  className: cn(
@@ -8422,7 +8536,7 @@ var PdfPreview = ({
8422
8536
  className
8423
8537
  ),
8424
8538
  style: { width, maxHeight },
8425
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8539
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8426
8540
  import_react_pdf.Document,
8427
8541
  {
8428
8542
  file,
@@ -8430,7 +8544,7 @@ var PdfPreview = ({
8430
8544
  onLoadError: () => setHasError(true),
8431
8545
  loading: thumbnailSkeleton,
8432
8546
  error: thumbnailSkeleton,
8433
- children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8547
+ children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8434
8548
  import_react_pdf.Page,
8435
8549
  {
8436
8550
  pageNumber: i + 1,
@@ -8451,7 +8565,7 @@ var import_react60 = require("react");
8451
8565
 
8452
8566
  // src/ui/components/ui/VideoPlayer.tsx
8453
8567
  var import_react59 = require("react");
8454
- var import_jsx_runtime106 = require("react/jsx-runtime");
8568
+ var import_jsx_runtime109 = require("react/jsx-runtime");
8455
8569
  var formatVideoDuration = (seconds) => {
8456
8570
  if (seconds === void 0 || !Number.isFinite(seconds) || seconds < 0)
8457
8571
  return "";
@@ -8550,8 +8664,8 @@ var VideoPlayer = ({
8550
8664
  const stopBubbling = (e) => {
8551
8665
  e.stopPropagation();
8552
8666
  };
8553
- return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
8554
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
8667
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(import_jsx_runtime109.Fragment, { children: [
8668
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
8555
8669
  Layout,
8556
8670
  {
8557
8671
  className: cn(
@@ -8562,7 +8676,7 @@ var VideoPlayer = ({
8562
8676
  onClick: stopBubbling,
8563
8677
  "data-testid": "video-player",
8564
8678
  children: [
8565
- isInlinePlaying ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8679
+ isInlinePlaying ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8566
8680
  "video",
8567
8681
  {
8568
8682
  ref: attachInlineVideo,
@@ -8574,7 +8688,7 @@ var VideoPlayer = ({
8574
8688
  className: "h-full w-full bg-black object-contain",
8575
8689
  "aria-label": title
8576
8690
  }
8577
- ) : /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
8691
+ ) : /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
8578
8692
  "button",
8579
8693
  {
8580
8694
  type: "button",
@@ -8582,7 +8696,7 @@ var VideoPlayer = ({
8582
8696
  "aria-label": `Lire la vid\xE9o ${title}`,
8583
8697
  className: "group relative flex h-full w-full items-center justify-center",
8584
8698
  children: [
8585
- visiblePoster ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8699
+ visiblePoster ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8586
8700
  "img",
8587
8701
  {
8588
8702
  src: visiblePoster,
@@ -8593,7 +8707,7 @@ var VideoPlayer = ({
8593
8707
  ) : (
8594
8708
  // Sans vignette : première image de la vidéo (métadonnées seulement,
8595
8709
  // `#t=0.1` force l'affichage d'une frame), tuile sombre si ça échoue.
8596
- !hasFramePreviewError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8710
+ !hasFramePreviewError && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8597
8711
  "video",
8598
8712
  {
8599
8713
  src: `${src}#t=0.1`,
@@ -8608,12 +8722,12 @@ var VideoPlayer = ({
8608
8722
  }
8609
8723
  )
8610
8724
  ),
8611
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-full bg-blue-900 text-white transition-colors group-hover:bg-blue-950", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FaIcon, { name: "play", family: "solid", size: 18 }) }),
8612
- formattedDuration && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "absolute bottom-2 left-2 rounded bg-black/60 px-1.5 py-0.5 text-xs font-medium text-white", children: formattedDuration })
8725
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-full bg-blue-900 text-white transition-colors group-hover:bg-blue-950", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(FaIcon, { name: "play", family: "solid", size: 18 }) }),
8726
+ formattedDuration && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("span", { className: "absolute bottom-2 left-2 rounded bg-black/60 px-1.5 py-0.5 text-xs font-medium text-white", children: formattedDuration })
8613
8727
  ]
8614
8728
  }
8615
8729
  ),
8616
- label && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8730
+ label && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8617
8731
  Layout,
8618
8732
  {
8619
8733
  width: "auto",
@@ -8621,14 +8735,14 @@ var VideoPlayer = ({
8621
8735
  children: label
8622
8736
  }
8623
8737
  ),
8624
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
8738
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
8625
8739
  Layout,
8626
8740
  {
8627
8741
  width: "auto",
8628
8742
  gap: 1,
8629
8743
  className: "absolute right-1 top-1 rounded-full bg-white/90",
8630
8744
  children: [
8631
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8745
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8632
8746
  Icon,
8633
8747
  {
8634
8748
  name: "up-right-and-down-left-from-center",
@@ -8637,7 +8751,7 @@ var VideoPlayer = ({
8637
8751
  "aria-label": "Agrandir la vid\xE9o"
8638
8752
  }
8639
8753
  ) }),
8640
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8754
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8641
8755
  Icon,
8642
8756
  {
8643
8757
  name: "download",
@@ -8649,7 +8763,7 @@ var VideoPlayer = ({
8649
8763
  ]
8650
8764
  }
8651
8765
  ),
8652
- meta && !isInlinePlaying && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8766
+ meta && !isInlinePlaying && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8653
8767
  Layout,
8654
8768
  {
8655
8769
  width: "auto",
@@ -8660,7 +8774,7 @@ var VideoPlayer = ({
8660
8774
  ]
8661
8775
  }
8662
8776
  ),
8663
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
8777
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
8664
8778
  Modal,
8665
8779
  {
8666
8780
  open: isExpanded,
@@ -8668,9 +8782,9 @@ var VideoPlayer = ({
8668
8782
  onOpenAutoFocus: focusExpandedVideo,
8669
8783
  width: "70vw",
8670
8784
  children: [
8671
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
8672
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
8673
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8785
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
8786
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
8787
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8674
8788
  IconBadge,
8675
8789
  {
8676
8790
  name: "video",
@@ -8679,10 +8793,10 @@ var VideoPlayer = ({
8679
8793
  iconColor: "blue_900"
8680
8794
  }
8681
8795
  ),
8682
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModalTitle, { className: "truncate", children: title })
8796
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ModalTitle, { className: "truncate", children: title })
8683
8797
  ] }),
8684
- /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Layout, { width: "auto", align: "center", gap: 1, children: [
8685
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8798
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { width: "auto", align: "center", gap: 1, children: [
8799
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8686
8800
  Icon,
8687
8801
  {
8688
8802
  name: "download",
@@ -8691,7 +8805,7 @@ var VideoPlayer = ({
8691
8805
  "aria-label": "T\xE9l\xE9charger la vid\xE9o"
8692
8806
  }
8693
8807
  ) }),
8694
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8808
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8695
8809
  Icon,
8696
8810
  {
8697
8811
  name: "xmark",
@@ -8703,7 +8817,7 @@ var VideoPlayer = ({
8703
8817
  ) })
8704
8818
  ] })
8705
8819
  ] }) }),
8706
- /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8820
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8707
8821
  "video",
8708
8822
  {
8709
8823
  ref: attachExpandedVideo,
@@ -8724,7 +8838,7 @@ var VideoPlayer = ({
8724
8838
  };
8725
8839
 
8726
8840
  // src/ui/components/ui/AudioPlayer.tsx
8727
- var import_jsx_runtime107 = require("react/jsx-runtime");
8841
+ var import_jsx_runtime110 = require("react/jsx-runtime");
8728
8842
  var DEFAULT_VOLUME2 = 0.5;
8729
8843
  var clampVolume2 = (volume) => Number.isFinite(volume) ? Math.min(1, Math.max(0, volume)) : DEFAULT_VOLUME2;
8730
8844
  var AudioPlayer = ({
@@ -8767,7 +8881,7 @@ var AudioPlayer = ({
8767
8881
  const value = (_b = (_a = audioRef.current) == null ? void 0 : _a.duration) != null ? _b : 0;
8768
8882
  setDuration(Number.isFinite(value) ? value : 0);
8769
8883
  };
8770
- return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
8884
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
8771
8885
  Layout,
8772
8886
  {
8773
8887
  gap: 3,
@@ -8776,7 +8890,7 @@ var AudioPlayer = ({
8776
8890
  className: cn("rounded-lg border border-grey-300 p-2", className),
8777
8891
  "data-testid": "audio-player",
8778
8892
  children: [
8779
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8893
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
8780
8894
  "audio",
8781
8895
  {
8782
8896
  ref: attachAudio,
@@ -8794,19 +8908,19 @@ var AudioPlayer = ({
8794
8908
  "aria-label": title
8795
8909
  }
8796
8910
  ),
8797
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8911
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
8798
8912
  Button,
8799
8913
  {
8800
8914
  variant: "outline",
8801
8915
  size: "s",
8802
8916
  iconOnly: true,
8803
8917
  "aria-label": isPlaying ? `Mettre en pause ${title}` : `Lire ${title}`,
8804
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8918
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8805
8919
  onClick: togglePlayback
8806
8920
  }
8807
8921
  ),
8808
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8809
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8922
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8923
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
8810
8924
  "input",
8811
8925
  {
8812
8926
  type: "range",
@@ -8820,7 +8934,7 @@ var AudioPlayer = ({
8820
8934
  className: "h-1 min-w-0 flex-1 cursor-pointer accent-blue-700 disabled:cursor-default"
8821
8935
  }
8822
8936
  ),
8823
- /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8937
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8824
8938
  ]
8825
8939
  }
8826
8940
  );
@@ -8828,7 +8942,7 @@ var AudioPlayer = ({
8828
8942
 
8829
8943
  // src/ui/components/ui/ScrollArea.tsx
8830
8944
  var RadixScrollArea = __toESM(require("@radix-ui/react-scroll-area"));
8831
- var import_jsx_runtime108 = require("react/jsx-runtime");
8945
+ var import_jsx_runtime111 = require("react/jsx-runtime");
8832
8946
  var HIDDEN_SCROLLBAR_CLASSNAME = "w-0 h-0 opacity-0";
8833
8947
  var ScrollArea = (_a) => {
8834
8948
  var _b = _a, {
@@ -8844,13 +8958,13 @@ var ScrollArea = (_a) => {
8844
8958
  "viewportRef",
8845
8959
  "maxHeight"
8846
8960
  ]);
8847
- return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8961
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
8848
8962
  RadixScrollArea.Root,
8849
8963
  __spreadProps(__spreadValues({
8850
8964
  className: cn("relative overflow-hidden", className)
8851
8965
  }, props), {
8852
8966
  children: [
8853
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8967
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8854
8968
  RadixScrollArea.Viewport,
8855
8969
  {
8856
8970
  ref: viewportRef,
@@ -8863,23 +8977,23 @@ var ScrollArea = (_a) => {
8863
8977
  children
8864
8978
  }
8865
8979
  ),
8866
- (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8980
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8867
8981
  RadixScrollArea.Scrollbar,
8868
8982
  {
8869
8983
  orientation: "vertical",
8870
8984
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8871
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8985
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8872
8986
  }
8873
8987
  ),
8874
- (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8988
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8875
8989
  RadixScrollArea.Scrollbar,
8876
8990
  {
8877
8991
  orientation: "horizontal",
8878
8992
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8879
- children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8993
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8880
8994
  }
8881
8995
  ),
8882
- /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RadixScrollArea.Corner, {})
8996
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixScrollArea.Corner, {})
8883
8997
  ]
8884
8998
  })
8885
8999
  );
@@ -8887,7 +9001,7 @@ var ScrollArea = (_a) => {
8887
9001
 
8888
9002
  // src/ui/components/ui/Message.tsx
8889
9003
  var import_react61 = require("react");
8890
- var import_jsx_runtime109 = require("react/jsx-runtime");
9004
+ var import_jsx_runtime112 = require("react/jsx-runtime");
8891
9005
  var BUBBLE_BACKGROUND = {
8892
9006
  own: { solid: "bg-blue-700", pale: "bg-blue-50" },
8893
9007
  teammate: { solid: "bg-blue-100", pale: "bg-blue-100" },
@@ -8946,7 +9060,7 @@ var Message = (0, import_react61.forwardRef)(
8946
9060
  const isInverted = isOwn && variant === "solid";
8947
9061
  const contentColor = isInverted ? "white" : "neutral-800";
8948
9062
  const metaColor = isInverted ? "white" : "grey-500";
8949
- const avatar = showAuthor ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
9063
+ const avatar = showAuthor ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
8950
9064
  Layout,
8951
9065
  {
8952
9066
  width: `${avatarSize}px`,
@@ -8954,8 +9068,8 @@ var Message = (0, import_react61.forwardRef)(
8954
9068
  "aria-hidden": "true"
8955
9069
  }
8956
9070
  );
8957
- const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
8958
- const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
9071
+ const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
9072
+ const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
8959
9073
  Layout,
8960
9074
  {
8961
9075
  width: "auto",
@@ -8968,7 +9082,7 @@ var Message = (0, import_react61.forwardRef)(
8968
9082
  children: actions
8969
9083
  }
8970
9084
  ) : null;
8971
- return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
9085
+ return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
8972
9086
  Layout,
8973
9087
  __spreadProps(__spreadValues({
8974
9088
  ref,
@@ -8979,7 +9093,7 @@ var Message = (0, import_react61.forwardRef)(
8979
9093
  className
8980
9094
  }, props), {
8981
9095
  children: [
8982
- /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
9096
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
8983
9097
  Layout,
8984
9098
  {
8985
9099
  fullWidth: true,
@@ -8990,7 +9104,7 @@ var Message = (0, import_react61.forwardRef)(
8990
9104
  children: [
8991
9105
  !isRightAligned && avatar,
8992
9106
  isRightAligned && actionsSlot,
8993
- /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
9107
+ /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
8994
9108
  Layout,
8995
9109
  {
8996
9110
  column: true,
@@ -8999,7 +9113,7 @@ var Message = (0, import_react61.forwardRef)(
8999
9113
  align: isRightAligned ? "end" : "start",
9000
9114
  style: { maxWidth },
9001
9115
  children: [
9002
- bubble ? /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
9116
+ bubble ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
9003
9117
  Layout,
9004
9118
  {
9005
9119
  column: true,
@@ -9013,16 +9127,16 @@ var Message = (0, import_react61.forwardRef)(
9013
9127
  cornerActions && "pr-8"
9014
9128
  ),
9015
9129
  children: [
9016
- deleted ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { size: "s", color: contentColor, children }),
9017
- time && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { size: "xxs", color: metaColor, children: time }) }),
9130
+ deleted ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "s", color: contentColor, children }),
9131
+ time && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "xxs", color: metaColor, children: time }) }),
9018
9132
  cornerActions
9019
9133
  ]
9020
9134
  }
9021
- ) : cornerActions ? /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { width: "auto", className: "relative", children: [
9135
+ ) : cornerActions ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Layout, { width: "auto", className: "relative", children: [
9022
9136
  children,
9023
9137
  cornerActions
9024
9138
  ] }) : children,
9025
- status && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
9139
+ status && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
9026
9140
  ]
9027
9141
  }
9028
9142
  ),
@@ -9031,7 +9145,7 @@ var Message = (0, import_react61.forwardRef)(
9031
9145
  ]
9032
9146
  }
9033
9147
  ),
9034
- showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Text, { size: "xs", color: "grey-600", children: authorName })
9148
+ showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "xs", color: "grey-600", children: authorName })
9035
9149
  ]
9036
9150
  })
9037
9151
  );
@@ -9041,7 +9155,7 @@ Message.displayName = "Message";
9041
9155
 
9042
9156
  // src/ui/components/ui/MessageScroller.tsx
9043
9157
  var import_react62 = require("react");
9044
- var import_jsx_runtime110 = require("react/jsx-runtime");
9158
+ var import_jsx_runtime113 = require("react/jsx-runtime");
9045
9159
  var SEPARATOR_LINE = {
9046
9160
  neutral: "",
9047
9161
  alert: "bg-red-500"
@@ -9054,9 +9168,9 @@ var MessageDateSeparator = ({
9054
9168
  label,
9055
9169
  tone = "neutral",
9056
9170
  className
9057
- }) => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
9058
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
9059
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
9171
+ }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
9172
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
9173
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
9060
9174
  Text,
9061
9175
  {
9062
9176
  size: "xs",
@@ -9065,7 +9179,7 @@ var MessageDateSeparator = ({
9065
9179
  children: label
9066
9180
  }
9067
9181
  ) }),
9068
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
9182
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
9069
9183
  ] });
9070
9184
  var MessageScroller = ({
9071
9185
  children,
@@ -9105,13 +9219,13 @@ var MessageScroller = ({
9105
9219
  if (isEmpty && emptyState) return emptyState;
9106
9220
  return children;
9107
9221
  };
9108
- const scroller = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
9222
+ const scroller = /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
9109
9223
  ScrollArea,
9110
9224
  {
9111
9225
  viewportRef: scrollerRef,
9112
9226
  className: cn("w-full", floatingFooter ? "min-h-0 flex-1" : className),
9113
9227
  style: typeof height === "number" ? { height: `${height}px` } : { height },
9114
- children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
9228
+ children: /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
9115
9229
  Layout,
9116
9230
  {
9117
9231
  column: true,
@@ -9134,9 +9248,9 @@ var MessageScroller = ({
9134
9248
  }
9135
9249
  );
9136
9250
  if (!floatingFooter) return scroller;
9137
- return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
9251
+ return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
9138
9252
  scroller,
9139
- /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
9253
+ /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
9140
9254
  Layout,
9141
9255
  {
9142
9256
  width: "auto",
@@ -9149,13 +9263,13 @@ var MessageScroller = ({
9149
9263
 
9150
9264
  // src/ui/components/ui/Stepper.tsx
9151
9265
  var import_react63 = require("react");
9152
- var import_jsx_runtime111 = require("react/jsx-runtime");
9266
+ var import_jsx_runtime114 = require("react/jsx-runtime");
9153
9267
  var Stepper = ({
9154
9268
  numberOfSteps,
9155
9269
  current = 0,
9156
9270
  size = 28,
9157
9271
  className
9158
- }) => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
9272
+ }) => /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
9159
9273
  "nav",
9160
9274
  {
9161
9275
  "aria-label": "progression",
@@ -9166,8 +9280,8 @@ var Stepper = ({
9166
9280
  children: Array.from({ length: numberOfSteps }, (_, i) => {
9167
9281
  const isActive = i === current;
9168
9282
  const isCompleted = i < current;
9169
- return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_react63.Fragment, { children: [
9170
- /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
9283
+ return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_react63.Fragment, { children: [
9284
+ /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
9171
9285
  "div",
9172
9286
  {
9173
9287
  "aria-hidden": true,
@@ -9176,10 +9290,10 @@ var Stepper = ({
9176
9290
  isCompleted ? "border-blue-800 bg-blue-800 text-white" : isActive ? "border-blue-800 bg-white text-blue-800" : "border-grey-500 bg-white text-grey-500"
9177
9291
  ),
9178
9292
  style: { width: size, height: size },
9179
- children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
9293
+ children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
9180
9294
  }
9181
9295
  ),
9182
- i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
9296
+ i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
9183
9297
  ] }, i);
9184
9298
  })
9185
9299
  }
@@ -9193,7 +9307,7 @@ var import_style2 = require("react-day-picker/style.css");
9193
9307
  var import_date_fns = require("date-fns");
9194
9308
  var import_locale2 = require("date-fns/locale");
9195
9309
  var RadixPopover6 = __toESM(require("@radix-ui/react-popover"));
9196
- var import_jsx_runtime112 = require("react/jsx-runtime");
9310
+ var import_jsx_runtime115 = require("react/jsx-runtime");
9197
9311
  var formatMonthCaption = (month) => (0, import_date_fns.format)(month, "MMM yyyy", { locale: import_locale2.fr });
9198
9312
  var isSameCalendarDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
9199
9313
  var parseTypedDate = (text, minDate, maxDate) => {
@@ -9223,7 +9337,7 @@ var autoFormatTypedInput = (raw, isRange) => {
9223
9337
  var RANGE_PRESETS = [
9224
9338
  {
9225
9339
  label: "Mois pr\xE9c\xE9dent",
9226
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-arrow-up", size: 15 }),
9340
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-arrow-up", size: 15 }),
9227
9341
  getValue: () => [
9228
9342
  (0, import_date_fns.startOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1)),
9229
9343
  (0, import_date_fns.endOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1))
@@ -9231,34 +9345,34 @@ var RANGE_PRESETS = [
9231
9345
  },
9232
9346
  {
9233
9347
  label: "Ce mois",
9234
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9348
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9235
9349
  getValue: () => [(0, import_date_fns.startOfMonth)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfMonth)(/* @__PURE__ */ new Date())]
9236
9350
  },
9237
9351
  {
9238
9352
  label: "Ce trimestre",
9239
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-range", size: 15 }),
9353
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-range", size: 15 }),
9240
9354
  getValue: () => [(0, import_date_fns.startOfQuarter)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfQuarter)(/* @__PURE__ */ new Date())]
9241
9355
  },
9242
9356
  {
9243
9357
  label: "Cette ann\xE9e",
9244
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9358
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9245
9359
  getValue: () => [(0, import_date_fns.startOfYear)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfYear)(/* @__PURE__ */ new Date())]
9246
9360
  }
9247
9361
  ];
9248
9362
  var SINGLE_PRESETS = [
9249
9363
  {
9250
9364
  label: "Aujourd'hui",
9251
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9365
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9252
9366
  getValue: () => /* @__PURE__ */ new Date()
9253
9367
  },
9254
9368
  {
9255
9369
  label: "Demain",
9256
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-plus", size: 15 }),
9370
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-plus", size: 15 }),
9257
9371
  getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 1)
9258
9372
  },
9259
9373
  {
9260
9374
  label: "Dans 7 jours",
9261
- icon: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9375
+ icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9262
9376
  getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
9263
9377
  }
9264
9378
  ];
@@ -9346,7 +9460,7 @@ var DatePicker = ({
9346
9460
  setIsEditing(false);
9347
9461
  }
9348
9462
  };
9349
- const calendar = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(RadixPopover6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9463
+ const calendar = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RadixPopover6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9350
9464
  RadixPopover6.Content,
9351
9465
  {
9352
9466
  align,
@@ -9358,7 +9472,7 @@ var DatePicker = ({
9358
9472
  // mois (range) passait à la ligne et se faisait couper par max-h.
9359
9473
  isRange && "max-h-[320px] max-w-[460px] overflow-y-auto [&_.rdp-months]:flex-nowrap"
9360
9474
  ),
9361
- children: isRange ? /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9475
+ children: isRange ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9362
9476
  import_react_day_picker.DayPicker,
9363
9477
  {
9364
9478
  mode: "range",
@@ -9376,7 +9490,7 @@ var DatePicker = ({
9376
9490
  showOutsideDays: true,
9377
9491
  formatters: { formatCaption: formatMonthCaption }
9378
9492
  }
9379
- ) : /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9493
+ ) : /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9380
9494
  import_react_day_picker.DayPicker,
9381
9495
  {
9382
9496
  mode: "single",
@@ -9394,8 +9508,8 @@ var DatePicker = ({
9394
9508
  }
9395
9509
  ) });
9396
9510
  if (!showPresets) {
9397
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9398
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
9511
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9512
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
9399
9513
  Layout,
9400
9514
  {
9401
9515
  align: "center",
@@ -9409,7 +9523,7 @@ var DatePicker = ({
9409
9523
  className
9410
9524
  ),
9411
9525
  children: [
9412
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9526
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9413
9527
  "input",
9414
9528
  {
9415
9529
  type: "text",
@@ -9430,14 +9544,14 @@ var DatePicker = ({
9430
9544
  )
9431
9545
  }
9432
9546
  ),
9433
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9547
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9434
9548
  "button",
9435
9549
  {
9436
9550
  type: "button",
9437
9551
  "aria-label": "Ouvrir le calendrier",
9438
9552
  disabled,
9439
9553
  className: "flex h-full w-8 shrink-0 items-center justify-center text-grey-500 hover:text-blue-700 disabled:cursor-not-allowed",
9440
- children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar", size: 14 })
9554
+ children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar", size: 14 })
9441
9555
  }
9442
9556
  ) })
9443
9557
  ]
@@ -9446,10 +9560,10 @@ var DatePicker = ({
9446
9560
  calendar
9447
9561
  ] });
9448
9562
  }
9449
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9450
- /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
9451
- /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
9452
- /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9563
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9564
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
9565
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
9566
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9453
9567
  "button",
9454
9568
  {
9455
9569
  type: "button",
@@ -9461,12 +9575,12 @@ var DatePicker = ({
9461
9575
  hasValue && !activePreset ? "border-blue-700 bg-blue-50 text-blue-700" : "border-grey-300 bg-white text-neutral-800 hover:border-blue-700",
9462
9576
  "disabled:cursor-not-allowed disabled:opacity-60"
9463
9577
  ),
9464
- children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(FaIcon, { name: "calendar", size: 16 })
9578
+ children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(FaIcon, { name: "calendar", size: 16 })
9465
9579
  }
9466
9580
  ) }),
9467
9581
  resolvedPresets.map((preset) => {
9468
9582
  const active = activePreset === preset.label;
9469
- return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Tooltip, { content: preset.label, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9583
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Tooltip, { content: preset.label, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9470
9584
  "button",
9471
9585
  {
9472
9586
  type: "button",
@@ -9484,7 +9598,7 @@ var DatePicker = ({
9484
9598
  ) }, preset.label);
9485
9599
  })
9486
9600
  ] }),
9487
- hasValue && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
9601
+ hasValue && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
9488
9602
  "button",
9489
9603
  {
9490
9604
  type: "button",
@@ -9955,7 +10069,7 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
9955
10069
  // src/ui/components/ui/Tour.tsx
9956
10070
  var import_react65 = require("react");
9957
10071
  var import_driver = require("driver.js");
9958
- var import_jsx_runtime113 = require("react/jsx-runtime");
10072
+ var import_jsx_runtime116 = require("react/jsx-runtime");
9959
10073
  var TOUR_TARGET_ATTRIBUTE = "data-tour-target";
9960
10074
  var DEFAULT_LABELS = {
9961
10075
  previous: "Pr\xE9c\xE9dent",
@@ -9967,7 +10081,7 @@ var DEFAULT_LABELS = {
9967
10081
  var STAGE_PADDING = 6;
9968
10082
  var GHOST_TRANSITION_MS = 200;
9969
10083
  var HIGHLIGHT_DURATION_MS = 400;
9970
- var TourTarget = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime113.jsx)("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
10084
+ var TourTarget = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
9971
10085
  var isContents = (element) => getComputedStyle(element).display === "contents";
9972
10086
  var measure = (element) => {
9973
10087
  if (!isContents(element)) {