design-zystem 1.0.415 → 1.0.417
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 +47 -9
- package/dist/ui/index.d.ts +47 -9
- package/dist/ui/index.js +336 -244
- package/dist/ui/index.mjs +335 -244
- package/dist/ui/style.css +1 -1
- package/package.json +1 -1
package/dist/ui/index.mjs
CHANGED
|
@@ -329,6 +329,7 @@ var Box = forwardRef2(
|
|
|
329
329
|
hasShadow,
|
|
330
330
|
accent = "none",
|
|
331
331
|
width,
|
|
332
|
+
hexBackground,
|
|
332
333
|
className,
|
|
333
334
|
style
|
|
334
335
|
} = _b, props = __objRest(_b, [
|
|
@@ -337,6 +338,7 @@ var Box = forwardRef2(
|
|
|
337
338
|
"hasShadow",
|
|
338
339
|
"accent",
|
|
339
340
|
"width",
|
|
341
|
+
"hexBackground",
|
|
340
342
|
"className",
|
|
341
343
|
"style"
|
|
342
344
|
]);
|
|
@@ -349,7 +351,7 @@ var Box = forwardRef2(
|
|
|
349
351
|
ACCENT_CLASS[accent],
|
|
350
352
|
className
|
|
351
353
|
),
|
|
352
|
-
style: width
|
|
354
|
+
style: __spreadValues(__spreadValues(__spreadValues({}, width && { width }), hexBackground && { backgroundColor: hexBackground }), style)
|
|
353
355
|
}, props)
|
|
354
356
|
);
|
|
355
357
|
}
|
|
@@ -1796,7 +1798,9 @@ var badgeVariants = cva10(
|
|
|
1796
1798
|
variants: {
|
|
1797
1799
|
size: {
|
|
1798
1800
|
s: "px-1 py-0.5 text-[9px]",
|
|
1799
|
-
m: "px-1.5 py-0.5 text-[11px]"
|
|
1801
|
+
m: "px-1.5 py-0.5 text-[11px]",
|
|
1802
|
+
/** Case de tableau : pastille de hauteur fixe, largeur minimale commune. */
|
|
1803
|
+
l: "h-[26px] min-w-[74px] gap-1.5 px-3 text-[11px] font-bold"
|
|
1800
1804
|
},
|
|
1801
1805
|
shape: {
|
|
1802
1806
|
square: "rounded-[0.35em]",
|
|
@@ -1816,6 +1820,7 @@ var Badge = forwardRef16(
|
|
|
1816
1820
|
theme = "blue-700",
|
|
1817
1821
|
backgroundColor,
|
|
1818
1822
|
textColor,
|
|
1823
|
+
borderColor,
|
|
1819
1824
|
size,
|
|
1820
1825
|
shape,
|
|
1821
1826
|
pointer = false,
|
|
@@ -1830,6 +1835,7 @@ var Badge = forwardRef16(
|
|
|
1830
1835
|
"theme",
|
|
1831
1836
|
"backgroundColor",
|
|
1832
1837
|
"textColor",
|
|
1838
|
+
"borderColor",
|
|
1833
1839
|
"size",
|
|
1834
1840
|
"shape",
|
|
1835
1841
|
"pointer",
|
|
@@ -1849,13 +1855,15 @@ var Badge = forwardRef16(
|
|
|
1849
1855
|
badgeVariants({ size, shape }),
|
|
1850
1856
|
!backgroundColor && THEME_VARIANT_CLASSES[variant][theme],
|
|
1851
1857
|
fullWidth && "w-full",
|
|
1858
|
+
borderColor && "border",
|
|
1852
1859
|
pointer && "cursor-pointer",
|
|
1853
1860
|
pulse && "animate-[badge-pulse_2s_ease-in-out_infinite] motion-reduce:animate-none",
|
|
1854
1861
|
className
|
|
1855
1862
|
),
|
|
1856
1863
|
style: __spreadValues(__spreadValues({
|
|
1857
1864
|
backgroundColor,
|
|
1858
|
-
color: textColor
|
|
1865
|
+
color: textColor,
|
|
1866
|
+
borderColor
|
|
1859
1867
|
}, maxChars ? { maxWidth: `${maxChars}ch` } : {}), style)
|
|
1860
1868
|
}, props)
|
|
1861
1869
|
);
|
|
@@ -1873,6 +1881,7 @@ var Tabs = ({
|
|
|
1873
1881
|
items,
|
|
1874
1882
|
variant = "line",
|
|
1875
1883
|
fullWidth = false,
|
|
1884
|
+
uppercase = false,
|
|
1876
1885
|
className
|
|
1877
1886
|
}) => {
|
|
1878
1887
|
const listRef = useRef2(null);
|
|
@@ -1925,6 +1934,7 @@ var Tabs = ({
|
|
|
1925
1934
|
"relative inline-flex select-none items-center justify-center gap-1.5 whitespace-nowrap border-0 text-center outline-none transition-colors",
|
|
1926
1935
|
"disabled:cursor-not-allowed disabled:opacity-60",
|
|
1927
1936
|
fullWidth && "flex-1",
|
|
1937
|
+
uppercase && "uppercase tracking-[0.01em]",
|
|
1928
1938
|
isPills ? cn(
|
|
1929
1939
|
"rounded-md px-4 py-2 text-sm",
|
|
1930
1940
|
value === item.id ? "bg-white font-bold text-neutral-800" : "bg-transparent font-medium text-neutral-800"
|
|
@@ -3913,6 +3923,7 @@ var trackVariants2 = cva12(
|
|
|
3913
3923
|
{
|
|
3914
3924
|
variants: {
|
|
3915
3925
|
height: {
|
|
3926
|
+
xs: "h-1",
|
|
3916
3927
|
sm: "h-1.5",
|
|
3917
3928
|
md: "h-2",
|
|
3918
3929
|
lg: "h-3",
|
|
@@ -3953,15 +3964,18 @@ var THUMB_BORDER_CLASS = {
|
|
|
3953
3964
|
"purple-700": "border-purple-700"
|
|
3954
3965
|
};
|
|
3955
3966
|
var ProgressBar = ({
|
|
3956
|
-
value,
|
|
3967
|
+
value = 0,
|
|
3957
3968
|
onChange,
|
|
3958
3969
|
min = 0,
|
|
3959
3970
|
max = 100,
|
|
3960
3971
|
step = 1,
|
|
3961
3972
|
disabled = false,
|
|
3962
3973
|
color = "blue-700",
|
|
3974
|
+
hexColor,
|
|
3975
|
+
segments,
|
|
3963
3976
|
height,
|
|
3964
3977
|
label,
|
|
3978
|
+
"aria-label": ariaLabel,
|
|
3965
3979
|
showLabel = false,
|
|
3966
3980
|
formatValue,
|
|
3967
3981
|
className
|
|
@@ -3970,6 +3984,32 @@ var ProgressBar = ({
|
|
|
3970
3984
|
const percent = max !== min ? (current - min) / (max - min) * 100 : 0;
|
|
3971
3985
|
const display = (v) => formatValue ? formatValue(v) : String(v);
|
|
3972
3986
|
const editable = Boolean(onChange);
|
|
3987
|
+
if (segments) {
|
|
3988
|
+
const visible = segments.filter((segment) => segment.value > 0);
|
|
3989
|
+
return /* @__PURE__ */ jsxs23(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
|
|
3990
|
+
label && /* @__PURE__ */ jsx46("span", { className: "text-xs text-grey-600", children: label }),
|
|
3991
|
+
/* @__PURE__ */ jsx46(
|
|
3992
|
+
"div",
|
|
3993
|
+
{
|
|
3994
|
+
role: "img",
|
|
3995
|
+
"aria-label": ariaLabel != null ? ariaLabel : label,
|
|
3996
|
+
className: cn(trackVariants2({ height }), "flex gap-0.5"),
|
|
3997
|
+
children: visible.map((segment, index) => /* @__PURE__ */ jsx46(
|
|
3998
|
+
"span",
|
|
3999
|
+
{
|
|
4000
|
+
className: "h-full",
|
|
4001
|
+
style: {
|
|
4002
|
+
flexGrow: segment.value,
|
|
4003
|
+
flexBasis: 0,
|
|
4004
|
+
backgroundColor: segment.hexColor
|
|
4005
|
+
}
|
|
4006
|
+
},
|
|
4007
|
+
index
|
|
4008
|
+
))
|
|
4009
|
+
}
|
|
4010
|
+
)
|
|
4011
|
+
] });
|
|
4012
|
+
}
|
|
3973
4013
|
if (!editable) {
|
|
3974
4014
|
const readOnlyPercent = Math.max(0, Math.min(100, percent));
|
|
3975
4015
|
return /* @__PURE__ */ jsxs23(Layout, { column: true, fullWidth: true, gap: 1, className, children: [
|
|
@@ -3979,15 +4019,19 @@ var ProgressBar = ({
|
|
|
3979
4019
|
RadixProgress.Root,
|
|
3980
4020
|
{
|
|
3981
4021
|
value: readOnlyPercent,
|
|
4022
|
+
"aria-label": ariaLabel != null ? ariaLabel : label,
|
|
3982
4023
|
className: trackVariants2({ height }),
|
|
3983
4024
|
children: /* @__PURE__ */ jsx46(
|
|
3984
4025
|
RadixProgress.Indicator,
|
|
3985
4026
|
{
|
|
3986
4027
|
className: cn(
|
|
3987
4028
|
"h-full rounded-full transition-[width] duration-200",
|
|
3988
|
-
FILL_CLASS[color]
|
|
4029
|
+
!hexColor && FILL_CLASS[color]
|
|
3989
4030
|
),
|
|
3990
|
-
style: {
|
|
4031
|
+
style: {
|
|
4032
|
+
width: `${readOnlyPercent}%`,
|
|
4033
|
+
backgroundColor: hexColor
|
|
4034
|
+
}
|
|
3991
4035
|
}
|
|
3992
4036
|
)
|
|
3993
4037
|
}
|
|
@@ -4028,7 +4072,11 @@ var ProgressBar = ({
|
|
|
4028
4072
|
/* @__PURE__ */ jsx46(RadixSlider.Track, { className: cn(trackVariants2({ height }), "grow"), children: /* @__PURE__ */ jsx46(
|
|
4029
4073
|
RadixSlider.Range,
|
|
4030
4074
|
{
|
|
4031
|
-
className: cn(
|
|
4075
|
+
className: cn(
|
|
4076
|
+
"absolute h-full rounded-full",
|
|
4077
|
+
!hexColor && FILL_CLASS[color]
|
|
4078
|
+
),
|
|
4079
|
+
style: { backgroundColor: hexColor }
|
|
4032
4080
|
}
|
|
4033
4081
|
) }),
|
|
4034
4082
|
/* @__PURE__ */ jsx46(
|
|
@@ -4037,8 +4085,9 @@ var ProgressBar = ({
|
|
|
4037
4085
|
className: cn(
|
|
4038
4086
|
"block h-5 w-5 rounded-full border-2 bg-white shadow-[0_2px_6px_rgba(15,23,42,0.2)] outline-none transition-transform",
|
|
4039
4087
|
"hover:scale-110 focus-visible:ring-2 focus-visible:ring-blue-200",
|
|
4040
|
-
THUMB_BORDER_CLASS[color]
|
|
4041
|
-
)
|
|
4088
|
+
!hexColor && THUMB_BORDER_CLASS[color]
|
|
4089
|
+
),
|
|
4090
|
+
style: { borderColor: hexColor }
|
|
4042
4091
|
}
|
|
4043
4092
|
)
|
|
4044
4093
|
]
|
|
@@ -5834,8 +5883,49 @@ var MetricCard = ({
|
|
|
5834
5883
|
}
|
|
5835
5884
|
);
|
|
5836
5885
|
|
|
5886
|
+
// src/ui/components/ui/Tile.tsx
|
|
5887
|
+
import { jsx as jsx72, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5888
|
+
var Tile = ({
|
|
5889
|
+
children,
|
|
5890
|
+
onClick,
|
|
5891
|
+
selected = false,
|
|
5892
|
+
variant = "outline",
|
|
5893
|
+
expandedContent,
|
|
5894
|
+
className
|
|
5895
|
+
}) => {
|
|
5896
|
+
const isOutline = variant === "outline";
|
|
5897
|
+
return /* @__PURE__ */ jsxs37(
|
|
5898
|
+
"div",
|
|
5899
|
+
{
|
|
5900
|
+
className: cn(
|
|
5901
|
+
"w-full overflow-hidden rounded-[6px]",
|
|
5902
|
+
isOutline && "border bg-white",
|
|
5903
|
+
isOutline && (selected ? "border-blue-700 ring-1 ring-blue-700" : "border-grey-200"),
|
|
5904
|
+
!isOutline && selected && "bg-blue-50",
|
|
5905
|
+
className
|
|
5906
|
+
),
|
|
5907
|
+
children: [
|
|
5908
|
+
onClick ? /* @__PURE__ */ jsx72(
|
|
5909
|
+
"button",
|
|
5910
|
+
{
|
|
5911
|
+
type: "button",
|
|
5912
|
+
"aria-pressed": selected,
|
|
5913
|
+
onClick,
|
|
5914
|
+
className: cn(
|
|
5915
|
+
"block w-full cursor-pointer border-0 bg-transparent p-0 text-left outline-none transition-colors",
|
|
5916
|
+
"hover:bg-black/[0.025] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-200"
|
|
5917
|
+
),
|
|
5918
|
+
children
|
|
5919
|
+
}
|
|
5920
|
+
) : children,
|
|
5921
|
+
expandedContent && /* @__PURE__ */ jsx72("div", { className: cn(isOutline && "border-t border-grey-300"), children: expandedContent })
|
|
5922
|
+
]
|
|
5923
|
+
}
|
|
5924
|
+
);
|
|
5925
|
+
};
|
|
5926
|
+
|
|
5837
5927
|
// src/ui/components/ui/Skeleton.tsx
|
|
5838
|
-
import { jsx as
|
|
5928
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
5839
5929
|
var toCss = (value) => typeof value === "number" ? `${value}px` : value;
|
|
5840
5930
|
var Skeleton = (_a) => {
|
|
5841
5931
|
var _b = _a, {
|
|
@@ -5851,7 +5941,7 @@ var Skeleton = (_a) => {
|
|
|
5851
5941
|
"className",
|
|
5852
5942
|
"style"
|
|
5853
5943
|
]);
|
|
5854
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx73(
|
|
5855
5945
|
"div",
|
|
5856
5946
|
__spreadValues({
|
|
5857
5947
|
className: cn(
|
|
@@ -5866,7 +5956,7 @@ var Skeleton = (_a) => {
|
|
|
5866
5956
|
|
|
5867
5957
|
// src/ui/components/ui/TagBubble.tsx
|
|
5868
5958
|
import * as RadixToggle from "@radix-ui/react-toggle";
|
|
5869
|
-
import { jsx as
|
|
5959
|
+
import { jsx as jsx74, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5870
5960
|
var DOT_CLASS = {
|
|
5871
5961
|
"blue-700": "bg-blue-700",
|
|
5872
5962
|
"blue-900": "bg-blue-900",
|
|
@@ -5958,7 +6048,7 @@ var TagBubble = (_a) => {
|
|
|
5958
6048
|
const filled = activeFill && active;
|
|
5959
6049
|
const dotColor = active ? activeColor : inactiveColor;
|
|
5960
6050
|
const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
|
|
5961
|
-
return /* @__PURE__ */
|
|
6051
|
+
return /* @__PURE__ */ jsxs38(
|
|
5962
6052
|
RadixToggle.Root,
|
|
5963
6053
|
__spreadProps(__spreadValues({}, rest), {
|
|
5964
6054
|
type: "button",
|
|
@@ -5976,7 +6066,7 @@ var TagBubble = (_a) => {
|
|
|
5976
6066
|
className
|
|
5977
6067
|
),
|
|
5978
6068
|
children: [
|
|
5979
|
-
!hideDot && /* @__PURE__ */
|
|
6069
|
+
!hideDot && /* @__PURE__ */ jsx74(
|
|
5980
6070
|
"span",
|
|
5981
6071
|
{
|
|
5982
6072
|
className: cn(
|
|
@@ -5986,7 +6076,7 @@ var TagBubble = (_a) => {
|
|
|
5986
6076
|
style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
|
|
5987
6077
|
}
|
|
5988
6078
|
),
|
|
5989
|
-
/* @__PURE__ */
|
|
6079
|
+
/* @__PURE__ */ jsx74(
|
|
5990
6080
|
"span",
|
|
5991
6081
|
{
|
|
5992
6082
|
className: cn(
|
|
@@ -5997,7 +6087,7 @@ var TagBubble = (_a) => {
|
|
|
5997
6087
|
children: label
|
|
5998
6088
|
}
|
|
5999
6089
|
),
|
|
6000
|
-
showCount && /* @__PURE__ */
|
|
6090
|
+
showCount && /* @__PURE__ */ jsx74(Badge, { theme: countColor, size: "s", children: count })
|
|
6001
6091
|
]
|
|
6002
6092
|
})
|
|
6003
6093
|
);
|
|
@@ -6144,16 +6234,16 @@ var formatName = (person, fallback = "") => {
|
|
|
6144
6234
|
};
|
|
6145
6235
|
|
|
6146
6236
|
// src/ui/components/ui/history/HistoryChangeRow.tsx
|
|
6147
|
-
import { jsx as
|
|
6237
|
+
import { jsx as jsx75, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
6148
6238
|
var HistoryChangeRow = ({ change }) => {
|
|
6149
6239
|
const { label, previousValue, nextValue, href, onClick } = change;
|
|
6150
6240
|
const hasValues = Boolean(previousValue || nextValue);
|
|
6151
|
-
return /* @__PURE__ */
|
|
6152
|
-
/* @__PURE__ */
|
|
6153
|
-
previousValue && /* @__PURE__ */
|
|
6154
|
-
previousValue && nextValue && /* @__PURE__ */
|
|
6155
|
-
nextValue && href && /* @__PURE__ */
|
|
6156
|
-
nextValue && onClick && /* @__PURE__ */
|
|
6241
|
+
return /* @__PURE__ */ jsxs39(Layout, { align: "center", gap: 1.5, wrap: true, children: [
|
|
6242
|
+
/* @__PURE__ */ jsx75(Text, { size: "xs", weight: "semibold", color: "grey-600", children: hasValues ? `${label} :` : label }),
|
|
6243
|
+
previousValue && /* @__PURE__ */ jsx75(Text, { size: "xs", color: "grey-600", children: previousValue }),
|
|
6244
|
+
previousValue && nextValue && /* @__PURE__ */ jsx75(Icon, { name: "arrow-right", size: "xs", color: "grey-500" }),
|
|
6245
|
+
nextValue && href && /* @__PURE__ */ jsx75(Link, { href, newTab: true, size: "xs", children: nextValue }),
|
|
6246
|
+
nextValue && onClick && /* @__PURE__ */ jsx75(
|
|
6157
6247
|
"button",
|
|
6158
6248
|
{
|
|
6159
6249
|
type: "button",
|
|
@@ -6165,27 +6255,27 @@ var HistoryChangeRow = ({ change }) => {
|
|
|
6165
6255
|
children: nextValue
|
|
6166
6256
|
}
|
|
6167
6257
|
),
|
|
6168
|
-
nextValue && !href && !onClick && /* @__PURE__ */
|
|
6258
|
+
nextValue && !href && !onClick && /* @__PURE__ */ jsx75(Text, { size: "xs", weight: "semibold", children: nextValue })
|
|
6169
6259
|
] });
|
|
6170
6260
|
};
|
|
6171
6261
|
|
|
6172
6262
|
// src/ui/components/ui/history/HistoryEntryCard.tsx
|
|
6173
|
-
import { Fragment as Fragment5, jsx as
|
|
6263
|
+
import { Fragment as Fragment5, jsx as jsx76, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
6174
6264
|
var CARD_CLASS = "group rounded-lg border border-grey-300 bg-white";
|
|
6175
6265
|
var HistoryEntryCard = ({ entry }) => {
|
|
6176
6266
|
const { title, date, author, badge, changes = [] } = entry;
|
|
6177
6267
|
const hasChanges = changes.length > 0;
|
|
6178
|
-
const summary = /* @__PURE__ */
|
|
6179
|
-
/* @__PURE__ */
|
|
6180
|
-
/* @__PURE__ */
|
|
6181
|
-
author && /* @__PURE__ */
|
|
6182
|
-
/* @__PURE__ */
|
|
6183
|
-
/* @__PURE__ */
|
|
6268
|
+
const summary = /* @__PURE__ */ jsxs40(Layout, { column: true, gap: 1, fullWidth: true, children: [
|
|
6269
|
+
/* @__PURE__ */ jsxs40(Layout, { align: "center", justify: "between", gap: 2, fullWidth: true, children: [
|
|
6270
|
+
/* @__PURE__ */ jsxs40(Layout, { align: "center", gap: 3, fullWidth: false, className: "min-w-0", children: [
|
|
6271
|
+
author && /* @__PURE__ */ jsxs40(Fragment5, { children: [
|
|
6272
|
+
/* @__PURE__ */ jsx76(Avatar, { name: author.name, src: author.avatarSrc, size: 40 }),
|
|
6273
|
+
/* @__PURE__ */ jsx76(Text, { size: "xs", weight: "bold", className: "whitespace-nowrap", children: author.name })
|
|
6184
6274
|
] }),
|
|
6185
|
-
badge && /* @__PURE__ */
|
|
6275
|
+
badge && /* @__PURE__ */ jsx76(Badge, { theme: badge.theme, size: "s", children: badge.label })
|
|
6186
6276
|
] }),
|
|
6187
|
-
/* @__PURE__ */
|
|
6188
|
-
date && /* @__PURE__ */
|
|
6277
|
+
/* @__PURE__ */ jsxs40(Layout, { align: "center", gap: 2, fullWidth: false, className: "shrink-0", children: [
|
|
6278
|
+
date && /* @__PURE__ */ jsx76(
|
|
6189
6279
|
Text,
|
|
6190
6280
|
{
|
|
6191
6281
|
size: "xxs",
|
|
@@ -6195,7 +6285,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
6195
6285
|
children: formatDate(date, "dateTime", "fr")
|
|
6196
6286
|
}
|
|
6197
6287
|
),
|
|
6198
|
-
hasChanges && /* @__PURE__ */
|
|
6288
|
+
hasChanges && /* @__PURE__ */ jsx76(
|
|
6199
6289
|
Icon,
|
|
6200
6290
|
{
|
|
6201
6291
|
name: "chevron-down",
|
|
@@ -6206,14 +6296,14 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
6206
6296
|
)
|
|
6207
6297
|
] })
|
|
6208
6298
|
] }),
|
|
6209
|
-
title && /* @__PURE__ */
|
|
6299
|
+
title && /* @__PURE__ */ jsx76(Text, { size: "xs", className: author ? "pl-[52px]" : void 0, children: title })
|
|
6210
6300
|
] });
|
|
6211
6301
|
if (!hasChanges) {
|
|
6212
|
-
return /* @__PURE__ */
|
|
6302
|
+
return /* @__PURE__ */ jsx76("div", { className: `${CARD_CLASS} p-3`, children: summary });
|
|
6213
6303
|
}
|
|
6214
|
-
return /* @__PURE__ */
|
|
6215
|
-
/* @__PURE__ */
|
|
6216
|
-
/* @__PURE__ */
|
|
6304
|
+
return /* @__PURE__ */ jsxs40(Collapsible, { className: CARD_CLASS, children: [
|
|
6305
|
+
/* @__PURE__ */ jsx76(CollapsibleTrigger, { className: "w-full cursor-pointer p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-blue-200", children: summary }),
|
|
6306
|
+
/* @__PURE__ */ jsx76(CollapsibleContent, { children: /* @__PURE__ */ jsx76(
|
|
6217
6307
|
Layout,
|
|
6218
6308
|
{
|
|
6219
6309
|
column: true,
|
|
@@ -6221,7 +6311,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
6221
6311
|
paddingX: 3,
|
|
6222
6312
|
paddingBottom: 3,
|
|
6223
6313
|
className: author ? "pl-[64px]" : void 0,
|
|
6224
|
-
children: changes.map((change, index) => /* @__PURE__ */
|
|
6314
|
+
children: changes.map((change, index) => /* @__PURE__ */ jsx76(
|
|
6225
6315
|
HistoryChangeRow,
|
|
6226
6316
|
{
|
|
6227
6317
|
change
|
|
@@ -6234,7 +6324,7 @@ var HistoryEntryCard = ({ entry }) => {
|
|
|
6234
6324
|
};
|
|
6235
6325
|
|
|
6236
6326
|
// src/ui/components/ui/history/HistoryList.tsx
|
|
6237
|
-
import { jsx as
|
|
6327
|
+
import { jsx as jsx77, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
6238
6328
|
var SKELETON_COUNT = 4;
|
|
6239
6329
|
var HistoryList = ({
|
|
6240
6330
|
entries,
|
|
@@ -6246,8 +6336,8 @@ var HistoryList = ({
|
|
|
6246
6336
|
emptyLabel = "Aucun historique",
|
|
6247
6337
|
emptyDescription = "Aucune action enregistr\xE9e pour le moment.",
|
|
6248
6338
|
notice
|
|
6249
|
-
}) => /* @__PURE__ */
|
|
6250
|
-
filters.length > 0 && /* @__PURE__ */
|
|
6339
|
+
}) => /* @__PURE__ */ jsxs41(Layout, { column: true, gap: 2, fullWidth: true, className: "flex-1", children: [
|
|
6340
|
+
filters.length > 0 && /* @__PURE__ */ jsx77(Layout, { gap: 2, wrap: true, fullWidth: true, justify: "center", children: filters.map((filter) => /* @__PURE__ */ jsx77(
|
|
6251
6341
|
TagBubble,
|
|
6252
6342
|
{
|
|
6253
6343
|
label: filter.label,
|
|
@@ -6258,22 +6348,22 @@ var HistoryList = ({
|
|
|
6258
6348
|
},
|
|
6259
6349
|
filter.value
|
|
6260
6350
|
)) }),
|
|
6261
|
-
isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */
|
|
6262
|
-
!isLoading && isError && /* @__PURE__ */
|
|
6263
|
-
!isLoading && !isError && entries.length === 0 && /* @__PURE__ */
|
|
6351
|
+
isLoading && Array.from({ length: SKELETON_COUNT }, (_, index) => /* @__PURE__ */ jsx77(Skeleton, { height: "72px" }, index)),
|
|
6352
|
+
!isLoading && isError && /* @__PURE__ */ jsx77(Text, { size: "s", color: "red-900", align: "center", children: errorLabel }),
|
|
6353
|
+
!isLoading && !isError && entries.length === 0 && /* @__PURE__ */ jsx77(
|
|
6264
6354
|
EmptyState,
|
|
6265
6355
|
{
|
|
6266
|
-
icon: /* @__PURE__ */
|
|
6356
|
+
icon: /* @__PURE__ */ jsx77(FaIcon, { name: "clock-rotate-left", size: 20 }),
|
|
6267
6357
|
title: emptyLabel,
|
|
6268
6358
|
description: emptyDescription
|
|
6269
6359
|
}
|
|
6270
6360
|
),
|
|
6271
|
-
!isLoading && !isError && entries.map((entry) => /* @__PURE__ */
|
|
6272
|
-
!isLoading && !isError && notice && /* @__PURE__ */
|
|
6361
|
+
!isLoading && !isError && entries.map((entry) => /* @__PURE__ */ jsx77(HistoryEntryCard, { entry }, entry.id)),
|
|
6362
|
+
!isLoading && !isError && notice && /* @__PURE__ */ jsx77(Text, { size: "xs", color: "grey-600", align: "center", children: notice })
|
|
6273
6363
|
] });
|
|
6274
6364
|
|
|
6275
6365
|
// src/ui/components/ui/history/HistoryDrawer.tsx
|
|
6276
|
-
import { jsx as
|
|
6366
|
+
import { jsx as jsx78, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
6277
6367
|
var HistoryDrawer = (_a) => {
|
|
6278
6368
|
var _b = _a, {
|
|
6279
6369
|
open,
|
|
@@ -6284,7 +6374,7 @@ var HistoryDrawer = (_a) => {
|
|
|
6284
6374
|
"onClose",
|
|
6285
6375
|
"title"
|
|
6286
6376
|
]);
|
|
6287
|
-
return /* @__PURE__ */
|
|
6377
|
+
return /* @__PURE__ */ jsxs42(
|
|
6288
6378
|
Drawer,
|
|
6289
6379
|
{
|
|
6290
6380
|
open,
|
|
@@ -6292,9 +6382,9 @@ var HistoryDrawer = (_a) => {
|
|
|
6292
6382
|
className: "z-[1060]",
|
|
6293
6383
|
overlayClassName: "z-[1050]",
|
|
6294
6384
|
children: [
|
|
6295
|
-
/* @__PURE__ */
|
|
6296
|
-
/* @__PURE__ */
|
|
6297
|
-
/* @__PURE__ */
|
|
6385
|
+
/* @__PURE__ */ jsxs42(DrawerHeader, { children: [
|
|
6386
|
+
/* @__PURE__ */ jsx78(DrawerTitle, { className: "uppercase", children: title }),
|
|
6387
|
+
/* @__PURE__ */ jsx78(DrawerClose, { asChild: true, children: /* @__PURE__ */ jsx78(
|
|
6298
6388
|
Icon,
|
|
6299
6389
|
{
|
|
6300
6390
|
name: "xmark",
|
|
@@ -6304,7 +6394,7 @@ var HistoryDrawer = (_a) => {
|
|
|
6304
6394
|
}
|
|
6305
6395
|
) })
|
|
6306
6396
|
] }),
|
|
6307
|
-
/* @__PURE__ */
|
|
6397
|
+
/* @__PURE__ */ jsx78(DrawerBody, { className: "flex flex-col", children: /* @__PURE__ */ jsx78(HistoryList, __spreadValues({}, listProps)) })
|
|
6308
6398
|
]
|
|
6309
6399
|
}
|
|
6310
6400
|
);
|
|
@@ -6312,7 +6402,7 @@ var HistoryDrawer = (_a) => {
|
|
|
6312
6402
|
|
|
6313
6403
|
// src/ui/components/ui/history/HistoryButton.tsx
|
|
6314
6404
|
import { useState as useState12 } from "react";
|
|
6315
|
-
import { Fragment as Fragment6, jsx as
|
|
6405
|
+
import { Fragment as Fragment6, jsx as jsx79, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6316
6406
|
var LABEL = "Historique";
|
|
6317
6407
|
var SHORT_TOOLTIP = "Voir l\u2019historique des actions";
|
|
6318
6408
|
var HistoryButton = (_a) => {
|
|
@@ -6333,10 +6423,10 @@ var HistoryButton = (_a) => {
|
|
|
6333
6423
|
onOpenChange == null ? void 0 : onOpenChange(nextIsOpen);
|
|
6334
6424
|
};
|
|
6335
6425
|
const open = () => changeOpen(true);
|
|
6336
|
-
const icon = /* @__PURE__ */
|
|
6337
|
-
return /* @__PURE__ */
|
|
6338
|
-
variant === "icon" ? /* @__PURE__ */
|
|
6339
|
-
/* @__PURE__ */
|
|
6426
|
+
const icon = /* @__PURE__ */ jsx79(FaIcon, { name: "clock-rotate-left", size: 14 });
|
|
6427
|
+
return /* @__PURE__ */ jsxs43(Fragment6, { children: [
|
|
6428
|
+
variant === "icon" ? /* @__PURE__ */ jsx79(Tooltip, { content: tooltip, className: "z-[1100]", children: /* @__PURE__ */ jsx79(Button, { iconLeft: icon, "aria-label": LABEL, onClick: open }) }) : /* @__PURE__ */ jsx79(Button, { label: LABEL, iconLeft: icon, onClick: open }),
|
|
6429
|
+
/* @__PURE__ */ jsx79(
|
|
6340
6430
|
HistoryDrawer,
|
|
6341
6431
|
__spreadValues({
|
|
6342
6432
|
open: isOpen,
|
|
@@ -6348,7 +6438,7 @@ var HistoryButton = (_a) => {
|
|
|
6348
6438
|
};
|
|
6349
6439
|
|
|
6350
6440
|
// src/ui/components/ui/Gantt.tsx
|
|
6351
|
-
import { jsx as
|
|
6441
|
+
import { jsx as jsx80, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6352
6442
|
var Gantt = ({
|
|
6353
6443
|
days,
|
|
6354
6444
|
rows,
|
|
@@ -6364,7 +6454,7 @@ var Gantt = ({
|
|
|
6364
6454
|
const bodyHeight = rows.length * rowHeight;
|
|
6365
6455
|
const clickable = Boolean(onRowClick);
|
|
6366
6456
|
const gridCols = { gridTemplateColumns: `${labelWidth}px minmax(0, 1fr)` };
|
|
6367
|
-
return /* @__PURE__ */
|
|
6457
|
+
return /* @__PURE__ */ jsxs44(
|
|
6368
6458
|
"div",
|
|
6369
6459
|
{
|
|
6370
6460
|
className: cn(
|
|
@@ -6372,13 +6462,13 @@ var Gantt = ({
|
|
|
6372
6462
|
className
|
|
6373
6463
|
),
|
|
6374
6464
|
children: [
|
|
6375
|
-
/* @__PURE__ */
|
|
6465
|
+
/* @__PURE__ */ jsxs44(
|
|
6376
6466
|
"div",
|
|
6377
6467
|
{
|
|
6378
6468
|
className: "grid border-b border-grey-300 bg-grey-100",
|
|
6379
6469
|
style: gridCols,
|
|
6380
6470
|
children: [
|
|
6381
|
-
/* @__PURE__ */
|
|
6471
|
+
/* @__PURE__ */ jsx80(
|
|
6382
6472
|
Layout,
|
|
6383
6473
|
{
|
|
6384
6474
|
align: "center",
|
|
@@ -6386,7 +6476,7 @@ var Gantt = ({
|
|
|
6386
6476
|
children: labelHeader
|
|
6387
6477
|
}
|
|
6388
6478
|
),
|
|
6389
|
-
/* @__PURE__ */
|
|
6479
|
+
/* @__PURE__ */ jsx80("div", { className: "relative h-[30px]", children: days.map((day) => /* @__PURE__ */ jsx80(
|
|
6390
6480
|
Layout,
|
|
6391
6481
|
{
|
|
6392
6482
|
fullHeight: true,
|
|
@@ -6400,13 +6490,13 @@ var Gantt = ({
|
|
|
6400
6490
|
]
|
|
6401
6491
|
}
|
|
6402
6492
|
),
|
|
6403
|
-
/* @__PURE__ */
|
|
6493
|
+
/* @__PURE__ */ jsxs44(
|
|
6404
6494
|
"div",
|
|
6405
6495
|
{
|
|
6406
6496
|
className: "grid overflow-y-auto overflow-x-hidden",
|
|
6407
6497
|
style: __spreadProps(__spreadValues({}, gridCols), { maxHeight }),
|
|
6408
6498
|
children: [
|
|
6409
|
-
/* @__PURE__ */
|
|
6499
|
+
/* @__PURE__ */ jsx80("div", { className: "min-w-0 border-r border-grey-300", children: rows.map((row, i) => /* @__PURE__ */ jsx80(
|
|
6410
6500
|
Layout,
|
|
6411
6501
|
{
|
|
6412
6502
|
column: true,
|
|
@@ -6423,8 +6513,8 @@ var Gantt = ({
|
|
|
6423
6513
|
},
|
|
6424
6514
|
row.key
|
|
6425
6515
|
)) }),
|
|
6426
|
-
/* @__PURE__ */
|
|
6427
|
-
days.map((day, i) => /* @__PURE__ */
|
|
6516
|
+
/* @__PURE__ */ jsx80("div", { className: "min-w-0 overflow-hidden", children: /* @__PURE__ */ jsxs44("div", { className: "relative w-full", style: { height: bodyHeight }, children: [
|
|
6517
|
+
days.map((day, i) => /* @__PURE__ */ jsx80(
|
|
6428
6518
|
"div",
|
|
6429
6519
|
{
|
|
6430
6520
|
className: cn(
|
|
@@ -6435,7 +6525,7 @@ var Gantt = ({
|
|
|
6435
6525
|
},
|
|
6436
6526
|
day.key
|
|
6437
6527
|
)),
|
|
6438
|
-
bands.map((band) => /* @__PURE__ */
|
|
6528
|
+
bands.map((band) => /* @__PURE__ */ jsx80(
|
|
6439
6529
|
"div",
|
|
6440
6530
|
{
|
|
6441
6531
|
title: band.title,
|
|
@@ -6446,7 +6536,7 @@ var Gantt = ({
|
|
|
6446
6536
|
)),
|
|
6447
6537
|
rows.map((row, i) => {
|
|
6448
6538
|
var _a, _b, _c;
|
|
6449
|
-
return /* @__PURE__ */
|
|
6539
|
+
return /* @__PURE__ */ jsx80(
|
|
6450
6540
|
"div",
|
|
6451
6541
|
{
|
|
6452
6542
|
className: cn(
|
|
@@ -6454,7 +6544,7 @@ var Gantt = ({
|
|
|
6454
6544
|
i === 0 ? "border-t-0" : "border-t border-grey-200"
|
|
6455
6545
|
),
|
|
6456
6546
|
style: { top: i * rowHeight, height: rowHeight },
|
|
6457
|
-
children: row.bar && /* @__PURE__ */
|
|
6547
|
+
children: row.bar && /* @__PURE__ */ jsx80(
|
|
6458
6548
|
Layout,
|
|
6459
6549
|
{
|
|
6460
6550
|
align: "center",
|
|
@@ -6469,7 +6559,7 @@ var Gantt = ({
|
|
|
6469
6559
|
background: row.bar.color,
|
|
6470
6560
|
borderColor: row.bar.color
|
|
6471
6561
|
},
|
|
6472
|
-
children: row.bar.label && /* @__PURE__ */
|
|
6562
|
+
children: row.bar.label && /* @__PURE__ */ jsx80(
|
|
6473
6563
|
"span",
|
|
6474
6564
|
{
|
|
6475
6565
|
className: "overflow-hidden text-ellipsis whitespace-nowrap text-[10px] font-semibold",
|
|
@@ -6491,7 +6581,7 @@ var Gantt = ({
|
|
|
6491
6581
|
}
|
|
6492
6582
|
);
|
|
6493
6583
|
};
|
|
6494
|
-
var GanttDot = ({ color }) => /* @__PURE__ */
|
|
6584
|
+
var GanttDot = ({ color }) => /* @__PURE__ */ jsx80(
|
|
6495
6585
|
"span",
|
|
6496
6586
|
{
|
|
6497
6587
|
className: "inline-block h-[9px] w-[9px] shrink-0 rounded-[3px]",
|
|
@@ -6501,7 +6591,7 @@ var GanttDot = ({ color }) => /* @__PURE__ */ jsx79(
|
|
|
6501
6591
|
var GanttSwatch = ({
|
|
6502
6592
|
color,
|
|
6503
6593
|
filled = true
|
|
6504
|
-
}) => /* @__PURE__ */
|
|
6594
|
+
}) => /* @__PURE__ */ jsx80(
|
|
6505
6595
|
"span",
|
|
6506
6596
|
{
|
|
6507
6597
|
className: "box-border inline-block h-3 w-[18px] shrink-0 rounded-[3px] border-[1.5px]",
|
|
@@ -6510,7 +6600,7 @@ var GanttSwatch = ({
|
|
|
6510
6600
|
);
|
|
6511
6601
|
|
|
6512
6602
|
// src/ui/components/ui/Bulk.tsx
|
|
6513
|
-
import { jsx as
|
|
6603
|
+
import { jsx as jsx81, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6514
6604
|
var BG_CLASS = {
|
|
6515
6605
|
"blue-700": "bg-blue-700",
|
|
6516
6606
|
"blue-900": "bg-blue-900",
|
|
@@ -6526,14 +6616,14 @@ var BG_CLASS = {
|
|
|
6526
6616
|
"orange-600": "bg-orange-600",
|
|
6527
6617
|
"purple-700": "bg-purple-700"
|
|
6528
6618
|
};
|
|
6529
|
-
var BulkActionSections = ({ sections }) => /* @__PURE__ */
|
|
6619
|
+
var BulkActionSections = ({ sections }) => /* @__PURE__ */ jsx81(
|
|
6530
6620
|
Layout,
|
|
6531
6621
|
{
|
|
6532
6622
|
role: "group",
|
|
6533
6623
|
fullHeight: true,
|
|
6534
6624
|
align: "stretch",
|
|
6535
6625
|
className: "[&>button:not(:last-child)]:rounded-r-none",
|
|
6536
|
-
children: sections.map((section, index) => /* @__PURE__ */
|
|
6626
|
+
children: sections.map((section, index) => /* @__PURE__ */ jsxs45(
|
|
6537
6627
|
"button",
|
|
6538
6628
|
{
|
|
6539
6629
|
type: "button",
|
|
@@ -6552,9 +6642,9 @@ var BulkActionSections = ({ sections }) => /* @__PURE__ */ jsx80(
|
|
|
6552
6642
|
))
|
|
6553
6643
|
}
|
|
6554
6644
|
);
|
|
6555
|
-
var BulkDisplaySections = ({ sections }) => /* @__PURE__ */
|
|
6556
|
-
index > 0 && (section.divider ? /* @__PURE__ */
|
|
6557
|
-
section.action ? /* @__PURE__ */
|
|
6645
|
+
var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ jsx81(Layout, { align: "center", gap: 3, className: "px-4", children: sections.map((section, index) => /* @__PURE__ */ jsxs45(Layout, { align: "center", gap: 3, children: [
|
|
6646
|
+
index > 0 && (section.divider ? /* @__PURE__ */ jsx81("span", { className: "h-11 w-px shrink-0 bg-white/40" }) : /* @__PURE__ */ jsx81("span", { className: "h-0.5 w-4 shrink-0 rounded-full bg-white/50" })),
|
|
6647
|
+
section.action ? /* @__PURE__ */ jsxs45(
|
|
6558
6648
|
"button",
|
|
6559
6649
|
{
|
|
6560
6650
|
type: "button",
|
|
@@ -6566,10 +6656,10 @@ var BulkDisplaySections = ({ sections }) => /* @__PURE__ */ jsx80(Layout, { alig
|
|
|
6566
6656
|
section.title
|
|
6567
6657
|
]
|
|
6568
6658
|
}
|
|
6569
|
-
) : section.caption ? /* @__PURE__ */
|
|
6570
|
-
/* @__PURE__ */
|
|
6571
|
-
/* @__PURE__ */
|
|
6572
|
-
] }) : section.badge ? /* @__PURE__ */
|
|
6659
|
+
) : section.caption ? /* @__PURE__ */ jsxs45(Layout, { column: true, fullWidth: false, className: "leading-tight text-white", children: [
|
|
6660
|
+
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-[10px] font-bold uppercase tracking-wide opacity-70", children: section.caption }),
|
|
6661
|
+
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-sm font-bold", children: section.title })
|
|
6662
|
+
] }) : section.badge ? /* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap rounded-full bg-white/15 px-2.5 py-1 text-xs font-bold text-white", children: section.title }) : /* @__PURE__ */ jsxs45("span", { className: "flex items-center gap-1.5 whitespace-nowrap text-sm font-bold text-white", children: [
|
|
6573
6663
|
section.icon,
|
|
6574
6664
|
section.title
|
|
6575
6665
|
] })
|
|
@@ -6581,7 +6671,7 @@ var Bulk = ({
|
|
|
6581
6671
|
color = "blue-700",
|
|
6582
6672
|
className,
|
|
6583
6673
|
variant = "actions"
|
|
6584
|
-
}) => /* @__PURE__ */
|
|
6674
|
+
}) => /* @__PURE__ */ jsxs45(
|
|
6585
6675
|
"div",
|
|
6586
6676
|
{
|
|
6587
6677
|
className: cn(
|
|
@@ -6590,27 +6680,27 @@ var Bulk = ({
|
|
|
6590
6680
|
className
|
|
6591
6681
|
),
|
|
6592
6682
|
children: [
|
|
6593
|
-
leftTitle && /* @__PURE__ */
|
|
6594
|
-
/* @__PURE__ */
|
|
6683
|
+
leftTitle && /* @__PURE__ */ jsxs45(Layout, { align: "center", gap: 6, className: "pr-6", children: [
|
|
6684
|
+
/* @__PURE__ */ jsx81(
|
|
6595
6685
|
"button",
|
|
6596
6686
|
{
|
|
6597
6687
|
type: "button",
|
|
6598
6688
|
"aria-label": "Fermer",
|
|
6599
6689
|
onClick: onClose,
|
|
6600
6690
|
className: "text-white hover:opacity-80",
|
|
6601
|
-
children: /* @__PURE__ */
|
|
6691
|
+
children: /* @__PURE__ */ jsx81(FaIcon, { name: "xmark", size: 20 })
|
|
6602
6692
|
}
|
|
6603
6693
|
),
|
|
6604
|
-
/* @__PURE__ */
|
|
6605
|
-
/* @__PURE__ */
|
|
6694
|
+
/* @__PURE__ */ jsx81("span", { className: "whitespace-nowrap text-sm font-bold", children: leftTitle }),
|
|
6695
|
+
/* @__PURE__ */ jsx81("span", { className: "h-11 w-px bg-white/40" })
|
|
6606
6696
|
] }),
|
|
6607
|
-
variant === "display" ? /* @__PURE__ */
|
|
6697
|
+
variant === "display" ? /* @__PURE__ */ jsx81(BulkDisplaySections, { sections }) : /* @__PURE__ */ jsx81(BulkActionSections, { sections })
|
|
6608
6698
|
]
|
|
6609
6699
|
}
|
|
6610
6700
|
);
|
|
6611
6701
|
|
|
6612
6702
|
// src/ui/components/ui/Timeline.tsx
|
|
6613
|
-
import { jsx as
|
|
6703
|
+
import { jsx as jsx82, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6614
6704
|
var Timeline = ({
|
|
6615
6705
|
items,
|
|
6616
6706
|
lineColor = "#F1F5F9",
|
|
@@ -6618,22 +6708,22 @@ var Timeline = ({
|
|
|
6618
6708
|
className
|
|
6619
6709
|
}) => {
|
|
6620
6710
|
if (items.length === 0) {
|
|
6621
|
-
return /* @__PURE__ */
|
|
6711
|
+
return /* @__PURE__ */ jsx82(Text, { size: "s", color: "grey-600", children: emptyLabel });
|
|
6622
6712
|
}
|
|
6623
|
-
return /* @__PURE__ */
|
|
6713
|
+
return /* @__PURE__ */ jsx82(Layout, { column: true, className, children: items.map((item, index) => {
|
|
6624
6714
|
var _a;
|
|
6625
6715
|
const isLast = index === items.length - 1;
|
|
6626
6716
|
const dotColor = (_a = item.color) != null ? _a : "#377EA1";
|
|
6627
|
-
return /* @__PURE__ */
|
|
6628
|
-
/* @__PURE__ */
|
|
6629
|
-
/* @__PURE__ */
|
|
6717
|
+
return /* @__PURE__ */ jsxs46(Layout, { gap: 3, children: [
|
|
6718
|
+
/* @__PURE__ */ jsxs46(Layout, { column: true, align: "center", className: "w-4", children: [
|
|
6719
|
+
/* @__PURE__ */ jsx82(
|
|
6630
6720
|
"span",
|
|
6631
6721
|
{
|
|
6632
6722
|
className: "mt-1 h-2.5 w-2.5 shrink-0 rounded-full",
|
|
6633
6723
|
style: { background: dotColor }
|
|
6634
6724
|
}
|
|
6635
6725
|
),
|
|
6636
|
-
!isLast && /* @__PURE__ */
|
|
6726
|
+
!isLast && /* @__PURE__ */ jsx82(
|
|
6637
6727
|
"span",
|
|
6638
6728
|
{
|
|
6639
6729
|
className: "w-0.5 flex-1 min-h-[16px]",
|
|
@@ -6641,10 +6731,10 @@ var Timeline = ({
|
|
|
6641
6731
|
}
|
|
6642
6732
|
)
|
|
6643
6733
|
] }),
|
|
6644
|
-
/* @__PURE__ */
|
|
6645
|
-
/* @__PURE__ */
|
|
6646
|
-
item.subtitle && /* @__PURE__ */
|
|
6647
|
-
item.description && /* @__PURE__ */
|
|
6734
|
+
/* @__PURE__ */ jsxs46(Layout, { column: true, gap: 0.5, className: isLast ? void 0 : "pb-4", children: [
|
|
6735
|
+
/* @__PURE__ */ jsx82(Text, { size: "s", weight: item.highlighted ? "bold" : "semibold", children: item.title }),
|
|
6736
|
+
item.subtitle && /* @__PURE__ */ jsx82(Text, { size: "xs", color: "grey-600", children: item.subtitle }),
|
|
6737
|
+
item.description && /* @__PURE__ */ jsx82("span", { className: "text-xs italic text-neutral-800", children: item.description })
|
|
6648
6738
|
] })
|
|
6649
6739
|
] }, item.id);
|
|
6650
6740
|
}) });
|
|
@@ -6653,7 +6743,7 @@ var Timeline = ({
|
|
|
6653
6743
|
// src/ui/components/ui/ColorPicker.tsx
|
|
6654
6744
|
import { forwardRef as forwardRef31, useState as useState13 } from "react";
|
|
6655
6745
|
import { cva as cva15 } from "class-variance-authority";
|
|
6656
|
-
import { jsx as
|
|
6746
|
+
import { jsx as jsx83, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
6657
6747
|
var swatchVariants = cva15(
|
|
6658
6748
|
"inline-flex shrink-0 overflow-hidden rounded-[6px] border border-grey-300",
|
|
6659
6749
|
{
|
|
@@ -6697,7 +6787,7 @@ var ColorPicker = forwardRef31(
|
|
|
6697
6787
|
if (value === void 0) setInternalColor(next);
|
|
6698
6788
|
onChange == null ? void 0 : onChange(next);
|
|
6699
6789
|
};
|
|
6700
|
-
return /* @__PURE__ */
|
|
6790
|
+
return /* @__PURE__ */ jsxs47(
|
|
6701
6791
|
Layout,
|
|
6702
6792
|
{
|
|
6703
6793
|
column: true,
|
|
@@ -6705,21 +6795,21 @@ var ColorPicker = forwardRef31(
|
|
|
6705
6795
|
gap: 1.5,
|
|
6706
6796
|
className: cn(disabled && "opacity-60", className),
|
|
6707
6797
|
children: [
|
|
6708
|
-
label && /* @__PURE__ */
|
|
6709
|
-
/* @__PURE__ */
|
|
6710
|
-
/* @__PURE__ */
|
|
6798
|
+
label && /* @__PURE__ */ jsx83("span", { className: "text-xs font-semibold text-neutral-800", children: label }),
|
|
6799
|
+
/* @__PURE__ */ jsxs47(Layout, { gap: 2, children: [
|
|
6800
|
+
/* @__PURE__ */ jsx83(
|
|
6711
6801
|
"label",
|
|
6712
6802
|
{
|
|
6713
6803
|
className: cn(
|
|
6714
6804
|
swatchVariants({ size }),
|
|
6715
6805
|
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
6716
6806
|
),
|
|
6717
|
-
children: /* @__PURE__ */
|
|
6807
|
+
children: /* @__PURE__ */ jsx83(
|
|
6718
6808
|
"span",
|
|
6719
6809
|
{
|
|
6720
6810
|
className: "relative block h-full w-full",
|
|
6721
6811
|
style: { backgroundColor: currentColor },
|
|
6722
|
-
children: /* @__PURE__ */
|
|
6812
|
+
children: /* @__PURE__ */ jsx83(
|
|
6723
6813
|
"input",
|
|
6724
6814
|
{
|
|
6725
6815
|
ref,
|
|
@@ -6734,7 +6824,7 @@ var ColorPicker = forwardRef31(
|
|
|
6734
6824
|
)
|
|
6735
6825
|
}
|
|
6736
6826
|
),
|
|
6737
|
-
/* @__PURE__ */
|
|
6827
|
+
/* @__PURE__ */ jsx83(
|
|
6738
6828
|
"input",
|
|
6739
6829
|
__spreadProps(__spreadValues({
|
|
6740
6830
|
type: "text",
|
|
@@ -6755,7 +6845,7 @@ ColorPicker.displayName = "ColorPicker";
|
|
|
6755
6845
|
|
|
6756
6846
|
// src/ui/components/ui/FileUploadZone.tsx
|
|
6757
6847
|
import { useCallback as useCallback4, useRef as useRef11, useState as useState14 } from "react";
|
|
6758
|
-
import { Fragment as Fragment7, jsx as
|
|
6848
|
+
import { Fragment as Fragment7, jsx as jsx84, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6759
6849
|
var ACCEPT_MAP = {
|
|
6760
6850
|
png: "image/png",
|
|
6761
6851
|
jpg: "image/jpeg",
|
|
@@ -6883,7 +6973,7 @@ var FileUploadZone = ({
|
|
|
6883
6973
|
onRemove == null ? void 0 : onRemove();
|
|
6884
6974
|
};
|
|
6885
6975
|
if (previewUrl) {
|
|
6886
|
-
return /* @__PURE__ */
|
|
6976
|
+
return /* @__PURE__ */ jsxs48(
|
|
6887
6977
|
Layout,
|
|
6888
6978
|
{
|
|
6889
6979
|
column: true,
|
|
@@ -6895,14 +6985,14 @@ var FileUploadZone = ({
|
|
|
6895
6985
|
className
|
|
6896
6986
|
),
|
|
6897
6987
|
children: [
|
|
6898
|
-
fileType && isPdf(fileType) ? /* @__PURE__ */
|
|
6988
|
+
fileType && isPdf(fileType) ? /* @__PURE__ */ jsx84(
|
|
6899
6989
|
"embed",
|
|
6900
6990
|
{
|
|
6901
6991
|
src: previewUrl,
|
|
6902
6992
|
type: "application/pdf",
|
|
6903
6993
|
className: "h-[500px] w-full rounded"
|
|
6904
6994
|
}
|
|
6905
|
-
) : /* @__PURE__ */
|
|
6995
|
+
) : /* @__PURE__ */ jsx84(
|
|
6906
6996
|
"img",
|
|
6907
6997
|
{
|
|
6908
6998
|
src: previewUrl,
|
|
@@ -6910,13 +7000,13 @@ var FileUploadZone = ({
|
|
|
6910
7000
|
className: "max-h-[400px] max-w-full rounded object-contain"
|
|
6911
7001
|
}
|
|
6912
7002
|
),
|
|
6913
|
-
/* @__PURE__ */
|
|
7003
|
+
/* @__PURE__ */ jsx84(
|
|
6914
7004
|
Button,
|
|
6915
7005
|
{
|
|
6916
7006
|
label: "Supprimer",
|
|
6917
7007
|
theme: "red-900",
|
|
6918
7008
|
size: "s",
|
|
6919
|
-
iconLeft: /* @__PURE__ */
|
|
7009
|
+
iconLeft: /* @__PURE__ */ jsx84(FaIcon, { name: "trash", size: 14 }),
|
|
6920
7010
|
onClick: handleRemove
|
|
6921
7011
|
}
|
|
6922
7012
|
)
|
|
@@ -6925,14 +7015,14 @@ var FileUploadZone = ({
|
|
|
6925
7015
|
);
|
|
6926
7016
|
}
|
|
6927
7017
|
const showBrowse = !compact && browseLabel !== false;
|
|
6928
|
-
return /* @__PURE__ */
|
|
7018
|
+
return /* @__PURE__ */ jsxs48(
|
|
6929
7019
|
Layout,
|
|
6930
7020
|
{
|
|
6931
7021
|
column: true,
|
|
6932
7022
|
gap: 1,
|
|
6933
7023
|
className: cn(fullWidth ? "w-full" : "w-fit", className),
|
|
6934
7024
|
children: [
|
|
6935
|
-
/* @__PURE__ */
|
|
7025
|
+
/* @__PURE__ */ jsxs48(
|
|
6936
7026
|
"label",
|
|
6937
7027
|
{
|
|
6938
7028
|
onDragOver: handleDragOver,
|
|
@@ -6946,7 +7036,7 @@ var FileUploadZone = ({
|
|
|
6946
7036
|
isDragging ? "border-solid border-blue-100 bg-blue-50" : cn(compact ? "border-grey-300" : "border-blue-50", "bg-grey-100")
|
|
6947
7037
|
),
|
|
6948
7038
|
children: [
|
|
6949
|
-
/* @__PURE__ */
|
|
7039
|
+
/* @__PURE__ */ jsx84(
|
|
6950
7040
|
"input",
|
|
6951
7041
|
{
|
|
6952
7042
|
ref: inputRef,
|
|
@@ -6958,11 +7048,11 @@ var FileUploadZone = ({
|
|
|
6958
7048
|
className: "hidden"
|
|
6959
7049
|
}
|
|
6960
7050
|
),
|
|
6961
|
-
showIcon && /* @__PURE__ */
|
|
6962
|
-
/* @__PURE__ */
|
|
6963
|
-
showBrowse && /* @__PURE__ */
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
7051
|
+
showIcon && /* @__PURE__ */ jsx84(FaIcon, { name: "cloud-arrow-up", size: 28, className: "text-blue-700" }),
|
|
7052
|
+
/* @__PURE__ */ jsx84("span", { className: "text-center text-sm text-grey-600", children: label }),
|
|
7053
|
+
showBrowse && /* @__PURE__ */ jsxs48(Fragment7, { children: [
|
|
7054
|
+
/* @__PURE__ */ jsx84("span", { className: "text-center text-xs text-grey-600", children: "ou" }),
|
|
7055
|
+
/* @__PURE__ */ jsx84(
|
|
6966
7056
|
Button,
|
|
6967
7057
|
{
|
|
6968
7058
|
label: browseLabel,
|
|
@@ -6976,15 +7066,15 @@ var FileUploadZone = ({
|
|
|
6976
7066
|
}
|
|
6977
7067
|
)
|
|
6978
7068
|
] }),
|
|
6979
|
-
sublabel && /* @__PURE__ */
|
|
7069
|
+
sublabel && /* @__PURE__ */ jsx84("span", { className: "text-center text-xs text-grey-500", children: sublabel })
|
|
6980
7070
|
]
|
|
6981
7071
|
}
|
|
6982
7072
|
),
|
|
6983
|
-
showFileName && fileName && /* @__PURE__ */
|
|
6984
|
-
/* @__PURE__ */
|
|
6985
|
-
/* @__PURE__ */
|
|
7073
|
+
showFileName && fileName && /* @__PURE__ */ jsxs48(Layout, { align: "center", justify: "center", gap: 2, children: [
|
|
7074
|
+
/* @__PURE__ */ jsx84(FaIcon, { name: "file", size: 16, className: "text-green-700" }),
|
|
7075
|
+
/* @__PURE__ */ jsx84("span", { className: "text-sm text-green-700", children: fileName })
|
|
6986
7076
|
] }),
|
|
6987
|
-
inlineError && /* @__PURE__ */
|
|
7077
|
+
inlineError && /* @__PURE__ */ jsx84("span", { className: "text-center text-sm text-red-900", children: inlineError })
|
|
6988
7078
|
]
|
|
6989
7079
|
}
|
|
6990
7080
|
);
|
|
@@ -6992,7 +7082,7 @@ var FileUploadZone = ({
|
|
|
6992
7082
|
|
|
6993
7083
|
// src/ui/components/ui/FilePicker.tsx
|
|
6994
7084
|
import { useRef as useRef12 } from "react";
|
|
6995
|
-
import { Fragment as Fragment8, jsx as
|
|
7085
|
+
import { Fragment as Fragment8, jsx as jsx85, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6996
7086
|
var FilePicker = ({
|
|
6997
7087
|
label,
|
|
6998
7088
|
onSelect,
|
|
@@ -7006,8 +7096,8 @@ var FilePicker = ({
|
|
|
7006
7096
|
className
|
|
7007
7097
|
}) => {
|
|
7008
7098
|
const inputRef = useRef12(null);
|
|
7009
|
-
return /* @__PURE__ */
|
|
7010
|
-
/* @__PURE__ */
|
|
7099
|
+
return /* @__PURE__ */ jsxs49(Fragment8, { children: [
|
|
7100
|
+
/* @__PURE__ */ jsx85(
|
|
7011
7101
|
"input",
|
|
7012
7102
|
{
|
|
7013
7103
|
ref: inputRef,
|
|
@@ -7023,7 +7113,7 @@ var FilePicker = ({
|
|
|
7023
7113
|
}
|
|
7024
7114
|
}
|
|
7025
7115
|
),
|
|
7026
|
-
/* @__PURE__ */
|
|
7116
|
+
/* @__PURE__ */ jsx85(Tooltip, { content: label, children: /* @__PURE__ */ jsx85(
|
|
7027
7117
|
Icon,
|
|
7028
7118
|
{
|
|
7029
7119
|
name: icon,
|
|
@@ -7045,7 +7135,7 @@ var FilePicker = ({
|
|
|
7045
7135
|
// src/ui/components/ui/Item.tsx
|
|
7046
7136
|
import { forwardRef as forwardRef32 } from "react";
|
|
7047
7137
|
import { cva as cva16 } from "class-variance-authority";
|
|
7048
|
-
import { jsx as
|
|
7138
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
7049
7139
|
var itemVariants = cva16(
|
|
7050
7140
|
"group/item flex items-center rounded-[6px] border border-transparent transition-colors",
|
|
7051
7141
|
{
|
|
@@ -7066,7 +7156,7 @@ var itemVariants = cva16(
|
|
|
7066
7156
|
var Item4 = forwardRef32(
|
|
7067
7157
|
(_a, ref) => {
|
|
7068
7158
|
var _b = _a, { variant, size, className } = _b, props = __objRest(_b, ["variant", "size", "className"]);
|
|
7069
|
-
return /* @__PURE__ */
|
|
7159
|
+
return /* @__PURE__ */ jsx86(
|
|
7070
7160
|
"div",
|
|
7071
7161
|
__spreadValues({
|
|
7072
7162
|
ref,
|
|
@@ -7091,7 +7181,7 @@ var itemMediaVariants = cva16(
|
|
|
7091
7181
|
);
|
|
7092
7182
|
var ItemMedia = (_a) => {
|
|
7093
7183
|
var _b = _a, { variant, className } = _b, props = __objRest(_b, ["variant", "className"]);
|
|
7094
|
-
return /* @__PURE__ */
|
|
7184
|
+
return /* @__PURE__ */ jsx86("div", __spreadValues({ className: cn(itemMediaVariants({ variant }), className) }, props));
|
|
7095
7185
|
};
|
|
7096
7186
|
var ItemContent = (_a) => {
|
|
7097
7187
|
var _b = _a, {
|
|
@@ -7099,7 +7189,7 @@ var ItemContent = (_a) => {
|
|
|
7099
7189
|
} = _b, props = __objRest(_b, [
|
|
7100
7190
|
"className"
|
|
7101
7191
|
]);
|
|
7102
|
-
return /* @__PURE__ */
|
|
7192
|
+
return /* @__PURE__ */ jsx86(
|
|
7103
7193
|
"div",
|
|
7104
7194
|
__spreadValues({
|
|
7105
7195
|
className: cn("flex min-w-0 flex-1 flex-col gap-1", className)
|
|
@@ -7112,7 +7202,7 @@ var ItemTitle = (_a) => {
|
|
|
7112
7202
|
} = _b, props = __objRest(_b, [
|
|
7113
7203
|
"className"
|
|
7114
7204
|
]);
|
|
7115
|
-
return /* @__PURE__ */
|
|
7205
|
+
return /* @__PURE__ */ jsx86(
|
|
7116
7206
|
"div",
|
|
7117
7207
|
__spreadValues({
|
|
7118
7208
|
className: cn(
|
|
@@ -7128,7 +7218,7 @@ var ItemDescription = (_a) => {
|
|
|
7128
7218
|
} = _b, props = __objRest(_b, [
|
|
7129
7219
|
"className"
|
|
7130
7220
|
]);
|
|
7131
|
-
return /* @__PURE__ */
|
|
7221
|
+
return /* @__PURE__ */ jsx86("div", __spreadValues({ className: cn("text-sm text-grey-500", className) }, props));
|
|
7132
7222
|
};
|
|
7133
7223
|
var ItemActions = (_a) => {
|
|
7134
7224
|
var _b = _a, {
|
|
@@ -7136,7 +7226,7 @@ var ItemActions = (_a) => {
|
|
|
7136
7226
|
} = _b, props = __objRest(_b, [
|
|
7137
7227
|
"className"
|
|
7138
7228
|
]);
|
|
7139
|
-
return /* @__PURE__ */
|
|
7229
|
+
return /* @__PURE__ */ jsx86(
|
|
7140
7230
|
"div",
|
|
7141
7231
|
__spreadValues({
|
|
7142
7232
|
className: cn("flex shrink-0 items-center gap-2", className)
|
|
@@ -7145,7 +7235,7 @@ var ItemActions = (_a) => {
|
|
|
7145
7235
|
};
|
|
7146
7236
|
|
|
7147
7237
|
// src/ui/components/ui/Attachment.tsx
|
|
7148
|
-
import { jsx as
|
|
7238
|
+
import { jsx as jsx87, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
7149
7239
|
var Attachment = ({
|
|
7150
7240
|
name,
|
|
7151
7241
|
size,
|
|
@@ -7159,7 +7249,7 @@ var Attachment = ({
|
|
|
7159
7249
|
}) => {
|
|
7160
7250
|
const isUploading = status === "uploading";
|
|
7161
7251
|
const isError = status === "error";
|
|
7162
|
-
return /* @__PURE__ */
|
|
7252
|
+
return /* @__PURE__ */ jsxs50(
|
|
7163
7253
|
Item4,
|
|
7164
7254
|
{
|
|
7165
7255
|
variant: "outline",
|
|
@@ -7171,12 +7261,12 @@ var Attachment = ({
|
|
|
7171
7261
|
),
|
|
7172
7262
|
style: { width },
|
|
7173
7263
|
children: [
|
|
7174
|
-
/* @__PURE__ */
|
|
7264
|
+
/* @__PURE__ */ jsx87(
|
|
7175
7265
|
ItemMedia,
|
|
7176
7266
|
{
|
|
7177
7267
|
variant: "icon",
|
|
7178
7268
|
className: cn(isError && "border-red-900 bg-red-50"),
|
|
7179
|
-
children: isUploading ? /* @__PURE__ */
|
|
7269
|
+
children: isUploading ? /* @__PURE__ */ jsx87(Spinner, { size: "s", color: "blue-700" }) : /* @__PURE__ */ jsx87(
|
|
7180
7270
|
FaIcon,
|
|
7181
7271
|
{
|
|
7182
7272
|
name: isError ? "triangle-exclamation" : "file",
|
|
@@ -7186,33 +7276,33 @@ var Attachment = ({
|
|
|
7186
7276
|
)
|
|
7187
7277
|
}
|
|
7188
7278
|
),
|
|
7189
|
-
/* @__PURE__ */
|
|
7190
|
-
/* @__PURE__ */
|
|
7191
|
-
isUploading ? /* @__PURE__ */
|
|
7279
|
+
/* @__PURE__ */ jsxs50(ItemContent, { children: [
|
|
7280
|
+
/* @__PURE__ */ jsx87(ItemTitle, { children: name }),
|
|
7281
|
+
isUploading ? /* @__PURE__ */ jsxs50(ItemDescription, { className: "text-xs", children: [
|
|
7192
7282
|
"Uploading - ",
|
|
7193
7283
|
progress,
|
|
7194
7284
|
"%"
|
|
7195
|
-
] }) : isError ? /* @__PURE__ */
|
|
7285
|
+
] }) : isError ? /* @__PURE__ */ jsx87(ItemDescription, { className: "text-xs text-red-900", children: errorMessage }) : size && /* @__PURE__ */ jsx87(ItemDescription, { className: "text-xs", children: size })
|
|
7196
7286
|
] }),
|
|
7197
|
-
(onRetry || onRemove) && /* @__PURE__ */
|
|
7198
|
-
isError && onRetry && /* @__PURE__ */
|
|
7287
|
+
(onRetry || onRemove) && /* @__PURE__ */ jsxs50(ItemActions, { children: [
|
|
7288
|
+
isError && onRetry && /* @__PURE__ */ jsx87(
|
|
7199
7289
|
"button",
|
|
7200
7290
|
{
|
|
7201
7291
|
type: "button",
|
|
7202
7292
|
onClick: onRetry,
|
|
7203
7293
|
"aria-label": `R\xE9essayer l'envoi de ${name}`,
|
|
7204
7294
|
className: "text-grey-400 hover:text-grey-600",
|
|
7205
|
-
children: /* @__PURE__ */
|
|
7295
|
+
children: /* @__PURE__ */ jsx87(FaIcon, { name: "rotate-right", size: 12 })
|
|
7206
7296
|
}
|
|
7207
7297
|
),
|
|
7208
|
-
onRemove && /* @__PURE__ */
|
|
7298
|
+
onRemove && /* @__PURE__ */ jsx87(
|
|
7209
7299
|
"button",
|
|
7210
7300
|
{
|
|
7211
7301
|
type: "button",
|
|
7212
7302
|
onClick: onRemove,
|
|
7213
7303
|
"aria-label": `Retirer ${name}`,
|
|
7214
7304
|
className: "text-grey-400 hover:text-grey-600",
|
|
7215
|
-
children: /* @__PURE__ */
|
|
7305
|
+
children: /* @__PURE__ */ jsx87(FaIcon, { name: "xmark", size: 12 })
|
|
7216
7306
|
}
|
|
7217
7307
|
)
|
|
7218
7308
|
] })
|
|
@@ -7224,7 +7314,7 @@ var Attachment = ({
|
|
|
7224
7314
|
// src/ui/components/ui/PdfPreview.tsx
|
|
7225
7315
|
import { useState as useState15 } from "react";
|
|
7226
7316
|
import { Document, Page, pdfjs } from "react-pdf";
|
|
7227
|
-
import { jsx as
|
|
7317
|
+
import { jsx as jsx88, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
7228
7318
|
pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.mjs`;
|
|
7229
7319
|
var PdfPreview = ({
|
|
7230
7320
|
file,
|
|
@@ -7235,9 +7325,9 @@ var PdfPreview = ({
|
|
|
7235
7325
|
const [hasError, setHasError] = useState15(false);
|
|
7236
7326
|
const [numPages, setNumPages] = useState15(0);
|
|
7237
7327
|
const height = Math.round(width * 1.3);
|
|
7238
|
-
const thumbnailSkeleton = /* @__PURE__ */
|
|
7328
|
+
const thumbnailSkeleton = /* @__PURE__ */ jsx88(Skeleton, { width, height });
|
|
7239
7329
|
if (hasError) {
|
|
7240
|
-
return /* @__PURE__ */
|
|
7330
|
+
return /* @__PURE__ */ jsxs51(
|
|
7241
7331
|
Layout,
|
|
7242
7332
|
{
|
|
7243
7333
|
column: true,
|
|
@@ -7250,13 +7340,13 @@ var PdfPreview = ({
|
|
|
7250
7340
|
),
|
|
7251
7341
|
style: { width, height },
|
|
7252
7342
|
children: [
|
|
7253
|
-
/* @__PURE__ */
|
|
7254
|
-
/* @__PURE__ */
|
|
7343
|
+
/* @__PURE__ */ jsx88(FaIcon, { name: "file-pdf", size: 24 }),
|
|
7344
|
+
/* @__PURE__ */ jsx88("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
|
|
7255
7345
|
]
|
|
7256
7346
|
}
|
|
7257
7347
|
);
|
|
7258
7348
|
}
|
|
7259
|
-
return /* @__PURE__ */
|
|
7349
|
+
return /* @__PURE__ */ jsx88(
|
|
7260
7350
|
"div",
|
|
7261
7351
|
{
|
|
7262
7352
|
className: cn(
|
|
@@ -7264,7 +7354,7 @@ var PdfPreview = ({
|
|
|
7264
7354
|
className
|
|
7265
7355
|
),
|
|
7266
7356
|
style: { width, maxHeight },
|
|
7267
|
-
children: /* @__PURE__ */
|
|
7357
|
+
children: /* @__PURE__ */ jsx88(
|
|
7268
7358
|
Document,
|
|
7269
7359
|
{
|
|
7270
7360
|
file,
|
|
@@ -7272,7 +7362,7 @@ var PdfPreview = ({
|
|
|
7272
7362
|
onLoadError: () => setHasError(true),
|
|
7273
7363
|
loading: thumbnailSkeleton,
|
|
7274
7364
|
error: thumbnailSkeleton,
|
|
7275
|
-
children: /* @__PURE__ */
|
|
7365
|
+
children: /* @__PURE__ */ jsx88(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ jsx88(
|
|
7276
7366
|
Page,
|
|
7277
7367
|
{
|
|
7278
7368
|
pageNumber: i + 1,
|
|
@@ -7295,7 +7385,7 @@ import {
|
|
|
7295
7385
|
useRef as useRef13,
|
|
7296
7386
|
useState as useState16
|
|
7297
7387
|
} from "react";
|
|
7298
|
-
import { Fragment as Fragment9, jsx as
|
|
7388
|
+
import { Fragment as Fragment9, jsx as jsx89, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7299
7389
|
var formatVideoDuration = (seconds) => {
|
|
7300
7390
|
if (seconds === void 0 || !Number.isFinite(seconds) || seconds < 0)
|
|
7301
7391
|
return "";
|
|
@@ -7394,8 +7484,8 @@ var VideoPlayer = ({
|
|
|
7394
7484
|
const stopBubbling = (e) => {
|
|
7395
7485
|
e.stopPropagation();
|
|
7396
7486
|
};
|
|
7397
|
-
return /* @__PURE__ */
|
|
7398
|
-
/* @__PURE__ */
|
|
7487
|
+
return /* @__PURE__ */ jsxs52(Fragment9, { children: [
|
|
7488
|
+
/* @__PURE__ */ jsxs52(
|
|
7399
7489
|
Layout,
|
|
7400
7490
|
{
|
|
7401
7491
|
className: cn(
|
|
@@ -7406,7 +7496,7 @@ var VideoPlayer = ({
|
|
|
7406
7496
|
onClick: stopBubbling,
|
|
7407
7497
|
"data-testid": "video-player",
|
|
7408
7498
|
children: [
|
|
7409
|
-
isInlinePlaying ? /* @__PURE__ */
|
|
7499
|
+
isInlinePlaying ? /* @__PURE__ */ jsx89(
|
|
7410
7500
|
"video",
|
|
7411
7501
|
{
|
|
7412
7502
|
ref: attachInlineVideo,
|
|
@@ -7418,7 +7508,7 @@ var VideoPlayer = ({
|
|
|
7418
7508
|
className: "h-full w-full bg-black object-contain",
|
|
7419
7509
|
"aria-label": title
|
|
7420
7510
|
}
|
|
7421
|
-
) : /* @__PURE__ */
|
|
7511
|
+
) : /* @__PURE__ */ jsxs52(
|
|
7422
7512
|
"button",
|
|
7423
7513
|
{
|
|
7424
7514
|
type: "button",
|
|
@@ -7426,7 +7516,7 @@ var VideoPlayer = ({
|
|
|
7426
7516
|
"aria-label": `Lire la vid\xE9o ${title}`,
|
|
7427
7517
|
className: "group relative flex h-full w-full items-center justify-center",
|
|
7428
7518
|
children: [
|
|
7429
|
-
visiblePoster ? /* @__PURE__ */
|
|
7519
|
+
visiblePoster ? /* @__PURE__ */ jsx89(
|
|
7430
7520
|
"img",
|
|
7431
7521
|
{
|
|
7432
7522
|
src: visiblePoster,
|
|
@@ -7437,7 +7527,7 @@ var VideoPlayer = ({
|
|
|
7437
7527
|
) : (
|
|
7438
7528
|
// Sans vignette : première image de la vidéo (métadonnées seulement,
|
|
7439
7529
|
// `#t=0.1` force l'affichage d'une frame), tuile sombre si ça échoue.
|
|
7440
|
-
!hasFramePreviewError && /* @__PURE__ */
|
|
7530
|
+
!hasFramePreviewError && /* @__PURE__ */ jsx89(
|
|
7441
7531
|
"video",
|
|
7442
7532
|
{
|
|
7443
7533
|
src: `${src}#t=0.1`,
|
|
@@ -7452,12 +7542,12 @@ var VideoPlayer = ({
|
|
|
7452
7542
|
}
|
|
7453
7543
|
)
|
|
7454
7544
|
),
|
|
7455
|
-
/* @__PURE__ */
|
|
7456
|
-
formattedDuration && /* @__PURE__ */
|
|
7545
|
+
/* @__PURE__ */ jsx89("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__ */ jsx89(FaIcon, { name: "play", family: "solid", size: 18 }) }),
|
|
7546
|
+
formattedDuration && /* @__PURE__ */ jsx89("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 })
|
|
7457
7547
|
]
|
|
7458
7548
|
}
|
|
7459
7549
|
),
|
|
7460
|
-
label && /* @__PURE__ */
|
|
7550
|
+
label && /* @__PURE__ */ jsx89(
|
|
7461
7551
|
Layout,
|
|
7462
7552
|
{
|
|
7463
7553
|
width: "auto",
|
|
@@ -7465,14 +7555,14 @@ var VideoPlayer = ({
|
|
|
7465
7555
|
children: label
|
|
7466
7556
|
}
|
|
7467
7557
|
),
|
|
7468
|
-
/* @__PURE__ */
|
|
7558
|
+
/* @__PURE__ */ jsxs52(
|
|
7469
7559
|
Layout,
|
|
7470
7560
|
{
|
|
7471
7561
|
width: "auto",
|
|
7472
7562
|
gap: 1,
|
|
7473
7563
|
className: "absolute right-1 top-1 rounded-full bg-white/90",
|
|
7474
7564
|
children: [
|
|
7475
|
-
/* @__PURE__ */
|
|
7565
|
+
/* @__PURE__ */ jsx89(Tooltip, { content: "Agrandir la vid\xE9o", children: /* @__PURE__ */ jsx89(
|
|
7476
7566
|
Icon,
|
|
7477
7567
|
{
|
|
7478
7568
|
name: "up-right-and-down-left-from-center",
|
|
@@ -7481,7 +7571,7 @@ var VideoPlayer = ({
|
|
|
7481
7571
|
"aria-label": "Agrandir la vid\xE9o"
|
|
7482
7572
|
}
|
|
7483
7573
|
) }),
|
|
7484
|
-
/* @__PURE__ */
|
|
7574
|
+
/* @__PURE__ */ jsx89(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx89(
|
|
7485
7575
|
Icon,
|
|
7486
7576
|
{
|
|
7487
7577
|
name: "download",
|
|
@@ -7493,7 +7583,7 @@ var VideoPlayer = ({
|
|
|
7493
7583
|
]
|
|
7494
7584
|
}
|
|
7495
7585
|
),
|
|
7496
|
-
meta && !isInlinePlaying && /* @__PURE__ */
|
|
7586
|
+
meta && !isInlinePlaying && /* @__PURE__ */ jsx89(
|
|
7497
7587
|
Layout,
|
|
7498
7588
|
{
|
|
7499
7589
|
width: "auto",
|
|
@@ -7504,7 +7594,7 @@ var VideoPlayer = ({
|
|
|
7504
7594
|
]
|
|
7505
7595
|
}
|
|
7506
7596
|
),
|
|
7507
|
-
/* @__PURE__ */
|
|
7597
|
+
/* @__PURE__ */ jsxs52(
|
|
7508
7598
|
Modal,
|
|
7509
7599
|
{
|
|
7510
7600
|
open: isExpanded,
|
|
@@ -7512,9 +7602,9 @@ var VideoPlayer = ({
|
|
|
7512
7602
|
onOpenAutoFocus: focusExpandedVideo,
|
|
7513
7603
|
width: "70vw",
|
|
7514
7604
|
children: [
|
|
7515
|
-
/* @__PURE__ */
|
|
7516
|
-
/* @__PURE__ */
|
|
7517
|
-
/* @__PURE__ */
|
|
7605
|
+
/* @__PURE__ */ jsx89(ModalHeader, { className: "items-start text-left", children: /* @__PURE__ */ jsxs52(Layout, { align: "center", justify: "between", fullWidth: true, gap: 2, children: [
|
|
7606
|
+
/* @__PURE__ */ jsxs52(Layout, { align: "center", gap: 2, className: "min-w-0", children: [
|
|
7607
|
+
/* @__PURE__ */ jsx89(
|
|
7518
7608
|
IconBadge,
|
|
7519
7609
|
{
|
|
7520
7610
|
name: "video",
|
|
@@ -7523,10 +7613,10 @@ var VideoPlayer = ({
|
|
|
7523
7613
|
iconColor: "blue_900"
|
|
7524
7614
|
}
|
|
7525
7615
|
),
|
|
7526
|
-
/* @__PURE__ */
|
|
7616
|
+
/* @__PURE__ */ jsx89(ModalTitle, { className: "truncate", children: title })
|
|
7527
7617
|
] }),
|
|
7528
|
-
/* @__PURE__ */
|
|
7529
|
-
/* @__PURE__ */
|
|
7618
|
+
/* @__PURE__ */ jsxs52(Layout, { width: "auto", align: "center", gap: 1, children: [
|
|
7619
|
+
/* @__PURE__ */ jsx89(Tooltip, { content: "T\xE9l\xE9charger la vid\xE9o", children: /* @__PURE__ */ jsx89(
|
|
7530
7620
|
Icon,
|
|
7531
7621
|
{
|
|
7532
7622
|
name: "download",
|
|
@@ -7535,7 +7625,7 @@ var VideoPlayer = ({
|
|
|
7535
7625
|
"aria-label": "T\xE9l\xE9charger la vid\xE9o"
|
|
7536
7626
|
}
|
|
7537
7627
|
) }),
|
|
7538
|
-
/* @__PURE__ */
|
|
7628
|
+
/* @__PURE__ */ jsx89(ModalClose, { asChild: true, children: /* @__PURE__ */ jsx89(
|
|
7539
7629
|
Icon,
|
|
7540
7630
|
{
|
|
7541
7631
|
name: "xmark",
|
|
@@ -7547,7 +7637,7 @@ var VideoPlayer = ({
|
|
|
7547
7637
|
) })
|
|
7548
7638
|
] })
|
|
7549
7639
|
] }) }),
|
|
7550
|
-
/* @__PURE__ */
|
|
7640
|
+
/* @__PURE__ */ jsx89(ModalBody, { children: /* @__PURE__ */ jsx89(
|
|
7551
7641
|
"video",
|
|
7552
7642
|
{
|
|
7553
7643
|
ref: attachExpandedVideo,
|
|
@@ -7569,7 +7659,7 @@ var VideoPlayer = ({
|
|
|
7569
7659
|
|
|
7570
7660
|
// src/ui/components/ui/ScrollArea.tsx
|
|
7571
7661
|
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
|
|
7572
|
-
import { jsx as
|
|
7662
|
+
import { jsx as jsx90, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
7573
7663
|
var HIDDEN_SCROLLBAR_CLASSNAME = "w-0 h-0 opacity-0";
|
|
7574
7664
|
var ScrollArea = (_a) => {
|
|
7575
7665
|
var _b = _a, {
|
|
@@ -7583,13 +7673,13 @@ var ScrollArea = (_a) => {
|
|
|
7583
7673
|
"orientation",
|
|
7584
7674
|
"viewportRef"
|
|
7585
7675
|
]);
|
|
7586
|
-
return /* @__PURE__ */
|
|
7676
|
+
return /* @__PURE__ */ jsxs53(
|
|
7587
7677
|
RadixScrollArea.Root,
|
|
7588
7678
|
__spreadProps(__spreadValues({
|
|
7589
7679
|
className: cn("relative overflow-hidden", className)
|
|
7590
7680
|
}, props), {
|
|
7591
7681
|
children: [
|
|
7592
|
-
/* @__PURE__ */
|
|
7682
|
+
/* @__PURE__ */ jsx90(
|
|
7593
7683
|
RadixScrollArea.Viewport,
|
|
7594
7684
|
{
|
|
7595
7685
|
ref: viewportRef,
|
|
@@ -7601,23 +7691,23 @@ var ScrollArea = (_a) => {
|
|
|
7601
7691
|
children
|
|
7602
7692
|
}
|
|
7603
7693
|
),
|
|
7604
|
-
(orientation === "vertical" || orientation === "both") && /* @__PURE__ */
|
|
7694
|
+
(orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx90(
|
|
7605
7695
|
RadixScrollArea.Scrollbar,
|
|
7606
7696
|
{
|
|
7607
7697
|
orientation: "vertical",
|
|
7608
7698
|
className: HIDDEN_SCROLLBAR_CLASSNAME,
|
|
7609
|
-
children: /* @__PURE__ */
|
|
7699
|
+
children: /* @__PURE__ */ jsx90(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
|
|
7610
7700
|
}
|
|
7611
7701
|
),
|
|
7612
|
-
(orientation === "horizontal" || orientation === "both") && /* @__PURE__ */
|
|
7702
|
+
(orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx90(
|
|
7613
7703
|
RadixScrollArea.Scrollbar,
|
|
7614
7704
|
{
|
|
7615
7705
|
orientation: "horizontal",
|
|
7616
7706
|
className: HIDDEN_SCROLLBAR_CLASSNAME,
|
|
7617
|
-
children: /* @__PURE__ */
|
|
7707
|
+
children: /* @__PURE__ */ jsx90(RadixScrollArea.Thumb, { className: "relative flex-1 rounded-full bg-grey-400" })
|
|
7618
7708
|
}
|
|
7619
7709
|
),
|
|
7620
|
-
/* @__PURE__ */
|
|
7710
|
+
/* @__PURE__ */ jsx90(RadixScrollArea.Corner, {})
|
|
7621
7711
|
]
|
|
7622
7712
|
})
|
|
7623
7713
|
);
|
|
@@ -7625,7 +7715,7 @@ var ScrollArea = (_a) => {
|
|
|
7625
7715
|
|
|
7626
7716
|
// src/ui/components/ui/Message.tsx
|
|
7627
7717
|
import { forwardRef as forwardRef33 } from "react";
|
|
7628
|
-
import { jsx as
|
|
7718
|
+
import { jsx as jsx91, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
7629
7719
|
var BUBBLE_BACKGROUND = {
|
|
7630
7720
|
own: { solid: "bg-blue-700", pale: "bg-blue-50" },
|
|
7631
7721
|
teammate: { solid: "bg-blue-100", pale: "bg-blue-100" },
|
|
@@ -7684,7 +7774,7 @@ var Message = forwardRef33(
|
|
|
7684
7774
|
const isInverted = isOwn && variant === "solid";
|
|
7685
7775
|
const contentColor = isInverted ? "white" : "neutral-800";
|
|
7686
7776
|
const metaColor = isInverted ? "white" : "grey-500";
|
|
7687
|
-
const avatar = showAuthor ? /* @__PURE__ */
|
|
7777
|
+
const avatar = showAuthor ? /* @__PURE__ */ jsx91(Avatar, { name: authorName, src: authorSrc, size: avatarSize }) : /* @__PURE__ */ jsx91(
|
|
7688
7778
|
Layout,
|
|
7689
7779
|
{
|
|
7690
7780
|
width: `${avatarSize}px`,
|
|
@@ -7692,8 +7782,8 @@ var Message = forwardRef33(
|
|
|
7692
7782
|
"aria-hidden": "true"
|
|
7693
7783
|
}
|
|
7694
7784
|
);
|
|
7695
|
-
const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */
|
|
7696
|
-
const cornerActions = actions && actionsOnHover ? /* @__PURE__ */
|
|
7785
|
+
const actionsSlot = actions && !actionsOnHover ? /* @__PURE__ */ jsx91(Layout, { width: "auto", align: "center", className: "shrink-0", children: actions }) : null;
|
|
7786
|
+
const cornerActions = actions && actionsOnHover ? /* @__PURE__ */ jsx91(
|
|
7697
7787
|
Layout,
|
|
7698
7788
|
{
|
|
7699
7789
|
width: "auto",
|
|
@@ -7706,7 +7796,7 @@ var Message = forwardRef33(
|
|
|
7706
7796
|
children: actions
|
|
7707
7797
|
}
|
|
7708
7798
|
) : null;
|
|
7709
|
-
return /* @__PURE__ */
|
|
7799
|
+
return /* @__PURE__ */ jsxs54(
|
|
7710
7800
|
Layout,
|
|
7711
7801
|
__spreadProps(__spreadValues({
|
|
7712
7802
|
ref,
|
|
@@ -7717,7 +7807,7 @@ var Message = forwardRef33(
|
|
|
7717
7807
|
className
|
|
7718
7808
|
}, props), {
|
|
7719
7809
|
children: [
|
|
7720
|
-
/* @__PURE__ */
|
|
7810
|
+
/* @__PURE__ */ jsxs54(
|
|
7721
7811
|
Layout,
|
|
7722
7812
|
{
|
|
7723
7813
|
fullWidth: true,
|
|
@@ -7728,7 +7818,7 @@ var Message = forwardRef33(
|
|
|
7728
7818
|
children: [
|
|
7729
7819
|
!isRightAligned && avatar,
|
|
7730
7820
|
isRightAligned && actionsSlot,
|
|
7731
|
-
/* @__PURE__ */
|
|
7821
|
+
/* @__PURE__ */ jsxs54(
|
|
7732
7822
|
Layout,
|
|
7733
7823
|
{
|
|
7734
7824
|
column: true,
|
|
@@ -7737,7 +7827,7 @@ var Message = forwardRef33(
|
|
|
7737
7827
|
align: isRightAligned ? "end" : "start",
|
|
7738
7828
|
style: { maxWidth },
|
|
7739
7829
|
children: [
|
|
7740
|
-
bubble ? /* @__PURE__ */
|
|
7830
|
+
bubble ? /* @__PURE__ */ jsxs54(
|
|
7741
7831
|
Layout,
|
|
7742
7832
|
{
|
|
7743
7833
|
column: true,
|
|
@@ -7751,16 +7841,16 @@ var Message = forwardRef33(
|
|
|
7751
7841
|
cornerActions && "pr-8"
|
|
7752
7842
|
),
|
|
7753
7843
|
children: [
|
|
7754
|
-
deleted ? /* @__PURE__ */
|
|
7755
|
-
time && /* @__PURE__ */
|
|
7844
|
+
deleted ? /* @__PURE__ */ jsx91(Text, { size: "s", italic: true, color: metaColor, children: deletedLabel }) : /* @__PURE__ */ jsx91(Text, { size: "s", color: contentColor, children }),
|
|
7845
|
+
time && /* @__PURE__ */ jsx91(Layout, { fullWidth: true, justify: "end", children: /* @__PURE__ */ jsx91(Text, { size: "xxs", color: metaColor, children: time }) }),
|
|
7756
7846
|
cornerActions
|
|
7757
7847
|
]
|
|
7758
7848
|
}
|
|
7759
|
-
) : cornerActions ? /* @__PURE__ */
|
|
7849
|
+
) : cornerActions ? /* @__PURE__ */ jsxs54(Layout, { width: "auto", className: "relative", children: [
|
|
7760
7850
|
children,
|
|
7761
7851
|
cornerActions
|
|
7762
7852
|
] }) : children,
|
|
7763
|
-
status && /* @__PURE__ */
|
|
7853
|
+
status && /* @__PURE__ */ jsx91(Layout, { fullWidth: true, justify: isRightAligned ? "end" : "start", children: status })
|
|
7764
7854
|
]
|
|
7765
7855
|
}
|
|
7766
7856
|
),
|
|
@@ -7769,7 +7859,7 @@ var Message = forwardRef33(
|
|
|
7769
7859
|
]
|
|
7770
7860
|
}
|
|
7771
7861
|
),
|
|
7772
|
-
showAuthor && showAuthorName && authorName && /* @__PURE__ */
|
|
7862
|
+
showAuthor && showAuthorName && authorName && /* @__PURE__ */ jsx91(Text, { size: "xs", color: "grey-600", children: authorName })
|
|
7773
7863
|
]
|
|
7774
7864
|
})
|
|
7775
7865
|
);
|
|
@@ -7779,7 +7869,7 @@ Message.displayName = "Message";
|
|
|
7779
7869
|
|
|
7780
7870
|
// src/ui/components/ui/MessageScroller.tsx
|
|
7781
7871
|
import { useLayoutEffect as useLayoutEffect2, useRef as useRef14 } from "react";
|
|
7782
|
-
import { jsx as
|
|
7872
|
+
import { jsx as jsx92, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
7783
7873
|
var SEPARATOR_LINE = {
|
|
7784
7874
|
neutral: "",
|
|
7785
7875
|
alert: "bg-red-500"
|
|
@@ -7792,9 +7882,9 @@ var MessageDateSeparator = ({
|
|
|
7792
7882
|
label,
|
|
7793
7883
|
tone = "neutral",
|
|
7794
7884
|
className
|
|
7795
|
-
}) => /* @__PURE__ */
|
|
7796
|
-
/* @__PURE__ */
|
|
7797
|
-
/* @__PURE__ */
|
|
7885
|
+
}) => /* @__PURE__ */ jsxs55(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
|
|
7886
|
+
/* @__PURE__ */ jsx92(Layout, { flex: 1, children: /* @__PURE__ */ jsx92(Divider, { className: SEPARATOR_LINE[tone] }) }),
|
|
7887
|
+
/* @__PURE__ */ jsx92(Layout, { width: "auto", className: "shrink-0", children: /* @__PURE__ */ jsx92(
|
|
7798
7888
|
Text,
|
|
7799
7889
|
{
|
|
7800
7890
|
size: "xs",
|
|
@@ -7803,7 +7893,7 @@ var MessageDateSeparator = ({
|
|
|
7803
7893
|
children: label
|
|
7804
7894
|
}
|
|
7805
7895
|
) }),
|
|
7806
|
-
/* @__PURE__ */
|
|
7896
|
+
/* @__PURE__ */ jsx92(Layout, { flex: 1, children: /* @__PURE__ */ jsx92(Divider, { className: SEPARATOR_LINE[tone] }) })
|
|
7807
7897
|
] });
|
|
7808
7898
|
var MessageScroller = ({
|
|
7809
7899
|
children,
|
|
@@ -7843,13 +7933,13 @@ var MessageScroller = ({
|
|
|
7843
7933
|
if (isEmpty && emptyState) return emptyState;
|
|
7844
7934
|
return children;
|
|
7845
7935
|
};
|
|
7846
|
-
const scroller = /* @__PURE__ */
|
|
7936
|
+
const scroller = /* @__PURE__ */ jsx92(
|
|
7847
7937
|
ScrollArea,
|
|
7848
7938
|
{
|
|
7849
7939
|
viewportRef: scrollerRef,
|
|
7850
7940
|
className: cn("w-full", floatingFooter ? "min-h-0 flex-1" : className),
|
|
7851
7941
|
style: typeof height === "number" ? { height: `${height}px` } : { height },
|
|
7852
|
-
children: /* @__PURE__ */
|
|
7942
|
+
children: /* @__PURE__ */ jsxs55(
|
|
7853
7943
|
Layout,
|
|
7854
7944
|
{
|
|
7855
7945
|
column: true,
|
|
@@ -7872,9 +7962,9 @@ var MessageScroller = ({
|
|
|
7872
7962
|
}
|
|
7873
7963
|
);
|
|
7874
7964
|
if (!floatingFooter) return scroller;
|
|
7875
|
-
return /* @__PURE__ */
|
|
7965
|
+
return /* @__PURE__ */ jsxs55(Layout, { column: true, fullWidth: true, className: cn("relative min-h-0", className), children: [
|
|
7876
7966
|
scroller,
|
|
7877
|
-
/* @__PURE__ */
|
|
7967
|
+
/* @__PURE__ */ jsx92(
|
|
7878
7968
|
Layout,
|
|
7879
7969
|
{
|
|
7880
7970
|
width: "auto",
|
|
@@ -7887,13 +7977,13 @@ var MessageScroller = ({
|
|
|
7887
7977
|
|
|
7888
7978
|
// src/ui/components/ui/Stepper.tsx
|
|
7889
7979
|
import { Fragment as Fragment10 } from "react";
|
|
7890
|
-
import { jsx as
|
|
7980
|
+
import { jsx as jsx93, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7891
7981
|
var Stepper = ({
|
|
7892
7982
|
numberOfSteps,
|
|
7893
7983
|
current = 0,
|
|
7894
7984
|
size = 28,
|
|
7895
7985
|
className
|
|
7896
|
-
}) => /* @__PURE__ */
|
|
7986
|
+
}) => /* @__PURE__ */ jsx93(
|
|
7897
7987
|
"nav",
|
|
7898
7988
|
{
|
|
7899
7989
|
"aria-label": "progression",
|
|
@@ -7904,8 +7994,8 @@ var Stepper = ({
|
|
|
7904
7994
|
children: Array.from({ length: numberOfSteps }, (_, i) => {
|
|
7905
7995
|
const isActive = i === current;
|
|
7906
7996
|
const isCompleted = i < current;
|
|
7907
|
-
return /* @__PURE__ */
|
|
7908
|
-
/* @__PURE__ */
|
|
7997
|
+
return /* @__PURE__ */ jsxs56(Fragment10, { children: [
|
|
7998
|
+
/* @__PURE__ */ jsx93(
|
|
7909
7999
|
"div",
|
|
7910
8000
|
{
|
|
7911
8001
|
"aria-hidden": true,
|
|
@@ -7914,10 +8004,10 @@ var Stepper = ({
|
|
|
7914
8004
|
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"
|
|
7915
8005
|
),
|
|
7916
8006
|
style: { width: size, height: size },
|
|
7917
|
-
children: isCompleted ? /* @__PURE__ */
|
|
8007
|
+
children: isCompleted ? /* @__PURE__ */ jsx93(FaIcon, { name: "check", family: "solid", size: 12 }) : i + 1
|
|
7918
8008
|
}
|
|
7919
8009
|
),
|
|
7920
|
-
i < numberOfSteps - 1 && /* @__PURE__ */
|
|
8010
|
+
i < numberOfSteps - 1 && /* @__PURE__ */ jsx93("div", { className: "h-px min-w-[8px] flex-1 bg-grey-300" })
|
|
7921
8011
|
] }, i);
|
|
7922
8012
|
})
|
|
7923
8013
|
}
|
|
@@ -7941,12 +8031,12 @@ import {
|
|
|
7941
8031
|
} from "date-fns";
|
|
7942
8032
|
import { fr as dateFnsFr } from "date-fns/locale";
|
|
7943
8033
|
import * as RadixPopover6 from "@radix-ui/react-popover";
|
|
7944
|
-
import { jsx as
|
|
8034
|
+
import { jsx as jsx94, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7945
8035
|
var formatMonthCaption = (month) => format(month, "MMM yyyy", { locale: dateFnsFr });
|
|
7946
8036
|
var RANGE_PRESETS = [
|
|
7947
8037
|
{
|
|
7948
8038
|
label: "Mois pr\xE9c\xE9dent",
|
|
7949
|
-
icon: /* @__PURE__ */
|
|
8039
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-arrow-up", size: 15 }),
|
|
7950
8040
|
getValue: () => [
|
|
7951
8041
|
startOfMonth(subMonths(/* @__PURE__ */ new Date(), 1)),
|
|
7952
8042
|
endOfMonth(subMonths(/* @__PURE__ */ new Date(), 1))
|
|
@@ -7954,34 +8044,34 @@ var RANGE_PRESETS = [
|
|
|
7954
8044
|
},
|
|
7955
8045
|
{
|
|
7956
8046
|
label: "Ce mois",
|
|
7957
|
-
icon: /* @__PURE__ */
|
|
8047
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-days", size: 15 }),
|
|
7958
8048
|
getValue: () => [startOfMonth(/* @__PURE__ */ new Date()), endOfMonth(/* @__PURE__ */ new Date())]
|
|
7959
8049
|
},
|
|
7960
8050
|
{
|
|
7961
8051
|
label: "Ce trimestre",
|
|
7962
|
-
icon: /* @__PURE__ */
|
|
8052
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-range", size: 15 }),
|
|
7963
8053
|
getValue: () => [startOfQuarter(/* @__PURE__ */ new Date()), endOfQuarter(/* @__PURE__ */ new Date())]
|
|
7964
8054
|
},
|
|
7965
8055
|
{
|
|
7966
8056
|
label: "Cette ann\xE9e",
|
|
7967
|
-
icon: /* @__PURE__ */
|
|
8057
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-clock", size: 15 }),
|
|
7968
8058
|
getValue: () => [startOfYear(/* @__PURE__ */ new Date()), endOfYear(/* @__PURE__ */ new Date())]
|
|
7969
8059
|
}
|
|
7970
8060
|
];
|
|
7971
8061
|
var SINGLE_PRESETS = [
|
|
7972
8062
|
{
|
|
7973
8063
|
label: "Aujourd'hui",
|
|
7974
|
-
icon: /* @__PURE__ */
|
|
8064
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-days", size: 15 }),
|
|
7975
8065
|
getValue: () => /* @__PURE__ */ new Date()
|
|
7976
8066
|
},
|
|
7977
8067
|
{
|
|
7978
8068
|
label: "Demain",
|
|
7979
|
-
icon: /* @__PURE__ */
|
|
8069
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-plus", size: 15 }),
|
|
7980
8070
|
getValue: () => addDays(/* @__PURE__ */ new Date(), 1)
|
|
7981
8071
|
},
|
|
7982
8072
|
{
|
|
7983
8073
|
label: "Dans 7 jours",
|
|
7984
|
-
icon: /* @__PURE__ */
|
|
8074
|
+
icon: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar-clock", size: 15 }),
|
|
7985
8075
|
getValue: () => addDays(/* @__PURE__ */ new Date(), 7)
|
|
7986
8076
|
}
|
|
7987
8077
|
];
|
|
@@ -8028,7 +8118,7 @@ var DatePicker = ({
|
|
|
8028
8118
|
else onChange == null ? void 0 : onChange(null);
|
|
8029
8119
|
setActivePreset(null);
|
|
8030
8120
|
};
|
|
8031
|
-
const calendar = /* @__PURE__ */
|
|
8121
|
+
const calendar = /* @__PURE__ */ jsx94(RadixPopover6.Portal, { children: /* @__PURE__ */ jsx94(
|
|
8032
8122
|
RadixPopover6.Content,
|
|
8033
8123
|
{
|
|
8034
8124
|
align,
|
|
@@ -8038,7 +8128,7 @@ var DatePicker = ({
|
|
|
8038
8128
|
// Les deux mois côte à côte tiennent dans ce gabarit.
|
|
8039
8129
|
isRange && "max-h-[260px] max-w-[423px] overflow-auto"
|
|
8040
8130
|
),
|
|
8041
|
-
children: isRange ? /* @__PURE__ */
|
|
8131
|
+
children: isRange ? /* @__PURE__ */ jsx94(
|
|
8042
8132
|
DayPicker,
|
|
8043
8133
|
{
|
|
8044
8134
|
mode: "range",
|
|
@@ -8057,7 +8147,7 @@ var DatePicker = ({
|
|
|
8057
8147
|
showOutsideDays: true,
|
|
8058
8148
|
formatters: { formatCaption: formatMonthCaption }
|
|
8059
8149
|
}
|
|
8060
|
-
) : /* @__PURE__ */
|
|
8150
|
+
) : /* @__PURE__ */ jsx94(
|
|
8061
8151
|
DayPicker,
|
|
8062
8152
|
{
|
|
8063
8153
|
mode: "single",
|
|
@@ -8076,8 +8166,8 @@ var DatePicker = ({
|
|
|
8076
8166
|
}
|
|
8077
8167
|
) });
|
|
8078
8168
|
if (!showPresets) {
|
|
8079
|
-
return /* @__PURE__ */
|
|
8080
|
-
/* @__PURE__ */
|
|
8169
|
+
return /* @__PURE__ */ jsxs57(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
|
|
8170
|
+
/* @__PURE__ */ jsx94(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx94(
|
|
8081
8171
|
"button",
|
|
8082
8172
|
{
|
|
8083
8173
|
type: "button",
|
|
@@ -8096,10 +8186,10 @@ var DatePicker = ({
|
|
|
8096
8186
|
calendar
|
|
8097
8187
|
] });
|
|
8098
8188
|
}
|
|
8099
|
-
return /* @__PURE__ */
|
|
8100
|
-
/* @__PURE__ */
|
|
8101
|
-
/* @__PURE__ */
|
|
8102
|
-
/* @__PURE__ */
|
|
8189
|
+
return /* @__PURE__ */ jsxs57(RadixPopover6.Root, { open, onOpenChange: setOpen, children: [
|
|
8190
|
+
/* @__PURE__ */ jsxs57(Layout, { column: true, gap: 1.5, className, children: [
|
|
8191
|
+
/* @__PURE__ */ jsxs57(Layout, { align: "center", gap: 1.5, children: [
|
|
8192
|
+
/* @__PURE__ */ jsx94(RadixPopover6.Trigger, { asChild: true, children: /* @__PURE__ */ jsx94(
|
|
8103
8193
|
"button",
|
|
8104
8194
|
{
|
|
8105
8195
|
type: "button",
|
|
@@ -8109,12 +8199,12 @@ var DatePicker = ({
|
|
|
8109
8199
|
"flex h-9 w-9 items-center justify-center rounded-[6px] border border-grey-300 bg-white text-neutral-800 transition-colors",
|
|
8110
8200
|
"hover:border-blue-700 disabled:cursor-not-allowed disabled:opacity-60"
|
|
8111
8201
|
),
|
|
8112
|
-
children: /* @__PURE__ */
|
|
8202
|
+
children: /* @__PURE__ */ jsx94(FaIcon, { name: "calendar", size: 16 })
|
|
8113
8203
|
}
|
|
8114
8204
|
) }),
|
|
8115
8205
|
resolvedPresets.map((preset) => {
|
|
8116
8206
|
const active = activePreset === preset.label;
|
|
8117
|
-
return /* @__PURE__ */
|
|
8207
|
+
return /* @__PURE__ */ jsx94(Tooltip, { content: preset.label, children: /* @__PURE__ */ jsx94(
|
|
8118
8208
|
"button",
|
|
8119
8209
|
{
|
|
8120
8210
|
type: "button",
|
|
@@ -8131,7 +8221,7 @@ var DatePicker = ({
|
|
|
8131
8221
|
) }, preset.label);
|
|
8132
8222
|
})
|
|
8133
8223
|
] }),
|
|
8134
|
-
hasValue && /* @__PURE__ */
|
|
8224
|
+
hasValue && /* @__PURE__ */ jsx94(
|
|
8135
8225
|
"button",
|
|
8136
8226
|
{
|
|
8137
8227
|
type: "button",
|
|
@@ -8616,7 +8706,7 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
|
|
|
8616
8706
|
// src/ui/components/ui/Tour.tsx
|
|
8617
8707
|
import { useEffect as useEffect11, useRef as useRef15 } from "react";
|
|
8618
8708
|
import { driver } from "driver.js";
|
|
8619
|
-
import { jsx as
|
|
8709
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
8620
8710
|
var TOUR_TARGET_ATTRIBUTE = "data-tour-target";
|
|
8621
8711
|
var DEFAULT_LABELS = {
|
|
8622
8712
|
previous: "Pr\xE9c\xE9dent",
|
|
@@ -8628,7 +8718,7 @@ var DEFAULT_LABELS = {
|
|
|
8628
8718
|
var STAGE_PADDING = 6;
|
|
8629
8719
|
var GHOST_TRANSITION_MS = 200;
|
|
8630
8720
|
var HIGHLIGHT_DURATION_MS = 400;
|
|
8631
|
-
var TourTarget = ({ id, children }) => /* @__PURE__ */
|
|
8721
|
+
var TourTarget = ({ id, children }) => /* @__PURE__ */ jsx95("div", __spreadProps(__spreadValues({}, { [TOUR_TARGET_ATTRIBUTE]: id }), { className: "contents", children }));
|
|
8632
8722
|
var isContents = (element) => getComputedStyle(element).display === "contents";
|
|
8633
8723
|
var measure = (element) => {
|
|
8634
8724
|
if (!isContents(element)) {
|
|
@@ -8945,6 +9035,7 @@ export {
|
|
|
8945
9035
|
TagSelect,
|
|
8946
9036
|
Text,
|
|
8947
9037
|
Textarea,
|
|
9038
|
+
Tile,
|
|
8948
9039
|
Timeline,
|
|
8949
9040
|
Toaster,
|
|
8950
9041
|
Tooltip,
|