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.js CHANGED
@@ -163,14 +163,24 @@ __export(index_exports, {
163
163
  Switch: () => Switch,
164
164
  TOUR_TARGET_ATTRIBUTE: () => TOUR_TARGET_ATTRIBUTE,
165
165
  Table: () => Table,
166
+ TableActionsCell: () => TableActionsCell,
167
+ TableAlertRow: () => TableAlertRow,
166
168
  TableCell: () => TableCell,
169
+ TableClientCell: () => TableClientCell,
170
+ TableExpandedRow: () => TableExpandedRow,
167
171
  TableFooter: () => TableFooter,
168
172
  TableFooterCell: () => TableFooterCell,
169
173
  TableFooterRow: () => TableFooterRow,
170
174
  TableHeader: () => TableHeader,
171
175
  TableHeaderCell: () => TableHeaderCell,
172
176
  TableHeaderRow: () => TableHeaderRow,
177
+ TablePersonCell: () => TablePersonCell,
173
178
  TableRow: () => TableRow,
179
+ TableSectionRow: () => TableSectionRow,
180
+ TableSelectCell: () => TableSelectCell,
181
+ TableSelectHeaderCell: () => TableSelectHeaderCell,
182
+ TableStatusCell: () => TableStatusCell,
183
+ TableSubgroupRow: () => TableSubgroupRow,
174
184
  Tabs: () => Tabs,
175
185
  TagBubble: () => TagBubble,
176
186
  TagLevelPicker: () => TagLevelPicker,
@@ -235,7 +245,8 @@ __export(index_exports, {
235
245
  toast: () => toast,
236
246
  truncateFileName: () => truncateFileName,
237
247
  truncateText: () => truncateText,
238
- useAvatarSize: () => useAvatarSize
248
+ useAvatarSize: () => useAvatarSize,
249
+ useRowSelection: () => useRowSelection
239
250
  });
240
251
  module.exports = __toCommonJS(index_exports);
241
252
 
@@ -1900,19 +1911,19 @@ var checkboxVariants = (0, import_class_variance_authority9.cva)(
1900
1911
  {
1901
1912
  variants: {
1902
1913
  color: {
1903
- "blue-700": "data-[state=checked]:border-blue-700 data-[state=checked]:bg-blue-700",
1904
- "blue-900": "data-[state=checked]:border-blue-900 data-[state=checked]:bg-blue-900",
1905
- "blue-950": "data-[state=checked]:border-blue-950 data-[state=checked]:bg-blue-950",
1906
- "red-900": "data-[state=checked]:border-red-900 data-[state=checked]:bg-red-900",
1907
- "red-500": "data-[state=checked]:border-red-500 data-[state=checked]:bg-red-500",
1908
- "green-700": "data-[state=checked]:border-green-700 data-[state=checked]:bg-green-700",
1909
- "green-100": "data-[state=checked]:border-green-100 data-[state=checked]:bg-green-100",
1910
- "grey-600": "data-[state=checked]:border-grey-600 data-[state=checked]:bg-grey-600",
1911
- "yellow-500": "data-[state=checked]:border-yellow-500 data-[state=checked]:bg-yellow-500",
1912
- "yellow-300": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-300",
1913
- "yellow-200": "data-[state=checked]:border-yellow-200 data-[state=checked]:bg-yellow-200",
1914
- "orange-600": "data-[state=checked]:border-orange-600 data-[state=checked]:bg-orange-600",
1915
- "purple-700": "data-[state=checked]:border-purple-700 data-[state=checked]:bg-purple-700"
1914
+ "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",
1915
+ "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",
1916
+ "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",
1917
+ "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",
1918
+ "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",
1919
+ "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",
1920
+ "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",
1921
+ "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",
1922
+ "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",
1923
+ "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",
1924
+ "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",
1925
+ "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",
1926
+ "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"
1916
1927
  },
1917
1928
  size: {
1918
1929
  s: "h-3.5 w-3.5",
@@ -1952,7 +1963,7 @@ var Checkbox = (_a) => {
1952
1963
  children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(RadixCheckbox.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1953
1964
  FaIcon,
1954
1965
  {
1955
- name: "check",
1966
+ name: props.checked === "indeterminate" ? "minus" : "check",
1956
1967
  family: "solid",
1957
1968
  size: CHECK_ICON_SIZE[size != null ? size : "m"]
1958
1969
  }
@@ -3472,13 +3483,113 @@ var EmptyState = ({
3472
3483
  }
3473
3484
  );
3474
3485
 
3475
- // src/ui/components/ui/table/TableBody.tsx
3486
+ // src/ui/components/ui/Bulk.tsx
3476
3487
  var import_jsx_runtime35 = require("react/jsx-runtime");
3488
+ var BG_CLASS = {
3489
+ "blue-700": "bg-blue-700",
3490
+ "blue-900": "bg-blue-900",
3491
+ "blue-950": "bg-blue-950",
3492
+ "red-900": "bg-red-900",
3493
+ "red-500": "bg-red-500",
3494
+ "green-700": "bg-green-700",
3495
+ "green-100": "bg-green-100",
3496
+ "grey-600": "bg-grey-600",
3497
+ "yellow-500": "bg-yellow-500",
3498
+ "yellow-300": "bg-yellow-300",
3499
+ "yellow-200": "bg-yellow-200",
3500
+ "orange-600": "bg-orange-600",
3501
+ "purple-700": "bg-purple-700"
3502
+ };
3503
+ var BulkActionSections = ({ sections }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3504
+ Layout,
3505
+ {
3506
+ role: "group",
3507
+ fullHeight: true,
3508
+ align: "stretch",
3509
+ className: "[&>button:not(:last-child)]:rounded-r-none",
3510
+ children: sections.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3511
+ "button",
3512
+ {
3513
+ type: "button",
3514
+ disabled: section.disabled,
3515
+ onClick: section.disabled ? void 0 : section.action,
3516
+ className: cn(
3517
+ "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]",
3518
+ section.disabled ? "cursor-not-allowed bg-grey-500" : "hover:brightness-90"
3519
+ ),
3520
+ children: [
3521
+ section.icon,
3522
+ section.title
3523
+ ]
3524
+ },
3525
+ index
3526
+ ))
3527
+ }
3528
+ );
3529
+ var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Layout, { align: "center", gap: 3, className: "px-4", children: sections.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Layout, { align: "center", gap: 3, children: [
3530
+ index > 0 && (section.divider ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "h-11 w-px shrink-0 bg-white/40" }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "h-0.5 w-4 shrink-0 rounded-full bg-white/50" })),
3531
+ section.action ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3532
+ "button",
3533
+ {
3534
+ type: "button",
3535
+ disabled: section.disabled,
3536
+ onClick: section.disabled ? void 0 : section.action,
3537
+ className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white hover:opacity-80",
3538
+ children: [
3539
+ section.icon,
3540
+ section.title
3541
+ ]
3542
+ }
3543
+ ) : section.caption ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Layout, { column: true, fullWidth: false, className: "leading-tight text-white", children: [
3544
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "whitespace-nowrap text-[10px] font-bold uppercase tracking-wide opacity-70", children: section.caption }),
3545
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "whitespace-nowrap text-sm font-bold", children: section.title })
3546
+ ] }) : section.badge ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "whitespace-nowrap rounded-full bg-white/15 px-2.5 py-1 text-xs font-bold text-white", children: section.title }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white", children: [
3547
+ section.icon,
3548
+ section.title
3549
+ ] })
3550
+ ] }, index)) });
3551
+ var Bulk = ({
3552
+ onClose,
3553
+ leftTitle,
3554
+ sections,
3555
+ color = "blue-700",
3556
+ className,
3557
+ variant = "actions"
3558
+ }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3559
+ "div",
3560
+ {
3561
+ className: cn(
3562
+ "fixed bottom-[50px] left-1/2 z-[500] inline-flex h-[52px] -translate-x-1/2 items-center rounded-xl pl-4 text-white",
3563
+ BG_CLASS[color],
3564
+ className
3565
+ ),
3566
+ children: [
3567
+ leftTitle && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(Layout, { align: "center", gap: 6, className: "pr-6", children: [
3568
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3569
+ "button",
3570
+ {
3571
+ type: "button",
3572
+ "aria-label": "Fermer",
3573
+ onClick: onClose,
3574
+ className: "text-white hover:opacity-80",
3575
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(FaIcon, { name: "xmark", size: 20 })
3576
+ }
3577
+ ),
3578
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "whitespace-nowrap text-sm font-bold", children: leftTitle }),
3579
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "h-11 w-px bg-white/40" })
3580
+ ] }),
3581
+ variant === "display" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BulkDisplaySections, { sections }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(BulkActionSections, { sections })
3582
+ ]
3583
+ }
3584
+ );
3585
+
3586
+ // src/ui/components/ui/table/TableBody.tsx
3587
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3477
3588
  var TableBody = ({
3478
3589
  children,
3479
3590
  useEvenBackground,
3480
3591
  className
3481
- }) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3592
+ }) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3482
3593
  "tbody",
3483
3594
  {
3484
3595
  className: cn(
@@ -3490,8 +3601,298 @@ var TableBody = ({
3490
3601
  }
3491
3602
  );
3492
3603
 
3604
+ // src/ui/components/ui/Skeleton.tsx
3605
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3606
+ var toCss = (value) => typeof value === "number" ? `${value}px` : value;
3607
+ var Skeleton = (_a) => {
3608
+ var _b = _a, {
3609
+ width,
3610
+ height,
3611
+ isRound = false,
3612
+ className,
3613
+ style
3614
+ } = _b, props = __objRest(_b, [
3615
+ "width",
3616
+ "height",
3617
+ "isRound",
3618
+ "className",
3619
+ "style"
3620
+ ]);
3621
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3622
+ "div",
3623
+ __spreadValues({
3624
+ className: cn(
3625
+ "animate-pulse bg-grey-200",
3626
+ isRound ? "rounded-full" : "rounded-md",
3627
+ className
3628
+ ),
3629
+ style: __spreadValues({ width: toCss(width), height: toCss(height) }, style)
3630
+ }, props)
3631
+ );
3632
+ };
3633
+
3634
+ // src/ui/components/ui/table/TableLoadingRows.tsx
3635
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3636
+ var TableLoadingRows = ({ count }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex flex-col", children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3637
+ "div",
3638
+ {
3639
+ className: "flex h-10 items-center border-t border-grey-200 px-2",
3640
+ children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Skeleton, { height: 14, "data-testid": "table-skeleton" })
3641
+ },
3642
+ index
3643
+ )) });
3644
+
3645
+ // src/ui/components/ui/TagBubble.tsx
3646
+ var RadixToggle = __toESM(require("@radix-ui/react-toggle"));
3647
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3648
+ var DOT_CLASS = {
3649
+ "blue-700": "bg-blue-700",
3650
+ "blue-900": "bg-blue-900",
3651
+ "blue-950": "bg-blue-950",
3652
+ "red-900": "bg-red-900",
3653
+ "red-500": "bg-red-500",
3654
+ "green-700": "bg-green-700",
3655
+ "green-100": "bg-green-100",
3656
+ "grey-600": "bg-grey-400",
3657
+ "yellow-500": "bg-yellow-500",
3658
+ "yellow-300": "bg-yellow-300",
3659
+ "yellow-200": "bg-yellow-200",
3660
+ "orange-600": "bg-orange-600",
3661
+ "purple-700": "bg-purple-700"
3662
+ };
3663
+ var LIGHT_BG_CLASS = {
3664
+ "blue-700": "bg-blue-50",
3665
+ "blue-900": "bg-blue-50",
3666
+ "blue-950": "bg-blue-50",
3667
+ "red-900": "bg-red-50",
3668
+ "red-500": "bg-red-50",
3669
+ "green-700": "bg-green-50",
3670
+ "green-100": "bg-green-50",
3671
+ "grey-600": "bg-grey-100",
3672
+ "yellow-500": "bg-yellow-50",
3673
+ "yellow-300": "bg-yellow-50",
3674
+ "yellow-200": "bg-yellow-50",
3675
+ "orange-600": "bg-orange-50",
3676
+ "purple-700": "bg-purple-50"
3677
+ };
3678
+ var TEXT_CLASS = {
3679
+ "blue-700": "text-blue-700",
3680
+ "blue-900": "text-blue-900",
3681
+ "blue-950": "text-blue-950",
3682
+ "red-900": "text-red-900",
3683
+ "red-500": "text-red-500",
3684
+ "green-700": "text-green-700",
3685
+ "green-100": "text-green-100",
3686
+ "grey-600": "text-grey-600",
3687
+ "yellow-500": "text-yellow-500",
3688
+ "yellow-300": "text-yellow-300",
3689
+ "yellow-200": "text-yellow-200",
3690
+ "orange-600": "text-orange-600",
3691
+ "purple-700": "text-purple-700"
3692
+ };
3693
+ var BORDER_CLASS = {
3694
+ "blue-700": "border-blue-700",
3695
+ "blue-900": "border-blue-900",
3696
+ "blue-950": "border-blue-950",
3697
+ "red-900": "border-red-900",
3698
+ "red-500": "border-red-500",
3699
+ "green-700": "border-green-700",
3700
+ "green-100": "border-green-100",
3701
+ "grey-600": "border-grey-600",
3702
+ "yellow-500": "border-yellow-500",
3703
+ "yellow-300": "border-yellow-300",
3704
+ "yellow-200": "border-yellow-200",
3705
+ "orange-600": "border-orange-600",
3706
+ "purple-700": "border-purple-700"
3707
+ };
3708
+ var isHexColor = (color) => color.startsWith("#");
3709
+ var TagBubble = (_a) => {
3710
+ var _b = _a, {
3711
+ label,
3712
+ hideDot = false,
3713
+ active = false,
3714
+ activeColor = "blue-700",
3715
+ inactiveColor = "grey-600",
3716
+ activeFill = false,
3717
+ pill = false,
3718
+ size = "s",
3719
+ count,
3720
+ countColor = "green-700",
3721
+ onClick,
3722
+ className
3723
+ } = _b, rest = __objRest(_b, [
3724
+ "label",
3725
+ "hideDot",
3726
+ "active",
3727
+ "activeColor",
3728
+ "inactiveColor",
3729
+ "activeFill",
3730
+ "pill",
3731
+ "size",
3732
+ "count",
3733
+ "countColor",
3734
+ "onClick",
3735
+ "className"
3736
+ ]);
3737
+ const showCount = count !== void 0 && count !== null;
3738
+ const filled = activeFill && active;
3739
+ const dotColor = active ? activeColor : inactiveColor;
3740
+ const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
3741
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
3742
+ RadixToggle.Root,
3743
+ __spreadProps(__spreadValues({}, rest), {
3744
+ type: "button",
3745
+ pressed: active,
3746
+ onClick,
3747
+ style: __spreadValues({ borderColor: filledHexColor }, rest.style),
3748
+ className: cn(
3749
+ "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
3750
+ pill ? "rounded-full" : "rounded-[6px]",
3751
+ size === "m" && "h-9",
3752
+ filled ? cn(
3753
+ isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
3754
+ "border-2"
3755
+ ) : "border-grey-200 bg-white",
3756
+ "focus-visible:ring-2 focus-visible:ring-blue-200",
3757
+ className
3758
+ ),
3759
+ children: [
3760
+ !hideDot && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3761
+ "span",
3762
+ {
3763
+ className: cn(
3764
+ "h-2 w-2 shrink-0 rounded-full",
3765
+ !isHexColor(dotColor) && DOT_CLASS[dotColor]
3766
+ ),
3767
+ style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
3768
+ }
3769
+ ),
3770
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3771
+ "span",
3772
+ {
3773
+ className: cn(
3774
+ "whitespace-nowrap text-xs font-semibold",
3775
+ filled ? !isHexColor(activeColor) && TEXT_CLASS[activeColor] : "text-neutral-800"
3776
+ ),
3777
+ style: { color: filledHexColor },
3778
+ children: label
3779
+ }
3780
+ ),
3781
+ showCount && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Badge, { theme: countColor, size: "s", children: count })
3782
+ ]
3783
+ })
3784
+ );
3785
+ };
3786
+
3787
+ // src/ui/components/ui/table/TableToolbar.tsx
3788
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3789
+ var TableToolbar = ({
3790
+ search,
3791
+ statusFilters,
3792
+ onStatusFilterToggle,
3793
+ onFiltersClick,
3794
+ onExport
3795
+ }) => {
3796
+ var _a;
3797
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3798
+ Layout,
3799
+ {
3800
+ row: true,
3801
+ gap: 3,
3802
+ align: "center",
3803
+ justify: "between",
3804
+ className: "border-b border-grey-200 bg-white p-3",
3805
+ children: [
3806
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Layout, { row: true, gap: 3, align: "center", className: "min-w-0", children: [
3807
+ search && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "w-64 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3808
+ SearchInput,
3809
+ {
3810
+ "aria-label": "Rechercher",
3811
+ value: search.value,
3812
+ placeholder: (_a = search.placeholder) != null ? _a : "Rechercher",
3813
+ onChange: (event) => search.onChange(event.target.value),
3814
+ onClear: () => search.onChange("")
3815
+ }
3816
+ ) }),
3817
+ statusFilters == null ? void 0 : statusFilters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3818
+ TagBubble,
3819
+ {
3820
+ size: "m",
3821
+ pill: true,
3822
+ label: filter.label,
3823
+ count: filter.count,
3824
+ active: filter.isActive,
3825
+ activeColor: filter.color,
3826
+ activeFill: true,
3827
+ onClick: () => onStatusFilterToggle == null ? void 0 : onStatusFilterToggle(filter.id)
3828
+ },
3829
+ filter.id
3830
+ ))
3831
+ ] }),
3832
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(Layout, { row: true, gap: 2, align: "center", fullWidth: false, children: [
3833
+ onFiltersClick && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3834
+ Button,
3835
+ {
3836
+ variant: "outline",
3837
+ label: "Filtres",
3838
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FaIcon, { name: "filter", size: 14 }),
3839
+ onClick: onFiltersClick
3840
+ }
3841
+ ),
3842
+ onExport && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3843
+ Button,
3844
+ {
3845
+ variant: "outline",
3846
+ label: "Exporter",
3847
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(FaIcon, { name: "download", size: 14 }),
3848
+ onClick: onExport
3849
+ }
3850
+ )
3851
+ ] })
3852
+ ]
3853
+ }
3854
+ );
3855
+ };
3856
+
3857
+ // src/ui/components/ui/table/TableSelectAllResultsBar.tsx
3858
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3859
+ var TableSelectAllResultsBar = ({
3860
+ selection
3861
+ }) => {
3862
+ if (selection.isAllResultsSelected)
3863
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "border-b border-grey-200 bg-blue-50 px-3 py-2 text-center text-xs font-semibold text-blue-900", children: [
3864
+ `Les ${selection.totalCount} r\xE9sultats sont s\xE9lectionn\xE9s.`,
3865
+ " ",
3866
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3867
+ "button",
3868
+ {
3869
+ type: "button",
3870
+ onClick: selection.clear,
3871
+ className: "font-bold underline",
3872
+ children: "Annuler la s\xE9lection"
3873
+ }
3874
+ )
3875
+ ] });
3876
+ if (selection.canSelectAllResults)
3877
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "border-b border-grey-200 bg-blue-50 px-3 py-2 text-center text-xs font-semibold text-blue-900", children: [
3878
+ "Toutes les lignes de la page sont s\xE9lectionn\xE9es. ",
3879
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3880
+ "button",
3881
+ {
3882
+ type: "button",
3883
+ onClick: selection.selectAllResults,
3884
+ className: "font-bold underline",
3885
+ children: `S\xE9lectionner les ${selection.totalCount} r\xE9sultats`
3886
+ }
3887
+ )
3888
+ ] });
3889
+ return null;
3890
+ };
3891
+
3493
3892
  // src/ui/components/ui/table/Table.tsx
3494
- var import_jsx_runtime36 = require("react/jsx-runtime");
3893
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3894
+ var DEFAULT_LOADING_ROW_COUNT = 5;
3895
+ var formatSelectedCount = (count) => `${count} s\xE9lectionn\xE9${count > 1 ? "s" : ""}`;
3495
3896
  var Table = ({
3496
3897
  width,
3497
3898
  header,
@@ -3504,84 +3905,106 @@ var Table = ({
3504
3905
  minWidth,
3505
3906
  className,
3506
3907
  pagination,
3507
- zebra = false,
3908
+ variant,
3909
+ toolbar,
3910
+ selection,
3911
+ zebra,
3508
3912
  borderLeft = false
3509
3913
  }) => {
3510
- const isEmpty = !loading && rows.length === 0;
3511
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3512
- "div",
3513
- {
3514
- className: cn(
3515
- "flex flex-col overflow-auto rounded-lg border border-grey-300",
3516
- className
3517
- ),
3518
- style: {
3519
- maxHeight: maxHeight || "none",
3520
- minHeight: minHeight || void 0,
3521
- width: width || "100%"
3522
- },
3523
- children: [
3524
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3525
- "table",
3526
- {
3527
- className: cn(
3528
- // `border-separate` : les bordures posées sur une cellule (ex. un
3529
- // liseré de statut sur une colonne sticky) sont peintes avec la
3530
- // boîte de la cellule et suivent son repositionnement sticky. Avec
3531
- // le `border-collapse` par défaut du preflight Tailwind, ces
3532
- // bordures sont peintes par le modèle de fusion du tableau et
3533
- // restent à la position d'origine dans la grille au scroll.
3534
- "w-full table-fixed border-separate border-spacing-0 caption-bottom text-[13px]",
3535
- 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"
3536
- ),
3537
- style: { minWidth: minWidth || void 0 },
3538
- children: [
3539
- header,
3540
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(TableBody, { useEvenBackground: zebra, children: rows }),
3541
- footer
3542
- ]
3543
- }
3544
- ),
3545
- emptyState && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3546
- EmptyState,
3547
- {
3548
- icon: emptyState.icon,
3549
- title: emptyState.label,
3550
- description: emptyState.description,
3551
- actionLabel: emptyState.buttonLabel,
3552
- onAction: emptyState.action
3553
- }
3914
+ var _a;
3915
+ const isZebra = (variant != null ? variant : zebra === false ? "lined" : "zebra") === "zebra";
3916
+ const loadingRowCount = (_a = pagination == null ? void 0 : pagination.itemsPerPage) != null ? _a : DEFAULT_LOADING_ROW_COUNT;
3917
+ const hasRows = rows.length > 0;
3918
+ const isEmpty = !loading && !hasRows;
3919
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_jsx_runtime42.Fragment, { children: [
3920
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3921
+ "div",
3922
+ {
3923
+ className: cn(
3924
+ "flex flex-col overflow-auto rounded-lg border border-grey-300",
3925
+ className
3554
3926
  ),
3555
- pagination && !loading && pagination.totalItems > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "border-t border-grey-300 p-3", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3556
- Pagination,
3557
- {
3558
- currentPage: pagination.currentPage,
3559
- totalItems: pagination.totalItems,
3560
- itemsPerPage: pagination.itemsPerPage,
3561
- onPageChange: pagination.onPageChange
3562
- }
3563
- ) })
3564
- ]
3565
- }
3566
- );
3927
+ style: {
3928
+ maxHeight: maxHeight || "none",
3929
+ minHeight: minHeight || void 0,
3930
+ width: width || "100%"
3931
+ },
3932
+ children: [
3933
+ toolbar && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableToolbar, __spreadValues({}, toolbar)),
3934
+ selection && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableSelectAllResultsBar, { selection: selection.state }),
3935
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3936
+ "table",
3937
+ {
3938
+ "aria-busy": loading || void 0,
3939
+ className: cn(
3940
+ // `border-separate` : les bordures posées sur une cellule (ex. un
3941
+ // liseré de statut sur une colonne sticky) sont peintes avec la
3942
+ // boîte de la cellule et suivent son repositionnement sticky. Avec
3943
+ // le `border-collapse` par défaut du preflight Tailwind, ces
3944
+ // bordures sont peintes par le modèle de fusion du tableau et
3945
+ // restent à la position d'origine dans la grille au scroll.
3946
+ "w-full table-fixed border-separate border-spacing-0 caption-bottom text-xs",
3947
+ "[&_tr>*:first-child:not(.table-select-cell)]:text-left [&_tr>.table-select-cell:first-child+*]:text-left [&_tr>*:not(:first-child)]:text-center",
3948
+ 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"
3949
+ ),
3950
+ style: { minWidth: minWidth || void 0 },
3951
+ children: [
3952
+ header,
3953
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableBody, { useEvenBackground: isZebra, children: rows }),
3954
+ footer
3955
+ ]
3956
+ }
3957
+ ),
3958
+ loading && !hasRows && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(TableLoadingRows, { count: loadingRowCount }),
3959
+ emptyState && isEmpty && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3960
+ EmptyState,
3961
+ {
3962
+ icon: emptyState.icon,
3963
+ title: emptyState.label,
3964
+ description: emptyState.description,
3965
+ actionLabel: emptyState.buttonLabel,
3966
+ onAction: emptyState.action
3967
+ }
3968
+ ),
3969
+ pagination && !loading && pagination.totalItems > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "border-t border-grey-300 p-3", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3970
+ Pagination,
3971
+ {
3972
+ currentPage: pagination.currentPage,
3973
+ totalItems: pagination.totalItems,
3974
+ itemsPerPage: pagination.itemsPerPage,
3975
+ onPageChange: pagination.onPageChange
3976
+ }
3977
+ ) })
3978
+ ]
3979
+ }
3980
+ ),
3981
+ selection && selection.state.selectedCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3982
+ Bulk,
3983
+ {
3984
+ leftTitle: formatSelectedCount(selection.state.selectedCount),
3985
+ onClose: selection.state.clear,
3986
+ sections: selection.bulkSections
3987
+ }
3988
+ )
3989
+ ] });
3567
3990
  };
