design-zystem 1.0.445 → 1.0.447
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.d.mts +67 -2
- package/dist/ui/index.d.ts +67 -2
- package/dist/ui/index.js +628 -437
- package/dist/ui/index.mjs +626 -437
- package/dist/ui/style.css +1 -1
- package/package.json +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -64,6 +64,7 @@ __export(index_exports, {
|
|
|
64
64
|
AudioPlayer: () => AudioPlayer,
|
|
65
65
|
Avatar: () => Avatar,
|
|
66
66
|
AvatarBadge: () => AvatarBadge,
|
|
67
|
+
AvatarEditOverlay: () => AvatarEditOverlay,
|
|
67
68
|
AvatarFallback: () => AvatarFallback,
|
|
68
69
|
AvatarGroup: () => AvatarGroup,
|
|
69
70
|
AvatarImage: () => AvatarImage,
|
|
@@ -158,6 +159,7 @@ __export(index_exports, {
|
|
|
158
159
|
SidebarTrigger: () => SidebarTrigger,
|
|
159
160
|
SidebarUserMenu: () => SidebarUserMenu,
|
|
160
161
|
Skeleton: () => Skeleton,
|
|
162
|
+
Slider: () => Slider,
|
|
161
163
|
Spinner: () => Spinner,
|
|
162
164
|
Stepper: () => Stepper,
|
|
163
165
|
Switch: () => Switch,
|
|
@@ -447,6 +449,7 @@ var Layout = (0, import_react.forwardRef)(
|
|
|
447
449
|
paddingLeft,
|
|
448
450
|
width,
|
|
449
451
|
maxWidth,
|
|
452
|
+
height,
|
|
450
453
|
flex,
|
|
451
454
|
className,
|
|
452
455
|
style
|
|
@@ -468,6 +471,7 @@ var Layout = (0, import_react.forwardRef)(
|
|
|
468
471
|
"paddingLeft",
|
|
469
472
|
"width",
|
|
470
473
|
"maxWidth",
|
|
474
|
+
"height",
|
|
471
475
|
"flex",
|
|
472
476
|
"className",
|
|
473
477
|
"style"
|
|
@@ -496,7 +500,7 @@ var Layout = (0, import_react.forwardRef)(
|
|
|
496
500
|
}),
|
|
497
501
|
className
|
|
498
502
|
),
|
|
499
|
-
style: __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, width ? { width } : {}), maxWidth ? { maxWidth } : {}), flex !== void 0 ? { flex } : {}), style)
|
|
503
|
+
style: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, width ? { width } : {}), maxWidth ? { maxWidth } : {}), height ? { height } : {}), flex !== void 0 ? { flex } : {}), style)
|
|
500
504
|
}, props)
|
|
501
505
|
);
|
|
502
506
|
}
|
|
@@ -958,7 +962,7 @@ var Icon = (0, import_react7.forwardRef)(
|
|
|
958
962
|
var _a2, _b2;
|
|
959
963
|
const themeClasses = theme ? THEME_CLASSES[variant][theme] : void 0;
|
|
960
964
|
const glyphClassName = cn(
|
|
961
|
-
disabled ? "text-grey-500" : hexColor ? void 0 : color ? COLOR_CLASS[color] : (_a2 = themeClasses == null ? void 0 : themeClasses.glyph) != null ? _a2 : "text-
|
|
965
|
+
disabled ? "text-grey-500" : hexColor ? void 0 : color ? COLOR_CLASS[color] : (_a2 = themeClasses == null ? void 0 : themeClasses.glyph) != null ? _a2 : "text-inherit",
|
|
962
966
|
className
|
|
963
967
|
);
|
|
964
968
|
const glyphStyle = !disabled && hexColor ? { color: hexColor } : void 0;
|
|
@@ -4490,12 +4494,13 @@ var TableGroupBand = (_a) => {
|
|
|
4490
4494
|
|
|
4491
4495
|
// src/ui/components/ui/table/TableSectionRow.tsx
|
|
4492
4496
|
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
4493
|
-
var
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
className: "
|
|
4497
|
-
}
|
|
4498
|
-
);
|
|
4497
|
+
var SECTION_ROW_CLASS = "h-8 bg-grey-300 px-2 text-left text-[11px] font-bold uppercase tracking-wide text-neutral-800";
|
|
4498
|
+
var TableSectionRow = (props) => {
|
|
4499
|
+
if (props.title === void 0) {
|
|
4500
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableRow, { className: "hover:bg-transparent", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("td", { colSpan: props.colSpan, className: SECTION_ROW_CLASS, children: props.children }) });
|
|
4501
|
+
}
|
|
4502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(TableGroupBand, __spreadProps(__spreadValues({}, props), { className: SECTION_ROW_CLASS }));
|
|
4503
|
+
};
|
|
4499
4504
|
|
|
4500
4505
|
// src/ui/components/ui/table/TableSubgroupRow.tsx
|
|
4501
4506
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
@@ -4757,7 +4762,7 @@ var Avatar = (0, import_react30.forwardRef)(
|
|
|
4757
4762
|
__spreadProps(__spreadValues({
|
|
4758
4763
|
ref,
|
|
4759
4764
|
className: cn(
|
|
4760
|
-
"relative flex shrink-0",
|
|
4765
|
+
"group/avatar relative flex shrink-0",
|
|
4761
4766
|
shape === "circle" ? "rounded-full" : "rounded-[4px]",
|
|
4762
4767
|
className
|
|
4763
4768
|
),
|
|
@@ -4873,6 +4878,33 @@ var AvatarBadge = (0, import_react30.forwardRef)(
|
|
|
4873
4878
|
}
|
|
4874
4879
|
);
|
|
4875
4880
|
AvatarBadge.displayName = "AvatarBadge";
|
|
4881
|
+
var AvatarEditOverlay = (0, import_react30.forwardRef)((_a, ref) => {
|
|
4882
|
+
var _b = _a, { icon = "camera", iconFamily = "solid", className } = _b, props = __objRest(_b, ["icon", "iconFamily", "className"]);
|
|
4883
|
+
const avatarSize = useAvatarSize();
|
|
4884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4885
|
+
"div",
|
|
4886
|
+
__spreadProps(__spreadValues({
|
|
4887
|
+
ref,
|
|
4888
|
+
"aria-hidden": true,
|
|
4889
|
+
className: cn(
|
|
4890
|
+
"pointer-events-none absolute inset-0 flex items-center justify-center rounded-[inherit] bg-neutral-800/50 opacity-0 transition-opacity",
|
|
4891
|
+
"group-hover/avatar:opacity-100 group-focus-visible/avatar:opacity-100",
|
|
4892
|
+
className
|
|
4893
|
+
)
|
|
4894
|
+
}, props), {
|
|
4895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4896
|
+
FaIcon,
|
|
4897
|
+
{
|
|
4898
|
+
name: icon,
|
|
4899
|
+
family: iconFamily,
|
|
4900
|
+
size: Math.round(avatarSize * 0.3),
|
|
4901
|
+
className: "text-white"
|
|
4902
|
+
}
|
|
4903
|
+
)
|
|
4904
|
+
})
|
|
4905
|
+
);
|
|
4906
|
+
});
|
|
4907
|
+
AvatarEditOverlay.displayName = "AvatarEditOverlay";
|
|
4876
4908
|
var AvatarGroup = (_a) => {
|
|
4877
4909
|
var _b = _a, {
|
|
4878
4910
|
size = 40,
|
|
@@ -5575,9 +5607,166 @@ var ProgressBar = ({
|
|
|
5575
5607
|
);
|
|
5576
5608
|
};
|
|
5577
5609
|
|
|
5610
|
+
// src/ui/components/ui/Slider.tsx
|
|
5611
|
+
var RadixSlider2 = __toESM(require("@radix-ui/react-slider"));
|
|
5612
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
5613
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
5614
|
+
var sliderTrackVariants = (0, import_class_variance_authority14.cva)(
|
|
5615
|
+
"relative w-full grow overflow-hidden rounded-full bg-grey-200",
|
|
5616
|
+
{
|
|
5617
|
+
variants: {
|
|
5618
|
+
height: {
|
|
5619
|
+
xs: "h-1",
|
|
5620
|
+
sm: "h-1.5",
|
|
5621
|
+
md: "h-2",
|
|
5622
|
+
lg: "h-3",
|
|
5623
|
+
xl: "h-4"
|
|
5624
|
+
}
|
|
5625
|
+
},
|
|
5626
|
+
defaultVariants: { height: "md" }
|
|
5627
|
+
}
|
|
5628
|
+
);
|
|
5629
|
+
var SIZE = {
|
|
5630
|
+
sm: { root: "h-4", thumb: "h-4 w-4", height: "xs", labelOffset: "pt-5" },
|
|
5631
|
+
md: { root: "h-5", thumb: "h-5 w-5", height: "md", labelOffset: "pt-6" },
|
|
5632
|
+
lg: { root: "h-6", thumb: "h-6 w-6", height: "lg", labelOffset: "pt-7" }
|
|
5633
|
+
};
|
|
5634
|
+
var FILL_CLASS2 = {
|
|
5635
|
+
"blue-700": "bg-blue-700",
|
|
5636
|
+
"blue-900": "bg-blue-900",
|
|
5637
|
+
"blue-950": "bg-blue-950",
|
|
5638
|
+
"red-900": "bg-red-900",
|
|
5639
|
+
"red-500": "bg-red-500",
|
|
5640
|
+
"green-700": "bg-green-700",
|
|
5641
|
+
"green-100": "bg-green-100",
|
|
5642
|
+
"grey-600": "bg-grey-600",
|
|
5643
|
+
"yellow-500": "bg-yellow-500",
|
|
5644
|
+
"yellow-300": "bg-yellow-300",
|
|
5645
|
+
"yellow-200": "bg-yellow-200",
|
|
5646
|
+
"orange-600": "bg-orange-600",
|
|
5647
|
+
"purple-700": "bg-purple-700"
|
|
5648
|
+
};
|
|
5649
|
+
var THUMB_BORDER_CLASS2 = {
|
|
5650
|
+
"blue-700": "border-blue-700",
|
|
5651
|
+
"blue-900": "border-blue-900",
|
|
5652
|
+
"blue-950": "border-blue-950",
|
|
5653
|
+
"red-900": "border-red-900",
|
|
5654
|
+
"red-500": "border-red-500",
|
|
5655
|
+
"green-700": "border-green-700",
|
|
5656
|
+
"green-100": "border-green-100",
|
|
5657
|
+
"grey-600": "border-grey-600",
|
|
5658
|
+
"yellow-500": "border-yellow-500",
|
|
5659
|
+
"yellow-300": "border-yellow-300",
|
|
5660
|
+
"yellow-200": "border-yellow-200",
|
|
5661
|
+
"orange-600": "border-orange-600",
|
|
5662
|
+
"purple-700": "border-purple-700"
|
|
5663
|
+
};
|
|
5664
|
+
var Slider = ({
|
|
5665
|
+
value,
|
|
5666
|
+
onChange,
|
|
5667
|
+
min = 0,
|
|
5668
|
+
max = 100,
|
|
5669
|
+
step = 1,
|
|
5670
|
+
disabled = false,
|
|
5671
|
+
size = "md",
|
|
5672
|
+
height,
|
|
5673
|
+
color = "blue-700",
|
|
5674
|
+
hexColor,
|
|
5675
|
+
label,
|
|
5676
|
+
"aria-label": ariaLabel,
|
|
5677
|
+
showLabel = false,
|
|
5678
|
+
formatValue,
|
|
5679
|
+
className
|
|
5680
|
+
}) => {
|
|
5681
|
+
const current = Math.max(min, Math.min(max, value));
|
|
5682
|
+
const percent = max !== min ? (current - min) / (max - min) * 100 : 0;
|
|
5683
|
+
const display = (v) => formatValue ? formatValue(v) : String(v);
|
|
5684
|
+
const dimensions = SIZE[size];
|
|
5685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
5686
|
+
Layout,
|
|
5687
|
+
{
|
|
5688
|
+
column: true,
|
|
5689
|
+
fullWidth: true,
|
|
5690
|
+
gap: 1,
|
|
5691
|
+
className: cn(disabled && "cursor-not-allowed opacity-60", className),
|
|
5692
|
+
children: [
|
|
5693
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs text-grey-600", children: label }),
|
|
5694
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
5695
|
+
"div",
|
|
5696
|
+
{
|
|
5697
|
+
className: cn("relative w-full", showLabel && dimensions.labelOffset),
|
|
5698
|
+
children: [
|
|
5699
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5700
|
+
"span",
|
|
5701
|
+
{
|
|
5702
|
+
className: "absolute top-0 -translate-x-1/2 text-xs font-semibold text-neutral-800",
|
|
5703
|
+
style: { left: `${percent}%` },
|
|
5704
|
+
children: display(current)
|
|
5705
|
+
}
|
|
5706
|
+
),
|
|
5707
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(
|
|
5708
|
+
RadixSlider2.Root,
|
|
5709
|
+
{
|
|
5710
|
+
value: [current],
|
|
5711
|
+
onValueChange: ([next]) => onChange(next),
|
|
5712
|
+
min,
|
|
5713
|
+
max,
|
|
5714
|
+
step,
|
|
5715
|
+
disabled,
|
|
5716
|
+
className: cn(
|
|
5717
|
+
"relative flex w-full touch-none select-none items-center",
|
|
5718
|
+
dimensions.root
|
|
5719
|
+
),
|
|
5720
|
+
children: [
|
|
5721
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5722
|
+
RadixSlider2.Track,
|
|
5723
|
+
{
|
|
5724
|
+
className: sliderTrackVariants({
|
|
5725
|
+
height: height != null ? height : dimensions.height
|
|
5726
|
+
}),
|
|
5727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5728
|
+
RadixSlider2.Range,
|
|
5729
|
+
{
|
|
5730
|
+
className: cn(
|
|
5731
|
+
"absolute h-full rounded-full",
|
|
5732
|
+
!hexColor && FILL_CLASS2[color]
|
|
5733
|
+
),
|
|
5734
|
+
style: { backgroundColor: hexColor }
|
|
5735
|
+
}
|
|
5736
|
+
)
|
|
5737
|
+
}
|
|
5738
|
+
),
|
|
5739
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
5740
|
+
RadixSlider2.Thumb,
|
|
5741
|
+
{
|
|
5742
|
+
"aria-label": ariaLabel != null ? ariaLabel : label,
|
|
5743
|
+
className: cn(
|
|
5744
|
+
"block rounded-full border-2 bg-white shadow-[0_2px_6px_rgba(15,23,42,0.2)] outline-none transition-transform",
|
|
5745
|
+
"hover:scale-110 focus-visible:ring-2 focus-visible:ring-blue-200",
|
|
5746
|
+
dimensions.thumb,
|
|
5747
|
+
!hexColor && THUMB_BORDER_CLASS2[color]
|
|
5748
|
+
),
|
|
5749
|
+
style: { borderColor: hexColor }
|
|
5750
|
+
}
|
|
5751
|
+
)
|
|
5752
|
+
]
|
|
5753
|
+
}
|
|
5754
|
+
)
|
|
5755
|
+
]
|
|
5756
|
+
}
|
|
5757
|
+
),
|
|
5758
|
+
showLabel && /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)(Layout, { align: "center", justify: "between", children: [
|
|
5759
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs text-grey-600", children: display(min) }),
|
|
5760
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { className: "text-xs text-grey-600", children: display(max) })
|
|
5761
|
+
] })
|
|
5762
|
+
]
|
|
5763
|
+
}
|
|
5764
|
+
);
|
|
5765
|
+
};
|
|
5766
|
+
|
|
5578
5767
|
// src/ui/components/ui/Collapsible.tsx
|
|
5579
5768
|
var RadixCollapsible = __toESM(require("@radix-ui/react-collapsible"));
|
|
5580
|
-
var
|
|
5769
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
5581
5770
|
var Collapsible = RadixCollapsible.Root;
|
|
5582
5771
|
var CollapsibleTrigger = RadixCollapsible.Trigger;
|
|
5583
5772
|
var CollapsibleContent = (_a) => {
|
|
@@ -5586,7 +5775,7 @@ var CollapsibleContent = (_a) => {
|
|
|
5586
5775
|
} = _b, props = __objRest(_b, [
|
|
5587
5776
|
"className"
|
|
5588
5777
|
]);
|
|
5589
|
-
return /* @__PURE__ */ (0,
|
|
5778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5590
5779
|
RadixCollapsible.Content,
|
|
5591
5780
|
__spreadValues({
|
|
5592
5781
|
className: "overflow-hidden data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] " + (className != null ? className : "")
|
|
@@ -5667,7 +5856,7 @@ var swallowRestOfClick = () => {
|
|
|
5667
5856
|
};
|
|
5668
5857
|
|
|
5669
5858
|
// src/ui/components/ui/Drawer.tsx
|
|
5670
|
-
var
|
|
5859
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
5671
5860
|
var KEEP_OPEN_SELECTOR = '[role="dialog"], [role="listbox"], [data-drawer-keep-open]';
|
|
5672
5861
|
var CONTENT_POSITION = {
|
|
5673
5862
|
top: "inset-x-4 top-4 rounded-2xl",
|
|
@@ -5735,8 +5924,8 @@ var Drawer = ({
|
|
|
5735
5924
|
return () => cancelAnimationFrame(frame);
|
|
5736
5925
|
}, [modal, open]);
|
|
5737
5926
|
const closeOnDismiss = (next) => !next && closeDrawer();
|
|
5738
|
-
const drawerPortal = /* @__PURE__ */ (0,
|
|
5739
|
-
/* @__PURE__ */ (0,
|
|
5927
|
+
const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(import_vaul.Drawer.Portal, { children: [
|
|
5928
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5740
5929
|
import_vaul.Drawer.Overlay,
|
|
5741
5930
|
{
|
|
5742
5931
|
ref: (node) => {
|
|
@@ -5751,7 +5940,7 @@ var Drawer = ({
|
|
|
5751
5940
|
)
|
|
5752
5941
|
}
|
|
5753
5942
|
),
|
|
5754
|
-
/* @__PURE__ */ (0,
|
|
5943
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5755
5944
|
import_vaul.Drawer.Content,
|
|
5756
5945
|
__spreadProps(__spreadValues({
|
|
5757
5946
|
ref: (node) => {
|
|
@@ -5784,14 +5973,14 @@ var Drawer = ({
|
|
|
5784
5973
|
})
|
|
5785
5974
|
)
|
|
5786
5975
|
] });
|
|
5787
|
-
return /* @__PURE__ */ (0,
|
|
5976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5788
5977
|
import_vaul.Drawer.Root,
|
|
5789
5978
|
{
|
|
5790
5979
|
direction,
|
|
5791
5980
|
modal,
|
|
5792
5981
|
open,
|
|
5793
5982
|
onOpenChange: closeOnDismiss,
|
|
5794
|
-
children: modal ? drawerPortal : /* @__PURE__ */ (0,
|
|
5983
|
+
children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5795
5984
|
DialogPrimitive.Root,
|
|
5796
5985
|
{
|
|
5797
5986
|
modal: false,
|
|
@@ -5809,7 +5998,7 @@ var DrawerHeader = (_a) => {
|
|
|
5809
5998
|
} = _b, props = __objRest(_b, [
|
|
5810
5999
|
"className"
|
|
5811
6000
|
]);
|
|
5812
|
-
return /* @__PURE__ */ (0,
|
|
6001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5813
6002
|
"div",
|
|
5814
6003
|
__spreadValues({
|
|
5815
6004
|
className: cn("flex w-full items-center justify-between", className)
|
|
@@ -5822,7 +6011,7 @@ var DrawerTitle = (_a) => {
|
|
|
5822
6011
|
} = _b, props = __objRest(_b, [
|
|
5823
6012
|
"className"
|
|
5824
6013
|
]);
|
|
5825
|
-
return /* @__PURE__ */ (0,
|
|
6014
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5826
6015
|
import_vaul.Drawer.Title,
|
|
5827
6016
|
__spreadValues({
|
|
5828
6017
|
className: cn("text-base font-bold text-neutral-800", className)
|
|
@@ -5835,7 +6024,7 @@ var DrawerDescription = (_a) => {
|
|
|
5835
6024
|
} = _b, props = __objRest(_b, [
|
|
5836
6025
|
"className"
|
|
5837
6026
|
]);
|
|
5838
|
-
return /* @__PURE__ */ (0,
|
|
6027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
5839
6028
|
import_vaul.Drawer.Description,
|
|
5840
6029
|
__spreadValues({
|
|
5841
6030
|
className: cn("text-sm text-grey-500", className)
|
|
@@ -5848,7 +6037,7 @@ var DrawerBody = (_a) => {
|
|
|
5848
6037
|
} = _b, props = __objRest(_b, [
|
|
5849
6038
|
"className"
|
|
5850
6039
|
]);
|
|
5851
|
-
return /* @__PURE__ */ (0,
|
|
6040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", __spreadValues({ className: cn("min-h-0 flex-1 overflow-y-auto", className) }, props));
|
|
5852
6041
|
};
|
|
5853
6042
|
var DrawerFooter = (_a) => {
|
|
5854
6043
|
var _b = _a, {
|
|
@@ -5856,7 +6045,7 @@ var DrawerFooter = (_a) => {
|
|
|
5856
6045
|
} = _b, props = __objRest(_b, [
|
|
5857
6046
|
"className"
|
|
5858
6047
|
]);
|
|
5859
|
-
return /* @__PURE__ */ (0,
|
|
6048
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", __spreadValues({ className: cn("flex w-full flex-col gap-3", className) }, props));
|
|
5860
6049
|
};
|
|
5861
6050
|
var DrawerClose = import_vaul.Drawer.Close;
|
|
5862
6051
|
|
|
@@ -5870,11 +6059,11 @@ var SidebarCollapsedProvider = SidebarCollapsedContext.Provider;
|
|
|
5870
6059
|
var useSidebarCollapsed = () => (0, import_react34.useContext)(SidebarCollapsedContext);
|
|
5871
6060
|
|
|
5872
6061
|
// src/ui/components/ui/sidebar/Sidebar.tsx
|
|
5873
|
-
var
|
|
6062
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
5874
6063
|
var Sidebar = (0, import_react35.forwardRef)(
|
|
5875
6064
|
(_a, ref) => {
|
|
5876
6065
|
var _b = _a, { collapsed = false, className, children } = _b, props = __objRest(_b, ["collapsed", "className", "children"]);
|
|
5877
|
-
return /* @__PURE__ */ (0,
|
|
6066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(SidebarCollapsedProvider, { value: collapsed, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5878
6067
|
"aside",
|
|
5879
6068
|
__spreadProps(__spreadValues({
|
|
5880
6069
|
ref,
|
|
@@ -5893,10 +6082,10 @@ Sidebar.displayName = "Sidebar";
|
|
|
5893
6082
|
|
|
5894
6083
|
// src/ui/components/ui/sidebar/SidebarTrigger.tsx
|
|
5895
6084
|
var import_react36 = require("react");
|
|
5896
|
-
var
|
|
6085
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
5897
6086
|
var SidebarTrigger = (0, import_react36.forwardRef)((_a, ref) => {
|
|
5898
6087
|
var _b = _a, { collapsed, className } = _b, props = __objRest(_b, ["collapsed", "className"]);
|
|
5899
|
-
return /* @__PURE__ */ (0,
|
|
6088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5900
6089
|
"button",
|
|
5901
6090
|
__spreadProps(__spreadValues({
|
|
5902
6091
|
ref,
|
|
@@ -5907,7 +6096,7 @@ var SidebarTrigger = (0, import_react36.forwardRef)((_a, ref) => {
|
|
|
5907
6096
|
className
|
|
5908
6097
|
)
|
|
5909
6098
|
}, props), {
|
|
5910
|
-
children: /* @__PURE__ */ (0,
|
|
6099
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
5911
6100
|
FaIcon,
|
|
5912
6101
|
{
|
|
5913
6102
|
name: collapsed ? "chevrons-right" : "chevrons-left",
|
|
@@ -5922,11 +6111,11 @@ SidebarTrigger.displayName = "SidebarTrigger";
|
|
|
5922
6111
|
|
|
5923
6112
|
// src/ui/components/ui/sidebar/SidebarHeader.tsx
|
|
5924
6113
|
var import_react37 = require("react");
|
|
5925
|
-
var
|
|
6114
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
5926
6115
|
var SidebarHeader = (0, import_react37.forwardRef)(
|
|
5927
6116
|
(_a, ref) => {
|
|
5928
6117
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5929
|
-
return /* @__PURE__ */ (0,
|
|
6118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
5930
6119
|
"div",
|
|
5931
6120
|
__spreadValues({
|
|
5932
6121
|
ref,
|
|
@@ -5939,11 +6128,11 @@ SidebarHeader.displayName = "SidebarHeader";
|
|
|
5939
6128
|
|
|
5940
6129
|
// src/ui/components/ui/sidebar/SidebarContent.tsx
|
|
5941
6130
|
var import_react38 = require("react");
|
|
5942
|
-
var
|
|
6131
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
5943
6132
|
var SidebarContent = (0, import_react38.forwardRef)(
|
|
5944
6133
|
(_a, ref) => {
|
|
5945
6134
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
5946
|
-
return /* @__PURE__ */ (0,
|
|
6135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
5947
6136
|
"div",
|
|
5948
6137
|
__spreadValues({
|
|
5949
6138
|
ref,
|
|
@@ -5960,20 +6149,20 @@ SidebarContent.displayName = "SidebarContent";
|
|
|
5960
6149
|
|
|
5961
6150
|
// src/ui/components/ui/sidebar/SidebarGroup.tsx
|
|
5962
6151
|
var import_react39 = require("react");
|
|
5963
|
-
var
|
|
6152
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
5964
6153
|
var SidebarGroup = (0, import_react39.forwardRef)(
|
|
5965
6154
|
(_a, ref) => {
|
|
5966
6155
|
var _b = _a, { label, className, children } = _b, props = __objRest(_b, ["label", "className", "children"]);
|
|
5967
6156
|
const collapsed = useSidebarCollapsed();
|
|
5968
|
-
return /* @__PURE__ */ (0,
|
|
6157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
5969
6158
|
"div",
|
|
5970
6159
|
__spreadProps(__spreadValues({
|
|
5971
6160
|
ref,
|
|
5972
6161
|
className: cn("flex w-full flex-col p-2", className)
|
|
5973
6162
|
}, props), {
|
|
5974
6163
|
children: [
|
|
5975
|
-
label && !collapsed && /* @__PURE__ */ (0,
|
|
5976
|
-
/* @__PURE__ */ (0,
|
|
6164
|
+
label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "flex h-8 shrink-0 items-center px-2 text-xs font-medium text-white/50", children: label }),
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "flex flex-col gap-1", children })
|
|
5977
6166
|
]
|
|
5978
6167
|
})
|
|
5979
6168
|
);
|
|
@@ -5983,7 +6172,7 @@ SidebarGroup.displayName = "SidebarGroup";
|
|
|
5983
6172
|
|
|
5984
6173
|
// src/ui/components/ui/sidebar/SidebarMenuButton.tsx
|
|
5985
6174
|
var import_react40 = require("react");
|
|
5986
|
-
var
|
|
6175
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
5987
6176
|
var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
5988
6177
|
(_a, ref) => {
|
|
5989
6178
|
var _b = _a, {
|
|
@@ -6006,7 +6195,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
|
6006
6195
|
"className"
|
|
6007
6196
|
]);
|
|
6008
6197
|
const collapsed = useSidebarCollapsed();
|
|
6009
|
-
const button = /* @__PURE__ */ (0,
|
|
6198
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
6010
6199
|
"button",
|
|
6011
6200
|
__spreadProps(__spreadValues({
|
|
6012
6201
|
ref,
|
|
@@ -6022,7 +6211,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
|
6022
6211
|
)
|
|
6023
6212
|
}, props), {
|
|
6024
6213
|
children: [
|
|
6025
|
-
/* @__PURE__ */ (0,
|
|
6214
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6026
6215
|
FaIcon,
|
|
6027
6216
|
{
|
|
6028
6217
|
name: icon,
|
|
@@ -6031,7 +6220,7 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
|
6031
6220
|
className: "shrink-0"
|
|
6032
6221
|
}
|
|
6033
6222
|
),
|
|
6034
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
6223
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6035
6224
|
Text,
|
|
6036
6225
|
{
|
|
6037
6226
|
as: "span",
|
|
@@ -6042,8 +6231,8 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
|
6042
6231
|
children: label
|
|
6043
6232
|
}
|
|
6044
6233
|
),
|
|
6045
|
-
!collapsed && shortcut && /* @__PURE__ */ (0,
|
|
6046
|
-
!!badge && /* @__PURE__ */ (0,
|
|
6234
|
+
!collapsed && shortcut && /* @__PURE__ */ (0, import_jsx_runtime78.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 }),
|
|
6235
|
+
!!badge && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
6047
6236
|
"span",
|
|
6048
6237
|
{
|
|
6049
6238
|
className: cn(
|
|
@@ -6058,14 +6247,14 @@ var SidebarMenuButton = (0, import_react40.forwardRef)(
|
|
|
6058
6247
|
})
|
|
6059
6248
|
);
|
|
6060
6249
|
if (!collapsed) return button;
|
|
6061
|
-
return /* @__PURE__ */ (0,
|
|
6250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(Tooltip, { content: label, side: "right", children: button });
|
|
6062
6251
|
}
|
|
6063
6252
|
);
|
|
6064
6253
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
6065
6254
|
|
|
6066
6255
|
// src/ui/components/ui/sidebar/SidebarActionCard.tsx
|
|
6067
6256
|
var import_react41 = require("react");
|
|
6068
|
-
var
|
|
6257
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
6069
6258
|
var SidebarActionCard = (0, import_react41.forwardRef)(
|
|
6070
6259
|
(_a, ref) => {
|
|
6071
6260
|
var _b = _a, {
|
|
@@ -6086,11 +6275,11 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
|
|
|
6086
6275
|
const collapsed = useSidebarCollapsed();
|
|
6087
6276
|
const tooltip = subtitle ? `${title} ${subtitle}` : title;
|
|
6088
6277
|
const counter = badge ? badge > 99 ? "99+" : badge : null;
|
|
6089
|
-
const iconBadge = /* @__PURE__ */ (0,
|
|
6090
|
-
/* @__PURE__ */ (0,
|
|
6091
|
-
collapsed && counter && /* @__PURE__ */ (0,
|
|
6278
|
+
const iconBadge = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "relative flex size-8 shrink-0 items-center justify-center rounded-full bg-yellow-200 text-neutral-800", children: [
|
|
6279
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }),
|
|
6280
|
+
collapsed && counter && /* @__PURE__ */ (0, import_jsx_runtime79.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 })
|
|
6092
6281
|
] });
|
|
6093
|
-
const button = /* @__PURE__ */ (0,
|
|
6282
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
6094
6283
|
"button",
|
|
6095
6284
|
__spreadProps(__spreadValues({
|
|
6096
6285
|
ref,
|
|
@@ -6105,12 +6294,12 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
|
|
|
6105
6294
|
}, props), {
|
|
6106
6295
|
children: [
|
|
6107
6296
|
iconBadge,
|
|
6108
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
6109
|
-
/* @__PURE__ */ (0,
|
|
6110
|
-
/* @__PURE__ */ (0,
|
|
6111
|
-
subtitle && /* @__PURE__ */ (0,
|
|
6297
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
6298
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
|
|
6299
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "truncate text-sm font-bold text-white", children: title }),
|
|
6300
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "truncate text-xs text-white/60", children: subtitle })
|
|
6112
6301
|
] }),
|
|
6113
|
-
counter ? /* @__PURE__ */ (0,
|
|
6302
|
+
counter ? /* @__PURE__ */ (0, import_jsx_runtime79.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_runtime79.jsx)(
|
|
6114
6303
|
FaIcon,
|
|
6115
6304
|
{
|
|
6116
6305
|
name: "chevron-right",
|
|
@@ -6124,18 +6313,18 @@ var SidebarActionCard = (0, import_react41.forwardRef)(
|
|
|
6124
6313
|
})
|
|
6125
6314
|
);
|
|
6126
6315
|
if (!collapsed) return button;
|
|
6127
|
-
return /* @__PURE__ */ (0,
|
|
6316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(Tooltip, { content: tooltip, side: "right", children: button });
|
|
6128
6317
|
}
|
|
6129
6318
|
);
|
|
6130
6319
|
SidebarActionCard.displayName = "SidebarActionCard";
|
|
6131
6320
|
|
|
6132
6321
|
// src/ui/components/ui/sidebar/SidebarMenuSub.tsx
|
|
6133
6322
|
var import_react42 = require("react");
|
|
6134
|
-
var
|
|
6323
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
6135
6324
|
var SidebarMenuSub = (0, import_react42.forwardRef)(
|
|
6136
6325
|
(_a, ref) => {
|
|
6137
6326
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6138
|
-
return /* @__PURE__ */ (0,
|
|
6327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
6139
6328
|
"ul",
|
|
6140
6329
|
__spreadValues({
|
|
6141
6330
|
ref,
|
|
@@ -6151,23 +6340,23 @@ SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
|
6151
6340
|
|
|
6152
6341
|
// src/ui/components/ui/sidebar/SidebarMenuSubItem.tsx
|
|
6153
6342
|
var import_react43 = require("react");
|
|
6154
|
-
var
|
|
6343
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
6155
6344
|
var SidebarMenuSubItem = (0, import_react43.forwardRef)((_a, ref) => {
|
|
6156
6345
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6157
|
-
return /* @__PURE__ */ (0,
|
|
6346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("li", __spreadValues({ ref, className: cn("relative", className) }, props));
|
|
6158
6347
|
});
|
|
6159
6348
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
6160
6349
|
|
|
6161
6350
|
// src/ui/components/ui/sidebar/SidebarMenuSubButton.tsx
|
|
6162
6351
|
var import_react44 = require("react");
|
|
6163
|
-
var
|
|
6352
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
6164
6353
|
var SIZE_CLASS = {
|
|
6165
6354
|
default: "h-10",
|
|
6166
6355
|
lg: "h-14"
|
|
6167
6356
|
};
|
|
6168
6357
|
var SidebarMenuSubButton = (0, import_react44.forwardRef)((_a, ref) => {
|
|
6169
6358
|
var _b = _a, { active, size = "default", className } = _b, props = __objRest(_b, ["active", "size", "className"]);
|
|
6170
|
-
return /* @__PURE__ */ (0,
|
|
6359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
6171
6360
|
"button",
|
|
6172
6361
|
__spreadValues({
|
|
6173
6362
|
ref,
|
|
@@ -6187,11 +6376,11 @@ SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
|
6187
6376
|
|
|
6188
6377
|
// src/ui/components/ui/sidebar/SidebarFooter.tsx
|
|
6189
6378
|
var import_react45 = require("react");
|
|
6190
|
-
var
|
|
6379
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
6191
6380
|
var SidebarFooter = (0, import_react45.forwardRef)(
|
|
6192
6381
|
(_a, ref) => {
|
|
6193
6382
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6194
|
-
return /* @__PURE__ */ (0,
|
|
6383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
6195
6384
|
"div",
|
|
6196
6385
|
__spreadValues({
|
|
6197
6386
|
ref,
|
|
@@ -6203,7 +6392,7 @@ var SidebarFooter = (0, import_react45.forwardRef)(
|
|
|
6203
6392
|
SidebarFooter.displayName = "SidebarFooter";
|
|
6204
6393
|
|
|
6205
6394
|
// src/ui/components/ui/sidebar/SidebarSupportInfo.tsx
|
|
6206
|
-
var
|
|
6395
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
6207
6396
|
var SidebarSupportInfo = ({
|
|
6208
6397
|
phone,
|
|
6209
6398
|
hours,
|
|
@@ -6212,27 +6401,27 @@ var SidebarSupportInfo = ({
|
|
|
6212
6401
|
className
|
|
6213
6402
|
}) => {
|
|
6214
6403
|
const collapsed = useSidebarCollapsed();
|
|
6215
|
-
const badge = /* @__PURE__ */ (0,
|
|
6404
|
+
const badge = /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-full bg-white/10 text-white", children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(FaIcon, { name: icon, family: iconFamily, size: 16 }) });
|
|
6216
6405
|
if (collapsed) {
|
|
6217
|
-
return /* @__PURE__ */ (0,
|
|
6406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: cn("flex justify-center px-2 py-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Tooltip, { content: `${phone} \u2014 ${hours}`, side: "right", children: badge }) });
|
|
6218
6407
|
}
|
|
6219
|
-
return /* @__PURE__ */ (0,
|
|
6408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: cn("flex items-center gap-2 px-2 py-1.5", className), children: [
|
|
6220
6409
|
badge,
|
|
6221
|
-
/* @__PURE__ */ (0,
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6410
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: "flex min-w-0 flex-col leading-tight", children: [
|
|
6411
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-sm font-bold text-white", children: phone }),
|
|
6412
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("span", { className: "truncate text-xs text-white/50", children: hours })
|
|
6224
6413
|
] })
|
|
6225
6414
|
] });
|
|
6226
6415
|
};
|
|
6227
6416
|
|
|
6228
6417
|
// src/ui/components/ui/sidebar/SidebarMenuSearchInput.tsx
|
|
6229
6418
|
var import_react46 = require("react");
|
|
6230
|
-
var
|
|
6419
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
6231
6420
|
var SidebarMenuSearchInput = (0, import_react46.forwardRef)((_a, ref) => {
|
|
6232
6421
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
6233
|
-
return /* @__PURE__ */ (0,
|
|
6234
|
-
/* @__PURE__ */ (0,
|
|
6235
|
-
/* @__PURE__ */ (0,
|
|
6422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(InputGroup, { children: [
|
|
6423
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(InputGroupAddon, { align: "inline-start", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(FaIcon, { name: "magnifying-glass", size: 14, className: "text-white/50" }) }),
|
|
6424
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
6236
6425
|
Input,
|
|
6237
6426
|
__spreadValues({
|
|
6238
6427
|
ref,
|
|
@@ -6249,7 +6438,7 @@ SidebarMenuSearchInput.displayName = "SidebarMenuSearchInput";
|
|
|
6249
6438
|
// src/ui/components/ui/sidebar/SidebarUserMenu.tsx
|
|
6250
6439
|
var import_react47 = require("react");
|
|
6251
6440
|
var RadixPopover5 = __toESM(require("@radix-ui/react-popover"));
|
|
6252
|
-
var
|
|
6441
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
6253
6442
|
var panelClassName = cn(
|
|
6254
6443
|
"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)]",
|
|
6255
6444
|
"data-[state=open]:animate-[fade-in_150ms_ease-out]"
|
|
@@ -6271,8 +6460,8 @@ var SidebarUserMenu = ({
|
|
|
6271
6460
|
action();
|
|
6272
6461
|
setOpen(false);
|
|
6273
6462
|
};
|
|
6274
|
-
return /* @__PURE__ */ (0,
|
|
6275
|
-
/* @__PURE__ */ (0,
|
|
6463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(RadixPopover5.Root, { open, onOpenChange: setOpen, children: [
|
|
6464
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6276
6465
|
"button",
|
|
6277
6466
|
{
|
|
6278
6467
|
type: "button",
|
|
@@ -6282,10 +6471,10 @@ var SidebarUserMenu = ({
|
|
|
6282
6471
|
className
|
|
6283
6472
|
),
|
|
6284
6473
|
children: [
|
|
6285
|
-
/* @__PURE__ */ (0,
|
|
6286
|
-
!collapsed && /* @__PURE__ */ (0,
|
|
6287
|
-
/* @__PURE__ */ (0,
|
|
6288
|
-
/* @__PURE__ */ (0,
|
|
6474
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Avatar, { name, src: avatarSrc, size: collapsed ? 28 : 32 }),
|
|
6475
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_jsx_runtime86.Fragment, { children: [
|
|
6476
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
|
|
6477
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6289
6478
|
Text,
|
|
6290
6479
|
{
|
|
6291
6480
|
as: "span",
|
|
@@ -6296,10 +6485,10 @@ var SidebarUserMenu = ({
|
|
|
6296
6485
|
children: name
|
|
6297
6486
|
}
|
|
6298
6487
|
),
|
|
6299
|
-
email && /* @__PURE__ */ (0,
|
|
6300
|
-
subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0,
|
|
6488
|
+
email && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
|
|
6489
|
+
subtitle && !hideSubtitleInTrigger && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
|
|
6301
6490
|
] }),
|
|
6302
|
-
/* @__PURE__ */ (0,
|
|
6491
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6303
6492
|
FaIcon,
|
|
6304
6493
|
{
|
|
6305
6494
|
name: "sort",
|
|
@@ -6312,7 +6501,7 @@ var SidebarUserMenu = ({
|
|
|
6312
6501
|
]
|
|
6313
6502
|
}
|
|
6314
6503
|
) }),
|
|
6315
|
-
/* @__PURE__ */ (0,
|
|
6504
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6316
6505
|
RadixPopover5.Content,
|
|
6317
6506
|
{
|
|
6318
6507
|
align: "end",
|
|
@@ -6320,10 +6509,10 @@ var SidebarUserMenu = ({
|
|
|
6320
6509
|
sideOffset: 6,
|
|
6321
6510
|
className: panelClassName,
|
|
6322
6511
|
children: [
|
|
6323
|
-
/* @__PURE__ */ (0,
|
|
6324
|
-
/* @__PURE__ */ (0,
|
|
6325
|
-
/* @__PURE__ */ (0,
|
|
6326
|
-
/* @__PURE__ */ (0,
|
|
6512
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex items-center gap-2 px-2 py-1.5", children: [
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Avatar, { name, src: avatarSrc, size: 32 }),
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6327
6516
|
Text,
|
|
6328
6517
|
{
|
|
6329
6518
|
as: "span",
|
|
@@ -6334,20 +6523,20 @@ var SidebarUserMenu = ({
|
|
|
6334
6523
|
children: name
|
|
6335
6524
|
}
|
|
6336
6525
|
),
|
|
6337
|
-
email && /* @__PURE__ */ (0,
|
|
6338
|
-
subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0,
|
|
6526
|
+
email && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "truncate text-xs text-white/50", children: email }),
|
|
6527
|
+
subtitle && !hideSubtitleInPanel && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "truncate text-xs text-white/50", children: subtitle })
|
|
6339
6528
|
] })
|
|
6340
6529
|
] }),
|
|
6341
|
-
actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0,
|
|
6530
|
+
actionGroups.map((group, groupIndex) => /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6342
6531
|
"div",
|
|
6343
6532
|
{
|
|
6344
6533
|
className: "border-t border-white/10 py-1 first:border-t-0",
|
|
6345
6534
|
children: group.map(
|
|
6346
6535
|
(item) => {
|
|
6347
6536
|
var _a;
|
|
6348
|
-
return item.renderPanel || item.subActions ? /* @__PURE__ */ (0,
|
|
6349
|
-
/* @__PURE__ */ (0,
|
|
6350
|
-
/* @__PURE__ */ (0,
|
|
6537
|
+
return item.renderPanel || item.subActions ? /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(RadixPopover5.Root, { children: [
|
|
6538
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(RadixPopover5.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("button", { type: "button", className: rowClassName, children: [
|
|
6539
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6351
6540
|
FaIcon,
|
|
6352
6541
|
{
|
|
6353
6542
|
name: item.icon,
|
|
@@ -6356,8 +6545,8 @@ var SidebarUserMenu = ({
|
|
|
6356
6545
|
className: "shrink-0 text-white/70"
|
|
6357
6546
|
}
|
|
6358
6547
|
),
|
|
6359
|
-
/* @__PURE__ */ (0,
|
|
6360
|
-
/* @__PURE__ */ (0,
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "flex-1", children: item.label }),
|
|
6549
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6361
6550
|
FaIcon,
|
|
6362
6551
|
{
|
|
6363
6552
|
name: "chevron-right",
|
|
@@ -6366,21 +6555,21 @@ var SidebarUserMenu = ({
|
|
|
6366
6555
|
}
|
|
6367
6556
|
)
|
|
6368
6557
|
] }) }),
|
|
6369
|
-
/* @__PURE__ */ (0,
|
|
6558
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(RadixPopover5.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6370
6559
|
RadixPopover5.Content,
|
|
6371
6560
|
{
|
|
6372
6561
|
align: "end",
|
|
6373
6562
|
side: "right",
|
|
6374
6563
|
sideOffset: 6,
|
|
6375
6564
|
className: panelClassName,
|
|
6376
|
-
children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0,
|
|
6565
|
+
children: item.renderPanel ? item.renderPanel(() => setOpen(false)) : (_a = item.subActions) == null ? void 0 : _a.map((sub) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6377
6566
|
"button",
|
|
6378
6567
|
{
|
|
6379
6568
|
type: "button",
|
|
6380
6569
|
onClick: () => runAndClose(sub.action),
|
|
6381
6570
|
className: rowClassName,
|
|
6382
6571
|
children: [
|
|
6383
|
-
/* @__PURE__ */ (0,
|
|
6572
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6384
6573
|
FaIcon,
|
|
6385
6574
|
{
|
|
6386
6575
|
name: sub.icon,
|
|
@@ -6396,14 +6585,14 @@ var SidebarUserMenu = ({
|
|
|
6396
6585
|
))
|
|
6397
6586
|
}
|
|
6398
6587
|
) })
|
|
6399
|
-
] }, item.label) : /* @__PURE__ */ (0,
|
|
6588
|
+
] }, item.label) : /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
6400
6589
|
"button",
|
|
6401
6590
|
{
|
|
6402
6591
|
type: "button",
|
|
6403
6592
|
onClick: () => runAndClose(item.action),
|
|
6404
6593
|
className: rowClassName,
|
|
6405
6594
|
children: [
|
|
6406
|
-
/* @__PURE__ */ (0,
|
|
6595
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
6407
6596
|
FaIcon,
|
|
6408
6597
|
{
|
|
6409
6598
|
name: item.icon,
|
|
@@ -6430,15 +6619,15 @@ var SidebarUserMenu = ({
|
|
|
6430
6619
|
|
|
6431
6620
|
// src/ui/components/ui/Toaster.tsx
|
|
6432
6621
|
var import_sonner = require("sonner");
|
|
6433
|
-
var
|
|
6434
|
-
var Toaster = () => /* @__PURE__ */ (0,
|
|
6622
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
6623
|
+
var Toaster = () => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_sonner.Toaster, { position: "bottom-right", gap: 8 });
|
|
6435
6624
|
|
|
6436
6625
|
// src/ui/lib/toast.tsx
|
|
6437
6626
|
var import_sonner3 = require("sonner");
|
|
6438
6627
|
|
|
6439
6628
|
// src/ui/components/ui/ToastCard.tsx
|
|
6440
6629
|
var import_sonner2 = require("sonner");
|
|
6441
|
-
var
|
|
6630
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
6442
6631
|
var ICON = {
|
|
6443
6632
|
success: "circle-check",
|
|
6444
6633
|
error: "circle-xmark",
|
|
@@ -6480,7 +6669,7 @@ var ToastCard = ({
|
|
|
6480
6669
|
title,
|
|
6481
6670
|
message,
|
|
6482
6671
|
timeOut
|
|
6483
|
-
}) => /* @__PURE__ */ (0,
|
|
6672
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
6484
6673
|
Layout,
|
|
6485
6674
|
{
|
|
6486
6675
|
role: "status",
|
|
@@ -6492,14 +6681,14 @@ var ToastCard = ({
|
|
|
6492
6681
|
ACCENT_BORDER[type]
|
|
6493
6682
|
),
|
|
6494
6683
|
children: [
|
|
6495
|
-
/* @__PURE__ */ (0,
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6496
6685
|
"span",
|
|
6497
6686
|
{
|
|
6498
6687
|
className: cn(
|
|
6499
6688
|
"flex h-7 w-7 shrink-0 items-center justify-center rounded-full",
|
|
6500
6689
|
ACCENT_BG[type]
|
|
6501
6690
|
),
|
|
6502
|
-
children: /* @__PURE__ */ (0,
|
|
6691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6503
6692
|
FaIcon,
|
|
6504
6693
|
{
|
|
6505
6694
|
name: ICON[type],
|
|
@@ -6512,21 +6701,21 @@ var ToastCard = ({
|
|
|
6512
6701
|
)
|
|
6513
6702
|
}
|
|
6514
6703
|
),
|
|
6515
|
-
/* @__PURE__ */ (0,
|
|
6516
|
-
title && /* @__PURE__ */ (0,
|
|
6517
|
-
/* @__PURE__ */ (0,
|
|
6704
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Layout, { column: true, flex: 1, gap: 0.5, className: "min-w-0", children: [
|
|
6705
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "text-sm font-bold text-neutral-800", children: title }),
|
|
6706
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "text-sm text-neutral-800", children: message })
|
|
6518
6707
|
] }),
|
|
6519
|
-
/* @__PURE__ */ (0,
|
|
6708
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6520
6709
|
"button",
|
|
6521
6710
|
{
|
|
6522
6711
|
type: "button",
|
|
6523
6712
|
"aria-label": "Fermer",
|
|
6524
6713
|
onClick: () => import_sonner2.toast.dismiss(id),
|
|
6525
6714
|
className: "absolute right-2.5 top-2.5 text-grey-500 hover:text-neutral-800",
|
|
6526
|
-
children: /* @__PURE__ */ (0,
|
|
6715
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FaIcon, { name: "xmark", size: 14 })
|
|
6527
6716
|
}
|
|
6528
6717
|
),
|
|
6529
|
-
type !== "loading" && /* @__PURE__ */ (0,
|
|
6718
|
+
type !== "loading" && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
6530
6719
|
"div",
|
|
6531
6720
|
{
|
|
6532
6721
|
className: cn(
|
|
@@ -6541,13 +6730,13 @@ var ToastCard = ({
|
|
|
6541
6730
|
);
|
|
6542
6731
|
|
|
6543
6732
|
// src/ui/lib/toast.tsx
|
|
6544
|
-
var
|
|
6733
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
6545
6734
|
var DEFAULT_TIMEOUT = 4e3;
|
|
6546
6735
|
var show = (type, message, options) => {
|
|
6547
6736
|
var _a;
|
|
6548
6737
|
const timeOut = type === "loading" ? Infinity : (_a = options == null ? void 0 : options.timeOut) != null ? _a : DEFAULT_TIMEOUT;
|
|
6549
6738
|
return import_sonner3.toast.custom(
|
|
6550
|
-
(id) => /* @__PURE__ */ (0,
|
|
6739
|
+
(id) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
6551
6740
|
ToastCard,
|
|
6552
6741
|
{
|
|
6553
6742
|
id,
|
|
@@ -6586,9 +6775,9 @@ var toast = {
|
|
|
6586
6775
|
|
|
6587
6776
|
// src/ui/components/ui/PageContainer.tsx
|
|
6588
6777
|
var import_react48 = require("react");
|
|
6589
|
-
var
|
|
6590
|
-
var
|
|
6591
|
-
var pageContainerVariants = (0,
|
|
6778
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
6779
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
6780
|
+
var pageContainerVariants = (0, import_class_variance_authority15.cva)(
|
|
6592
6781
|
"flex h-full w-full flex-col overflow-auto rounded-[10px] bg-grey-200 shadow-[0_1px_4px_rgba(0,0,0,0.16)]",
|
|
6593
6782
|
{
|
|
6594
6783
|
variants: {
|
|
@@ -6605,7 +6794,7 @@ var pageContainerVariants = (0, import_class_variance_authority14.cva)(
|
|
|
6605
6794
|
var PageContainer = (0, import_react48.forwardRef)(
|
|
6606
6795
|
(_a, ref) => {
|
|
6607
6796
|
var _b = _a, { padding, className } = _b, props = __objRest(_b, ["padding", "className"]);
|
|
6608
|
-
return /* @__PURE__ */ (0,
|
|
6797
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
6609
6798
|
"div",
|
|
6610
6799
|
__spreadValues({
|
|
6611
6800
|
ref,
|
|
@@ -6618,7 +6807,7 @@ PageContainer.displayName = "PageContainer";
|
|
|
6618
6807
|
|
|
6619
6808
|
// src/ui/components/ui/IconTabs.tsx
|
|
6620
6809
|
var import_react49 = require("react");
|
|
6621
|
-
var
|
|
6810
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
6622
6811
|
var IconTabs = ({
|
|
6623
6812
|
items,
|
|
6624
6813
|
value,
|
|
@@ -6649,8 +6838,8 @@ var IconTabs = ({
|
|
|
6649
6838
|
if (listRef.current) ro.observe(listRef.current);
|
|
6650
6839
|
return () => ro.disconnect();
|
|
6651
6840
|
}, [updateBar]);
|
|
6652
|
-
return /* @__PURE__ */ (0,
|
|
6653
|
-
/* @__PURE__ */ (0,
|
|
6841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(Layout, { column: true, className, children: [
|
|
6842
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6654
6843
|
Layout,
|
|
6655
6844
|
{
|
|
6656
6845
|
ref: listRef,
|
|
@@ -6659,7 +6848,7 @@ var IconTabs = ({
|
|
|
6659
6848
|
gap: 1,
|
|
6660
6849
|
className: "relative rounded-[5px] bg-grey-100 p-1",
|
|
6661
6850
|
children: [
|
|
6662
|
-
/* @__PURE__ */ (0,
|
|
6851
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6663
6852
|
"div",
|
|
6664
6853
|
{
|
|
6665
6854
|
className: "absolute rounded-[5px] bg-blue-50 transition-all duration-300",
|
|
@@ -6675,7 +6864,7 @@ var IconTabs = ({
|
|
|
6675
6864
|
var _a2;
|
|
6676
6865
|
const disabled = disabledIndexes.includes(index);
|
|
6677
6866
|
const active = value === index;
|
|
6678
|
-
return /* @__PURE__ */ (0,
|
|
6867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
|
|
6679
6868
|
"button",
|
|
6680
6869
|
{
|
|
6681
6870
|
type: "button",
|
|
@@ -6692,14 +6881,14 @@ var IconTabs = ({
|
|
|
6692
6881
|
disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
6693
6882
|
),
|
|
6694
6883
|
children: [
|
|
6695
|
-
/* @__PURE__ */ (0,
|
|
6884
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6696
6885
|
"i",
|
|
6697
6886
|
{
|
|
6698
6887
|
className: `fa-${(_a2 = item.iconFamily) != null ? _a2 : "regular"} fa-${item.icon}`,
|
|
6699
6888
|
style: { fontSize: 16 }
|
|
6700
6889
|
}
|
|
6701
6890
|
),
|
|
6702
|
-
item.caption && /* @__PURE__ */ (0,
|
|
6891
|
+
item.caption && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
6703
6892
|
"span",
|
|
6704
6893
|
{
|
|
6705
6894
|
className: cn(
|
|
@@ -6717,14 +6906,14 @@ var IconTabs = ({
|
|
|
6717
6906
|
]
|
|
6718
6907
|
}
|
|
6719
6908
|
),
|
|
6720
|
-
((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0,
|
|
6909
|
+
((_a = items[value]) == null ? void 0 : _a.label) && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { className: "mt-2 text-center text-xs text-neutral-800", children: items[value].label })
|
|
6721
6910
|
] });
|
|
6722
6911
|
};
|
|
6723
6912
|
|
|
6724
6913
|
// src/ui/components/ui/Banner.tsx
|
|
6725
|
-
var
|
|
6726
|
-
var
|
|
6727
|
-
var bannerVariants = (0,
|
|
6914
|
+
var import_class_variance_authority16 = require("class-variance-authority");
|
|
6915
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
6916
|
+
var bannerVariants = (0, import_class_variance_authority16.cva)("rounded-[6px] px-4 py-2", {
|
|
6728
6917
|
variants: {
|
|
6729
6918
|
theme: {
|
|
6730
6919
|
"blue-700": "bg-blue-50 text-blue-900",
|
|
@@ -6780,14 +6969,14 @@ var Banner = ({
|
|
|
6780
6969
|
}) => {
|
|
6781
6970
|
const align = textAlignByJustify[justify];
|
|
6782
6971
|
const textClass = TEXT_CLASS2[theme != null ? theme : "blue-700"];
|
|
6783
|
-
const content = children ? children : message ? /* @__PURE__ */ (0,
|
|
6784
|
-
/* @__PURE__ */ (0,
|
|
6785
|
-
badge && /* @__PURE__ */ (0,
|
|
6786
|
-
title && /* @__PURE__ */ (0,
|
|
6972
|
+
const content = children ? children : message ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "s", align, className: textClass, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { column: true, align: justify, gap: 1, children: [
|
|
6973
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(Layout, { align: "center", gap: 2, children: [
|
|
6974
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Badge, { theme: theme != null ? theme : "blue-700", size: "m", children: badge }),
|
|
6975
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "s", weight: "bold", align, className: textClass, children: title })
|
|
6787
6976
|
] }),
|
|
6788
|
-
subtitle && /* @__PURE__ */ (0,
|
|
6977
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Text, { size: "xs", align, className: textClass, children: subtitle })
|
|
6789
6978
|
] });
|
|
6790
|
-
return /* @__PURE__ */ (0,
|
|
6979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
6791
6980
|
Layout,
|
|
6792
6981
|
{
|
|
6793
6982
|
role: "alert",
|
|
@@ -6798,15 +6987,15 @@ var Banner = ({
|
|
|
6798
6987
|
width,
|
|
6799
6988
|
className: cn(bannerVariants({ theme }), className),
|
|
6800
6989
|
children: [
|
|
6801
|
-
justify === "start" ? content : /* @__PURE__ */ (0,
|
|
6802
|
-
toggle ? /* @__PURE__ */ (0,
|
|
6990
|
+
justify === "start" ? content : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Layout, { flex: 1, justify, align: "center", gap: 2, wrap: true, children: content }),
|
|
6991
|
+
toggle ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
6803
6992
|
Switch,
|
|
6804
6993
|
{
|
|
6805
6994
|
checked: toggle.checked,
|
|
6806
6995
|
onChange: toggle.onChange,
|
|
6807
6996
|
disabled: toggle.disabled
|
|
6808
6997
|
}
|
|
6809
|
-
) : action && /* @__PURE__ */ (0,
|
|
6998
|
+
) : action && /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
|
|
6810
6999
|
Button,
|
|
6811
7000
|
{
|
|
6812
7001
|
variant: "outline",
|
|
@@ -6917,7 +7106,7 @@ var resolveArcPlacement = (request) => {
|
|
|
6917
7106
|
};
|
|
6918
7107
|
|
|
6919
7108
|
// src/ui/components/ui/FloatingButton.tsx
|
|
6920
|
-
var
|
|
7109
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
6921
7110
|
var readStoredOffset = (key) => {
|
|
6922
7111
|
if (!key || typeof window === "undefined") return { x: 0, y: 0 };
|
|
6923
7112
|
try {
|
|
@@ -7115,7 +7304,7 @@ var FloatingButton = ({
|
|
|
7115
7304
|
const { itemSize } = placement.geometry;
|
|
7116
7305
|
const translateX = offset.x + (isOpen ? placement.shift.x : 0);
|
|
7117
7306
|
const translateY = offset.y + (isOpen ? placement.shift.y : 0);
|
|
7118
|
-
return /* @__PURE__ */ (0,
|
|
7307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
7119
7308
|
"div",
|
|
7120
7309
|
{
|
|
7121
7310
|
ref: containerRef,
|
|
@@ -7133,7 +7322,7 @@ var FloatingButton = ({
|
|
|
7133
7322
|
actions.map((action, index) => {
|
|
7134
7323
|
var _a;
|
|
7135
7324
|
const itemOffset = arcOffset(index, actions.length, placement.geometry);
|
|
7136
|
-
return /* @__PURE__ */ (0,
|
|
7325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
7137
7326
|
"button",
|
|
7138
7327
|
{
|
|
7139
7328
|
type: "button",
|
|
@@ -7151,14 +7340,14 @@ var FloatingButton = ({
|
|
|
7151
7340
|
transform: isOpen ? `translate(${itemOffset.x}px, ${itemOffset.y}px)` : "scale(0.4)"
|
|
7152
7341
|
},
|
|
7153
7342
|
children: [
|
|
7154
|
-
/* @__PURE__ */ (0,
|
|
7155
|
-
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0,
|
|
7343
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: SUB_ICON[color], children: action.icon }),
|
|
7344
|
+
((_a = action.badge) != null ? _a : 0) > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.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 })
|
|
7156
7345
|
]
|
|
7157
7346
|
},
|
|
7158
7347
|
action.id
|
|
7159
7348
|
);
|
|
7160
7349
|
}),
|
|
7161
|
-
/* @__PURE__ */ (0,
|
|
7350
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
7162
7351
|
"button",
|
|
7163
7352
|
{
|
|
7164
7353
|
type: "button",
|
|
@@ -7175,8 +7364,8 @@ var FloatingButton = ({
|
|
|
7175
7364
|
touchAction: draggable ? "none" : void 0
|
|
7176
7365
|
},
|
|
7177
7366
|
children: [
|
|
7178
|
-
isOpen ? /* @__PURE__ */ (0,
|
|
7179
|
-
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0,
|
|
7367
|
+
isOpen ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(FaIcon, { name: "xmark", size: 20 }) : icon,
|
|
7368
|
+
!isOpen && mainBadge > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.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 })
|
|
7180
7369
|
]
|
|
7181
7370
|
}
|
|
7182
7371
|
)
|
|
@@ -7187,7 +7376,7 @@ var FloatingButton = ({
|
|
|
7187
7376
|
|
|
7188
7377
|
// src/ui/components/ui/ActivityFeedPanel.tsx
|
|
7189
7378
|
var import_react51 = require("react");
|
|
7190
|
-
var
|
|
7379
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
7191
7380
|
var PANEL_WIDTH = 500;
|
|
7192
7381
|
var PANEL_MAX_HEIGHT = 750;
|
|
7193
7382
|
var GAP = 8;
|
|
@@ -7254,7 +7443,7 @@ var ActivityFeedPanel = ({
|
|
|
7254
7443
|
return () => window.removeEventListener("resize", recompute);
|
|
7255
7444
|
}, [open, offset]);
|
|
7256
7445
|
if (!open) return null;
|
|
7257
|
-
return /* @__PURE__ */ (0,
|
|
7446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
7258
7447
|
Layout,
|
|
7259
7448
|
{
|
|
7260
7449
|
ref: panelRef,
|
|
@@ -7262,7 +7451,7 @@ var ActivityFeedPanel = ({
|
|
|
7262
7451
|
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)]",
|
|
7263
7452
|
style: __spreadProps(__spreadValues({}, placement), { maxHeight: PANEL_MAX_HEIGHT }),
|
|
7264
7453
|
children: [
|
|
7265
|
-
/* @__PURE__ */ (0,
|
|
7454
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
7266
7455
|
Layout,
|
|
7267
7456
|
{
|
|
7268
7457
|
align: "center",
|
|
@@ -7270,12 +7459,12 @@ var ActivityFeedPanel = ({
|
|
|
7270
7459
|
padding: 4,
|
|
7271
7460
|
className: "border-b border-grey-200",
|
|
7272
7461
|
children: [
|
|
7273
|
-
/* @__PURE__ */ (0,
|
|
7274
|
-
/* @__PURE__ */ (0,
|
|
7462
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(IconBadge, __spreadValues({ name: "bell", size: "m" }, PULSE_ICON_BADGE)),
|
|
7463
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "s", weight: "bold", children: title })
|
|
7275
7464
|
]
|
|
7276
7465
|
}
|
|
7277
7466
|
),
|
|
7278
|
-
/* @__PURE__ */ (0,
|
|
7467
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Layout, { column: true, fullWidth: true, style: { flex: "1 1 0%", minHeight: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7279
7468
|
"div",
|
|
7280
7469
|
{
|
|
7281
7470
|
style: {
|
|
@@ -7286,10 +7475,10 @@ var ActivityFeedPanel = ({
|
|
|
7286
7475
|
scrollbarWidth: "none"
|
|
7287
7476
|
},
|
|
7288
7477
|
className: "[&::-webkit-scrollbar]:hidden",
|
|
7289
|
-
children: /* @__PURE__ */ (0,
|
|
7290
|
-
isLoading && /* @__PURE__ */ (0,
|
|
7291
|
-
!isLoading && items.length === 0 && /* @__PURE__ */ (0,
|
|
7292
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
7478
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Layout, { column: true, padding: 2, gap: 1, fullWidth: true, children: [
|
|
7479
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Layout, { fullWidth: true, justify: "center", padding: 6, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Spinner, {}) }),
|
|
7480
|
+
!isLoading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "s", color: "grey-500", align: "center", className: "p-4", children: emptyMessage }),
|
|
7481
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
7293
7482
|
Layout,
|
|
7294
7483
|
{
|
|
7295
7484
|
gap: 3,
|
|
@@ -7297,7 +7486,7 @@ var ActivityFeedPanel = ({
|
|
|
7297
7486
|
className: "cursor-pointer items-start rounded-[8px] p-2 hover:bg-grey-100",
|
|
7298
7487
|
onClick: item.onClick,
|
|
7299
7488
|
children: [
|
|
7300
|
-
/* @__PURE__ */ (0,
|
|
7489
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
7301
7490
|
IconBadge,
|
|
7302
7491
|
{
|
|
7303
7492
|
name: item.icon,
|
|
@@ -7306,9 +7495,9 @@ var ActivityFeedPanel = ({
|
|
|
7306
7495
|
iconColor: item.iconColor
|
|
7307
7496
|
}
|
|
7308
7497
|
),
|
|
7309
|
-
/* @__PURE__ */ (0,
|
|
7310
|
-
/* @__PURE__ */ (0,
|
|
7311
|
-
/* @__PURE__ */ (0,
|
|
7498
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Layout, { column: true, gap: 0.5, className: "min-w-0 flex-1", children: [
|
|
7499
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "xs", children: item.text }),
|
|
7500
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Text, { size: "xxs", color: "grey-500", children: item.timeLabel })
|
|
7312
7501
|
] })
|
|
7313
7502
|
]
|
|
7314
7503
|
},
|
|
@@ -7323,7 +7512,7 @@ var ActivityFeedPanel = ({
|
|
|
7323
7512
|
};
|
|
7324
7513
|
|
|
7325
7514
|
// src/ui/components/ui/MetricCard.tsx
|
|
7326
|
-
var
|
|
7515
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
7327
7516
|
var ICON_WRAP_CLASS = {
|
|
7328
7517
|
"blue-700": "bg-blue-50 text-blue-700",
|
|
7329
7518
|
"blue-900": "bg-blue-50 text-blue-900",
|
|
@@ -7352,7 +7541,7 @@ var MetricCard = ({
|
|
|
7352
7541
|
selected = false,
|
|
7353
7542
|
children,
|
|
7354
7543
|
className
|
|
7355
|
-
}) => /* @__PURE__ */ (0,
|
|
7544
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7356
7545
|
"div",
|
|
7357
7546
|
{
|
|
7358
7547
|
onClick,
|
|
@@ -7362,25 +7551,25 @@ var MetricCard = ({
|
|
|
7362
7551
|
selected && "border-blue-700",
|
|
7363
7552
|
className
|
|
7364
7553
|
),
|
|
7365
|
-
children: /* @__PURE__ */ (0,
|
|
7366
|
-
/* @__PURE__ */ (0,
|
|
7554
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { align: "center", gap: 3, fullWidth: true, children: [
|
|
7555
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
7367
7556
|
"span",
|
|
7368
7557
|
{
|
|
7369
7558
|
className: cn(
|
|
7370
7559
|
"flex h-9 w-9 shrink-0 items-center justify-center rounded-full",
|
|
7371
7560
|
ICON_WRAP_CLASS[accent]
|
|
7372
7561
|
),
|
|
7373
|
-
children: /* @__PURE__ */ (0,
|
|
7562
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("i", { className: `fa-${iconFamily} fa-${icon}`, style: { fontSize: 18 } })
|
|
7374
7563
|
}
|
|
7375
7564
|
),
|
|
7376
|
-
children ? children : layout === "row" ? /* @__PURE__ */ (0,
|
|
7377
|
-
/* @__PURE__ */ (0,
|
|
7378
|
-
/* @__PURE__ */ (0,
|
|
7379
|
-
] }) : /* @__PURE__ */ (0,
|
|
7380
|
-
/* @__PURE__ */ (0,
|
|
7381
|
-
/* @__PURE__ */ (0,
|
|
7382
|
-
/* @__PURE__ */ (0,
|
|
7383
|
-
subtitle && /* @__PURE__ */ (0,
|
|
7565
|
+
children ? children : layout === "row" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { align: "center", gap: 1, children: [
|
|
7566
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
|
|
7567
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", color: "grey-600", children: title })
|
|
7568
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { column: true, gap: 1, children: [
|
|
7569
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", color: "grey-600", children: title }),
|
|
7570
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(Layout, { align: "baseline", gap: 1, children: [
|
|
7571
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "s", weight: "bold", color: valueColor, children: value }),
|
|
7572
|
+
subtitle && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Text, { size: "xs", color: "grey-600", children: subtitle })
|
|
7384
7573
|
] })
|
|
7385
7574
|
] })
|
|
7386
7575
|
] })
|
|
@@ -7388,7 +7577,7 @@ var MetricCard = ({
|
|
|
7388
7577
|
);
|
|
7389
7578
|
|
|
7390
7579
|
// src/ui/components/ui/Tile.tsx
|
|
7391
|
-
var
|
|
7580
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
7392
7581
|
var Tile = ({
|
|
7393
7582
|
children,
|
|
7394
7583
|
onClick,
|
|
@@ -7398,7 +7587,7 @@ var Tile = ({
|
|
|
7398
7587
|
className
|
|
7399
7588
|
}) => {
|
|
7400
7589
|
const isOutline = variant === "outline";
|
|
7401
|
-
return /* @__PURE__ */ (0,
|
|
7590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
7402
7591
|
"div",
|
|
7403
7592
|
{
|
|
7404
7593
|
className: cn(
|
|
@@ -7409,7 +7598,7 @@ var Tile = ({
|
|
|
7409
7598
|
className
|
|
7410
7599
|
),
|
|
7411
7600
|
children: [
|
|
7412
|
-
onClick ? /* @__PURE__ */ (0,
|
|
7601
|
+
onClick ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
7413
7602
|
"button",
|
|
7414
7603
|
{
|
|
7415
7604
|
type: "button",
|
|
@@ -7422,7 +7611,7 @@ var Tile = ({
|
|
|
7422
7611
|
children
|
|
7423
7612
|
}
|
|
7424
7613
|
) : children,
|
|
7425
|
-
expandedContent && /* @__PURE__ */ (0,
|
|
7614
|
+
expandedContent && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
|
|
7426
7615
|
]
|
|
7427
7616
|
}
|
|
7428
7617
|
);
|
|
@@ -7577,16 +7766,16 @@ var formatName = (person, fallback = "") => {
|
|
|
7577
7766
|
};
|
|
7578
7767
|
|
|
7579
7768
|
// src/ui/components/ui/history/HistoryChangeRow.tsx
|
|
7580
|
-
var
|
|
7769
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
7581
7770
|
var HistoryChangeRow = ({ change }) => {
|
|
7582
7771
|
const { label, previousValue, nextValue, href, onClick } = change;
|
|
7583
7772
|
const hasValues = Boolean(previousValue || nextValue);
|
|
7584
|
-
return /* @__PURE__ */ (0,
|
|
7585
|
-
/* @__PURE__ */ (0,
|
|
7586
|
-
previousValue && /* @__PURE__ */ (0,
|
|
7587
|
-
previousValue && nextValue && /* @__PURE__ */ (0,
|
|
7588
|
-
nextValue && href && /* @__PURE__ */ (0,
|
|
7589
|
-
nextValue && onClick && /* @__PURE__ */ (0,
|
|
7773
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(Layout, { align: "center", gap: 1.5, wrap: true, children: [
|
|
7774
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
|
|
7775
|
+
previousValue && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "xs", color: "grey-600", children: previousValue }),
|
|
7776
|
+
previousValue && nextValue && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
|
|
7777
|
+
nextValue && href && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Link, { href, newTab: true, size: "xs", children: nextValue }),
|
|
7778
|
+
nextValue && onClick && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
7590
7779
|
"button",
|
|
7591
7780
|
{
|
|
7592
7781
|
type: "button",
|
|
@@ -7598,27 +7787,27 @@ var HistoryChangeRow = ({ change }) => {
|
|
|
7598
7787
|
children: nextValue
|
|
7599
7788
|
}
|
|
7600
7789
|
),
|
|
7601
|
-
nextValue && !href && !onClick && /* @__PURE__ */ (0,
|
|
7790
|
+
nextValue && !href && !onClick && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Text, { size: "xs", weight: "semibold", children: nextValue })
|
|
7602
7791
|
] });
|
|
7603
7792
|
};
|
|
7604
7793
|
|
|
7605
7794
|
// src/ui/components/ui/history/HistoryEntryCard.tsx
|
|
7606
|
-
var
|
|
7795
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
7607
7796
|
var CARD_CLASS = "group rounded-lg border border-grey-300 bg-white";
|
|
7608
7797
|
var HistoryEntryCard = ({ entry }) => {
|
|
7609
7798
|
const { title, date, author, badge, changes = [] } = entry;
|
|
7610
7799
|
const hasChanges = changes.length > 0;
|
|
7611
|
-
const summary = /* @__PURE__ */ (0,
|
|
7612
|
-
/* @__PURE__ */ (0,
|
|
7613
|
-
/* @__PURE__ */ (0,
|
|
7614
|
-
author && /* @__PURE__ */ (0,
|
|
7615
|
-
/* @__PURE__ */ (0,
|
|
7616
|
-
/* @__PURE__ */ (0,
|
|
7800
|
+
const summary = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { column: true, gap: 1, fullWidth: true, children: [
|
|
7801
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
|
|
7802
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
|
|
7803
|
+
author && /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_jsx_runtime98.Fragment, { children: [
|
|
7804
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
|
|
7805
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
|
|
7617
7806
|
] }),
|
|
7618
|
-
badge && /* @__PURE__ */ (0,
|
|
7807
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Badge, { theme: badge.theme, size: "s", children: badge.label })
|
|
7619
7808
|
] }),
|
|
7620
|
-
/* @__PURE__ */ (0,
|
|
7621
|
-
date && /* @__PURE__ */ (0,
|
|
7809
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
|
|
7810
|
+
date && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7622
7811
|
Text,
|
|
7623
7812
|
{
|
|
7624
7813
|
size: "xxs",
|
|
@@ -7628,7 +7817,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
7628
7817
|
children: formatDate(date, "dateTime", "fr")
|
|
7629
7818
|
}
|
|
7630
7819
|
),
|
|
7631
|
-
hasChanges && /* @__PURE__ */ (0,
|
|
7820
|
+
hasChanges && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7632
7821
|
Icon,
|
|
7633
7822
|
{
|
|
7634
7823
|
name: "chevron-down",
|
|
@@ -7639,14 +7828,14 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
7639
7828
|
)
|
|
7640
7829
|
] })
|
|
7641
7830
|
] }),
|
|
7642
|
-
title && /* @__PURE__ */ (0,
|
|
7831
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
|
|
7643
7832
|
] });
|
|
7644
7833
|
if (!hasChanges) {
|
|
7645
|
-
return /* @__PURE__ */ (0,
|
|
7834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: `${CARD_CLASS} p-3`, children: summary });
|
|
7646
7835
|
}
|
|
7647
|
-
return /* @__PURE__ */ (0,
|
|
7648
|
-
/* @__PURE__ */ (0,
|
|
7649
|
-
/* @__PURE__ */ (0,
|
|
7836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(Collapsible, { className: CARD_CLASS, children: [
|
|
7837
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
|
|
7838
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(CollapsibleContent, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7650
7839
|
Layout,
|
|
7651
7840
|
{
|
|
7652
7841
|
column: true,
|
|
@@ -7654,7 +7843,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
7654
7843
|
paddingX: 3,
|
|
7655
7844
|
paddingBottom: 3,
|
|
7656
7845
|
className: author ? "pl-[64px]" : void 0,
|
|
7657
|
-
children: changes.map((change, index) => /* @__PURE__ */ (0,
|
|
7846
|
+
children: changes.map((change, index) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
7658
7847
|
HistoryChangeRow,
|
|
7659
7848
|
{
|
|
7660
7849
|
change
|
|
@@ -7667,7 +7856,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
7667
7856
|
};
|
|
7668
7857
|
|
|
7669
7858
|
// src/ui/components/ui/history/HistoryList.tsx
|
|
7670
|
-
var
|
|
7859
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
7671
7860
|
var SKELETON_COUNT = 4;
|
|
7672
7861
|
var HistoryList = ({
|
|
7673
7862
|
entries,
|
|
@@ -7679,8 +7868,8 @@ var HistoryList = ({
|
|
|
7679
7868
|
emptyLabel = "Aucun historique",
|
|
7680
7869
|
emptyDescription = "Aucune action enregistr\xE9e pour le moment.",
|
|
7681
7870
|
notice
|
|
7682
|
-
}) => /* @__PURE__ */ (0,
|
|
7683
|
-
filters.length > 0 && /* @__PURE__ */ (0,
|
|
7871
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
|
|
7872
|
+
filters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7684
7873
|
TagBubble,
|
|
7685
7874
|
{
|
|
7686
7875
|
label: filter.label,
|
|
@@ -7691,22 +7880,22 @@ var HistoryList = ({
|
|
|
7691
7880
|
},
|
|
7692
7881
|
filter.value
|
|
7693
7882
|
)) }),
|
|
7694
|
-
isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0,
|
|
7695
|
-
!isLoading && isError && /* @__PURE__ */ (0,
|
|
7696
|
-
!isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0,
|
|
7883
|
+
isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Skeleton, { height: "72px" }, index)),
|
|
7884
|
+
!isLoading && isError && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
|
|
7885
|
+
!isLoading && !isError && entries.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
7697
7886
|
EmptyState,
|
|
7698
7887
|
{
|
|
7699
|
-
icon: /* @__PURE__ */ (0,
|
|
7888
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FaIcon, { name: "clock-rotate-left", size: 20 }),
|
|
7700
7889
|
title: emptyLabel,
|
|
7701
7890
|
description: emptyDescription
|
|
7702
7891
|
}
|
|
7703
7892
|
),
|
|
7704
|
-
!isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0,
|
|
7705
|
-
!isLoading && !isError && notice && /* @__PURE__ */ (0,
|
|
7893
|
+
!isLoading && !isError && entries.map((entry) => /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(HistoryEntryCard, { entry }, entry.id)),
|
|
7894
|
+
!isLoading && !isError && notice && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
|
|
7706
7895
|
] });
|
|
7707
7896
|
|
|
7708
7897
|
// src/ui/components/ui/history/HistoryDrawer.tsx
|
|
7709
|
-
var
|
|
7898
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
7710
7899
|
var HistoryDrawer = (_a) => {
|
|
7711
7900
|
var _b = _a, {
|
|
7712
7901
|
open,
|
|
@@ -7717,7 +7906,7 @@ var HistoryDrawer = (_a) => {
|
|
|
7717
7906
|
"onClose",
|
|
7718
7907
|
"title"
|
|
7719
7908
|
]);
|
|
7720
|
-
return /* @__PURE__ */ (0,
|
|
7909
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
7721
7910
|
Drawer,
|
|
7722
7911
|
{
|
|
7723
7912
|
open,
|
|
@@ -7725,9 +7914,9 @@ var HistoryDrawer = (_a) => {
|
|
|
7725
7914
|
className: "z-[1060]",
|
|
7726
7915
|
overlayClassName: "z-[1050]",
|
|
7727
7916
|
children: [
|
|
7728
|
-
/* @__PURE__ */ (0,
|
|
7729
|
-
/* @__PURE__ */ (0,
|
|
7730
|
-
/* @__PURE__ */ (0,
|
|
7917
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(DrawerHeader, { children: [
|
|
7918
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DrawerTitle, { className: "uppercase", children: title }),
|
|
7919
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
7731
7920
|
Icon,
|
|
7732
7921
|
{
|
|
7733
7922
|
name: "xmark",
|
|
@@ -7737,7 +7926,7 @@ var HistoryDrawer = (_a) => {
|
|
|
7737
7926
|
}
|
|
7738
7927
|
) })
|
|
7739
7928
|
] }),
|
|
7740
|
-
/* @__PURE__ */ (0,
|
|
7929
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(HistoryList, __spreadValues({}, listProps)) })
|
|
7741
7930
|
]
|
|
7742
7931
|
}
|
|
7743
7932
|
);
|
|
@@ -7745,7 +7934,7 @@ var HistoryDrawer = (_a) => {
|
|
|
7745
7934
|
|
|
7746
7935
|
// src/ui/components/ui/history/HistoryButton.tsx
|
|
7747
7936
|
var import_react52 = require("react");
|
|
7748
|
-
var
|
|
7937
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
7749
7938
|
var LABEL = "Historique";
|
|
7750
7939
|
var SHORT_TOOLTIP = "Voir l\u2019historique des actions";
|
|
7751
7940
|
var HistoryButton = (_a) => {
|
|
@@ -7766,10 +7955,10 @@ var HistoryButton = (_a) => {
|
|
|
7766
7955
|
onOpenChange == null ? void 0 : onOpenChange(nextIsOpen);
|
|
7767
7956
|
};
|
|
7768
7957
|
const open = () => changeOpen(true);
|
|
7769
|
-
const icon = /* @__PURE__ */ (0,
|
|
7770
|
-
return /* @__PURE__ */ (0,
|
|
7771
|
-
variant === "icon" ? /* @__PURE__ */ (0,
|
|
7772
|
-
/* @__PURE__ */ (0,
|
|
7958
|
+
const icon = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(FaIcon, { name: "clock-rotate-left", size: 14 });
|
|
7959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, { children: [
|
|
7960
|
+
variant === "icon" ? /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Button, { label: LABEL, iconLeft: icon, onClick: open }),
|
|
7961
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
7773
7962
|
HistoryDrawer,
|
|
7774
7963
|
__spreadValues({
|
|
7775
7964
|
open: isOpen,
|
|
@@ -7781,7 +7970,7 @@ var HistoryButton = (_a) => {
|
|
|
7781
7970
|
};
|
|
7782
7971
|
|
|
7783
7972
|
// src/ui/components/ui/Gantt.tsx
|
|
7784
|
-
var
|
|
7973
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
7785
7974
|
var Gantt = ({
|
|
7786
7975
|
days,
|
|
7787
7976
|
rows,
|
|
@@ -7797,7 +7986,7 @@ var Gantt = ({
|
|
|
7797
7986
|
const bodyHeight = rows.length * rowHeight;
|
|
7798
7987
|
const clickable = Boolean(onRowClick);
|
|
7799
7988
|
const gridCols = { gridTemplateColumns: `${labelWidth}px minmax(0, 1fr)` };
|
|
7800
|
-
return /* @__PURE__ */ (0,
|
|
7989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
7801
7990
|
"div",
|
|
7802
7991
|
{
|
|
7803
7992
|
className: cn(
|
|
@@ -7805,13 +7994,13 @@ var Gantt = ({
|
|
|
7805
7994
|
className
|
|
7806
7995
|
),
|
|
7807
7996
|
children: [
|
|
7808
|
-
/* @__PURE__ */ (0,
|
|
7997
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
7809
7998
|
"div",
|
|
7810
7999
|
{
|
|
7811
8000
|
className: "grid border-b border-grey-300 bg-grey-100",
|
|
7812
8001
|
style: gridCols,
|
|
7813
8002
|
children: [
|
|
7814
|
-
/* @__PURE__ */ (0,
|
|
8003
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7815
8004
|
Layout,
|
|
7816
8005
|
{
|
|
7817
8006
|
align: "center",
|
|
@@ -7819,7 +8008,7 @@ var Gantt = ({
|
|
|
7819
8008
|
children: labelHeader
|
|
7820
8009
|
}
|
|
7821
8010
|
),
|
|
7822
|
-
/* @__PURE__ */ (0,
|
|
8011
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7823
8012
|
Layout,
|
|
7824
8013
|
{
|
|
7825
8014
|
fullHeight: true,
|
|
@@ -7833,13 +8022,13 @@ var Gantt = ({
|
|
|
7833
8022
|
]
|
|
7834
8023
|
}
|
|
7835
8024
|
),
|
|
7836
|
-
/* @__PURE__ */ (0,
|
|
8025
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(
|
|
7837
8026
|
"div",
|
|
7838
8027
|
{
|
|
7839
8028
|
className: "grid overflow-y-auto overflow-x-hidden",
|
|
7840
8029
|
style: __spreadProps(__spreadValues({}, gridCols), { maxHeight }),
|
|
7841
8030
|
children: [
|
|
7842
|
-
/* @__PURE__ */ (0,
|
|
8031
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7843
8032
|
Layout,
|
|
7844
8033
|
{
|
|
7845
8034
|
column: true,
|
|
@@ -7856,8 +8045,8 @@ var Gantt = ({
|
|
|
7856
8045
|
},
|
|
7857
8046
|
row.key
|
|
7858
8047
|
)) }),
|
|
7859
|
-
/* @__PURE__ */ (0,
|
|
7860
|
-
days.map((day, i) => /* @__PURE__ */ (0,
|
|
8048
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
|
|
8049
|
+
days.map((day, i) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7861
8050
|
"div",
|
|
7862
8051
|
{
|
|
7863
8052
|
className: cn(
|
|
@@ -7868,7 +8057,7 @@ var Gantt = ({
|
|
|
7868
8057
|
},
|
|
7869
8058
|
day.key
|
|
7870
8059
|
)),
|
|
7871
|
-
bands.map((band) => /* @__PURE__ */ (0,
|
|
8060
|
+
bands.map((band) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7872
8061
|
"div",
|
|
7873
8062
|
{
|
|
7874
8063
|
title: band.title,
|
|
@@ -7879,7 +8068,7 @@ var Gantt = ({
|
|
|
7879
8068
|
)),
|
|
7880
8069
|
rows.map((row, i) => {
|
|
7881
8070
|
var _a, _b, _c;
|
|
7882
|
-
return /* @__PURE__ */ (0,
|
|
8071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7883
8072
|
"div",
|
|
7884
8073
|
{
|
|
7885
8074
|
className: cn(
|
|
@@ -7887,7 +8076,7 @@ var Gantt = ({
|
|
|
7887
8076
|
i === 0 ? "border-t-0" : "border-t border-grey-200"
|
|
7888
8077
|
),
|
|
7889
8078
|
style: { top: i * rowHeight, height: rowHeight },
|
|
7890
|
-
children: row.bar && /* @__PURE__ */ (0,
|
|
8079
|
+
children: row.bar && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7891
8080
|
Layout,
|
|
7892
8081
|
{
|
|
7893
8082
|
align: "center",
|
|
@@ -7902,7 +8091,7 @@ var Gantt = ({
|
|
|
7902
8091
|
background: row.bar.color,
|
|
7903
8092
|
borderColor: row.bar.color
|
|
7904
8093
|
},
|
|
7905
|
-
children: row.bar.label && /* @__PURE__ */ (0,
|
|
8094
|
+
children: row.bar.label && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7906
8095
|
"span",
|
|
7907
8096
|
{
|
|
7908
8097
|
className: "overflow-hidden text-ellipsis whitespace-nowrap text-[10px] font-semibold",
|
|
@@ -7924,7 +8113,7 @@ var Gantt = ({
|
|
|
7924
8113
|
}
|
|
7925
8114
|
);
|
|
7926
8115
|
};
|
|
7927
|
-
var GanttDot = ({ color }) => /* @__PURE__ */ (0,
|
|
8116
|
+
var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7928
8117
|
"span",
|
|
7929
8118
|
{
|
|
7930
8119
|
className: "inline-block h-[9px] w-[9px] shrink-0 rounded-[3px]",
|
|
@@ -7934,7 +8123,7 @@ var GanttDot = ({ color }) => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
|
7934
8123
|
var GanttSwatch = ({
|
|
7935
8124
|
color,
|
|
7936
8125
|
filled = true
|
|
7937
|
-
}) => /* @__PURE__ */ (0,
|
|
8126
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7938
8127
|
"span",
|
|
7939
8128
|
{
|
|
7940
8129
|
className: "box-border inline-block h-3 w-[18px] shrink-0 rounded-[3px] border-[1.5px]",
|
|
@@ -7943,7 +8132,7 @@ var GanttSwatch = ({
|
|
|
7943
8132
|
);
|
|
7944
8133
|
|
|
7945
8134
|
// src/ui/components/ui/Timeline.tsx
|
|
7946
|
-
var
|
|
8135
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
7947
8136
|
var Timeline = ({
|
|
7948
8137
|
items,
|
|
7949
8138
|
lineColor = "#F1F5F9",
|
|
@@ -7951,22 +8140,22 @@ var Timeline = ({
|
|
|
7951
8140
|
className
|
|
7952
8141
|
}) => {
|
|
7953
8142
|
if (items.length === 0) {
|
|
7954
|
-
return /* @__PURE__ */ (0,
|
|
8143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { size: "s", color: "grey-600", children: emptyLabel });
|
|
7955
8144
|
}
|
|
7956
|
-
return /* @__PURE__ */ (0,
|
|
8145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Layout, { column: true, className, children: items.map((item, index) => {
|
|
7957
8146
|
var _a;
|
|
7958
8147
|
const isLast = index === items.length - 1;
|
|
7959
8148
|
const dotColor = (_a = item.color) != null ? _a : "#377EA1";
|
|
7960
|
-
return /* @__PURE__ */ (0,
|
|
7961
|
-
/* @__PURE__ */ (0,
|
|
7962
|
-
/* @__PURE__ */ (0,
|
|
8149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Layout, { gap: 3, children: [
|
|
8150
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Layout, { column: true, align: "center", className: "w-4", children: [
|
|
8151
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7963
8152
|
"span",
|
|
7964
8153
|
{
|
|
7965
8154
|
className: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
|
|
7966
8155
|
style: { background: dotColor }
|
|
7967
8156
|
}
|
|
7968
8157
|
),
|
|
7969
|
-
!isLast && /* @__PURE__ */ (0,
|
|
8158
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
7970
8159
|
"span",
|
|
7971
8160
|
{
|
|
7972
8161
|
className: "w-0.5 flex-1 min-h-[16px]",
|
|
@@ -7974,10 +8163,10 @@ var Timeline = ({
|
|
|
7974
8163
|
}
|
|
7975
8164
|
)
|
|
7976
8165
|
] }),
|
|
7977
|
-
/* @__PURE__ */ (0,
|
|
7978
|
-
/* @__PURE__ */ (0,
|
|
7979
|
-
item.subtitle && /* @__PURE__ */ (0,
|
|
7980
|
-
item.description && /* @__PURE__ */ (0,
|
|
8166
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
|
|
8167
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
|
|
8168
|
+
item.subtitle && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
|
|
8169
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "text-xs italic text-neutral-800", children: item.description })
|
|
7981
8170
|
] })
|
|
7982
8171
|
] }, item.id);
|
|
7983
8172
|
}) });
|
|
@@ -7985,9 +8174,9 @@ var Timeline = ({
|
|
|
7985
8174
|
|
|
7986
8175
|
// src/ui/components/ui/ColorPicker.tsx
|
|
7987
8176
|
var import_react53 = require("react");
|
|
7988
|
-
var
|
|
7989
|
-
var
|
|
7990
|
-
var swatchVariants = (0,
|
|
8177
|
+
var import_class_variance_authority17 = require("class-variance-authority");
|
|
8178
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
8179
|
+
var swatchVariants = (0, import_class_variance_authority17.cva)(
|
|
7991
8180
|
"inline-flex shrink-0 overflow-hidden rounded-[6px] border border-grey-300",
|
|
7992
8181
|
{
|
|
7993
8182
|
variants: {
|
|
@@ -8000,7 +8189,7 @@ var swatchVariants = (0, import_class_variance_authority16.cva)(
|
|
|
8000
8189
|
defaultVariants: { size: "m" }
|
|
8001
8190
|
}
|
|
8002
8191
|
);
|
|
8003
|
-
var inputVariants = (0,
|
|
8192
|
+
var inputVariants = (0, import_class_variance_authority17.cva)(
|
|
8004
8193
|
"min-w-0 flex-1 rounded-[6px] border border-grey-300 bg-white font-mono uppercase text-grey-600 outline-none transition-colors focus:border-blue-700 disabled:cursor-not-allowed disabled:bg-grey-100",
|
|
8005
8194
|
{
|
|
8006
8195
|
variants: {
|
|
@@ -8030,7 +8219,7 @@ var ColorPicker = (0, import_react53.forwardRef)(
|
|
|
8030
8219
|
if (value === void 0) setInternalColor(next);
|
|
8031
8220
|
onChange == null ? void 0 : onChange(next);
|
|
8032
8221
|
};
|
|
8033
|
-
return /* @__PURE__ */ (0,
|
|
8222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
8034
8223
|
Layout,
|
|
8035
8224
|
{
|
|
8036
8225
|
column: true,
|
|
@@ -8038,21 +8227,21 @@ var ColorPicker = (0, import_react53.forwardRef)(
|
|
|
8038
8227
|
gap: 1.5,
|
|
8039
8228
|
className: cn(disabled && "opacity-60", className),
|
|
8040
8229
|
children: [
|
|
8041
|
-
label && /* @__PURE__ */ (0,
|
|
8042
|
-
/* @__PURE__ */ (0,
|
|
8043
|
-
/* @__PURE__ */ (0,
|
|
8230
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
|
|
8231
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(Layout, { gap: 2, children: [
|
|
8232
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8044
8233
|
"label",
|
|
8045
8234
|
{
|
|
8046
8235
|
className: cn(
|
|
8047
8236
|
swatchVariants({ size }),
|
|
8048
8237
|
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
8049
8238
|
),
|
|
8050
|
-
children: /* @__PURE__ */ (0,
|
|
8239
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8051
8240
|
"span",
|
|
8052
8241
|
{
|
|
8053
8242
|
className: "relative block h-full w-full",
|
|
8054
8243
|
style: { backgroundColor: currentColor },
|
|
8055
|
-
children: /* @__PURE__ */ (0,
|
|
8244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8056
8245
|
"input",
|
|
8057
8246
|
{
|
|
8058
8247
|
ref,
|
|
@@ -8067,7 +8256,7 @@ var ColorPicker = (0, import_react53.forwardRef)(
|
|
|
8067
8256
|
)
|
|
8068
8257
|
}
|
|
8069
8258
|
),
|
|
8070
|
-
/* @__PURE__ */ (0,
|
|
8259
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
8071
8260
|
"input",
|
|
8072
8261
|
__spreadProps(__spreadValues({
|
|
8073
8262
|
type: "text",
|
|
@@ -8107,7 +8296,7 @@ var COLOR_TOKENS = [
|
|
|
8107
8296
|
];
|
|
8108
8297
|
|
|
8109
8298
|
// src/ui/components/ui/ColorTokenPicker.tsx
|
|
8110
|
-
var
|
|
8299
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
8111
8300
|
var SWATCH_CLASS = {
|
|
8112
8301
|
"blue-700": "bg-blue-700",
|
|
8113
8302
|
"blue-900": "bg-blue-900",
|
|
@@ -8129,13 +8318,13 @@ var ColorTokenPicker = ({
|
|
|
8129
8318
|
disabled = false
|
|
8130
8319
|
}) => {
|
|
8131
8320
|
const [open, setOpen] = (0, import_react54.useState)(false);
|
|
8132
|
-
return /* @__PURE__ */ (0,
|
|
8321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8133
8322
|
Popover,
|
|
8134
8323
|
{
|
|
8135
8324
|
open,
|
|
8136
8325
|
onOpenChange: disabled ? void 0 : setOpen,
|
|
8137
8326
|
align: "start",
|
|
8138
|
-
trigger: /* @__PURE__ */ (0,
|
|
8327
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8139
8328
|
"button",
|
|
8140
8329
|
{
|
|
8141
8330
|
type: "button",
|
|
@@ -8146,7 +8335,7 @@ var ColorTokenPicker = ({
|
|
|
8146
8335
|
"focus-visible:ring-2 focus-visible:ring-blue-200",
|
|
8147
8336
|
disabled && "cursor-not-allowed opacity-50"
|
|
8148
8337
|
),
|
|
8149
|
-
children: /* @__PURE__ */ (0,
|
|
8338
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8150
8339
|
"span",
|
|
8151
8340
|
{
|
|
8152
8341
|
className: cn(
|
|
@@ -8157,7 +8346,7 @@ var ColorTokenPicker = ({
|
|
|
8157
8346
|
)
|
|
8158
8347
|
}
|
|
8159
8348
|
),
|
|
8160
|
-
children: /* @__PURE__ */ (0,
|
|
8349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Layout, { wrap: true, gap: 2, className: "w-[168px] p-1", children: COLOR_TOKENS.map((token) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
8161
8350
|
"button",
|
|
8162
8351
|
{
|
|
8163
8352
|
type: "button",
|
|
@@ -8181,7 +8370,7 @@ var ColorTokenPicker = ({
|
|
|
8181
8370
|
|
|
8182
8371
|
// src/ui/components/ui/FileUploadZone.tsx
|
|
8183
8372
|
var import_react55 = require("react");
|
|
8184
|
-
var
|
|
8373
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
8185
8374
|
var ACCEPT_MAP = {
|
|
8186
8375
|
png: "image/png",
|
|
8187
8376
|
jpg: "image/jpeg",
|
|
@@ -8309,7 +8498,7 @@ var FileUploadZone = ({
|
|
|
8309
8498
|
onRemove == null ? void 0 : onRemove();
|
|
8310
8499
|
};
|
|
8311
8500
|
if (previewUrl) {
|
|
8312
|
-
return /* @__PURE__ */ (0,
|
|
8501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
8313
8502
|
Layout,
|
|
8314
8503
|
{
|
|
8315
8504
|
column: true,
|
|
@@ -8321,14 +8510,14 @@ var FileUploadZone = ({
|
|
|
8321
8510
|
className
|
|
8322
8511
|
),
|
|
8323
8512
|
children: [
|
|
8324
|
-
fileType && isPdf(fileType) ? /* @__PURE__ */ (0,
|
|
8513
|
+
fileType && isPdf(fileType) ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8325
8514
|
"embed",
|
|
8326
8515
|
{
|
|
8327
8516
|
src: previewUrl,
|
|
8328
8517
|
type: "application/pdf",
|
|
8329
8518
|
className: "h-[500px] w-full rounded"
|
|
8330
8519
|
}
|
|
8331
|
-
) : /* @__PURE__ */ (0,
|
|
8520
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8332
8521
|
"img",
|
|
8333
8522
|
{
|
|
8334
8523
|
src: previewUrl,
|
|
@@ -8336,13 +8525,13 @@ var FileUploadZone = ({
|
|
|
8336
8525
|
className: "max-h-[400px] max-w-full rounded object-contain"
|
|
8337
8526
|
}
|
|
8338
8527
|
),
|
|
8339
|
-
/* @__PURE__ */ (0,
|
|
8528
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8340
8529
|
Button,
|
|
8341
8530
|
{
|
|
8342
8531
|
label: "Supprimer",
|
|
8343
8532
|
theme: "red-900",
|
|
8344
8533
|
size: "s",
|
|
8345
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
8534
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FaIcon, { name: "trash", size: 14 }),
|
|
8346
8535
|
onClick: handleRemove
|
|
8347
8536
|
}
|
|
8348
8537
|
)
|
|
@@ -8351,14 +8540,14 @@ var FileUploadZone = ({
|
|
|
8351
8540
|
);
|
|
8352
8541
|
}
|
|
8353
8542
|
const showBrowse = !compact && browseLabel !== false;
|
|
8354
|
-
return /* @__PURE__ */ (0,
|
|
8543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
8355
8544
|
Layout,
|
|
8356
8545
|
{
|
|
8357
8546
|
column: true,
|
|
8358
8547
|
gap: 1,
|
|
8359
8548
|
className: cn(fullWidth ? "w-full" : "w-fit", className),
|
|
8360
8549
|
children: [
|
|
8361
|
-
/* @__PURE__ */ (0,
|
|
8550
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
8362
8551
|
"label",
|
|
8363
8552
|
{
|
|
8364
8553
|
onDragOver: handleDragOver,
|
|
@@ -8372,7 +8561,7 @@ var FileUploadZone = ({
|
|
|
8372
8561
|
isDragging ? "border-solid border-blue-100 bg-blue-50" : cn(compact ? "border-grey-300" : "border-blue-50", "bg-grey-100")
|
|
8373
8562
|
),
|
|
8374
8563
|
children: [
|
|
8375
|
-
/* @__PURE__ */ (0,
|
|
8564
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8376
8565
|
"input",
|
|
8377
8566
|
{
|
|
8378
8567
|
ref: inputRef,
|
|
@@ -8384,11 +8573,11 @@ var FileUploadZone = ({
|
|
|
8384
8573
|
className: "hidden"
|
|
8385
8574
|
}
|
|
8386
8575
|
),
|
|
8387
|
-
showIcon && /* @__PURE__ */ (0,
|
|
8388
|
-
/* @__PURE__ */ (0,
|
|
8389
|
-
showBrowse && /* @__PURE__ */ (0,
|
|
8390
|
-
/* @__PURE__ */ (0,
|
|
8391
|
-
/* @__PURE__ */ (0,
|
|
8576
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
|
|
8577
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-center text-sm text-grey-600", children: label }),
|
|
8578
|
+
showBrowse && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
|
|
8579
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
|
|
8580
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
8392
8581
|
Button,
|
|
8393
8582
|
{
|
|
8394
8583
|
label: browseLabel,
|
|
@@ -8402,15 +8591,15 @@ var FileUploadZone = ({
|
|
|
8402
8591
|
}
|
|
8403
8592
|
)
|
|
8404
8593
|
] }),
|
|
8405
|
-
sublabel && /* @__PURE__ */ (0,
|
|
8594
|
+
sublabel && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-center text-xs text-grey-500", children: sublabel })
|
|
8406
8595
|
]
|
|
8407
8596
|
}
|
|
8408
8597
|
),
|
|
8409
|
-
showFileName && fileName && /* @__PURE__ */ (0,
|
|
8410
|
-
/* @__PURE__ */ (0,
|
|
8411
|
-
/* @__PURE__ */ (0,
|
|
8598
|
+
showFileName && fileName && /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Layout, { align: "center", justify: "center", gap: 2, children: [
|
|
8599
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
|
|
8600
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-sm text-green-700", children: fileName })
|
|
8412
8601
|
] }),
|
|
8413
|
-
inlineError && /* @__PURE__ */ (0,
|
|
8602
|
+
inlineError && /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "text-center text-sm text-red-900", children: inlineError })
|
|
8414
8603
|
]
|
|
8415
8604
|
}
|
|
8416
8605
|
);
|
|
@@ -8418,7 +8607,7 @@ var FileUploadZone = ({
|
|
|
8418
8607
|
|
|
8419
8608
|
// src/ui/components/ui/FilePicker.tsx
|
|
8420
8609
|
var import_react56 = require("react");
|
|
8421
|
-
var
|
|
8610
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
8422
8611
|
var FilePicker = ({
|
|
8423
8612
|
label,
|
|
8424
8613
|
onSelect,
|
|
@@ -8433,8 +8622,8 @@ var FilePicker = ({
|
|
|
8433
8622
|
className
|
|
8434
8623
|
}) => {
|
|
8435
8624
|
const inputRef = (0, import_react56.useRef)(null);
|
|
8436
|
-
return /* @__PURE__ */ (0,
|
|
8437
|
-
/* @__PURE__ */ (0,
|
|
8625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
8626
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
8438
8627
|
"input",
|
|
8439
8628
|
{
|
|
8440
8629
|
ref: inputRef,
|
|
@@ -8450,20 +8639,20 @@ var FilePicker = ({
|
|
|
8450
8639
|
}
|
|
8451
8640
|
}
|
|
8452
8641
|
),
|
|
8453
|
-
variant === "button" ? /* @__PURE__ */ (0,
|
|
8642
|
+
variant === "button" ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
8454
8643
|
Button,
|
|
8455
8644
|
{
|
|
8456
8645
|
variant: "outline",
|
|
8457
8646
|
label,
|
|
8458
8647
|
disabled,
|
|
8459
8648
|
className,
|
|
8460
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
8649
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Icon, { name: icon, family: iconFamily, size: "s", color: "inherit" }),
|
|
8461
8650
|
onClick: () => {
|
|
8462
8651
|
var _a;
|
|
8463
8652
|
return (_a = inputRef.current) == null ? void 0 : _a.click();
|
|
8464
8653
|
}
|
|
8465
8654
|
}
|
|
8466
|
-
) : /* @__PURE__ */ (0,
|
|
8655
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Tooltip, { content: label, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
8467
8656
|
Icon,
|
|
8468
8657
|
{
|
|
8469
8658
|
name: icon,
|
|
@@ -8484,9 +8673,9 @@ var FilePicker = ({
|
|
|
8484
8673
|
|
|
8485
8674
|
// src/ui/components/ui/Item.tsx
|
|
8486
8675
|
var import_react57 = require("react");
|
|
8487
|
-
var
|
|
8488
|
-
var
|
|
8489
|
-
var itemVariants = (0,
|
|
8676
|
+
var import_class_variance_authority18 = require("class-variance-authority");
|
|
8677
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
8678
|
+
var itemVariants = (0, import_class_variance_authority18.cva)(
|
|
8490
8679
|
"group/item flex items-center rounded-[6px] border border-transparent transition-colors",
|
|
8491
8680
|
{
|
|
8492
8681
|
variants: {
|
|
@@ -8506,7 +8695,7 @@ var itemVariants = (0, import_class_variance_authority17.cva)(
|
|
|
8506
8695
|
var Item4 = (0, import_react57.forwardRef)(
|
|
8507
8696
|
(_a, ref) => {
|
|
8508
8697
|
var _b = _a, { variant, size, className } = _b, props = __objRest(_b, ["variant", "size", "className"]);
|
|
8509
|
-
return /* @__PURE__ */ (0,
|
|
8698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
8510
8699
|
"div",
|
|
8511
8700
|
__spreadValues({
|
|
8512
8701
|
ref,
|
|
@@ -8516,7 +8705,7 @@ var Item4 = (0, import_react57.forwardRef)(
|
|
|
8516
8705
|
}
|
|
8517
8706
|
);
|
|
8518
8707
|
Item4.displayName = "Item";
|
|
8519
|
-
var itemMediaVariants = (0,
|
|
8708
|
+
var itemMediaVariants = (0, import_class_variance_authority18.cva)(
|
|
8520
8709
|
"flex shrink-0 items-center justify-center gap-2",
|
|
8521
8710
|
{
|
|
8522
8711
|
variants: {
|
|
@@ -8531,7 +8720,7 @@ var itemMediaVariants = (0, import_class_variance_authority17.cva)(
|
|
|
8531
8720
|
);
|
|
8532
8721
|
var ItemMedia = (_a) => {
|
|
8533
8722
|
var _b = _a, { variant, className } = _b, props = __objRest(_b, ["variant", "className"]);
|
|
8534
|
-
return /* @__PURE__ */ (0,
|
|
8723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
|
|
8535
8724
|
};
|
|
8536
8725
|
var ItemContent = (_a) => {
|
|
8537
8726
|
var _b = _a, {
|
|
@@ -8539,7 +8728,7 @@ var ItemContent = (_a) => {
|
|
|
8539
8728
|
} = _b, props = __objRest(_b, [
|
|
8540
8729
|
"className"
|
|
8541
8730
|
]);
|
|
8542
|
-
return /* @__PURE__ */ (0,
|
|
8731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
8543
8732
|
"div",
|
|
8544
8733
|
__spreadValues({
|
|
8545
8734
|
className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
|
|
@@ -8552,7 +8741,7 @@ var ItemTitle = (_a) => {
|
|
|
8552
8741
|
} = _b, props = __objRest(_b, [
|
|
8553
8742
|
"className"
|
|
8554
8743
|
]);
|
|
8555
|
-
return /* @__PURE__ */ (0,
|
|
8744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
8556
8745
|
"div",
|
|
8557
8746
|
__spreadValues({
|
|
8558
8747
|
className: cn(
|
|
@@ -8568,7 +8757,7 @@ var ItemDescription = (_a) => {
|
|
|
8568
8757
|
} = _b, props = __objRest(_b, [
|
|
8569
8758
|
"className"
|
|
8570
8759
|
]);
|
|
8571
|
-
return /* @__PURE__ */ (0,
|
|
8760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
|
|
8572
8761
|
};
|
|
8573
8762
|
var ItemActions = (_a) => {
|
|
8574
8763
|
var _b = _a, {
|
|
@@ -8576,7 +8765,7 @@ var ItemActions = (_a) => {
|
|
|
8576
8765
|
} = _b, props = __objRest(_b, [
|
|
8577
8766
|
"className"
|
|
8578
8767
|
]);
|
|
8579
|
-
return /* @__PURE__ */ (0,
|
|
8768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
8580
8769
|
"div",
|
|
8581
8770
|
__spreadValues({
|
|
8582
8771
|
className: cn("flex shrink-0 items-center gap-2", className)
|
|
@@ -8585,7 +8774,7 @@ var ItemActions = (_a) => {
|
|
|
8585
8774
|
};
|
|
8586
8775
|
|
|
8587
8776
|
// src/ui/components/ui/Attachment.tsx
|
|
8588
|
-
var
|
|
8777
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
8589
8778
|
var Attachment = ({
|
|
8590
8779
|
name,
|
|
8591
8780
|
size,
|
|
@@ -8599,7 +8788,7 @@ var Attachment = ({
|
|
|
8599
8788
|
}) => {
|
|
8600
8789
|
const isUploading = status === "uploading";
|
|
8601
8790
|
const isError = status === "error";
|
|
8602
|
-
return /* @__PURE__ */ (0,
|
|
8791
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
8603
8792
|
Item4,
|
|
8604
8793
|
{
|
|
8605
8794
|
variant: "outline",
|
|
@@ -8611,12 +8800,12 @@ var Attachment = ({
|
|
|
8611
8800
|
),
|
|
8612
8801
|
style: { width },
|
|
8613
8802
|
children: [
|
|
8614
|
-
/* @__PURE__ */ (0,
|
|
8803
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8615
8804
|
ItemMedia,
|
|
8616
8805
|
{
|
|
8617
8806
|
variant: "icon",
|
|
8618
8807
|
className: cn(isError && "border-red-900 bg-red-50"),
|
|
8619
|
-
children: isUploading ? /* @__PURE__ */ (0,
|
|
8808
|
+
children: isUploading ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8620
8809
|
FaIcon,
|
|
8621
8810
|
{
|
|
8622
8811
|
name: isError ? "triangle-exclamation" : "file",
|
|
@@ -8626,33 +8815,33 @@ var Attachment = ({
|
|
|
8626
8815
|
)
|
|
8627
8816
|
}
|
|
8628
8817
|
),
|
|
8629
|
-
/* @__PURE__ */ (0,
|
|
8630
|
-
/* @__PURE__ */ (0,
|
|
8631
|
-
isUploading ? /* @__PURE__ */ (0,
|
|
8818
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(ItemContent, { children: [
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ItemTitle, { children: name }),
|
|
8820
|
+
isUploading ? /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(ItemDescription, { className: "text-xs", children: [
|
|
8632
8821
|
"Uploading - ",
|
|
8633
8822
|
progress,
|
|
8634
8823
|
"%"
|
|
8635
|
-
] }) : isError ? /* @__PURE__ */ (0,
|
|
8824
|
+
] }) : isError ? /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(ItemDescription, { className: "text-xs", children: size })
|
|
8636
8825
|
] }),
|
|
8637
|
-
(onRetry || onRemove) && /* @__PURE__ */ (0,
|
|
8638
|
-
isError && onRetry && /* @__PURE__ */ (0,
|
|
8826
|
+
(onRetry || onRemove) && /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(ItemActions, { children: [
|
|
8827
|
+
isError && onRetry && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8639
8828
|
"button",
|
|
8640
8829
|
{
|
|
8641
8830
|
type: "button",
|
|
8642
8831
|
onClick: onRetry,
|
|
8643
8832
|
"aria-label": `R\xE9essayer l'envoi de ${name}`,
|
|
8644
8833
|
className: "text-grey-400 hover:text-grey-600",
|
|
8645
|
-
children: /* @__PURE__ */ (0,
|
|
8834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(FaIcon, { name: "rotate-right", size: 12 })
|
|
8646
8835
|
}
|
|
8647
8836
|
),
|
|
8648
|
-
onRemove && /* @__PURE__ */ (0,
|
|
8837
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
8649
8838
|
"button",
|
|
8650
8839
|
{
|
|
8651
8840
|
type: "button",
|
|
8652
8841
|
onClick: onRemove,
|
|
8653
8842
|
"aria-label": `Retirer ${name}`,
|
|
8654
8843
|
className: "text-grey-400 hover:text-grey-600",
|
|
8655
|
-
children: /* @__PURE__ */ (0,
|
|
8844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(FaIcon, { name: "xmark", size: 12 })
|
|
8656
8845
|
}
|
|
8657
8846
|
)
|
|
8658
8847
|
] })
|
|
@@ -8664,7 +8853,7 @@ var Attachment = ({
|
|
|
8664
8853
|
// src/ui/components/ui/PdfPreview.tsx
|
|
8665
8854
|
var import_react58 = require("react");
|
|
8666
8855
|
var import_react_pdf = require("react-pdf");
|
|
8667
|
-
var
|
|
8856
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
8668
8857
|
import_react_pdf.pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${import_react_pdf.pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
8669
8858
|
var PdfPreview = ({
|
|
8670
8859
|
file,
|
|
@@ -8675,9 +8864,9 @@ var PdfPreview = ({
|
|
|
8675
8864
|
const [hasError, setHasError] = (0, import_react58.useState)(false);
|
|
8676
8865
|
const [numPages, setNumPages] = (0, import_react58.useState)(0);
|
|
8677
8866
|
const height = Math.round(width * 1.3);
|
|
8678
|
-
const thumbnailSkeleton = /* @__PURE__ */ (0,
|
|
8867
|
+
const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Skeleton, { width, height });
|
|
8679
8868
|
if (hasError) {
|
|
8680
|
-
return /* @__PURE__ */ (0,
|
|
8869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
8681
8870
|
Layout,
|
|
8682
8871
|
{
|
|
8683
8872
|
column: true,
|
|
@@ -8690,13 +8879,13 @@ var PdfPreview = ({
|
|
|
8690
8879
|
),
|
|
8691
8880
|
style: { width, height },
|
|
8692
8881
|
children: [
|
|
8693
|
-
/* @__PURE__ */ (0,
|
|
8694
|
-
/* @__PURE__ */ (0,
|
|
8882
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
|
|
8883
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
|
|
8695
8884
|
]
|
|
8696
8885
|
}
|
|
8697
8886
|
);
|
|
8698
8887
|
}
|
|
8699
|
-
return /* @__PURE__ */ (0,
|
|
8888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
8700
8889
|
"div",
|
|
8701
8890
|
{
|
|
8702
8891
|
className: cn(
|
|
@@ -8704,7 +8893,7 @@ var PdfPreview = ({
|
|
|
8704
8893
|
className
|
|
8705
8894
|
),
|
|
8706
8895
|
style: { width, maxHeight },
|
|
8707
|
-
children: /* @__PURE__ */ (0,
|
|
8896
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
8708
8897
|
import_react_pdf.Document,
|
|
8709
8898
|
{
|
|
8710
8899
|
file,
|
|
@@ -8712,7 +8901,7 @@ var PdfPreview = ({
|
|
|
8712
8901
|
onLoadError: () => setHasError(true),
|
|
8713
8902
|
loading: thumbnailSkeleton,
|
|
8714
8903
|
error: thumbnailSkeleton,
|
|
8715
|
-
children: /* @__PURE__ */ (0,
|
|
8904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
8716
8905
|
import_react_pdf.Page,
|
|
8717
8906
|
{
|
|
8718
8907
|
pageNumber: i + 1,
|
|
@@ -8733,7 +8922,7 @@ var import_react60 = require("react");
|
|
|
8733
8922
|
|
|
8734
8923
|
// src/ui/components/ui/VideoPlayer.tsx
|
|
8735
8924
|
var import_react59 = require("react");
|
|
8736
|
-
var
|
|
8925
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
8737
8926
|
var formatVideoDuration = (seconds) => {
|
|
8738
8927
|
if (seconds === void 0 || !Number.isFinite(seconds) || seconds < 0)
|
|
8739
8928
|
return "";
|
|
@@ -8832,8 +9021,8 @@ var VideoPlayer = ({
|
|
|
8832
9021
|
const stopBubbling = (e) => {
|
|
8833
9022
|
e.stopPropagation();
|
|
8834
9023
|
};
|
|
8835
|
-
return /* @__PURE__ */ (0,
|
|
8836
|
-
/* @__PURE__ */ (0,
|
|
9024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(import_jsx_runtime111.Fragment, { children: [
|
|
9025
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8837
9026
|
Layout,
|
|
8838
9027
|
{
|
|
8839
9028
|
className: cn(
|
|
@@ -8844,7 +9033,7 @@ var VideoPlayer = ({
|
|
|
8844
9033
|
onClick: stopBubbling,
|
|
8845
9034
|
"data-testid": "video-player",
|
|
8846
9035
|
children: [
|
|
8847
|
-
isInlinePlaying ? /* @__PURE__ */ (0,
|
|
9036
|
+
isInlinePlaying ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8848
9037
|
"video",
|
|
8849
9038
|
{
|
|
8850
9039
|
ref: attachInlineVideo,
|
|
@@ -8856,7 +9045,7 @@ var VideoPlayer = ({
|
|
|
8856
9045
|
className: "h-full w-full bg-black object-contain",
|
|
8857
9046
|
"aria-label": title
|
|
8858
9047
|
}
|
|
8859
|
-
) : /* @__PURE__ */ (0,
|
|
9048
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8860
9049
|
"button",
|
|
8861
9050
|
{
|
|
8862
9051
|
type: "button",
|
|
@@ -8864,7 +9053,7 @@ var VideoPlayer = ({
|
|
|
8864
9053
|
"aria-label": `Lire la vid\xE9o ${title}`,
|
|
8865
9054
|
className: "group relative flex h-full w-full items-center justify-center",
|
|
8866
9055
|
children: [
|
|
8867
|
-
visiblePoster ? /* @__PURE__ */ (0,
|
|
9056
|
+
visiblePoster ? /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8868
9057
|
"img",
|
|
8869
9058
|
{
|
|
8870
9059
|
src: visiblePoster,
|
|
@@ -8875,7 +9064,7 @@ var VideoPlayer = ({
|
|
|
8875
9064
|
) : (
|
|
8876
9065
|
// Sans vignette : première image de la vidéo (métadonnées seulement,
|
|
8877
9066
|
// `#t=0.1` force l'affichage d'une frame), tuile sombre si ça échoue.
|
|
8878
|
-
!hasFramePreviewError && /* @__PURE__ */ (0,
|
|
9067
|
+
!hasFramePreviewError && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8879
9068
|
"video",
|
|
8880
9069
|
{
|
|
8881
9070
|
src: `${src}#t=0.1`,
|
|
@@ -8890,12 +9079,12 @@ var VideoPlayer = ({
|
|
|
8890
9079
|
}
|
|
8891
9080
|
)
|
|
8892
9081
|
),
|
|
8893
|
-
/* @__PURE__ */ (0,
|
|
8894
|
-
formattedDuration && /* @__PURE__ */ (0,
|
|
9082
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.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_runtime111.jsx)(FaIcon, { name: "play", family: "solid", size: 18 }) }),
|
|
9083
|
+
formattedDuration && /* @__PURE__ */ (0, import_jsx_runtime111.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 })
|
|
8895
9084
|
]
|
|
8896
9085
|
}
|
|
8897
9086
|
),
|
|
8898
|
-
label && /* @__PURE__ */ (0,
|
|
9087
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8899
9088
|
Layout,
|
|
8900
9089
|
{
|
|
8901
9090
|
width: "auto",
|
|
@@ -8903,14 +9092,14 @@ var VideoPlayer = ({
|
|
|
8903
9092
|
children: label
|
|
8904
9093
|
}
|
|
8905
9094
|
),
|
|
8906
|
-
/* @__PURE__ */ (0,
|
|
9095
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8907
9096
|
Layout,
|
|
8908
9097
|
{
|
|
8909
9098
|
width: "auto",
|
|
8910
9099
|
gap: 1,
|
|
8911
9100
|
className: "absolute right-1 top-1 rounded-full bg-white/90",
|
|
8912
9101
|
children: [
|
|
8913
|
-
/* @__PURE__ */ (0,
|
|
9102
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8914
9103
|
Icon,
|
|
8915
9104
|
{
|
|
8916
9105
|
name: "up-right-and-down-left-from-center",
|
|
@@ -8919,7 +9108,7 @@ var VideoPlayer = ({
|
|
|
8919
9108
|
"aria-label": "Agrandir la vid\xE9o"
|
|
8920
9109
|
}
|
|
8921
9110
|
) }),
|
|
8922
|
-
/* @__PURE__ */ (0,
|
|
9111
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8923
9112
|
Icon,
|
|
8924
9113
|
{
|
|
8925
9114
|
name: "download",
|
|
@@ -8931,7 +9120,7 @@ var VideoPlayer = ({
|
|
|
8931
9120
|
]
|
|
8932
9121
|
}
|
|
8933
9122
|
),
|
|
8934
|
-
meta && !isInlinePlaying && /* @__PURE__ */ (0,
|
|
9123
|
+
meta && !isInlinePlaying && /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8935
9124
|
Layout,
|
|
8936
9125
|
{
|
|
8937
9126
|
width: "auto",
|
|
@@ -8942,7 +9131,7 @@ var VideoPlayer = ({
|
|
|
8942
9131
|
]
|
|
8943
9132
|
}
|
|
8944
9133
|
),
|
|
8945
|
-
/* @__PURE__ */ (0,
|
|
9134
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(
|
|
8946
9135
|
Modal,
|
|
8947
9136
|
{
|
|
8948
9137
|
open: isExpanded,
|
|
@@ -8950,9 +9139,9 @@ var VideoPlayer = ({
|
|
|
8950
9139
|
onOpenAutoFocus: focusExpandedVideo,
|
|
8951
9140
|
width: "70vw",
|
|
8952
9141
|
children: [
|
|
8953
|
-
/* @__PURE__ */ (0,
|
|
8954
|
-
/* @__PURE__ */ (0,
|
|
8955
|
-
/* @__PURE__ */ (0,
|
|
9142
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
|
|
9143
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
|
|
9144
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8956
9145
|
IconBadge,
|
|
8957
9146
|
{
|
|
8958
9147
|
name: "video",
|
|
@@ -8961,10 +9150,10 @@ var VideoPlayer = ({
|
|
|
8961
9150
|
iconColor: "blue_900"
|
|
8962
9151
|
}
|
|
8963
9152
|
),
|
|
8964
|
-
/* @__PURE__ */ (0,
|
|
9153
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ModalTitle, { className: "truncate", children: title })
|
|
8965
9154
|
] }),
|
|
8966
|
-
/* @__PURE__ */ (0,
|
|
8967
|
-
/* @__PURE__ */ (0,
|
|
9155
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Layout, { width: "auto", align: "center", gap: 1, children: [
|
|
9156
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8968
9157
|
Icon,
|
|
8969
9158
|
{
|
|
8970
9159
|
name: "download",
|
|
@@ -8973,7 +9162,7 @@ var VideoPlayer = ({
|
|
|
8973
9162
|
"aria-label": "T\xE9l\xE9charger la vid\xE9o"
|
|
8974
9163
|
}
|
|
8975
9164
|
) }),
|
|
8976
|
-
/* @__PURE__ */ (0,
|
|
9165
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ModalClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8977
9166
|
Icon,
|
|
8978
9167
|
{
|
|
8979
9168
|
name: "xmark",
|
|
@@ -8985,7 +9174,7 @@ var VideoPlayer = ({
|
|
|
8985
9174
|
) })
|
|
8986
9175
|
] })
|
|
8987
9176
|
] }) }),
|
|
8988
|
-
/* @__PURE__ */ (0,
|
|
9177
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(ModalBody, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
8989
9178
|
"video",
|
|
8990
9179
|
{
|
|
8991
9180
|
ref: attachExpandedVideo,
|
|
@@ -9006,7 +9195,7 @@ var VideoPlayer = ({
|
|
|
9006
9195
|
};
|
|
9007
9196
|
|
|
9008
9197
|
// src/ui/components/ui/AudioPlayer.tsx
|
|
9009
|
-
var
|
|
9198
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
9010
9199
|
var DEFAULT_VOLUME2 = 0.5;
|
|
9011
9200
|
var clampVolume2 = (volume) => Number.isFinite(volume) ? Math.min(1, Math.max(0, volume)) : DEFAULT_VOLUME2;
|
|
9012
9201
|
var AudioPlayer = ({
|
|
@@ -9049,7 +9238,7 @@ var AudioPlayer = ({
|
|
|
9049
9238
|
const value = (_b = (_a = audioRef.current) == null ? void 0 : _a.duration) != null ? _b : 0;
|
|
9050
9239
|
setDuration(Number.isFinite(value) ? value : 0);
|
|
9051
9240
|
};
|
|
9052
|
-
return /* @__PURE__ */ (0,
|
|
9241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
9053
9242
|
Layout,
|
|
9054
9243
|
{
|
|
9055
9244
|
gap: 3,
|
|
@@ -9058,7 +9247,7 @@ var AudioPlayer = ({
|
|
|
9058
9247
|
className: cn("rounded-lg border border-grey-300 p-2", className),
|
|
9059
9248
|
"data-testid": "audio-player",
|
|
9060
9249
|
children: [
|
|
9061
|
-
/* @__PURE__ */ (0,
|
|
9250
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
9062
9251
|
"audio",
|
|
9063
9252
|
{
|
|
9064
9253
|
ref: attachAudio,
|
|
@@ -9076,19 +9265,19 @@ var AudioPlayer = ({
|
|
|
9076
9265
|
"aria-label": title
|
|
9077
9266
|
}
|
|
9078
9267
|
),
|
|
9079
|
-
/* @__PURE__ */ (0,
|
|
9268
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
9080
9269
|
Button,
|
|
9081
9270
|
{
|
|
9082
9271
|
variant: "outline",
|
|
9083
9272
|
size: "s",
|
|
9084
9273
|
iconOnly: true,
|
|
9085
9274
|
"aria-label": isPlaying ? `Mettre en pause ${title}` : `Lire ${title}`,
|
|
9086
|
-
iconLeft: /* @__PURE__ */ (0,
|
|
9275
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Icon, { name: isPlaying ? "pause" : "play", size: "s", color: "inherit" }),
|
|
9087
9276
|
onClick: togglePlayback
|
|
9088
9277
|
}
|
|
9089
9278
|
),
|
|
9090
|
-
/* @__PURE__ */ (0,
|
|
9091
|
-
/* @__PURE__ */ (0,
|
|
9279
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(currentTime) }),
|
|
9280
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
9092
9281
|
"input",
|
|
9093
9282
|
{
|
|
9094
9283
|
type: "range",
|
|
@@ -9102,7 +9291,7 @@ var AudioPlayer = ({
|
|
|
9102
9291
|
className: "h-1 min-w-0 flex-1 cursor-pointer accent-blue-700 disabled:cursor-default"
|
|
9103
9292
|
}
|
|
9104
9293
|
),
|
|
9105
|
-
/* @__PURE__ */ (0,
|
|
9294
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Text, { size: "xs", color: "grey-600", className: "tabular-nums", children: formatVideoDuration(duration) })
|
|
9106
9295
|
]
|
|
9107
9296
|
}
|
|
9108
9297
|
);
|
|
@@ -9110,7 +9299,7 @@ var AudioPlayer = ({
|
|
|
9110
9299
|
|
|
9111
9300
|
// src/ui/components/ui/ScrollArea.tsx
|
|
9112
9301
|
var RadixScrollArea = __toESM(require("@radix-ui/react-scroll-area"));
|
|
9113
|
-
var
|
|
9302
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
9114
9303
|
var HIDDEN_SCROLLBAR_CLASSNAME = "w-0 h-0 opacity-0";
|
|
9115
9304
|
var ScrollArea = (_a) => {
|
|
9116
9305
|
var _b = _a, {
|
|
@@ -9126,13 +9315,13 @@ var ScrollArea = (_a) => {
|
|
|
9126
9315
|
"viewportRef",
|
|
9127
9316
|
"maxHeight"
|
|
9128
9317
|
]);
|
|
9129
|
-
return /* @__PURE__ */ (0,
|
|
9318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsxs)(
|
|
9130
9319
|
RadixScrollArea.Root,
|
|
9131
9320
|
__spreadProps(__spreadValues({
|
|
9132
9321
|
className: cn("relative overflow-hidden", className)
|
|
9133
9322
|
}, props), {
|
|
9134
9323
|
children: [
|
|
9135
|
-
/* @__PURE__ */ (0,
|
|
9324
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
9136
9325
|
RadixScrollArea.Viewport,
|
|
9137
9326
|
{
|
|
9138
9327
|
ref: viewportRef,
|
|
@@ -9145,23 +9334,23 @@ var ScrollArea = (_a) => {
|
|
|
9145
9334
|
children
|
|
9146
9335
|
}
|
|
9147
9336
|
),
|
|
9148
|
-
(orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0,
|
|
9337
|
+
(orientation === "vertical" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
9149
9338
|
RadixScrollArea.Scrollbar,
|
|
9150
9339
|
{
|
|
9151
9340
|
orientation: "vertical",
|
|
9152
9341
|
className: HIDDEN_SCROLLBAR_CLASSNAME,
|
|
9153
|
-
children: /* @__PURE__ */ (0,
|
|
9342
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
|
|
9154
9343
|
}
|
|
9155
9344
|
),
|
|
9156
|
-
(orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0,
|
|
9345
|
+
(orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
9157
9346
|
RadixScrollArea.Scrollbar,
|
|
9158
9347
|
{
|
|
9159
9348
|
orientation: "horizontal",
|
|
9160
9349
|
className: HIDDEN_SCROLLBAR_CLASSNAME,
|
|
9161
|
-
children: /* @__PURE__ */ (0,
|
|
9350
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
|
|
9162
9351
|
}
|
|
9163
9352
|
),
|
|
9164
|
-
/* @__PURE__ */ (0,
|
|
9353
|
+
/* @__PURE__ */ (0, import_jsx_runtime113.jsx)(RadixScrollArea.Corner, {})
|
|
9165
9354
|
]
|
|
9166
9355
|
})
|
|
9167
9356
|
);
|
|
@@ -9169,7 +9358,7 @@ var ScrollArea = (_a) => {
|
|
|
9169
9358
|
|
|
9170
9359
|
// src/ui/components/ui/Message.tsx
|
|
9171
9360
|
var import_react61 = require("react");
|
|
9172
|
-
var
|
|
9361
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
9173
9362
|
var BUBBLE_BACKGROUND = {
|
|
9174
9363
|
own: { solid: "bg-blue-700", pale: "bg-blue-50" },
|
|
9175
9364
|
teammate: { solid: "bg-blue-100", pale: "bg-blue-100" },
|
|
@@ -9228,7 +9417,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9228
9417
|
const isInverted = isOwn && variant === "solid";
|
|
9229
9418
|
const contentColor = isInverted ? "white" : "neutral-800";
|
|
9230
9419
|
const metaColor = isInverted ? "white" : "grey-500";
|
|
9231
|
-
const avatar = showAuthor ? /* @__PURE__ */ (0,
|
|
9420
|
+
const avatar = showAuthor ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
9232
9421
|
Layout,
|
|
9233
9422
|
{
|
|
9234
9423
|
width: `${avatarSize}px`,
|
|
@@ -9236,8 +9425,8 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9236
9425
|
"aria-hidden": "true"
|
|
9237
9426
|
}
|
|
9238
9427
|
);
|
|
9239
|
-
const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0,
|
|
9240
|
-
const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0,
|
|
9428
|
+
const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
|
|
9429
|
+
const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
9241
9430
|
Layout,
|
|
9242
9431
|
{
|
|
9243
9432
|
width: "auto",
|
|
@@ -9250,7 +9439,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9250
9439
|
children: actions
|
|
9251
9440
|
}
|
|
9252
9441
|
) : null;
|
|
9253
|
-
return /* @__PURE__ */ (0,
|
|
9442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
9254
9443
|
Layout,
|
|
9255
9444
|
__spreadProps(__spreadValues({
|
|
9256
9445
|
ref,
|
|
@@ -9261,7 +9450,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9261
9450
|
className
|
|
9262
9451
|
}, props), {
|
|
9263
9452
|
children: [
|
|
9264
|
-
/* @__PURE__ */ (0,
|
|
9453
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
9265
9454
|
Layout,
|
|
9266
9455
|
{
|
|
9267
9456
|
fullWidth: true,
|
|
@@ -9272,7 +9461,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9272
9461
|
children: [
|
|
9273
9462
|
!isRightAligned && avatar,
|
|
9274
9463
|
isRightAligned && actionsSlot,
|
|
9275
|
-
/* @__PURE__ */ (0,
|
|
9464
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
9276
9465
|
Layout,
|
|
9277
9466
|
{
|
|
9278
9467
|
column: true,
|
|
@@ -9281,7 +9470,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9281
9470
|
align: isRightAligned ? "end" : "start",
|
|
9282
9471
|
style: { maxWidth },
|
|
9283
9472
|
children: [
|
|
9284
|
-
bubble ? /* @__PURE__ */ (0,
|
|
9473
|
+
bubble ? /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
9285
9474
|
Layout,
|
|
9286
9475
|
{
|
|
9287
9476
|
column: true,
|
|
@@ -9295,16 +9484,16 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9295
9484
|
cornerActions && "pr-8"
|
|
9296
9485
|
),
|
|
9297
9486
|
children: [
|
|
9298
|
-
deleted ? /* @__PURE__ */ (0,
|
|
9299
|
-
time && /* @__PURE__ */ (0,
|
|
9487
|
+
deleted ? /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { size: "s", color: contentColor, children }),
|
|
9488
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { size: "xxs", color: metaColor, children: time }) }),
|
|
9300
9489
|
cornerActions
|
|
9301
9490
|
]
|
|
9302
9491
|
}
|
|
9303
|
-
) : cornerActions ? /* @__PURE__ */ (0,
|
|
9492
|
+
) : cornerActions ? /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Layout, { width: "auto", className: "relative", children: [
|
|
9304
9493
|
children,
|
|
9305
9494
|
cornerActions
|
|
9306
9495
|
] }) : children,
|
|
9307
|
-
status && /* @__PURE__ */ (0,
|
|
9496
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
|
|
9308
9497
|
]
|
|
9309
9498
|
}
|
|
9310
9499
|
),
|
|
@@ -9313,7 +9502,7 @@ var Message = (0, import_react61.forwardRef)(
|
|
|
9313
9502
|
]
|
|
9314
9503
|
}
|
|
9315
9504
|
),
|
|
9316
|
-
showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0,
|
|
9505
|
+
showAuthor && showAuthorName && authorName && /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Text, { size: "xs", color: "grey-600", children: authorName })
|
|
9317
9506
|
]
|
|
9318
9507
|
})
|
|
9319
9508
|
);
|
|
@@ -9323,7 +9512,7 @@ Message.displayName = "Message";
|
|
|
9323
9512
|
|
|
9324
9513
|
// src/ui/components/ui/MessageScroller.tsx
|
|
9325
9514
|
var import_react62 = require("react");
|
|
9326
|
-
var
|
|
9515
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
9327
9516
|
var SEPARATOR_LINE = {
|
|
9328
9517
|
neutral: "",
|
|
9329
9518
|
alert: "bg-red-500"
|
|
@@ -9336,9 +9525,9 @@ var MessageDateSeparator = ({
|
|
|
9336
9525
|
label,
|
|
9337
9526
|
tone = "neutral",
|
|
9338
9527
|
className
|
|
9339
|
-
}) => /* @__PURE__ */ (0,
|
|
9340
|
-
/* @__PURE__ */ (0,
|
|
9341
|
-
/* @__PURE__ */ (0,
|
|
9528
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
|
|
9529
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
|
|
9530
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9342
9531
|
Text,
|
|
9343
9532
|
{
|
|
9344
9533
|
size: "xs",
|
|
@@ -9347,7 +9536,7 @@ var MessageDateSeparator = ({
|
|
|
9347
9536
|
children: label
|
|
9348
9537
|
}
|
|
9349
9538
|
) }),
|
|
9350
|
-
/* @__PURE__ */ (0,
|
|
9539
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
|
|
9351
9540
|
] });
|
|
9352
9541
|
var MessageScroller = ({
|
|
9353
9542
|
children,
|
|
@@ -9387,13 +9576,13 @@ var MessageScroller = ({
|
|
|
9387
9576
|
if (isEmpty && emptyState) return emptyState;
|
|
9388
9577
|
return children;
|
|
9389
9578
|
};
|
|
9390
|
-
const scroller = /* @__PURE__ */ (0,
|
|
9579
|
+
const scroller = /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9391
9580
|
ScrollArea,
|
|
9392
9581
|
{
|
|
9393
9582
|
viewportRef: scrollerRef,
|
|
9394
9583
|
className: cn("w-full", floatingFooter ? "min-h-0 flex-1" : className),
|
|
9395
9584
|
style: typeof height === "number" ? { height: `${height}px` } : { height },
|
|
9396
|
-
children: /* @__PURE__ */ (0,
|
|
9585
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
9397
9586
|
Layout,
|
|
9398
9587
|
{
|
|
9399
9588
|
column: true,
|
|
@@ -9416,9 +9605,9 @@ var MessageScroller = ({
|
|
|
9416
9605
|
}
|
|
9417
9606
|
);
|
|
9418
9607
|
if (!floatingFooter) return scroller;
|
|
9419
|
-
return /* @__PURE__ */ (0,
|
|
9608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
|
|
9420
9609
|
scroller,
|
|
9421
|
-
/* @__PURE__ */ (0,
|
|
9610
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
9422
9611
|
Layout,
|
|
9423
9612
|
{
|
|
9424
9613
|
width: "auto",
|
|
@@ -9431,13 +9620,13 @@ var MessageScroller = ({
|
|
|
9431
9620
|
|
|
9432
9621
|
// src/ui/components/ui/Stepper.tsx
|
|
9433
9622
|
var import_react63 = require("react");
|
|
9434
|
-
var
|
|
9623
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
9435
9624
|
var Stepper = ({
|
|
9436
9625
|
numberOfSteps,
|
|
9437
9626
|
current = 0,
|
|
9438
9627
|
size = 28,
|
|
9439
9628
|
className
|
|
9440
|
-
}) => /* @__PURE__ */ (0,
|
|
9629
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
9441
9630
|
"nav",
|
|
9442
9631
|
{
|
|
9443
9632
|
"aria-label": "progression",
|
|
@@ -9448,8 +9637,8 @@ var Stepper = ({
|
|
|
9448
9637
|
children: Array.from({ length: numberOfSteps }, (_, i) => {
|
|
9449
9638
|
const isActive = i === current;
|
|
9450
9639
|
const isCompleted = i < current;
|
|
9451
|
-
return /* @__PURE__ */ (0,
|
|
9452
|
-
/* @__PURE__ */ (0,
|
|
9640
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_react63.Fragment, { children: [
|
|
9641
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
9453
9642
|
"div",
|
|
9454
9643
|
{
|
|
9455
9644
|
"aria-hidden": true,
|
|
@@ -9458,10 +9647,10 @@ var Stepper = ({
|
|
|
9458
9647
|
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"
|
|
9459
9648
|
),
|
|
9460
9649
|
style: { width: size, height: size },
|
|
9461
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
9650
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
|
|
9462
9651
|
}
|
|
9463
9652
|
),
|
|
9464
|
-
i < numberOfSteps - 1 && /* @__PURE__ */ (0,
|
|
9653
|
+
i < numberOfSteps - 1 && /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
|
|
9465
9654
|
] }, i);
|
|
9466
9655
|
})
|
|
9467
9656
|
}
|
|
@@ -9475,7 +9664,7 @@ var import_style2 = require("react-day-picker/style.css");
|
|
|
9475
9664
|
var import_date_fns = require("date-fns");
|
|
9476
9665
|
var import_locale2 = require("date-fns/locale");
|
|
9477
9666
|
var RadixPopover6 = __toESM(require("@radix-ui/react-popover"));
|
|
9478
|
-
var
|
|
9667
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
9479
9668
|
var formatMonthCaption = (month) => (0, import_date_fns.format)(month, "MMM yyyy", { locale: import_locale2.fr });
|
|
9480
9669
|
var isSameCalendarDay = (a, b) => a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
9481
9670
|
var parseTypedDate = (text, minDate, maxDate) => {
|
|
@@ -9505,7 +9694,7 @@ var autoFormatTypedInput = (raw, isRange) => {
|
|
|
9505
9694
|
var RANGE_PRESETS = [
|
|
9506
9695
|
{
|
|
9507
9696
|
label: "Mois pr\xE9c\xE9dent",
|
|
9508
|
-
icon: /* @__PURE__ */ (0,
|
|
9697
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-arrow-up", size: 15 }),
|
|
9509
9698
|
getValue: () => [
|
|
9510
9699
|
(0, import_date_fns.startOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1)),
|
|
9511
9700
|
(0, import_date_fns.endOfMonth)((0, import_date_fns.subMonths)(/* @__PURE__ */ new Date(), 1))
|
|
@@ -9513,34 +9702,34 @@ var RANGE_PRESETS = [
|
|
|
9513
9702
|
},
|
|
9514
9703
|
{
|
|
9515
9704
|
label: "Ce mois",
|
|
9516
|
-
icon: /* @__PURE__ */ (0,
|
|
9705
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
|
|
9517
9706
|
getValue: () => [(0, import_date_fns.startOfMonth)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfMonth)(/* @__PURE__ */ new Date())]
|
|
9518
9707
|
},
|
|
9519
9708
|
{
|
|
9520
9709
|
label: "Ce trimestre",
|
|
9521
|
-
icon: /* @__PURE__ */ (0,
|
|
9710
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-range", size: 15 }),
|
|
9522
9711
|
getValue: () => [(0, import_date_fns.startOfQuarter)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfQuarter)(/* @__PURE__ */ new Date())]
|
|
9523
9712
|
},
|
|
9524
9713
|
{
|
|
9525
9714
|
label: "Cette ann\xE9e",
|
|
9526
|
-
icon: /* @__PURE__ */ (0,
|
|
9715
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
|
|
9527
9716
|
getValue: () => [(0, import_date_fns.startOfYear)(/* @__PURE__ */ new Date()), (0, import_date_fns.endOfYear)(/* @__PURE__ */ new Date())]
|
|
9528
9717
|
}
|
|
9529
9718
|
];
|
|
9530
9719
|
var SINGLE_PRESETS = [
|
|
9531
9720
|
{
|
|
9532
9721
|
label: "Aujourd'hui",
|
|
9533
|
-
icon: /* @__PURE__ */ (0,
|
|
9722
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-days", size: 15 }),
|
|
9534
9723
|
getValue: () => /* @__PURE__ */ new Date()
|
|
9535
9724
|
},
|
|
9536
9725
|
{
|
|
9537
9726
|
label: "Demain",
|
|
9538
|
-
icon: /* @__PURE__ */ (0,
|
|
9727
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-plus", size: 15 }),
|
|
9539
9728
|
getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 1)
|
|
9540
9729
|
},
|
|
9541
9730
|
{
|
|
9542
9731
|
label: "Dans 7 jours",
|
|
9543
|
-
icon: /* @__PURE__ */ (0,
|
|
9732
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar-clock", size: 15 }),
|
|
9544
9733
|
getValue: () => (0, import_date_fns.addDays)(/* @__PURE__ */ new Date(), 7)
|
|
9545
9734
|
}
|
|
9546
9735
|
];
|
|
@@ -9628,7 +9817,7 @@ var DatePicker = ({
|
|
|
9628
9817
|
setIsEditing(false);
|
|
9629
9818
|
}
|
|
9630
9819
|
};
|
|
9631
|
-
const calendar = /* @__PURE__ */ (0,
|
|
9820
|
+
const calendar = /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RadixPopover6.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9632
9821
|
RadixPopover6.Content,
|
|
9633
9822
|
{
|
|
9634
9823
|
align,
|
|
@@ -9640,7 +9829,7 @@ var DatePicker = ({
|
|
|
9640
9829
|
// mois (range) passait à la ligne et se faisait couper par max-h.
|
|
9641
9830
|
isRange && "max-h-[320px] max-w-[460px] overflow-y-auto [&_.rdp-months]:flex-nowrap"
|
|
9642
9831
|
),
|
|
9643
|
-
children: isRange ? /* @__PURE__ */ (0,
|
|
9832
|
+
children: isRange ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9644
9833
|
import_react_day_picker.DayPicker,
|
|
9645
9834
|
{
|
|
9646
9835
|
mode: "range",
|
|
@@ -9658,7 +9847,7 @@ var DatePicker = ({
|
|
|
9658
9847
|
showOutsideDays: true,
|
|
9659
9848
|
formatters: { formatCaption: formatMonthCaption }
|
|
9660
9849
|
}
|
|
9661
|
-
) : /* @__PURE__ */ (0,
|
|
9850
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9662
9851
|
import_react_day_picker.DayPicker,
|
|
9663
9852
|
{
|
|
9664
9853
|
mode: "single",
|
|
@@ -9676,8 +9865,8 @@ var DatePicker = ({
|
|
|
9676
9865
|
}
|
|
9677
9866
|
) });
|
|
9678
9867
|
if (!showPresets) {
|
|
9679
|
-
return /* @__PURE__ */ (0,
|
|
9680
|
-
/* @__PURE__ */ (0,
|
|
9868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
|
|
9869
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RadixPopover6.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
9681
9870
|
Layout,
|
|
9682
9871
|
{
|
|
9683
9872
|
align: "center",
|
|
@@ -9691,7 +9880,7 @@ var DatePicker = ({
|
|
|
9691
9880
|
className
|
|
9692
9881
|
),
|
|
9693
9882
|
children: [
|
|
9694
|
-
/* @__PURE__ */ (0,
|
|
9883
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9695
9884
|
"input",
|
|
9696
9885
|
{
|
|
9697
9886
|
type: "text",
|
|
@@ -9712,14 +9901,14 @@ var DatePicker = ({
|
|
|
9712
9901
|
)
|
|
9713
9902
|
}
|
|
9714
9903
|
),
|
|
9715
|
-
/* @__PURE__ */ (0,
|
|
9904
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9716
9905
|
"button",
|
|
9717
9906
|
{
|
|
9718
9907
|
type: "button",
|
|
9719
9908
|
"aria-label": "Ouvrir le calendrier",
|
|
9720
9909
|
disabled,
|
|
9721
9910
|
className: "flex h-full w-8 shrink-0 items-center justify-center text-grey-500 hover:text-blue-700 disabled:cursor-not-allowed",
|
|
9722
|
-
children: /* @__PURE__ */ (0,
|
|
9911
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar", size: 14 })
|
|
9723
9912
|
}
|
|
9724
9913
|
) })
|
|
9725
9914
|
]
|
|
@@ -9728,10 +9917,10 @@ var DatePicker = ({
|
|
|
9728
9917
|
calendar
|
|
9729
9918
|
] });
|
|
9730
9919
|
}
|
|
9731
|
-
return /* @__PURE__ */ (0,
|
|
9732
|
-
/* @__PURE__ */ (0,
|
|
9733
|
-
/* @__PURE__ */ (0,
|
|
9734
|
-
/* @__PURE__ */ (0,
|
|
9920
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
|
|
9921
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Layout, { column: true, gap: 1.5, align, className, children: [
|
|
9922
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(Layout, { align: "center", gap: 1.5, width: "auto", children: [
|
|
9923
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9735
9924
|
"button",
|
|
9736
9925
|
{
|
|
9737
9926
|
type: "button",
|
|
@@ -9743,12 +9932,12 @@ var DatePicker = ({
|
|
|
9743
9932
|
hasValue && !activePreset ? "border-blue-700 bg-blue-50 text-blue-700" : "border-grey-300 bg-white text-neutral-800 hover:border-blue-700",
|
|
9744
9933
|
"disabled:cursor-not-allowed disabled:opacity-60"
|
|
9745
9934
|
),
|
|
9746
|
-
children: /* @__PURE__ */ (0,
|
|
9935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(FaIcon, { name: "calendar", size: 16 })
|
|
9747
9936
|
}
|
|
9748
9937
|
) }),
|
|
9749
9938
|
resolvedPresets.map((preset) => {
|
|
9750
9939
|
const active = activePreset === preset.label;
|
|
9751
|
-
return /* @__PURE__ */ (0,
|
|
9940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Tooltip, { content: preset.label, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9752
9941
|
"button",
|
|
9753
9942
|
{
|
|
9754
9943
|
type: "button",
|
|
@@ -9766,7 +9955,7 @@ var DatePicker = ({
|
|
|
9766
9955
|
) }, preset.label);
|
|
9767
9956
|
})
|
|
9768
9957
|
] }),
|
|
9769
|
-
hasValue && /* @__PURE__ */ (0,
|
|
9958
|
+
hasValue && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
9770
9959
|
"button",
|
|
9771
9960
|
{
|
|
9772
9961
|
type: "button",
|
|
@@ -9785,7 +9974,7 @@ var DatePicker = ({
|
|
|
9785
9974
|
|
|
9786
9975
|
// src/ui/components/ui/VehicleDamageMap.tsx
|
|
9787
9976
|
var import_react65 = require("react");
|
|
9788
|
-
var
|
|
9977
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
9789
9978
|
var WIDTH = 240;
|
|
9790
9979
|
var HEIGHT = 140;
|
|
9791
9980
|
var ZONE_POSITIONS = {
|
|
@@ -9818,29 +10007,29 @@ var TONES = {
|
|
|
9818
10007
|
};
|
|
9819
10008
|
var VehicleOutline = ({
|
|
9820
10009
|
sideLabels
|
|
9821
|
-
}) => /* @__PURE__ */ (0,
|
|
10010
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
9822
10011
|
"svg",
|
|
9823
10012
|
{
|
|
9824
10013
|
viewBox: `0 0 ${WIDTH} ${HEIGHT}`,
|
|
9825
10014
|
className: "absolute inset-0 h-full w-full",
|
|
9826
10015
|
"aria-hidden": true,
|
|
9827
10016
|
children: [
|
|
9828
|
-
/* @__PURE__ */ (0,
|
|
9829
|
-
/* @__PURE__ */ (0,
|
|
9830
|
-
/* @__PURE__ */ (0,
|
|
9831
|
-
/* @__PURE__ */ (0,
|
|
9832
|
-
/* @__PURE__ */ (0,
|
|
10017
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("g", { fill: colors.grey_600, children: [
|
|
10018
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("rect", { x: "54", y: "20", width: "26", height: "10", rx: "3" }),
|
|
10019
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("rect", { x: "54", y: "110", width: "26", height: "10", rx: "3" }),
|
|
10020
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("rect", { x: "162", y: "20", width: "26", height: "10", rx: "3" }),
|
|
10021
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("rect", { x: "162", y: "110", width: "26", height: "10", rx: "3" })
|
|
9833
10022
|
] }),
|
|
9834
|
-
/* @__PURE__ */ (0,
|
|
9835
|
-
/* @__PURE__ */ (0,
|
|
9836
|
-
/* @__PURE__ */ (0,
|
|
9837
|
-
/* @__PURE__ */ (0,
|
|
10023
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("g", { fill: colors.grey_200, stroke: colors.grey_400, strokeWidth: "1.5", children: [
|
|
10024
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("ellipse", { cx: "94", cy: "26", rx: "3", ry: "5" }),
|
|
10025
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("ellipse", { cx: "94", cy: "114", rx: "3", ry: "5" }),
|
|
10026
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("path", { d: "M34 48 Q34 28 58 28 H184 Q206 28 206 48 V92 Q206 112 184 112 H58 Q34 112 34 92 Z" })
|
|
9838
10027
|
] }),
|
|
9839
|
-
/* @__PURE__ */ (0,
|
|
9840
|
-
/* @__PURE__ */ (0,
|
|
9841
|
-
/* @__PURE__ */ (0,
|
|
10028
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("g", { fill: colors.grey_300, stroke: colors.grey_400, strokeWidth: "1", children: [
|
|
10029
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("path", { d: "M78 40 L98 46 V94 L78 100 Q70 70 78 40 Z" }),
|
|
10030
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("path", { d: "M180 42 L166 47 V93 L180 98 Q186 70 180 42 Z" })
|
|
9842
10031
|
] }),
|
|
9843
|
-
/* @__PURE__ */ (0,
|
|
10032
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
9844
10033
|
"rect",
|
|
9845
10034
|
{
|
|
9846
10035
|
x: "102",
|
|
@@ -9853,7 +10042,7 @@ var VehicleOutline = ({
|
|
|
9853
10042
|
strokeWidth: "1"
|
|
9854
10043
|
}
|
|
9855
10044
|
),
|
|
9856
|
-
sideLabels && /* @__PURE__ */ (0,
|
|
10045
|
+
sideLabels && /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
9857
10046
|
"g",
|
|
9858
10047
|
{
|
|
9859
10048
|
fill: colors.grey_500,
|
|
@@ -9862,10 +10051,10 @@ var VehicleOutline = ({
|
|
|
9862
10051
|
textAnchor: "middle",
|
|
9863
10052
|
letterSpacing: "0.5",
|
|
9864
10053
|
children: [
|
|
9865
|
-
/* @__PURE__ */ (0,
|
|
9866
|
-
/* @__PURE__ */ (0,
|
|
9867
|
-
/* @__PURE__ */ (0,
|
|
9868
|
-
/* @__PURE__ */ (0,
|
|
10054
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("text", { x: "120", y: "11", children: sideLabels.right.toUpperCase() }),
|
|
10055
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("text", { x: "120", y: "135", children: sideLabels.left.toUpperCase() }),
|
|
10056
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("text", { x: "14", y: "70", transform: "rotate(-90 14 70)", children: sideLabels.front.toUpperCase() }),
|
|
10057
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("text", { x: "226", y: "70", transform: "rotate(90 226 70)", children: sideLabels.rear.toUpperCase() })
|
|
9869
10058
|
]
|
|
9870
10059
|
}
|
|
9871
10060
|
)
|
|
@@ -9889,7 +10078,7 @@ var VehicleDamageMap = (0, import_react65.forwardRef)(
|
|
|
9889
10078
|
"width",
|
|
9890
10079
|
"className"
|
|
9891
10080
|
]);
|
|
9892
|
-
return /* @__PURE__ */ (0,
|
|
10081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
9893
10082
|
"div",
|
|
9894
10083
|
__spreadProps(__spreadValues({
|
|
9895
10084
|
ref,
|
|
@@ -9897,7 +10086,7 @@ var VehicleDamageMap = (0, import_react65.forwardRef)(
|
|
|
9897
10086
|
style: { width, height: width * HEIGHT / WIDTH }
|
|
9898
10087
|
}, rest), {
|
|
9899
10088
|
children: [
|
|
9900
|
-
/* @__PURE__ */ (0,
|
|
10089
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(VehicleOutline, { sideLabels }),
|
|
9901
10090
|
marks.map((mark) => {
|
|
9902
10091
|
var _a2, _b2, _c;
|
|
9903
10092
|
const [x, y] = ZONE_POSITIONS[mark.zone];
|
|
@@ -9912,7 +10101,7 @@ var VehicleDamageMap = (0, import_react65.forwardRef)(
|
|
|
9912
10101
|
backgroundColor: TONES[(_a2 = mark.tone) != null ? _a2 : "danger"],
|
|
9913
10102
|
boxShadow: selected ? `0 0 0 2px ${colors.blue_950}` : void 0
|
|
9914
10103
|
};
|
|
9915
|
-
const pin = onZoneClick ? /* @__PURE__ */ (0,
|
|
10104
|
+
const pin = onZoneClick ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
9916
10105
|
"button",
|
|
9917
10106
|
{
|
|
9918
10107
|
type: "button",
|
|
@@ -9923,7 +10112,7 @@ var VehicleDamageMap = (0, import_react65.forwardRef)(
|
|
|
9923
10112
|
style: pinStyle,
|
|
9924
10113
|
children: mark.content
|
|
9925
10114
|
}
|
|
9926
|
-
) : /* @__PURE__ */ (0,
|
|
10115
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
9927
10116
|
"span",
|
|
9928
10117
|
{
|
|
9929
10118
|
role: "img",
|
|
@@ -9933,7 +10122,7 @@ var VehicleDamageMap = (0, import_react65.forwardRef)(
|
|
|
9933
10122
|
children: mark.content
|
|
9934
10123
|
}
|
|
9935
10124
|
);
|
|
9936
|
-
return mark.label ? /* @__PURE__ */ (0,
|
|
10125
|
+
return mark.label ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Tooltip, { content: mark.label, children: pin }, mark.zone) : /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { children: pin }, mark.zone);
|
|
9937
10126
|
})
|
|
9938
10127
|
]
|
|
9939
10128
|
})
|
|
@@ -10396,7 +10585,7 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
|
|
|
10396
10585
|
// src/ui/components/ui/Tour.tsx
|
|
10397
10586
|
var import_react66 = require("react");
|
|
10398
10587
|
var import_driver = require("driver.js");
|
|
10399
|
-
var
|
|
10588
|
+
var import_jsx_runtime119 = require("react/jsx-runtime");
|
|
10400
10589
|
var TOUR_TARGET_ATTRIBUTE = "data-tour-target";
|
|
10401
10590
|
var DEFAULT_LABELS = {
|
|
10402
10591
|
previous: "Pr\xE9c\xE9dent",
|
|
@@ -10408,7 +10597,7 @@ var DEFAULT_LABELS = {
|
|
|
10408
10597
|
var STAGE_PADDING = 6;
|
|
10409
10598
|
var GHOST_TRANSITION_MS = 200;
|
|
10410
10599
|
var HIGHLIGHT_DURATION_MS = 400;
|
|
10411
|
-
var TourTarget = ({ id, children }) => /* @__PURE__ */ (0,
|
|
10600
|
+
var TourTarget = ({ id, children }) => /* @__PURE__ */ (0, import_jsx_runtime119.jsx)("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
|
|
10412
10601
|
var isContents = (element) => getComputedStyle(element).display === "contents";
|
|
10413
10602
|
var measure = (element) => {
|
|
10414
10603
|
if (!isContents(element)) {
|
|
@@ -10617,6 +10806,7 @@ var Tour = ({
|
|
|
10617
10806
|
AudioPlayer,
|
|
10618
10807
|
Avatar,
|
|
10619
10808
|
AvatarBadge,
|
|
10809
|
+
AvatarEditOverlay,
|
|
10620
10810
|
AvatarFallback,
|
|
10621
10811
|
AvatarGroup,
|
|
10622
10812
|
AvatarImage,
|
|
@@ -10711,6 +10901,7 @@ var Tour = ({
|
|
|
10711
10901
|
SidebarTrigger,
|
|
10712
10902
|
SidebarUserMenu,
|
|
10713
10903
|
Skeleton,
|
|
10904
|
+
Slider,
|
|
10714
10905
|
Spinner,
|
|
10715
10906
|
Stepper,
|
|
10716
10907
|
Switch,
|