design-zystem 1.0.428 → 1.0.430

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.mjs CHANGED
@@ -1697,19 +1697,19 @@ var checkboxVariants = cva9(
1697
1697
  {
1698
1698
  variants: {
1699
1699
  color: {
1700
- "blue-700": "data-[state=checked]:border-blue-700 data-[state=checked]:bg-blue-700",
1701
- "blue-900": "data-[state=checked]:border-blue-900 data-[state=checked]:bg-blue-900",
1702
- "blue-950": "data-[state=checked]:border-blue-950 data-[state=checked]:bg-blue-950",
1703
- "red-900": "data-[state=checked]:border-red-900 data-[state=checked]:bg-red-900",
1704
- "red-500": "data-[state=checked]:border-red-500 data-[state=checked]:bg-red-500",
1705
- "green-700": "data-[state=checked]:border-green-700 data-[state=checked]:bg-green-700",
1706
- "green-100": "data-[state=checked]:border-green-100 data-[state=checked]:bg-green-100",
1707
- "grey-600": "data-[state=checked]:border-grey-600 data-[state=checked]:bg-grey-600",
1708
- "yellow-500": "data-[state=checked]:border-yellow-500 data-[state=checked]:bg-yellow-500",
1709
- "yellow-300": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-300",
1710
- "yellow-200": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-200",
1711
- "orange-600": "data-[state=checked]:border-orange-600 data-[state=checked]:bg-orange-600",
1712
- "purple-700": "data-[state=checked]:border-purple-700 data-[state=checked]:bg-purple-700"
1700
+ "blue-700": "data-[state=checked]:border-blue-700 data-[state=checked]:bg-blue-700 data-[state=indeterminate]:border-blue-700 data-[state=indeterminate]:bg-blue-700",
1701
+ "blue-900": "data-[state=checked]:border-blue-900 data-[state=checked]:bg-blue-900 data-[state=indeterminate]:border-blue-900 data-[state=indeterminate]:bg-blue-900",
1702
+ "blue-950": "data-[state=checked]:border-blue-950 data-[state=checked]:bg-blue-950 data-[state=indeterminate]:border-blue-950 data-[state=indeterminate]:bg-blue-950",
1703
+ "red-900": "data-[state=checked]:border-red-900 data-[state=checked]:bg-red-900 data-[state=indeterminate]:border-red-900 data-[state=indeterminate]:bg-red-900",
1704
+ "red-500": "data-[state=checked]:border-red-500 data-[state=checked]:bg-red-500 data-[state=indeterminate]:border-red-500 data-[state=indeterminate]:bg-red-500",
1705
+ "green-700": "data-[state=checked]:border-green-700 data-[state=checked]:bg-green-700 data-[state=indeterminate]:border-green-700 data-[state=indeterminate]:bg-green-700",
1706
+ "green-100": "data-[state=checked]:border-green-100 data-[state=checked]:bg-green-100 data-[state=indeterminate]:border-green-100 data-[state=indeterminate]:bg-green-100",
1707
+ "grey-600": "data-[state=checked]:border-grey-600 data-[state=checked]:bg-grey-600 data-[state=indeterminate]:border-grey-600 data-[state=indeterminate]:bg-grey-600",
1708
+ "yellow-500": "data-[state=checked]:border-yellow-500 data-[state=checked]:bg-yellow-500 data-[state=indeterminate]:border-yellow-500 data-[state=indeterminate]:bg-yellow-500",
1709
+ "yellow-300": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-300 data-[state=indeterminate]:border-yellow-200 data-[state=indeterminate]:bg-yellow-300",
1710
+ "yellow-200": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-200 data-[state=indeterminate]:border-yellow-200 data-[state=indeterminate]:bg-yellow-200",
1711
+ "orange-600": "data-[state=checked]:border-orange-600 data-[state=checked]:bg-orange-600 data-[state=indeterminate]:border-orange-600 data-[state=indeterminate]:bg-orange-600",
1712
+ "purple-700": "data-[state=checked]:border-purple-700 data-[state=checked]:bg-purple-700 data-[state=indeterminate]:border-purple-700 data-[state=indeterminate]:bg-purple-700"
1713
1713
  },
1714
1714
  size: {
1715
1715
  s: "h-3.5 w-3.5",
@@ -1749,7 +1749,7 @@ var Checkbox = (_a) => {
1749
1749
  children: /* @__PURE__ */ jsx24(RadixCheckbox.Indicator, { children: /* @__PURE__ */ jsx24(
1750
1750
  FaIcon,
1751
1751
  {
1752
- name: "check",
1752
+ name: props.checked === "indeterminate" ? "minus" : "check",
1753
1753
  family: "solid",
1754
1754
  size: CHECK_ICON_SIZE[size != null ? size : "m"]
1755
1755
  }
@@ -3279,13 +3279,113 @@ var EmptyState = ({
3279
3279
  }
3280
3280
  );
3281
3281
 
3282
+ // src/ui/components/ui/Bulk.tsx
3283
+ import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
3284
+ var BG_CLASS = {
3285
+ "blue-700": "bg-blue-700",
3286
+ "blue-900": "bg-blue-900",
3287
+ "blue-950": "bg-blue-950",
3288
+ "red-900": "bg-red-900",
3289
+ "red-500": "bg-red-500",
3290
+ "green-700": "bg-green-700",
3291
+ "green-100": "bg-green-100",
3292
+ "grey-600": "bg-grey-600",
3293
+ "yellow-500": "bg-yellow-500",
3294
+ "yellow-300": "bg-yellow-300",
3295
+ "yellow-200": "bg-yellow-200",
3296
+ "orange-600": "bg-orange-600",
3297
+ "purple-700": "bg-purple-700"
3298
+ };
3299
+ var BulkActionSections = ({ sections }) => /* @__PURE__ */ jsx35(
3300
+ Layout,
3301
+ {
3302
+ role: "group",
3303
+ fullHeight: true,
3304
+ align: "stretch",
3305
+ className: "[&>button:not(:last-child)]:rounded-r-none",
3306
+ children: sections.map((section, index) => /* @__PURE__ */ jsxs19(
3307
+ "button",
3308
+ {
3309
+ type: "button",
3310
+ disabled: section.disabled,
3311
+ onClick: section.disabled ? void 0 : section.action,
3312
+ className: cn(
3313
+ "flex h-full items-center justify-center gap-1.5 whitespace-nowrap rounded-r-xl px-4 text-sm font-bold text-white transition-[filter]",
3314
+ section.disabled ? "cursor-not-allowed bg-grey-500" : "hover:brightness-90"
3315
+ ),
3316
+ children: [
3317
+ section.icon,
3318
+ section.title
3319
+ ]
3320
+ },
3321
+ index
3322
+ ))
3323
+ }
3324
+ );
3325
+ var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ jsx35(Layout, { align: "center", gap: 3, className: "px-4", children: sections.map((section, index) => /* @__PURE__ */ jsxs19(Layout, { align: "center", gap: 3, children: [
3326
+ index > 0 && (section.divider ? /* @__PURE__ */ jsx35("span", { className: "h-11 w-px shrink-0 bg-white/40" }) : /* @__PURE__ */ jsx35("span", { className: "h-0.5 w-4 shrink-0 rounded-full bg-white/50" })),
3327
+ section.action ? /* @__PURE__ */ jsxs19(
3328
+ "button",
3329
+ {
3330
+ type: "button",
3331
+ disabled: section.disabled,
3332
+ onClick: section.disabled ? void 0 : section.action,
3333
+ className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white hover:opacity-80",
3334
+ children: [
3335
+ section.icon,
3336
+ section.title
3337
+ ]
3338
+ }
3339
+ ) : section.caption ? /* @__PURE__ */ jsxs19(Layout, { column: true, fullWidth: false, className: "leading-tight text-white", children: [
3340
+ /* @__PURE__ */ jsx35("span", { className: "whitespace-nowrap text-[10px] font-bold uppercase tracking-wide opacity-70", children: section.caption }),
3341
+ /* @__PURE__ */ jsx35("span", { className: "whitespace-nowrap text-sm font-bold", children: section.title })
3342
+ ] }) : section.badge ? /* @__PURE__ */ jsx35("span", { className: "whitespace-nowrap rounded-full bg-white/15 px-2.5 py-1 text-xs font-bold text-white", children: section.title }) : /* @__PURE__ */ jsxs19("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white", children: [
3343
+ section.icon,
3344
+ section.title
3345
+ ] })
3346
+ ] }, index)) });
3347
+ var Bulk = ({
3348
+ onClose,
3349
+ leftTitle,
3350
+ sections,
3351
+ color = "blue-700",
3352
+ className,
3353
+ variant = "actions"
3354
+ }) => /* @__PURE__ */ jsxs19(
3355
+ "div",
3356
+ {
3357
+ className: cn(
3358
+ "fixed bottom-[50px] left-1/2 z-[500] inline-flex h-[52px] -translate-x-1/2 items-center rounded-xl pl-4 text-white",
3359
+ BG_CLASS[color],
3360
+ className
3361
+ ),
3362
+ children: [
3363
+ leftTitle && /* @__PURE__ */ jsxs19(Layout, { align: "center", gap: 6, className: "pr-6", children: [
3364
+ /* @__PURE__ */ jsx35(
3365
+ "button",
3366
+ {
3367
+ type: "button",
3368
+ "aria-label": "Fermer",
3369
+ onClick: onClose,
3370
+ className: "text-white hover:opacity-80",
3371
+ children: /* @__PURE__ */ jsx35(FaIcon, { name: "xmark", size: 20 })
3372
+ }
3373
+ ),
3374
+ /* @__PURE__ */ jsx35("span", { className: "whitespace-nowrap text-sm font-bold", children: leftTitle }),
3375
+ /* @__PURE__ */ jsx35("span", { className: "h-11 w-px bg-white/40" })
3376
+ ] }),
3377
+ variant === "display" ? /* @__PURE__ */ jsx35(BulkDisplaySections, { sections }) : /* @__PURE__ */ jsx35(BulkActionSections, { sections })
3378
+ ]
3379
+ }
3380
+ );
3381
+
3282
3382
  // src/ui/components/ui/table/TableBody.tsx
3283
- import { jsx as jsx35 } from "react/jsx-runtime";
3383
+ import { jsx as jsx36 } from "react/jsx-runtime";
3284
3384
  var TableBody = ({
3285
3385
  children,
3286
3386
  useEvenBackground,
3287
3387
  className
3288
- }) => /* @__PURE__ */ jsx35(
3388
+ }) => /* @__PURE__ */ jsx36(
3289
3389
  "tbody",
3290
3390
  {
3291
3391
  className: cn(
@@ -3297,98 +3397,410 @@ var TableBody = ({
3297
3397
  }
3298
3398
  );
3299
3399
 
3300
- // src/ui/components/ui/table/Table.tsx
3301
- import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
3302
- var Table = ({
3303
- width,
3304
- header,
3305
- rows,
3306
- footer,
3307
- loading = false,
3308
- emptyState,
3309
- maxHeight,
3310
- minHeight,
3311
- minWidth,
3312
- className,
3313
- pagination,
3314
- zebra = false,
3315
- borderLeft = false
3316
- }) => {
3317
- const isEmpty = !loading && rows.length === 0;
3318
- return /* @__PURE__ */ jsxs19(
3400
+ // src/ui/components/ui/Skeleton.tsx
3401
+ import { jsx as jsx37 } from "react/jsx-runtime";
3402
+ var toCss = (value) => typeof value === "number" ? `${value}px` : value;
3403
+ var Skeleton = (_a) => {
3404
+ var _b = _a, {
3405
+ width,
3406
+ height,
3407
+ isRound = false,
3408
+ className,
3409
+ style
3410
+ } = _b, props = __objRest(_b, [
3411
+ "width",
3412
+ "height",
3413
+ "isRound",
3414
+ "className",
3415
+ "style"
3416
+ ]);
3417
+ return /* @__PURE__ */ jsx37(
3319
3418
  "div",
3320
- {
3419
+ __spreadValues({
3321
3420
  className: cn(
3322
- "flex flex-col overflow-auto rounded-lg border border-grey-300",
3421
+ "animate-pulse bg-grey-200",
3422
+ isRound ? "rounded-full" : "rounded-md",
3423
+ className
3424
+ ),
3425
+ style: __spreadValues({ width: toCss(width), height: toCss(height) }, style)
3426
+ }, props)
3427
+ );
3428
+ };
3429
+
3430
+ // src/ui/components/ui/table/TableLoadingRows.tsx
3431
+ import { jsx as jsx38 } from "react/jsx-runtime";
3432
+ var TableLoadingRows = ({ count }) => /* @__PURE__ */ jsx38("div", { className: "flex flex-col", children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx38(
3433
+ "div",
3434
+ {
3435
+ className: "flex h-10 items-center border-t border-grey-200 px-2",
3436
+ children: /* @__PURE__ */ jsx38(Skeleton, { height: 14, "data-testid": "table-skeleton" })
3437
+ },
3438
+ index
3439
+ )) });
3440
+
3441
+ // src/ui/components/ui/TagBubble.tsx
3442
+ import * as RadixToggle from "@radix-ui/react-toggle";
3443
+ import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
3444
+ var DOT_CLASS = {
3445
+ "blue-700": "bg-blue-700",
3446
+ "blue-900": "bg-blue-900",
3447
+ "blue-950": "bg-blue-950",
3448
+ "red-900": "bg-red-900",
3449
+ "red-500": "bg-red-500",
3450
+ "green-700": "bg-green-700",
3451
+ "green-100": "bg-green-100",
3452
+ "grey-600": "bg-grey-400",
3453
+ "yellow-500": "bg-yellow-500",
3454
+ "yellow-300": "bg-yellow-300",
3455
+ "yellow-200": "bg-yellow-200",
3456
+ "orange-600": "bg-orange-600",
3457
+ "purple-700": "bg-purple-700"
3458
+ };
3459
+ var LIGHT_BG_CLASS = {
3460
+ "blue-700": "bg-blue-50",
3461
+ "blue-900": "bg-blue-50",
3462
+ "blue-950": "bg-blue-50",
3463
+ "red-900": "bg-red-50",
3464
+ "red-500": "bg-red-50",
3465
+ "green-700": "bg-green-50",
3466
+ "green-100": "bg-green-50",
3467
+ "grey-600": "bg-grey-100",
3468
+ "yellow-500": "bg-yellow-50",
3469
+ "yellow-300": "bg-yellow-50",
3470
+ "yellow-200": "bg-yellow-50",
3471
+ "orange-600": "bg-orange-50",
3472
+ "purple-700": "bg-purple-50"
3473
+ };
3474
+ var TEXT_CLASS = {
3475
+ "blue-700": "text-blue-700",
3476
+ "blue-900": "text-blue-900",
3477
+ "blue-950": "text-blue-950",
3478
+ "red-900": "text-red-900",
3479
+ "red-500": "text-red-500",
3480
+ "green-700": "text-green-700",
3481
+ "green-100": "text-green-100",
3482
+ "grey-600": "text-grey-600",
3483
+ "yellow-500": "text-yellow-500",
3484
+ "yellow-300": "text-yellow-300",
3485
+ "yellow-200": "text-yellow-200",
3486
+ "orange-600": "text-orange-600",
3487
+ "purple-700": "text-purple-700"
3488
+ };
3489
+ var BORDER_CLASS = {
3490
+ "blue-700": "border-blue-700",
3491
+ "blue-900": "border-blue-900",
3492
+ "blue-950": "border-blue-950",
3493
+ "red-900": "border-red-900",
3494
+ "red-500": "border-red-500",
3495
+ "green-700": "border-green-700",
3496
+ "green-100": "border-green-100",
3497
+ "grey-600": "border-grey-600",
3498
+ "yellow-500": "border-yellow-500",
3499
+ "yellow-300": "border-yellow-300",
3500
+ "yellow-200": "border-yellow-200",
3501
+ "orange-600": "border-orange-600",
3502
+ "purple-700": "border-purple-700"
3503
+ };
3504
+ var isHexColor = (color) => color.startsWith("#");
3505
+ var TagBubble = (_a) => {
3506
+ var _b = _a, {
3507
+ label,
3508
+ hideDot = false,
3509
+ active = false,
3510
+ activeColor = "blue-700",
3511
+ inactiveColor = "grey-600",
3512
+ activeFill = false,
3513
+ pill = false,
3514
+ size = "s",
3515
+ count,
3516
+ countColor = "green-700",
3517
+ onClick,
3518
+ className
3519
+ } = _b, rest = __objRest(_b, [
3520
+ "label",
3521
+ "hideDot",
3522
+ "active",
3523
+ "activeColor",
3524
+ "inactiveColor",
3525
+ "activeFill",
3526
+ "pill",
3527
+ "size",
3528
+ "count",
3529
+ "countColor",
3530
+ "onClick",
3531
+ "className"
3532
+ ]);
3533
+ const showCount = count !== void 0 && count !== null;
3534
+ const filled = activeFill && active;
3535
+ const dotColor = active ? activeColor : inactiveColor;
3536
+ const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
3537
+ return /* @__PURE__ */ jsxs20(
3538
+ RadixToggle.Root,
3539
+ __spreadProps(__spreadValues({}, rest), {
3540
+ type: "button",
3541
+ pressed: active,
3542
+ onClick,
3543
+ style: __spreadValues({ borderColor: filledHexColor }, rest.style),
3544
+ className: cn(
3545
+ "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
3546
+ pill ? "rounded-full" : "rounded-[6px]",
3547
+ size === "m" && "h-9",
3548
+ filled ? cn(
3549
+ isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
3550
+ "border-2"
3551
+ ) : "border-grey-200 bg-white",
3552
+ "focus-visible:ring-2 focus-visible:ring-blue-200",
3323
3553
  className
3324
3554
  ),
3325
- style: {
3326
- maxHeight: maxHeight || "none",
3327
- minHeight: minHeight || void 0,
3328
- width: width || "100%"
3329
- },
3330
3555
  children: [
3331
- /* @__PURE__ */ jsxs19(
3332
- "table",
3556
+ !hideDot && /* @__PURE__ */ jsx39(
3557
+ "span",
3333
3558
  {
3334
3559
  className: cn(
3335
- // `border-separate` : les bordures posées sur une cellule (ex. un
3336
- // liseré de statut sur une colonne sticky) sont peintes avec la
3337
- // boîte de la cellule et suivent son repositionnement sticky. Avec
3338
- // le `border-collapse` par défaut du preflight Tailwind, ces
3339
- // bordures sont peintes par le modèle de fusion du tableau et
3340
- // restent à la position d'origine dans la grille au scroll.
3341
- "w-full table-fixed border-separate border-spacing-0 caption-bottom text-[13px]",
3342
- borderLeft && "[&_th:not(:first-child)]:border-l [&_td:not(:first-child)]:border-l [&_th:not(:first-child)]:border-grey-200 [&_td:not(:first-child)]:border-grey-200"
3560
+ "h-2 w-2 shrink-0 rounded-full",
3561
+ !isHexColor(dotColor) && DOT_CLASS[dotColor]
3343
3562
  ),
3344
- style: { minWidth: minWidth || void 0 },
3345
- children: [
3346
- header,
3347
- /* @__PURE__ */ jsx36(TableBody, { useEvenBackground: zebra, children: rows }),
3348
- footer
3349
- ]
3563
+ style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
3350
3564
  }
3351
3565
  ),
3352
- emptyState && isEmpty && /* @__PURE__ */ jsx36(
3353
- EmptyState,
3566
+ /* @__PURE__ */ jsx39(
3567
+ "span",
3354
3568
  {
3355
- icon: emptyState.icon,
3356
- title: emptyState.label,
3357
- description: emptyState.description,
3358
- actionLabel: emptyState.buttonLabel,
3359
- onAction: emptyState.action
3569
+ className: cn(
3570
+ "whitespace-nowrap text-xs font-semibold",
3571
+ filled ? !isHexColor(activeColor) && TEXT_CLASS[activeColor] : "text-neutral-800"
3572
+ ),
3573
+ style: { color: filledHexColor },
3574
+ children: label
3360
3575
  }
3361
3576
  ),
3362
- pagination && !loading && pagination.totalItems > 0 && /* @__PURE__ */ jsx36("div", { className: "border-t border-grey-300 p-3", children: /* @__PURE__ */ jsx36(
3363
- Pagination,
3364
- {
3365
- currentPage: pagination.currentPage,
3366
- totalItems: pagination.totalItems,
3367
- itemsPerPage: pagination.itemsPerPage,
3368
- onPageChange: pagination.onPageChange
3369
- }
3370
- ) })
3577
+ showCount && /* @__PURE__ */ jsx39(Badge, { theme: countColor, size: "s", children: count })
3578
+ ]
3579
+ })
3580
+ );
3581
+ };
3582
+
3583
+ // src/ui/components/ui/table/TableToolbar.tsx
3584
+ import { jsx as jsx40, jsxs as jsxs21 } from "react/jsx-runtime";
3585
+ var TableToolbar = ({
3586
+ search,
3587
+ statusFilters,
3588
+ onStatusFilterToggle,
3589
+ onFiltersClick,
3590
+ onExport
3591
+ }) => {
3592
+ var _a;
3593
+ return /* @__PURE__ */ jsxs21(
3594
+ Layout,
3595
+ {
3596
+ row: true,
3597
+ gap: 3,
3598
+ align: "center",
3599
+ justify: "between",
3600
+ className: "border-b border-grey-200 bg-white p-3",
3601
+ children: [
3602
+ /* @__PURE__ */ jsxs21(Layout, { row: true, gap: 3, align: "center", className: "min-w-0", children: [
3603
+ search && /* @__PURE__ */ jsx40("div", { className: "w-64 shrink-0", children: /* @__PURE__ */ jsx40(
3604
+ SearchInput,
3605
+ {
3606
+ "aria-label": "Rechercher",
3607
+ value: search.value,
3608
+ placeholder: (_a = search.placeholder) != null ? _a : "Rechercher",
3609
+ onChange: (event) => search.onChange(event.target.value),
3610
+ onClear: () => search.onChange("")
3611
+ }
3612
+ ) }),
3613
+ statusFilters == null ? void 0 : statusFilters.map((filter) => /* @__PURE__ */ jsx40(
3614
+ TagBubble,
3615
+ {
3616
+ size: "m",
3617
+ pill: true,
3618
+ label: filter.label,
3619
+ count: filter.count,
3620
+ active: filter.isActive,
3621
+ activeColor: filter.color,
3622
+ activeFill: true,
3623
+ onClick: () => onStatusFilterToggle == null ? void 0 : onStatusFilterToggle(filter.id)
3624
+ },
3625
+ filter.id
3626
+ ))
3627
+ ] }),
3628
+ /* @__PURE__ */ jsxs21(Layout, { row: true, gap: 2, align: "center", fullWidth: false, children: [
3629
+ onFiltersClick && /* @__PURE__ */ jsx40(
3630
+ Button,
3631
+ {
3632
+ variant: "outline",
3633
+ label: "Filtres",
3634
+ iconLeft: /* @__PURE__ */ jsx40(FaIcon, { name: "filter", size: 14 }),
3635
+ onClick: onFiltersClick
3636
+ }
3637
+ ),
3638
+ onExport && /* @__PURE__ */ jsx40(
3639
+ Button,
3640
+ {
3641
+ variant: "outline",
3642
+ label: "Exporter",
3643
+ iconLeft: /* @__PURE__ */ jsx40(FaIcon, { name: "download", size: 14 }),
3644
+ onClick: onExport
3645
+ }
3646
+ )
3647
+ ] })
3371
3648
  ]
3372
3649
  }
3373
3650
  );
3374
3651
  };
3375
3652
 
3653
+ // src/ui/components/ui/table/TableSelectAllResultsBar.tsx
3654
+ import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
3655
+ var TableSelectAllResultsBar = ({
3656
+ selection
3657
+ }) => {
3658
+ if (selection.isAllResultsSelected)
3659
+ return /* @__PURE__ */ jsxs22("div", { className: "border-b border-grey-200 bg-blue-50 px-3 py-2 text-center text-xs font-semibold text-blue-900", children: [
3660
+ `Les ${selection.totalCount} r\xE9sultats sont s\xE9lectionn\xE9s.`,
3661
+ " ",
3662
+ /* @__PURE__ */ jsx41(
3663
+ "button",
3664
+ {
3665
+ type: "button",
3666
+ onClick: selection.clear,
3667
+ className: "font-bold underline",
3668
+ children: "Annuler la s\xE9lection"
3669
+ }
3670
+ )
3671
+ ] });
3672
+ if (selection.canSelectAllResults)
3673
+ return /* @__PURE__ */ jsxs22("div", { className: "border-b border-grey-200 bg-blue-50 px-3 py-2 text-center text-xs font-semibold text-blue-900", children: [
3674
+ "Toutes les lignes de la page sont s\xE9lectionn\xE9es. ",
3675
+ /* @__PURE__ */ jsx41(
3676
+ "button",
3677
+ {
3678
+ type: "button",
3679
+ onClick: selection.selectAllResults,
3680
+ className: "font-bold underline",
3681
+ children: `S\xE9lectionner les ${selection.totalCount} r\xE9sultats`
3682
+ }
3683
+ )
3684
+ ] });
3685
+ return null;
3686
+ };
3687
+
3688
+ // src/ui/components/ui/table/Table.tsx
3689
+ import { Fragment as Fragment3, jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
3690
+ var DEFAULT_LOADING_ROW_COUNT = 5;
3691
+ var formatSelectedCount = (count) => `${count} s\xE9lectionn\xE9${count > 1 ? "s" : ""}`;
3692
+ var Table = ({
3693
+ width,
3694
+ header,
3695
+ rows,
3696
+ footer,
3697
+ loading = false,
3698
+ emptyState,
3699
+ maxHeight,
3700
+ minHeight,
3701
+ minWidth,
3702
+ className,
3703
+ pagination,
3704
+ variant,
3705
+ toolbar,
3706
+ selection,
3707
+ zebra,
3708
+ borderLeft = false
3709
+ }) => {
3710
+ var _a;
3711
+ const isZebra = (variant != null ? variant : zebra === false ? "lined" : "zebra") === "zebra";
3712
+ const loadingRowCount = (_a = pagination == null ? void 0 : pagination.itemsPerPage) != null ? _a : DEFAULT_LOADING_ROW_COUNT;
3713
+ const hasRows = rows.length > 0;
3714
+ const isEmpty = !loading && !hasRows;
3715
+ return /* @__PURE__ */ jsxs23(Fragment3, { children: [
3716
+ /* @__PURE__ */ jsxs23(
3717
+ "div",
3718
+ {
3719
+ className: cn(
3720
+ "flex flex-col overflow-auto rounded-lg border border-grey-300",
3721
+ className
3722
+ ),
3723
+ style: {
3724
+ maxHeight: maxHeight || "none",
3725
+ minHeight: minHeight || void 0,
3726
+ width: width || "100%"
3727
+ },
3728
+ children: [
3729
+ toolbar && /* @__PURE__ */ jsx42(TableToolbar, __spreadValues({}, toolbar)),
3730
+ selection && /* @__PURE__ */ jsx42(TableSelectAllResultsBar, { selection: selection.state }),
3731
+ /* @__PURE__ */ jsxs23(
3732
+ "table",
3733
+ {
3734
+ "aria-busy": loading || void 0,
3735
+ className: cn(
3736
+ // `border-separate` : les bordures posées sur une cellule (ex. un
3737
+ // liseré de statut sur une colonne sticky) sont peintes avec la
3738
+ // boîte de la cellule et suivent son repositionnement sticky. Avec
3739
+ // le `border-collapse` par défaut du preflight Tailwind, ces
3740
+ // bordures sont peintes par le modèle de fusion du tableau et
3741
+ // restent à la position d'origine dans la grille au scroll.
3742
+ "w-full table-fixed border-separate border-spacing-0 caption-bottom text-xs",
3743
+ "[&_tr>*:first-child:not(.table-select-cell)]:text-left [&_tr>.table-select-cell:first-child+*]:text-left [&_tr>*:not(:first-child)]:text-center",
3744
+ borderLeft && "[&_th:not(:first-child)]:border-l [&_td:not(:first-child)]:border-l [&_th:not(:first-child)]:border-grey-200 [&_td:not(:first-child)]:border-grey-200"
3745
+ ),
3746
+ style: { minWidth: minWidth || void 0 },
3747
+ children: [
3748
+ header,
3749
+ /* @__PURE__ */ jsx42(TableBody, { useEvenBackground: isZebra, children: rows }),
3750
+ footer
3751
+ ]
3752
+ }
3753
+ ),
3754
+ loading && !hasRows && /* @__PURE__ */ jsx42(TableLoadingRows, { count: loadingRowCount }),
3755
+ emptyState && isEmpty && /* @__PURE__ */ jsx42(
3756
+ EmptyState,
3757
+ {
3758
+ icon: emptyState.icon,
3759
+ title: emptyState.label,
3760
+ description: emptyState.description,
3761
+ actionLabel: emptyState.buttonLabel,
3762
+ onAction: emptyState.action
3763
+ }
3764
+ ),
3765
+ pagination && !loading && pagination.totalItems > 0 && /* @__PURE__ */ jsx42("div", { className: "border-t border-grey-300 p-3", children: /* @__PURE__ */ jsx42(
3766
+ Pagination,
3767
+ {
3768
+ currentPage: pagination.currentPage,
3769
+ totalItems: pagination.totalItems,
3770
+ itemsPerPage: pagination.itemsPerPage,
3771
+ onPageChange: pagination.onPageChange
3772
+ }
3773
+ ) })
3774
+ ]
3775
+ }
3776
+ ),
3777
+ selection && selection.state.selectedCount > 0 && /* @__PURE__ */ jsx42(
3778
+ Bulk,
3779
+ {
3780
+ leftTitle: formatSelectedCount(selection.state.selectedCount),
3781
+ onClose: selection.state.clear,
3782
+ sections: selection.bulkSections
3783
+ }
3784
+ )
3785
+ ] });
3786
+ };
3787
+
3376
3788
  // src/ui/components/ui/table/TableHeader.tsx
3377
- import { jsx as jsx37 } from "react/jsx-runtime";
3789
+ import { jsx as jsx43 } from "react/jsx-runtime";
3378
3790
  var TableHeader = ({ children }) => (
3379
3791
  // z-[3] : au-dessus des cellules figées (`sticky left/right`, z-[2]) d'un
3380
3792
  // corps de tableau, sinon leur contenu défile visuellement par-dessus
3381
3793
  // l'en-tête au lieu de passer dessous.
3382
- /* @__PURE__ */ jsx37("thead", { className: "sticky top-0 z-[3] bg-grey-100 text-neutral-800", children })
3794
+ /* @__PURE__ */ jsx43("thead", { className: "sticky top-0 z-[3] bg-grey-100 text-neutral-800", children })
3383
3795
  );
3384
3796
 
3385
3797
  // src/ui/components/ui/table/TableHeaderRow.tsx
3386
- import { jsx as jsx38 } from "react/jsx-runtime";
3387
- var TableHeaderRow = ({ children }) => /* @__PURE__ */ jsx38("tr", { children });
3798
+ import { jsx as jsx44 } from "react/jsx-runtime";
3799
+ var TableHeaderRow = ({ children }) => /* @__PURE__ */ jsx44("tr", { children });
3388
3800
 
3389
3801
  // src/ui/components/ui/table/TableHeaderCell.tsx
3390
3802
  import { useState as useState7 } from "react";
3391
- import { jsx as jsx39, jsxs as jsxs20 } from "react/jsx-runtime";
3803
+ import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
3392
3804
  var SURFACE_CLASS = {
3393
3805
  white: "bg-white",
3394
3806
  "grey-100": "bg-grey-100"
@@ -3410,14 +3822,14 @@ var TableHeaderCell = ({
3410
3822
  const [hovered, setHovered] = useState7(false);
3411
3823
  const showArrow = useSort && (isSort || hovered);
3412
3824
  const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
3413
- return /* @__PURE__ */ jsx39(
3825
+ return /* @__PURE__ */ jsx45(
3414
3826
  "th",
3415
3827
  {
3416
3828
  scope: "col",
3417
3829
  onMouseEnter: () => useSort && setHovered(true),
3418
3830
  onMouseLeave: () => useSort && setHovered(false),
3419
3831
  className: cn(
3420
- "overflow-hidden px-2 py-2 text-center text-[13px] font-bold",
3832
+ "h-10 overflow-hidden px-2 py-2 text-center text-xs font-bold",
3421
3833
  wrap ? "whitespace-normal break-words" : "text-ellipsis whitespace-nowrap",
3422
3834
  borderLeft && "border-l border-grey-200",
3423
3835
  sticky && cn("z-[2]", SURFACE_CLASS[surface]),
@@ -3436,7 +3848,7 @@ var TableHeaderCell = ({
3436
3848
  left: sticky === "left" ? stickyOffset : void 0,
3437
3849
  right: sticky === "right" ? stickyOffset : void 0
3438
3850
  },
3439
- children: useSort ? /* @__PURE__ */ jsxs20(
3851
+ children: useSort ? /* @__PURE__ */ jsxs24(
3440
3852
  "button",
3441
3853
  {
3442
3854
  type: "button",
@@ -3444,7 +3856,7 @@ var TableHeaderCell = ({
3444
3856
  className: "inline-flex items-center gap-1",
3445
3857
  children: [
3446
3858
  children,
3447
- showArrow && /* @__PURE__ */ jsx39(
3859
+ showArrow && /* @__PURE__ */ jsx45(
3448
3860
  "span",
3449
3861
  {
3450
3862
  "aria-hidden": "true",
@@ -3464,7 +3876,7 @@ var TableHeaderCell = ({
3464
3876
 
3465
3877
  // src/ui/components/ui/table/TableRow.tsx
3466
3878
  import { forwardRef as forwardRef18 } from "react";
3467
- import { jsx as jsx40 } from "react/jsx-runtime";
3879
+ import { jsx as jsx46 } from "react/jsx-runtime";
3468
3880
  var TableRow = forwardRef18(
3469
3881
  ({
3470
3882
  children,
@@ -3474,7 +3886,7 @@ var TableRow = forwardRef18(
3474
3886
  backgroundColor,
3475
3887
  accentColor,
3476
3888
  "data-index": dataIndex
3477
- }, ref) => /* @__PURE__ */ jsx40(
3889
+ }, ref) => /* @__PURE__ */ jsx46(
3478
3890
  "tr",
3479
3891
  {
3480
3892
  ref,
@@ -3482,7 +3894,7 @@ var TableRow = forwardRef18(
3482
3894
  onClick,
3483
3895
  onDoubleClick,
3484
3896
  className: cn(
3485
- "border-t border-grey-200 transition-colors hover:bg-black/[0.025]",
3897
+ "[&>td]:border-t [&>td]:border-grey-200 [&>th]:border-t [&>th]:border-grey-200 transition-colors hover:bg-black/[0.025]",
3486
3898
  (onClick || onDoubleClick) && "cursor-pointer",
3487
3899
  accentColor && "border-l-4",
3488
3900
  className
@@ -3498,7 +3910,7 @@ var TableRow = forwardRef18(
3498
3910
  TableRow.displayName = "TableRow";
3499
3911
 
3500
3912
  // src/ui/components/ui/table/TableCell.tsx
3501
- import { jsx as jsx41 } from "react/jsx-runtime";
3913
+ import { jsx as jsx47 } from "react/jsx-runtime";
3502
3914
  var SURFACE_CLASS2 = {
3503
3915
  white: "bg-white",
3504
3916
  "grey-100": "bg-grey-100"
@@ -3519,12 +3931,12 @@ var TableCell = ({
3519
3931
  colSpan,
3520
3932
  cursor,
3521
3933
  className
3522
- }) => /* @__PURE__ */ jsx41(
3934
+ }) => /* @__PURE__ */ jsx47(
3523
3935
  "td",
3524
3936
  {
3525
3937
  colSpan,
3526
3938
  className: cn(
3527
- "text-ellipsis whitespace-nowrap px-2 py-2 text-center text-[13px]",
3939
+ "text-ellipsis whitespace-nowrap h-10 px-2 py-2 text-center text-xs font-semibold",
3528
3940
  // Une cellule fusionnée (section/groupe) ne tronque pas son contenu, et
3529
3941
  // ne doit pas clipper : elle porte souvent un enfant `sticky` (label de
3530
3942
  // groupe figé au scroll horizontal), qu'un ancêtre `overflow` cassé.
@@ -3546,13 +3958,13 @@ var TableCell = ({
3546
3958
  backgroundColor,
3547
3959
  borderLeftColor: accentColor
3548
3960
  },
3549
- children: centerContent ? /* @__PURE__ */ jsx41(Layout, { justify: "center", children }) : children
3961
+ children: centerContent ? /* @__PURE__ */ jsx47(Layout, { justify: "center", children }) : children
3550
3962
  }
3551
3963
  );
3552
3964
 
3553
3965
  // src/ui/components/ui/table/TableFooter.tsx
3554
- import { jsx as jsx42 } from "react/jsx-runtime";
3555
- var TableFooter = ({ children, className }) => /* @__PURE__ */ jsx42(
3966
+ import { jsx as jsx48 } from "react/jsx-runtime";
3967
+ var TableFooter = ({ children, className }) => /* @__PURE__ */ jsx48(
3556
3968
  "tfoot",
3557
3969
  {
3558
3970
  className: cn(
@@ -3564,21 +3976,21 @@ var TableFooter = ({ children, className }) => /* @__PURE__ */ jsx42(
3564
3976
  );
3565
3977
 
3566
3978
  // src/ui/components/ui/table/TableFooterRow.tsx
3567
- import { jsx as jsx43 } from "react/jsx-runtime";
3568
- var TableFooterRow = ({ children }) => /* @__PURE__ */ jsx43("tr", { className: "border-t border-grey-300", children });
3979
+ import { jsx as jsx49 } from "react/jsx-runtime";
3980
+ var TableFooterRow = ({ children }) => /* @__PURE__ */ jsx49("tr", { className: "[&>td]:border-t [&>td]:border-grey-300 [&>th]:border-t [&>th]:border-grey-300", children });
3569
3981
 
3570
3982
  // src/ui/components/ui/table/TableFooterCell.tsx
3571
- import { jsx as jsx44 } from "react/jsx-runtime";
3983
+ import { jsx as jsx50 } from "react/jsx-runtime";
3572
3984
  var TableFooterCell = ({
3573
3985
  children,
3574
3986
  width,
3575
3987
  borderLeft = false,
3576
3988
  className
3577
- }) => /* @__PURE__ */ jsx44(
3989
+ }) => /* @__PURE__ */ jsx50(
3578
3990
  "td",
3579
3991
  {
3580
3992
  className: cn(
3581
- "overflow-hidden text-ellipsis whitespace-nowrap px-2 py-2 text-center text-[13px] font-bold",
3993
+ "overflow-hidden text-ellipsis whitespace-nowrap h-10 px-2 py-2 text-center text-xs font-bold",
3582
3994
  borderLeft && "border-l border-grey-200",
3583
3995
  className
3584
3996
  ),
@@ -3587,16 +3999,56 @@ var TableFooterCell = ({
3587
3999
  }
3588
4000
  );
3589
4001
 
3590
- // src/ui/components/ui/Avatar.tsx
3591
- import {
3592
- createContext as createContext2,
3593
- useContext as useContext2,
3594
- forwardRef as forwardRef19,
3595
- Children,
3596
- cloneElement,
3597
- isValidElement
3598
- } from "react";
3599
- import * as RadixAvatar from "@radix-ui/react-avatar";
4002
+ // src/ui/components/ui/table/TableSectionRow.tsx
4003
+ import { jsx as jsx51 } from "react/jsx-runtime";
4004
+ var TableSectionRow = ({
4005
+ children,
4006
+ colSpan
4007
+ }) => /* @__PURE__ */ jsx51(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx51(
4008
+ "td",
4009
+ {
4010
+ colSpan,
4011
+ className: "h-10 bg-grey-200 px-2 text-left text-xs font-bold uppercase tracking-wide text-neutral-800",
4012
+ children
4013
+ }
4014
+ ) });
4015
+
4016
+ // src/ui/components/ui/table/TableSubgroupRow.tsx
4017
+ import { jsx as jsx52 } from "react/jsx-runtime";
4018
+ var TableSubgroupRow = ({
4019
+ children,
4020
+ colSpan
4021
+ }) => /* @__PURE__ */ jsx52(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx52(
4022
+ "td",
4023
+ {
4024
+ colSpan,
4025
+ className: "h-10 bg-grey-100 px-2 pl-6 text-left text-xs font-semibold text-neutral-800",
4026
+ children
4027
+ }
4028
+ ) });
4029
+
4030
+ // src/ui/components/ui/table/TableAlertRow.tsx
4031
+ import { jsx as jsx53 } from "react/jsx-runtime";
4032
+ var ALERT_THEME = "orange-600";
4033
+ var TableAlertRow = ({ children, colSpan }) => /* @__PURE__ */ jsx53(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx53(
4034
+ "td",
4035
+ {
4036
+ colSpan,
4037
+ role: "alert",
4038
+ className: cn(
4039
+ "h-10 px-2 text-left text-xs font-semibold",
4040
+ THEME_VARIANT_CLASSES.pale[ALERT_THEME]
4041
+ ),
4042
+ children
4043
+ }
4044
+ ) });
4045
+
4046
+ // src/ui/components/ui/table/TableExpandedRow.tsx
4047
+ import { jsx as jsx54 } from "react/jsx-runtime";
4048
+ var TableExpandedRow = ({
4049
+ children,
4050
+ colSpan
4051
+ }) => /* @__PURE__ */ jsx54(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ jsx54("td", { colSpan, className: "bg-white p-3 text-left text-xs", children }) });
3600
4052
 
3601
4053
  // src/utils/string/capitalizeFirstLetter.ts
3602
4054
  var capitalizeFirstLetter = (str) => {
@@ -3718,7 +4170,16 @@ var formatNameWithInitial = (firstname, lastname) => {
3718
4170
  };
3719
4171
 
3720
4172
  // src/ui/components/ui/Avatar.tsx
3721
- import { Fragment as Fragment3, jsx as jsx45, jsxs as jsxs21 } from "react/jsx-runtime";
4173
+ import {
4174
+ createContext as createContext2,
4175
+ useContext as useContext2,
4176
+ forwardRef as forwardRef19,
4177
+ Children,
4178
+ cloneElement,
4179
+ isValidElement
4180
+ } from "react";
4181
+ import * as RadixAvatar from "@radix-ui/react-avatar";
4182
+ import { Fragment as Fragment4, jsx as jsx55, jsxs as jsxs25 } from "react/jsx-runtime";
3722
4183
  var AvatarSizeContext = createContext2(40);
3723
4184
  var useAvatarSize = () => useContext2(AvatarSizeContext);
3724
4185
  var BADGE_BG_CLASS = {
@@ -3779,7 +4240,7 @@ var Avatar = forwardRef19(
3779
4240
  "children"
3780
4241
  ]);
3781
4242
  var _a2;
3782
- return /* @__PURE__ */ jsx45(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx45(
4243
+ return /* @__PURE__ */ jsx55(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx55(
3783
4244
  RadixAvatar.Root,
3784
4245
  __spreadProps(__spreadValues({
3785
4246
  ref,
@@ -3790,9 +4251,9 @@ var Avatar = forwardRef19(
3790
4251
  ),
3791
4252
  style: __spreadValues({ width: size, height: size, backgroundColor }, style)
3792
4253
  }, props), {
3793
- children: children != null ? children : /* @__PURE__ */ jsxs21(Fragment3, { children: [
3794
- src && /* @__PURE__ */ jsx45(AvatarImage, { src, alt: name }),
3795
- /* @__PURE__ */ jsx45(
4254
+ children: children != null ? children : /* @__PURE__ */ jsxs25(Fragment4, { children: [
4255
+ src && /* @__PURE__ */ jsx55(AvatarImage, { src, alt: name }),
4256
+ /* @__PURE__ */ jsx55(
3796
4257
  AvatarFallback,
3797
4258
  {
3798
4259
  color,
@@ -3801,7 +4262,7 @@ var Avatar = forwardRef19(
3801
4262
  children: getInitials({ name })
3802
4263
  }
3803
4264
  ),
3804
- badge && /* @__PURE__ */ jsx45(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ jsx45(
4265
+ badge && /* @__PURE__ */ jsx55(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ jsx55(
3805
4266
  FaIcon,
3806
4267
  {
3807
4268
  name: badge.icon,
@@ -3818,7 +4279,7 @@ var Avatar = forwardRef19(
3818
4279
  Avatar.displayName = "Avatar";
3819
4280
  var AvatarImage = forwardRef19((_a, ref) => {
3820
4281
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3821
- return /* @__PURE__ */ jsx45(
4282
+ return /* @__PURE__ */ jsx55(
3822
4283
  RadixAvatar.Image,
3823
4284
  __spreadValues({
3824
4285
  ref,
@@ -3858,7 +4319,7 @@ var AvatarFallback = forwardRef19(
3858
4319
  "style"
3859
4320
  ]);
3860
4321
  const size = useAvatarSize();
3861
- return /* @__PURE__ */ jsx45(
4322
+ return /* @__PURE__ */ jsx55(
3862
4323
  RadixAvatar.Fallback,
3863
4324
  __spreadValues({
3864
4325
  ref,
@@ -3882,7 +4343,7 @@ var AvatarBadge = forwardRef19(
3882
4343
  var _b = _a, { size, className, style } = _b, props = __objRest(_b, ["size", "className", "style"]);
3883
4344
  const avatarSize = useAvatarSize();
3884
4345
  const badgeSize = size != null ? size : Math.round(avatarSize * 0.35);
3885
- return /* @__PURE__ */ jsx45(
4346
+ return /* @__PURE__ */ jsx55(
3886
4347
  "div",
3887
4348
  __spreadValues({
3888
4349
  ref,
@@ -3913,7 +4374,7 @@ var AvatarGroup = (_a) => {
3913
4374
  );
3914
4375
  const visible = max ? items.slice(0, max) : items;
3915
4376
  const overflow = max ? items.length - max : 0;
3916
- return /* @__PURE__ */ jsxs21(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
4377
+ return /* @__PURE__ */ jsxs25(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
3917
4378
  visible.map(
3918
4379
  (child, index) => cloneElement(child, {
3919
4380
  key: index,
@@ -3921,7 +4382,7 @@ var AvatarGroup = (_a) => {
3921
4382
  className: cn("ring-2 ring-white", child.props.className)
3922
4383
  })
3923
4384
  ),
3924
- overflow > 0 && /* @__PURE__ */ jsxs21(
4385
+ overflow > 0 && /* @__PURE__ */ jsxs25(
3925
4386
  Layout,
3926
4387
  {
3927
4388
  align: "center",
@@ -3941,10 +4402,242 @@ var AvatarGroup = (_a) => {
3941
4402
  ] }));
3942
4403
  };
3943
4404
 
4405
+ // src/ui/components/ui/table/TablePersonCell.tsx
4406
+ import { jsx as jsx56, jsxs as jsxs26 } from "react/jsx-runtime";
4407
+ var AVATAR_SIZE = 24;
4408
+ var TablePersonCell = ({
4409
+ firstName,
4410
+ lastName,
4411
+ src,
4412
+ width
4413
+ }) => /* @__PURE__ */ jsx56(TableCell, { width, children: /* @__PURE__ */ jsxs26("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4414
+ /* @__PURE__ */ jsx56(
4415
+ Avatar,
4416
+ {
4417
+ size: AVATAR_SIZE,
4418
+ name: `${firstName} ${lastName != null ? lastName : ""}`.trim(),
4419
+ src
4420
+ }
4421
+ ),
4422
+ /* @__PURE__ */ jsx56("span", { className: "truncate", children: formatNameWithInitial(firstName, lastName != null ? lastName : null) })
4423
+ ] }) });
4424
+
4425
+ // src/ui/components/ui/table/TableClientCell.tsx
4426
+ import { jsx as jsx57, jsxs as jsxs27 } from "react/jsx-runtime";
4427
+ var TableClientCell = ({
4428
+ name,
4429
+ color,
4430
+ width
4431
+ }) => /* @__PURE__ */ jsx57(TableCell, { width, children: /* @__PURE__ */ jsxs27("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4432
+ /* @__PURE__ */ jsx57(
4433
+ "span",
4434
+ {
4435
+ "aria-hidden": "true",
4436
+ "data-testid": "client-dot",
4437
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
4438
+ style: { backgroundColor: color }
4439
+ }
4440
+ ),
4441
+ /* @__PURE__ */ jsx57("span", { className: "truncate", children: name })
4442
+ ] }) });
4443
+
4444
+ // src/ui/components/ui/table/TableStatusCell.tsx
4445
+ import { jsx as jsx58 } from "react/jsx-runtime";
4446
+ var TableStatusCell = ({
4447
+ children,
4448
+ theme,
4449
+ width
4450
+ }) => /* @__PURE__ */ jsx58(TableCell, { width, centerContent: true, children: /* @__PURE__ */ jsx58(Badge, { size: "l", theme, children }) });
4451
+
4452
+ // src/ui/components/ui/Popover.tsx
4453
+ import * as RadixPopover4 from "@radix-ui/react-popover";
4454
+ import { jsx as jsx59, jsxs as jsxs28 } from "react/jsx-runtime";
4455
+ var Popover = ({
4456
+ trigger,
4457
+ items,
4458
+ children,
4459
+ align = "end",
4460
+ side = "bottom",
4461
+ sideOffset = 6,
4462
+ open,
4463
+ onOpenChange,
4464
+ width,
4465
+ className
4466
+ }) => /* @__PURE__ */ jsxs28(RadixPopover4.Root, { open, onOpenChange, children: [
4467
+ /* @__PURE__ */ jsx59(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4468
+ /* @__PURE__ */ jsx59(RadixPopover4.Portal, { children: /* @__PURE__ */ jsx59(
4469
+ RadixPopover4.Content,
4470
+ {
4471
+ align,
4472
+ side,
4473
+ sideOffset,
4474
+ style: width ? { width } : void 0,
4475
+ onClick: (event) => event.stopPropagation(),
4476
+ className: cn(
4477
+ "z-[9999] min-w-[140px] rounded-[6px] border border-grey-200 bg-white p-1 shadow-[0_2px_8px_rgba(0,0,0,0.08)]",
4478
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
4479
+ className
4480
+ ),
4481
+ children: items ? /* @__PURE__ */ jsx59(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ jsx59(
4482
+ RadixPopover4.Close,
4483
+ {
4484
+ onClick: item.action,
4485
+ className: "cursor-pointer rounded-[4px] px-3 py-2 text-left text-sm font-medium text-neutral-800 outline-none hover:bg-grey-100",
4486
+ children: item.label
4487
+ },
4488
+ idx
4489
+ )) }) : children
4490
+ }
4491
+ ) })
4492
+ ] });
4493
+
4494
+ // src/ui/components/ui/table/TableActionsCell.tsx
4495
+ import { jsx as jsx60 } from "react/jsx-runtime";
4496
+ var MAX_INLINE_TABLE_ACTIONS = 3;
4497
+ var TableActionsCell = ({ actions, width }) => {
4498
+ const hasMenu = actions.length > MAX_INLINE_TABLE_ACTIONS;
4499
+ return /* @__PURE__ */ jsx60(TableCell, { width, centerContent: true, children: /* @__PURE__ */ jsx60(
4500
+ Layout,
4501
+ {
4502
+ row: true,
4503
+ gap: 1,
4504
+ align: "center",
4505
+ justify: "center",
4506
+ onClick: (event) => event.stopPropagation(),
4507
+ children: hasMenu ? /* @__PURE__ */ jsx60(
4508
+ Popover,
4509
+ {
4510
+ trigger: /* @__PURE__ */ jsx60(
4511
+ Icon,
4512
+ {
4513
+ name: "ellipsis-vertical",
4514
+ "aria-label": "Plus d'actions",
4515
+ onClick: () => void 0
4516
+ }
4517
+ ),
4518
+ items: actions.map(({ label, onClick }) => ({
4519
+ label,
4520
+ action: onClick
4521
+ }))
4522
+ }
4523
+ ) : actions.map(({ label, icon, onClick }) => /* @__PURE__ */ jsx60(
4524
+ Icon,
4525
+ {
4526
+ name: icon,
4527
+ "aria-label": label,
4528
+ title: label,
4529
+ onClick
4530
+ },
4531
+ label
4532
+ ))
4533
+ }
4534
+ ) });
4535
+ };
4536
+
4537
+ // src/ui/components/ui/table/TableSelectCell.tsx
4538
+ import { useRef as useRef7 } from "react";
4539
+ import { jsx as jsx61 } from "react/jsx-runtime";
4540
+ var TableSelectCell = ({
4541
+ isSelected,
4542
+ onToggle,
4543
+ label,
4544
+ width = "40px"
4545
+ }) => {
4546
+ const isRange = useRef7(false);
4547
+ return /* @__PURE__ */ jsx61(TableCell, { width, centerContent: true, className: "table-select-cell", children: /* @__PURE__ */ jsx61("span", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ jsx61(
4548
+ Checkbox,
4549
+ {
4550
+ "aria-label": label,
4551
+ checked: isSelected,
4552
+ onClick: (event) => {
4553
+ isRange.current = event.shiftKey;
4554
+ },
4555
+ onChange: () => onToggle({ isRange: isRange.current })
4556
+ }
4557
+ ) }) });
4558
+ };
4559
+
4560
+ // src/ui/components/ui/table/TableSelectHeaderCell.tsx
4561
+ import { jsx as jsx62 } from "react/jsx-runtime";
4562
+ var TableSelectHeaderCell = ({
4563
+ state,
4564
+ onToggle,
4565
+ width = "40px"
4566
+ }) => /* @__PURE__ */ jsx62(TableHeaderCell, { width, className: "table-select-cell", children: /* @__PURE__ */ jsx62(Layout, { justify: "center", children: /* @__PURE__ */ jsx62("span", { children: /* @__PURE__ */ jsx62(
4567
+ Checkbox,
4568
+ {
4569
+ "aria-label": "S\xE9lectionner toutes les lignes de la page",
4570
+ checked: state,
4571
+ onChange: onToggle
4572
+ }
4573
+ ) }) }) });
4574
+
4575
+ // src/ui/hooks/useRowSelection.ts
4576
+ import { useCallback as useCallback2, useRef as useRef8, useState as useState8 } from "react";
4577
+ var useRowSelection = ({
4578
+ rowIds,
4579
+ totalCount
4580
+ }) => {
4581
+ const [selectedIds, setSelectedIds] = useState8(/* @__PURE__ */ new Set());
4582
+ const [isAllResultsSelected, setIsAllResultsSelected] = useState8(false);
4583
+ const anchorId = useRef8(null);
4584
+ const resolvedTotal = totalCount != null ? totalCount : rowIds.length;
4585
+ const selectedOnPage = rowIds.filter((id) => selectedIds.has(id)).length;
4586
+ const isPageFullySelected = rowIds.length > 0 && selectedOnPage === rowIds.length;
4587
+ const canSelectAllResults = isPageFullySelected && !isAllResultsSelected && resolvedTotal > rowIds.length;
4588
+ const headerState = isAllResultsSelected || isPageFullySelected ? true : selectedOnPage > 0 ? "indeterminate" : false;
4589
+ const clear = useCallback2(() => {
4590
+ setSelectedIds(/* @__PURE__ */ new Set());
4591
+ setIsAllResultsSelected(false);
4592
+ anchorId.current = null;
4593
+ }, []);
4594
+ const toggleRow = (id, { isRange = false } = {}) => {
4595
+ const baseIds = isAllResultsSelected ? new Set(rowIds) : selectedIds;
4596
+ const next = new Set(baseIds);
4597
+ const willSelect = !baseIds.has(id);
4598
+ const anchorIndex = anchorId.current === null ? -1 : rowIds.indexOf(anchorId.current);
4599
+ const targetIndex = rowIds.indexOf(id);
4600
+ const idsToApply = isRange && anchorIndex >= 0 ? rowIds.slice(
4601
+ Math.min(anchorIndex, targetIndex),
4602
+ Math.max(anchorIndex, targetIndex) + 1
4603
+ ) : [id];
4604
+ idsToApply.forEach(
4605
+ (rowId) => willSelect ? next.add(rowId) : next.delete(rowId)
4606
+ );
4607
+ anchorId.current = id;
4608
+ setIsAllResultsSelected(false);
4609
+ setSelectedIds(next);
4610
+ };
4611
+ const toggleAllOnPage = () => {
4612
+ if (headerState === true) {
4613
+ clear();
4614
+ return;
4615
+ }
4616
+ setSelectedIds(/* @__PURE__ */ new Set([...selectedIds, ...rowIds]));
4617
+ };
4618
+ const selectAllResults = () => {
4619
+ setSelectedIds(new Set(rowIds));
4620
+ setIsAllResultsSelected(true);
4621
+ };
4622
+ return {
4623
+ selectedIds,
4624
+ selectedCount: isAllResultsSelected ? resolvedTotal : selectedIds.size,
4625
+ isRowSelected: (id) => isAllResultsSelected || selectedIds.has(id),
4626
+ headerState,
4627
+ isAllResultsSelected,
4628
+ canSelectAllResults,
4629
+ totalCount: resolvedTotal,
4630
+ toggleRow,
4631
+ toggleAllOnPage,
4632
+ selectAllResults,
4633
+ clear
4634
+ };
4635
+ };
4636
+
3944
4637
  // src/ui/components/ui/Radio.tsx
3945
4638
  import * as RadixRadioGroup from "@radix-ui/react-radio-group";
3946
4639
  import { cva as cva12 } from "class-variance-authority";
3947
- import { jsx as jsx46, jsxs as jsxs22 } from "react/jsx-runtime";
4640
+ import { jsx as jsx63, jsxs as jsxs29 } from "react/jsx-runtime";
3948
4641
  var radioVariants = cva12(
3949
4642
  "relative h-[22px] w-[22px] shrink-0 rounded-full border-2 border-grey-300 outline-none transition-colors",
3950
4643
  {
@@ -3999,23 +4692,23 @@ var Radio = ({
3999
4692
  color,
4000
4693
  width,
4001
4694
  className
4002
- }) => /* @__PURE__ */ jsx46(
4695
+ }) => /* @__PURE__ */ jsx63(
4003
4696
  RadixRadioGroup.Root,
4004
4697
  {
4005
4698
  value,
4006
4699
  onValueChange: onChange,
4007
4700
  disabled,
4008
4701
  asChild: true,
4009
- children: /* @__PURE__ */ jsx46(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
4702
+ children: /* @__PURE__ */ jsx63(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
4010
4703
  const itemId = `radio-${item.value}`;
4011
- return /* @__PURE__ */ jsxs22(Layout, { row: true, gap: 2, align: "center", children: [
4012
- /* @__PURE__ */ jsx46(
4704
+ return /* @__PURE__ */ jsxs29(Layout, { row: true, gap: 2, align: "center", children: [
4705
+ /* @__PURE__ */ jsx63(
4013
4706
  RadixRadioGroup.Item,
4014
4707
  {
4015
4708
  id: itemId,
4016
4709
  value: item.value,
4017
4710
  className: radioVariants({ color }),
4018
- children: /* @__PURE__ */ jsx46(
4711
+ children: /* @__PURE__ */ jsx63(
4019
4712
  RadixRadioGroup.Indicator,
4020
4713
  {
4021
4714
  className: indicatorVariants({ color })
@@ -4023,7 +4716,7 @@ var Radio = ({
4023
4716
  )
4024
4717
  }
4025
4718
  ),
4026
- item.label && /* @__PURE__ */ jsx46(
4719
+ item.label && /* @__PURE__ */ jsx63(
4027
4720
  Text,
4028
4721
  {
4029
4722
  as: "label",
@@ -4042,7 +4735,7 @@ var Radio = ({
4042
4735
  import * as RadixProgress from "@radix-ui/react-progress";
4043
4736
  import * as RadixSlider from "@radix-ui/react-slider";
4044
4737
  import { cva as cva13 } from "class-variance-authority";
4045
- import { jsx as jsx47, jsxs as jsxs23 } from "react/jsx-runtime";
4738
+ import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
4046
4739
  var trackVariants2 = cva13(
4047
4740
  "relative w-full overflow-hidden rounded-full bg-grey-200",
4048
4741
  {
@@ -4111,15 +4804,15 @@ var ProgressBar = ({
4111
4804
  const editable = Boolean(onChange);
4112
4805
  if (segments) {
4113
4806
  const visible = segments.filter((segment) => segment.value > 0);
4114
- return /* @__PURE__ */ jsxs23(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4115
- label && /* @__PURE__ */ jsx47("span", { className: "text-xs text-grey-600", children: label }),
4116
- /* @__PURE__ */ jsx47(
4807
+ return /* @__PURE__ */ jsxs30(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4808
+ label && /* @__PURE__ */ jsx64("span", { className: "text-xs text-grey-600", children: label }),
4809
+ /* @__PURE__ */ jsx64(
4117
4810
  "div",
4118
4811
  {
4119
4812
  role: "img",
4120
4813
  "aria-label": ariaLabel != null ? ariaLabel : label,
4121
4814
  className: cn(trackVariants2({ height }), "flex gap-0.5"),
4122
- children: visible.map((segment, index) => /* @__PURE__ */ jsx47(
4815
+ children: visible.map((segment, index) => /* @__PURE__ */ jsx64(
4123
4816
  "span",
4124
4817
  {
4125
4818
  className: "h-full",
@@ -4137,16 +4830,16 @@ var ProgressBar = ({
4137
4830
  }
4138
4831
  if (!editable) {
4139
4832
  const readOnlyPercent = Math.max(0, Math.min(100, percent));
4140
- return /* @__PURE__ */ jsxs23(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4141
- label && /* @__PURE__ */ jsx47("span", { className: "text-xs text-grey-600", children: label }),
4142
- /* @__PURE__ */ jsxs23(Layout, { fullWidth: true, align: "center", gap: 2, children: [
4143
- /* @__PURE__ */ jsx47(
4833
+ return /* @__PURE__ */ jsxs30(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4834
+ label && /* @__PURE__ */ jsx64("span", { className: "text-xs text-grey-600", children: label }),
4835
+ /* @__PURE__ */ jsxs30(Layout, { fullWidth: true, align: "center", gap: 2, children: [
4836
+ /* @__PURE__ */ jsx64(
4144
4837
  RadixProgress.Root,
4145
4838
  {
4146
4839
  value: readOnlyPercent,
4147
4840
  "aria-label": ariaLabel != null ? ariaLabel : label,
4148
4841
  className: trackVariants2({ height }),
4149
- children: /* @__PURE__ */ jsx47(
4842
+ children: /* @__PURE__ */ jsx64(
4150
4843
  RadixProgress.Indicator,
4151
4844
  {
4152
4845
  className: cn(
@@ -4161,11 +4854,11 @@ var ProgressBar = ({
4161
4854
  )
4162
4855
  }
4163
4856
  ),
4164
- showLabel && /* @__PURE__ */ jsx47("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
4857
+ showLabel && /* @__PURE__ */ jsx64("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
4165
4858
  ] })
4166
4859
  ] });
4167
4860
  }
4168
- return /* @__PURE__ */ jsxs23(
4861
+ return /* @__PURE__ */ jsxs30(
4169
4862
  Layout,
4170
4863
  {
4171
4864
  column: true,
@@ -4173,9 +4866,9 @@ var ProgressBar = ({
4173
4866
  gap: 1,
4174
4867
  className: cn(disabled && "cursor-not-allowed opacity-60", className),
4175
4868
  children: [
4176
- label && /* @__PURE__ */ jsx47("span", { className: "text-xs text-grey-600", children: label }),
4177
- /* @__PURE__ */ jsxs23("div", { className: "relative w-full pt-6", children: [
4178
- showLabel && /* @__PURE__ */ jsx47(
4869
+ label && /* @__PURE__ */ jsx64("span", { className: "text-xs text-grey-600", children: label }),
4870
+ /* @__PURE__ */ jsxs30("div", { className: "relative w-full pt-6", children: [
4871
+ showLabel && /* @__PURE__ */ jsx64(
4179
4872
  "span",
4180
4873
  {
4181
4874
  className: "absolute top-0 -translate-x-1/2 text-xs font-semibold text-neutral-800",
@@ -4183,7 +4876,7 @@ var ProgressBar = ({
4183
4876
  children: display(current)
4184
4877
  }
4185
4878
  ),
4186
- /* @__PURE__ */ jsxs23(
4879
+ /* @__PURE__ */ jsxs30(
4187
4880
  RadixSlider.Root,
4188
4881
  {
4189
4882
  value: [current],
@@ -4194,7 +4887,7 @@ var ProgressBar = ({
4194
4887
  disabled,
4195
4888
  className: "relative flex h-5 w-full touch-none select-none items-center",
4196
4889
  children: [
4197
- /* @__PURE__ */ jsx47(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ jsx47(
4890
+ /* @__PURE__ */ jsx64(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ jsx64(
4198
4891
  RadixSlider.Range,
4199
4892
  {
4200
4893
  className: cn(
@@ -4204,7 +4897,7 @@ var ProgressBar = ({
4204
4897
  style: { backgroundColor: hexColor }
4205
4898
  }
4206
4899
  ) }),
4207
- /* @__PURE__ */ jsx47(
4900
+ /* @__PURE__ */ jsx64(
4208
4901
  RadixSlider.Thumb,
4209
4902
  {
4210
4903
  className: cn(
@@ -4219,9 +4912,9 @@ var ProgressBar = ({
4219
4912
  }
4220
4913
  )
4221
4914
  ] }),
4222
- showLabel && /* @__PURE__ */ jsxs23(Layout, { align: "center", justify: "between", children: [
4223
- /* @__PURE__ */ jsx47("span", { className: "text-xs text-grey-600", children: display(min) }),
4224
- /* @__PURE__ */ jsx47("span", { className: "text-xs text-grey-600", children: display(max) })
4915
+ showLabel && /* @__PURE__ */ jsxs30(Layout, { align: "center", justify: "between", children: [
4916
+ /* @__PURE__ */ jsx64("span", { className: "text-xs text-grey-600", children: display(min) }),
4917
+ /* @__PURE__ */ jsx64("span", { className: "text-xs text-grey-600", children: display(max) })
4225
4918
  ] })
4226
4919
  ]
4227
4920
  }
@@ -4230,7 +4923,7 @@ var ProgressBar = ({
4230
4923
 
4231
4924
  // src/ui/components/ui/Collapsible.tsx
4232
4925
  import * as RadixCollapsible from "@radix-ui/react-collapsible";
4233
- import { jsx as jsx48 } from "react/jsx-runtime";
4926
+ import { jsx as jsx65 } from "react/jsx-runtime";
4234
4927
  var Collapsible = RadixCollapsible.Root;
4235
4928
  var CollapsibleTrigger = RadixCollapsible.Trigger;
4236
4929
  var CollapsibleContent = (_a) => {
@@ -4239,7 +4932,7 @@ var CollapsibleContent = (_a) => {
4239
4932
  } = _b, props = __objRest(_b, [
4240
4933
  "className"
4241
4934
  ]);
4242
- return /* @__PURE__ */ jsx48(
4935
+ return /* @__PURE__ */ jsx65(
4243
4936
  RadixCollapsible.Content,
4244
4937
  __spreadValues({
4245
4938
  className: "overflow-hidden data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] " + (className != null ? className : "")
@@ -4248,7 +4941,7 @@ var CollapsibleContent = (_a) => {
4248
4941
  };
4249
4942
 
4250
4943
  // src/ui/components/ui/Drawer.tsx
4251
- import { useEffect as useEffect6, useRef as useRef7, useState as useState8 } from "react";
4944
+ import { useEffect as useEffect6, useRef as useRef9, useState as useState9 } from "react";
4252
4945
  import { Drawer as VaulDrawer } from "vaul";
4253
4946
  import * as DialogPrimitive from "@radix-ui/react-dialog";
4254
4947
 
@@ -4319,7 +5012,7 @@ var swallowRestOfClick = () => {
4319
5012
  };
4320
5013
 
4321
5014
  // src/ui/components/ui/Drawer.tsx
4322
- import { jsx as jsx49, jsxs as jsxs24 } from "react/jsx-runtime";
5015
+ import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
4323
5016
  var KEEP_OPEN_SELECTOR = '[role="dialog"], [role="listbox"], [data-drawer-keep-open]';
4324
5017
  var CONTENT_POSITION = {
4325
5018
  top: "inset-x-4 top-4 rounded-2xl",
@@ -4338,9 +5031,9 @@ var Drawer = ({
4338
5031
  overlayClassName
4339
5032
  }) => {
4340
5033
  const isVertical = direction === "left" || direction === "right";
4341
- const contentRef = useRef7(null);
4342
- const [panel, setPanel] = useState8(null);
4343
- const overlayRef = useRef7(null);
5034
+ const contentRef = useRef9(null);
5035
+ const [panel, setPanel] = useState9(null);
5036
+ const overlayRef = useRef9(null);
4344
5037
  useAllowPortalScroll(modal && open, contentRef, overlayRef);
4345
5038
  useEffect6(() => {
4346
5039
  if (!open || !panel) return;
@@ -4384,8 +5077,8 @@ var Drawer = ({
4384
5077
  return () => cancelAnimationFrame(frame);
4385
5078
  }, [modal, open]);
4386
5079
  const closeOnDismiss = (next) => !next && closeDrawer();
4387
- const drawerPortal = /* @__PURE__ */ jsxs24(VaulDrawer.Portal, { children: [
4388
- /* @__PURE__ */ jsx49(
5080
+ const drawerPortal = /* @__PURE__ */ jsxs31(VaulDrawer.Portal, { children: [
5081
+ /* @__PURE__ */ jsx66(
4389
5082
  VaulDrawer.Overlay,
4390
5083
  {
4391
5084
  ref: overlayRef,
@@ -4397,7 +5090,7 @@ var Drawer = ({
4397
5090
  )
4398
5091
  }
4399
5092
  ),
4400
- /* @__PURE__ */ jsx49(
5093
+ /* @__PURE__ */ jsx66(
4401
5094
  VaulDrawer.Content,
4402
5095
  __spreadProps(__spreadValues({
4403
5096
  ref: (node) => {
@@ -4429,14 +5122,14 @@ var Drawer = ({
4429
5122
  })
4430
5123
  )
4431
5124
  ] });
4432
- return /* @__PURE__ */ jsx49(
5125
+ return /* @__PURE__ */ jsx66(
4433
5126
  VaulDrawer.Root,
4434
5127
  {
4435
5128
  direction,
4436
5129
  modal,
4437
5130
  open,
4438
5131
  onOpenChange: closeOnDismiss,
4439
- children: modal ? drawerPortal : /* @__PURE__ */ jsx49(
5132
+ children: modal ? drawerPortal : /* @__PURE__ */ jsx66(
4440
5133
  DialogPrimitive.Root,
4441
5134
  {
4442
5135
  modal: false,
@@ -4454,7 +5147,7 @@ var DrawerHeader = (_a) => {
4454
5147
  } = _b, props = __objRest(_b, [
4455
5148
  "className"
4456
5149
  ]);
4457
- return /* @__PURE__ */ jsx49(
5150
+ return /* @__PURE__ */ jsx66(
4458
5151
  "div",
4459
5152
  __spreadValues({
4460
5153
  className: cn("flex w-full items-center justify-between", className)
@@ -4467,7 +5160,7 @@ var DrawerTitle = (_a) => {
4467
5160
  } = _b, props = __objRest(_b, [
4468
5161
  "className"
4469
5162
  ]);
4470
- return /* @__PURE__ */ jsx49(
5163
+ return /* @__PURE__ */ jsx66(
4471
5164
  VaulDrawer.Title,
4472
5165
  __spreadValues({
4473
5166
  className: cn("text-base font-bold text-neutral-800", className)
@@ -4480,7 +5173,7 @@ var DrawerDescription = (_a) => {
4480
5173
  } = _b, props = __objRest(_b, [
4481
5174
  "className"
4482
5175
  ]);
4483
- return /* @__PURE__ */ jsx49(
5176
+ return /* @__PURE__ */ jsx66(
4484
5177
  VaulDrawer.Description,
4485
5178
  __spreadValues({
4486
5179
  className: cn("text-sm text-grey-500", className)
@@ -4493,7 +5186,7 @@ var DrawerBody = (_a) => {
4493
5186
  } = _b, props = __objRest(_b, [
4494
5187
  "className"
4495
5188
  ]);
4496
- return /* @__PURE__ */ jsx49("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
5189
+ return /* @__PURE__ */ jsx66("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
4497
5190
  };
4498
5191
  var DrawerFooter = (_a) => {
4499
5192
  var _b = _a, {
@@ -4501,52 +5194,10 @@ var DrawerFooter = (_a) => {
4501
5194
  } = _b, props = __objRest(_b, [
4502
5195
  "className"
4503
5196
  ]);
4504
- return /* @__PURE__ */ jsx49("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
5197
+ return /* @__PURE__ */ jsx66("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
4505
5198
  };
4506
5199
  var DrawerClose = VaulDrawer.Close;
4507
5200
 
4508
- // src/ui/components/ui/Popover.tsx
4509
- import * as RadixPopover4 from "@radix-ui/react-popover";
4510
- import { jsx as jsx50, jsxs as jsxs25 } from "react/jsx-runtime";
4511
- var Popover = ({
4512
- trigger,
4513
- items,
4514
- children,
4515
- align = "end",
4516
- side = "bottom",
4517
- sideOffset = 6,
4518
- open,
4519
- onOpenChange,
4520
- width,
4521
- className
4522
- }) => /* @__PURE__ */ jsxs25(RadixPopover4.Root, { open, onOpenChange, children: [
4523
- /* @__PURE__ */ jsx50(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4524
- /* @__PURE__ */ jsx50(RadixPopover4.Portal, { children: /* @__PURE__ */ jsx50(
4525
- RadixPopover4.Content,
4526
- {
4527
- align,
4528
- side,
4529
- sideOffset,
4530
- style: width ? { width } : void 0,
4531
- onClick: (event) => event.stopPropagation(),
4532
- className: cn(
4533
- "z-[9999] min-w-[140px] rounded-[6px] border border-grey-200 bg-white p-1 shadow-[0_2px_8px_rgba(0,0,0,0.08)]",
4534
- "data-[state=open]:animate-[fade-in_150ms_ease-out]",
4535
- className
4536
- ),
4537
- children: items ? /* @__PURE__ */ jsx50(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ jsx50(
4538
- RadixPopover4.Close,
4539
- {
4540
- onClick: item.action,
4541
- className: "cursor-pointer rounded-[4px] px-3 py-2 text-left text-sm font-medium text-neutral-800 outline-none hover:bg-grey-100",
4542
- children: item.label
4543
- },
4544
- idx
4545
- )) }) : children
4546
- }
4547
- ) })
4548
- ] });
4549
-
4550
5201
  // src/ui/components/ui/sidebar/Sidebar.tsx
4551
5202
  import { forwardRef as forwardRef20 } from "react";
4552
5203
 
@@ -4557,11 +5208,11 @@ var SidebarCollapsedProvider = SidebarCollapsedContext.Provider;
4557
5208
  var useSidebarCollapsed = () => useContext3(SidebarCollapsedContext);
4558
5209
 
4559
5210
  // src/ui/components/ui/sidebar/Sidebar.tsx
4560
- import { jsx as jsx51 } from "react/jsx-runtime";
5211
+ import { jsx as jsx67 } from "react/jsx-runtime";
4561
5212
  var Sidebar = forwardRef20(
4562
5213
  (_a, ref) => {
4563
5214
  var _b = _a, { collapsed = false, className, children } = _b, props = __objRest(_b, ["collapsed", "className", "children"]);
4564
- return /* @__PURE__ */ jsx51(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ jsx51(
5215
+ return /* @__PURE__ */ jsx67(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ jsx67(
4565
5216
  "aside",
4566
5217
  __spreadProps(__spreadValues({
4567
5218
  ref,
@@ -4580,10 +5231,10 @@ Sidebar.displayName = "Sidebar";
4580
5231
 
4581
5232
  // src/ui/components/ui/sidebar/SidebarTrigger.tsx
4582
5233
  import { forwardRef as forwardRef21 } from "react";
4583
- import { jsx as jsx52 } from "react/jsx-runtime";
5234
+ import { jsx as jsx68 } from "react/jsx-runtime";
4584
5235
  var SidebarTrigger = forwardRef21((_a, ref) => {
4585
5236
  var _b = _a, { collapsed, className } = _b, props = __objRest(_b, ["collapsed", "className"]);
4586
- return /* @__PURE__ */ jsx52(
5237
+ return /* @__PURE__ */ jsx68(
4587
5238
  "button",
4588
5239
  __spreadProps(__spreadValues({
4589
5240
  ref,
@@ -4594,7 +5245,7 @@ var SidebarTrigger = forwardRef21((_a, ref) => {
4594
5245
  className
4595
5246
  )
4596
5247
  }, props), {
4597
- children: /* @__PURE__ */ jsx52(
5248
+ children: /* @__PURE__ */ jsx68(
4598
5249
  FaIcon,
4599
5250
  {
4600
5251
  name: collapsed ? "chevrons-right" : "chevrons-left",
@@ -4609,11 +5260,11 @@ SidebarTrigger.displayName = "SidebarTrigger";
4609
5260
 
4610
5261
  // src/ui/components/ui/sidebar/SidebarHeader.tsx
4611
5262
  import { forwardRef as forwardRef22 } from "react";
4612
- import { jsx as jsx53 } from "react/jsx-runtime";
5263
+ import { jsx as jsx69 } from "react/jsx-runtime";
4613
5264
  var SidebarHeader = forwardRef22(
4614
5265
  (_a, ref) => {
4615
5266
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4616
- return /* @__PURE__ */ jsx53(
5267
+ return /* @__PURE__ */ jsx69(
4617
5268
  "div",
4618
5269
  __spreadValues({
4619
5270
  ref,
@@ -4626,11 +5277,11 @@ SidebarHeader.displayName = "SidebarHeader";
4626
5277
 
4627
5278
  // src/ui/components/ui/sidebar/SidebarContent.tsx
4628
5279
  import { forwardRef as forwardRef23 } from "react";
4629
- import { jsx as jsx54 } from "react/jsx-runtime";
5280
+ import { jsx as jsx70 } from "react/jsx-runtime";
4630
5281
  var SidebarContent = forwardRef23(
4631
5282
  (_a, ref) => {
4632
5283
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4633
- return /* @__PURE__ */ jsx54(
5284
+ return /* @__PURE__ */ jsx70(
4634
5285
  "div",
4635
5286
  __spreadValues({
4636
5287
  ref,
@@ -4647,20 +5298,20 @@ SidebarContent.displayName = "SidebarContent";
4647
5298
 
4648
5299
  // src/ui/components/ui/sidebar/SidebarGroup.tsx
4649
5300
  import { forwardRef as forwardRef24 } from "react";
4650
- import { jsx as jsx55, jsxs as jsxs26 } from "react/jsx-runtime";
5301
+ import { jsx as jsx71, jsxs as jsxs32 } from "react/jsx-runtime";
4651
5302
  var SidebarGroup = forwardRef24(
4652
5303
  (_a, ref) => {
4653
5304
  var _b = _a, { label, className, children } = _b, props = __objRest(_b, ["label", "className", "children"]);
4654
5305
  const collapsed = useSidebarCollapsed();
4655
- return /* @__PURE__ */ jsxs26(
5306
+ return /* @__PURE__ */ jsxs32(
4656
5307
  "div",
4657
5308
  __spreadProps(__spreadValues({
4658
5309
  ref,
4659
5310
  className: cn("flex w-full flex-col p-2", className)
4660
5311
  }, props), {
4661
5312
  children: [
4662
- label && !collapsed && /* @__PURE__ */ jsx55("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
4663
- /* @__PURE__ */ jsx55("div", { className: "flex flex-col gap-1", children })
5313
+ label && !collapsed && /* @__PURE__ */ jsx71("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
5314
+ /* @__PURE__ */ jsx71("div", { className: "flex flex-col gap-1", children })
4664
5315
  ]
4665
5316
  })
4666
5317
  );
@@ -4670,7 +5321,7 @@ SidebarGroup.displayName = "SidebarGroup";
4670
5321
 
4671
5322
  // src/ui/components/ui/sidebar/SidebarMenuButton.tsx
4672
5323
  import { forwardRef as forwardRef25 } from "react";
4673
- import { jsx as jsx56, jsxs as jsxs27 } from "react/jsx-runtime";
5324
+ import { jsx as jsx72, jsxs as jsxs33 } from "react/jsx-runtime";
4674
5325
  var SidebarMenuButton = forwardRef25(
4675
5326
  (_a, ref) => {
4676
5327
  var _b = _a, {
@@ -4693,7 +5344,7 @@ var SidebarMenuButton = forwardRef25(
4693
5344
  "className"
4694
5345
  ]);
4695
5346
  const collapsed = useSidebarCollapsed();
4696
- const button = /* @__PURE__ */ jsxs27(
5347
+ const button = /* @__PURE__ */ jsxs33(
4697
5348
  "button",
4698
5349
  __spreadProps(__spreadValues({
4699
5350
  ref,
@@ -4709,7 +5360,7 @@ var SidebarMenuButton = forwardRef25(
4709
5360
  )
4710
5361
  }, props), {
4711
5362
  children: [
4712
- /* @__PURE__ */ jsx56(
5363
+ /* @__PURE__ */ jsx72(
4713
5364
  FaIcon,
4714
5365
  {
4715
5366
  name: icon,
@@ -4718,7 +5369,7 @@ var SidebarMenuButton = forwardRef25(
4718
5369
  className: "shrink-0"
4719
5370
  }
4720
5371
  ),
4721
- !collapsed && /* @__PURE__ */ jsx56(
5372
+ !collapsed && /* @__PURE__ */ jsx72(
4722
5373
  Text,
4723
5374
  {
4724
5375
  as: "span",
@@ -4729,8 +5380,8 @@ var SidebarMenuButton = forwardRef25(
4729
5380
  children: label
4730
5381
  }
4731
5382
  ),
4732
- !collapsed && shortcut && /* @__PURE__ */ jsx56("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 }),
4733
- !!badge && /* @__PURE__ */ jsx56(
5383
+ !collapsed && shortcut && /* @__PURE__ */ jsx72("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 }),
5384
+ !!badge && /* @__PURE__ */ jsx72(
4734
5385
  "span",
4735
5386
  {
4736
5387
  className: cn(
@@ -4745,14 +5396,14 @@ var SidebarMenuButton = forwardRef25(
4745
5396
  })
4746
5397
  );
4747
5398
  if (!collapsed) return button;
4748
- return /* @__PURE__ */ jsx56(Tooltip, { content: label, side: "right", children: button });
5399
+ return /* @__PURE__ */ jsx72(Tooltip, { content: label, side: "right", children: button });
4749
5400
  }
4750
5401
  );
4751
5402
  SidebarMenuButton.displayName = "SidebarMenuButton";
4752
5403
 
4753
5404
  // src/ui/components/ui/sidebar/SidebarActionCard.tsx
4754
5405
  import { forwardRef as forwardRef26 } from "react";
4755
- import { Fragment as Fragment4, jsx as jsx57, jsxs as jsxs28 } from "react/jsx-runtime";
5406
+ import { Fragment as Fragment5, jsx as jsx73, jsxs as jsxs34 } from "react/jsx-runtime";
4756
5407
  var SidebarActionCard = forwardRef26(
4757
5408
  (_a, ref) => {
4758
5409
  var _b = _a, {
@@ -4773,11 +5424,11 @@ var SidebarActionCard = forwardRef26(
4773
5424
  const collapsed = useSidebarCollapsed();
4774
5425
  const tooltip = subtitle ? `${title} ${subtitle}` : title;
4775
5426
  const counter = badge ? badge > 99 ? "99+" : badge : null;
4776
- const iconBadge = /* @__PURE__ */ jsxs28("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
4777
- /* @__PURE__ */ jsx57(FaIcon, { name: icon, family: iconFamily, size: 16 }),
4778
- collapsed && counter && /* @__PURE__ */ jsx57("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 })
5427
+ const iconBadge = /* @__PURE__ */ jsxs34("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
5428
+ /* @__PURE__ */ jsx73(FaIcon, { name: icon, family: iconFamily, size: 16 }),
5429
+ collapsed && counter && /* @__PURE__ */ jsx73("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 })
4779
5430
  ] });
4780
- const button = /* @__PURE__ */ jsxs28(
5431
+ const button = /* @__PURE__ */ jsxs34(
4781
5432
  "button",
4782
5433
  __spreadProps(__spreadValues({
4783
5434
  ref,
@@ -4792,12 +5443,12 @@ var SidebarActionCard = forwardRef26(
4792
5443
  }, props), {
4793
5444
  children: [
4794
5445
  iconBadge,
4795
- !collapsed && /* @__PURE__ */ jsxs28(Fragment4, { children: [
4796
- /* @__PURE__ */ jsxs28("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
4797
- /* @__PURE__ */ jsx57("span", { className: "truncate text-sm font-bold text-white", children: title }),
4798
- subtitle && /* @__PURE__ */ jsx57("span", { className: "truncate text-xs text-white/60", children: subtitle })
5446
+ !collapsed && /* @__PURE__ */ jsxs34(Fragment5, { children: [
5447
+ /* @__PURE__ */ jsxs34("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5448
+ /* @__PURE__ */ jsx73("span", { className: "truncate text-sm font-bold text-white", children: title }),
5449
+ subtitle && /* @__PURE__ */ jsx73("span", { className: "truncate text-xs text-white/60", children: subtitle })
4799
5450
  ] }),
4800
- counter ? /* @__PURE__ */ jsx57("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__ */ jsx57(
5451
+ counter ? /* @__PURE__ */ jsx73("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__ */ jsx73(
4801
5452
  FaIcon,
4802
5453
  {
4803
5454
  name: "chevron-right",
@@ -4811,18 +5462,18 @@ var SidebarActionCard = forwardRef26(
4811
5462
  })
4812
5463
  );
4813
5464
  if (!collapsed) return button;
4814
- return /* @__PURE__ */ jsx57(Tooltip, { content: tooltip, side: "right", children: button });
5465
+ return /* @__PURE__ */ jsx73(Tooltip, { content: tooltip, side: "right", children: button });
4815
5466
  }
4816
5467
  );
4817
5468
  SidebarActionCard.displayName = "SidebarActionCard";
4818
5469
 
4819
5470
  // src/ui/components/ui/sidebar/SidebarMenuSub.tsx
4820
5471
  import { forwardRef as forwardRef27 } from "react";
4821
- import { jsx as jsx58 } from "react/jsx-runtime";
5472
+ import { jsx as jsx74 } from "react/jsx-runtime";
4822
5473
  var SidebarMenuSub = forwardRef27(
4823
5474
  (_a, ref) => {
4824
5475
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4825
- return /* @__PURE__ */ jsx58(
5476
+ return /* @__PURE__ */ jsx74(
4826
5477
  "ul",
4827
5478
  __spreadValues({
4828
5479
  ref,
@@ -4838,23 +5489,23 @@ SidebarMenuSub.displayName = "SidebarMenuSub";
4838
5489
 
4839
5490
  // src/ui/components/ui/sidebar/SidebarMenuSubItem.tsx
4840
5491
  import { forwardRef as forwardRef28 } from "react";
4841
- import { jsx as jsx59 } from "react/jsx-runtime";
5492
+ import { jsx as jsx75 } from "react/jsx-runtime";
4842
5493
  var SidebarMenuSubItem = forwardRef28((_a, ref) => {
4843
5494
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4844
- return /* @__PURE__ */ jsx59("li", __spreadValues({ ref, className: cn("relative", className) }, props));
5495
+ return /* @__PURE__ */ jsx75("li", __spreadValues({ ref, className: cn("relative", className) }, props));
4845
5496
  });
4846
5497
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
4847
5498
 
4848
5499
  // src/ui/components/ui/sidebar/SidebarMenuSubButton.tsx
4849
5500
  import { forwardRef as forwardRef29 } from "react";
4850
- import { jsx as jsx60 } from "react/jsx-runtime";
5501
+ import { jsx as jsx76 } from "react/jsx-runtime";
4851
5502
  var SIZE_CLASS = {
4852
5503
  default: "h-10",
4853
5504
  lg: "h-14"
4854
5505
  };
4855
5506
  var SidebarMenuSubButton = forwardRef29((_a, ref) => {
4856
5507
  var _b = _a, { active, size = "default", className } = _b, props = __objRest(_b, ["active", "size", "className"]);
4857
- return /* @__PURE__ */ jsx60(
5508
+ return /* @__PURE__ */ jsx76(
4858
5509
  "button",
4859
5510
  __spreadValues({
4860
5511
  ref,
@@ -4874,11 +5525,11 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
4874
5525
 
4875
5526
  // src/ui/components/ui/sidebar/SidebarFooter.tsx
4876
5527
  import { forwardRef as forwardRef30 } from "react";
4877
- import { jsx as jsx61 } from "react/jsx-runtime";
5528
+ import { jsx as jsx77 } from "react/jsx-runtime";
4878
5529
  var SidebarFooter = forwardRef30(
4879
5530
  (_a, ref) => {
4880
5531
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4881
- return /* @__PURE__ */ jsx61(
5532
+ return /* @__PURE__ */ jsx77(
4882
5533
  "div",
4883
5534
  __spreadValues({
4884
5535
  ref,
@@ -4890,7 +5541,7 @@ var SidebarFooter = forwardRef30(
4890
5541
  SidebarFooter.displayName = "SidebarFooter";
4891
5542
 
4892
5543
  // src/ui/components/ui/sidebar/SidebarSupportInfo.tsx
4893
- import { jsx as jsx62, jsxs as jsxs29 } from "react/jsx-runtime";
5544
+ import { jsx as jsx78, jsxs as jsxs35 } from "react/jsx-runtime";
4894
5545
  var SidebarSupportInfo = ({
4895
5546
  phone,
4896
5547
  hours,
@@ -4899,27 +5550,27 @@ var SidebarSupportInfo = ({
4899
5550
  className
4900
5551
  }) => {
4901
5552
  const collapsed = useSidebarCollapsed();
4902
- const badge = /* @__PURE__ */ jsx62("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ jsx62(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
5553
+ const badge = /* @__PURE__ */ jsx78("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ jsx78(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
4903
5554
  if (collapsed) {
4904
- return /* @__PURE__ */ jsx62("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ jsx62(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
5555
+ return /* @__PURE__ */ jsx78("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ jsx78(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
4905
5556
  }
4906
- return /* @__PURE__ */ jsxs29("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
5557
+ return /* @__PURE__ */ jsxs35("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
4907
5558
  badge,
4908
- /* @__PURE__ */ jsxs29("div", { className: "flex min-w-0 flex-col leading-tight", children: [
4909
- /* @__PURE__ */ jsx62("span", { className: "truncate text-sm font-bold text-white", children: phone }),
4910
- /* @__PURE__ */ jsx62("span", { className: "truncate text-xs text-white/50", children: hours })
5559
+ /* @__PURE__ */ jsxs35("div", { className: "flex min-w-0 flex-col leading-tight", children: [
5560
+ /* @__PURE__ */ jsx78("span", { className: "truncate text-sm font-bold text-white", children: phone }),
5561
+ /* @__PURE__ */ jsx78("span", { className: "truncate text-xs text-white/50", children: hours })
4911
5562
  ] })
4912
5563
  ] });
4913
5564
  };
4914
5565
 
4915
5566
  // src/ui/components/ui/sidebar/SidebarMenuSearchInput.tsx
4916
5567
  import { forwardRef as forwardRef31 } from "react";
4917
- import { jsx as jsx63, jsxs as jsxs30 } from "react/jsx-runtime";
5568
+ import { jsx as jsx79, jsxs as jsxs36 } from "react/jsx-runtime";
4918
5569
  var SidebarMenuSearchInput = forwardRef31((_a, ref) => {
4919
5570
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4920
- return /* @__PURE__ */ jsxs30(InputGroup, { children: [
4921
- /* @__PURE__ */ jsx63(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsx63(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
4922
- /* @__PURE__ */ jsx63(
5571
+ return /* @__PURE__ */ jsxs36(InputGroup, { children: [
5572
+ /* @__PURE__ */ jsx79(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ jsx79(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
5573
+ /* @__PURE__ */ jsx79(
4923
5574
  Input,
4924
5575
  __spreadValues({
4925
5576
  ref,
@@ -4934,9 +5585,9 @@ var SidebarMenuSearchInput = forwardRef31((_a, ref) => {
4934
5585
  SidebarMenuSearchInput.displayName = "SidebarMenuSearchInput";
4935
5586
 
4936
5587
  // src/ui/components/ui/sidebar/SidebarUserMenu.tsx
4937
- import { useState as useState9 } from "react";
5588
+ import { useState as useState10 } from "react";
4938
5589
  import * as RadixPopover5 from "@radix-ui/react-popover";
4939
- import { Fragment as Fragment5, jsx as jsx64, jsxs as jsxs31 } from "react/jsx-runtime";
5590
+ import { Fragment as Fragment6, jsx as jsx80, jsxs as jsxs37 } from "react/jsx-runtime";
4940
5591
  var panelClassName = cn(
4941
5592
  "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)]",
4942
5593
  "data-[state=open]:animate-[fade-in_150ms_ease-out]"
@@ -4953,13 +5604,13 @@ var SidebarUserMenu = ({
4953
5604
  className
4954
5605
  }) => {
4955
5606
  const collapsed = useSidebarCollapsed();
4956
- const [open, setOpen] = useState9(false);
5607
+ const [open, setOpen] = useState10(false);
4957
5608
  const runAndClose = (action) => {
4958
5609
  action();
4959
5610
  setOpen(false);
4960
5611
  };
4961
- return /* @__PURE__ */ jsxs31(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
4962
- /* @__PURE__ */ jsx64(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs31(
5612
+ return /* @__PURE__ */ jsxs37(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
5613
+ /* @__PURE__ */ jsx80(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs37(
4963
5614
  "button",
4964
5615
  {
4965
5616
  type: "button",
@@ -4969,10 +5620,10 @@ var SidebarUserMenu = ({
4969
5620
  className
4970
5621
  ),
4971
5622
  children: [
4972
- /* @__PURE__ */ jsx64(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
4973
- !collapsed && /* @__PURE__ */ jsxs31(Fragment5, { children: [
4974
- /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
4975
- /* @__PURE__ */ jsx64(
5623
+ /* @__PURE__ */ jsx80(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
5624
+ !collapsed && /* @__PURE__ */ jsxs37(Fragment6, { children: [
5625
+ /* @__PURE__ */ jsxs37("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5626
+ /* @__PURE__ */ jsx80(
4976
5627
  Text,
4977
5628
  {
4978
5629
  as: "span",
@@ -4983,10 +5634,10 @@ var SidebarUserMenu = ({
4983
5634
  children: name
4984
5635
  }
4985
5636
  ),
4986
- email && /* @__PURE__ */ jsx64("span", { className: "truncate text-xs text-white/50", children: email }),
4987
- subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ jsx64("span", { className: "truncate text-xs text-white/50", children: subtitle })
5637
+ email && /* @__PURE__ */ jsx80("span", { className: "truncate text-xs text-white/50", children: email }),
5638
+ subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ jsx80("span", { className: "truncate text-xs text-white/50", children: subtitle })
4988
5639
  ] }),
4989
- /* @__PURE__ */ jsx64(
5640
+ /* @__PURE__ */ jsx80(
4990
5641
  FaIcon,
4991
5642
  {
4992
5643
  name: "sort",
@@ -4999,7 +5650,7 @@ var SidebarUserMenu = ({
4999
5650
  ]
5000
5651
  }
5001
5652
  ) }),
5002
- /* @__PURE__ */ jsx64(RadixPopover5.Portal, { children: /* @__PURE__ */ jsxs31(
5653
+ /* @__PURE__ */ jsx80(RadixPopover5.Portal, { children: /* @__PURE__ */ jsxs37(
5003
5654
  RadixPopover5.Content,
5004
5655
  {
5005
5656
  align: "end",
@@ -5007,10 +5658,10 @@ var SidebarUserMenu = ({
5007
5658
  sideOffset: 6,
5008
5659
  className: panelClassName,
5009
5660
  children: [
5010
- /* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
5011
- /* @__PURE__ */ jsx64(Avatar, { name, src: avatarSrc, size: 32 }),
5012
- /* @__PURE__ */ jsxs31("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5013
- /* @__PURE__ */ jsx64(
5661
+ /* @__PURE__ */ jsxs37("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
5662
+ /* @__PURE__ */ jsx80(Avatar, { name, src: avatarSrc, size: 32 }),
5663
+ /* @__PURE__ */ jsxs37("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5664
+ /* @__PURE__ */ jsx80(
5014
5665
  Text,
5015
5666
  {
5016
5667
  as: "span",
@@ -5021,20 +5672,20 @@ var SidebarUserMenu = ({
5021
5672
  children: name
5022
5673
  }
5023
5674
  ),
5024
- email && /* @__PURE__ */ jsx64("span", { className: "truncate text-xs text-white/50", children: email }),
5025
- subtitle && !hideSubtitleInPanel && /* @__PURE__ */ jsx64("span", { className: "truncate text-xs text-white/50", children: subtitle })
5675
+ email && /* @__PURE__ */ jsx80("span", { className: "truncate text-xs text-white/50", children: email }),
5676
+ subtitle && !hideSubtitleInPanel && /* @__PURE__ */ jsx80("span", { className: "truncate text-xs text-white/50", children: subtitle })
5026
5677
  ] })
5027
5678
  ] }),
5028
- actionGroups.map((group, groupIndex) => /* @__PURE__ */ jsx64(
5679
+ actionGroups.map((group, groupIndex) => /* @__PURE__ */ jsx80(
5029
5680
  "div",
5030
5681
  {
5031
5682
  className: "border-t border-white/10 py-1 first:border-t-0",
5032
5683
  children: group.map(
5033
5684
  (item) => {
5034
5685
  var _a;
5035
- return item.renderPanel || item.subActions ? /* @__PURE__ */ jsxs31(RadixPopover5.Root, { children: [
5036
- /* @__PURE__ */ jsx64(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs31("button", { type: "button", className: rowClassName, children: [
5037
- /* @__PURE__ */ jsx64(
5686
+ return item.renderPanel || item.subActions ? /* @__PURE__ */ jsxs37(RadixPopover5.Root, { children: [
5687
+ /* @__PURE__ */ jsx80(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs37("button", { type: "button", className: rowClassName, children: [
5688
+ /* @__PURE__ */ jsx80(
5038
5689
  FaIcon,
5039
5690
  {
5040
5691
  name: item.icon,
@@ -5043,8 +5694,8 @@ var SidebarUserMenu = ({
5043
5694
  className: "shrink-0 text-white/70"
5044
5695
  }
5045
5696
  ),
5046
- /* @__PURE__ */ jsx64("span", { className: "flex-1", children: item.label }),
5047
- /* @__PURE__ */ jsx64(
5697
+ /* @__PURE__ */ jsx80("span", { className: "flex-1", children: item.label }),
5698
+ /* @__PURE__ */ jsx80(
5048
5699
  FaIcon,
5049
5700
  {
5050
5701
  name: "chevron-right",
@@ -5053,21 +5704,21 @@ var SidebarUserMenu = ({
5053
5704
  }
5054
5705
  )
5055
5706
  ] }) }),
5056
- /* @__PURE__ */ jsx64(RadixPopover5.Portal, { children: /* @__PURE__ */ jsx64(
5707
+ /* @__PURE__ */ jsx80(RadixPopover5.Portal, { children: /* @__PURE__ */ jsx80(
5057
5708
  RadixPopover5.Content,
5058
5709
  {
5059
5710
  align: "end",
5060
5711
  side: "right",
5061
5712
  sideOffset: 6,
5062
5713
  className: panelClassName,
5063
- children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ jsxs31(
5714
+ children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ jsxs37(
5064
5715
  "button",
5065
5716
  {
5066
5717
  type: "button",
5067
5718
  onClick: () => runAndClose(sub.action),
5068
5719
  className: rowClassName,
5069
5720
  children: [
5070
- /* @__PURE__ */ jsx64(
5721
+ /* @__PURE__ */ jsx80(
5071
5722
  FaIcon,
5072
5723
  {
5073
5724
  name: sub.icon,
@@ -5083,14 +5734,14 @@ var SidebarUserMenu = ({
5083
5734
  ))
5084
5735
  }
5085
5736
  ) })
5086
- ] }, item.label) : /* @__PURE__ */ jsxs31(
5737
+ ] }, item.label) : /* @__PURE__ */ jsxs37(
5087
5738
  "button",
5088
5739
  {
5089
5740
  type: "button",
5090
5741
  onClick: () => runAndClose(item.action),
5091
5742
  className: rowClassName,
5092
5743
  children: [
5093
- /* @__PURE__ */ jsx64(
5744
+ /* @__PURE__ */ jsx80(
5094
5745
  FaIcon,
5095
5746
  {
5096
5747
  name: item.icon,
@@ -5117,15 +5768,15 @@ var SidebarUserMenu = ({
5117
5768
 
5118
5769
  // src/ui/components/ui/Toaster.tsx
5119
5770
  import { Toaster as SonnerToaster } from "sonner";
5120
- import { jsx as jsx65 } from "react/jsx-runtime";
5121
- var Toaster = () => /* @__PURE__ */ jsx65(SonnerToaster, { position: "bottom-right", gap: 8 });
5771
+ import { jsx as jsx81 } from "react/jsx-runtime";
5772
+ var Toaster = () => /* @__PURE__ */ jsx81(SonnerToaster, { position: "bottom-right", gap: 8 });
5122
5773
 
5123
5774
  // src/ui/lib/toast.tsx
5124
5775
  import { toast as sonnerToast2 } from "sonner";
5125
5776
 
5126
5777
  // src/ui/components/ui/ToastCard.tsx
5127
5778
  import { toast as sonnerToast } from "sonner";
5128
- import { jsx as jsx66, jsxs as jsxs32 } from "react/jsx-runtime";
5779
+ import { jsx as jsx82, jsxs as jsxs38 } from "react/jsx-runtime";
5129
5780
  var ICON = {
5130
5781
  success: "circle-check",
5131
5782
  error: "circle-xmark",
@@ -5167,7 +5818,7 @@ var ToastCard = ({
5167
5818
  title,
5168
5819
  message,
5169
5820
  timeOut
5170
- }) => /* @__PURE__ */ jsxs32(
5821
+ }) => /* @__PURE__ */ jsxs38(
5171
5822
  Layout,
5172
5823
  {
5173
5824
  role: "status",
@@ -5179,14 +5830,14 @@ var ToastCard = ({
5179
5830
  ACCENT_BORDER[type]
5180
5831
  ),
5181
5832
  children: [
5182
- /* @__PURE__ */ jsx66(
5833
+ /* @__PURE__ */ jsx82(
5183
5834
  "span",
5184
5835
  {
5185
5836
  className: cn(
5186
5837
  "flex h-7 w-7 shrink-0 items-center justify-center rounded-full",
5187
5838
  ACCENT_BG[type]
5188
5839
  ),
5189
- children: /* @__PURE__ */ jsx66(
5840
+ children: /* @__PURE__ */ jsx82(
5190
5841
  FaIcon,
5191
5842
  {
5192
5843
  name: ICON[type],
@@ -5199,21 +5850,21 @@ var ToastCard = ({
5199
5850
  )
5200
5851
  }
5201
5852
  ),
5202
- /* @__PURE__ */ jsxs32(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
5203
- title && /* @__PURE__ */ jsx66("p", { className: "text-sm font-bold text-neutral-800", children: title }),
5204
- /* @__PURE__ */ jsx66("p", { className: "text-sm text-neutral-800", children: message })
5853
+ /* @__PURE__ */ jsxs38(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
5854
+ title && /* @__PURE__ */ jsx82("p", { className: "text-sm font-bold text-neutral-800", children: title }),
5855
+ /* @__PURE__ */ jsx82("p", { className: "text-sm text-neutral-800", children: message })
5205
5856
  ] }),
5206
- /* @__PURE__ */ jsx66(
5857
+ /* @__PURE__ */ jsx82(
5207
5858
  "button",
5208
5859
  {
5209
5860
  type: "button",
5210
5861
  "aria-label": "Fermer",
5211
5862
  onClick: () => sonnerToast.dismiss(id),
5212
5863
  className: "absolute right-2.5 top-2.5 text-grey-500 hover:text-neutral-800",
5213
- children: /* @__PURE__ */ jsx66(FaIcon, { name: "xmark", size: 14 })
5864
+ children: /* @__PURE__ */ jsx82(FaIcon, { name: "xmark", size: 14 })
5214
5865
  }
5215
5866
  ),
5216
- type !== "loading" && /* @__PURE__ */ jsx66(
5867
+ type !== "loading" && /* @__PURE__ */ jsx82(
5217
5868
  "div",
5218
5869
  {
5219
5870
  className: cn(
@@ -5228,13 +5879,13 @@ var ToastCard = ({
5228
5879
  );
5229
5880
 
5230
5881
  // src/ui/lib/toast.tsx
5231
- import { jsx as jsx67 } from "react/jsx-runtime";
5882
+ import { jsx as jsx83 } from "react/jsx-runtime";
5232
5883
  var DEFAULT_TIMEOUT = 4e3;
5233
5884
  var show = (type, message, options) => {
5234
5885
  var _a;
5235
5886
  const timeOut = type === "loading" ? Infinity : (_a = options == null ? void 0 : options.timeOut) != null ? _a : DEFAULT_TIMEOUT;
5236
5887
  return sonnerToast2.custom(
5237
- (id) => /* @__PURE__ */ jsx67(
5888
+ (id) => /* @__PURE__ */ jsx83(
5238
5889
  ToastCard,
5239
5890
  {
5240
5891
  id,
@@ -5274,7 +5925,7 @@ var toast = {
5274
5925
  // src/ui/components/ui/PageContainer.tsx
5275
5926
  import { forwardRef as forwardRef32 } from "react";
5276
5927
  import { cva as cva14 } from "class-variance-authority";
5277
- import { jsx as jsx68 } from "react/jsx-runtime";
5928
+ import { jsx as jsx84 } from "react/jsx-runtime";
5278
5929
  var pageContainerVariants = cva14(
5279
5930
  "flex h-full w-full flex-col overflow-auto rounded-[10px] bg-grey-200 shadow-[0_1px_4px_rgba(0,0,0,0.16)]",
5280
5931
  {
@@ -5292,7 +5943,7 @@ var pageContainerVariants = cva14(
5292
5943
  var PageContainer = forwardRef32(
5293
5944
  (_a, ref) => {
5294
5945
  var _b = _a, { padding, className } = _b, props = __objRest(_b, ["padding", "className"]);
5295
- return /* @__PURE__ */ jsx68(
5946
+ return /* @__PURE__ */ jsx84(
5296
5947
  "div",
5297
5948
  __spreadValues({
5298
5949
  ref,
@@ -5304,8 +5955,8 @@ var PageContainer = forwardRef32(
5304
5955
  PageContainer.displayName = "PageContainer";
5305
5956
 
5306
5957
  // src/ui/components/ui/IconTabs.tsx
5307
- import { useCallback as useCallback2, useEffect as useEffect7, useRef as useRef8, useState as useState10 } from "react";
5308
- import { jsx as jsx69, jsxs as jsxs33 } from "react/jsx-runtime";
5958
+ import { useCallback as useCallback3, useEffect as useEffect7, useRef as useRef10, useState as useState11 } from "react";
5959
+ import { jsx as jsx85, jsxs as jsxs39 } from "react/jsx-runtime";
5309
5960
  var IconTabs = ({
5310
5961
  items,
5311
5962
  value,
@@ -5314,10 +5965,10 @@ var IconTabs = ({
5314
5965
  className
5315
5966
  }) => {
5316
5967
  var _a;
5317
- const listRef = useRef8(null);
5318
- const tabRefs = useRef8([]);
5319
- const [bar, setBar] = useState10({ left: 0, top: 0, width: 0, height: 0 });
5320
- const updateBar = useCallback2(() => {
5968
+ const listRef = useRef10(null);
5969
+ const tabRefs = useRef10([]);
5970
+ const [bar, setBar] = useState11({ left: 0, top: 0, width: 0, height: 0 });
5971
+ const updateBar = useCallback3(() => {
5321
5972
  const root = listRef.current;
5322
5973
  const activeEl = tabRefs.current[value];
5323
5974
  if (!root || !activeEl) return;
@@ -5336,8 +5987,8 @@ var IconTabs = ({
5336
5987
  if (listRef.current) ro.observe(listRef.current);
5337
5988
  return () => ro.disconnect();
5338
5989
  }, [updateBar]);
5339
- return /* @__PURE__ */ jsxs33(Layout, { column: true, className, children: [
5340
- /* @__PURE__ */ jsxs33(
5990
+ return /* @__PURE__ */ jsxs39(Layout, { column: true, className, children: [
5991
+ /* @__PURE__ */ jsxs39(
5341
5992
  Layout,
5342
5993
  {
5343
5994
  ref: listRef,
@@ -5346,7 +5997,7 @@ var IconTabs = ({
5346
5997
  gap: 1,
5347
5998
  className: "relative rounded-[5px] bg-grey-100 p-1",
5348
5999
  children: [
5349
- /* @__PURE__ */ jsx69(
6000
+ /* @__PURE__ */ jsx85(
5350
6001
  "div",
5351
6002
  {
5352
6003
  className: "absolute rounded-[5px] bg-blue-50 transition-all duration-300",
@@ -5362,7 +6013,7 @@ var IconTabs = ({
5362
6013
  var _a2;
5363
6014
  const disabled = disabledIndexes.includes(index);
5364
6015
  const active = value === index;
5365
- return /* @__PURE__ */ jsxs33(
6016
+ return /* @__PURE__ */ jsxs39(
5366
6017
  "button",
5367
6018
  {
5368
6019
  type: "button",
@@ -5379,14 +6030,14 @@ var IconTabs = ({
5379
6030
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
5380
6031
  ),
5381
6032
  children: [
5382
- /* @__PURE__ */ jsx69(
6033
+ /* @__PURE__ */ jsx85(
5383
6034
  "i",
5384
6035
  {
5385
6036
  className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
5386
6037
  style: { fontSize: 16 }
5387
6038
  }
5388
6039
  ),
5389
- item.caption && /* @__PURE__ */ jsx69(
6040
+ item.caption && /* @__PURE__ */ jsx85(
5390
6041
  "span",
5391
6042
  {
5392
6043
  className: cn(
@@ -5404,13 +6055,13 @@ var IconTabs = ({
5404
6055
  ]
5405
6056
  }
5406
6057
  ),
5407
- ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ jsx69("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
6058
+ ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ jsx85("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
5408
6059
  ] });
5409
6060
  };
5410
6061
 
5411
6062
  // src/ui/components/ui/Banner.tsx
5412
6063
  import { cva as cva15 } from "class-variance-authority";
5413
- import { jsx as jsx70, jsxs as jsxs34 } from "react/jsx-runtime";
6064
+ import { jsx as jsx86, jsxs as jsxs40 } from "react/jsx-runtime";
5414
6065
  var bannerVariants = cva15("rounded-[6px] px-4 py-2", {
5415
6066
  variants: {
5416
6067
  theme: {
@@ -5431,7 +6082,7 @@ var bannerVariants = cva15("rounded-[6px] px-4 py-2", {
5431
6082
  },
5432
6083
  defaultVariants: { theme: "blue-700" }
5433
6084
  });
5434
- var TEXT_CLASS = {
6085
+ var TEXT_CLASS2 = {
5435
6086
  "blue-700": "text-blue-900",
5436
6087
  "blue-900": "text-blue-900",
5437
6088
  "blue-950": "text-blue-900",
@@ -5466,15 +6117,15 @@ var Banner = ({
5466
6117
  className
5467
6118
  }) => {
5468
6119
  const align = textAlignByJustify[justify];
5469
- const textClass = TEXT_CLASS[theme != null ? theme : "blue-700"];
5470
- const content = children ? children : message ? /* @__PURE__ */ jsx70(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ jsxs34(Layout, { column: true, align: justify, gap: 1, children: [
5471
- /* @__PURE__ */ jsxs34(Layout, { align: "center", gap: 2, children: [
5472
- badge && /* @__PURE__ */ jsx70(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
5473
- title && /* @__PURE__ */ jsx70(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
6120
+ const textClass = TEXT_CLASS2[theme != null ? theme : "blue-700"];
6121
+ const content = children ? children : message ? /* @__PURE__ */ jsx86(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ jsxs40(Layout, { column: true, align: justify, gap: 1, children: [
6122
+ /* @__PURE__ */ jsxs40(Layout, { align: "center", gap: 2, children: [
6123
+ badge && /* @__PURE__ */ jsx86(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
6124
+ title && /* @__PURE__ */ jsx86(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
5474
6125
  ] }),
5475
- subtitle && /* @__PURE__ */ jsx70(Text, { size: "xs", align, className: textClass, children: subtitle })
6126
+ subtitle && /* @__PURE__ */ jsx86(Text, { size: "xs", align, className: textClass, children: subtitle })
5476
6127
  ] });
5477
- return /* @__PURE__ */ jsxs34(
6128
+ return /* @__PURE__ */ jsxs40(
5478
6129
  Layout,
5479
6130
  {
5480
6131
  role: "alert",
@@ -5485,15 +6136,15 @@ var Banner = ({
5485
6136
  width,
5486
6137
  className: cn(bannerVariants({ theme }), className),
5487
6138
  children: [
5488
- justify === "start" ? content : /* @__PURE__ */ jsx70(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
5489
- toggle ? /* @__PURE__ */ jsx70(
6139
+ justify === "start" ? content : /* @__PURE__ */ jsx86(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
6140
+ toggle ? /* @__PURE__ */ jsx86(
5490
6141
  Switch,
5491
6142
  {
5492
6143
  checked: toggle.checked,
5493
6144
  onChange: toggle.onChange,
5494
6145
  disabled: toggle.disabled
5495
6146
  }
5496
- ) : action && /* @__PURE__ */ jsxs34(
6147
+ ) : action && /* @__PURE__ */ jsxs40(
5497
6148
  Button,
5498
6149
  {
5499
6150
  variant: "outline",
@@ -5513,11 +6164,11 @@ var Banner = ({
5513
6164
 
5514
6165
  // src/ui/components/ui/FloatingButton.tsx
5515
6166
  import {
5516
- useCallback as useCallback3,
6167
+ useCallback as useCallback4,
5517
6168
  useEffect as useEffect8,
5518
6169
  useLayoutEffect,
5519
- useRef as useRef9,
5520
- useState as useState11
6170
+ useRef as useRef11,
6171
+ useState as useState12
5521
6172
  } from "react";
5522
6173
 
5523
6174
  // src/ui/lib/floatingArc.ts
@@ -5610,7 +6261,7 @@ var resolveArcPlacement = (request) => {
5610
6261
  };
5611
6262
 
5612
6263
  // src/ui/components/ui/FloatingButton.tsx
5613
- import { jsx as jsx71, jsxs as jsxs35 } from "react/jsx-runtime";
6264
+ import { jsx as jsx87, jsxs as jsxs41 } from "react/jsx-runtime";
5614
6265
  var readStoredOffset = (key) => {
5615
6266
  if (!key || typeof window === "undefined") return { x: 0, y: 0 };
5616
6267
  try {
@@ -5672,20 +6323,20 @@ var FloatingButton = ({
5672
6323
  safeArea,
5673
6324
  onOffsetChange
5674
6325
  }) => {
5675
- const containerRef = useRef9(null);
5676
- const [placement, setPlacement] = useState11(() => ({
6326
+ const containerRef = useRef11(null);
6327
+ const [placement, setPlacement] = useState12(() => ({
5677
6328
  geometry: __spreadValues({ base: 90 }, arcLayout(actions.length, ARC_RADIUS, SUB_SIZE)),
5678
6329
  shift: { x: 0, y: 0 }
5679
6330
  }));
5680
- const [isDragging, setIsDragging] = useState11(false);
5681
- const [offset, setOffset] = useState11(() => readStoredOffset(persistKey));
5682
- const offsetRef = useRef9(offset);
5683
- const lastPointRef = useRef9({ x: 0, y: 0 });
5684
- const dragDistanceRef = useRef9(0);
6331
+ const [isDragging, setIsDragging] = useState12(false);
6332
+ const [offset, setOffset] = useState12(() => readStoredOffset(persistKey));
6333
+ const offsetRef = useRef11(offset);
6334
+ const lastPointRef = useRef11({ x: 0, y: 0 });
6335
+ const dragDistanceRef = useRef11(0);
5685
6336
  useEffect8(() => {
5686
6337
  onOffsetChange == null ? void 0 : onOffsetChange(offset);
5687
6338
  }, [offset, onOffsetChange]);
5688
- const clampOffset = useCallback3(
6339
+ const clampOffset = useCallback4(
5689
6340
  (next) => {
5690
6341
  var _a, _b, _c, _d;
5691
6342
  const el = containerRef.current;
@@ -5748,7 +6399,7 @@ var FloatingButton = ({
5748
6399
  window.removeEventListener("pointercancel", endDrag);
5749
6400
  };
5750
6401
  }, [draggable, isDragging, persistKey, clampOffset]);
5751
- const resolvePlacement = useCallback3(() => {
6402
+ const resolvePlacement = useCallback4(() => {
5752
6403
  var _a, _b, _c, _d;
5753
6404
  const el = containerRef.current;
5754
6405
  if (!el || typeof window === "undefined") return;
@@ -5808,7 +6459,7 @@ var FloatingButton = ({
5808
6459
  const { itemSize } = placement.geometry;
5809
6460
  const translateX = offset.x + (isOpen ? placement.shift.x : 0);
5810
6461
  const translateY = offset.y + (isOpen ? placement.shift.y : 0);
5811
- return /* @__PURE__ */ jsxs35(
6462
+ return /* @__PURE__ */ jsxs41(
5812
6463
  "div",
5813
6464
  {
5814
6465
  ref: containerRef,
@@ -5826,7 +6477,7 @@ var FloatingButton = ({
5826
6477
  actions.map((action, index) => {
5827
6478
  var _a;
5828
6479
  const itemOffset = arcOffset(index, actions.length, placement.geometry);
5829
- return /* @__PURE__ */ jsxs35(
6480
+ return /* @__PURE__ */ jsxs41(
5830
6481
  "button",
5831
6482
  {
5832
6483
  type: "button",
@@ -5844,14 +6495,14 @@ var FloatingButton = ({
5844
6495
  transform: isOpen ? `translate(${itemOffset.x}px, ${itemOffset.y}px)` : "scale(0.4)"
5845
6496
  },
5846
6497
  children: [
5847
- /* @__PURE__ */ jsx71("span", { className: SUB_ICON[color], children: action.icon }),
5848
- ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ jsx71("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 })
6498
+ /* @__PURE__ */ jsx87("span", { className: SUB_ICON[color], children: action.icon }),
6499
+ ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ jsx87("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 })
5849
6500
  ]
5850
6501
  },
5851
6502
  action.id
5852
6503
  );
5853
6504
  }),
5854
- /* @__PURE__ */ jsxs35(
6505
+ /* @__PURE__ */ jsxs41(
5855
6506
  "button",
5856
6507
  {
5857
6508
  type: "button",
@@ -5868,8 +6519,8 @@ var FloatingButton = ({
5868
6519
  touchAction: draggable ? "none" : void 0
5869
6520
  },
5870
6521
  children: [
5871
- isOpen ? /* @__PURE__ */ jsx71(FaIcon, { name: "xmark", size: 20 }) : icon,
5872
- !isOpen && mainBadge > 0 && /* @__PURE__ */ jsx71("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 })
6522
+ isOpen ? /* @__PURE__ */ jsx87(FaIcon, { name: "xmark", size: 20 }) : icon,
6523
+ !isOpen && mainBadge > 0 && /* @__PURE__ */ jsx87("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 })
5873
6524
  ]
5874
6525
  }
5875
6526
  )
@@ -5879,8 +6530,8 @@ var FloatingButton = ({
5879
6530
  };
5880
6531
 
5881
6532
  // src/ui/components/ui/ActivityFeedPanel.tsx
5882
- import { useEffect as useEffect9, useRef as useRef10, useState as useState12 } from "react";
5883
- import { jsx as jsx72, jsxs as jsxs36 } from "react/jsx-runtime";
6533
+ import { useEffect as useEffect9, useRef as useRef12, useState as useState13 } from "react";
6534
+ import { jsx as jsx88, jsxs as jsxs42 } from "react/jsx-runtime";
5884
6535
  var PANEL_WIDTH = 500;
5885
6536
  var PANEL_MAX_HEIGHT = 750;
5886
6537
  var GAP = 8;
@@ -5914,8 +6565,8 @@ var ActivityFeedPanel = ({
5914
6565
  emptyMessage = "Rien de neuf pour l\u2019instant.",
5915
6566
  items
5916
6567
  }) => {
5917
- const panelRef = useRef10(null);
5918
- const [placement, setPlacement] = useState12(
6568
+ const panelRef = useRef12(null);
6569
+ const [placement, setPlacement] = useState13(
5919
6570
  () => typeof window === "undefined" ? {} : resolveFloatingPanelPlacement(
5920
6571
  offset,
5921
6572
  window.innerWidth,
@@ -5947,7 +6598,7 @@ var ActivityFeedPanel = ({
5947
6598
  return () => window.removeEventListener("resize", recompute);
5948
6599
  }, [open, offset]);
5949
6600
  if (!open) return null;
5950
- return /* @__PURE__ */ jsxs36(
6601
+ return /* @__PURE__ */ jsxs42(
5951
6602
  Layout,
5952
6603
  {
5953
6604
  ref: panelRef,
@@ -5955,7 +6606,7 @@ var ActivityFeedPanel = ({
5955
6606
  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)]",
5956
6607
  style: __spreadProps(__spreadValues({}, placement), { maxHeight: PANEL_MAX_HEIGHT }),
5957
6608
  children: [
5958
- /* @__PURE__ */ jsxs36(
6609
+ /* @__PURE__ */ jsxs42(
5959
6610
  Layout,
5960
6611
  {
5961
6612
  align: "center",
@@ -5963,12 +6614,12 @@ var ActivityFeedPanel = ({
5963
6614
  padding: 4,
5964
6615
  className: "border-b border-grey-200",
5965
6616
  children: [
5966
- /* @__PURE__ */ jsx72(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
5967
- /* @__PURE__ */ jsx72(Text, { size: "s", weight: "bold", children: title })
6617
+ /* @__PURE__ */ jsx88(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
6618
+ /* @__PURE__ */ jsx88(Text, { size: "s", weight: "bold", children: title })
5968
6619
  ]
5969
6620
  }
5970
6621
  ),
5971
- /* @__PURE__ */ jsx72(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ jsx72(
6622
+ /* @__PURE__ */ jsx88(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ jsx88(
5972
6623
  "div",
5973
6624
  {
5974
6625
  style: {
@@ -5979,10 +6630,10 @@ var ActivityFeedPanel = ({
5979
6630
  scrollbarWidth: "none"
5980
6631
  },
5981
6632
  className: "[&::-webkit-scrollbar]:hidden",
5982
- children: /* @__PURE__ */ jsxs36(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
5983
- isLoading && /* @__PURE__ */ jsx72(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ jsx72(Spinner, {}) }),
5984
- !isLoading && items.length === 0 && /* @__PURE__ */ jsx72(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
5985
- items.map((item) => /* @__PURE__ */ jsxs36(
6633
+ children: /* @__PURE__ */ jsxs42(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
6634
+ isLoading && /* @__PURE__ */ jsx88(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ jsx88(Spinner, {}) }),
6635
+ !isLoading && items.length === 0 && /* @__PURE__ */ jsx88(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
6636
+ items.map((item) => /* @__PURE__ */ jsxs42(
5986
6637
  Layout,
5987
6638
  {
5988
6639
  gap: 3,
@@ -5990,7 +6641,7 @@ var ActivityFeedPanel = ({
5990
6641
  className: "cursor-pointer items-start rounded-[8px] p-2 hover:bg-grey-100",
5991
6642
  onClick: item.onClick,
5992
6643
  children: [
5993
- /* @__PURE__ */ jsx72(
6644
+ /* @__PURE__ */ jsx88(
5994
6645
  IconBadge,
5995
6646
  {
5996
6647
  name: item.icon,
@@ -5999,297 +6650,125 @@ var ActivityFeedPanel = ({
5999
6650
  iconColor: item.iconColor
6000
6651
  }
6001
6652
  ),
6002
- /* @__PURE__ */ jsxs36(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
6003
- /* @__PURE__ */ jsx72(Text, { size: "xs", children: item.text }),
6004
- /* @__PURE__ */ jsx72(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
6653
+ /* @__PURE__ */ jsxs42(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
6654
+ /* @__PURE__ */ jsx88(Text, { size: "xs", children: item.text }),
6655
+ /* @__PURE__ */ jsx88(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
6005
6656
  ] })
6006
6657
  ]
6007
6658
  },
6008
- item.id
6009
- ))
6010
- ] })
6011
- }
6012
- ) })
6013
- ]
6014
- }
6015
- );
6016
- };
6017
-
6018
- // src/ui/components/ui/MetricCard.tsx
6019
- import { jsx as jsx73, jsxs as jsxs37 } from "react/jsx-runtime";
6020
- var ICON_WRAP_CLASS = {
6021
- "blue-700": "bg-blue-50 text-blue-700",
6022
- "blue-900": "bg-blue-50 text-blue-900",
6023
- "blue-950": "bg-blue-50 text-blue-950",
6024
- "red-900": "bg-red-50 text-red-900",
6025
- "red-500": "bg-red-50 text-red-500",
6026
- "green-700": "bg-green-50 text-green-700",
6027
- "green-100": "bg-green-50 text-green-100",
6028
- "grey-600": "bg-grey-100 text-grey-600",
6029
- "yellow-500": "bg-yellow-50 text-yellow-500",
6030
- "yellow-300": "bg-yellow-50 text-yellow-300",
6031
- "yellow-200": "bg-yellow-50 text-yellow-200",
6032
- "orange-600": "bg-orange-50 text-orange-600",
6033
- "purple-700": "bg-purple-50 text-purple-700"
6034
- };
6035
- var MetricCard = ({
6036
- icon,
6037
- iconFamily = "regular",
6038
- title,
6039
- value,
6040
- valueColor = "grey-600",
6041
- subtitle,
6042
- accent = "blue-950",
6043
- layout = "column",
6044
- onClick,
6045
- selected = false,
6046
- children,
6047
- className
6048
- }) => /* @__PURE__ */ jsx73(
6049
- "div",
6050
- {
6051
- onClick,
6052
- className: cn(
6053
- "flex-1 rounded-[6px] border border-grey-300 bg-white p-3",
6054
- onClick && "cursor-pointer",
6055
- selected && "border-blue-700",
6056
- className
6057
- ),
6058
- children: /* @__PURE__ */ jsxs37(Layout, { align: "center", gap: 3, fullWidth: true, children: [
6059
- /* @__PURE__ */ jsx73(
6060
- "span",
6061
- {
6062
- className: cn(
6063
- "flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
6064
- ICON_WRAP_CLASS[accent]
6065
- ),
6066
- children: /* @__PURE__ */ jsx73("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
6067
- }
6068
- ),
6069
- children ? children : layout === "row" ? /* @__PURE__ */ jsxs37(Layout, { align: "center", gap: 1, children: [
6070
- /* @__PURE__ */ jsx73(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6071
- /* @__PURE__ */ jsx73(Text, { size: "s", color: "grey-600", children: title })
6072
- ] }) : /* @__PURE__ */ jsxs37(Layout, { column: true, gap: 1, children: [
6073
- /* @__PURE__ */ jsx73(Text, { size: "s", color: "grey-600", children: title }),
6074
- /* @__PURE__ */ jsxs37(Layout, { align: "baseline", gap: 1, children: [
6075
- /* @__PURE__ */ jsx73(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6076
- subtitle && /* @__PURE__ */ jsx73(Text, { size: "xs", color: "grey-600", children: subtitle })
6077
- ] })
6078
- ] })
6079
- ] })
6080
- }
6081
- );
6082
-
6083
- // src/ui/components/ui/Tile.tsx
6084
- import { jsx as jsx74, jsxs as jsxs38 } from "react/jsx-runtime";
6085
- var Tile = ({
6086
- children,
6087
- onClick,
6088
- selected = false,
6089
- variant = "outline",
6090
- expandedContent,
6091
- className
6092
- }) => {
6093
- const isOutline = variant === "outline";
6094
- return /* @__PURE__ */ jsxs38(
6095
- "div",
6096
- {
6097
- className: cn(
6098
- "w-full overflow-hidden rounded-[6px]",
6099
- isOutline && "border bg-white",
6100
- isOutline && (selected ? "border-blue-700 ring-1 ring-blue-700" : "border-grey-200"),
6101
- !isOutline && selected && "bg-blue-50",
6102
- className
6103
- ),
6104
- children: [
6105
- onClick ? /* @__PURE__ */ jsx74(
6106
- "button",
6107
- {
6108
- type: "button",
6109
- "aria-pressed": selected,
6110
- onClick,
6111
- className: cn(
6112
- "block w-full cursor-pointer border-0 bg-transparent p-0 text-left outline-none transition-colors",
6113
- "hover:bg-black/[0.025] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-200"
6114
- ),
6115
- children
6116
- }
6117
- ) : children,
6118
- expandedContent && /* @__PURE__ */ jsx74("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
6119
- ]
6120
- }
6121
- );
6122
- };
6123
-
6124
- // src/ui/components/ui/Skeleton.tsx
6125
- import { jsx as jsx75 } from "react/jsx-runtime";
6126
- var toCss = (value) => typeof value === "number" ? `${value}px` : value;
6127
- var Skeleton = (_a) => {
6128
- var _b = _a, {
6129
- width,
6130
- height,
6131
- isRound = false,
6132
- className,
6133
- style
6134
- } = _b, props = __objRest(_b, [
6135
- "width",
6136
- "height",
6137
- "isRound",
6138
- "className",
6139
- "style"
6140
- ]);
6141
- return /* @__PURE__ */ jsx75(
6142
- "div",
6143
- __spreadValues({
6144
- className: cn(
6145
- "animate-pulse bg-grey-200",
6146
- isRound ? "rounded-full" : "rounded-md",
6147
- className
6148
- ),
6149
- style: __spreadValues({ width: toCss(width), height: toCss(height) }, style)
6150
- }, props)
6151
- );
6152
- };
6153
-
6154
- // src/ui/components/ui/TagBubble.tsx
6155
- import * as RadixToggle from "@radix-ui/react-toggle";
6156
- import { jsx as jsx76, jsxs as jsxs39 } from "react/jsx-runtime";
6157
- var DOT_CLASS = {
6158
- "blue-700": "bg-blue-700",
6159
- "blue-900": "bg-blue-900",
6160
- "blue-950": "bg-blue-950",
6161
- "red-900": "bg-red-900",
6162
- "red-500": "bg-red-500",
6163
- "green-700": "bg-green-700",
6164
- "green-100": "bg-green-100",
6165
- "grey-600": "bg-grey-400",
6166
- "yellow-500": "bg-yellow-500",
6167
- "yellow-300": "bg-yellow-300",
6168
- "yellow-200": "bg-yellow-200",
6169
- "orange-600": "bg-orange-600",
6170
- "purple-700": "bg-purple-700"
6171
- };
6172
- var LIGHT_BG_CLASS = {
6173
- "blue-700": "bg-blue-50",
6174
- "blue-900": "bg-blue-50",
6175
- "blue-950": "bg-blue-50",
6176
- "red-900": "bg-red-50",
6177
- "red-500": "bg-red-50",
6178
- "green-700": "bg-green-50",
6179
- "green-100": "bg-green-50",
6180
- "grey-600": "bg-grey-100",
6181
- "yellow-500": "bg-yellow-50",
6182
- "yellow-300": "bg-yellow-50",
6183
- "yellow-200": "bg-yellow-50",
6184
- "orange-600": "bg-orange-50",
6185
- "purple-700": "bg-purple-50"
6186
- };
6187
- var TEXT_CLASS2 = {
6188
- "blue-700": "text-blue-700",
6189
- "blue-900": "text-blue-900",
6190
- "blue-950": "text-blue-950",
6191
- "red-900": "text-red-900",
6192
- "red-500": "text-red-500",
6193
- "green-700": "text-green-700",
6194
- "green-100": "text-green-100",
6195
- "grey-600": "text-grey-600",
6196
- "yellow-500": "text-yellow-500",
6197
- "yellow-300": "text-yellow-300",
6198
- "yellow-200": "text-yellow-200",
6199
- "orange-600": "text-orange-600",
6200
- "purple-700": "text-purple-700"
6659
+ item.id
6660
+ ))
6661
+ ] })
6662
+ }
6663
+ ) })
6664
+ ]
6665
+ }
6666
+ );
6201
6667
  };
6202
- var BORDER_CLASS = {
6203
- "blue-700": "border-blue-700",
6204
- "blue-900": "border-blue-900",
6205
- "blue-950": "border-blue-950",
6206
- "red-900": "border-red-900",
6207
- "red-500": "border-red-500",
6208
- "green-700": "border-green-700",
6209
- "green-100": "border-green-100",
6210
- "grey-600": "border-grey-600",
6211
- "yellow-500": "border-yellow-500",
6212
- "yellow-300": "border-yellow-300",
6213
- "yellow-200": "border-yellow-200",
6214
- "orange-600": "border-orange-600",
6215
- "purple-700": "border-purple-700"
6668
+
6669
+ // src/ui/components/ui/MetricCard.tsx
6670
+ import { jsx as jsx89, jsxs as jsxs43 } from "react/jsx-runtime";
6671
+ var ICON_WRAP_CLASS = {
6672
+ "blue-700": "bg-blue-50 text-blue-700",
6673
+ "blue-900": "bg-blue-50 text-blue-900",
6674
+ "blue-950": "bg-blue-50 text-blue-950",
6675
+ "red-900": "bg-red-50 text-red-900",
6676
+ "red-500": "bg-red-50 text-red-500",
6677
+ "green-700": "bg-green-50 text-green-700",
6678
+ "green-100": "bg-green-50 text-green-100",
6679
+ "grey-600": "bg-grey-100 text-grey-600",
6680
+ "yellow-500": "bg-yellow-50 text-yellow-500",
6681
+ "yellow-300": "bg-yellow-50 text-yellow-300",
6682
+ "yellow-200": "bg-yellow-50 text-yellow-200",
6683
+ "orange-600": "bg-orange-50 text-orange-600",
6684
+ "purple-700": "bg-purple-50 text-purple-700"
6216
6685
  };
6217
- var isHexColor = (color) => color.startsWith("#");
6218
- var TagBubble = (_a) => {
6219
- var _b = _a, {
6220
- label,
6221
- hideDot = false,
6222
- active = false,
6223
- activeColor = "blue-700",
6224
- inactiveColor = "grey-600",
6225
- activeFill = false,
6226
- pill = false,
6227
- size = "s",
6228
- count,
6229
- countColor = "green-700",
6686
+ var MetricCard = ({
6687
+ icon,
6688
+ iconFamily = "regular",
6689
+ title,
6690
+ value,
6691
+ valueColor = "grey-600",
6692
+ subtitle,
6693
+ accent = "blue-950",
6694
+ layout = "column",
6695
+ onClick,
6696
+ selected = false,
6697
+ children,
6698
+ className
6699
+ }) => /* @__PURE__ */ jsx89(
6700
+ "div",
6701
+ {
6230
6702
  onClick,
6231
- className
6232
- } = _b, rest = __objRest(_b, [
6233
- "label",
6234
- "hideDot",
6235
- "active",
6236
- "activeColor",
6237
- "inactiveColor",
6238
- "activeFill",
6239
- "pill",
6240
- "size",
6241
- "count",
6242
- "countColor",
6243
- "onClick",
6244
- "className"
6245
- ]);
6246
- const showCount = count !== void 0 && count !== null;
6247
- const filled = activeFill && active;
6248
- const dotColor = active ? activeColor : inactiveColor;
6249
- const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
6250
- return /* @__PURE__ */ jsxs39(
6251
- RadixToggle.Root,
6252
- __spreadProps(__spreadValues({}, rest), {
6253
- type: "button",
6254
- pressed: active,
6255
- onClick,
6256
- style: __spreadValues({ borderColor: filledHexColor }, rest.style),
6703
+ className: cn(
6704
+ "flex-1 rounded-[6px] border border-grey-300 bg-white p-3",
6705
+ onClick && "cursor-pointer",
6706
+ selected && "border-blue-700",
6707
+ className
6708
+ ),
6709
+ children: /* @__PURE__ */ jsxs43(Layout, { align: "center", gap: 3, fullWidth: true, children: [
6710
+ /* @__PURE__ */ jsx89(
6711
+ "span",
6712
+ {
6713
+ className: cn(
6714
+ "flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
6715
+ ICON_WRAP_CLASS[accent]
6716
+ ),
6717
+ children: /* @__PURE__ */ jsx89("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
6718
+ }
6719
+ ),
6720
+ children ? children : layout === "row" ? /* @__PURE__ */ jsxs43(Layout, { align: "center", gap: 1, children: [
6721
+ /* @__PURE__ */ jsx89(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6722
+ /* @__PURE__ */ jsx89(Text, { size: "s", color: "grey-600", children: title })
6723
+ ] }) : /* @__PURE__ */ jsxs43(Layout, { column: true, gap: 1, children: [
6724
+ /* @__PURE__ */ jsx89(Text, { size: "s", color: "grey-600", children: title }),
6725
+ /* @__PURE__ */ jsxs43(Layout, { align: "baseline", gap: 1, children: [
6726
+ /* @__PURE__ */ jsx89(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6727
+ subtitle && /* @__PURE__ */ jsx89(Text, { size: "xs", color: "grey-600", children: subtitle })
6728
+ ] })
6729
+ ] })
6730
+ ] })
6731
+ }
6732
+ );
6733
+
6734
+ // src/ui/components/ui/Tile.tsx
6735
+ import { jsx as jsx90, jsxs as jsxs44 } from "react/jsx-runtime";
6736
+ var Tile = ({
6737
+ children,
6738
+ onClick,
6739
+ selected = false,
6740
+ variant = "outline",
6741
+ expandedContent,
6742
+ className
6743
+ }) => {
6744
+ const isOutline = variant === "outline";
6745
+ return /* @__PURE__ */ jsxs44(
6746
+ "div",
6747
+ {
6257
6748
  className: cn(
6258
- "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
6259
- pill ? "rounded-full" : "rounded-[6px]",
6260
- size === "m" && "h-9",
6261
- filled ? cn(
6262
- isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
6263
- "border-2"
6264
- ) : "border-grey-200 bg-white",
6265
- "focus-visible:ring-2 focus-visible:ring-blue-200",
6749
+ "w-full overflow-hidden rounded-[6px]",
6750
+ isOutline && "border bg-white",
6751
+ isOutline && (selected ? "border-blue-700 ring-1 ring-blue-700" : "border-grey-200"),
6752
+ !isOutline && selected && "bg-blue-50",
6266
6753
  className
6267
6754
  ),
6268
6755
  children: [
6269
- !hideDot && /* @__PURE__ */ jsx76(
6270
- "span",
6271
- {
6272
- className: cn(
6273
- "h-2 w-2 shrink-0 rounded-full",
6274
- !isHexColor(dotColor) && DOT_CLASS[dotColor]
6275
- ),
6276
- style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
6277
- }
6278
- ),
6279
- /* @__PURE__ */ jsx76(
6280
- "span",
6756
+ onClick ? /* @__PURE__ */ jsx90(
6757
+ "button",
6281
6758
  {
6759
+ type: "button",
6760
+ "aria-pressed": selected,
6761
+ onClick,
6282
6762
  className: cn(
6283
- "whitespace-nowrap text-xs font-semibold",
6284
- filled ? !isHexColor(activeColor) && TEXT_CLASS2[activeColor] : "text-neutral-800"
6763
+ "block w-full cursor-pointer border-0 bg-transparent p-0 text-left outline-none transition-colors",
6764
+ "hover:bg-black/[0.025] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-200"
6285
6765
  ),
6286
- style: { color: filledHexColor },
6287
- children: label
6766
+ children
6288
6767
  }
6289
- ),
6290
- showCount && /* @__PURE__ */ jsx76(Badge, { theme: countColor, size: "s", children: count })
6768
+ ) : children,
6769
+ expandedContent && /* @__PURE__ */ jsx90("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
6291
6770
  ]
6292
- })
6771
+ }
6293
6772
  );
6294
6773
  };
6295
6774
 
@@ -6442,16 +6921,16 @@ var formatName = (person, fallback = "") => {
6442
6921
  };
6443
6922
 
6444
6923
  // src/ui/components/ui/history/HistoryChangeRow.tsx
6445
- import { jsx as jsx77, jsxs as jsxs40 } from "react/jsx-runtime";
6924
+ import { jsx as jsx91, jsxs as jsxs45 } from "react/jsx-runtime";
6446
6925
  var HistoryChangeRow = ({ change }) => {
6447
6926
  const { label, previousValue, nextValue, href, onClick } = change;
6448
6927
  const hasValues = Boolean(previousValue || nextValue);
6449
- return /* @__PURE__ */ jsxs40(Layout, { align: "center", gap: 1.5, wrap: true, children: [
6450
- /* @__PURE__ */ jsx77(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
6451
- previousValue && /* @__PURE__ */ jsx77(Text, { size: "xs", color: "grey-600", children: previousValue }),
6452
- previousValue && nextValue && /* @__PURE__ */ jsx77(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
6453
- nextValue && href && /* @__PURE__ */ jsx77(Link, { href, newTab: true, size: "xs", children: nextValue }),
6454
- nextValue && onClick && /* @__PURE__ */ jsx77(
6928
+ return /* @__PURE__ */ jsxs45(Layout, { align: "center", gap: 1.5, wrap: true, children: [
6929
+ /* @__PURE__ */ jsx91(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
6930
+ previousValue && /* @__PURE__ */ jsx91(Text, { size: "xs", color: "grey-600", children: previousValue }),
6931
+ previousValue && nextValue && /* @__PURE__ */ jsx91(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
6932
+ nextValue && href && /* @__PURE__ */ jsx91(Link, { href, newTab: true, size: "xs", children: nextValue }),
6933
+ nextValue && onClick && /* @__PURE__ */ jsx91(
6455
6934
  "button",
6456
6935
  {
6457
6936
  type: "button",
@@ -6463,27 +6942,27 @@ var HistoryChangeRow = ({ change }) => {
6463
6942
  children: nextValue
6464
6943
  }
6465
6944
  ),
6466
- nextValue && !href && !onClick && /* @__PURE__ */ jsx77(Text, { size: "xs", weight: "semibold", children: nextValue })
6945
+ nextValue && !href && !onClick && /* @__PURE__ */ jsx91(Text, { size: "xs", weight: "semibold", children: nextValue })
6467
6946
  ] });
6468
6947
  };
6469
6948
 
6470
6949
  // src/ui/components/ui/history/HistoryEntryCard.tsx
6471
- import { Fragment as Fragment6, jsx as jsx78, jsxs as jsxs41 } from "react/jsx-runtime";
6950
+ import { Fragment as Fragment7, jsx as jsx92, jsxs as jsxs46 } from "react/jsx-runtime";
6472
6951
  var CARD_CLASS = "group rounded-lg border border-grey-300 bg-white";
6473
6952
  var HistoryEntryCard = ({ entry }) => {
6474
6953
  const { title, date, author, badge, changes = [] } = entry;
6475
6954
  const hasChanges = changes.length > 0;
6476
- const summary = /* @__PURE__ */ jsxs41(Layout, { column: true, gap: 1, fullWidth: true, children: [
6477
- /* @__PURE__ */ jsxs41(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
6478
- /* @__PURE__ */ jsxs41(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
6479
- author && /* @__PURE__ */ jsxs41(Fragment6, { children: [
6480
- /* @__PURE__ */ jsx78(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
6481
- /* @__PURE__ */ jsx78(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
6955
+ const summary = /* @__PURE__ */ jsxs46(Layout, { column: true, gap: 1, fullWidth: true, children: [
6956
+ /* @__PURE__ */ jsxs46(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
6957
+ /* @__PURE__ */ jsxs46(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
6958
+ author && /* @__PURE__ */ jsxs46(Fragment7, { children: [
6959
+ /* @__PURE__ */ jsx92(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
6960
+ /* @__PURE__ */ jsx92(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
6482
6961
  ] }),
6483
- badge && /* @__PURE__ */ jsx78(Badge, { theme: badge.theme, size: "s", children: badge.label })
6962
+ badge && /* @__PURE__ */ jsx92(Badge, { theme: badge.theme, size: "s", children: badge.label })
6484
6963
  ] }),
6485
- /* @__PURE__ */ jsxs41(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
6486
- date && /* @__PURE__ */ jsx78(
6964
+ /* @__PURE__ */ jsxs46(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
6965
+ date && /* @__PURE__ */ jsx92(
6487
6966
  Text,
6488
6967
  {
6489
6968
  size: "xxs",
@@ -6493,7 +6972,7 @@ var HistoryEntryCard = ({ entry }) => {
6493
6972
  children: formatDate(date, "dateTime", "fr")
6494
6973
  }
6495
6974
  ),
6496
- hasChanges && /* @__PURE__ */ jsx78(
6975
+ hasChanges && /* @__PURE__ */ jsx92(
6497
6976
  Icon,
6498
6977
  {
6499
6978
  name: "chevron-down",
@@ -6504,14 +6983,14 @@ var HistoryEntryCard = ({ entry }) => {
6504
6983
  )
6505
6984
  ] })
6506
6985
  ] }),
6507
- title && /* @__PURE__ */ jsx78(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
6986
+ title && /* @__PURE__ */ jsx92(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
6508
6987
  ] });
6509
6988
  if (!hasChanges) {
6510
- return /* @__PURE__ */ jsx78("div", { className: `${CARD_CLASS} p-3`, children: summary });
6989
+ return /* @__PURE__ */ jsx92("div", { className: `${CARD_CLASS} p-3`, children: summary });
6511
6990
  }
6512
- return /* @__PURE__ */ jsxs41(Collapsible, { className: CARD_CLASS, children: [
6513
- /* @__PURE__ */ jsx78(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
6514
- /* @__PURE__ */ jsx78(CollapsibleContent, { children: /* @__PURE__ */ jsx78(
6991
+ return /* @__PURE__ */ jsxs46(Collapsible, { className: CARD_CLASS, children: [
6992
+ /* @__PURE__ */ jsx92(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
6993
+ /* @__PURE__ */ jsx92(CollapsibleContent, { children: /* @__PURE__ */ jsx92(
6515
6994
  Layout,
6516
6995
  {
6517
6996
  column: true,
@@ -6519,7 +6998,7 @@ var HistoryEntryCard = ({ entry }) => {
6519
6998
  paddingX: 3,
6520
6999
  paddingBottom: 3,
6521
7000
  className: author ? "pl-[64px]" : void 0,
6522
- children: changes.map((change, index) => /* @__PURE__ */ jsx78(
7001
+ children: changes.map((change, index) => /* @__PURE__ */ jsx92(
6523
7002
  HistoryChangeRow,
6524
7003
  {
6525
7004
  change
@@ -6532,7 +7011,7 @@ var HistoryEntryCard = ({ entry }) => {
6532
7011
  };
6533
7012
 
6534
7013
  // src/ui/components/ui/history/HistoryList.tsx
6535
- import { jsx as jsx79, jsxs as jsxs42 } from "react/jsx-runtime";
7014
+ import { jsx as jsx93, jsxs as jsxs47 } from "react/jsx-runtime";
6536
7015
  var SKELETON_COUNT = 4;
6537
7016
  var HistoryList = ({
6538
7017
  entries,
@@ -6544,8 +7023,8 @@ var HistoryList = ({
6544
7023
  emptyLabel = "Aucun historique",
6545
7024
  emptyDescription = "Aucune action enregistr\xE9e pour le moment.",
6546
7025
  notice
6547
- }) => /* @__PURE__ */ jsxs42(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
6548
- filters.length > 0 && /* @__PURE__ */ jsx79(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ jsx79(
7026
+ }) => /* @__PURE__ */ jsxs47(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
7027
+ filters.length > 0 && /* @__PURE__ */ jsx93(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ jsx93(
6549
7028
  TagBubble,
6550
7029
  {
6551
7030
  label: filter.label,
@@ -6556,22 +7035,22 @@ var HistoryList = ({
6556
7035
  },
6557
7036
  filter.value
6558
7037
  )) }),
6559
- isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ jsx79(Skeleton, { height: "72px" }, index)),
6560
- !isLoading && isError && /* @__PURE__ */ jsx79(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
6561
- !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ jsx79(
7038
+ isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ jsx93(Skeleton, { height: "72px" }, index)),
7039
+ !isLoading && isError && /* @__PURE__ */ jsx93(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
7040
+ !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ jsx93(
6562
7041
  EmptyState,
6563
7042
  {
6564
- icon: /* @__PURE__ */ jsx79(FaIcon, { name: "clock-rotate-left", size: 20 }),
7043
+ icon: /* @__PURE__ */ jsx93(FaIcon, { name: "clock-rotate-left", size: 20 }),
6565
7044
  title: emptyLabel,
6566
7045
  description: emptyDescription
6567
7046
  }
6568
7047
  ),
6569
- !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ jsx79(HistoryEntryCard, { entry }, entry.id)),
6570
- !isLoading && !isError && notice && /* @__PURE__ */ jsx79(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
7048
+ !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ jsx93(HistoryEntryCard, { entry }, entry.id)),
7049
+ !isLoading && !isError && notice && /* @__PURE__ */ jsx93(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
6571
7050
  ] });
6572
7051
 
6573
7052
  // src/ui/components/ui/history/HistoryDrawer.tsx
6574
- import { jsx as jsx80, jsxs as jsxs43 } from "react/jsx-runtime";
7053
+ import { jsx as jsx94, jsxs as jsxs48 } from "react/jsx-runtime";
6575
7054
  var HistoryDrawer = (_a) => {
6576
7055
  var _b = _a, {
6577
7056
  open,
@@ -6582,7 +7061,7 @@ var HistoryDrawer = (_a) => {
6582
7061
  "onClose",
6583
7062
  "title"
6584
7063
  ]);
6585
- return /* @__PURE__ */ jsxs43(
7064
+ return /* @__PURE__ */ jsxs48(
6586
7065
  Drawer,
6587
7066
  {
6588
7067
  open,
@@ -6590,9 +7069,9 @@ var HistoryDrawer = (_a) => {
6590
7069
  className: "z-[1060]",
6591
7070
  overlayClassName: "z-[1050]",
6592
7071
  children: [
6593
- /* @__PURE__ */ jsxs43(DrawerHeader, { children: [
6594
- /* @__PURE__ */ jsx80(DrawerTitle, { className: "uppercase", children: title }),
6595
- /* @__PURE__ */ jsx80(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx80(
7072
+ /* @__PURE__ */ jsxs48(DrawerHeader, { children: [
7073
+ /* @__PURE__ */ jsx94(DrawerTitle, { className: "uppercase", children: title }),
7074
+ /* @__PURE__ */ jsx94(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx94(
6596
7075
  Icon,
6597
7076
  {
6598
7077
  name: "xmark",
@@ -6602,15 +7081,15 @@ var HistoryDrawer = (_a) => {
6602
7081
  }
6603
7082
  ) })
6604
7083
  ] }),
6605
- /* @__PURE__ */ jsx80(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ jsx80(HistoryList, __spreadValues({}, listProps)) })
7084
+ /* @__PURE__ */ jsx94(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ jsx94(HistoryList, __spreadValues({}, listProps)) })
6606
7085
  ]
6607
7086
  }
6608
7087
  );
6609
7088
  };
6610
7089
 
6611
7090
  // src/ui/components/ui/history/HistoryButton.tsx
6612
- import { useState as useState13 } from "react";
6613
- import { Fragment as Fragment7, jsx as jsx81, jsxs as jsxs44 } from "react/jsx-runtime";
7091
+ import { useState as useState14 } from "react";
7092
+ import { Fragment as Fragment8, jsx as jsx95, jsxs as jsxs49 } from "react/jsx-runtime";
6614
7093
  var LABEL = "Historique";
6615
7094
  var SHORT_TOOLTIP = "Voir l\u2019historique des actions";
6616
7095
  var HistoryButton = (_a) => {
@@ -6625,16 +7104,16 @@ var HistoryButton = (_a) => {
6625
7104
  "tooltip",
6626
7105
  "onOpenChange"
6627
7106
  ]);
6628
- const [isOpen, setIsOpen] = useState13(false);
7107
+ const [isOpen, setIsOpen] = useState14(false);
6629
7108
  const changeOpen = (nextIsOpen) => {
6630
7109
  setIsOpen(nextIsOpen);
6631
7110
  onOpenChange == null ? void 0 : onOpenChange(nextIsOpen);
6632
7111
  };
6633
7112
  const open = () => changeOpen(true);
6634
- const icon = /* @__PURE__ */ jsx81(FaIcon, { name: "clock-rotate-left", size: 14 });
6635
- return /* @__PURE__ */ jsxs44(Fragment7, { children: [
6636
- variant === "icon" ? /* @__PURE__ */ jsx81(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ jsx81(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ jsx81(Button, { label: LABEL, iconLeft: icon, onClick: open }),
6637
- /* @__PURE__ */ jsx81(
7113
+ const icon = /* @__PURE__ */ jsx95(FaIcon, { name: "clock-rotate-left", size: 14 });
7114
+ return /* @__PURE__ */ jsxs49(Fragment8, { children: [
7115
+ variant === "icon" ? /* @__PURE__ */ jsx95(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ jsx95(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ jsx95(Button, { label: LABEL, iconLeft: icon, onClick: open }),
7116
+ /* @__PURE__ */ jsx95(
6638
7117
  HistoryDrawer,
6639
7118
  __spreadValues({
6640
7119
  open: isOpen,
@@ -6646,7 +7125,7 @@ var HistoryButton = (_a) => {
6646
7125
  };
6647
7126
 
6648
7127
  // src/ui/components/ui/Gantt.tsx
6649
- import { jsx as jsx82, jsxs as jsxs45 } from "react/jsx-runtime";
7128
+ import { jsx as jsx96, jsxs as jsxs50 } from "react/jsx-runtime";
6650
7129
  var Gantt = ({
6651
7130
  days,
6652
7131
  rows,
@@ -6662,7 +7141,7 @@ var Gantt = ({
6662
7141
  const bodyHeight = rows.length * rowHeight;
6663
7142
  const clickable = Boolean(onRowClick);
6664
7143
  const gridCols = { gridTemplateColumns: `${labelWidth}px minmax(0, 1fr)` };
6665
- return /* @__PURE__ */ jsxs45(
7144
+ return /* @__PURE__ */ jsxs50(
6666
7145
  "div",
6667
7146
  {
6668
7147
  className: cn(
@@ -6670,13 +7149,13 @@ var Gantt = ({
6670
7149
  className
6671
7150
  ),
6672
7151
  children: [
6673
- /* @__PURE__ */ jsxs45(
7152
+ /* @__PURE__ */ jsxs50(
6674
7153
  "div",
6675
7154
  {
6676
7155
  className: "grid border-b border-grey-300 bg-grey-100",
6677
7156
  style: gridCols,
6678
7157
  children: [
6679
- /* @__PURE__ */ jsx82(
7158
+ /* @__PURE__ */ jsx96(
6680
7159
  Layout,
6681
7160
  {
6682
7161
  align: "center",
@@ -6684,7 +7163,7 @@ var Gantt = ({
6684
7163
  children: labelHeader
6685
7164
  }
6686
7165
  ),
6687
- /* @__PURE__ */ jsx82("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ jsx82(
7166
+ /* @__PURE__ */ jsx96("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ jsx96(
6688
7167
  Layout,
6689
7168
  {
6690
7169
  fullHeight: true,
@@ -6698,13 +7177,13 @@ var Gantt = ({
6698
7177
  ]
6699
7178
  }
6700
7179
  ),
6701
- /* @__PURE__ */ jsxs45(
7180
+ /* @__PURE__ */ jsxs50(
6702
7181
  "div",
6703
7182
  {
6704
7183
  className: "grid overflow-y-auto overflow-x-hidden",
6705
7184
  style: __spreadProps(__spreadValues({}, gridCols), { maxHeight }),
6706
7185
  children: [
6707
- /* @__PURE__ */ jsx82("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ jsx82(
7186
+ /* @__PURE__ */ jsx96("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ jsx96(
6708
7187
  Layout,
6709
7188
  {
6710
7189
  column: true,
@@ -6721,8 +7200,8 @@ var Gantt = ({
6721
7200
  },
6722
7201
  row.key
6723
7202
  )) }),
6724
- /* @__PURE__ */ jsx82("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ jsxs45("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
6725
- days.map((day, i) => /* @__PURE__ */ jsx82(
7203
+ /* @__PURE__ */ jsx96("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ jsxs50("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
7204
+ days.map((day, i) => /* @__PURE__ */ jsx96(
6726
7205
  "div",
6727
7206
  {
6728
7207
  className: cn(
@@ -6733,7 +7212,7 @@ var Gantt = ({
6733
7212
  },
6734
7213
  day.key
6735
7214
  )),
6736
- bands.map((band) => /* @__PURE__ */ jsx82(
7215
+ bands.map((band) => /* @__PURE__ */ jsx96(
6737
7216
  "div",
6738
7217
  {
6739
7218
  title: band.title,
@@ -6744,7 +7223,7 @@ var Gantt = ({
6744
7223
  )),
6745
7224
  rows.map((row, i) => {
6746
7225
  var _a, _b, _c;
6747
- return /* @__PURE__ */ jsx82(
7226
+ return /* @__PURE__ */ jsx96(
6748
7227
  "div",
6749
7228
  {
6750
7229
  className: cn(
@@ -6752,7 +7231,7 @@ var Gantt = ({
6752
7231
  i === 0 ? "border-t-0" : "border-t border-grey-200"
6753
7232
  ),
6754
7233
  style: { top: i * rowHeight, height: rowHeight },
6755
- children: row.bar && /* @__PURE__ */ jsx82(
7234
+ children: row.bar && /* @__PURE__ */ jsx96(
6756
7235
  Layout,
6757
7236
  {
6758
7237
  align: "center",
@@ -6767,7 +7246,7 @@ var Gantt = ({
6767
7246
  background: row.bar.color,
6768
7247
  borderColor: row.bar.color
6769
7248
  },
6770
- children: row.bar.label && /* @__PURE__ */ jsx82(
7249
+ children: row.bar.label && /* @__PURE__ */ jsx96(
6771
7250
  "span",
6772
7251
  {
6773
7252
  className: "overflow-hidden text-ellipsis whitespace-nowrap text-[10px] font-semibold",
@@ -6789,7 +7268,7 @@ var Gantt = ({
6789
7268
  }
6790
7269
  );
6791
7270
  };
6792
- var GanttDot = ({ color }) => /* @__PURE__ */ jsx82(
7271
+ var GanttDot = ({ color }) => /* @__PURE__ */ jsx96(
6793
7272
  "span",
6794
7273
  {
6795
7274
  className: "inline-block h-[9px] w-[9px] shrink-0 rounded-[3px]",
@@ -6799,7 +7278,7 @@ var GanttDot = ({ color }) => /* @__PURE__ */ jsx82(
6799
7278
  var GanttSwatch = ({
6800
7279
  color,
6801
7280
  filled = true
6802
- }) => /* @__PURE__ */ jsx82(
7281
+ }) => /* @__PURE__ */ jsx96(
6803
7282
  "span",
6804
7283
  {
6805
7284
  className: "box-border inline-block h-3 w-[18px] shrink-0 rounded-[3px] border-[1.5px]",
@@ -6807,108 +7286,8 @@ var GanttSwatch = ({
6807
7286
  }
6808
7287
  );
6809
7288
 
6810
- // src/ui/components/ui/Bulk.tsx
6811
- import { jsx as jsx83, jsxs as jsxs46 } from "react/jsx-runtime";
6812
- var BG_CLASS = {
6813
- "blue-700": "bg-blue-700",
6814
- "blue-900": "bg-blue-900",
6815
- "blue-950": "bg-blue-950",
6816
- "red-900": "bg-red-900",
6817
- "red-500": "bg-red-500",
6818
- "green-700": "bg-green-700",
6819
- "green-100": "bg-green-100",
6820
- "grey-600": "bg-grey-600",
6821
- "yellow-500": "bg-yellow-500",
6822
- "yellow-300": "bg-yellow-300",
6823
- "yellow-200": "bg-yellow-200",
6824
- "orange-600": "bg-orange-600",
6825
- "purple-700": "bg-purple-700"
6826
- };
6827
- var BulkActionSections = ({ sections }) => /* @__PURE__ */ jsx83(
6828
- Layout,
6829
- {
6830
- role: "group",
6831
- fullHeight: true,
6832
- align: "stretch",
6833
- className: "[&>button:not(:last-child)]:rounded-r-none",
6834
- children: sections.map((section, index) => /* @__PURE__ */ jsxs46(
6835
- "button",
6836
- {
6837
- type: "button",
6838
- disabled: section.disabled,
6839
- onClick: section.disabled ? void 0 : section.action,
6840
- className: cn(
6841
- "flex h-full items-center justify-center gap-1.5 whitespace-nowrap rounded-r-xl px-4 text-sm font-bold text-white transition-[filter]",
6842
- section.disabled ? "cursor-not-allowed bg-grey-500" : "hover:brightness-90"
6843
- ),
6844
- children: [
6845
- section.icon,
6846
- section.title
6847
- ]
6848
- },
6849
- index
6850
- ))
6851
- }
6852
- );
6853
- var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ jsx83(Layout, { align: "center", gap: 3, className: "px-4", children: sections.map((section, index) => /* @__PURE__ */ jsxs46(Layout, { align: "center", gap: 3, children: [
6854
- index > 0 && (section.divider ? /* @__PURE__ */ jsx83("span", { className: "h-11 w-px shrink-0 bg-white/40" }) : /* @__PURE__ */ jsx83("span", { className: "h-0.5 w-4 shrink-0 rounded-full bg-white/50" })),
6855
- section.action ? /* @__PURE__ */ jsxs46(
6856
- "button",
6857
- {
6858
- type: "button",
6859
- disabled: section.disabled,
6860
- onClick: section.disabled ? void 0 : section.action,
6861
- className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white hover:opacity-80",
6862
- children: [
6863
- section.icon,
6864
- section.title
6865
- ]
6866
- }
6867
- ) : section.caption ? /* @__PURE__ */ jsxs46(Layout, { column: true, fullWidth: false, className: "leading-tight text-white", children: [
6868
- /* @__PURE__ */ jsx83("span", { className: "whitespace-nowrap text-[10px] font-bold uppercase tracking-wide opacity-70", children: section.caption }),
6869
- /* @__PURE__ */ jsx83("span", { className: "whitespace-nowrap text-sm font-bold", children: section.title })
6870
- ] }) : section.badge ? /* @__PURE__ */ jsx83("span", { className: "whitespace-nowrap rounded-full bg-white/15 px-2.5 py-1 text-xs font-bold text-white", children: section.title }) : /* @__PURE__ */ jsxs46("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white", children: [
6871
- section.icon,
6872
- section.title
6873
- ] })
6874
- ] }, index)) });
6875
- var Bulk = ({
6876
- onClose,
6877
- leftTitle,
6878
- sections,
6879
- color = "blue-700",
6880
- className,
6881
- variant = "actions"
6882
- }) => /* @__PURE__ */ jsxs46(
6883
- "div",
6884
- {
6885
- className: cn(
6886
- "fixed bottom-[50px] left-1/2 z-[500] inline-flex h-[52px] -translate-x-1/2 items-center rounded-xl pl-4 text-white",
6887
- BG_CLASS[color],
6888
- className
6889
- ),
6890
- children: [
6891
- leftTitle && /* @__PURE__ */ jsxs46(Layout, { align: "center", gap: 6, className: "pr-6", children: [
6892
- /* @__PURE__ */ jsx83(
6893
- "button",
6894
- {
6895
- type: "button",
6896
- "aria-label": "Fermer",
6897
- onClick: onClose,
6898
- className: "text-white hover:opacity-80",
6899
- children: /* @__PURE__ */ jsx83(FaIcon, { name: "xmark", size: 20 })
6900
- }
6901
- ),
6902
- /* @__PURE__ */ jsx83("span", { className: "whitespace-nowrap text-sm font-bold", children: leftTitle }),
6903
- /* @__PURE__ */ jsx83("span", { className: "h-11 w-px bg-white/40" })
6904
- ] }),
6905
- variant === "display" ? /* @__PURE__ */ jsx83(BulkDisplaySections, { sections }) : /* @__PURE__ */ jsx83(BulkActionSections, { sections })
6906
- ]
6907
- }
6908
- );
6909
-
6910
7289
  // src/ui/components/ui/Timeline.tsx
6911
- import { jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
7290
+ import { jsx as jsx97, jsxs as jsxs51 } from "react/jsx-runtime";
6912
7291
  var Timeline = ({
6913
7292
  items,
6914
7293
  lineColor = "#F1F5F9",
@@ -6916,22 +7295,22 @@ var Timeline = ({
6916
7295
  className
6917
7296
  }) => {
6918
7297
  if (items.length === 0) {
6919
- return /* @__PURE__ */ jsx84(Text, { size: "s", color: "grey-600", children: emptyLabel });
7298
+ return /* @__PURE__ */ jsx97(Text, { size: "s", color: "grey-600", children: emptyLabel });
6920
7299
  }
6921
- return /* @__PURE__ */ jsx84(Layout, { column: true, className, children: items.map((item, index) => {
7300
+ return /* @__PURE__ */ jsx97(Layout, { column: true, className, children: items.map((item, index) => {
6922
7301
  var _a;
6923
7302
  const isLast = index === items.length - 1;
6924
7303
  const dotColor = (_a = item.color) != null ? _a : "#377EA1";
6925
- return /* @__PURE__ */ jsxs47(Layout, { gap: 3, children: [
6926
- /* @__PURE__ */ jsxs47(Layout, { column: true, align: "center", className: "w-4", children: [
6927
- /* @__PURE__ */ jsx84(
7304
+ return /* @__PURE__ */ jsxs51(Layout, { gap: 3, children: [
7305
+ /* @__PURE__ */ jsxs51(Layout, { column: true, align: "center", className: "w-4", children: [
7306
+ /* @__PURE__ */ jsx97(
6928
7307
  "span",
6929
7308
  {
6930
7309
  className: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
6931
7310
  style: { background: dotColor }
6932
7311
  }
6933
7312
  ),
6934
- !isLast && /* @__PURE__ */ jsx84(
7313
+ !isLast && /* @__PURE__ */ jsx97(
6935
7314
  "span",
6936
7315
  {
6937
7316
  className: "w-0.5 flex-1 min-h-[16px]",
@@ -6939,19 +7318,19 @@ var Timeline = ({
6939
7318
  }
6940
7319
  )
6941
7320
  ] }),
6942
- /* @__PURE__ */ jsxs47(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
6943
- /* @__PURE__ */ jsx84(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
6944
- item.subtitle && /* @__PURE__ */ jsx84(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
6945
- item.description && /* @__PURE__ */ jsx84("span", { className: "text-xs italic text-neutral-800", children: item.description })
7321
+ /* @__PURE__ */ jsxs51(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
7322
+ /* @__PURE__ */ jsx97(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
7323
+ item.subtitle && /* @__PURE__ */ jsx97(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
7324
+ item.description && /* @__PURE__ */ jsx97("span", { className: "text-xs italic text-neutral-800", children: item.description })
6946
7325
  ] })
6947
7326
  ] }, item.id);
6948
7327
  }) });
6949
7328
  };
6950
7329
 
6951
7330
  // src/ui/components/ui/ColorPicker.tsx
6952
- import { forwardRef as forwardRef33, useState as useState14 } from "react";
7331
+ import { forwardRef as forwardRef33, useState as useState15 } from "react";
6953
7332
  import { cva as cva16 } from "class-variance-authority";
6954
- import { jsx as jsx85, jsxs as jsxs48 } from "react/jsx-runtime";
7333
+ import { jsx as jsx98, jsxs as jsxs52 } from "react/jsx-runtime";
6955
7334
  var swatchVariants = cva16(
6956
7335
  "inline-flex shrink-0 overflow-hidden rounded-[6px] border border-grey-300",
6957
7336
  {
@@ -6988,14 +7367,14 @@ var ColorPicker = forwardRef33(
6988
7367
  size,
6989
7368
  className
6990
7369
  }, ref) => {
6991
- const [internalColor, setInternalColor] = useState14(defaultValue);
7370
+ const [internalColor, setInternalColor] = useState15(defaultValue);
6992
7371
  const currentColor = value !== void 0 ? value : internalColor;
6993
7372
  const handleChange = (e) => {
6994
7373
  const next = e.target.value;
6995
7374
  if (value === void 0) setInternalColor(next);
6996
7375
  onChange == null ? void 0 : onChange(next);
6997
7376
  };
6998
- return /* @__PURE__ */ jsxs48(
7377
+ return /* @__PURE__ */ jsxs52(
6999
7378
  Layout,
7000
7379
  {
7001
7380
  column: true,
@@ -7003,21 +7382,21 @@ var ColorPicker = forwardRef33(
7003
7382
  gap: 1.5,
7004
7383
  className: cn(disabled && "opacity-60", className),
7005
7384
  children: [
7006
- label && /* @__PURE__ */ jsx85("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7007
- /* @__PURE__ */ jsxs48(Layout, { gap: 2, children: [
7008
- /* @__PURE__ */ jsx85(
7385
+ label && /* @__PURE__ */ jsx98("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7386
+ /* @__PURE__ */ jsxs52(Layout, { gap: 2, children: [
7387
+ /* @__PURE__ */ jsx98(
7009
7388
  "label",
7010
7389
  {
7011
7390
  className: cn(
7012
7391
  swatchVariants({ size }),
7013
7392
  disabled ? "cursor-not-allowed" : "cursor-pointer"
7014
7393
  ),
7015
- children: /* @__PURE__ */ jsx85(
7394
+ children: /* @__PURE__ */ jsx98(
7016
7395
  "span",
7017
7396
  {
7018
7397
  className: "relative block h-full w-full",
7019
7398
  style: { backgroundColor: currentColor },
7020
- children: /* @__PURE__ */ jsx85(
7399
+ children: /* @__PURE__ */ jsx98(
7021
7400
  "input",
7022
7401
  {
7023
7402
  ref,
@@ -7032,7 +7411,7 @@ var ColorPicker = forwardRef33(
7032
7411
  )
7033
7412
  }
7034
7413
  ),
7035
- /* @__PURE__ */ jsx85(
7414
+ /* @__PURE__ */ jsx98(
7036
7415
  "input",
7037
7416
  __spreadProps(__spreadValues({
7038
7417
  type: "text",
@@ -7052,7 +7431,7 @@ var ColorPicker = forwardRef33(
7052
7431
  ColorPicker.displayName = "ColorPicker";
7053
7432
 
7054
7433
  // src/ui/components/ui/ColorTokenPicker.tsx
7055
- import { useState as useState15 } from "react";
7434
+ import { useState as useState16 } from "react";
7056
7435
 
7057
7436
  // src/ui/lib/tokens.ts
7058
7437
  var COLOR_TOKENS = [
@@ -7072,7 +7451,7 @@ var COLOR_TOKENS = [
7072
7451
  ];
7073
7452
 
7074
7453
  // src/ui/components/ui/ColorTokenPicker.tsx
7075
- import { jsx as jsx86 } from "react/jsx-runtime";
7454
+ import { jsx as jsx99 } from "react/jsx-runtime";
7076
7455
  var SWATCH_CLASS = {
7077
7456
  "blue-700": "bg-blue-700",
7078
7457
  "blue-900": "bg-blue-900",
@@ -7093,14 +7472,14 @@ var ColorTokenPicker = ({
7093
7472
  onChange,
7094
7473
  disabled = false
7095
7474
  }) => {
7096
- const [open, setOpen] = useState15(false);
7097
- return /* @__PURE__ */ jsx86(
7475
+ const [open, setOpen] = useState16(false);
7476
+ return /* @__PURE__ */ jsx99(
7098
7477
  Popover,
7099
7478
  {
7100
7479
  open,
7101
7480
  onOpenChange: disabled ? void 0 : setOpen,
7102
7481
  align: "start",
7103
- trigger: /* @__PURE__ */ jsx86(
7482
+ trigger: /* @__PURE__ */ jsx99(
7104
7483
  "button",
7105
7484
  {
7106
7485
  type: "button",
@@ -7111,7 +7490,7 @@ var ColorTokenPicker = ({
7111
7490
  "focus-visible:ring-2 focus-visible:ring-blue-200",
7112
7491
  disabled && "cursor-not-allowed opacity-50"
7113
7492
  ),
7114
- children: /* @__PURE__ */ jsx86(
7493
+ children: /* @__PURE__ */ jsx99(
7115
7494
  "span",
7116
7495
  {
7117
7496
  className: cn(
@@ -7122,7 +7501,7 @@ var ColorTokenPicker = ({
7122
7501
  )
7123
7502
  }
7124
7503
  ),
7125
- children: /* @__PURE__ */ jsx86(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ jsx86(
7504
+ children: /* @__PURE__ */ jsx99(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ jsx99(
7126
7505
  "button",
7127
7506
  {
7128
7507
  type: "button",
@@ -7145,8 +7524,8 @@ var ColorTokenPicker = ({
7145
7524
  };
7146
7525
 
7147
7526
  // src/ui/components/ui/FileUploadZone.tsx
7148
- import { useCallback as useCallback4, useRef as useRef11, useState as useState16 } from "react";
7149
- import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs49 } from "react/jsx-runtime";
7527
+ import { useCallback as useCallback5, useRef as useRef13, useState as useState17 } from "react";
7528
+ import { Fragment as Fragment9, jsx as jsx100, jsxs as jsxs53 } from "react/jsx-runtime";
7150
7529
  var ACCEPT_MAP = {
7151
7530
  png: "image/png",
7152
7531
  jpg: "image/jpeg",
@@ -7178,23 +7557,23 @@ var FileUploadZone = ({
7178
7557
  showFileName = false,
7179
7558
  className
7180
7559
  }) => {
7181
- const [isDragging, setIsDragging] = useState16(false);
7182
- const [internalPreviewUrl, setInternalPreviewUrl] = useState16(
7560
+ const [isDragging, setIsDragging] = useState17(false);
7561
+ const [internalPreviewUrl, setInternalPreviewUrl] = useState17(
7183
7562
  null
7184
7563
  );
7185
- const [fileType, setFileType] = useState16(null);
7186
- const [fileName, setFileName] = useState16(null);
7187
- const [inlineError, setInlineError] = useState16(null);
7188
- const inputRef = useRef11(null);
7564
+ const [fileType, setFileType] = useState17(null);
7565
+ const [fileName, setFileName] = useState17(null);
7566
+ const [inlineError, setInlineError] = useState17(null);
7567
+ const inputRef = useRef13(null);
7189
7568
  const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
7190
7569
  const mimeTypes = getMimeTypes(resolvedAccept);
7191
7570
  const acceptString = mimeTypes.join(",");
7192
7571
  const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
7193
- const emitError = useCallback4(
7572
+ const emitError = useCallback5(
7194
7573
  (message) => onError ? onError(message) : setInlineError(message),
7195
7574
  [onError]
7196
7575
  );
7197
- const validateFile = useCallback4(
7576
+ const validateFile = useCallback5(
7198
7577
  (file) => {
7199
7578
  if (!mimeTypes.includes(file.type))
7200
7579
  return { ok: false, error: "Format de fichier non accept\xE9." };
@@ -7208,7 +7587,7 @@ var FileUploadZone = ({
7208
7587
  },
7209
7588
  [mimeTypes, maxSizeMB]
7210
7589
  );
7211
- const processFile = useCallback4(
7590
+ const processFile = useCallback5(
7212
7591
  (file) => {
7213
7592
  setInlineError(null);
7214
7593
  const result = validateFile(file);
@@ -7223,7 +7602,7 @@ var FileUploadZone = ({
7223
7602
  },
7224
7603
  [validateFile, onSave, showPreview, emitError]
7225
7604
  );
7226
- const processFiles = useCallback4(
7605
+ const processFiles = useCallback5(
7227
7606
  (files) => {
7228
7607
  setInlineError(null);
7229
7608
  for (const file of files) {
@@ -7274,7 +7653,7 @@ var FileUploadZone = ({
7274
7653
  onRemove == null ? void 0 : onRemove();
7275
7654
  };
7276
7655
  if (previewUrl) {
7277
- return /* @__PURE__ */ jsxs49(
7656
+ return /* @__PURE__ */ jsxs53(
7278
7657
  Layout,
7279
7658
  {
7280
7659
  column: true,
@@ -7286,14 +7665,14 @@ var FileUploadZone = ({
7286
7665
  className
7287
7666
  ),
7288
7667
  children: [
7289
- fileType && isPdf(fileType) ? /* @__PURE__ */ jsx87(
7668
+ fileType && isPdf(fileType) ? /* @__PURE__ */ jsx100(
7290
7669
  "embed",
7291
7670
  {
7292
7671
  src: previewUrl,
7293
7672
  type: "application/pdf",
7294
7673
  className: "h-[500px] w-full rounded"
7295
7674
  }
7296
- ) : /* @__PURE__ */ jsx87(
7675
+ ) : /* @__PURE__ */ jsx100(
7297
7676
  "img",
7298
7677
  {
7299
7678
  src: previewUrl,
@@ -7301,13 +7680,13 @@ var FileUploadZone = ({
7301
7680
  className: "max-h-[400px] max-w-full rounded object-contain"
7302
7681
  }
7303
7682
  ),
7304
- /* @__PURE__ */ jsx87(
7683
+ /* @__PURE__ */ jsx100(
7305
7684
  Button,
7306
7685
  {
7307
7686
  label: "Supprimer",
7308
7687
  theme: "red-900",
7309
7688
  size: "s",
7310
- iconLeft: /* @__PURE__ */ jsx87(FaIcon, { name: "trash", size: 14 }),
7689
+ iconLeft: /* @__PURE__ */ jsx100(FaIcon, { name: "trash", size: 14 }),
7311
7690
  onClick: handleRemove
7312
7691
  }
7313
7692
  )
@@ -7316,14 +7695,14 @@ var FileUploadZone = ({
7316
7695
  );
7317
7696
  }
7318
7697
  const showBrowse = !compact && browseLabel !== false;
7319
- return /* @__PURE__ */ jsxs49(
7698
+ return /* @__PURE__ */ jsxs53(
7320
7699
  Layout,
7321
7700
  {
7322
7701
  column: true,
7323
7702
  gap: 1,
7324
7703
  className: cn(fullWidth ? "w-full" : "w-fit", className),
7325
7704
  children: [
7326
- /* @__PURE__ */ jsxs49(
7705
+ /* @__PURE__ */ jsxs53(
7327
7706
  "label",
7328
7707
  {
7329
7708
  onDragOver: handleDragOver,
@@ -7337,7 +7716,7 @@ var FileUploadZone = ({
7337
7716
  isDragging ? "border-solid border-blue-100 bg-blue-50" : cn(compact ? "border-grey-300" : "border-blue-50", "bg-grey-100")
7338
7717
  ),
7339
7718
  children: [
7340
- /* @__PURE__ */ jsx87(
7719
+ /* @__PURE__ */ jsx100(
7341
7720
  "input",
7342
7721
  {
7343
7722
  ref: inputRef,
@@ -7349,11 +7728,11 @@ var FileUploadZone = ({
7349
7728
  className: "hidden"
7350
7729
  }
7351
7730
  ),
7352
- showIcon && /* @__PURE__ */ jsx87(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
7353
- /* @__PURE__ */ jsx87("span", { className: "text-center text-sm text-grey-600", children: label }),
7354
- showBrowse && /* @__PURE__ */ jsxs49(Fragment8, { children: [
7355
- /* @__PURE__ */ jsx87("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
7356
- /* @__PURE__ */ jsx87(
7731
+ showIcon && /* @__PURE__ */ jsx100(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
7732
+ /* @__PURE__ */ jsx100("span", { className: "text-center text-sm text-grey-600", children: label }),
7733
+ showBrowse && /* @__PURE__ */ jsxs53(Fragment9, { children: [
7734
+ /* @__PURE__ */ jsx100("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
7735
+ /* @__PURE__ */ jsx100(
7357
7736
  Button,
7358
7737
  {
7359
7738
  label: browseLabel,
@@ -7367,23 +7746,23 @@ var FileUploadZone = ({
7367
7746
  }
7368
7747
  )
7369
7748
  ] }),
7370
- sublabel && /* @__PURE__ */ jsx87("span", { className: "text-center text-xs text-grey-500", children: sublabel })
7749
+ sublabel && /* @__PURE__ */ jsx100("span", { className: "text-center text-xs text-grey-500", children: sublabel })
7371
7750
  ]
7372
7751
  }
7373
7752
  ),
7374
- showFileName && fileName && /* @__PURE__ */ jsxs49(Layout, { align: "center", justify: "center", gap: 2, children: [
7375
- /* @__PURE__ */ jsx87(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
7376
- /* @__PURE__ */ jsx87("span", { className: "text-sm text-green-700", children: fileName })
7753
+ showFileName && fileName && /* @__PURE__ */ jsxs53(Layout, { align: "center", justify: "center", gap: 2, children: [
7754
+ /* @__PURE__ */ jsx100(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
7755
+ /* @__PURE__ */ jsx100("span", { className: "text-sm text-green-700", children: fileName })
7377
7756
  ] }),
7378
- inlineError && /* @__PURE__ */ jsx87("span", { className: "text-center text-sm text-red-900", children: inlineError })
7757
+ inlineError && /* @__PURE__ */ jsx100("span", { className: "text-center text-sm text-red-900", children: inlineError })
7379
7758
  ]
7380
7759
  }
7381
7760
  );
7382
7761
  };
7383
7762
 
7384
7763
  // src/ui/components/ui/FilePicker.tsx
7385
- import { useRef as useRef12 } from "react";
7386
- import { Fragment as Fragment9, jsx as jsx88, jsxs as jsxs50 } from "react/jsx-runtime";
7764
+ import { useRef as useRef14 } from "react";
7765
+ import { Fragment as Fragment10, jsx as jsx101, jsxs as jsxs54 } from "react/jsx-runtime";
7387
7766
  var FilePicker = ({
7388
7767
  label,
7389
7768
  onSelect,
@@ -7397,9 +7776,9 @@ var FilePicker = ({
7397
7776
  variant = "icon",
7398
7777
  className
7399
7778
  }) => {
7400
- const inputRef = useRef12(null);
7401
- return /* @__PURE__ */ jsxs50(Fragment9, { children: [
7402
- /* @__PURE__ */ jsx88(
7779
+ const inputRef = useRef14(null);
7780
+ return /* @__PURE__ */ jsxs54(Fragment10, { children: [
7781
+ /* @__PURE__ */ jsx101(
7403
7782
  "input",
7404
7783
  {
7405
7784
  ref: inputRef,
@@ -7415,20 +7794,20 @@ var FilePicker = ({
7415
7794
  }
7416
7795
  }
7417
7796
  ),
7418
- variant === "button" ? /* @__PURE__ */ jsx88(
7797
+ variant === "button" ? /* @__PURE__ */ jsx101(
7419
7798
  Button,
7420
7799
  {
7421
7800
  variant: "outline",
7422
7801
  label,
7423
7802
  disabled,
7424
7803
  className,
7425
- iconLeft: /* @__PURE__ */ jsx88(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
7804
+ iconLeft: /* @__PURE__ */ jsx101(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
7426
7805
  onClick: () => {
7427
7806
  var _a;
7428
7807
  return (_a = inputRef.current) == null ? void 0 : _a.click();
7429
7808
  }
7430
7809
  }
7431
- ) : /* @__PURE__ */ jsx88(Tooltip, { content: label, children: /* @__PURE__ */ jsx88(
7810
+ ) : /* @__PURE__ */ jsx101(Tooltip, { content: label, children: /* @__PURE__ */ jsx101(
7432
7811
  Icon,
7433
7812
  {
7434
7813
  name: icon,
@@ -7450,7 +7829,7 @@ var FilePicker = ({
7450
7829
  // src/ui/components/ui/Item.tsx
7451
7830
  import { forwardRef as forwardRef34 } from "react";
7452
7831
  import { cva as cva17 } from "class-variance-authority";
7453
- import { jsx as jsx89 } from "react/jsx-runtime";
7832
+ import { jsx as jsx102 } from "react/jsx-runtime";
7454
7833
  var itemVariants = cva17(
7455
7834
  "group/item flex items-center rounded-[6px] border border-transparent transition-colors",
7456
7835
  {
@@ -7471,7 +7850,7 @@ var itemVariants = cva17(
7471
7850
  var Item4 = forwardRef34(
7472
7851
  (_a, ref) => {
7473
7852
  var _b = _a, { variant, size, className } = _b, props = __objRest(_b, ["variant", "size", "className"]);
7474
- return /* @__PURE__ */ jsx89(
7853
+ return /* @__PURE__ */ jsx102(
7475
7854
  "div",
7476
7855
  __spreadValues({
7477
7856
  ref,
@@ -7496,7 +7875,7 @@ var itemMediaVariants = cva17(
7496
7875
  );
7497
7876
  var ItemMedia = (_a) => {
7498
7877
  var _b = _a, { variant, className } = _b, props = __objRest(_b, ["variant", "className"]);
7499
- return /* @__PURE__ */ jsx89("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
7878
+ return /* @__PURE__ */ jsx102("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
7500
7879
  };
7501
7880
  var ItemContent = (_a) => {
7502
7881
  var _b = _a, {
@@ -7504,7 +7883,7 @@ var ItemContent = (_a) => {
7504
7883
  } = _b, props = __objRest(_b, [
7505
7884
  "className"
7506
7885
  ]);
7507
- return /* @__PURE__ */ jsx89(
7886
+ return /* @__PURE__ */ jsx102(
7508
7887
  "div",
7509
7888
  __spreadValues({
7510
7889
  className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
@@ -7517,7 +7896,7 @@ var ItemTitle = (_a) => {
7517
7896
  } = _b, props = __objRest(_b, [
7518
7897
  "className"
7519
7898
  ]);
7520
- return /* @__PURE__ */ jsx89(
7899
+ return /* @__PURE__ */ jsx102(
7521
7900
  "div",
7522
7901
  __spreadValues({
7523
7902
  className: cn(
@@ -7533,7 +7912,7 @@ var ItemDescription = (_a) => {
7533
7912
  } = _b, props = __objRest(_b, [
7534
7913
  "className"
7535
7914
  ]);
7536
- return /* @__PURE__ */ jsx89("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
7915
+ return /* @__PURE__ */ jsx102("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
7537
7916
  };
7538
7917
  var ItemActions = (_a) => {
7539
7918
  var _b = _a, {
@@ -7541,7 +7920,7 @@ var ItemActions = (_a) => {
7541
7920
  } = _b, props = __objRest(_b, [
7542
7921
  "className"
7543
7922
  ]);
7544
- return /* @__PURE__ */ jsx89(
7923
+ return /* @__PURE__ */ jsx102(
7545
7924
  "div",
7546
7925
  __spreadValues({
7547
7926
  className: cn("flex shrink-0 items-center gap-2", className)
@@ -7550,7 +7929,7 @@ var ItemActions = (_a) => {
7550
7929
  };
7551
7930
 
7552
7931
  // src/ui/components/ui/Attachment.tsx
7553
- import { jsx as jsx90, jsxs as jsxs51 } from "react/jsx-runtime";
7932
+ import { jsx as jsx103, jsxs as jsxs55 } from "react/jsx-runtime";
7554
7933
  var Attachment = ({
7555
7934
  name,
7556
7935
  size,
@@ -7564,7 +7943,7 @@ var Attachment = ({
7564
7943
  }) => {
7565
7944
  const isUploading = status === "uploading";
7566
7945
  const isError = status === "error";
7567
- return /* @__PURE__ */ jsxs51(
7946
+ return /* @__PURE__ */ jsxs55(
7568
7947
  Item4,
7569
7948
  {
7570
7949
  variant: "outline",
@@ -7576,12 +7955,12 @@ var Attachment = ({
7576
7955
  ),
7577
7956
  style: { width },
7578
7957
  children: [
7579
- /* @__PURE__ */ jsx90(
7958
+ /* @__PURE__ */ jsx103(
7580
7959
  ItemMedia,
7581
7960
  {
7582
7961
  variant: "icon",
7583
7962
  className: cn(isError && "border-red-900 bg-red-50"),
7584
- children: isUploading ? /* @__PURE__ */ jsx90(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ jsx90(
7963
+ children: isUploading ? /* @__PURE__ */ jsx103(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ jsx103(
7585
7964
  FaIcon,
7586
7965
  {
7587
7966
  name: isError ? "triangle-exclamation" : "file",
@@ -7591,33 +7970,33 @@ var Attachment = ({
7591
7970
  )
7592
7971
  }
7593
7972
  ),
7594
- /* @__PURE__ */ jsxs51(ItemContent, { children: [
7595
- /* @__PURE__ */ jsx90(ItemTitle, { children: name }),
7596
- isUploading ? /* @__PURE__ */ jsxs51(ItemDescription, { className: "text-xs", children: [
7973
+ /* @__PURE__ */ jsxs55(ItemContent, { children: [
7974
+ /* @__PURE__ */ jsx103(ItemTitle, { children: name }),
7975
+ isUploading ? /* @__PURE__ */ jsxs55(ItemDescription, { className: "text-xs", children: [
7597
7976
  "Uploading - ",
7598
7977
  progress,
7599
7978
  "%"
7600
- ] }) : isError ? /* @__PURE__ */ jsx90(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ jsx90(ItemDescription, { className: "text-xs", children: size })
7979
+ ] }) : isError ? /* @__PURE__ */ jsx103(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ jsx103(ItemDescription, { className: "text-xs", children: size })
7601
7980
  ] }),
7602
- (onRetry || onRemove) && /* @__PURE__ */ jsxs51(ItemActions, { children: [
7603
- isError && onRetry && /* @__PURE__ */ jsx90(
7981
+ (onRetry || onRemove) && /* @__PURE__ */ jsxs55(ItemActions, { children: [
7982
+ isError && onRetry && /* @__PURE__ */ jsx103(
7604
7983
  "button",
7605
7984
  {
7606
7985
  type: "button",
7607
7986
  onClick: onRetry,
7608
7987
  "aria-label": `R\xE9essayer l'envoi de ${name}`,
7609
7988
  className: "text-grey-400 hover:text-grey-600",
7610
- children: /* @__PURE__ */ jsx90(FaIcon, { name: "rotate-right", size: 12 })
7989
+ children: /* @__PURE__ */ jsx103(FaIcon, { name: "rotate-right", size: 12 })
7611
7990
  }
7612
7991
  ),
7613
- onRemove && /* @__PURE__ */ jsx90(
7992
+ onRemove && /* @__PURE__ */ jsx103(
7614
7993
  "button",
7615
7994
  {
7616
7995
  type: "button",
7617
7996
  onClick: onRemove,
7618
7997
  "aria-label": `Retirer ${name}`,
7619
7998
  className: "text-grey-400 hover:text-grey-600",
7620
- children: /* @__PURE__ */ jsx90(FaIcon, { name: "xmark", size: 12 })
7999
+ children: /* @__PURE__ */ jsx103(FaIcon, { name: "xmark", size: 12 })
7621
8000
  }
7622
8001
  )
7623
8002
  ] })
@@ -7627,9 +8006,9 @@ var Attachment = ({
7627
8006
  };
7628
8007
 
7629
8008
  // src/ui/components/ui/PdfPreview.tsx
7630
- import { useState as useState17 } from "react";
8009
+ import { useState as useState18 } from "react";
7631
8010
  import { Document, Page, pdfjs } from "react-pdf";
7632
- import { jsx as jsx91, jsxs as jsxs52 } from "react/jsx-runtime";
8011
+ import { jsx as jsx104, jsxs as jsxs56 } from "react/jsx-runtime";
7633
8012
  pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
7634
8013
  var PdfPreview = ({
7635
8014
  file,
@@ -7637,12 +8016,12 @@ var PdfPreview = ({
7637
8016
  maxHeight = "600px",
7638
8017
  className
7639
8018
  }) => {
7640
- const [hasError, setHasError] = useState17(false);
7641
- const [numPages, setNumPages] = useState17(0);
8019
+ const [hasError, setHasError] = useState18(false);
8020
+ const [numPages, setNumPages] = useState18(0);
7642
8021
  const height = Math.round(width * 1.3);
7643
- const thumbnailSkeleton = /* @__PURE__ */ jsx91(Skeleton, { width, height });
8022
+ const thumbnailSkeleton = /* @__PURE__ */ jsx104(Skeleton, { width, height });
7644
8023
  if (hasError) {
7645
- return /* @__PURE__ */ jsxs52(
8024
+ return /* @__PURE__ */ jsxs56(
7646
8025
  Layout,
7647
8026
  {
7648
8027
  column: true,
@@ -7655,13 +8034,13 @@ var PdfPreview = ({
7655
8034
  ),
7656
8035
  style: { width, height },
7657
8036
  children: [
7658
- /* @__PURE__ */ jsx91(FaIcon, { name: "file-pdf", size: 24 }),
7659
- /* @__PURE__ */ jsx91("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
8037
+ /* @__PURE__ */ jsx104(FaIcon, { name: "file-pdf", size: 24 }),
8038
+ /* @__PURE__ */ jsx104("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
7660
8039
  ]
7661
8040
  }
7662
8041
  );
7663
8042
  }
7664
- return /* @__PURE__ */ jsx91(
8043
+ return /* @__PURE__ */ jsx104(
7665
8044
  "div",
7666
8045
  {
7667
8046
  className: cn(
@@ -7669,7 +8048,7 @@ var PdfPreview = ({
7669
8048
  className
7670
8049
  ),
7671
8050
  style: { width, maxHeight },
7672
- children: /* @__PURE__ */ jsx91(
8051
+ children: /* @__PURE__ */ jsx104(
7673
8052
  Document,
7674
8053
  {
7675
8054
  file,
@@ -7677,7 +8056,7 @@ var PdfPreview = ({
7677
8056
  onLoadError: () => setHasError(true),
7678
8057
  loading: thumbnailSkeleton,
7679
8058
  error: thumbnailSkeleton,
7680
- children: /* @__PURE__ */ jsx91(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ jsx91(
8059
+ children: /* @__PURE__ */ jsx104(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ jsx104(
7681
8060
  Page,
7682
8061
  {
7683
8062
  pageNumber: i + 1,
@@ -7694,16 +8073,16 @@ var PdfPreview = ({
7694
8073
  };
7695
8074
 
7696
8075
  // src/ui/components/ui/AudioPlayer.tsx
7697
- import { useCallback as useCallback6, useRef as useRef14, useState as useState19 } from "react";
8076
+ import { useCallback as useCallback7, useRef as useRef16, useState as useState20 } from "react";
7698
8077
 
7699
8078
  // src/ui/components/ui/VideoPlayer.tsx
7700
8079
  import {
7701
- useCallback as useCallback5,
8080
+ useCallback as useCallback6,
7702
8081
  useEffect as useEffect10,
7703
- useRef as useRef13,
7704
- useState as useState18
8082
+ useRef as useRef15,
8083
+ useState as useState19
7705
8084
  } from "react";
7706
- import { Fragment as Fragment10, jsx as jsx92, jsxs as jsxs53 } from "react/jsx-runtime";
8085
+ import { Fragment as Fragment11, jsx as jsx105, jsxs as jsxs57 } from "react/jsx-runtime";
7707
8086
  var formatVideoDuration = (seconds) => {
7708
8087
  if (seconds === void 0 || !Number.isFinite(seconds) || seconds < 0)
7709
8088
  return "";
@@ -7742,12 +8121,12 @@ var VideoPlayer = ({
7742
8121
  defaultVolume = DEFAULT_VOLUME,
7743
8122
  className
7744
8123
  }) => {
7745
- const [isInlinePlaying, setIsInlinePlaying] = useState18(false);
7746
- const [isExpanded, setIsExpanded] = useState18(false);
7747
- const [hasPosterError, setHasPosterError] = useState18(false);
7748
- const [hasFramePreviewError, setHasFramePreviewError] = useState18(false);
7749
- const inlineVideoRef = useRef13(null);
7750
- const expandedVideoRef = useRef13(null);
8124
+ const [isInlinePlaying, setIsInlinePlaying] = useState19(false);
8125
+ const [isExpanded, setIsExpanded] = useState19(false);
8126
+ const [hasPosterError, setHasPosterError] = useState19(false);
8127
+ const [hasFramePreviewError, setHasFramePreviewError] = useState19(false);
8128
+ const inlineVideoRef = useRef15(null);
8129
+ const expandedVideoRef = useRef15(null);
7751
8130
  useEffect10(() => {
7752
8131
  setHasPosterError(false);
7753
8132
  }, [poster]);
@@ -7755,7 +8134,7 @@ var VideoPlayer = ({
7755
8134
  setHasFramePreviewError(false);
7756
8135
  }, [src]);
7757
8136
  const visiblePoster = hasPosterError ? void 0 : poster;
7758
- const attachExpandedVideo = useCallback5(
8137
+ const attachExpandedVideo = useCallback6(
7759
8138
  (video) => {
7760
8139
  expandedVideoRef.current = video;
7761
8140
  if (video) video.volume = clampVolume(defaultVolume);
@@ -7767,7 +8146,7 @@ var VideoPlayer = ({
7767
8146
  e.preventDefault();
7768
8147
  (_a = expandedVideoRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
7769
8148
  };
7770
- const attachInlineVideo = useCallback5(
8149
+ const attachInlineVideo = useCallback6(
7771
8150
  (video) => {
7772
8151
  inlineVideoRef.current = video;
7773
8152
  if (video) video.volume = clampVolume(defaultVolume);
@@ -7802,8 +8181,8 @@ var VideoPlayer = ({
7802
8181
  const stopBubbling = (e) => {
7803
8182
  e.stopPropagation();
7804
8183
  };
7805
- return /* @__PURE__ */ jsxs53(Fragment10, { children: [
7806
- /* @__PURE__ */ jsxs53(
8184
+ return /* @__PURE__ */ jsxs57(Fragment11, { children: [
8185
+ /* @__PURE__ */ jsxs57(
7807
8186
  Layout,
7808
8187
  {
7809
8188
  className: cn(
@@ -7814,7 +8193,7 @@ var VideoPlayer = ({
7814
8193
  onClick: stopBubbling,
7815
8194
  "data-testid": "video-player",
7816
8195
  children: [
7817
- isInlinePlaying ? /* @__PURE__ */ jsx92(
8196
+ isInlinePlaying ? /* @__PURE__ */ jsx105(
7818
8197
  "video",
7819
8198
  {
7820
8199
  ref: attachInlineVideo,
@@ -7826,7 +8205,7 @@ var VideoPlayer = ({
7826
8205
  className: "h-full w-full bg-black object-contain",
7827
8206
  "aria-label": title
7828
8207
  }
7829
- ) : /* @__PURE__ */ jsxs53(
8208
+ ) : /* @__PURE__ */ jsxs57(
7830
8209
  "button",
7831
8210
  {
7832
8211
  type: "button",
@@ -7834,7 +8213,7 @@ var VideoPlayer = ({
7834
8213
  "aria-label": `Lire la vid\xE9o ${title}`,
7835
8214
  className: "group relative flex h-full w-full items-center justify-center",
7836
8215
  children: [
7837
- visiblePoster ? /* @__PURE__ */ jsx92(
8216
+ visiblePoster ? /* @__PURE__ */ jsx105(
7838
8217
  "img",
7839
8218
  {
7840
8219
  src: visiblePoster,
@@ -7845,7 +8224,7 @@ var VideoPlayer = ({
7845
8224
  ) : (
7846
8225
  // Sans vignette : première image de la vidéo (métadonnées seulement,
7847
8226
  // `#t=0.1` force l'affichage d'une frame), tuile sombre si ça échoue.
7848
- !hasFramePreviewError && /* @__PURE__ */ jsx92(
8227
+ !hasFramePreviewError && /* @__PURE__ */ jsx105(
7849
8228
  "video",
7850
8229
  {
7851
8230
  src: `${src}#t=0.1`,
@@ -7860,12 +8239,12 @@ var VideoPlayer = ({
7860
8239
  }
7861
8240
  )
7862
8241
  ),
7863
- /* @__PURE__ */ jsx92("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__ */ jsx92(FaIcon, { name: "play", family: "solid", size: 18 }) }),
7864
- formattedDuration && /* @__PURE__ */ jsx92("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 })
8242
+ /* @__PURE__ */ jsx105("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__ */ jsx105(FaIcon, { name: "play", family: "solid", size: 18 }) }),
8243
+ formattedDuration && /* @__PURE__ */ jsx105("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 })
7865
8244
  ]
7866
8245
  }
7867
8246
  ),
7868
- label && /* @__PURE__ */ jsx92(
8247
+ label && /* @__PURE__ */ jsx105(
7869
8248
  Layout,
7870
8249
  {
7871
8250
  width: "auto",
@@ -7873,14 +8252,14 @@ var VideoPlayer = ({
7873
8252
  children: label
7874
8253
  }
7875
8254
  ),
7876
- /* @__PURE__ */ jsxs53(
8255
+ /* @__PURE__ */ jsxs57(
7877
8256
  Layout,
7878
8257
  {
7879
8258
  width: "auto",
7880
8259
  gap: 1,
7881
8260
  className: "absolute right-1 top-1 rounded-full bg-white/90",
7882
8261
  children: [
7883
- /* @__PURE__ */ jsx92(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ jsx92(
8262
+ /* @__PURE__ */ jsx105(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ jsx105(
7884
8263
  Icon,
7885
8264
  {
7886
8265
  name: "up-right-and-down-left-from-center",
@@ -7889,7 +8268,7 @@ var VideoPlayer = ({
7889
8268
  "aria-label": "Agrandir la vid\xE9o"
7890
8269
  }
7891
8270
  ) }),
7892
- /* @__PURE__ */ jsx92(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx92(
8271
+ /* @__PURE__ */ jsx105(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx105(
7893
8272
  Icon,
7894
8273
  {
7895
8274
  name: "download",
@@ -7901,7 +8280,7 @@ var VideoPlayer = ({
7901
8280
  ]
7902
8281
  }
7903
8282
  ),
7904
- meta && !isInlinePlaying && /* @__PURE__ */ jsx92(
8283
+ meta && !isInlinePlaying && /* @__PURE__ */ jsx105(
7905
8284
  Layout,
7906
8285
  {
7907
8286
  width: "auto",
@@ -7912,7 +8291,7 @@ var VideoPlayer = ({
7912
8291
  ]
7913
8292
  }
7914
8293
  ),
7915
- /* @__PURE__ */ jsxs53(
8294
+ /* @__PURE__ */ jsxs57(
7916
8295
  Modal,
7917
8296
  {
7918
8297
  open: isExpanded,
@@ -7920,9 +8299,9 @@ var VideoPlayer = ({
7920
8299
  onOpenAutoFocus: focusExpandedVideo,
7921
8300
  width: "70vw",
7922
8301
  children: [
7923
- /* @__PURE__ */ jsx92(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ jsxs53(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
7924
- /* @__PURE__ */ jsxs53(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
7925
- /* @__PURE__ */ jsx92(
8302
+ /* @__PURE__ */ jsx105(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ jsxs57(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
8303
+ /* @__PURE__ */ jsxs57(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
8304
+ /* @__PURE__ */ jsx105(
7926
8305
  IconBadge,
7927
8306
  {
7928
8307
  name: "video",
@@ -7931,10 +8310,10 @@ var VideoPlayer = ({
7931
8310
  iconColor: "blue_900"
7932
8311
  }
7933
8312
  ),
7934
- /* @__PURE__ */ jsx92(ModalTitle, { className: "truncate", children: title })
8313
+ /* @__PURE__ */ jsx105(ModalTitle, { className: "truncate", children: title })
7935
8314
  ] }),
7936
- /* @__PURE__ */ jsxs53(Layout, { width: "auto", align: "center", gap: 1, children: [
7937
- /* @__PURE__ */ jsx92(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx92(
8315
+ /* @__PURE__ */ jsxs57(Layout, { width: "auto", align: "center", gap: 1, children: [
8316
+ /* @__PURE__ */ jsx105(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx105(
7938
8317
  Icon,
7939
8318
  {
7940
8319
  name: "download",
@@ -7943,7 +8322,7 @@ var VideoPlayer = ({
7943
8322
  "aria-label": "T\xE9l\xE9charger la vid\xE9o"
7944
8323
  }
7945
8324
  ) }),
7946
- /* @__PURE__ */ jsx92(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx92(
8325
+ /* @__PURE__ */ jsx105(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx105(
7947
8326
  Icon,
7948
8327
  {
7949
8328
  name: "xmark",
@@ -7955,7 +8334,7 @@ var VideoPlayer = ({
7955
8334
  ) })
7956
8335
  ] })
7957
8336
  ] }) }),
7958
- /* @__PURE__ */ jsx92(ModalBody, { children: /* @__PURE__ */ jsx92(
8337
+ /* @__PURE__ */ jsx105(ModalBody, { children: /* @__PURE__ */ jsx105(
7959
8338
  "video",
7960
8339
  {
7961
8340
  ref: attachExpandedVideo,
@@ -7976,7 +8355,7 @@ var VideoPlayer = ({
7976
8355
  };
7977
8356
 
7978
8357
  // src/ui/components/ui/AudioPlayer.tsx
7979
- import { jsx as jsx93, jsxs as jsxs54 } from "react/jsx-runtime";
8358
+ import { jsx as jsx106, jsxs as jsxs58 } from "react/jsx-runtime";
7980
8359
  var DEFAULT_VOLUME2 = 0.5;
7981
8360
  var clampVolume2 = (volume) => Number.isFinite(volume) ? Math.min(1, Math.max(0, volume)) : DEFAULT_VOLUME2;
7982
8361
  var AudioPlayer = ({
@@ -7986,11 +8365,11 @@ var AudioPlayer = ({
7986
8365
  title = "Audio",
7987
8366
  className
7988
8367
  }) => {
7989
- const audioRef = useRef14(null);
7990
- const [isPlaying, setIsPlaying] = useState19(false);
7991
- const [currentTime, setCurrentTime] = useState19(0);
7992
- const [duration, setDuration] = useState19(0);
7993
- const attachAudio = useCallback6(
8368
+ const audioRef = useRef16(null);
8369
+ const [isPlaying, setIsPlaying] = useState20(false);
8370
+ const [currentTime, setCurrentTime] = useState20(0);
8371
+ const [duration, setDuration] = useState20(0);
8372
+ const attachAudio = useCallback7(
7994
8373
  (audio) => {
7995
8374
  audioRef.current = audio;
7996
8375
  if (audio) audio.volume = clampVolume2(defaultVolume);
@@ -8019,7 +8398,7 @@ var AudioPlayer = ({
8019
8398
  const value = (_b = (_a = audioRef.current) == null ? void 0 : _a.duration) != null ? _b : 0;
8020
8399
  setDuration(Number.isFinite(value) ? value : 0);
8021
8400
  };
8022
- return /* @__PURE__ */ jsxs54(
8401
+ return /* @__PURE__ */ jsxs58(
8023
8402
  Layout,
8024
8403
  {
8025
8404
  gap: 3,
@@ -8028,7 +8407,7 @@ var AudioPlayer = ({
8028
8407
  className: cn("rounded-lg border border-grey-300 p-2", className),
8029
8408
  "data-testid": "audio-player",
8030
8409
  children: [
8031
- /* @__PURE__ */ jsx93(
8410
+ /* @__PURE__ */ jsx106(
8032
8411
  "audio",
8033
8412
  {
8034
8413
  ref: attachAudio,
@@ -8046,19 +8425,19 @@ var AudioPlayer = ({
8046
8425
  "aria-label": title
8047
8426
  }
8048
8427
  ),
8049
- /* @__PURE__ */ jsx93(
8428
+ /* @__PURE__ */ jsx106(
8050
8429
  Button,
8051
8430
  {
8052
8431
  variant: "outline",
8053
8432
  size: "s",
8054
8433
  iconOnly: true,
8055
8434
  "aria-label": isPlaying ? `Mettre en pause ${title}` : `Lire ${title}`,
8056
- iconLeft: /* @__PURE__ */ jsx93(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8435
+ iconLeft: /* @__PURE__ */ jsx106(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8057
8436
  onClick: togglePlayback
8058
8437
  }
8059
8438
  ),
8060
- /* @__PURE__ */ jsx93(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8061
- /* @__PURE__ */ jsx93(
8439
+ /* @__PURE__ */ jsx106(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8440
+ /* @__PURE__ */ jsx106(
8062
8441
  "input",
8063
8442
  {
8064
8443
  type: "range",
@@ -8072,7 +8451,7 @@ var AudioPlayer = ({
8072
8451
  className: "h-1 min-w-0 flex-1 cursor-pointer accent-blue-700 disabled:cursor-default"
8073
8452
  }
8074
8453
  ),
8075
- /* @__PURE__ */ jsx93(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8454
+ /* @__PURE__ */ jsx106(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8076
8455
  ]
8077
8456
  }
8078
8457
  );
@@ -8080,7 +8459,7 @@ var AudioPlayer = ({
8080
8459
 
8081
8460
  // src/ui/components/ui/ScrollArea.tsx
8082
8461
  import * as RadixScrollArea from "@radix-ui/react-scroll-area";
8083
- import { jsx as jsx94, jsxs as jsxs55 } from "react/jsx-runtime";
8462
+ import { jsx as jsx107, jsxs as jsxs59 } from "react/jsx-runtime";
8084
8463
  var HIDDEN_SCROLLBAR_CLASSNAME = "w-0 h-0 opacity-0";
8085
8464
  var ScrollArea = (_a) => {
8086
8465
  var _b = _a, {
@@ -8096,13 +8475,13 @@ var ScrollArea = (_a) => {
8096
8475
  "viewportRef",
8097
8476
  "maxHeight"
8098
8477
  ]);
8099
- return /* @__PURE__ */ jsxs55(
8478
+ return /* @__PURE__ */ jsxs59(
8100
8479
  RadixScrollArea.Root,
8101
8480
  __spreadProps(__spreadValues({
8102
8481
  className: cn("relative overflow-hidden", className)
8103
8482
  }, props), {
8104
8483
  children: [
8105
- /* @__PURE__ */ jsx94(
8484
+ /* @__PURE__ */ jsx107(
8106
8485
  RadixScrollArea.Viewport,
8107
8486
  {
8108
8487
  ref: viewportRef,
@@ -8115,23 +8494,23 @@ var ScrollArea = (_a) => {
8115
8494
  children
8116
8495
  }
8117
8496
  ),
8118
- (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx94(
8497
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx107(
8119
8498
  RadixScrollArea.Scrollbar,
8120
8499
  {
8121
8500
  orientation: "vertical",
8122
8501
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8123
- children: /* @__PURE__ */ jsx94(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8502
+ children: /* @__PURE__ */ jsx107(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8124
8503
  }
8125
8504
  ),
8126
- (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx94(
8505
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx107(
8127
8506
  RadixScrollArea.Scrollbar,
8128
8507
  {
8129
8508
  orientation: "horizontal",
8130
8509
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8131
- children: /* @__PURE__ */ jsx94(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8510
+ children: /* @__PURE__ */ jsx107(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8132
8511
  }
8133
8512
  ),
8134
- /* @__PURE__ */ jsx94(RadixScrollArea.Corner, {})
8513
+ /* @__PURE__ */ jsx107(RadixScrollArea.Corner, {})
8135
8514
  ]
8136
8515
  })
8137
8516
  );
@@ -8139,7 +8518,7 @@ var ScrollArea = (_a) => {
8139
8518
 
8140
8519
  // src/ui/components/ui/Message.tsx
8141
8520
  import { forwardRef as forwardRef35 } from "react";
8142
- import { jsx as jsx95, jsxs as jsxs56 } from "react/jsx-runtime";
8521
+ import { jsx as jsx108, jsxs as jsxs60 } from "react/jsx-runtime";
8143
8522
  var BUBBLE_BACKGROUND = {
8144
8523
  own: { solid: "bg-blue-700", pale: "bg-blue-50" },
8145
8524
  teammate: { solid: "bg-blue-100", pale: "bg-blue-100" },
@@ -8198,7 +8577,7 @@ var Message = forwardRef35(
8198
8577
  const isInverted = isOwn && variant === "solid";
8199
8578
  const contentColor = isInverted ? "white" : "neutral-800";
8200
8579
  const metaColor = isInverted ? "white" : "grey-500";
8201
- const avatar = showAuthor ? /* @__PURE__ */ jsx95(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ jsx95(
8580
+ const avatar = showAuthor ? /* @__PURE__ */ jsx108(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ jsx108(
8202
8581
  Layout,
8203
8582
  {
8204
8583
  width: `${avatarSize}px`,
@@ -8206,8 +8585,8 @@ var Message = forwardRef35(
8206
8585
  "aria-hidden": "true"
8207
8586
  }
8208
8587
  );
8209
- const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ jsx95(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
8210
- const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ jsx95(
8588
+ const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ jsx108(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
8589
+ const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ jsx108(
8211
8590
  Layout,
8212
8591
  {
8213
8592
  width: "auto",
@@ -8220,7 +8599,7 @@ var Message = forwardRef35(
8220
8599
  children: actions
8221
8600
  }
8222
8601
  ) : null;
8223
- return /* @__PURE__ */ jsxs56(
8602
+ return /* @__PURE__ */ jsxs60(
8224
8603
  Layout,
8225
8604
  __spreadProps(__spreadValues({
8226
8605
  ref,
@@ -8231,7 +8610,7 @@ var Message = forwardRef35(
8231
8610
  className
8232
8611
  }, props), {
8233
8612
  children: [
8234
- /* @__PURE__ */ jsxs56(
8613
+ /* @__PURE__ */ jsxs60(
8235
8614
  Layout,
8236
8615
  {
8237
8616
  fullWidth: true,
@@ -8242,7 +8621,7 @@ var Message = forwardRef35(
8242
8621
  children: [
8243
8622
  !isRightAligned && avatar,
8244
8623
  isRightAligned && actionsSlot,
8245
- /* @__PURE__ */ jsxs56(
8624
+ /* @__PURE__ */ jsxs60(
8246
8625
  Layout,
8247
8626
  {
8248
8627
  column: true,
@@ -8251,7 +8630,7 @@ var Message = forwardRef35(
8251
8630
  align: isRightAligned ? "end" : "start",
8252
8631
  style: { maxWidth },
8253
8632
  children: [
8254
- bubble ? /* @__PURE__ */ jsxs56(
8633
+ bubble ? /* @__PURE__ */ jsxs60(
8255
8634
  Layout,
8256
8635
  {
8257
8636
  column: true,
@@ -8265,16 +8644,16 @@ var Message = forwardRef35(
8265
8644
  cornerActions && "pr-8"
8266
8645
  ),
8267
8646
  children: [
8268
- deleted ? /* @__PURE__ */ jsx95(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ jsx95(Text, { size: "s", color: contentColor, children }),
8269
- time && /* @__PURE__ */ jsx95(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ jsx95(Text, { size: "xxs", color: metaColor, children: time }) }),
8647
+ deleted ? /* @__PURE__ */ jsx108(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ jsx108(Text, { size: "s", color: contentColor, children }),
8648
+ time && /* @__PURE__ */ jsx108(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ jsx108(Text, { size: "xxs", color: metaColor, children: time }) }),
8270
8649
  cornerActions
8271
8650
  ]
8272
8651
  }
8273
- ) : cornerActions ? /* @__PURE__ */ jsxs56(Layout, { width: "auto", className: "relative", children: [
8652
+ ) : cornerActions ? /* @__PURE__ */ jsxs60(Layout, { width: "auto", className: "relative", children: [
8274
8653
  children,
8275
8654
  cornerActions
8276
8655
  ] }) : children,
8277
- status && /* @__PURE__ */ jsx95(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
8656
+ status && /* @__PURE__ */ jsx108(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
8278
8657
  ]
8279
8658
  }
8280
8659
  ),
@@ -8283,7 +8662,7 @@ var Message = forwardRef35(
8283
8662
  ]
8284
8663
  }
8285
8664
  ),
8286
- showAuthor && showAuthorName && authorName && /* @__PURE__ */ jsx95(Text, { size: "xs", color: "grey-600", children: authorName })
8665
+ showAuthor && showAuthorName && authorName && /* @__PURE__ */ jsx108(Text, { size: "xs", color: "grey-600", children: authorName })
8287
8666
  ]
8288
8667
  })
8289
8668
  );
@@ -8292,8 +8671,8 @@ var Message = forwardRef35(
8292
8671
  Message.displayName = "Message";
8293
8672
 
8294
8673
  // src/ui/components/ui/MessageScroller.tsx
8295
- import { useLayoutEffect as useLayoutEffect2, useRef as useRef15 } from "react";
8296
- import { jsx as jsx96, jsxs as jsxs57 } from "react/jsx-runtime";
8674
+ import { useLayoutEffect as useLayoutEffect2, useRef as useRef17 } from "react";
8675
+ import { jsx as jsx109, jsxs as jsxs61 } from "react/jsx-runtime";
8297
8676
  var SEPARATOR_LINE = {
8298
8677
  neutral: "",
8299
8678
  alert: "bg-red-500"
@@ -8306,9 +8685,9 @@ var MessageDateSeparator = ({
8306
8685
  label,
8307
8686
  tone = "neutral",
8308
8687
  className
8309
- }) => /* @__PURE__ */ jsxs57(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
8310
- /* @__PURE__ */ jsx96(Layout, { flex: 1, children: /* @__PURE__ */ jsx96(Divider, { className: SEPARATOR_LINE[tone] }) }),
8311
- /* @__PURE__ */ jsx96(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ jsx96(
8688
+ }) => /* @__PURE__ */ jsxs61(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
8689
+ /* @__PURE__ */ jsx109(Layout, { flex: 1, children: /* @__PURE__ */ jsx109(Divider, { className: SEPARATOR_LINE[tone] }) }),
8690
+ /* @__PURE__ */ jsx109(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ jsx109(
8312
8691
  Text,
8313
8692
  {
8314
8693
  size: "xs",
@@ -8317,7 +8696,7 @@ var MessageDateSeparator = ({
8317
8696
  children: label
8318
8697
  }
8319
8698
  ) }),
8320
- /* @__PURE__ */ jsx96(Layout, { flex: 1, children: /* @__PURE__ */ jsx96(Divider, { className: SEPARATOR_LINE[tone] }) })
8699
+ /* @__PURE__ */ jsx109(Layout, { flex: 1, children: /* @__PURE__ */ jsx109(Divider, { className: SEPARATOR_LINE[tone] }) })
8321
8700
  ] });
8322
8701
  var MessageScroller = ({
8323
8702
  children,
@@ -8344,7 +8723,7 @@ var MessageScroller = ({
8344
8723
  viewportRef,
8345
8724
  className
8346
8725
  }) => {
8347
- const fallbackRef = useRef15(null);
8726
+ const fallbackRef = useRef17(null);
8348
8727
  const scrollerRef = viewportRef != null ? viewportRef : fallbackRef;
8349
8728
  useLayoutEffect2(() => {
8350
8729
  if (!autoScroll) return;
@@ -8357,13 +8736,13 @@ var MessageScroller = ({
8357
8736
  if (isEmpty && emptyState) return emptyState;
8358
8737
  return children;
8359
8738
  };
8360
- const scroller = /* @__PURE__ */ jsx96(
8739
+ const scroller = /* @__PURE__ */ jsx109(
8361
8740
  ScrollArea,
8362
8741
  {
8363
8742
  viewportRef: scrollerRef,
8364
8743
  className: cn("w-full", floatingFooter ? "min-h-0 flex-1" : className),
8365
8744
  style: typeof height === "number" ? { height: `${height}px` } : { height },
8366
- children: /* @__PURE__ */ jsxs57(
8745
+ children: /* @__PURE__ */ jsxs61(
8367
8746
  Layout,
8368
8747
  {
8369
8748
  column: true,
@@ -8386,9 +8765,9 @@ var MessageScroller = ({
8386
8765
  }
8387
8766
  );
8388
8767
  if (!floatingFooter) return scroller;
8389
- return /* @__PURE__ */ jsxs57(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
8768
+ return /* @__PURE__ */ jsxs61(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
8390
8769
  scroller,
8391
- /* @__PURE__ */ jsx96(
8770
+ /* @__PURE__ */ jsx109(
8392
8771
  Layout,
8393
8772
  {
8394
8773
  width: "auto",
@@ -8400,14 +8779,14 @@ var MessageScroller = ({
8400
8779
  };
8401
8780
 
8402
8781
  // src/ui/components/ui/Stepper.tsx
8403
- import { Fragment as Fragment11 } from "react";
8404
- import { jsx as jsx97, jsxs as jsxs58 } from "react/jsx-runtime";
8782
+ import { Fragment as Fragment12 } from "react";
8783
+ import { jsx as jsx110, jsxs as jsxs62 } from "react/jsx-runtime";
8405
8784
  var Stepper = ({
8406
8785
  numberOfSteps,
8407
8786
  current = 0,
8408
8787
  size = 28,
8409
8788
  className
8410
- }) => /* @__PURE__ */ jsx97(
8789
+ }) => /* @__PURE__ */ jsx110(
8411
8790
  "nav",
8412
8791
  {
8413
8792
  "aria-label": "progression",
@@ -8418,8 +8797,8 @@ var Stepper = ({
8418
8797
  children: Array.from({ length: numberOfSteps }, (_, i) => {
8419
8798
  const isActive = i === current;
8420
8799
  const isCompleted = i < current;
8421
- return /* @__PURE__ */ jsxs58(Fragment11, { children: [
8422
- /* @__PURE__ */ jsx97(
8800
+ return /* @__PURE__ */ jsxs62(Fragment12, { children: [
8801
+ /* @__PURE__ */ jsx110(
8423
8802
  "div",
8424
8803
  {
8425
8804
  "aria-hidden": true,
@@ -8428,17 +8807,17 @@ var Stepper = ({
8428
8807
  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"
8429
8808
  ),
8430
8809
  style: { width: size, height: size },
8431
- children: isCompleted ? /* @__PURE__ */ jsx97(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
8810
+ children: isCompleted ? /* @__PURE__ */ jsx110(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
8432
8811
  }
8433
8812
  ),
8434
- i < numberOfSteps - 1 && /* @__PURE__ */ jsx97("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
8813
+ i < numberOfSteps - 1 && /* @__PURE__ */ jsx110("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
8435
8814
  ] }, i);
8436
8815
  })
8437
8816
  }
8438
8817
  );
8439
8818
 
8440
8819
  // src/ui/components/ui/DatePicker.tsx
8441
- import { useState as useState20, useMemo as useMemo3 } from "react";
8820
+ import { useState as useState21, useMemo as useMemo3 } from "react";
8442
8821
  import { DayPicker } from "react-day-picker";
8443
8822
  import { fr } from "react-day-picker/locale";
8444
8823
  import "react-day-picker/style.css";
@@ -8457,7 +8836,7 @@ import {
8457
8836
  } from "date-fns";
8458
8837
  import { fr as dateFnsFr } from "date-fns/locale";
8459
8838
  import * as RadixPopover6 from "@radix-ui/react-popover";
8460
- import { jsx as jsx98, jsxs as jsxs59 } from "react/jsx-runtime";
8839
+ import { jsx as jsx111, jsxs as jsxs63 } from "react/jsx-runtime";
8461
8840
  var formatMonthCaption = (month) => format(month, "MMM yyyy", { locale: dateFnsFr });
8462
8841
  var isSameCalendarDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
8463
8842
  var parseTypedDate = (text, minDate, maxDate) => {
@@ -8475,10 +8854,19 @@ var parseTypedRange = (text, minDate, maxDate) => {
8475
8854
  if (!start || !end || start > end) return null;
8476
8855
  return [start, end];
8477
8856
  };
8857
+ var formatDigitsAsDate = (digits) => [digits.slice(0, 2), digits.slice(2, 4), digits.slice(4, 8)].filter(Boolean).join("/");
8858
+ var autoFormatTypedInput = (raw, isRange) => {
8859
+ const digits = raw.replace(/\D/g, "").slice(0, isRange ? 16 : 8);
8860
+ if (!isRange) return formatDigitsAsDate(digits);
8861
+ const first = digits.slice(0, 8);
8862
+ const second = digits.slice(8, 16);
8863
+ if (!second) return formatDigitsAsDate(first);
8864
+ return `${formatDigitsAsDate(first)} - ${formatDigitsAsDate(second)}`;
8865
+ };
8478
8866
  var RANGE_PRESETS = [
8479
8867
  {
8480
8868
  label: "Mois pr\xE9c\xE9dent",
8481
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-arrow-up", size: 15 }),
8869
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-arrow-up", size: 15 }),
8482
8870
  getValue: () => [
8483
8871
  startOfMonth(subMonths(/* @__PURE__ */ new Date(), 1)),
8484
8872
  endOfMonth(subMonths(/* @__PURE__ */ new Date(), 1))
@@ -8486,34 +8874,34 @@ var RANGE_PRESETS = [
8486
8874
  },
8487
8875
  {
8488
8876
  label: "Ce mois",
8489
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-days", size: 15 }),
8877
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-days", size: 15 }),
8490
8878
  getValue: () => [startOfMonth(/* @__PURE__ */ new Date()), endOfMonth(/* @__PURE__ */ new Date())]
8491
8879
  },
8492
8880
  {
8493
8881
  label: "Ce trimestre",
8494
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-range", size: 15 }),
8882
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-range", size: 15 }),
8495
8883
  getValue: () => [startOfQuarter(/* @__PURE__ */ new Date()), endOfQuarter(/* @__PURE__ */ new Date())]
8496
8884
  },
8497
8885
  {
8498
8886
  label: "Cette ann\xE9e",
8499
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-clock", size: 15 }),
8887
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-clock", size: 15 }),
8500
8888
  getValue: () => [startOfYear(/* @__PURE__ */ new Date()), endOfYear(/* @__PURE__ */ new Date())]
8501
8889
  }
8502
8890
  ];
8503
8891
  var SINGLE_PRESETS = [
8504
8892
  {
8505
8893
  label: "Aujourd'hui",
8506
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-days", size: 15 }),
8894
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-days", size: 15 }),
8507
8895
  getValue: () => /* @__PURE__ */ new Date()
8508
8896
  },
8509
8897
  {
8510
8898
  label: "Demain",
8511
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-plus", size: 15 }),
8899
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-plus", size: 15 }),
8512
8900
  getValue: () => addDays(/* @__PURE__ */ new Date(), 1)
8513
8901
  },
8514
8902
  {
8515
8903
  label: "Dans 7 jours",
8516
- icon: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar-clock", size: 15 }),
8904
+ icon: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar-clock", size: 15 }),
8517
8905
  getValue: () => addDays(/* @__PURE__ */ new Date(), 7)
8518
8906
  }
8519
8907
  ];
@@ -8535,10 +8923,10 @@ var DatePicker = ({
8535
8923
  className
8536
8924
  }) => {
8537
8925
  const isRange = mode === "range";
8538
- const [open, setOpen] = useState20(false);
8539
- const [isEditing, setIsEditing] = useState20(false);
8540
- const [draftValue, setDraftValue] = useState20("");
8541
- const [isDirty, setIsDirty] = useState20(false);
8926
+ const [open, setOpen] = useState21(false);
8927
+ const [isEditing, setIsEditing] = useState21(false);
8928
+ const [draftValue, setDraftValue] = useState21("");
8929
+ const [isDirty, setIsDirty] = useState21(false);
8542
8930
  const resolvedPresets = presets != null ? presets : isRange ? RANGE_PRESETS : SINGLE_PRESETS;
8543
8931
  const activePreset = useMemo3(() => {
8544
8932
  var _a;
@@ -8601,7 +8989,7 @@ var DatePicker = ({
8601
8989
  setIsEditing(false);
8602
8990
  }
8603
8991
  };
8604
- const calendar = /* @__PURE__ */ jsx98(RadixPopover6.Portal, { children: /* @__PURE__ */ jsx98(
8992
+ const calendar = /* @__PURE__ */ jsx111(RadixPopover6.Portal, { children: /* @__PURE__ */ jsx111(
8605
8993
  RadixPopover6.Content,
8606
8994
  {
8607
8995
  align,
@@ -8613,7 +9001,7 @@ var DatePicker = ({
8613
9001
  // mois (range) passait à la ligne et se faisait couper par max-h.
8614
9002
  isRange && "max-h-[320px] max-w-[460px] overflow-y-auto [&_.rdp-months]:flex-nowrap"
8615
9003
  ),
8616
- children: isRange ? /* @__PURE__ */ jsx98(
9004
+ children: isRange ? /* @__PURE__ */ jsx111(
8617
9005
  DayPicker,
8618
9006
  {
8619
9007
  mode: "range",
@@ -8631,7 +9019,7 @@ var DatePicker = ({
8631
9019
  showOutsideDays: true,
8632
9020
  formatters: { formatCaption: formatMonthCaption }
8633
9021
  }
8634
- ) : /* @__PURE__ */ jsx98(
9022
+ ) : /* @__PURE__ */ jsx111(
8635
9023
  DayPicker,
8636
9024
  {
8637
9025
  mode: "single",
@@ -8649,8 +9037,8 @@ var DatePicker = ({
8649
9037
  }
8650
9038
  ) });
8651
9039
  if (!showPresets) {
8652
- return /* @__PURE__ */ jsxs59(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8653
- /* @__PURE__ */ jsx98(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs59(
9040
+ return /* @__PURE__ */ jsxs63(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9041
+ /* @__PURE__ */ jsx111(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ jsxs63(
8654
9042
  Layout,
8655
9043
  {
8656
9044
  align: "center",
@@ -8664,7 +9052,7 @@ var DatePicker = ({
8664
9052
  className
8665
9053
  ),
8666
9054
  children: [
8667
- /* @__PURE__ */ jsx98(
9055
+ /* @__PURE__ */ jsx111(
8668
9056
  "input",
8669
9057
  {
8670
9058
  type: "text",
@@ -8673,7 +9061,7 @@ var DatePicker = ({
8673
9061
  placeholder: isRange ? "jj/mm/aaaa - jj/mm/aaaa" : "jj/mm/aaaa",
8674
9062
  onFocus: startEditing,
8675
9063
  onChange: (event) => {
8676
- setDraftValue(event.target.value);
9064
+ setDraftValue(autoFormatTypedInput(event.target.value, isRange));
8677
9065
  setIsDirty(true);
8678
9066
  },
8679
9067
  onBlur: commitDraft,
@@ -8685,14 +9073,14 @@ var DatePicker = ({
8685
9073
  )
8686
9074
  }
8687
9075
  ),
8688
- /* @__PURE__ */ jsx98(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx98(
9076
+ /* @__PURE__ */ jsx111(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx111(
8689
9077
  "button",
8690
9078
  {
8691
9079
  type: "button",
8692
9080
  "aria-label": "Ouvrir le calendrier",
8693
9081
  disabled,
8694
9082
  className: "flex h-full w-8 shrink-0 items-center justify-center text-grey-500 hover:text-blue-700 disabled:cursor-not-allowed",
8695
- children: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar", size: 14 })
9083
+ children: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar", size: 14 })
8696
9084
  }
8697
9085
  ) })
8698
9086
  ]
@@ -8701,10 +9089,10 @@ var DatePicker = ({
8701
9089
  calendar
8702
9090
  ] });
8703
9091
  }
8704
- return /* @__PURE__ */ jsxs59(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8705
- /* @__PURE__ */ jsxs59(Layout, { column: true, gap: 1.5, align, className, children: [
8706
- /* @__PURE__ */ jsxs59(Layout, { align: "center", gap: 1.5, width: "auto", children: [
8707
- /* @__PURE__ */ jsx98(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx98(
9092
+ return /* @__PURE__ */ jsxs63(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9093
+ /* @__PURE__ */ jsxs63(Layout, { column: true, gap: 1.5, align, className, children: [
9094
+ /* @__PURE__ */ jsxs63(Layout, { align: "center", gap: 1.5, width: "auto", children: [
9095
+ /* @__PURE__ */ jsx111(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx111(
8708
9096
  "button",
8709
9097
  {
8710
9098
  type: "button",
@@ -8716,12 +9104,12 @@ var DatePicker = ({
8716
9104
  hasValue && !activePreset ? "border-blue-700 bg-blue-50 text-blue-700" : "border-grey-300 bg-white text-neutral-800 hover:border-blue-700",
8717
9105
  "disabled:cursor-not-allowed disabled:opacity-60"
8718
9106
  ),
8719
- children: /* @__PURE__ */ jsx98(FaIcon, { name: "calendar", size: 16 })
9107
+ children: /* @__PURE__ */ jsx111(FaIcon, { name: "calendar", size: 16 })
8720
9108
  }
8721
9109
  ) }),
8722
9110
  resolvedPresets.map((preset) => {
8723
9111
  const active = activePreset === preset.label;
8724
- return /* @__PURE__ */ jsx98(Tooltip, { content: preset.label, children: /* @__PURE__ */ jsx98(
9112
+ return /* @__PURE__ */ jsx111(Tooltip, { content: preset.label, children: /* @__PURE__ */ jsx111(
8725
9113
  "button",
8726
9114
  {
8727
9115
  type: "button",
@@ -8739,7 +9127,7 @@ var DatePicker = ({
8739
9127
  ) }, preset.label);
8740
9128
  })
8741
9129
  ] }),
8742
- hasValue && /* @__PURE__ */ jsx98(
9130
+ hasValue && /* @__PURE__ */ jsx111(
8743
9131
  "button",
8744
9132
  {
8745
9133
  type: "button",
@@ -9208,9 +9596,9 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
9208
9596
  };
9209
9597
 
9210
9598
  // src/ui/components/ui/Tour.tsx
9211
- import { useEffect as useEffect11, useRef as useRef16 } from "react";
9599
+ import { useEffect as useEffect11, useRef as useRef18 } from "react";
9212
9600
  import { driver } from "driver.js";
9213
- import { jsx as jsx99 } from "react/jsx-runtime";
9601
+ import { jsx as jsx112 } from "react/jsx-runtime";
9214
9602
  var TOUR_TARGET_ATTRIBUTE = "data-tour-target";
9215
9603
  var DEFAULT_LABELS = {
9216
9604
  previous: "Pr\xE9c\xE9dent",
@@ -9222,7 +9610,7 @@ var DEFAULT_LABELS = {
9222
9610
  var STAGE_PADDING = 6;
9223
9611
  var GHOST_TRANSITION_MS = 200;
9224
9612
  var HIGHLIGHT_DURATION_MS = 400;
9225
- var TourTarget = ({ id, children }) => /* @__PURE__ */ jsx99("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
9613
+ var TourTarget = ({ id, children }) => /* @__PURE__ */ jsx112("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
9226
9614
  var isContents = (element) => getComputedStyle(element).display === "contents";
9227
9615
  var measure = (element) => {
9228
9616
  if (!isContents(element)) {
@@ -9263,9 +9651,9 @@ var Tour = ({
9263
9651
  const current = steps[step];
9264
9652
  const total = steps.length;
9265
9653
  const isLast = step === total - 1;
9266
- const driverRef = useRef16(null);
9267
- const ghostRef = useRef16(null);
9268
- const actions = useRef16({
9654
+ const driverRef = useRef18(null);
9655
+ const ghostRef = useRef18(null);
9656
+ const actions = useRef18({
9269
9657
  next: () => {
9270
9658
  },
9271
9659
  previous: () => {
@@ -9318,7 +9706,7 @@ var Tour = ({
9318
9706
  window.addEventListener("keydown", onKeyDown, true);
9319
9707
  return () => window.removeEventListener("keydown", onKeyDown, true);
9320
9708
  }, [open]);
9321
- const view = useRef16({ current, text, step, total, isLast });
9709
+ const view = useRef18({ current, text, step, total, isLast });
9322
9710
  view.current = { current, text, step, total, isLast };
9323
9711
  const targetKey = [(_a = current == null ? void 0 : current.target) != null ? _a : []].flat().join("|");
9324
9712
  const popoverKey = [
@@ -9529,14 +9917,24 @@ export {
9529
9917
  Switch,
9530
9918
  TOUR_TARGET_ATTRIBUTE,
9531
9919
  Table,
9920
+ TableActionsCell,
9921
+ TableAlertRow,
9532
9922
  TableCell,
9923
+ TableClientCell,
9924
+ TableExpandedRow,
9533
9925
  TableFooter,
9534
9926
  TableFooterCell,
9535
9927
  TableFooterRow,
9536
9928
  TableHeader,
9537
9929
  TableHeaderCell,
9538
9930
  TableHeaderRow,
9931
+ TablePersonCell,
9539
9932
  TableRow,
9933
+ TableSectionRow,
9934
+ TableSelectCell,
9935
+ TableSelectHeaderCell,
9936
+ TableStatusCell,
9937
+ TableSubgroupRow,
9540
9938
  Tabs,
9541
9939
  TagBubble,
9542
9940
  TagLevelPicker,
@@ -9601,5 +9999,6 @@ export {
9601
9999
  toast,
9602
10000
  truncateFileName,
9603
10001
  truncateText,
9604
- useAvatarSize
10002
+ useAvatarSize,
10003
+ useRowSelection
9605
10004
  };