3568
3991
 
3569
3992
  // src/ui/components/ui/table/TableHeader.tsx
3570
- var import_jsx_runtime37 = (
3993
+ var import_jsx_runtime43 = (
3571
3994
  // z-[3] : au-dessus des cellules figées (`sticky left/right`, z-[2]) d'un
3572
3995
  // corps de tableau, sinon leur contenu défile visuellement par-dessus
3573
3996
  // l'en-tête au lieu de passer dessous.
3574
3997
  require("react/jsx-runtime")
3575
3998
  );
3576
- var TableHeader = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("thead", { className: "sticky top-0 z-[3] bg-grey-100 text-neutral-800", children });
3999
+ var TableHeader = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("thead", { className: "sticky top-0 z-[3] bg-grey-100 text-neutral-800", children });
3577
4000
 
3578
4001
  // src/ui/components/ui/table/TableHeaderRow.tsx
3579
- var import_jsx_runtime38 = require("react/jsx-runtime");
3580
- var TableHeaderRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("tr", { children });
4002
+ var import_jsx_runtime44 = require("react/jsx-runtime");
4003
+ var TableHeaderRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("tr", { children });
3581
4004
 
3582
4005
  // src/ui/components/ui/table/TableHeaderCell.tsx
3583
4006
  var import_react27 = require("react");
3584
- var import_jsx_runtime39 = require("react/jsx-runtime");
4007
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3585
4008
  var SURFACE_CLASS = {
3586
4009
  white: "bg-white",
3587
4010
  "grey-100": "bg-grey-100"
@@ -3603,14 +4026,14 @@ var TableHeaderCell = ({
3603
4026
  const [hovered, setHovered] = (0, import_react27.useState)(false);
3604
4027
  const showArrow = useSort && (isSort || hovered);
3605
4028
  const arrowChar = isSort && sortOrder === "asc" ? "\u2191" : "\u2193";
3606
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4029
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3607
4030
  "th",
3608
4031
  {
3609
4032
  scope: "col",
3610
4033
  onMouseEnter: () => useSort && setHovered(true),
3611
4034
  onMouseLeave: () => useSort && setHovered(false),
3612
4035
  className: cn(
3613
- "overflow-hidden px-2 py-2 text-center text-[13px] font-bold",
4036
+ "h-10 overflow-hidden px-2 py-2 text-center text-xs font-bold",
3614
4037
  wrap ? "whitespace-normal break-words" : "text-ellipsis whitespace-nowrap",
3615
4038
  borderLeft && "border-l border-grey-200",
3616
4039
  sticky && cn("z-[2]", SURFACE_CLASS[surface]),
@@ -3629,7 +4052,7 @@ var TableHeaderCell = ({
3629
4052
  left: sticky === "left" ? stickyOffset : void 0,
3630
4053
  right: sticky === "right" ? stickyOffset : void 0
3631
4054
  },
3632
- children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
4055
+ children: useSort ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3633
4056
  "button",
3634
4057
  {
3635
4058
  type: "button",
@@ -3637,7 +4060,7 @@ var TableHeaderCell = ({
3637
4060
  className: "inline-flex items-center gap-1",
3638
4061
  children: [
3639
4062
  children,
3640
- showArrow && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4063
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3641
4064
  "span",
3642
4065
  {
3643
4066
  "aria-hidden": "true",
@@ -3657,7 +4080,7 @@ var TableHeaderCell = ({
3657
4080
 
3658
4081
  // src/ui/components/ui/table/TableRow.tsx
3659
4082
  var import_react28 = require("react");
3660
- var import_jsx_runtime40 = require("react/jsx-runtime");
4083
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3661
4084
  var TableRow = (0, import_react28.forwardRef)(
3662
4085
  ({
3663
4086
  children,
@@ -3667,7 +4090,7 @@ var TableRow = (0, import_react28.forwardRef)(
3667
4090
  backgroundColor,
3668
4091
  accentColor,
3669
4092
  "data-index": dataIndex
3670
- }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
4093
+ }, ref) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3671
4094
  "tr",
3672
4095
  {
3673
4096
  ref,
@@ -3675,7 +4098,7 @@ var TableRow = (0, import_react28.forwardRef)(
3675
4098
  onClick,
3676
4099
  onDoubleClick,
3677
4100
  className: cn(
3678
- "border-t border-grey-200 transition-colors hover:bg-black/[0.025]",
4101
+ "[&>td]:border-t [&>td]:border-grey-200 [&>th]:border-t [&>th]:border-grey-200 transition-colors hover:bg-black/[0.025]",
3679
4102
  (onClick || onDoubleClick) && "cursor-pointer",
3680
4103
  accentColor && "border-l-4",
3681
4104
  className
@@ -3691,7 +4114,7 @@ var TableRow = (0, import_react28.forwardRef)(
3691
4114
  TableRow.displayName = "TableRow";
3692
4115
 
3693
4116
  // src/ui/components/ui/table/TableCell.tsx
3694
- var import_jsx_runtime41 = require("react/jsx-runtime");
4117
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3695
4118
  var SURFACE_CLASS2 = {
3696
4119
  white: "bg-white",
3697
4120
  "grey-100": "bg-grey-100"
@@ -3712,12 +4135,12 @@ var TableCell = ({
3712
4135
  colSpan,
3713
4136
  cursor,
3714
4137
  className
3715
- }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
4138
+ }) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3716
4139
  "td",
3717
4140
  {
3718
4141
  colSpan,
3719
4142
  className: cn(
3720
- "text-ellipsis whitespace-nowrap px-2 py-2 text-center text-[13px]",
4143
+ "text-ellipsis whitespace-nowrap h-10 px-2 py-2 text-center text-xs font-semibold",
3721
4144
  // Une cellule fusionnée (section/groupe) ne tronque pas son contenu, et
3722
4145
  // ne doit pas clipper : elle porte souvent un enfant `sticky` (label de
3723
4146
  // groupe figé au scroll horizontal), qu'un ancêtre `overflow` cassé.
@@ -3739,13 +4162,13 @@ var TableCell = ({
3739
4162
  backgroundColor,
3740
4163
  borderLeftColor: accentColor
3741
4164
  },
3742
- children: centerContent ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Layout, { justify: "center", children }) : children
4165
+ children: centerContent ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Layout, { justify: "center", children }) : children
3743
4166
  }
3744
4167
  );
3745
4168
 
3746
4169
  // src/ui/components/ui/table/TableFooter.tsx
3747
- var import_jsx_runtime42 = require("react/jsx-runtime");
3748
- var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4170
+ var import_jsx_runtime48 = require("react/jsx-runtime");
4171
+ var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3749
4172
  "tfoot",
3750
4173
  {
3751
4174
  className: cn(
@@ -3757,21 +4180,21 @@ var TableFooter = ({ children, className }) => /* @__PURE__ */ (0, import_jsx_ru
3757
4180
  );
3758
4181
 
3759
4182
  // src/ui/components/ui/table/TableFooterRow.tsx
3760
- var import_jsx_runtime43 = require("react/jsx-runtime");
3761
- var TableFooterRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("tr", { className: "border-t border-grey-300", children });
4183
+ var import_jsx_runtime49 = require("react/jsx-runtime");
4184
+ var TableFooterRow = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("tr", { className: "[&>td]:border-t [&>td]:border-grey-300 [&>th]:border-t [&>th]:border-grey-300", children });
3762
4185
 
3763
4186
  // src/ui/components/ui/table/TableFooterCell.tsx
3764
- var import_jsx_runtime44 = require("react/jsx-runtime");
4187
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3765
4188
  var TableFooterCell = ({
3766
4189
  children,
3767
4190
  width,
3768
4191
  borderLeft = false,
3769
4192
  className
3770
- }) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
4193
+ }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3771
4194
  "td",
3772
4195
  {
3773
4196
  className: cn(
3774
- "overflow-hidden text-ellipsis whitespace-nowrap px-2 py-2 text-center text-[13px] font-bold",
4197
+ "overflow-hidden text-ellipsis whitespace-nowrap h-10 px-2 py-2 text-center text-xs font-bold",
3775
4198
  borderLeft && "border-l border-grey-200",
3776
4199
  className
3777
4200
  ),
@@ -3780,9 +4203,56 @@ var TableFooterCell = ({
3780
4203
  }
3781
4204
  );
3782
4205
 
3783
- // src/ui/components/ui/Avatar.tsx
3784
- var import_react29 = require("react");
3785
- var RadixAvatar = __toESM(require("@radix-ui/react-avatar"));
4206
+ // src/ui/components/ui/table/TableSectionRow.tsx
4207
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4208
+ var TableSectionRow = ({
4209
+ children,
4210
+ colSpan
4211
+ }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4212
+ "td",
4213
+ {
4214
+ colSpan,
4215
+ className: "h-10 bg-grey-200 px-2 text-left text-xs font-bold uppercase tracking-wide text-neutral-800",
4216
+ children
4217
+ }
4218
+ ) });
4219
+
4220
+ // src/ui/components/ui/table/TableSubgroupRow.tsx
4221
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4222
+ var TableSubgroupRow = ({
4223
+ children,
4224
+ colSpan
4225
+ }) => /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4226
+ "td",
4227
+ {
4228
+ colSpan,
4229
+ className: "h-10 bg-grey-100 px-2 pl-6 text-left text-xs font-semibold text-neutral-800",
4230
+ children
4231
+ }
4232
+ ) });
4233
+
4234
+ // src/ui/components/ui/table/TableAlertRow.tsx
4235
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4236
+ var ALERT_THEME = "orange-600";
4237
+ var TableAlertRow = ({ children, colSpan }) => /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4238
+ "td",
4239
+ {
4240
+ colSpan,
4241
+ role: "alert",
4242
+ className: cn(
4243
+ "h-10 px-2 text-left text-xs font-semibold",
4244
+ THEME_VARIANT_CLASSES.pale[ALERT_THEME]
4245
+ ),
4246
+ children
4247
+ }
4248
+ ) });
4249
+
4250
+ // src/ui/components/ui/table/TableExpandedRow.tsx
4251
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4252
+ var TableExpandedRow = ({
4253
+ children,
4254
+ colSpan
4255
+ }) => /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("td", { colSpan, className: "bg-white p-3 text-left text-xs", children }) });
3786
4256
 
3787
4257
  // src/utils/string/capitalizeFirstLetter.ts
3788
4258
  var capitalizeFirstLetter = (str) => {
@@ -3904,7 +4374,9 @@ var formatNameWithInitial = (firstname, lastname) => {
3904
4374
  };
3905
4375
 
3906
4376
  // src/ui/components/ui/Avatar.tsx
3907
- var import_jsx_runtime45 = require("react/jsx-runtime");
4377
+ var import_react29 = require("react");
4378
+ var RadixAvatar = __toESM(require("@radix-ui/react-avatar"));
4379
+ var import_jsx_runtime55 = require("react/jsx-runtime");
3908
4380
  var AvatarSizeContext = (0, import_react29.createContext)(40);
3909
4381
  var useAvatarSize = () => (0, import_react29.useContext)(AvatarSizeContext);
3910
4382
  var BADGE_BG_CLASS = {
@@ -3965,7 +4437,7 @@ var Avatar = (0, import_react29.forwardRef)(
3965
4437
  "children"
3966
4438
  ]);
3967
4439
  var _a2;
3968
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4440
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AvatarSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3969
4441
  RadixAvatar.Root,
3970
4442
  __spreadProps(__spreadValues({
3971
4443
  ref,
@@ -3976,9 +4448,9 @@ var Avatar = (0, import_react29.forwardRef)(
3976
4448
  ),
3977
4449
  style: __spreadValues({ width: size, height: size, backgroundColor }, style)
3978
4450
  }, props), {
3979
- children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_jsx_runtime45.Fragment, { children: [
3980
- src && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AvatarImage, { src, alt: name }),
3981
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4451
+ children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
4452
+ src && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AvatarImage, { src, alt: name }),
4453
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3982
4454
  AvatarFallback,
3983
4455
  {
3984
4456
  color,
@@ -3987,7 +4459,7 @@ var Avatar = (0, import_react29.forwardRef)(
3987
4459
  children: getInitials({ name })
3988
4460
  }
3989
4461
  ),
3990
- badge && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4462
+ badge && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(AvatarBadge, { className: BADGE_BG_CLASS[badge.backgroundColor], children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
3991
4463
  FaIcon,
3992
4464
  {
3993
4465
  name: badge.icon,
@@ -4004,7 +4476,7 @@ var Avatar = (0, import_react29.forwardRef)(
4004
4476
  Avatar.displayName = "Avatar";
4005
4477
  var AvatarImage = (0, import_react29.forwardRef)((_a, ref) => {
4006
4478
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4007
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4479
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4008
4480
  RadixAvatar.Image,
4009
4481
  __spreadValues({
4010
4482
  ref,
@@ -4044,7 +4516,7 @@ var AvatarFallback = (0, import_react29.forwardRef)(
4044
4516
  "style"
4045
4517
  ]);
4046
4518
  const size = useAvatarSize();
4047
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4519
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4048
4520
  RadixAvatar.Fallback,
4049
4521
  __spreadValues({
4050
4522
  ref,
@@ -4068,7 +4540,7 @@ var AvatarBadge = (0, import_react29.forwardRef)(
4068
4540
  var _b = _a, { size, className, style } = _b, props = __objRest(_b, ["size", "className", "style"]);
4069
4541
  const avatarSize = useAvatarSize();
4070
4542
  const badgeSize = size != null ? size : Math.round(avatarSize * 0.35);
4071
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
4543
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4072
4544
  "div",
4073
4545
  __spreadValues({
4074
4546
  ref,
@@ -4099,7 +4571,7 @@ var AvatarGroup = (_a) => {
4099
4571
  );
4100
4572
  const visible = max ? items.slice(0, max) : items;
4101
4573
  const overflow = max ? items.length - max : 0;
4102
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
4574
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(Layout, __spreadProps(__spreadValues({ className: cn("-space-x-2", className) }, props), { children: [
4103
4575
  visible.map(
4104
4576
  (child, index) => (0, import_react29.cloneElement)(child, {
4105
4577
  key: index,
@@ -4107,7 +4579,7 @@ var AvatarGroup = (_a) => {
4107
4579
  className: cn("ring-2 ring-white", child.props.className)
4108
4580
  })
4109
4581
  ),
4110
- overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
4582
+ overflow > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4111
4583
  Layout,
4112
4584
  {
4113
4585
  align: "center",
@@ -4127,10 +4599,242 @@ var AvatarGroup = (_a) => {
4127
4599
  ] }));
4128
4600
  };
4129
4601
 
4602
+ // src/ui/components/ui/table/TablePersonCell.tsx
4603
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4604
+ var AVATAR_SIZE = 24;
4605
+ var TablePersonCell = ({
4606
+ firstName,
4607
+ lastName,
4608
+ src,
4609
+ width
4610
+ }) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(TableCell, { width, children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4611
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
4612
+ Avatar,
4613
+ {
4614
+ size: AVATAR_SIZE,
4615
+ name: `${firstName} ${lastName != null ? lastName : ""}`.trim(),
4616
+ src
4617
+ }
4618
+ ),
4619
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "truncate", children: formatNameWithInitial(firstName, lastName != null ? lastName : null) })
4620
+ ] }) });
4621
+
4622
+ // src/ui/components/ui/table/TableClientCell.tsx
4623
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4624
+ var TableClientCell = ({
4625
+ name,
4626
+ color,
4627
+ width
4628
+ }) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(TableCell, { width, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "inline-flex max-w-full items-center gap-2 align-middle", children: [
4629
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4630
+ "span",
4631
+ {
4632
+ "aria-hidden": "true",
4633
+ "data-testid": "client-dot",
4634
+ className: "h-2.5 w-2.5 shrink-0 rounded-full",
4635
+ style: { backgroundColor: color }
4636
+ }
4637
+ ),
4638
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate", children: name })
4639
+ ] }) });
4640
+
4641
+ // src/ui/components/ui/table/TableStatusCell.tsx
4642
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4643
+ var TableStatusCell = ({
4644
+ children,
4645
+ theme,
4646
+ width
4647
+ }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Badge, { size: "l", theme, children }) });
4648
+
4649
+ // src/ui/components/ui/Popover.tsx
4650
+ var RadixPopover4 = __toESM(require("@radix-ui/react-popover"));
4651
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4652
+ var Popover = ({
4653
+ trigger,
4654
+ items,
4655
+ children,
4656
+ align = "end",
4657
+ side = "bottom",
4658
+ sideOffset = 6,
4659
+ open,
4660
+ onOpenChange,
4661
+ width,
4662
+ className
4663
+ }) => /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(RadixPopover4.Root, { open, onOpenChange, children: [
4664
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4665
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RadixPopover4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4666
+ RadixPopover4.Content,
4667
+ {
4668
+ align,
4669
+ side,
4670
+ sideOffset,
4671
+ style: width ? { width } : void 0,
4672
+ onClick: (event) => event.stopPropagation(),
4673
+ className: cn(
4674
+ "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)]",
4675
+ "data-[state=open]:animate-[fade-in_150ms_ease-out]",
4676
+ className
4677
+ ),
4678
+ children: items ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4679
+ RadixPopover4.Close,
4680
+ {
4681
+ onClick: item.action,
4682
+ className: "cursor-pointer rounded-[4px] px-3 py-2 text-left text-sm font-medium text-neutral-800 outline-none hover:bg-grey-100",
4683
+ children: item.label
4684
+ },
4685
+ idx
4686
+ )) }) : children
4687
+ }
4688
+ ) })
4689
+ ] });
4690
+
4691
+ // src/ui/components/ui/table/TableActionsCell.tsx
4692
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4693
+ var MAX_INLINE_TABLE_ACTIONS = 3;
4694
+ var TableActionsCell = ({ actions, width }) => {
4695
+ const hasMenu = actions.length > MAX_INLINE_TABLE_ACTIONS;
4696
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(TableCell, { width, centerContent: true, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4697
+ Layout,
4698
+ {
4699
+ row: true,
4700
+ gap: 1,
4701
+ align: "center",
4702
+ justify: "center",
4703
+ onClick: (event) => event.stopPropagation(),
4704
+ children: hasMenu ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4705
+ Popover,
4706
+ {
4707
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4708
+ Icon,
4709
+ {
4710
+ name: "ellipsis-vertical",
4711
+ "aria-label": "Plus d'actions",
4712
+ onClick: () => void 0
4713
+ }
4714
+ ),
4715
+ items: actions.map(({ label, onClick }) => ({
4716
+ label,
4717
+ action: onClick
4718
+ }))
4719
+ }
4720
+ ) : actions.map(({ label, icon, onClick }) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4721
+ Icon,
4722
+ {
4723
+ name: icon,
4724
+ "aria-label": label,
4725
+ title: label,
4726
+ onClick
4727
+ },
4728
+ label
4729
+ ))
4730
+ }
4731
+ ) });
4732
+ };
4733
+
4734
+ // src/ui/components/ui/table/TableSelectCell.tsx
4735
+ var import_react30 = require("react");
4736
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4737
+ var TableSelectCell = ({
4738
+ isSelected,
4739
+ onToggle,
4740
+ label,
4741
+ width = "40px"
4742
+ }) => {
4743
+ const isRange = (0, import_react30.useRef)(false);
4744
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(TableCell, { width, centerContent: true, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("span", { onClick: (event) => event.stopPropagation(), children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4745
+ Checkbox,
4746
+ {
4747
+ "aria-label": label,
4748
+ checked: isSelected,
4749
+ onClick: (event) => {
4750
+ isRange.current = event.shiftKey;
4751
+ },
4752
+ onChange: () => onToggle({ isRange: isRange.current })
4753
+ }
4754
+ ) }) });
4755
+ };
4756
+
4757
+ // src/ui/components/ui/table/TableSelectHeaderCell.tsx
4758
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4759
+ var TableSelectHeaderCell = ({
4760
+ state,
4761
+ onToggle,
4762
+ width = "40px"
4763
+ }) => /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TableHeaderCell, { width, className: "table-select-cell", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Layout, { justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4764
+ Checkbox,
4765
+ {
4766
+ "aria-label": "S\xE9lectionner toutes les lignes de la page",
4767
+ checked: state,
4768
+ onChange: onToggle
4769
+ }
4770
+ ) }) }) });
4771
+
4772
+ // src/ui/hooks/useRowSelection.ts
4773
+ var import_react31 = require("react");
4774
+ var useRowSelection = ({
4775
+ rowIds,
4776
+ totalCount
4777
+ }) => {
4778
+ const [selectedIds, setSelectedIds] = (0, import_react31.useState)(/* @__PURE__ */ new Set());
4779
+ const [isAllResultsSelected, setIsAllResultsSelected] = (0, import_react31.useState)(false);
4780
+ const anchorId = (0, import_react31.useRef)(null);
4781
+ const resolvedTotal = totalCount != null ? totalCount : rowIds.length;
4782
+ const selectedOnPage = rowIds.filter((id) => selectedIds.has(id)).length;
4783
+ const isPageFullySelected = rowIds.length > 0 && selectedOnPage === rowIds.length;
4784
+ const canSelectAllResults = isPageFullySelected && !isAllResultsSelected && resolvedTotal > rowIds.length;
4785
+ const headerState = isAllResultsSelected || isPageFullySelected ? true : selectedOnPage > 0 ? "indeterminate" : false;
4786
+ const clear = (0, import_react31.useCallback)(() => {
4787
+ setSelectedIds(/* @__PURE__ */ new Set());
4788
+ setIsAllResultsSelected(false);
4789
+ anchorId.current = null;
4790
+ }, []);
4791
+ const toggleRow = (id, { isRange = false } = {}) => {
4792
+ const baseIds = isAllResultsSelected ? new Set(rowIds) : selectedIds;
4793
+ const next = new Set(baseIds);
4794
+ const willSelect = !baseIds.has(id);
4795
+ const anchorIndex = anchorId.current === null ? -1 : rowIds.indexOf(anchorId.current);
4796
+ const targetIndex = rowIds.indexOf(id);
4797
+ const idsToApply = isRange && anchorIndex >= 0 ? rowIds.slice(
4798
+ Math.min(anchorIndex, targetIndex),
4799
+ Math.max(anchorIndex, targetIndex) + 1
4800
+ ) : [id];
4801
+ idsToApply.forEach(
4802
+ (rowId) => willSelect ? next.add(rowId) : next.delete(rowId)
4803
+ );
4804
+ anchorId.current = id;
4805
+ setIsAllResultsSelected(false);
4806
+ setSelectedIds(next);
4807
+ };
4808
+ const toggleAllOnPage = () => {
4809
+ if (headerState === true) {
4810
+ clear();
4811
+ return;
4812
+ }
4813
+ setSelectedIds(/* @__PURE__ */ new Set([...selectedIds, ...rowIds]));
4814
+ };
4815
+ const selectAllResults = () => {
4816
+ setSelectedIds(new Set(rowIds));
4817
+ setIsAllResultsSelected(true);
4818
+ };
4819
+ return {
4820
+ selectedIds,
4821
+ selectedCount: isAllResultsSelected ? resolvedTotal : selectedIds.size,
4822
+ isRowSelected: (id) => isAllResultsSelected || selectedIds.has(id),
4823
+ headerState,
4824
+ isAllResultsSelected,
4825
+ canSelectAllResults,
4826
+ totalCount: resolvedTotal,
4827
+ toggleRow,
4828
+ toggleAllOnPage,
4829
+ selectAllResults,
4830
+ clear
4831
+ };
4832
+ };
4833
+
4130
4834
  // src/ui/components/ui/Radio.tsx
4131
4835
  var RadixRadioGroup = __toESM(require("@radix-ui/react-radio-group"));
4132
4836
  var import_class_variance_authority12 = require("class-variance-authority");
4133
- var import_jsx_runtime46 = require("react/jsx-runtime");
4837
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4134
4838
  var radioVariants = (0, import_class_variance_authority12.cva)(
4135
4839
  "relative h-[22px] w-[22px] shrink-0 rounded-full border-2 border-grey-300 outline-none transition-colors",
4136
4840
  {
@@ -4185,23 +4889,23 @@ var Radio = ({
4185
4889
  color,
4186
4890
  width,
4187
4891
  className
4188
- }) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4892
+ }) => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4189
4893
  RadixRadioGroup.Root,
4190
4894
  {
4191
4895
  value,
4192
4896
  onValueChange: onChange,
4193
4897
  disabled,
4194
4898
  asChild: true,
4195
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
4899
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Layout, { column: true, gap: 2, className, width, children: items.map((item) => {
4196
4900
  const itemId = `radio-${item.value}`;
4197
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4198
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4901
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Layout, { row: true, gap: 2, align: "center", children: [
4902
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4199
4903
  RadixRadioGroup.Item,
4200
4904
  {
4201
4905
  id: itemId,
4202
4906
  value: item.value,
4203
4907
  className: radioVariants({ color }),
4204
- children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4908
+ children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4205
4909
  RadixRadioGroup.Indicator,
4206
4910
  {
4207
4911
  className: indicatorVariants({ color })
@@ -4209,7 +4913,7 @@ var Radio = ({
4209
4913
  )
4210
4914
  }
4211
4915
  ),
4212
- item.label && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
4916
+ item.label && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4213
4917
  Text,
4214
4918
  {
4215
4919
  as: "label",
@@ -4228,7 +4932,7 @@ var Radio = ({
4228
4932
  var RadixProgress = __toESM(require("@radix-ui/react-progress"));
4229
4933
  var RadixSlider = __toESM(require("@radix-ui/react-slider"));
4230
4934
  var import_class_variance_authority13 = require("class-variance-authority");
4231
- var import_jsx_runtime47 = require("react/jsx-runtime");
4935
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4232
4936
  var trackVariants2 = (0, import_class_variance_authority13.cva)(
4233
4937
  "relative w-full overflow-hidden rounded-full bg-grey-200",
4234
4938
  {
@@ -4297,15 +5001,15 @@ var ProgressBar = ({
4297
5001
  const editable = Boolean(onChange);
4298
5002
  if (segments) {
4299
5003
  const visible = segments.filter((segment) => segment.value > 0);
4300
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4301
- label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs text-grey-600", children: label }),
4302
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5004
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5005
+ label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5006
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4303
5007
  "div",
4304
5008
  {
4305
5009
  role: "img",
4306
5010
  "aria-label": ariaLabel != null ? ariaLabel : label,
4307
5011
  className: cn(trackVariants2({ height }), "flex gap-0.5"),
4308
- children: visible.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5012
+ children: visible.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4309
5013
  "span",
4310
5014
  {
4311
5015
  className: "h-full",
@@ -4323,16 +5027,16 @@ var ProgressBar = ({
4323
5027
  }
4324
5028
  if (!editable) {
4325
5029
  const readOnlyPercent = Math.max(0, Math.min(100, percent));
4326
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
4327
- label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs text-grey-600", children: label }),
4328
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Layout, { fullWidth: true, align: "center", gap: 2, children: [
4329
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5030
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
5031
+ label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5032
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Layout, { fullWidth: true, align: "center", gap: 2, children: [
5033
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4330
5034
  RadixProgress.Root,
4331
5035
  {
4332
5036
  value: readOnlyPercent,
4333
5037
  "aria-label": ariaLabel != null ? ariaLabel : label,
4334
5038
  className: trackVariants2({ height }),
4335
- children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5039
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4336
5040
  RadixProgress.Indicator,
4337
5041
  {
4338
5042
  className: cn(
@@ -4347,11 +5051,11 @@ var ProgressBar = ({
4347
5051
  )
4348
5052
  }
4349
5053
  ),
4350
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
5054
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "shrink-0 text-xs font-semibold text-neutral-800", children: display(Math.round(readOnlyPercent)) })
4351
5055
  ] })
4352
5056
  ] });
4353
5057
  }
4354
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
5058
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4355
5059
  Layout,
4356
5060
  {
4357
5061
  column: true,
@@ -4359,9 +5063,9 @@ var ProgressBar = ({
4359
5063
  gap: 1,
4360
5064
  className: cn(disabled && "cursor-not-allowed opacity-60", className),
4361
5065
  children: [
4362
- label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs text-grey-600", children: label }),
4363
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { className: "relative w-full pt-6", children: [
4364
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5066
+ label && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-xs text-grey-600", children: label }),
5067
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "relative w-full pt-6", children: [
5068
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4365
5069
  "span",
4366
5070
  {
4367
5071
  className: "absolute top-0 -translate-x-1/2 text-xs font-semibold text-neutral-800",
@@ -4369,7 +5073,7 @@ var ProgressBar = ({
4369
5073
  children: display(current)
4370
5074
  }
4371
5075
  ),
4372
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
5076
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4373
5077
  RadixSlider.Root,
4374
5078
  {
4375
5079
  value: [current],
@@ -4380,7 +5084,7 @@ var ProgressBar = ({
4380
5084
  disabled,
4381
5085
  className: "relative flex h-5 w-full touch-none select-none items-center",
4382
5086
  children: [
4383
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5087
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4384
5088
  RadixSlider.Range,
4385
5089
  {
4386
5090
  className: cn(
@@ -4390,7 +5094,7 @@ var ProgressBar = ({
4390
5094
  style: { backgroundColor: hexColor }
4391
5095
  }
4392
5096
  ) }),
4393
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
5097
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4394
5098
  RadixSlider.Thumb,
4395
5099
  {
4396
5100
  className: cn(
@@ -4405,9 +5109,9 @@ var ProgressBar = ({
4405
5109
  }
4406
5110
  )
4407
5111
  ] }),
4408
- showLabel && /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(Layout, { align: "center", justify: "between", children: [
4409
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs text-grey-600", children: display(min) }),
4410
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs text-grey-600", children: display(max) })
5112
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Layout, { align: "center", justify: "between", children: [
5113
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-xs text-grey-600", children: display(min) }),
5114
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-xs text-grey-600", children: display(max) })
4411
5115
  ] })
4412
5116
  ]
4413
5117
  }
@@ -4416,7 +5120,7 @@ var ProgressBar = ({
4416
5120
 
4417
5121
  // src/ui/components/ui/Collapsible.tsx
4418
5122
  var RadixCollapsible = __toESM(require("@radix-ui/react-collapsible"));
4419
- var import_jsx_runtime48 = require("react/jsx-runtime");
5123
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4420
5124
  var Collapsible = RadixCollapsible.Root;
4421
5125
  var CollapsibleTrigger = RadixCollapsible.Trigger;
4422
5126
  var CollapsibleContent = (_a) => {
@@ -4425,7 +5129,7 @@ var CollapsibleContent = (_a) => {
4425
5129
  } = _b, props = __objRest(_b, [
4426
5130
  "className"
4427
5131
  ]);
4428
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
5132
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4429
5133
  RadixCollapsible.Content,
4430
5134
  __spreadValues({
4431
5135
  className: "overflow-hidden data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] " + (className != null ? className : "")
@@ -4434,7 +5138,7 @@ var CollapsibleContent = (_a) => {
4434
5138
  };
4435
5139
 
4436
5140
  // src/ui/components/ui/Drawer.tsx
4437
- var import_react30 = require("react");
5141
+ var import_react32 = require("react");
4438
5142
  var import_vaul = require("vaul");
4439
5143
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
4440
5144
 
@@ -4505,7 +5209,7 @@ var swallowRestOfClick = () => {
4505
5209
  };
4506
5210
 
4507
5211
  // src/ui/components/ui/Drawer.tsx
4508
- var import_jsx_runtime49 = require("react/jsx-runtime");
5212
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4509
5213
  var KEEP_OPEN_SELECTOR = '[role="dialog"], [role="listbox"], [data-drawer-keep-open]';
4510
5214
  var CONTENT_POSITION = {
4511
5215
  top: "inset-x-4 top-4 rounded-2xl",
@@ -4524,11 +5228,11 @@ var Drawer = ({
4524
5228
  overlayClassName
4525
5229
  }) => {
4526
5230
  const isVertical = direction === "left" || direction === "right";
4527
- const contentRef = (0, import_react30.useRef)(null);
4528
- const [panel, setPanel] = (0, import_react30.useState)(null);
4529
- const overlayRef = (0, import_react30.useRef)(null);
5231
+ const contentRef = (0, import_react32.useRef)(null);
5232
+ const [panel, setPanel] = (0, import_react32.useState)(null);
5233
+ const overlayRef = (0, import_react32.useRef)(null);
4530
5234
  useAllowPortalScroll(modal && open, contentRef, overlayRef);
4531
- (0, import_react30.useEffect)(() => {
5235
+ (0, import_react32.useEffect)(() => {
4532
5236
  if (!open || !panel) return;
4533
5237
  return registerOpenDrawer(panel, overlayRef.current);
4534
5238
  }, [open, panel]);
@@ -4543,7 +5247,7 @@ var Drawer = ({
4543
5247
  const overlay = target.closest("[data-vaul-overlay]");
4544
5248
  return Boolean(target.closest(KEEP_OPEN_SELECTOR)) || overlay !== null && isOverlayOfDrawerAbove(overlay, contentRef.current);
4545
5249
  };
4546
- (0, import_react30.useEffect)(() => {
5250
+ (0, import_react32.useEffect)(() => {
4547
5251
  if (modal || !open || typeof document === "undefined") return;
4548
5252
  const handlePointerDown = (event) => {
4549
5253
  var _a;
@@ -4562,7 +5266,7 @@ var Drawer = ({
4562
5266
  document.addEventListener("pointerdown", handlePointerDown, true);
4563
5267
  return () => document.removeEventListener("pointerdown", handlePointerDown, true);
4564
5268
  }, [modal, open, onClose]);
4565
- (0, import_react30.useEffect)(() => {
5269
+ (0, import_react32.useEffect)(() => {
4566
5270
  if (modal || !open) return;
4567
5271
  const frame = requestAnimationFrame(() => {
4568
5272
  document.body.style.pointerEvents = "auto";
@@ -4570,8 +5274,8 @@ var Drawer = ({
4570
5274
  return () => cancelAnimationFrame(frame);
4571
5275
  }, [modal, open]);
4572
5276
  const closeOnDismiss = (next) => !next && closeDrawer();
4573
- const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_vaul.Drawer.Portal, { children: [
4574
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5277
+ const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_vaul.Drawer.Portal, { children: [
5278
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4575
5279
  import_vaul.Drawer.Overlay,
4576
5280
  {
4577
5281
  ref: overlayRef,
@@ -4583,7 +5287,7 @@ var Drawer = ({
4583
5287
  )
4584
5288
  }
4585
5289
  ),
4586
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5290
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4587
5291
  import_vaul.Drawer.Content,
4588
5292
  __spreadProps(__spreadValues({
4589
5293
  ref: (node) => {
@@ -4615,14 +5319,14 @@ var Drawer = ({
4615
5319
  })
4616
5320
  )
4617
5321
  ] });
4618
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5322
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4619
5323
  import_vaul.Drawer.Root,
4620
5324
  {
4621
5325
  direction,
4622
5326
  modal,
4623
5327
  open,
4624
5328
  onOpenChange: closeOnDismiss,
4625
- children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5329
+ children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4626
5330
  DialogPrimitive.Root,
4627
5331
  {
4628
5332
  modal: false,
@@ -4640,7 +5344,7 @@ var DrawerHeader = (_a) => {
4640
5344
  } = _b, props = __objRest(_b, [
4641
5345
  "className"
4642
5346
  ]);
4643
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5347
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4644
5348
  "div",
4645
5349
  __spreadValues({
4646
5350
  className: cn("flex w-full items-center justify-between", className)
@@ -4653,7 +5357,7 @@ var DrawerTitle = (_a) => {
4653
5357
  } = _b, props = __objRest(_b, [
4654
5358
  "className"
4655
5359
  ]);
4656
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5360
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4657
5361
  import_vaul.Drawer.Title,
4658
5362
  __spreadValues({
4659
5363
  className: cn("text-base font-bold text-neutral-800", className)
@@ -4666,7 +5370,7 @@ var DrawerDescription = (_a) => {
4666
5370
  } = _b, props = __objRest(_b, [
4667
5371
  "className"
4668
5372
  ]);
4669
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
5373
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4670
5374
  import_vaul.Drawer.Description,
4671
5375
  __spreadValues({
4672
5376
  className: cn("text-sm text-grey-500", className)
@@ -4679,7 +5383,7 @@ var DrawerBody = (_a) => {
4679
5383
  } = _b, props = __objRest(_b, [
4680
5384
  "className"
4681
5385
  ]);
4682
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
5386
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
4683
5387
  };
4684
5388
  var DrawerFooter = (_a) => {
4685
5389
  var _b = _a, {
@@ -4687,67 +5391,25 @@ var DrawerFooter = (_a) => {
4687
5391
  } = _b, props = __objRest(_b, [
4688
5392
  "className"
4689
5393
  ]);
4690
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
5394
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
4691
5395
  };
4692
5396
  var DrawerClose = import_vaul.Drawer.Close;
4693
5397
 
4694
- // src/ui/components/ui/Popover.tsx
4695
- var RadixPopover4 = __toESM(require("@radix-ui/react-popover"));
4696
- var import_jsx_runtime50 = require("react/jsx-runtime");
4697
- var Popover = ({
4698
- trigger,
4699
- items,
4700
- children,
4701
- align = "end",
4702
- side = "bottom",
4703
- sideOffset = 6,
4704
- open,
4705
- onOpenChange,
4706
- width,
4707
- className
4708
- }) => /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)(RadixPopover4.Root, { open, onOpenChange, children: [
4709
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixPopover4.Trigger, { asChild: true, children: trigger }),
4710
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(RadixPopover4.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4711
- RadixPopover4.Content,
4712
- {
4713
- align,
4714
- side,
4715
- sideOffset,
4716
- style: width ? { width } : void 0,
4717
- onClick: (event) => event.stopPropagation(),
4718
- className: cn(
4719
- "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)]",
4720
- "data-[state=open]:animate-[fade-in_150ms_ease-out]",
4721
- className
4722
- ),
4723
- children: items ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Layout, { column: true, children: items.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4724
- RadixPopover4.Close,
4725
- {
4726
- onClick: item.action,
4727
- className: "cursor-pointer rounded-[4px] px-3 py-2 text-left text-sm font-medium text-neutral-800 outline-none hover:bg-grey-100",
4728
- children: item.label
4729
- },
4730
- idx
4731
- )) }) : children
4732
- }
4733
- ) })
4734
- ] });
4735
-
4736
5398
  // src/ui/components/ui/sidebar/Sidebar.tsx
4737
- var import_react32 = require("react");
5399
+ var import_react34 = require("react");
4738
5400
 
4739
5401
  // src/ui/components/ui/sidebar/SidebarContext.ts
4740
- var import_react31 = require("react");
4741
- var SidebarCollapsedContext = (0, import_react31.createContext)(false);
5402
+ var import_react33 = require("react");
5403
+ var SidebarCollapsedContext = (0, import_react33.createContext)(false);
4742
5404
  var SidebarCollapsedProvider = SidebarCollapsedContext.Provider;
4743
- var useSidebarCollapsed = () => (0, import_react31.useContext)(SidebarCollapsedContext);
5405
+ var useSidebarCollapsed = () => (0, import_react33.useContext)(SidebarCollapsedContext);
4744
5406
 
4745
5407
  // src/ui/components/ui/sidebar/Sidebar.tsx
4746
- var import_jsx_runtime51 = require("react/jsx-runtime");
4747
- var Sidebar = (0, import_react32.forwardRef)(
5408
+ var import_jsx_runtime67 = require("react/jsx-runtime");
5409
+ var Sidebar = (0, import_react34.forwardRef)(
4748
5410
  (_a, ref) => {
4749
5411
  var _b = _a, { collapsed = false, className, children } = _b, props = __objRest(_b, ["collapsed", "className", "children"]);
4750
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
5412
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4751
5413
  "aside",
4752
5414
  __spreadProps(__spreadValues({
4753
5415
  ref,
@@ -4765,11 +5427,11 @@ var Sidebar = (0, import_react32.forwardRef)(
4765
5427
  Sidebar.displayName = "Sidebar";
4766
5428
 
4767
5429
  // src/ui/components/ui/sidebar/SidebarTrigger.tsx
4768
- var import_react33 = require("react");
4769
- var import_jsx_runtime52 = require("react/jsx-runtime");
4770
- var SidebarTrigger = (0, import_react33.forwardRef)((_a, ref) => {
5430
+ var import_react35 = require("react");
5431
+ var import_jsx_runtime68 = require("react/jsx-runtime");
5432
+ var SidebarTrigger = (0, import_react35.forwardRef)((_a, ref) => {
4771
5433
  var _b = _a, { collapsed, className } = _b, props = __objRest(_b, ["collapsed", "className"]);
4772
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5434
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4773
5435
  "button",
4774
5436
  __spreadProps(__spreadValues({
4775
5437
  ref,
@@ -4780,7 +5442,7 @@ var SidebarTrigger = (0, import_react33.forwardRef)((_a, ref) => {
4780
5442
  className
4781
5443
  )
4782
5444
  }, props), {
4783
- children: /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
5445
+ children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
4784
5446
  FaIcon,
4785
5447
  {
4786
5448
  name: collapsed ? "chevrons-right" : "chevrons-left",
@@ -4794,12 +5456,12 @@ var SidebarTrigger = (0, import_react33.forwardRef)((_a, ref) => {
4794
5456
  SidebarTrigger.displayName = "SidebarTrigger";
4795
5457
 
4796
5458
  // src/ui/components/ui/sidebar/SidebarHeader.tsx
4797
- var import_react34 = require("react");
4798
- var import_jsx_runtime53 = require("react/jsx-runtime");
4799
- var SidebarHeader = (0, import_react34.forwardRef)(
5459
+ var import_react36 = require("react");
5460
+ var import_jsx_runtime69 = require("react/jsx-runtime");
5461
+ var SidebarHeader = (0, import_react36.forwardRef)(
4800
5462
  (_a, ref) => {
4801
5463
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4802
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
5464
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4803
5465
  "div",
4804
5466
  __spreadValues({
4805
5467
  ref,
@@ -4811,12 +5473,12 @@ var SidebarHeader = (0, import_react34.forwardRef)(
4811
5473
  SidebarHeader.displayName = "SidebarHeader";
4812
5474
 
4813
5475
  // src/ui/components/ui/sidebar/SidebarContent.tsx
4814
- var import_react35 = require("react");
4815
- var import_jsx_runtime54 = require("react/jsx-runtime");
4816
- var SidebarContent = (0, import_react35.forwardRef)(
5476
+ var import_react37 = require("react");
5477
+ var import_jsx_runtime70 = require("react/jsx-runtime");
5478
+ var SidebarContent = (0, import_react37.forwardRef)(
4817
5479
  (_a, ref) => {
4818
5480
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
4819
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
5481
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
4820
5482
  "div",
4821
5483
  __spreadValues({
4822
5484
  ref,
@@ -4832,21 +5494,21 @@ var SidebarContent = (0, import_react35.forwardRef)(
4832
5494
  SidebarContent.displayName = "SidebarContent";
4833
5495
 
4834
5496
  // src/ui/components/ui/sidebar/SidebarGroup.tsx
4835
- var import_react36 = require("react");
4836
- var import_jsx_runtime55 = require("react/jsx-runtime");
4837
- var SidebarGroup = (0, import_react36.forwardRef)(
5497
+ var import_react38 = require("react");
5498
+ var import_jsx_runtime71 = require("react/jsx-runtime");
5499
+ var SidebarGroup = (0, import_react38.forwardRef)(
4838
5500
  (_a, ref) => {
4839
5501
  var _b = _a, { label, className, children } = _b, props = __objRest(_b, ["label", "className", "children"]);
4840
5502
  const collapsed = useSidebarCollapsed();
4841
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
5503
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
4842
5504
  "div",
4843
5505
  __spreadProps(__spreadValues({
4844
5506
  ref,
4845
5507
  className: cn("flex w-full flex-col p-2", className)
4846
5508
  }, props), {
4847
5509
  children: [
4848
- label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
4849
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "flex flex-col gap-1", children })
5510
+ label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
5511
+ /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "flex flex-col gap-1", children })
4850
5512
  ]
4851
5513
  })
4852
5514
  );
@@ -4855,9 +5517,9 @@ var SidebarGroup = (0, import_react36.forwardRef)(
4855
5517
  SidebarGroup.displayName = "SidebarGroup";
4856
5518
 
4857
5519
  // src/ui/components/ui/sidebar/SidebarMenuButton.tsx
4858
- var import_react37 = require("react");
4859
- var import_jsx_runtime56 = require("react/jsx-runtime");
4860
- var SidebarMenuButton = (0, import_react37.forwardRef)(
5520
+ var import_react39 = require("react");
5521
+ var import_jsx_runtime72 = require("react/jsx-runtime");
5522
+ var SidebarMenuButton = (0, import_react39.forwardRef)(
4861
5523
  (_a, ref) => {
4862
5524
  var _b = _a, {
4863
5525
  icon,
@@ -4879,7 +5541,7 @@ var SidebarMenuButton = (0, import_react37.forwardRef)(
4879
5541
  "className"
4880
5542
  ]);
4881
5543
  const collapsed = useSidebarCollapsed();
4882
- const button = /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
5544
+ const button = /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
4883
5545
  "button",
4884
5546
  __spreadProps(__spreadValues({
4885
5547
  ref,
@@ -4895,7 +5557,7 @@ var SidebarMenuButton = (0, import_react37.forwardRef)(
4895
5557
  )
4896
5558
  }, props), {
4897
5559
  children: [
4898
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5560
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4899
5561
  FaIcon,
4900
5562
  {
4901
5563
  name: icon,
@@ -4904,7 +5566,7 @@ var SidebarMenuButton = (0, import_react37.forwardRef)(
4904
5566
  className: "shrink-0"
4905
5567
  }
4906
5568
  ),
4907
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5569
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4908
5570
  Text,
4909
5571
  {
4910
5572
  as: "span",
@@ -4915,8 +5577,8 @@ var SidebarMenuButton = (0, import_react37.forwardRef)(
4915
5577
  children: label
4916
5578
  }
4917
5579
  ),
4918
- !collapsed && shortcut && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("kbd", { className: "shrink-0 rounded border border-white/15 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-white/50", children: shortcut }),
4919
- !!badge && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
5580
+ !collapsed && shortcut && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("kbd", { className: "shrink-0 rounded border border-white/15 bg-white/5 px-1.5 py-0.5 text-[10px] font-medium text-white/50", children: shortcut }),
5581
+ !!badge && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
4920
5582
  "span",
4921
5583
  {
4922
5584
  className: cn(
@@ -4931,15 +5593,15 @@ var SidebarMenuButton = (0, import_react37.forwardRef)(
4931
5593
  })
4932
5594
  );
4933
5595
  if (!collapsed) return button;
4934
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Tooltip, { content: label, side: "right", children: button });
5596
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Tooltip, { content: label, side: "right", children: button });
4935
5597
  }
4936
5598
  );
4937
5599
  SidebarMenuButton.displayName = "SidebarMenuButton";
4938
5600
 
4939
5601
  // src/ui/components/ui/sidebar/SidebarActionCard.tsx
4940
- var import_react38 = require("react");
4941
- var import_jsx_runtime57 = require("react/jsx-runtime");
4942
- var SidebarActionCard = (0, import_react38.forwardRef)(
5602
+ var import_react40 = require("react");
5603
+ var import_jsx_runtime73 = require("react/jsx-runtime");
5604
+ var SidebarActionCard = (0, import_react40.forwardRef)(
4943
5605
  (_a, ref) => {
4944
5606
  var _b = _a, {
4945
5607
  icon,
@@ -4959,11 +5621,11 @@ var SidebarActionCard = (0, import_react38.forwardRef)(
4959
5621
  const collapsed = useSidebarCollapsed();
4960
5622
  const tooltip = subtitle ? `${title} ${subtitle}` : title;
4961
5623
  const counter = badge ? badge > 99 ? "99+" : badge : null;
4962
- const iconBadge = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
4963
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }),
4964
- collapsed && counter && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "absolute -right-1.5 -top-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter })
5624
+ const iconBadge = /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
5625
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }),
5626
+ collapsed && counter && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "absolute -right-1.5 -top-1.5 inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter })
4965
5627
  ] });
4966
- const button = /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
5628
+ const button = /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
4967
5629
  "button",
4968
5630
  __spreadProps(__spreadValues({
4969
5631
  ref,
@@ -4978,12 +5640,12 @@ var SidebarActionCard = (0, import_react38.forwardRef)(
4978
5640
  }, props), {
4979
5641
  children: [
4980
5642
  iconBadge,
4981
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
4982
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
4983
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate text-sm font-bold text-white", children: title }),
4984
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "truncate text-xs text-white/60", children: subtitle })
5643
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
5644
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5645
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-sm font-bold text-white", children: title }),
5646
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "truncate text-xs text-white/60", children: subtitle })
4985
5647
  ] }),
4986
- counter ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
5648
+ counter ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-full bg-red-500 px-1.5 text-xs font-bold text-white", children: counter }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
4987
5649
  FaIcon,
4988
5650
  {
4989
5651
  name: "chevron-right",
@@ -4997,18 +5659,18 @@ var SidebarActionCard = (0, import_react38.forwardRef)(
4997
5659
  })
4998
5660
  );
4999
5661
  if (!collapsed) return button;
5000
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Tooltip, { content: tooltip, side: "right", children: button });
5662
+ return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Tooltip, { content: tooltip, side: "right", children: button });
5001
5663
  }
5002
5664
  );
5003
5665
  SidebarActionCard.displayName = "SidebarActionCard";
5004
5666
 
5005
5667
  // src/ui/components/ui/sidebar/SidebarMenuSub.tsx
5006
- var import_react39 = require("react");
5007
- var import_jsx_runtime58 = require("react/jsx-runtime");
5008
- var SidebarMenuSub = (0, import_react39.forwardRef)(
5668
+ var import_react41 = require("react");
5669
+ var import_jsx_runtime74 = require("react/jsx-runtime");
5670
+ var SidebarMenuSub = (0, import_react41.forwardRef)(
5009
5671
  (_a, ref) => {
5010
5672
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5011
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
5673
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5012
5674
  "ul",
5013
5675
  __spreadValues({
5014
5676
  ref,
@@ -5023,24 +5685,24 @@ var SidebarMenuSub = (0, import_react39.forwardRef)(
5023
5685
  SidebarMenuSub.displayName = "SidebarMenuSub";
5024
5686
 
5025
5687
  // src/ui/components/ui/sidebar/SidebarMenuSubItem.tsx
5026
- var import_react40 = require("react");
5027
- var import_jsx_runtime59 = require("react/jsx-runtime");
5028
- var SidebarMenuSubItem = (0, import_react40.forwardRef)((_a, ref) => {
5688
+ var import_react42 = require("react");
5689
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5690
+ var SidebarMenuSubItem = (0, import_react42.forwardRef)((_a, ref) => {
5029
5691
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5030
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("li", __spreadValues({ ref, className: cn("relative", className) }, props));
5692
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("li", __spreadValues({ ref, className: cn("relative", className) }, props));
5031
5693
  });
5032
5694
  SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
5033
5695
 
5034
5696
  // src/ui/components/ui/sidebar/SidebarMenuSubButton.tsx
5035
- var import_react41 = require("react");
5036
- var import_jsx_runtime60 = require("react/jsx-runtime");
5697
+ var import_react43 = require("react");
5698
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5037
5699
  var SIZE_CLASS = {
5038
5700
  default: "h-10",
5039
5701
  lg: "h-14"
5040
5702
  };
5041
- var SidebarMenuSubButton = (0, import_react41.forwardRef)((_a, ref) => {
5703
+ var SidebarMenuSubButton = (0, import_react43.forwardRef)((_a, ref) => {
5042
5704
  var _b = _a, { active, size = "default", className } = _b, props = __objRest(_b, ["active", "size", "className"]);
5043
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
5705
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5044
5706
  "button",
5045
5707
  __spreadValues({
5046
5708
  ref,
@@ -5059,12 +5721,12 @@ var SidebarMenuSubButton = (0, import_react41.forwardRef)((_a, ref) => {
5059
5721
  SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
5060
5722
 
5061
5723
  // src/ui/components/ui/sidebar/SidebarFooter.tsx
5062
- var import_react42 = require("react");
5063
- var import_jsx_runtime61 = require("react/jsx-runtime");
5064
- var SidebarFooter = (0, import_react42.forwardRef)(
5724
+ var import_react44 = require("react");
5725
+ var import_jsx_runtime77 = require("react/jsx-runtime");
5726
+ var SidebarFooter = (0, import_react44.forwardRef)(
5065
5727
  (_a, ref) => {
5066
5728
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5067
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
5729
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
5068
5730
  "div",
5069
5731
  __spreadValues({
5070
5732
  ref,
@@ -5076,7 +5738,7 @@ var SidebarFooter = (0, import_react42.forwardRef)(
5076
5738
  SidebarFooter.displayName = "SidebarFooter";
5077
5739
 
5078
5740
  // src/ui/components/ui/sidebar/SidebarSupportInfo.tsx
5079
- var import_jsx_runtime62 = require("react/jsx-runtime");
5741
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5080
5742
  var SidebarSupportInfo = ({
5081
5743
  phone,
5082
5744
  hours,
@@ -5085,27 +5747,27 @@ var SidebarSupportInfo = ({
5085
5747
  className
5086
5748
  }) => {
5087
5749
  const collapsed = useSidebarCollapsed();
5088
- const badge = /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
5750
+ const badge = /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
5089
5751
  if (collapsed) {
5090
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
5752
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
5091
5753
  }
5092
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
5754
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
5093
5755
  badge,
5094
- /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "flex min-w-0 flex-col leading-tight", children: [
5095
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-sm font-bold text-white", children: phone }),
5096
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "truncate text-xs text-white/50", children: hours })
5756
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex min-w-0 flex-col leading-tight", children: [
5757
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-sm font-bold text-white", children: phone }),
5758
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "truncate text-xs text-white/50", children: hours })
5097
5759
  ] })
5098
5760
  ] });
5099
5761
  };
5100
5762
 
5101
5763
  // src/ui/components/ui/sidebar/SidebarMenuSearchInput.tsx
5102
- var import_react43 = require("react");
5103
- var import_jsx_runtime63 = require("react/jsx-runtime");
5104
- var SidebarMenuSearchInput = (0, import_react43.forwardRef)((_a, ref) => {
5764
+ var import_react45 = require("react");
5765
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5766
+ var SidebarMenuSearchInput = (0, import_react45.forwardRef)((_a, ref) => {
5105
5767
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
5106
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(InputGroup, { children: [
5107
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
5108
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
5768
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(InputGroup, { children: [
5769
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
5770
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5109
5771
  Input,
5110
5772
  __spreadValues({
5111
5773
  ref,
@@ -5120,9 +5782,9 @@ var SidebarMenuSearchInput = (0, import_react43.forwardRef)((_a, ref) => {
5120
5782
  SidebarMenuSearchInput.displayName = "SidebarMenuSearchInput";
5121
5783
 
5122
5784
  // src/ui/components/ui/sidebar/SidebarUserMenu.tsx
5123
- var import_react44 = require("react");
5785
+ var import_react46 = require("react");
5124
5786
  var RadixPopover5 = __toESM(require("@radix-ui/react-popover"));
5125
- var import_jsx_runtime64 = require("react/jsx-runtime");
5787
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5126
5788
  var panelClassName = cn(
5127
5789
  "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)]",
5128
5790
  "data-[state=open]:animate-[fade-in_150ms_ease-out]"
@@ -5139,13 +5801,13 @@ var SidebarUserMenu = ({
5139
5801
  className
5140
5802
  }) => {
5141
5803
  const collapsed = useSidebarCollapsed();
5142
- const [open, setOpen] = (0, import_react44.useState)(false);
5804
+ const [open, setOpen] = (0, import_react46.useState)(false);
5143
5805
  const runAndClose = (action) => {
5144
5806
  action();
5145
5807
  setOpen(false);
5146
5808
  };
5147
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
5148
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5809
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
5810
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
5149
5811
  "button",
5150
5812
  {
5151
5813
  type: "button",
@@ -5155,10 +5817,10 @@ var SidebarUserMenu = ({
5155
5817
  className
5156
5818
  ),
5157
5819
  children: [
5158
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
5159
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
5160
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5161
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5820
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
5821
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
5822
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5823
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5162
5824
  Text,
5163
5825
  {
5164
5826
  as: "span",
@@ -5169,10 +5831,10 @@ var SidebarUserMenu = ({
5169
5831
  children: name
5170
5832
  }
5171
5833
  ),
5172
- email && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
5173
- subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
5834
+ email && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
5835
+ subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
5174
5836
  ] }),
5175
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5837
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5176
5838
  FaIcon,
5177
5839
  {
5178
5840
  name: "sort",
@@ -5185,7 +5847,7 @@ var SidebarUserMenu = ({
5185
5847
  ]
5186
5848
  }
5187
5849
  ) }),
5188
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5850
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
5189
5851
  RadixPopover5.Content,
5190
5852
  {
5191
5853
  align: "end",
@@ -5193,10 +5855,10 @@ var SidebarUserMenu = ({
5193
5855
  sideOffset: 6,
5194
5856
  className: panelClassName,
5195
5857
  children: [
5196
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
5197
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Avatar, { name, src: avatarSrc, size: 32 }),
5198
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5199
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5858
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
5859
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Avatar, { name, src: avatarSrc, size: 32 }),
5860
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
5861
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5200
5862
  Text,
5201
5863
  {
5202
5864
  as: "span",
@@ -5207,20 +5869,20 @@ var SidebarUserMenu = ({
5207
5869
  children: name
5208
5870
  }
5209
5871
  ),
5210
- email && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
5211
- subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
5872
+ email && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
5873
+ subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
5212
5874
  ] })
5213
5875
  ] }),
5214
- actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5876
+ actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5215
5877
  "div",
5216
5878
  {
5217
5879
  className: "border-t border-white/10 py-1 first:border-t-0",
5218
5880
  children: group.map(
5219
5881
  (item) => {
5220
5882
  var _a;
5221
- return item.renderPanel || item.subActions ? /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(RadixPopover5.Root, { children: [
5222
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("button", { type: "button", className: rowClassName, children: [
5223
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5883
+ return item.renderPanel || item.subActions ? /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(RadixPopover5.Root, { children: [
5884
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("button", { type: "button", className: rowClassName, children: [
5885
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5224
5886
  FaIcon,
5225
5887
  {
5226
5888
  name: item.icon,
@@ -5229,8 +5891,8 @@ var SidebarUserMenu = ({
5229
5891
  className: "shrink-0 text-white/70"
5230
5892
  }
5231
5893
  ),
5232
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "flex-1", children: item.label }),
5233
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5894
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("span", { className: "flex-1", children: item.label }),
5895
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5234
5896
  FaIcon,
5235
5897
  {
5236
5898
  name: "chevron-right",
@@ -5239,21 +5901,21 @@ var SidebarUserMenu = ({
5239
5901
  }
5240
5902
  )
5241
5903
  ] }) }),
5242
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5904
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5243
5905
  RadixPopover5.Content,
5244
5906
  {
5245
5907
  align: "end",
5246
5908
  side: "right",
5247
5909
  sideOffset: 6,
5248
5910
  className: panelClassName,
5249
- children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5911
+ children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
5250
5912
  "button",
5251
5913
  {
5252
5914
  type: "button",
5253
5915
  onClick: () => runAndClose(sub.action),
5254
5916
  className: rowClassName,
5255
5917
  children: [
5256
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5918
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5257
5919
  FaIcon,
5258
5920
  {
5259
5921
  name: sub.icon,
@@ -5269,14 +5931,14 @@ var SidebarUserMenu = ({
5269
5931
  ))
5270
5932
  }
5271
5933
  ) })
5272
- ] }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
5934
+ ] }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
5273
5935
  "button",
5274
5936
  {
5275
5937
  type: "button",
5276
5938
  onClick: () => runAndClose(item.action),
5277
5939
  className: rowClassName,
5278
5940
  children: [
5279
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
5941
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5280
5942
  FaIcon,
5281
5943
  {
5282
5944
  name: item.icon,
@@ -5303,15 +5965,15 @@ var SidebarUserMenu = ({
5303
5965
 
5304
5966
  // src/ui/components/ui/Toaster.tsx
5305
5967
  var import_sonner = require("sonner");
5306
- var import_jsx_runtime65 = require("react/jsx-runtime");
5307
- var Toaster = () => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_sonner.Toaster, { position: "bottom-right", gap: 8 });
5968
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5969
+ var Toaster = () => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_sonner.Toaster, { position: "bottom-right", gap: 8 });
5308
5970
 
5309
5971
  // src/ui/lib/toast.tsx
5310
5972
  var import_sonner3 = require("sonner");
5311
5973
 
5312
5974
  // src/ui/components/ui/ToastCard.tsx
5313
5975
  var import_sonner2 = require("sonner");
5314
- var import_jsx_runtime66 = require("react/jsx-runtime");
5976
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5315
5977
  var ICON = {
5316
5978
  success: "circle-check",
5317
5979
  error: "circle-xmark",
@@ -5353,7 +6015,7 @@ var ToastCard = ({
5353
6015
  title,
5354
6016
  message,
5355
6017
  timeOut
5356
- }) => /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
6018
+ }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5357
6019
  Layout,
5358
6020
  {
5359
6021
  role: "status",
@@ -5365,14 +6027,14 @@ var ToastCard = ({
5365
6027
  ACCENT_BORDER[type]
5366
6028
  ),
5367
6029
  children: [
5368
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6030
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5369
6031
  "span",
5370
6032
  {
5371
6033
  className: cn(
5372
6034
  "flex h-7 w-7 shrink-0 items-center justify-center rounded-full",
5373
6035
  ACCENT_BG[type]
5374
6036
  ),
5375
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6037
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5376
6038
  FaIcon,
5377
6039
  {
5378
6040
  name: ICON[type],
@@ -5385,21 +6047,21 @@ var ToastCard = ({
5385
6047
  )
5386
6048
  }
5387
6049
  ),
5388
- /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
5389
- title && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-sm font-bold text-neutral-800", children: title }),
5390
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("p", { className: "text-sm text-neutral-800", children: message })
6050
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
6051
+ title && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-sm font-bold text-neutral-800", children: title }),
6052
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { className: "text-sm text-neutral-800", children: message })
5391
6053
  ] }),
5392
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6054
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5393
6055
  "button",
5394
6056
  {
5395
6057
  type: "button",
5396
6058
  "aria-label": "Fermer",
5397
6059
  onClick: () => import_sonner2.toast.dismiss(id),
5398
6060
  className: "absolute right-2.5 top-2.5 text-grey-500 hover:text-neutral-800",
5399
- children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(FaIcon, { name: "xmark", size: 14 })
6061
+ children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(FaIcon, { name: "xmark", size: 14 })
5400
6062
  }
5401
6063
  ),
5402
- type !== "loading" && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
6064
+ type !== "loading" && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
5403
6065
  "div",
5404
6066
  {
5405
6067
  className: cn(
@@ -5414,13 +6076,13 @@ var ToastCard = ({
5414
6076
  );
5415
6077
 
5416
6078
  // src/ui/lib/toast.tsx
5417
- var import_jsx_runtime67 = require("react/jsx-runtime");
6079
+ var import_jsx_runtime83 = require("react/jsx-runtime");
5418
6080
  var DEFAULT_TIMEOUT = 4e3;
5419
6081
  var show = (type, message, options) => {
5420
6082
  var _a;
5421
6083
  const timeOut = type === "loading" ? Infinity : (_a = options == null ? void 0 : options.timeOut) != null ? _a : DEFAULT_TIMEOUT;
5422
6084
  return import_sonner3.toast.custom(
5423
- (id) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
6085
+ (id) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
5424
6086
  ToastCard,
5425
6087
  {
5426
6088
  id,
@@ -5458,9 +6120,9 @@ var toast = {
5458
6120
  };
5459
6121
 
5460
6122
  // src/ui/components/ui/PageContainer.tsx
5461
- var import_react45 = require("react");
6123
+ var import_react47 = require("react");
5462
6124
  var import_class_variance_authority14 = require("class-variance-authority");
5463
- var import_jsx_runtime68 = require("react/jsx-runtime");
6125
+ var import_jsx_runtime84 = require("react/jsx-runtime");
5464
6126
  var pageContainerVariants = (0, import_class_variance_authority14.cva)(
5465
6127
  "flex h-full w-full flex-col overflow-auto rounded-[10px] bg-grey-200 shadow-[0_1px_4px_rgba(0,0,0,0.16)]",
5466
6128
  {
@@ -5475,10 +6137,10 @@ var pageContainerVariants = (0, import_class_variance_authority14.cva)(
5475
6137
  defaultVariants: { padding: "md" }
5476
6138
  }
5477
6139
  );
5478
- var PageContainer = (0, import_react45.forwardRef)(
6140
+ var PageContainer = (0, import_react47.forwardRef)(
5479
6141
  (_a, ref) => {
5480
6142
  var _b = _a, { padding, className } = _b, props = __objRest(_b, ["padding", "className"]);
5481
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
6143
+ return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
5482
6144
  "div",
5483
6145
  __spreadValues({
5484
6146
  ref,
@@ -5490,8 +6152,8 @@ var PageContainer = (0, import_react45.forwardRef)(
5490
6152
  PageContainer.displayName = "PageContainer";
5491
6153
 
5492
6154
  // src/ui/components/ui/IconTabs.tsx
5493
- var import_react46 = require("react");
5494
- var import_jsx_runtime69 = require("react/jsx-runtime");
6155
+ var import_react48 = require("react");
6156
+ var import_jsx_runtime85 = require("react/jsx-runtime");
5495
6157
  var IconTabs = ({
5496
6158
  items,
5497
6159
  value,
@@ -5500,10 +6162,10 @@ var IconTabs = ({
5500
6162
  className
5501
6163
  }) => {
5502
6164
  var _a;
5503
- const listRef = (0, import_react46.useRef)(null);
5504
- const tabRefs = (0, import_react46.useRef)([]);
5505
- const [bar, setBar] = (0, import_react46.useState)({ left: 0, top: 0, width: 0, height: 0 });
5506
- const updateBar = (0, import_react46.useCallback)(() => {
6165
+ const listRef = (0, import_react48.useRef)(null);
6166
+ const tabRefs = (0, import_react48.useRef)([]);
6167
+ const [bar, setBar] = (0, import_react48.useState)({ left: 0, top: 0, width: 0, height: 0 });
6168
+ const updateBar = (0, import_react48.useCallback)(() => {
5507
6169
  const root = listRef.current;
5508
6170
  const activeEl = tabRefs.current[value];
5509
6171
  if (!root || !activeEl) return;
@@ -5516,14 +6178,14 @@ var IconTabs = ({
5516
6178
  height: box.height
5517
6179
  });
5518
6180
  }, [value]);
5519
- (0, import_react46.useEffect)(() => {
6181
+ (0, import_react48.useEffect)(() => {
5520
6182
  updateBar();
5521
6183
  const ro = new ResizeObserver(updateBar);
5522
6184
  if (listRef.current) ro.observe(listRef.current);
5523
6185
  return () => ro.disconnect();
5524
6186
  }, [updateBar]);
5525
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(Layout, { column: true, className, children: [
5526
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6187
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Layout, { column: true, className, children: [
6188
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
5527
6189
  Layout,
5528
6190
  {
5529
6191
  ref: listRef,
@@ -5532,7 +6194,7 @@ var IconTabs = ({
5532
6194
  gap: 1,
5533
6195
  className: "relative rounded-[5px] bg-grey-100 p-1",
5534
6196
  children: [
5535
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6197
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5536
6198
  "div",
5537
6199
  {
5538
6200
  className: "absolute rounded-[5px] bg-blue-50 transition-all duration-300",
@@ -5548,7 +6210,7 @@ var IconTabs = ({
5548
6210
  var _a2;
5549
6211
  const disabled = disabledIndexes.includes(index);
5550
6212
  const active = value === index;
5551
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
6213
+ return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
5552
6214
  "button",
5553
6215
  {
5554
6216
  type: "button",
@@ -5565,14 +6227,14 @@ var IconTabs = ({
5565
6227
  disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
5566
6228
  ),
5567
6229
  children: [
5568
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6230
+ /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5569
6231
  "i",
5570
6232
  {
5571
6233
  className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
5572
6234
  style: { fontSize: 16 }
5573
6235
  }
5574
6236
  ),
5575
- item.caption && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
6237
+ item.caption && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
5576
6238
  "span",
5577
6239
  {
5578
6240
  className: cn(
@@ -5590,13 +6252,13 @@ var IconTabs = ({
5590
6252
  ]
5591
6253
  }
5592
6254
  ),
5593
- ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
6255
+ ((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
5594
6256
  ] });
5595
6257
  };
5596
6258
 
5597
6259
  // src/ui/components/ui/Banner.tsx
5598
6260
  var import_class_variance_authority15 = require("class-variance-authority");
5599
- var import_jsx_runtime70 = require("react/jsx-runtime");
6261
+ var import_jsx_runtime86 = require("react/jsx-runtime");
5600
6262
  var bannerVariants = (0, import_class_variance_authority15.cva)("rounded-[6px] px-4 py-2", {
5601
6263
  variants: {
5602
6264
  theme: {
@@ -5617,7 +6279,7 @@ var bannerVariants = (0, import_class_variance_authority15.cva)("rounded-[6px] p
5617
6279
  },
5618
6280
  defaultVariants: { theme: "blue-700" }
5619
6281
  });
5620
- var TEXT_CLASS = {
6282
+ var TEXT_CLASS2 = {
5621
6283
  "blue-700": "text-blue-900",
5622
6284
  "blue-900": "text-blue-900",
5623
6285
  "blue-950": "text-blue-900",
@@ -5652,15 +6314,15 @@ var Banner = ({
5652
6314
  className
5653
6315
  }) => {
5654
6316
  const align = textAlignByJustify[justify];
5655
- const textClass = TEXT_CLASS[theme != null ? theme : "blue-700"];
5656
- const content = children ? children : message ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Layout, { column: true, align: justify, gap: 1, children: [
5657
- /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Layout, { align: "center", gap: 2, children: [
5658
- badge && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
5659
- title && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
6317
+ const textClass = TEXT_CLASS2[theme != null ? theme : "blue-700"];
6318
+ const content = children ? children : message ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Layout, { column: true, align: justify, gap: 1, children: [
6319
+ /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Layout, { align: "center", gap: 2, children: [
6320
+ badge && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
6321
+ title && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
5660
6322
  ] }),
5661
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Text, { size: "xs", align, className: textClass, children: subtitle })
6323
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Text, { size: "xs", align, className: textClass, children: subtitle })
5662
6324
  ] });
5663
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
6325
+ return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
5664
6326
  Layout,
5665
6327
  {
5666
6328
  role: "alert",
@@ -5671,15 +6333,15 @@ var Banner = ({
5671
6333
  width,
5672
6334
  className: cn(bannerVariants({ theme }), className),
5673
6335
  children: [
5674
- justify === "start" ? content : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
5675
- toggle ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
6336
+ justify === "start" ? content : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
6337
+ toggle ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
5676
6338
  Switch,
5677
6339
  {
5678
6340
  checked: toggle.checked,
5679
6341
  onChange: toggle.onChange,
5680
6342
  disabled: toggle.disabled
5681
6343
  }
5682
- ) : action && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
6344
+ ) : action && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
5683
6345
  Button,
5684
6346
  {
5685
6347
  variant: "outline",
@@ -5698,7 +6360,7 @@ var Banner = ({
5698
6360
  };
5699
6361
 
5700
6362
  // src/ui/components/ui/FloatingButton.tsx
5701
- var import_react47 = require("react");
6363
+ var import_react49 = require("react");
5702
6364
 
5703
6365
  // src/ui/lib/floatingArc.ts
5704
6366
  var MAX_STEP = 65;
@@ -5790,7 +6452,7 @@ var resolveArcPlacement = (request) => {
5790
6452
  };
5791
6453
 
5792
6454
  // src/ui/components/ui/FloatingButton.tsx
5793
- var import_jsx_runtime71 = require("react/jsx-runtime");
6455
+ var import_jsx_runtime87 = require("react/jsx-runtime");
5794
6456
  var readStoredOffset = (key) => {
5795
6457
  if (!key || typeof window === "undefined") return { x: 0, y: 0 };
5796
6458
  try {
@@ -5852,20 +6514,20 @@ var FloatingButton = ({
5852
6514
  safeArea,
5853
6515
  onOffsetChange
5854
6516
  }) => {
5855
- const containerRef = (0, import_react47.useRef)(null);
5856
- const [placement, setPlacement] = (0, import_react47.useState)(() => ({
6517
+ const containerRef = (0, import_react49.useRef)(null);
6518
+ const [placement, setPlacement] = (0, import_react49.useState)(() => ({
5857
6519
  geometry: __spreadValues({ base: 90 }, arcLayout(actions.length, ARC_RADIUS, SUB_SIZE)),
5858
6520
  shift: { x: 0, y: 0 }
5859
6521
  }));
5860
- const [isDragging, setIsDragging] = (0, import_react47.useState)(false);
5861
- const [offset, setOffset] = (0, import_react47.useState)(() => readStoredOffset(persistKey));
5862
- const offsetRef = (0, import_react47.useRef)(offset);
5863
- const lastPointRef = (0, import_react47.useRef)({ x: 0, y: 0 });
5864
- const dragDistanceRef = (0, import_react47.useRef)(0);
5865
- (0, import_react47.useEffect)(() => {
6522
+ const [isDragging, setIsDragging] = (0, import_react49.useState)(false);
6523
+ const [offset, setOffset] = (0, import_react49.useState)(() => readStoredOffset(persistKey));
6524
+ const offsetRef = (0, import_react49.useRef)(offset);
6525
+ const lastPointRef = (0, import_react49.useRef)({ x: 0, y: 0 });
6526
+ const dragDistanceRef = (0, import_react49.useRef)(0);
6527
+ (0, import_react49.useEffect)(() => {
5866
6528
  onOffsetChange == null ? void 0 : onOffsetChange(offset);
5867
6529
  }, [offset, onOffsetChange]);
5868
- const clampOffset = (0, import_react47.useCallback)(
6530
+ const clampOffset = (0, import_react49.useCallback)(
5869
6531
  (next) => {
5870
6532
  var _a, _b, _c, _d;
5871
6533
  const el = containerRef.current;
@@ -5885,14 +6547,14 @@ var FloatingButton = ({
5885
6547
  },
5886
6548
  [safeArea == null ? void 0 : safeArea.left, safeArea == null ? void 0 : safeArea.top, safeArea == null ? void 0 : safeArea.right, safeArea == null ? void 0 : safeArea.bottom]
5887
6549
  );
5888
- (0, import_react47.useLayoutEffect)(() => {
6550
+ (0, import_react49.useLayoutEffect)(() => {
5889
6551
  const corrected = clampOffset(offsetRef.current);
5890
6552
  if (corrected.x === offsetRef.current.x && corrected.y === offsetRef.current.y)
5891
6553
  return;
5892
6554
  offsetRef.current = corrected;
5893
6555
  setOffset(corrected);
5894
6556
  }, [clampOffset]);
5895
- (0, import_react47.useEffect)(() => {
6557
+ (0, import_react49.useEffect)(() => {
5896
6558
  if (!draggable || !isDragging) return;
5897
6559
  const onPointerMove = (e) => {
5898
6560
  const dx = e.clientX - lastPointRef.current.x;
@@ -5928,7 +6590,7 @@ var FloatingButton = ({
5928
6590
  window.removeEventListener("pointercancel", endDrag);
5929
6591
  };
5930
6592
  }, [draggable, isDragging, persistKey, clampOffset]);
5931
- const resolvePlacement = (0, import_react47.useCallback)(() => {
6593
+ const resolvePlacement = (0, import_react49.useCallback)(() => {
5932
6594
  var _a, _b, _c, _d;
5933
6595
  const el = containerRef.current;
5934
6596
  if (!el || typeof window === "undefined") return;
@@ -5957,13 +6619,13 @@ var FloatingButton = ({
5957
6619
  safeArea == null ? void 0 : safeArea.right,
5958
6620
  safeArea == null ? void 0 : safeArea.bottom
5959
6621
  ]);
5960
- (0, import_react47.useLayoutEffect)(() => {
6622
+ (0, import_react49.useLayoutEffect)(() => {
5961
6623
  if (isOpen) resolvePlacement();
5962
6624
  }, [isOpen, offset, resolvePlacement]);
5963
- (0, import_react47.useLayoutEffect)(() => {
6625
+ (0, import_react49.useLayoutEffect)(() => {
5964
6626
  resolvePlacement();
5965
6627
  }, [resolvePlacement]);
5966
- (0, import_react47.useEffect)(() => {
6628
+ (0, import_react49.useEffect)(() => {
5967
6629
  if (typeof window === "undefined") return;
5968
6630
  const onResize = () => {
5969
6631
  resolvePlacement();
@@ -5988,7 +6650,7 @@ var FloatingButton = ({
5988
6650
  const { itemSize } = placement.geometry;
5989
6651
  const translateX = offset.x + (isOpen ? placement.shift.x : 0);
5990
6652
  const translateY = offset.y + (isOpen ? placement.shift.y : 0);
5991
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
6653
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
5992
6654
  "div",
5993
6655
  {
5994
6656
  ref: containerRef,
@@ -6006,7 +6668,7 @@ var FloatingButton = ({
6006
6668
  actions.map((action, index) => {
6007
6669
  var _a;
6008
6670
  const itemOffset = arcOffset(index, actions.length, placement.geometry);
6009
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
6671
+ return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
6010
6672
  "button",
6011
6673
  {
6012
6674
  type: "button",
@@ -6024,14 +6686,14 @@ var FloatingButton = ({
6024
6686
  transform: isOpen ? `translate(${itemOffset.x}px, ${itemOffset.y}px)` : "scale(0.4)"
6025
6687
  },
6026
6688
  children: [
6027
- /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: SUB_ICON[color], children: action.icon }),
6028
- ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: action.badge })
6689
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: SUB_ICON[color], children: action.icon }),
6690
+ ((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: action.badge })
6029
6691
  ]
6030
6692
  },
6031
6693
  action.id
6032
6694
  );
6033
6695
  }),
6034
- /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
6696
+ /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
6035
6697
  "button",
6036
6698
  {
6037
6699
  type: "button",
@@ -6048,8 +6710,8 @@ var FloatingButton = ({
6048
6710
  touchAction: draggable ? "none" : void 0
6049
6711
  },
6050
6712
  children: [
6051
- isOpen ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(FaIcon, { name: "xmark", size: 20 }) : icon,
6052
- !isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: mainBadge })
6713
+ isOpen ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FaIcon, { name: "xmark", size: 20 }) : icon,
6714
+ !isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "absolute -right-1 -top-1 flex h-[18px] min-w-[18px] items-center justify-center rounded-full bg-red-500 px-1 text-[11px] font-bold text-white", children: mainBadge })
6053
6715
  ]
6054
6716
  }
6055
6717
  )
@@ -6059,8 +6721,8 @@ var FloatingButton = ({
6059
6721
  };
6060
6722
 
6061
6723
  // src/ui/components/ui/ActivityFeedPanel.tsx
6062
- var import_react48 = require("react");
6063
- var import_jsx_runtime72 = require("react/jsx-runtime");
6724
+ var import_react50 = require("react");
6725
+ var import_jsx_runtime88 = require("react/jsx-runtime");
6064
6726
  var PANEL_WIDTH = 500;
6065
6727
  var PANEL_MAX_HEIGHT = 750;
6066
6728
  var GAP = 8;
@@ -6094,15 +6756,15 @@ var ActivityFeedPanel = ({
6094
6756
  emptyMessage = "Rien de neuf pour l\u2019instant.",
6095
6757
  items
6096
6758
  }) => {
6097
- const panelRef = (0, import_react48.useRef)(null);
6098
- const [placement, setPlacement] = (0, import_react48.useState)(
6759
+ const panelRef = (0, import_react50.useRef)(null);
6760
+ const [placement, setPlacement] = (0, import_react50.useState)(
6099
6761
  () => typeof window === "undefined" ? {} : resolveFloatingPanelPlacement(
6100
6762
  offset,
6101
6763
  window.innerWidth,
6102
6764
  window.innerHeight
6103
6765
  )
6104
6766
  );
6105
- (0, import_react48.useEffect)(() => {
6767
+ (0, import_react50.useEffect)(() => {
6106
6768
  if (!open || typeof document === "undefined") return;
6107
6769
  const handlePointerDown = (event) => {
6108
6770
  var _a;
@@ -6113,7 +6775,7 @@ var ActivityFeedPanel = ({
6113
6775
  document.addEventListener("pointerdown", handlePointerDown);
6114
6776
  return () => document.removeEventListener("pointerdown", handlePointerDown);
6115
6777
  }, [open, onClose]);
6116
- (0, import_react48.useEffect)(() => {
6778
+ (0, import_react50.useEffect)(() => {
6117
6779
  if (!open || typeof window === "undefined") return;
6118
6780
  const recompute = () => setPlacement(
6119
6781
  resolveFloatingPanelPlacement(
@@ -6127,7 +6789,7 @@ var ActivityFeedPanel = ({
6127
6789
  return () => window.removeEventListener("resize", recompute);
6128
6790
  }, [open, offset]);
6129
6791
  if (!open) return null;
6130
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
6792
+ return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6131
6793
  Layout,
6132
6794
  {
6133
6795
  ref: panelRef,
@@ -6135,7 +6797,7 @@ var ActivityFeedPanel = ({
6135
6797
  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)]",
6136
6798
  style: __spreadProps(__spreadValues({}, placement), { maxHeight: PANEL_MAX_HEIGHT }),
6137
6799
  children: [
6138
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
6800
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6139
6801
  Layout,
6140
6802
  {
6141
6803
  align: "center",
@@ -6143,12 +6805,12 @@ var ActivityFeedPanel = ({
6143
6805
  padding: 4,
6144
6806
  className: "border-b border-grey-200",
6145
6807
  children: [
6146
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
6147
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { size: "s", weight: "bold", children: title })
6808
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
6809
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text, { size: "s", weight: "bold", children: title })
6148
6810
  ]
6149
6811
  }
6150
6812
  ),
6151
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
6813
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6152
6814
  "div",
6153
6815
  {
6154
6816
  style: {
@@ -6159,10 +6821,10 @@ var ActivityFeedPanel = ({
6159
6821
  scrollbarWidth: "none"
6160
6822
  },
6161
6823
  className: "[&::-webkit-scrollbar]:hidden",
6162
- children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
6163
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Spinner, {}) }),
6164
- !isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
6165
- items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
6824
+ children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
6825
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Spinner, {}) }),
6826
+ !isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
6827
+ items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
6166
6828
  Layout,
6167
6829
  {
6168
6830
  gap: 3,
@@ -6170,7 +6832,7 @@ var ActivityFeedPanel = ({
6170
6832
  className: "cursor-pointer items-start rounded-[8px] p-2 hover:bg-grey-100",
6171
6833
  onClick: item.onClick,
6172
6834
  children: [
6173
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
6835
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
6174
6836
  IconBadge,
6175
6837
  {
6176
6838
  name: item.icon,
@@ -6179,9 +6841,9 @@ var ActivityFeedPanel = ({
6179
6841
  iconColor: item.iconColor
6180
6842
  }
6181
6843
  ),
6182
- /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
6183
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { size: "xs", children: item.text }),
6184
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
6844
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
6845
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text, { size: "xs", children: item.text }),
6846
+ /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
6185
6847
  ] })
6186
6848
  ]
6187
6849
  },
@@ -6196,7 +6858,7 @@ var ActivityFeedPanel = ({
6196
6858
  };
6197
6859
 
6198
6860
  // src/ui/components/ui/MetricCard.tsx
6199
- var import_jsx_runtime73 = require("react/jsx-runtime");
6861
+ var import_jsx_runtime89 = require("react/jsx-runtime");
6200
6862
  var ICON_WRAP_CLASS = {
6201
6863
  "blue-700": "bg-blue-50 text-blue-700",
6202
6864
  "blue-900": "bg-blue-50 text-blue-900",
@@ -6218,258 +6880,86 @@ var MetricCard = ({
6218
6880
  title,
6219
6881
  value,
6220
6882
  valueColor = "grey-600",
6221
- subtitle,
6222
- accent = "blue-950",
6223
- layout = "column",
6224
- onClick,
6225
- selected = false,
6226
- children,
6227
- className
6228
- }) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6229
- "div",
6230
- {
6231
- onClick,
6232
- className: cn(
6233
- "flex-1 rounded-[6px] border border-grey-300 bg-white p-3",
6234
- onClick && "cursor-pointer",
6235
- selected && "border-blue-700",
6236
- className
6237
- ),
6238
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Layout, { align: "center", gap: 3, fullWidth: true, children: [
6239
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
6240
- "span",
6241
- {
6242
- className: cn(
6243
- "flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
6244
- ICON_WRAP_CLASS[accent]
6245
- ),
6246
- children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
6247
- }
6248
- ),
6249
- children ? children : layout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Layout, { align: "center", gap: 1, children: [
6250
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6251
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { size: "s", color: "grey-600", children: title })
6252
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Layout, { column: true, gap: 1, children: [
6253
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { size: "s", color: "grey-600", children: title }),
6254
- /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(Layout, { align: "baseline", gap: 1, children: [
6255
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6256
- subtitle && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Text, { size: "xs", color: "grey-600", children: subtitle })
6257
- ] })
6258
- ] })
6259
- ] })
6260
- }
6261
- );
6262
-
6263
- // src/ui/components/ui/Tile.tsx
6264
- var import_jsx_runtime74 = require("react/jsx-runtime");
6265
- var Tile = ({
6266
- children,
6267
- onClick,
6268
- selected = false,
6269
- variant = "outline",
6270
- expandedContent,
6271
- className
6272
- }) => {
6273
- const isOutline = variant === "outline";
6274
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
6275
- "div",
6276
- {
6277
- className: cn(
6278
- "w-full overflow-hidden rounded-[6px]",
6279
- isOutline && "border bg-white",
6280
- isOutline && (selected ? "border-blue-700 ring-1 ring-blue-700" : "border-grey-200"),
6281
- !isOutline && selected && "bg-blue-50",
6282
- className
6283
- ),
6284
- children: [
6285
- onClick ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
6286
- "button",
6287
- {
6288
- type: "button",
6289
- "aria-pressed": selected,
6290
- onClick,
6291
- className: cn(
6292
- "block w-full cursor-pointer border-0 bg-transparent p-0 text-left outline-none transition-colors",
6293
- "hover:bg-black/[0.025] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-200"
6294
- ),
6295
- children
6296
- }
6297
- ) : children,
6298
- expandedContent && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
6299
- ]
6300
- }
6301
- );
6302
- };
6303
-
6304
- // src/ui/components/ui/Skeleton.tsx
6305
- var import_jsx_runtime75 = require("react/jsx-runtime");
6306
- var toCss = (value) => typeof value === "number" ? `${value}px` : value;
6307
- var Skeleton = (_a) => {
6308
- var _b = _a, {
6309
- width,
6310
- height,
6311
- isRound = false,
6312
- className,
6313
- style
6314
- } = _b, props = __objRest(_b, [
6315
- "width",
6316
- "height",
6317
- "isRound",
6318
- "className",
6319
- "style"
6320
- ]);
6321
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
6322
- "div",
6323
- __spreadValues({
6324
- className: cn(
6325
- "animate-pulse bg-grey-200",
6326
- isRound ? "rounded-full" : "rounded-md",
6327
- className
6328
- ),
6329
- style: __spreadValues({ width: toCss(width), height: toCss(height) }, style)
6330
- }, props)
6331
- );
6332
- };
6333
-
6334
- // src/ui/components/ui/TagBubble.tsx
6335
- var RadixToggle = __toESM(require("@radix-ui/react-toggle"));
6336
- var import_jsx_runtime76 = require("react/jsx-runtime");
6337
- var DOT_CLASS = {
6338
- "blue-700": "bg-blue-700",
6339
- "blue-900": "bg-blue-900",
6340
- "blue-950": "bg-blue-950",
6341
- "red-900": "bg-red-900",
6342
- "red-500": "bg-red-500",
6343
- "green-700": "bg-green-700",
6344
- "green-100": "bg-green-100",
6345
- "grey-600": "bg-grey-400",
6346
- "yellow-500": "bg-yellow-500",
6347
- "yellow-300": "bg-yellow-300",
6348
- "yellow-200": "bg-yellow-200",
6349
- "orange-600": "bg-orange-600",
6350
- "purple-700": "bg-purple-700"
6351
- };
6352
- var LIGHT_BG_CLASS = {
6353
- "blue-700": "bg-blue-50",
6354
- "blue-900": "bg-blue-50",
6355
- "blue-950": "bg-blue-50",
6356
- "red-900": "bg-red-50",
6357
- "red-500": "bg-red-50",
6358
- "green-700": "bg-green-50",
6359
- "green-100": "bg-green-50",
6360
- "grey-600": "bg-grey-100",
6361
- "yellow-500": "bg-yellow-50",
6362
- "yellow-300": "bg-yellow-50",
6363
- "yellow-200": "bg-yellow-50",
6364
- "orange-600": "bg-orange-50",
6365
- "purple-700": "bg-purple-50"
6366
- };
6367
- var TEXT_CLASS2 = {
6368
- "blue-700": "text-blue-700",
6369
- "blue-900": "text-blue-900",
6370
- "blue-950": "text-blue-950",
6371
- "red-900": "text-red-900",
6372
- "red-500": "text-red-500",
6373
- "green-700": "text-green-700",
6374
- "green-100": "text-green-100",
6375
- "grey-600": "text-grey-600",
6376
- "yellow-500": "text-yellow-500",
6377
- "yellow-300": "text-yellow-300",
6378
- "yellow-200": "text-yellow-200",
6379
- "orange-600": "text-orange-600",
6380
- "purple-700": "text-purple-700"
6381
- };
6382
- var BORDER_CLASS = {
6383
- "blue-700": "border-blue-700",
6384
- "blue-900": "border-blue-900",
6385
- "blue-950": "border-blue-950",
6386
- "red-900": "border-red-900",
6387
- "red-500": "border-red-500",
6388
- "green-700": "border-green-700",
6389
- "green-100": "border-green-100",
6390
- "grey-600": "border-grey-600",
6391
- "yellow-500": "border-yellow-500",
6392
- "yellow-300": "border-yellow-300",
6393
- "yellow-200": "border-yellow-200",
6394
- "orange-600": "border-orange-600",
6395
- "purple-700": "border-purple-700"
6396
- };
6397
- var isHexColor = (color) => color.startsWith("#");
6398
- var TagBubble = (_a) => {
6399
- var _b = _a, {
6400
- label,
6401
- hideDot = false,
6402
- active = false,
6403
- activeColor = "blue-700",
6404
- inactiveColor = "grey-600",
6405
- activeFill = false,
6406
- pill = false,
6407
- size = "s",
6408
- count,
6409
- countColor = "green-700",
6883
+ subtitle,
6884
+ accent = "blue-950",
6885
+ layout = "column",
6886
+ onClick,
6887
+ selected = false,
6888
+ children,
6889
+ className
6890
+ }) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6891
+ "div",
6892
+ {
6410
6893
  onClick,
6411
- className
6412
- } = _b, rest = __objRest(_b, [
6413
- "label",
6414
- "hideDot",
6415
- "active",
6416
- "activeColor",
6417
- "inactiveColor",
6418
- "activeFill",
6419
- "pill",
6420
- "size",
6421
- "count",
6422
- "countColor",
6423
- "onClick",
6424
- "className"
6425
- ]);
6426
- const showCount = count !== void 0 && count !== null;
6427
- const filled = activeFill && active;
6428
- const dotColor = active ? activeColor : inactiveColor;
6429
- const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
6430
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
6431
- RadixToggle.Root,
6432
- __spreadProps(__spreadValues({}, rest), {
6433
- type: "button",
6434
- pressed: active,
6435
- onClick,
6436
- style: __spreadValues({ borderColor: filledHexColor }, rest.style),
6894
+ className: cn(
6895
+ "flex-1 rounded-[6px] border border-grey-300 bg-white p-3",
6896
+ onClick && "cursor-pointer",
6897
+ selected && "border-blue-700",
6898
+ className
6899
+ ),
6900
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { align: "center", gap: 3, fullWidth: true, children: [
6901
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
6902
+ "span",
6903
+ {
6904
+ className: cn(
6905
+ "flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
6906
+ ICON_WRAP_CLASS[accent]
6907
+ ),
6908
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
6909
+ }
6910
+ ),
6911
+ children ? children : layout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { align: "center", gap: 1, children: [
6912
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6913
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", color: "grey-600", children: title })
6914
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { column: true, gap: 1, children: [
6915
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", color: "grey-600", children: title }),
6916
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(Layout, { align: "baseline", gap: 1, children: [
6917
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
6918
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Text, { size: "xs", color: "grey-600", children: subtitle })
6919
+ ] })
6920
+ ] })
6921
+ ] })
6922
+ }
6923
+ );
6924
+
6925
+ // src/ui/components/ui/Tile.tsx
6926
+ var import_jsx_runtime90 = require("react/jsx-runtime");
6927
+ var Tile = ({
6928
+ children,
6929
+ onClick,
6930
+ selected = false,
6931
+ variant = "outline",
6932
+ expandedContent,
6933
+ className
6934
+ }) => {
6935
+ const isOutline = variant === "outline";
6936
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
6937
+ "div",
6938
+ {
6437
6939
  className: cn(
6438
- "inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
6439
- pill ? "rounded-full" : "rounded-[6px]",
6440
- size === "m" && "h-9",
6441
- filled ? cn(
6442
- isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
6443
- "border-2"
6444
- ) : "border-grey-200 bg-white",
6445
- "focus-visible:ring-2 focus-visible:ring-blue-200",
6940
+ "w-full overflow-hidden rounded-[6px]",
6941
+ isOutline && "border bg-white",
6942
+ isOutline && (selected ? "border-blue-700 ring-1 ring-blue-700" : "border-grey-200"),
6943
+ !isOutline && selected && "bg-blue-50",
6446
6944
  className
6447
6945
  ),
6448
6946
  children: [
6449
- !hideDot && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6450
- "span",
6451
- {
6452
- className: cn(
6453
- "h-2 w-2 shrink-0 rounded-full",
6454
- !isHexColor(dotColor) && DOT_CLASS[dotColor]
6455
- ),
6456
- style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
6457
- }
6458
- ),
6459
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
6460
- "span",
6947
+ onClick ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
6948
+ "button",
6461
6949
  {
6950
+ type: "button",
6951
+ "aria-pressed": selected,
6952
+ onClick,
6462
6953
  className: cn(
6463
- "whitespace-nowrap text-xs font-semibold",
6464
- filled ? !isHexColor(activeColor) && TEXT_CLASS2[activeColor] : "text-neutral-800"
6954
+ "block w-full cursor-pointer border-0 bg-transparent p-0 text-left outline-none transition-colors",
6955
+ "hover:bg-black/[0.025] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-200"
6465
6956
  ),
6466
- style: { color: filledHexColor },
6467
- children: label
6957
+ children
6468
6958
  }
6469
- ),
6470
- showCount && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Badge, { theme: countColor, size: "s", children: count })
6959
+ ) : children,
6960
+ expandedContent && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
6471
6961
  ]
6472
- })
6962
+ }
6473
6963
  );
6474
6964
  };
6475
6965
 
@@ -6622,16 +7112,16 @@ var formatName = (person, fallback = "") => {
6622
7112
  };
6623
7113
 
6624
7114
  // src/ui/components/ui/history/HistoryChangeRow.tsx
6625
- var import_jsx_runtime77 = require("react/jsx-runtime");
7115
+ var import_jsx_runtime91 = require("react/jsx-runtime");
6626
7116
  var HistoryChangeRow = ({ change }) => {
6627
7117
  const { label, previousValue, nextValue, href, onClick } = change;
6628
7118
  const hasValues = Boolean(previousValue || nextValue);
6629
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(Layout, { align: "center", gap: 1.5, wrap: true, children: [
6630
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
6631
- previousValue && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text, { size: "xs", color: "grey-600", children: previousValue }),
6632
- previousValue && nextValue && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
6633
- nextValue && href && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Link, { href, newTab: true, size: "xs", children: nextValue }),
6634
- nextValue && onClick && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
7119
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Layout, { align: "center", gap: 1.5, wrap: true, children: [
7120
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
7121
+ previousValue && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Text, { size: "xs", color: "grey-600", children: previousValue }),
7122
+ previousValue && nextValue && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
7123
+ nextValue && href && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Link, { href, newTab: true, size: "xs", children: nextValue }),
7124
+ nextValue && onClick && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
6635
7125
  "button",
6636
7126
  {
6637
7127
  type: "button",
@@ -6643,27 +7133,27 @@ var HistoryChangeRow = ({ change }) => {
6643
7133
  children: nextValue
6644
7134
  }
6645
7135
  ),
6646
- nextValue && !href && !onClick && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Text, { size: "xs", weight: "semibold", children: nextValue })
7136
+ nextValue && !href && !onClick && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Text, { size: "xs", weight: "semibold", children: nextValue })
6647
7137
  ] });
6648
7138
  };
6649
7139
 
6650
7140
  // src/ui/components/ui/history/HistoryEntryCard.tsx
6651
- var import_jsx_runtime78 = require("react/jsx-runtime");
7141
+ var import_jsx_runtime92 = require("react/jsx-runtime");
6652
7142
  var CARD_CLASS = "group rounded-lg border border-grey-300 bg-white";
6653
7143
  var HistoryEntryCard = ({ entry }) => {
6654
7144
  const { title, date, author, badge, changes = [] } = entry;
6655
7145
  const hasChanges = changes.length > 0;
6656
- const summary = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Layout, { column: true, gap: 1, fullWidth: true, children: [
6657
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
6658
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
6659
- author && /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(import_jsx_runtime78.Fragment, { children: [
6660
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
6661
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
7146
+ const summary = /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { column: true, gap: 1, fullWidth: true, children: [
7147
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
7148
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
7149
+ author && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
7150
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
7151
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
6662
7152
  ] }),
6663
- badge && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Badge, { theme: badge.theme, size: "s", children: badge.label })
7153
+ badge && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Badge, { theme: badge.theme, size: "s", children: badge.label })
6664
7154
  ] }),
6665
- /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
6666
- date && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7155
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
7156
+ date && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6667
7157
  Text,
6668
7158
  {
6669
7159
  size: "xxs",
@@ -6673,7 +7163,7 @@ var HistoryEntryCard = ({ entry }) => {
6673
7163
  children: formatDate(date, "dateTime", "fr")
6674
7164
  }
6675
7165
  ),
6676
- hasChanges && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7166
+ hasChanges && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6677
7167
  Icon,
6678
7168
  {
6679
7169
  name: "chevron-down",
@@ -6684,14 +7174,14 @@ var HistoryEntryCard = ({ entry }) => {
6684
7174
  )
6685
7175
  ] })
6686
7176
  ] }),
6687
- title && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
7177
+ title && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
6688
7178
  ] });
6689
7179
  if (!hasChanges) {
6690
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `${CARD_CLASS} p-3`, children: summary });
7180
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `${CARD_CLASS} p-3`, children: summary });
6691
7181
  }
6692
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(Collapsible, { className: CARD_CLASS, children: [
6693
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
6694
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7182
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Collapsible, { className: CARD_CLASS, children: [
7183
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
7184
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6695
7185
  Layout,
6696
7186
  {
6697
7187
  column: true,
@@ -6699,7 +7189,7 @@ var HistoryEntryCard = ({ entry }) => {
6699
7189
  paddingX: 3,
6700
7190
  paddingBottom: 3,
6701
7191
  className: author ? "pl-[64px]" : void 0,
6702
- children: changes.map((change, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
7192
+ children: changes.map((change, index) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
6703
7193
  HistoryChangeRow,
6704
7194
  {
6705
7195
  change
@@ -6712,7 +7202,7 @@ var HistoryEntryCard = ({ entry }) => {
6712
7202
  };
6713
7203
 
6714
7204
  // src/ui/components/ui/history/HistoryList.tsx
6715
- var import_jsx_runtime79 = require("react/jsx-runtime");
7205
+ var import_jsx_runtime93 = require("react/jsx-runtime");
6716
7206
  var SKELETON_COUNT = 4;
6717
7207
  var HistoryList = ({
6718
7208
  entries,
@@ -6724,8 +7214,8 @@ var HistoryList = ({
6724
7214
  emptyLabel = "Aucun historique",
6725
7215
  emptyDescription = "Aucune action enregistr\xE9e pour le moment.",
6726
7216
  notice
6727
- }) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
6728
- filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7217
+ }) => /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
7218
+ filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6729
7219
  TagBubble,
6730
7220
  {
6731
7221
  label: filter.label,
@@ -6736,22 +7226,22 @@ var HistoryList = ({
6736
7226
  },
6737
7227
  filter.value
6738
7228
  )) }),
6739
- isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Skeleton, { height: "72px" }, index)),
6740
- !isLoading && isError && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
6741
- !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
7229
+ isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Skeleton, { height: "72px" }, index)),
7230
+ !isLoading && isError && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
7231
+ !isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6742
7232
  EmptyState,
6743
7233
  {
6744
- icon: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FaIcon, { name: "clock-rotate-left", size: 20 }),
7234
+ icon: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FaIcon, { name: "clock-rotate-left", size: 20 }),
6745
7235
  title: emptyLabel,
6746
7236
  description: emptyDescription
6747
7237
  }
6748
7238
  ),
6749
- !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(HistoryEntryCard, { entry }, entry.id)),
6750
- !isLoading && !isError && notice && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
7239
+ !isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(HistoryEntryCard, { entry }, entry.id)),
7240
+ !isLoading && !isError && notice && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
6751
7241
  ] });
6752
7242
 
6753
7243
  // src/ui/components/ui/history/HistoryDrawer.tsx
6754
- var import_jsx_runtime80 = require("react/jsx-runtime");
7244
+ var import_jsx_runtime94 = require("react/jsx-runtime");
6755
7245
  var HistoryDrawer = (_a) => {
6756
7246
  var _b = _a, {
6757
7247
  open,
@@ -6762,7 +7252,7 @@ var HistoryDrawer = (_a) => {
6762
7252
  "onClose",
6763
7253
  "title"
6764
7254
  ]);
6765
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
7255
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
6766
7256
  Drawer,
6767
7257
  {
6768
7258
  open,
@@ -6770,9 +7260,9 @@ var HistoryDrawer = (_a) => {
6770
7260
  className: "z-[1060]",
6771
7261
  overlayClassName: "z-[1050]",
6772
7262
  children: [
6773
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(DrawerHeader, { children: [
6774
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DrawerTitle, { className: "uppercase", children: title }),
6775
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
7263
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(DrawerHeader, { children: [
7264
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DrawerTitle, { className: "uppercase", children: title }),
7265
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6776
7266
  Icon,
6777
7267
  {
6778
7268
  name: "xmark",
@@ -6782,15 +7272,15 @@ var HistoryDrawer = (_a) => {
6782
7272
  }
6783
7273
  ) })
6784
7274
  ] }),
6785
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(HistoryList, __spreadValues({}, listProps)) })
7275
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(HistoryList, __spreadValues({}, listProps)) })
6786
7276
  ]
6787
7277
  }
6788
7278
  );
6789
7279
  };
6790
7280
 
6791
7281
  // src/ui/components/ui/history/HistoryButton.tsx
6792
- var import_react49 = require("react");
6793
- var import_jsx_runtime81 = require("react/jsx-runtime");
7282
+ var import_react51 = require("react");
7283
+ var import_jsx_runtime95 = require("react/jsx-runtime");
6794
7284
  var LABEL = "Historique";
6795
7285
  var SHORT_TOOLTIP = "Voir l\u2019historique des actions";
6796
7286
  var HistoryButton = (_a) => {
@@ -6805,16 +7295,16 @@ var HistoryButton = (_a) => {
6805
7295
  "tooltip",
6806
7296
  "onOpenChange"
6807
7297
  ]);
6808
- const [isOpen, setIsOpen] = (0, import_react49.useState)(false);
7298
+ const [isOpen, setIsOpen] = (0, import_react51.useState)(false);
6809
7299
  const changeOpen = (nextIsOpen) => {
6810
7300
  setIsOpen(nextIsOpen);
6811
7301
  onOpenChange == null ? void 0 : onOpenChange(nextIsOpen);
6812
7302
  };
6813
7303
  const open = () => changeOpen(true);
6814
- const icon = /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(FaIcon, { name: "clock-rotate-left", size: 14 });
6815
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
6816
- variant === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Button, { label: LABEL, iconLeft: icon, onClick: open }),
6817
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
7304
+ const icon = /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(FaIcon, { name: "clock-rotate-left", size: 14 });
7305
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(import_jsx_runtime95.Fragment, { children: [
7306
+ variant === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { label: LABEL, iconLeft: icon, onClick: open }),
7307
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6818
7308
  HistoryDrawer,
6819
7309
  __spreadValues({
6820
7310
  open: isOpen,
@@ -6826,7 +7316,7 @@ var HistoryButton = (_a) => {
6826
7316
  };
6827
7317
 
6828
7318
  // src/ui/components/ui/Gantt.tsx
6829
- var import_jsx_runtime82 = require("react/jsx-runtime");
7319
+ var import_jsx_runtime96 = require("react/jsx-runtime");
6830
7320
  var Gantt = ({
6831
7321
  days,
6832
7322
  rows,
@@ -6842,7 +7332,7 @@ var Gantt = ({
6842
7332
  const bodyHeight = rows.length * rowHeight;
6843
7333
  const clickable = Boolean(onRowClick);
6844
7334
  const gridCols = { gridTemplateColumns: `${labelWidth}px minmax(0, 1fr)` };
6845
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
7335
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6846
7336
  "div",
6847
7337
  {
6848
7338
  className: cn(
@@ -6850,13 +7340,13 @@ var Gantt = ({
6850
7340
  className
6851
7341
  ),
6852
7342
  children: [
6853
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
7343
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6854
7344
  "div",
6855
7345
  {
6856
7346
  className: "grid border-b border-grey-300 bg-grey-100",
6857
7347
  style: gridCols,
6858
7348
  children: [
6859
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7349
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6860
7350
  Layout,
6861
7351
  {
6862
7352
  align: "center",
@@ -6864,7 +7354,7 @@ var Gantt = ({
6864
7354
  children: labelHeader
6865
7355
  }
6866
7356
  ),
6867
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7357
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6868
7358
  Layout,
6869
7359
  {
6870
7360
  fullHeight: true,
@@ -6878,13 +7368,13 @@ var Gantt = ({
6878
7368
  ]
6879
7369
  }
6880
7370
  ),
6881
- /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
7371
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
6882
7372
  "div",
6883
7373
  {
6884
7374
  className: "grid overflow-y-auto overflow-x-hidden",
6885
7375
  style: __spreadProps(__spreadValues({}, gridCols), { maxHeight }),
6886
7376
  children: [
6887
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7377
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6888
7378
  Layout,
6889
7379
  {
6890
7380
  column: true,
@@ -6901,8 +7391,8 @@ var Gantt = ({
6901
7391
  },
6902
7392
  row.key
6903
7393
  )) }),
6904
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
6905
- days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7394
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
7395
+ days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6906
7396
  "div",
6907
7397
  {
6908
7398
  className: cn(
@@ -6913,7 +7403,7 @@ var Gantt = ({
6913
7403
  },
6914
7404
  day.key
6915
7405
  )),
6916
- bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7406
+ bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6917
7407
  "div",
6918
7408
  {
6919
7409
  title: band.title,
@@ -6924,7 +7414,7 @@ var Gantt = ({
6924
7414
  )),
6925
7415
  rows.map((row, i) => {
6926
7416
  var _a, _b, _c;
6927
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7417
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6928
7418
  "div",
6929
7419
  {
6930
7420
  className: cn(
@@ -6932,7 +7422,7 @@ var Gantt = ({
6932
7422
  i === 0 ? "border-t-0" : "border-t border-grey-200"
6933
7423
  ),
6934
7424
  style: { top: i * rowHeight, height: rowHeight },
6935
- children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7425
+ children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6936
7426
  Layout,
6937
7427
  {
6938
7428
  align: "center",
@@ -6947,7 +7437,7 @@ var Gantt = ({
6947
7437
  background: row.bar.color,
6948
7438
  borderColor: row.bar.color
6949
7439
  },
6950
- children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7440
+ children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6951
7441
  "span",
6952
7442
  {
6953
7443
  className: "overflow-hidden text-ellipsis whitespace-nowrap text-[10px] font-semibold",
@@ -6969,7 +7459,7 @@ var Gantt = ({
6969
7459
  }
6970
7460
  );
6971
7461
  };
6972
- var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7462
+ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6973
7463
  "span",
6974
7464
  {
6975
7465
  className: "inline-block h-[9px] w-[9px] shrink-0 rounded-[3px]",
@@ -6979,7 +7469,7 @@ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
6979
7469
  var GanttSwatch = ({
6980
7470
  color,
6981
7471
  filled = true
6982
- }) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
7472
+ }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
6983
7473
  "span",
6984
7474
  {
6985
7475
  className: "box-border inline-block h-3 w-[18px] shrink-0 rounded-[3px] border-[1.5px]",
@@ -6987,108 +7477,8 @@ var GanttSwatch = ({
6987
7477
  }
6988
7478
  );
6989
7479
 
6990
- // src/ui/components/ui/Bulk.tsx
6991
- var import_jsx_runtime83 = require("react/jsx-runtime");
6992
- var BG_CLASS = {
6993
- "blue-700": "bg-blue-700",
6994
- "blue-900": "bg-blue-900",
6995
- "blue-950": "bg-blue-950",
6996
- "red-900": "bg-red-900",
6997
- "red-500": "bg-red-500",
6998
- "green-700": "bg-green-700",
6999
- "green-100": "bg-green-100",
7000
- "grey-600": "bg-grey-600",
7001
- "yellow-500": "bg-yellow-500",
7002
- "yellow-300": "bg-yellow-300",
7003
- "yellow-200": "bg-yellow-200",
7004
- "orange-600": "bg-orange-600",
7005
- "purple-700": "bg-purple-700"
7006
- };
7007
- var BulkActionSections = ({ sections }) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7008
- Layout,
7009
- {
7010
- role: "group",
7011
- fullHeight: true,
7012
- align: "stretch",
7013
- className: "[&>button:not(:last-child)]:rounded-r-none",
7014
- children: sections.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
7015
- "button",
7016
- {
7017
- type: "button",
7018
- disabled: section.disabled,
7019
- onClick: section.disabled ? void 0 : section.action,
7020
- className: cn(
7021
- "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]",
7022
- section.disabled ? "cursor-not-allowed bg-grey-500" : "hover:brightness-90"
7023
- ),
7024
- children: [
7025
- section.icon,
7026
- section.title
7027
- ]
7028
- },
7029
- index
7030
- ))
7031
- }
7032
- );
7033
- var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Layout, { align: "center", gap: 3, className: "px-4", children: sections.map((section, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Layout, { align: "center", gap: 3, children: [
7034
- index > 0 && (section.divider ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "h-11 w-px shrink-0 bg-white/40" }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "h-0.5 w-4 shrink-0 rounded-full bg-white/50" })),
7035
- section.action ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
7036
- "button",
7037
- {
7038
- type: "button",
7039
- disabled: section.disabled,
7040
- onClick: section.disabled ? void 0 : section.action,
7041
- className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white hover:opacity-80",
7042
- children: [
7043
- section.icon,
7044
- section.title
7045
- ]
7046
- }
7047
- ) : section.caption ? /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Layout, { column: true, fullWidth: false, className: "leading-tight text-white", children: [
7048
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "whitespace-nowrap text-[10px] font-bold uppercase tracking-wide opacity-70", children: section.caption }),
7049
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "whitespace-nowrap text-sm font-bold", children: section.title })
7050
- ] }) : section.badge ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "whitespace-nowrap rounded-full bg-white/15 px-2.5 py-1 text-xs font-bold text-white", children: section.title }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white", children: [
7051
- section.icon,
7052
- section.title
7053
- ] })
7054
- ] }, index)) });
7055
- var Bulk = ({
7056
- onClose,
7057
- leftTitle,
7058
- sections,
7059
- color = "blue-700",
7060
- className,
7061
- variant = "actions"
7062
- }) => /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(
7063
- "div",
7064
- {
7065
- className: cn(
7066
- "fixed bottom-[50px] left-1/2 z-[500] inline-flex h-[52px] -translate-x-1/2 items-center rounded-xl pl-4 text-white",
7067
- BG_CLASS[color],
7068
- className
7069
- ),
7070
- children: [
7071
- leftTitle && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)(Layout, { align: "center", gap: 6, className: "pr-6", children: [
7072
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
7073
- "button",
7074
- {
7075
- type: "button",
7076
- "aria-label": "Fermer",
7077
- onClick: onClose,
7078
- className: "text-white hover:opacity-80",
7079
- children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(FaIcon, { name: "xmark", size: 20 })
7080
- }
7081
- ),
7082
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "whitespace-nowrap text-sm font-bold", children: leftTitle }),
7083
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "h-11 w-px bg-white/40" })
7084
- ] }),
7085
- variant === "display" ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BulkDisplaySections, { sections }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(BulkActionSections, { sections })
7086
- ]
7087
- }
7088
- );
7089
-
7090
7480
  // src/ui/components/ui/Timeline.tsx
7091
- var import_jsx_runtime84 = require("react/jsx-runtime");
7481
+ var import_jsx_runtime97 = require("react/jsx-runtime");
7092
7482
  var Timeline = ({
7093
7483
  items,
7094
7484
  lineColor = "#F1F5F9",
@@ -7096,22 +7486,22 @@ var Timeline = ({
7096
7486
  className
7097
7487
  }) => {
7098
7488
  if (items.length === 0) {
7099
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Text, { size: "s", color: "grey-600", children: emptyLabel });
7489
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "s", color: "grey-600", children: emptyLabel });
7100
7490
  }
7101
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Layout, { column: true, className, children: items.map((item, index) => {
7491
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Layout, { column: true, className, children: items.map((item, index) => {
7102
7492
  var _a;
7103
7493
  const isLast = index === items.length - 1;
7104
7494
  const dotColor = (_a = item.color) != null ? _a : "#377EA1";
7105
- return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Layout, { gap: 3, children: [
7106
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Layout, { column: true, align: "center", className: "w-4", children: [
7107
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7495
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Layout, { gap: 3, children: [
7496
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Layout, { column: true, align: "center", className: "w-4", children: [
7497
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7108
7498
  "span",
7109
7499
  {
7110
7500
  className: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
7111
7501
  style: { background: dotColor }
7112
7502
  }
7113
7503
  ),
7114
- !isLast && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
7504
+ !isLast && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7115
7505
  "span",
7116
7506
  {
7117
7507
  className: "w-0.5 flex-1 min-h-[16px]",
@@ -7119,19 +7509,19 @@ var Timeline = ({
7119
7509
  }
7120
7510
  )
7121
7511
  ] }),
7122
- /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
7123
- /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
7124
- item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
7125
- item.description && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "text-xs italic text-neutral-800", children: item.description })
7512
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
7513
+ /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
7514
+ item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
7515
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-xs italic text-neutral-800", children: item.description })
7126
7516
  ] })
7127
7517
  ] }, item.id);
7128
7518
  }) });
7129
7519
  };
7130
7520
 
7131
7521
  // src/ui/components/ui/ColorPicker.tsx
7132
- var import_react50 = require("react");
7522
+ var import_react52 = require("react");
7133
7523
  var import_class_variance_authority16 = require("class-variance-authority");
7134
- var import_jsx_runtime85 = require("react/jsx-runtime");
7524
+ var import_jsx_runtime98 = require("react/jsx-runtime");
7135
7525
  var swatchVariants = (0, import_class_variance_authority16.cva)(
7136
7526
  "inline-flex shrink-0 overflow-hidden rounded-[6px] border border-grey-300",
7137
7527
  {
@@ -7158,7 +7548,7 @@ var inputVariants = (0, import_class_variance_authority16.cva)(
7158
7548
  defaultVariants: { size: "m" }
7159
7549
  }
7160
7550
  );
7161
- var ColorPicker = (0, import_react50.forwardRef)(
7551
+ var ColorPicker = (0, import_react52.forwardRef)(
7162
7552
  ({
7163
7553
  label,
7164
7554
  value,
@@ -7168,14 +7558,14 @@ var ColorPicker = (0, import_react50.forwardRef)(
7168
7558
  size,
7169
7559
  className
7170
7560
  }, ref) => {
7171
- const [internalColor, setInternalColor] = (0, import_react50.useState)(defaultValue);
7561
+ const [internalColor, setInternalColor] = (0, import_react52.useState)(defaultValue);
7172
7562
  const currentColor = value !== void 0 ? value : internalColor;
7173
7563
  const handleChange = (e) => {
7174
7564
  const next = e.target.value;
7175
7565
  if (value === void 0) setInternalColor(next);
7176
7566
  onChange == null ? void 0 : onChange(next);
7177
7567
  };
7178
- return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
7568
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
7179
7569
  Layout,
7180
7570
  {
7181
7571
  column: true,
@@ -7183,21 +7573,21 @@ var ColorPicker = (0, import_react50.forwardRef)(
7183
7573
  gap: 1.5,
7184
7574
  className: cn(disabled && "opacity-60", className),
7185
7575
  children: [
7186
- label && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7187
- /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Layout, { gap: 2, children: [
7188
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
7576
+ label && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
7577
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { gap: 2, children: [
7578
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7189
7579
  "label",
7190
7580
  {
7191
7581
  className: cn(
7192
7582
  swatchVariants({ size }),
7193
7583
  disabled ? "cursor-not-allowed" : "cursor-pointer"
7194
7584
  ),
7195
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
7585
+ children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7196
7586
  "span",
7197
7587
  {
7198
7588
  className: "relative block h-full w-full",
7199
7589
  style: { backgroundColor: currentColor },
7200
- children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
7590
+ children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7201
7591
  "input",
7202
7592
  {
7203
7593
  ref,
@@ -7212,7 +7602,7 @@ var ColorPicker = (0, import_react50.forwardRef)(
7212
7602
  )
7213
7603
  }
7214
7604
  ),
7215
- /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
7605
+ /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
7216
7606
  "input",
7217
7607
  __spreadProps(__spreadValues({
7218
7608
  type: "text",
@@ -7232,7 +7622,7 @@ var ColorPicker = (0, import_react50.forwardRef)(
7232
7622
  ColorPicker.displayName = "ColorPicker";
7233
7623
 
7234
7624
  // src/ui/components/ui/ColorTokenPicker.tsx
7235
- var import_react51 = require("react");
7625
+ var import_react53 = require("react");
7236
7626
 
7237
7627
  // src/ui/lib/tokens.ts
7238
7628
  var COLOR_TOKENS = [
@@ -7252,7 +7642,7 @@ var COLOR_TOKENS = [
7252
7642
  ];
7253
7643
 
7254
7644
  // src/ui/components/ui/ColorTokenPicker.tsx
7255
- var import_jsx_runtime86 = require("react/jsx-runtime");
7645
+ var import_jsx_runtime99 = require("react/jsx-runtime");
7256
7646
  var SWATCH_CLASS = {
7257
7647
  "blue-700": "bg-blue-700",
7258
7648
  "blue-900": "bg-blue-900",
@@ -7273,14 +7663,14 @@ var ColorTokenPicker = ({
7273
7663
  onChange,
7274
7664
  disabled = false
7275
7665
  }) => {
7276
- const [open, setOpen] = (0, import_react51.useState)(false);
7277
- return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
7666
+ const [open, setOpen] = (0, import_react53.useState)(false);
7667
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7278
7668
  Popover,
7279
7669
  {
7280
7670
  open,
7281
7671
  onOpenChange: disabled ? void 0 : setOpen,
7282
7672
  align: "start",
7283
- trigger: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
7673
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7284
7674
  "button",
7285
7675
  {
7286
7676
  type: "button",
@@ -7291,7 +7681,7 @@ var ColorTokenPicker = ({
7291
7681
  "focus-visible:ring-2 focus-visible:ring-blue-200",
7292
7682
  disabled && "cursor-not-allowed opacity-50"
7293
7683
  ),
7294
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
7684
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7295
7685
  "span",
7296
7686
  {
7297
7687
  className: cn(
@@ -7302,7 +7692,7 @@ var ColorTokenPicker = ({
7302
7692
  )
7303
7693
  }
7304
7694
  ),
7305
- children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
7695
+ children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
7306
7696
  "button",
7307
7697
  {
7308
7698
  type: "button",
@@ -7325,8 +7715,8 @@ var ColorTokenPicker = ({
7325
7715
  };
7326
7716
 
7327
7717
  // src/ui/components/ui/FileUploadZone.tsx
7328
- var import_react52 = require("react");
7329
- var import_jsx_runtime87 = require("react/jsx-runtime");
7718
+ var import_react54 = require("react");
7719
+ var import_jsx_runtime100 = require("react/jsx-runtime");
7330
7720
  var ACCEPT_MAP = {
7331
7721
  png: "image/png",
7332
7722
  jpg: "image/jpeg",
@@ -7358,23 +7748,23 @@ var FileUploadZone = ({
7358
7748
  showFileName = false,
7359
7749
  className
7360
7750
  }) => {
7361
- const [isDragging, setIsDragging] = (0, import_react52.useState)(false);
7362
- const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react52.useState)(
7751
+ const [isDragging, setIsDragging] = (0, import_react54.useState)(false);
7752
+ const [internalPreviewUrl, setInternalPreviewUrl] = (0, import_react54.useState)(
7363
7753
  null
7364
7754
  );
7365
- const [fileType, setFileType] = (0, import_react52.useState)(null);
7366
- const [fileName, setFileName] = (0, import_react52.useState)(null);
7367
- const [inlineError, setInlineError] = (0, import_react52.useState)(null);
7368
- const inputRef = (0, import_react52.useRef)(null);
7755
+ const [fileType, setFileType] = (0, import_react54.useState)(null);
7756
+ const [fileName, setFileName] = (0, import_react54.useState)(null);
7757
+ const [inlineError, setInlineError] = (0, import_react54.useState)(null);
7758
+ const inputRef = (0, import_react54.useRef)(null);
7369
7759
  const resolvedAccept = acceptOnlyPdf ? PDF_ONLY : accept;
7370
7760
  const mimeTypes = getMimeTypes(resolvedAccept);
7371
7761
  const acceptString = mimeTypes.join(",");
7372
7762
  const previewUrl = multiple ? null : controlledPreviewUrl || (showPreview ? internalPreviewUrl : null);
7373
- const emitError = (0, import_react52.useCallback)(
7763
+ const emitError = (0, import_react54.useCallback)(
7374
7764
  (message) => onError ? onError(message) : setInlineError(message),
7375
7765
  [onError]
7376
7766
  );
7377
- const validateFile = (0, import_react52.useCallback)(
7767
+ const validateFile = (0, import_react54.useCallback)(
7378
7768
  (file) => {
7379
7769
  if (!mimeTypes.includes(file.type))
7380
7770
  return { ok: false, error: "Format de fichier non accept\xE9." };
@@ -7388,7 +7778,7 @@ var FileUploadZone = ({
7388
7778
  },
7389
7779
  [mimeTypes, maxSizeMB]
7390
7780
  );
7391
- const processFile = (0, import_react52.useCallback)(
7781
+ const processFile = (0, import_react54.useCallback)(
7392
7782
  (file) => {
7393
7783
  setInlineError(null);
7394
7784
  const result = validateFile(file);
@@ -7403,7 +7793,7 @@ var FileUploadZone = ({
7403
7793
  },
7404
7794
  [validateFile, onSave, showPreview, emitError]
7405
7795
  );
7406
- const processFiles = (0, import_react52.useCallback)(
7796
+ const processFiles = (0, import_react54.useCallback)(
7407
7797
  (files) => {
7408
7798
  setInlineError(null);
7409
7799
  for (const file of files) {
@@ -7454,7 +7844,7 @@ var FileUploadZone = ({
7454
7844
  onRemove == null ? void 0 : onRemove();
7455
7845
  };
7456
7846
  if (previewUrl) {
7457
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
7847
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7458
7848
  Layout,
7459
7849
  {
7460
7850
  column: true,
@@ -7466,14 +7856,14 @@ var FileUploadZone = ({
7466
7856
  className
7467
7857
  ),
7468
7858
  children: [
7469
- fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
7859
+ fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7470
7860
  "embed",
7471
7861
  {
7472
7862
  src: previewUrl,
7473
7863
  type: "application/pdf",
7474
7864
  className: "h-[500px] w-full rounded"
7475
7865
  }
7476
- ) : /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
7866
+ ) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7477
7867
  "img",
7478
7868
  {
7479
7869
  src: previewUrl,
@@ -7481,13 +7871,13 @@ var FileUploadZone = ({
7481
7871
  className: "max-h-[400px] max-w-full rounded object-contain"
7482
7872
  }
7483
7873
  ),
7484
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
7874
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7485
7875
  Button,
7486
7876
  {
7487
7877
  label: "Supprimer",
7488
7878
  theme: "red-900",
7489
7879
  size: "s",
7490
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FaIcon, { name: "trash", size: 14 }),
7880
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(FaIcon, { name: "trash", size: 14 }),
7491
7881
  onClick: handleRemove
7492
7882
  }
7493
7883
  )
@@ -7496,14 +7886,14 @@ var FileUploadZone = ({
7496
7886
  );
7497
7887
  }
7498
7888
  const showBrowse = !compact && browseLabel !== false;
7499
- return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
7889
+ return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7500
7890
  Layout,
7501
7891
  {
7502
7892
  column: true,
7503
7893
  gap: 1,
7504
7894
  className: cn(fullWidth ? "w-full" : "w-fit", className),
7505
7895
  children: [
7506
- /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
7896
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
7507
7897
  "label",
7508
7898
  {
7509
7899
  onDragOver: handleDragOver,
@@ -7517,7 +7907,7 @@ var FileUploadZone = ({
7517
7907
  isDragging ? "border-solid border-blue-100 bg-blue-50" : cn(compact ? "border-grey-300" : "border-blue-50", "bg-grey-100")
7518
7908
  ),
7519
7909
  children: [
7520
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
7910
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7521
7911
  "input",
7522
7912
  {
7523
7913
  ref: inputRef,
@@ -7529,11 +7919,11 @@ var FileUploadZone = ({
7529
7919
  className: "hidden"
7530
7920
  }
7531
7921
  ),
7532
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
7533
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-center text-sm text-grey-600", children: label }),
7534
- showBrowse && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_jsx_runtime87.Fragment, { children: [
7535
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
7536
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
7922
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
7923
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-center text-sm text-grey-600", children: label }),
7924
+ showBrowse && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_jsx_runtime100.Fragment, { children: [
7925
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
7926
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
7537
7927
  Button,
7538
7928
  {
7539
7929
  label: browseLabel,
@@ -7547,23 +7937,23 @@ var FileUploadZone = ({
7547
7937
  }
7548
7938
  )
7549
7939
  ] }),
7550
- sublabel && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-center text-xs text-grey-500", children: sublabel })
7940
+ sublabel && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-center text-xs text-grey-500", children: sublabel })
7551
7941
  ]
7552
7942
  }
7553
7943
  ),
7554
- showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Layout, { align: "center", justify: "center", gap: 2, children: [
7555
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
7556
- /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-sm text-green-700", children: fileName })
7944
+ showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Layout, { align: "center", justify: "center", gap: 2, children: [
7945
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
7946
+ /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-sm text-green-700", children: fileName })
7557
7947
  ] }),
7558
- inlineError && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { className: "text-center text-sm text-red-900", children: inlineError })
7948
+ inlineError && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("span", { className: "text-center text-sm text-red-900", children: inlineError })
7559
7949
  ]
7560
7950
  }
7561
7951
  );
7562
7952
  };
7563
7953
 
7564
7954
  // src/ui/components/ui/FilePicker.tsx
7565
- var import_react53 = require("react");
7566
- var import_jsx_runtime88 = require("react/jsx-runtime");
7955
+ var import_react55 = require("react");
7956
+ var import_jsx_runtime101 = require("react/jsx-runtime");
7567
7957
  var FilePicker = ({
7568
7958
  label,
7569
7959
  onSelect,
@@ -7577,9 +7967,9 @@ var FilePicker = ({
7577
7967
  variant = "icon",
7578
7968
  className
7579
7969
  }) => {
7580
- const inputRef = (0, import_react53.useRef)(null);
7581
- return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(import_jsx_runtime88.Fragment, { children: [
7582
- /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
7970
+ const inputRef = (0, import_react55.useRef)(null);
7971
+ return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
7972
+ /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7583
7973
  "input",
7584
7974
  {
7585
7975
  ref: inputRef,
@@ -7595,20 +7985,20 @@ var FilePicker = ({
7595
7985
  }
7596
7986
  }
7597
7987
  ),
7598
- variant === "button" ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
7988
+ variant === "button" ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7599
7989
  Button,
7600
7990
  {
7601
7991
  variant: "outline",
7602
7992
  label,
7603
7993
  disabled,
7604
7994
  className,
7605
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
7995
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
7606
7996
  onClick: () => {
7607
7997
  var _a;
7608
7998
  return (_a = inputRef.current) == null ? void 0 : _a.click();
7609
7999
  }
7610
8000
  }
7611
- ) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Tooltip, { content: label, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
8001
+ ) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Tooltip, { content: label, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
7612
8002
  Icon,
7613
8003
  {
7614
8004
  name: icon,
@@ -7628,9 +8018,9 @@ var FilePicker = ({
7628
8018
  };
7629
8019
 
7630
8020
  // src/ui/components/ui/Item.tsx
7631
- var import_react54 = require("react");
8021
+ var import_react56 = require("react");
7632
8022
  var import_class_variance_authority17 = require("class-variance-authority");
7633
- var import_jsx_runtime89 = require("react/jsx-runtime");
8023
+ var import_jsx_runtime102 = require("react/jsx-runtime");
7634
8024
  var itemVariants = (0, import_class_variance_authority17.cva)(
7635
8025
  "group/item flex items-center rounded-[6px] border border-transparent transition-colors",
7636
8026
  {
@@ -7648,10 +8038,10 @@ var itemVariants = (0, import_class_variance_authority17.cva)(
7648
8038
  defaultVariants: { variant: "default", size: "default" }
7649
8039
  }
7650
8040
  );
7651
- var Item4 = (0, import_react54.forwardRef)(
8041
+ var Item4 = (0, import_react56.forwardRef)(
7652
8042
  (_a, ref) => {
7653
8043
  var _b = _a, { variant, size, className } = _b, props = __objRest(_b, ["variant", "size", "className"]);
7654
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8044
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7655
8045
  "div",
7656
8046
  __spreadValues({
7657
8047
  ref,
@@ -7676,7 +8066,7 @@ var itemMediaVariants = (0, import_class_variance_authority17.cva)(
7676
8066
  );
7677
8067
  var ItemMedia = (_a) => {
7678
8068
  var _b = _a, { variant, className } = _b, props = __objRest(_b, ["variant", "className"]);
7679
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
8069
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
7680
8070
  };
7681
8071
  var ItemContent = (_a) => {
7682
8072
  var _b = _a, {
@@ -7684,7 +8074,7 @@ var ItemContent = (_a) => {
7684
8074
  } = _b, props = __objRest(_b, [
7685
8075
  "className"
7686
8076
  ]);
7687
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8077
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7688
8078
  "div",
7689
8079
  __spreadValues({
7690
8080
  className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
@@ -7697,7 +8087,7 @@ var ItemTitle = (_a) => {
7697
8087
  } = _b, props = __objRest(_b, [
7698
8088
  "className"
7699
8089
  ]);
7700
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8090
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7701
8091
  "div",
7702
8092
  __spreadValues({
7703
8093
  className: cn(
@@ -7713,7 +8103,7 @@ var ItemDescription = (_a) => {
7713
8103
  } = _b, props = __objRest(_b, [
7714
8104
  "className"
7715
8105
  ]);
7716
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
8106
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
7717
8107
  };
7718
8108
  var ItemActions = (_a) => {
7719
8109
  var _b = _a, {
@@ -7721,7 +8111,7 @@ var ItemActions = (_a) => {
7721
8111
  } = _b, props = __objRest(_b, [
7722
8112
  "className"
7723
8113
  ]);
7724
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
8114
+ return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
7725
8115
  "div",
7726
8116
  __spreadValues({
7727
8117
  className: cn("flex shrink-0 items-center gap-2", className)
@@ -7730,7 +8120,7 @@ var ItemActions = (_a) => {
7730
8120
  };
7731
8121
 
7732
8122
  // src/ui/components/ui/Attachment.tsx
7733
- var import_jsx_runtime90 = require("react/jsx-runtime");
8123
+ var import_jsx_runtime103 = require("react/jsx-runtime");
7734
8124
  var Attachment = ({
7735
8125
  name,
7736
8126
  size,
@@ -7744,7 +8134,7 @@ var Attachment = ({
7744
8134
  }) => {
7745
8135
  const isUploading = status === "uploading";
7746
8136
  const isError = status === "error";
7747
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
8137
+ return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
7748
8138
  Item4,
7749
8139
  {
7750
8140
  variant: "outline",
@@ -7756,12 +8146,12 @@ var Attachment = ({
7756
8146
  ),
7757
8147
  style: { width },
7758
8148
  children: [
7759
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8149
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7760
8150
  ItemMedia,
7761
8151
  {
7762
8152
  variant: "icon",
7763
8153
  className: cn(isError && "border-red-900 bg-red-50"),
7764
- children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8154
+ children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7765
8155
  FaIcon,
7766
8156
  {
7767
8157
  name: isError ? "triangle-exclamation" : "file",
@@ -7771,33 +8161,33 @@ var Attachment = ({
7771
8161
  )
7772
8162
  }
7773
8163
  ),
7774
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(ItemContent, { children: [
7775
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ItemTitle, { children: name }),
7776
- isUploading ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(ItemDescription, { className: "text-xs", children: [
8164
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(ItemContent, { children: [
8165
+ /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ItemTitle, { children: name }),
8166
+ isUploading ? /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(ItemDescription, { className: "text-xs", children: [
7777
8167
  "Uploading - ",
7778
8168
  progress,
7779
8169
  "%"
7780
- ] }) : isError ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ItemDescription, { className: "text-xs", children: size })
8170
+ ] }) : isError ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ItemDescription, { className: "text-xs", children: size })
7781
8171
  ] }),
7782
- (onRetry || onRemove) && /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(ItemActions, { children: [
7783
- isError && onRetry && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8172
+ (onRetry || onRemove) && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(ItemActions, { children: [
8173
+ isError && onRetry && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7784
8174
  "button",
7785
8175
  {
7786
8176
  type: "button",
7787
8177
  onClick: onRetry,
7788
8178
  "aria-label": `R\xE9essayer l'envoi de ${name}`,
7789
8179
  className: "text-grey-400 hover:text-grey-600",
7790
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FaIcon, { name: "rotate-right", size: 12 })
8180
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(FaIcon, { name: "rotate-right", size: 12 })
7791
8181
  }
7792
8182
  ),
7793
- onRemove && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
8183
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
7794
8184
  "button",
7795
8185
  {
7796
8186
  type: "button",
7797
8187
  onClick: onRemove,
7798
8188
  "aria-label": `Retirer ${name}`,
7799
8189
  className: "text-grey-400 hover:text-grey-600",
7800
- children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FaIcon, { name: "xmark", size: 12 })
8190
+ children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(FaIcon, { name: "xmark", size: 12 })
7801
8191
  }
7802
8192
  )
7803
8193
  ] })
@@ -7807,9 +8197,9 @@ var Attachment = ({
7807
8197
  };
7808
8198
 
7809
8199
  // src/ui/components/ui/PdfPreview.tsx
7810
- var import_react55 = require("react");
8200
+ var import_react57 = require("react");
7811
8201
  var import_react_pdf = require("react-pdf");
7812
- var import_jsx_runtime91 = require("react/jsx-runtime");
8202
+ var import_jsx_runtime104 = require("react/jsx-runtime");
7813
8203
  import_react_pdf.pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${import_react_pdf.pdfjs.version}/build/pdf.worker.min.mjs`;
7814
8204
  var PdfPreview = ({
7815
8205
  file,
@@ -7817,12 +8207,12 @@ var PdfPreview = ({
7817
8207
  maxHeight = "600px",
7818
8208
  className
7819
8209
  }) => {
7820
- const [hasError, setHasError] = (0, import_react55.useState)(false);
7821
- const [numPages, setNumPages] = (0, import_react55.useState)(0);
8210
+ const [hasError, setHasError] = (0, import_react57.useState)(false);
8211
+ const [numPages, setNumPages] = (0, import_react57.useState)(0);
7822
8212
  const height = Math.round(width * 1.3);
7823
- const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Skeleton, { width, height });
8213
+ const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Skeleton, { width, height });
7824
8214
  if (hasError) {
7825
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
8215
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
7826
8216
  Layout,
7827
8217
  {
7828
8218
  column: true,
@@ -7835,13 +8225,13 @@ var PdfPreview = ({
7835
8225
  ),
7836
8226
  style: { width, height },
7837
8227
  children: [
7838
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
7839
- /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
8228
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
8229
+ /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
7840
8230
  ]
7841
8231
  }
7842
8232
  );
7843
8233
  }
7844
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8234
+ return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7845
8235
  "div",
7846
8236
  {
7847
8237
  className: cn(
@@ -7849,7 +8239,7 @@ var PdfPreview = ({
7849
8239
  className
7850
8240
  ),
7851
8241
  style: { width, maxHeight },
7852
- children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8242
+ children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7853
8243
  import_react_pdf.Document,
7854
8244
  {
7855
8245
  file,
@@ -7857,7 +8247,7 @@ var PdfPreview = ({
7857
8247
  onLoadError: () => setHasError(true),
7858
8248
  loading: thumbnailSkeleton,
7859
8249
  error: thumbnailSkeleton,
7860
- children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
8250
+ children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
7861
8251
  import_react_pdf.Page,
7862
8252
  {
7863
8253
  pageNumber: i + 1,
@@ -7874,11 +8264,11 @@ var PdfPreview = ({
7874
8264
  };
7875
8265
 
7876
8266
  // src/ui/components/ui/AudioPlayer.tsx
7877
- var import_react57 = require("react");
8267
+ var import_react59 = require("react");
7878
8268
 
7879
8269
  // src/ui/components/ui/VideoPlayer.tsx
7880
- var import_react56 = require("react");
7881
- var import_jsx_runtime92 = require("react/jsx-runtime");
8270
+ var import_react58 = require("react");
8271
+ var import_jsx_runtime105 = require("react/jsx-runtime");
7882
8272
  var formatVideoDuration = (seconds) => {
7883
8273
  if (seconds === void 0 || !Number.isFinite(seconds) || seconds < 0)
7884
8274
  return "";
@@ -7917,20 +8307,20 @@ var VideoPlayer = ({
7917
8307
  defaultVolume = DEFAULT_VOLUME,
7918
8308
  className
7919
8309
  }) => {
7920
- const [isInlinePlaying, setIsInlinePlaying] = (0, import_react56.useState)(false);
7921
- const [isExpanded, setIsExpanded] = (0, import_react56.useState)(false);
7922
- const [hasPosterError, setHasPosterError] = (0, import_react56.useState)(false);
7923
- const [hasFramePreviewError, setHasFramePreviewError] = (0, import_react56.useState)(false);
7924
- const inlineVideoRef = (0, import_react56.useRef)(null);
7925
- const expandedVideoRef = (0, import_react56.useRef)(null);
7926
- (0, import_react56.useEffect)(() => {
8310
+ const [isInlinePlaying, setIsInlinePlaying] = (0, import_react58.useState)(false);
8311
+ const [isExpanded, setIsExpanded] = (0, import_react58.useState)(false);
8312
+ const [hasPosterError, setHasPosterError] = (0, import_react58.useState)(false);
8313
+ const [hasFramePreviewError, setHasFramePreviewError] = (0, import_react58.useState)(false);
8314
+ const inlineVideoRef = (0, import_react58.useRef)(null);
8315
+ const expandedVideoRef = (0, import_react58.useRef)(null);
8316
+ (0, import_react58.useEffect)(() => {
7927
8317
  setHasPosterError(false);
7928
8318
  }, [poster]);
7929
- (0, import_react56.useEffect)(() => {
8319
+ (0, import_react58.useEffect)(() => {
7930
8320
  setHasFramePreviewError(false);
7931
8321
  }, [src]);
7932
8322
  const visiblePoster = hasPosterError ? void 0 : poster;
7933
- const attachExpandedVideo = (0, import_react56.useCallback)(
8323
+ const attachExpandedVideo = (0, import_react58.useCallback)(
7934
8324
  (video) => {
7935
8325
  expandedVideoRef.current = video;
7936
8326
  if (video) video.volume = clampVolume(defaultVolume);
@@ -7942,7 +8332,7 @@ var VideoPlayer = ({
7942
8332
  e.preventDefault();
7943
8333
  (_a = expandedVideoRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
7944
8334
  };
7945
- const attachInlineVideo = (0, import_react56.useCallback)(
8335
+ const attachInlineVideo = (0, import_react58.useCallback)(
7946
8336
  (video) => {
7947
8337
  inlineVideoRef.current = video;
7948
8338
  if (video) video.volume = clampVolume(defaultVolume);
@@ -7977,8 +8367,8 @@ var VideoPlayer = ({
7977
8367
  const stopBubbling = (e) => {
7978
8368
  e.stopPropagation();
7979
8369
  };
7980
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(import_jsx_runtime92.Fragment, { children: [
7981
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
8370
+ return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
8371
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
7982
8372
  Layout,
7983
8373
  {
7984
8374
  className: cn(
@@ -7989,7 +8379,7 @@ var VideoPlayer = ({
7989
8379
  onClick: stopBubbling,
7990
8380
  "data-testid": "video-player",
7991
8381
  children: [
7992
- isInlinePlaying ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8382
+ isInlinePlaying ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
7993
8383
  "video",
7994
8384
  {
7995
8385
  ref: attachInlineVideo,
@@ -8001,7 +8391,7 @@ var VideoPlayer = ({
8001
8391
  className: "h-full w-full bg-black object-contain",
8002
8392
  "aria-label": title
8003
8393
  }
8004
- ) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
8394
+ ) : /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
8005
8395
  "button",
8006
8396
  {
8007
8397
  type: "button",
@@ -8009,7 +8399,7 @@ var VideoPlayer = ({
8009
8399
  "aria-label": `Lire la vid\xE9o ${title}`,
8010
8400
  className: "group relative flex h-full w-full items-center justify-center",
8011
8401
  children: [
8012
- visiblePoster ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8402
+ visiblePoster ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8013
8403
  "img",
8014
8404
  {
8015
8405
  src: visiblePoster,
@@ -8020,7 +8410,7 @@ var VideoPlayer = ({
8020
8410
  ) : (
8021
8411
  // Sans vignette : première image de la vidéo (métadonnées seulement,
8022
8412
  // `#t=0.1` force l'affichage d'une frame), tuile sombre si ça échoue.
8023
- !hasFramePreviewError && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8413
+ !hasFramePreviewError && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8024
8414
  "video",
8025
8415
  {
8026
8416
  src: `${src}#t=0.1`,
@@ -8035,12 +8425,12 @@ var VideoPlayer = ({
8035
8425
  }
8036
8426
  )
8037
8427
  ),
8038
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-full bg-blue-900 text-white transition-colors group-hover:bg-blue-950", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(FaIcon, { name: "play", family: "solid", size: 18 }) }),
8039
- formattedDuration && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "absolute bottom-2 left-2 rounded bg-black/60 px-1.5 py-0.5 text-xs font-medium text-white", children: formattedDuration })
8428
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "relative flex h-12 w-12 items-center justify-center rounded-full bg-blue-900 text-white transition-colors group-hover:bg-blue-950", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(FaIcon, { name: "play", family: "solid", size: 18 }) }),
8429
+ formattedDuration && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "absolute bottom-2 left-2 rounded bg-black/60 px-1.5 py-0.5 text-xs font-medium text-white", children: formattedDuration })
8040
8430
  ]
8041
8431
  }
8042
8432
  ),
8043
- label && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8433
+ label && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8044
8434
  Layout,
8045
8435
  {
8046
8436
  width: "auto",
@@ -8048,14 +8438,14 @@ var VideoPlayer = ({
8048
8438
  children: label
8049
8439
  }
8050
8440
  ),
8051
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
8441
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
8052
8442
  Layout,
8053
8443
  {
8054
8444
  width: "auto",
8055
8445
  gap: 1,
8056
8446
  className: "absolute right-1 top-1 rounded-full bg-white/90",
8057
8447
  children: [
8058
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8448
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8059
8449
  Icon,
8060
8450
  {
8061
8451
  name: "up-right-and-down-left-from-center",
@@ -8064,7 +8454,7 @@ var VideoPlayer = ({
8064
8454
  "aria-label": "Agrandir la vid\xE9o"
8065
8455
  }
8066
8456
  ) }),
8067
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8457
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8068
8458
  Icon,
8069
8459
  {
8070
8460
  name: "download",
@@ -8076,7 +8466,7 @@ var VideoPlayer = ({
8076
8466
  ]
8077
8467
  }
8078
8468
  ),
8079
- meta && !isInlinePlaying && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8469
+ meta && !isInlinePlaying && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8080
8470
  Layout,
8081
8471
  {
8082
8472
  width: "auto",
@@ -8087,7 +8477,7 @@ var VideoPlayer = ({
8087
8477
  ]
8088
8478
  }
8089
8479
  ),
8090
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
8480
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(
8091
8481
  Modal,
8092
8482
  {
8093
8483
  open: isExpanded,
@@ -8095,9 +8485,9 @@ var VideoPlayer = ({
8095
8485
  onOpenAutoFocus: focusExpandedVideo,
8096
8486
  width: "70vw",
8097
8487
  children: [
8098
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
8099
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
8100
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8488
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
8489
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
8490
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8101
8491
  IconBadge,
8102
8492
  {
8103
8493
  name: "video",
@@ -8106,10 +8496,10 @@ var VideoPlayer = ({
8106
8496
  iconColor: "blue_900"
8107
8497
  }
8108
8498
  ),
8109
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalTitle, { className: "truncate", children: title })
8499
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ModalTitle, { className: "truncate", children: title })
8110
8500
  ] }),
8111
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { width: "auto", align: "center", gap: 1, children: [
8112
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8501
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Layout, { width: "auto", align: "center", gap: 1, children: [
8502
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8113
8503
  Icon,
8114
8504
  {
8115
8505
  name: "download",
@@ -8118,7 +8508,7 @@ var VideoPlayer = ({
8118
8508
  "aria-label": "T\xE9l\xE9charger la vid\xE9o"
8119
8509
  }
8120
8510
  ) }),
8121
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8511
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8122
8512
  Icon,
8123
8513
  {
8124
8514
  name: "xmark",
@@ -8130,7 +8520,7 @@ var VideoPlayer = ({
8130
8520
  ) })
8131
8521
  ] })
8132
8522
  ] }) }),
8133
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
8523
+ /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
8134
8524
  "video",
8135
8525
  {
8136
8526
  ref: attachExpandedVideo,
@@ -8151,7 +8541,7 @@ var VideoPlayer = ({
8151
8541
  };
8152
8542
 
8153
8543
  // src/ui/components/ui/AudioPlayer.tsx
8154
- var import_jsx_runtime93 = require("react/jsx-runtime");
8544
+ var import_jsx_runtime106 = require("react/jsx-runtime");
8155
8545
  var DEFAULT_VOLUME2 = 0.5;
8156
8546
  var clampVolume2 = (volume) => Number.isFinite(volume) ? Math.min(1, Math.max(0, volume)) : DEFAULT_VOLUME2;
8157
8547
  var AudioPlayer = ({
@@ -8161,11 +8551,11 @@ var AudioPlayer = ({
8161
8551
  title = "Audio",
8162
8552
  className
8163
8553
  }) => {
8164
- const audioRef = (0, import_react57.useRef)(null);
8165
- const [isPlaying, setIsPlaying] = (0, import_react57.useState)(false);
8166
- const [currentTime, setCurrentTime] = (0, import_react57.useState)(0);
8167
- const [duration, setDuration] = (0, import_react57.useState)(0);
8168
- const attachAudio = (0, import_react57.useCallback)(
8554
+ const audioRef = (0, import_react59.useRef)(null);
8555
+ const [isPlaying, setIsPlaying] = (0, import_react59.useState)(false);
8556
+ const [currentTime, setCurrentTime] = (0, import_react59.useState)(0);
8557
+ const [duration, setDuration] = (0, import_react59.useState)(0);
8558
+ const attachAudio = (0, import_react59.useCallback)(
8169
8559
  (audio) => {
8170
8560
  audioRef.current = audio;
8171
8561
  if (audio) audio.volume = clampVolume2(defaultVolume);
@@ -8194,7 +8584,7 @@ var AudioPlayer = ({
8194
8584
  const value = (_b = (_a = audioRef.current) == null ? void 0 : _a.duration) != null ? _b : 0;
8195
8585
  setDuration(Number.isFinite(value) ? value : 0);
8196
8586
  };
8197
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
8587
+ return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
8198
8588
  Layout,
8199
8589
  {
8200
8590
  gap: 3,
@@ -8203,7 +8593,7 @@ var AudioPlayer = ({
8203
8593
  className: cn("rounded-lg border border-grey-300 p-2", className),
8204
8594
  "data-testid": "audio-player",
8205
8595
  children: [
8206
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
8596
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8207
8597
  "audio",
8208
8598
  {
8209
8599
  ref: attachAudio,
@@ -8221,19 +8611,19 @@ var AudioPlayer = ({
8221
8611
  "aria-label": title
8222
8612
  }
8223
8613
  ),
8224
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
8614
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8225
8615
  Button,
8226
8616
  {
8227
8617
  variant: "outline",
8228
8618
  size: "s",
8229
8619
  iconOnly: true,
8230
8620
  "aria-label": isPlaying ? `Mettre en pause ${title}` : `Lire ${title}`,
8231
- iconLeft: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8621
+ iconLeft: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
8232
8622
  onClick: togglePlayback
8233
8623
  }
8234
8624
  ),
8235
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8236
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
8625
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
8626
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
8237
8627
  "input",
8238
8628
  {
8239
8629
  type: "range",
@@ -8247,7 +8637,7 @@ var AudioPlayer = ({
8247
8637
  className: "h-1 min-w-0 flex-1 cursor-pointer accent-blue-700 disabled:cursor-default"
8248
8638
  }
8249
8639
  ),
8250
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8640
+ /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
8251
8641
  ]
8252
8642
  }
8253
8643
  );
@@ -8255,7 +8645,7 @@ var AudioPlayer = ({
8255
8645
 
8256
8646
  // src/ui/components/ui/ScrollArea.tsx
8257
8647
  var RadixScrollArea = __toESM(require("@radix-ui/react-scroll-area"));
8258
- var import_jsx_runtime94 = require("react/jsx-runtime");
8648
+ var import_jsx_runtime107 = require("react/jsx-runtime");
8259
8649
  var HIDDEN_SCROLLBAR_CLASSNAME = "w-0 h-0 opacity-0";
8260
8650
  var ScrollArea = (_a) => {
8261
8651
  var _b = _a, {
@@ -8271,13 +8661,13 @@ var ScrollArea = (_a) => {
8271
8661
  "viewportRef",
8272
8662
  "maxHeight"
8273
8663
  ]);
8274
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
8664
+ return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
8275
8665
  RadixScrollArea.Root,
8276
8666
  __spreadProps(__spreadValues({
8277
8667
  className: cn("relative overflow-hidden", className)
8278
8668
  }, props), {
8279
8669
  children: [
8280
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
8670
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8281
8671
  RadixScrollArea.Viewport,
8282
8672
  {
8283
8673
  ref: viewportRef,
@@ -8290,31 +8680,31 @@ var ScrollArea = (_a) => {
8290
8680
  children
8291
8681
  }
8292
8682
  ),
8293
- (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
8683
+ (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8294
8684
  RadixScrollArea.Scrollbar,
8295
8685
  {
8296
8686
  orientation: "vertical",
8297
8687
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8298
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8688
+ children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8299
8689
  }
8300
8690
  ),
8301
- (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
8691
+ (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8302
8692
  RadixScrollArea.Scrollbar,
8303
8693
  {
8304
8694
  orientation: "horizontal",
8305
8695
  className: HIDDEN_SCROLLBAR_CLASSNAME,
8306
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8696
+ children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
8307
8697
  }
8308
8698
  ),
8309
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(RadixScrollArea.Corner, {})
8699
+ /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RadixScrollArea.Corner, {})
8310
8700
  ]
8311
8701
  })
8312
8702
  );
8313
8703
  };
8314
8704
 
8315
8705
  // src/ui/components/ui/Message.tsx
8316
- var import_react58 = require("react");
8317
- var import_jsx_runtime95 = require("react/jsx-runtime");
8706
+ var import_react60 = require("react");
8707
+ var import_jsx_runtime108 = require("react/jsx-runtime");
8318
8708
  var BUBBLE_BACKGROUND = {
8319
8709
  own: { solid: "bg-blue-700", pale: "bg-blue-50" },
8320
8710
  teammate: { solid: "bg-blue-100", pale: "bg-blue-100" },
@@ -8325,7 +8715,7 @@ var BUBBLE_TAIL = {
8325
8715
  teammate: "rounded-br-none",
8326
8716
  other: "rounded-bl-none"
8327
8717
  };
8328
- var Message = (0, import_react58.forwardRef)(
8718
+ var Message = (0, import_react60.forwardRef)(
8329
8719
  (_a, ref) => {
8330
8720
  var _b = _a, {
8331
8721
  isOwn = false,
@@ -8373,7 +8763,7 @@ var Message = (0, import_react58.forwardRef)(
8373
8763
  const isInverted = isOwn && variant === "solid";
8374
8764
  const contentColor = isInverted ? "white" : "neutral-800";
8375
8765
  const metaColor = isInverted ? "white" : "grey-500";
8376
- const avatar = showAuthor ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8766
+ const avatar = showAuthor ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8377
8767
  Layout,
8378
8768
  {
8379
8769
  width: `${avatarSize}px`,
@@ -8381,8 +8771,8 @@ var Message = (0, import_react58.forwardRef)(
8381
8771
  "aria-hidden": "true"
8382
8772
  }
8383
8773
  );
8384
- const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
8385
- const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
8774
+ const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
8775
+ const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
8386
8776
  Layout,
8387
8777
  {
8388
8778
  width: "auto",
@@ -8395,7 +8785,7 @@ var Message = (0, import_react58.forwardRef)(
8395
8785
  children: actions
8396
8786
  }
8397
8787
  ) : null;
8398
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8788
+ return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8399
8789
  Layout,
8400
8790
  __spreadProps(__spreadValues({
8401
8791
  ref,
@@ -8406,7 +8796,7 @@ var Message = (0, import_react58.forwardRef)(
8406
8796
  className
8407
8797
  }, props), {
8408
8798
  children: [
8409
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8799
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8410
8800
  Layout,
8411
8801
  {
8412
8802
  fullWidth: true,
@@ -8417,7 +8807,7 @@ var Message = (0, import_react58.forwardRef)(
8417
8807
  children: [
8418
8808
  !isRightAligned && avatar,
8419
8809
  isRightAligned && actionsSlot,
8420
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8810
+ /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8421
8811
  Layout,
8422
8812
  {
8423
8813
  column: true,
@@ -8426,7 +8816,7 @@ var Message = (0, import_react58.forwardRef)(
8426
8816
  align: isRightAligned ? "end" : "start",
8427
8817
  style: { maxWidth },
8428
8818
  children: [
8429
- bubble ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
8819
+ bubble ? /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
8430
8820
  Layout,
8431
8821
  {
8432
8822
  column: true,
@@ -8440,16 +8830,16 @@ var Message = (0, import_react58.forwardRef)(
8440
8830
  cornerActions && "pr-8"
8441
8831
  ),
8442
8832
  children: [
8443
- deleted ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", color: contentColor, children }),
8444
- time && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xxs", color: metaColor, children: time }) }),
8833
+ deleted ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { size: "s", color: contentColor, children }),
8834
+ time && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { size: "xxs", color: metaColor, children: time }) }),
8445
8835
  cornerActions
8446
8836
  ]
8447
8837
  }
8448
- ) : cornerActions ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { width: "auto", className: "relative", children: [
8838
+ ) : cornerActions ? /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Layout, { width: "auto", className: "relative", children: [
8449
8839
  children,
8450
8840
  cornerActions
8451
8841
  ] }) : children,
8452
- status && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
8842
+ status && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
8453
8843
  ]
8454
8844
  }
8455
8845
  ),
@@ -8458,7 +8848,7 @@ var Message = (0, import_react58.forwardRef)(
8458
8848
  ]
8459
8849
  }
8460
8850
  ),
8461
- showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xs", color: "grey-600", children: authorName })
8851
+ showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Text, { size: "xs", color: "grey-600", children: authorName })
8462
8852
  ]
8463
8853
  })
8464
8854
  );
@@ -8467,8 +8857,8 @@ var Message = (0, import_react58.forwardRef)(
8467
8857
  Message.displayName = "Message";
8468
8858
 
8469
8859
  // src/ui/components/ui/MessageScroller.tsx
8470
- var import_react59 = require("react");
8471
- var import_jsx_runtime96 = require("react/jsx-runtime");
8860
+ var import_react61 = require("react");
8861
+ var import_jsx_runtime109 = require("react/jsx-runtime");
8472
8862
  var SEPARATOR_LINE = {
8473
8863
  neutral: "",
8474
8864
  alert: "bg-red-500"
@@ -8481,9 +8871,9 @@ var MessageDateSeparator = ({
8481
8871
  label,
8482
8872
  tone = "neutral",
8483
8873
  className
8484
- }) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
8485
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
8486
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
8874
+ }) => /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
8875
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
8876
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8487
8877
  Text,
8488
8878
  {
8489
8879
  size: "xs",
@@ -8492,7 +8882,7 @@ var MessageDateSeparator = ({
8492
8882
  children: label
8493
8883
  }
8494
8884
  ) }),
8495
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
8885
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
8496
8886
  ] });
8497
8887
  var MessageScroller = ({
8498
8888
  children,
@@ -8519,9 +8909,9 @@ var MessageScroller = ({
8519
8909
  viewportRef,
8520
8910
  className
8521
8911
  }) => {
8522
- const fallbackRef = (0, import_react59.useRef)(null);
8912
+ const fallbackRef = (0, import_react61.useRef)(null);
8523
8913
  const scrollerRef = viewportRef != null ? viewportRef : fallbackRef;
8524
- (0, import_react59.useLayoutEffect)(() => {
8914
+ (0, import_react61.useLayoutEffect)(() => {
8525
8915
  if (!autoScroll) return;
8526
8916
  const viewport = scrollerRef.current;
8527
8917
  if (!viewport) return;
@@ -8532,13 +8922,13 @@ var MessageScroller = ({
8532
8922
  if (isEmpty && emptyState) return emptyState;
8533
8923
  return children;
8534
8924
  };
8535
- const scroller = /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
8925
+ const scroller = /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8536
8926
  ScrollArea,
8537
8927
  {
8538
8928
  viewportRef: scrollerRef,
8539
8929
  className: cn("w-full", floatingFooter ? "min-h-0 flex-1" : className),
8540
8930
  style: typeof height === "number" ? { height: `${height}px` } : { height },
8541
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
8931
+ children: /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
8542
8932
  Layout,
8543
8933
  {
8544
8934
  column: true,
@@ -8561,9 +8951,9 @@ var MessageScroller = ({
8561
8951
  }
8562
8952
  );
8563
8953
  if (!floatingFooter) return scroller;
8564
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
8954
+ return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
8565
8955
  scroller,
8566
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
8956
+ /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
8567
8957
  Layout,
8568
8958
  {
8569
8959
  width: "auto",
@@ -8575,14 +8965,14 @@ var MessageScroller = ({
8575
8965
  };
8576
8966
 
8577
8967
  // src/ui/components/ui/Stepper.tsx
8578
- var import_react60 = require("react");
8579
- var import_jsx_runtime97 = require("react/jsx-runtime");
8968
+ var import_react62 = require("react");
8969
+ var import_jsx_runtime110 = require("react/jsx-runtime");
8580
8970
  var Stepper = ({
8581
8971
  numberOfSteps,
8582
8972
  current = 0,
8583
8973
  size = 28,
8584
8974
  className
8585
- }) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
8975
+ }) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
8586
8976
  "nav",
8587
8977
  {
8588
8978
  "aria-label": "progression",
@@ -8593,8 +8983,8 @@ var Stepper = ({
8593
8983
  children: Array.from({ length: numberOfSteps }, (_, i) => {
8594
8984
  const isActive = i === current;
8595
8985
  const isCompleted = i < current;
8596
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_react60.Fragment, { children: [
8597
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
8986
+ return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_react62.Fragment, { children: [
8987
+ /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
8598
8988
  "div",
8599
8989
  {
8600
8990
  "aria-hidden": true,
@@ -8603,24 +8993,24 @@ var Stepper = ({
8603
8993
  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"
8604
8994
  ),
8605
8995
  style: { width: size, height: size },
8606
- children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
8996
+ children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
8607
8997
  }
8608
8998
  ),
8609
- i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
8999
+ i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
8610
9000
  ] }, i);
8611
9001
  })
8612
9002
  }
8613
9003
  );
8614
9004
 
8615
9005
  // src/ui/components/ui/DatePicker.tsx
8616
- var import_react61 = require("react");
9006
+ var import_react63 = require("react");
8617
9007
  var import_react_day_picker = require("react-day-picker");
8618
9008
  var import_locale = require("react-day-picker/locale");
8619
9009
  var import_style2 = require("react-day-picker/style.css");
8620
9010
  var import_date_fns = require("date-fns");
8621
9011
  var import_locale2 = require("date-fns/locale");
8622
9012
  var RadixPopover6 = __toESM(require("@radix-ui/react-popover"));
8623
- var import_jsx_runtime98 = require("react/jsx-runtime");
9013
+ var import_jsx_runtime111 = require("react/jsx-runtime");
8624
9014
  var formatMonthCaption = (month) => (0, import_date_fns.format)(month, "MMM yyyy", { locale: import_locale2.fr });
8625
9015
  var isSameCalendarDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
8626
9016
  var parseTypedDate = (text, minDate, maxDate) => {
@@ -8638,10 +9028,19 @@ var parseTypedRange = (text, minDate, maxDate) => {
8638
9028
  if (!start || !end || start > end) return null;
8639
9029
  return [start, end];
8640
9030
  };
9031
+ var formatDigitsAsDate = (digits) => [digits.slice(0, 2), digits.slice(2, 4), digits.slice(4, 8)].filter(Boolean).join("/");
9032
+ var autoFormatTypedInput = (raw, isRange) => {
9033
+ const digits = raw.replace(/\D/g, "").slice(0, isRange ? 16 : 8);
9034
+ if (!isRange) return formatDigitsAsDate(digits);
9035
+ const first = digits.slice(0, 8);
9036
+ const second = digits.slice(8, 16);
9037
+ if (!second) return formatDigitsAsDate(first);
9038
+ return `${formatDigitsAsDate(first)} - ${formatDigitsAsDate(second)}`;
9039
+ };
8641
9040
  var RANGE_PRESETS = [
8642
9041
  {
8643
9042
  label: "Mois pr\xE9c\xE9dent",
8644
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-arrow-up", size: 15 }),
9043
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-arrow-up", size: 15 }),
8645
9044
  getValue: () => [
8646
9045
  (0, import_date_fns.startOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1)),
8647
9046
  (0, import_date_fns.endOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1))
@@ -8649,34 +9048,34 @@ var RANGE_PRESETS = [
8649
9048
  },
8650
9049
  {
8651
9050
  label: "Ce mois",
8652
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9051
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
8653
9052
  getValue: () => [(0, import_date_fns.startOfMonth)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfMonth)(/* @__PURE__ */ new Date())]
8654
9053
  },
8655
9054
  {
8656
9055
  label: "Ce trimestre",
8657
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-range", size: 15 }),
9056
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-range", size: 15 }),
8658
9057
  getValue: () => [(0, import_date_fns.startOfQuarter)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfQuarter)(/* @__PURE__ */ new Date())]
8659
9058
  },
8660
9059
  {
8661
9060
  label: "Cette ann\xE9e",
8662
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9061
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
8663
9062
  getValue: () => [(0, import_date_fns.startOfYear)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfYear)(/* @__PURE__ */ new Date())]
8664
9063
  }
8665
9064
  ];
8666
9065
  var SINGLE_PRESETS = [
8667
9066
  {
8668
9067
  label: "Aujourd'hui",
8669
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
9068
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
8670
9069
  getValue: () => /* @__PURE__ */ new Date()
8671
9070
  },
8672
9071
  {
8673
9072
  label: "Demain",
8674
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-plus", size: 15 }),
9073
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-plus", size: 15 }),
8675
9074
  getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 1)
8676
9075
  },
8677
9076
  {
8678
9077
  label: "Dans 7 jours",
8679
- icon: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
9078
+ icon: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
8680
9079
  getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
8681
9080
  }
8682
9081
  ];
@@ -8698,12 +9097,12 @@ var DatePicker = ({
8698
9097
  className
8699
9098
  }) => {
8700
9099
  const isRange = mode === "range";
8701
- const [open, setOpen] = (0, import_react61.useState)(false);
8702
- const [isEditing, setIsEditing] = (0, import_react61.useState)(false);
8703
- const [draftValue, setDraftValue] = (0, import_react61.useState)("");
8704
- const [isDirty, setIsDirty] = (0, import_react61.useState)(false);
9100
+ const [open, setOpen] = (0, import_react63.useState)(false);
9101
+ const [isEditing, setIsEditing] = (0, import_react63.useState)(false);
9102
+ const [draftValue, setDraftValue] = (0, import_react63.useState)("");
9103
+ const [isDirty, setIsDirty] = (0, import_react63.useState)(false);
8705
9104
  const resolvedPresets = presets != null ? presets : isRange ? RANGE_PRESETS : SINGLE_PRESETS;
8706
- const activePreset = (0, import_react61.useMemo)(() => {
9105
+ const activePreset = (0, import_react63.useMemo)(() => {
8707
9106
  var _a;
8708
9107
  const match = resolvedPresets.find((preset) => {
8709
9108
  const result = preset.getValue();
@@ -8764,7 +9163,7 @@ var DatePicker = ({
8764
9163
  setIsEditing(false);
8765
9164
  }
8766
9165
  };
8767
- const calendar = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(RadixPopover6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9166
+ const calendar = /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixPopover6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8768
9167
  RadixPopover6.Content,
8769
9168
  {
8770
9169
  align,
@@ -8776,7 +9175,7 @@ var DatePicker = ({
8776
9175
  // mois (range) passait à la ligne et se faisait couper par max-h.
8777
9176
  isRange && "max-h-[320px] max-w-[460px] overflow-y-auto [&_.rdp-months]:flex-nowrap"
8778
9177
  ),
8779
- children: isRange ? /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9178
+ children: isRange ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8780
9179
  import_react_day_picker.DayPicker,
8781
9180
  {
8782
9181
  mode: "range",
@@ -8794,7 +9193,7 @@ var DatePicker = ({
8794
9193
  showOutsideDays: true,
8795
9194
  formatters: { formatCaption: formatMonthCaption }
8796
9195
  }
8797
- ) : /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9196
+ ) : /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8798
9197
  import_react_day_picker.DayPicker,
8799
9198
  {
8800
9199
  mode: "single",
@@ -8812,8 +9211,8 @@ var DatePicker = ({
8812
9211
  }
8813
9212
  ) });
8814
9213
  if (!showPresets) {
8815
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8816
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(
9214
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9215
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
8817
9216
  Layout,
8818
9217
  {
8819
9218
  align: "center",
@@ -8827,7 +9226,7 @@ var DatePicker = ({
8827
9226
  className
8828
9227
  ),
8829
9228
  children: [
8830
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9229
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8831
9230
  "input",
8832
9231
  {
8833
9232
  type: "text",
@@ -8836,7 +9235,7 @@ var DatePicker = ({
8836
9235
  placeholder: isRange ? "jj/mm/aaaa - jj/mm/aaaa" : "jj/mm/aaaa",
8837
9236
  onFocus: startEditing,
8838
9237
  onChange: (event) => {
8839
- setDraftValue(event.target.value);
9238
+ setDraftValue(autoFormatTypedInput(event.target.value, isRange));
8840
9239
  setIsDirty(true);
8841
9240
  },
8842
9241
  onBlur: commitDraft,
@@ -8848,14 +9247,14 @@ var DatePicker = ({
8848
9247
  )
8849
9248
  }
8850
9249
  ),
8851
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9250
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8852
9251
  "button",
8853
9252
  {
8854
9253
  type: "button",
8855
9254
  "aria-label": "Ouvrir le calendrier",
8856
9255
  disabled,
8857
9256
  className: "flex h-full w-8 shrink-0 items-center justify-center text-grey-500 hover:text-blue-700 disabled:cursor-not-allowed",
8858
- children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar", size: 14 })
9257
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar", size: 14 })
8859
9258
  }
8860
9259
  ) })
8861
9260
  ]
@@ -8864,10 +9263,10 @@ var DatePicker = ({
8864
9263
  calendar
8865
9264
  ] });
8866
9265
  }
8867
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
8868
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
8869
- /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
8870
- /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9266
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
9267
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
9268
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
9269
+ /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8871
9270
  "button",
8872
9271
  {
8873
9272
  type: "button",
@@ -8879,12 +9278,12 @@ var DatePicker = ({
8879
9278
  hasValue && !activePreset ? "border-blue-700 bg-blue-50 text-blue-700" : "border-grey-300 bg-white text-neutral-800 hover:border-blue-700",
8880
9279
  "disabled:cursor-not-allowed disabled:opacity-60"
8881
9280
  ),
8882
- children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(FaIcon, { name: "calendar", size: 16 })
9281
+ children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(FaIcon, { name: "calendar", size: 16 })
8883
9282
  }
8884
9283
  ) }),
8885
9284
  resolvedPresets.map((preset) => {
8886
9285
  const active = activePreset === preset.label;
8887
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Tooltip, { content: preset.label, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9286
+ return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Tooltip, { content: preset.label, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8888
9287
  "button",
8889
9288
  {
8890
9289
  type: "button",
@@ -8902,7 +9301,7 @@ var DatePicker = ({
8902
9301
  ) }, preset.label);
8903
9302
  })
8904
9303
  ] }),
8905
- hasValue && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
9304
+ hasValue && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
8906
9305
  "button",
8907
9306
  {
8908
9307
  type: "button",
@@ -9371,9 +9770,9 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
9371
9770
  };
9372
9771
 
9373
9772
  // src/ui/components/ui/Tour.tsx
9374
- var import_react62 = require("react");
9773
+ var import_react64 = require("react");
9375
9774
  var import_driver = require("driver.js");
9376
- var import_jsx_runtime99 = require("react/jsx-runtime");
9775
+ var import_jsx_runtime112 = require("react/jsx-runtime");
9377
9776
  var TOUR_TARGET_ATTRIBUTE = "data-tour-target";
9378
9777
  var DEFAULT_LABELS = {
9379
9778
  previous: "Pr\xE9c\xE9dent",
@@ -9385,7 +9784,7 @@ var DEFAULT_LABELS = {
9385
9784
  var STAGE_PADDING = 6;
9386
9785
  var GHOST_TRANSITION_MS = 200;
9387
9786
  var HIGHLIGHT_DURATION_MS = 400;
9388
- var TourTarget = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
9787
+ var TourTarget = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
9389
9788
  var isContents = (element) => getComputedStyle(element).display === "contents";
9390
9789
  var measure = (element) => {
9391
9790
  if (!isContents(element)) {
@@ -9426,9 +9825,9 @@ var Tour = ({
9426
9825
  const current = steps[step];
9427
9826
  const total = steps.length;
9428
9827
  const isLast = step === total - 1;
9429
- const driverRef = (0, import_react62.useRef)(null);
9430
- const ghostRef = (0, import_react62.useRef)(null);
9431
- const actions = (0, import_react62.useRef)({
9828
+ const driverRef = (0, import_react64.useRef)(null);
9829
+ const ghostRef = (0, import_react64.useRef)(null);
9830
+ const actions = (0, import_react64.useRef)({
9432
9831
  next: () => {
9433
9832
  },
9434
9833
  previous: () => {
@@ -9443,7 +9842,7 @@ var Tour = ({
9443
9842
  },
9444
9843
  close: () => onClose("close")
9445
9844
  };
9446
- (0, import_react62.useEffect)(() => {
9845
+ (0, import_react64.useEffect)(() => {
9447
9846
  if (!open) return;
9448
9847
  const ghost = document.createElement("div");
9449
9848
  ghost.className = "dz-tour-target";
@@ -9469,7 +9868,7 @@ var Tour = ({
9469
9868
  ghostRef.current = null;
9470
9869
  };
9471
9870
  }, [open]);
9472
- (0, import_react62.useEffect)(() => {
9871
+ (0, import_react64.useEffect)(() => {
9473
9872
  if (!open) return;
9474
9873
  const onKeyDown = (event) => {
9475
9874
  if (event.key === "Escape") {
@@ -9481,7 +9880,7 @@ var Tour = ({
9481
9880
  window.addEventListener("keydown", onKeyDown, true);
9482
9881
  return () => window.removeEventListener("keydown", onKeyDown, true);
9483
9882
  }, [open]);
9484
- const view = (0, import_react62.useRef)({ current, text, step, total, isLast });
9883
+ const view = (0, import_react64.useRef)({ current, text, step, total, isLast });
9485
9884
  view.current = { current, text, step, total, isLast };
9486
9885
  const targetKey = [(_a = current == null ? void 0 : current.target) != null ? _a : []].flat().join("|");
9487
9886
  const popoverKey = [
@@ -9494,7 +9893,7 @@ var Tour = ({
9494
9893
  isLast ? text.finish : text.next,
9495
9894
  text.close
9496
9895
  ].join("|");
9497
- (0, import_react62.useEffect)(() => {
9896
+ (0, import_react64.useEffect)(() => {
9498
9897
  const instance = driverRef.current;
9499
9898
  const ghost = ghostRef.current;
9500
9899
  const { current: current2, text: text2, step: step2, total: total2, isLast: isLast2 } = view.current;
@@ -9693,14 +10092,24 @@ var Tour = ({
9693
10092
  Switch,
9694
10093
  TOUR_TARGET_ATTRIBUTE,
9695
10094
  Table,
10095
+ TableActionsCell,
10096
+ TableAlertRow,
9696
10097
  TableCell,
10098
+ TableClientCell,
10099
+ TableExpandedRow,
9697
10100
  TableFooter,
9698
10101
  TableFooterCell,
9699
10102
  TableFooterRow,
9700
10103
  TableHeader,
9701
10104
  TableHeaderCell,
9702
10105
  TableHeaderRow,
10106
+ TablePersonCell,
9703
10107
  TableRow,
10108
+ TableSectionRow,
10109
+ TableSelectCell,
10110
+ TableSelectHeaderCell,
10111
+ TableStatusCell,
10112
+ TableSubgroupRow,
9704
10113
  Tabs,
9705
10114
  TagBubble,
9706
10115
  TagLevelPicker,
@@ -9765,5 +10174,6 @@ var Tour = ({
9765
10174
  toast,
9766
10175
  truncateFileName,
9767
10176
  truncateText,
9768
- useAvatarSize
10177
+ useAvatarSize,
10178
+ useRowSelection
9769
10179
  });