design-zystem 1.0.500 → 1.0.502
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 +18 -12
- package/dist/ui/index.d.ts +18 -12
- package/dist/ui/index.js +169 -81
- package/dist/ui/index.mjs +194 -106
- package/dist/ui/style.css +1 -1
- package/package.json +1 -1
package/dist/ui/index.d.mts
CHANGED
|
@@ -17,20 +17,20 @@ import * as RadixScrollArea from '@radix-ui/react-scroll-area';
|
|
|
17
17
|
|
|
18
18
|
declare const layoutVariants: (props?: ({
|
|
19
19
|
direction?: "row" | "column" | null | undefined;
|
|
20
|
-
gap?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
20
|
+
gap?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
21
21
|
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
22
22
|
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
23
23
|
wrap?: boolean | null | undefined;
|
|
24
24
|
fullWidth?: boolean | null | undefined;
|
|
25
25
|
fullHeight?: boolean | null | undefined;
|
|
26
26
|
grow?: boolean | null | undefined;
|
|
27
|
-
padding?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
28
|
-
paddingX?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
29
|
-
paddingY?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
30
|
-
paddingTop?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
31
|
-
paddingRight?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
32
|
-
paddingBottom?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
33
|
-
paddingLeft?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
27
|
+
padding?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
28
|
+
paddingX?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
29
|
+
paddingY?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
30
|
+
paddingTop?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
31
|
+
paddingRight?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
32
|
+
paddingBottom?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
33
|
+
paddingLeft?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
34
34
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
35
|
interface LayoutProps extends HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof layoutVariants>, 'direction'> {
|
|
36
36
|
row?: boolean;
|
|
@@ -61,16 +61,19 @@ type ColorToken = (typeof COLOR_TOKENS)[number];
|
|
|
61
61
|
type HexColor = `#${string}`;
|
|
62
62
|
|
|
63
63
|
declare const boxVariants: (props?: ({
|
|
64
|
-
background?: "white" | "grey-100" | "grey-200" | "brand-gradient" | "brand-routes" | null | undefined;
|
|
64
|
+
background?: "white" | "blue-700" | "grey-100" | "grey-200" | "grey-300" | "blue-50" | "brand-gradient" | "brand-routes" | null | undefined;
|
|
65
65
|
bordered?: boolean | null | undefined;
|
|
66
|
+
borderColor?: "blue-700" | "grey-300" | null | undefined;
|
|
67
|
+
dashed?: boolean | null | undefined;
|
|
66
68
|
clickable?: boolean | null | undefined;
|
|
67
69
|
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
68
|
-
radius?: "none" | "sm" | "md" | null | undefined;
|
|
70
|
+
radius?: "none" | "sm" | "md" | "full" | null | undefined;
|
|
69
71
|
hasShadow?: boolean | null | undefined;
|
|
70
72
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
71
73
|
interface BoxProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof boxVariants> {
|
|
72
74
|
/** Left accent bar — status/score encoding. */
|
|
73
75
|
accent?: ColorToken | 'none';
|
|
76
|
+
accentWidth?: 3 | 4;
|
|
74
77
|
width?: string;
|
|
75
78
|
height?: string;
|
|
76
79
|
hexBackground?: HexColor;
|
|
@@ -82,7 +85,7 @@ interface BoxProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof b
|
|
|
82
85
|
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
|
83
86
|
|
|
84
87
|
declare const cardVariants: (props?: ({
|
|
85
|
-
background?: "white" | "grey-300" | "
|
|
88
|
+
background?: "white" | "grey-300" | "blue-50" | "red-50" | "yellow-50" | null | undefined;
|
|
86
89
|
accent?: "none" | "blue-950" | "red-500" | "grey-400" | "yellow-400" | null | undefined;
|
|
87
90
|
padding?: "sm" | "md" | null | undefined;
|
|
88
91
|
clickable?: boolean | null | undefined;
|
|
@@ -116,6 +119,7 @@ declare const textVariants: (props?: ({
|
|
|
116
119
|
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
117
120
|
color?: "inherit" | "white" | "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "green-100" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "orange-600" | "purple-700" | "neutral-800" | "grey-500" | null | undefined;
|
|
118
121
|
align?: "center" | "left" | "right" | null | undefined;
|
|
122
|
+
lineHeight?: 4 | 5 | 6 | null | undefined;
|
|
119
123
|
lineClamp?: 1 | 2 | 3 | "none" | null | undefined;
|
|
120
124
|
italic?: boolean | null | undefined;
|
|
121
125
|
nowrap?: boolean | null | undefined;
|
|
@@ -145,6 +149,7 @@ declare const CopyableText: ({ value, label, placeholder, size, weight, color, i
|
|
|
145
149
|
declare const imageVariants: (props?: ({
|
|
146
150
|
fit?: "contain" | "cover" | "fill" | null | undefined;
|
|
147
151
|
radius?: "none" | "sm" | "md" | "full" | null | undefined;
|
|
152
|
+
ratio?: "1/1" | "4/3" | "16/9" | null | undefined;
|
|
148
153
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
149
154
|
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement>, VariantProps<typeof imageVariants> {
|
|
150
155
|
}
|
|
@@ -2021,7 +2026,8 @@ declare const Attachment: ({ name, size, status, progress, errorMessage, onRemov
|
|
|
2021
2026
|
interface PdfPreviewProps {
|
|
2022
2027
|
/** URL, `File` (input fichier), ou objet source pdf.js. */
|
|
2023
2028
|
file: DocumentProps['file'];
|
|
2024
|
-
|
|
2029
|
+
/** Largeur en px, ou `fill` : toute la largeur du conteneur, recalculée quand il change (modale, écran étroit). */
|
|
2030
|
+
width?: number | 'fill';
|
|
2025
2031
|
/** Hauteur max avant défilement vertical. */
|
|
2026
2032
|
maxHeight?: string;
|
|
2027
2033
|
className?: string;
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -17,20 +17,20 @@ import * as RadixScrollArea from '@radix-ui/react-scroll-area';
|
|
|
17
17
|
|
|
18
18
|
declare const layoutVariants: (props?: ({
|
|
19
19
|
direction?: "row" | "column" | null | undefined;
|
|
20
|
-
gap?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
20
|
+
gap?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
21
21
|
align?: "start" | "center" | "end" | "stretch" | "baseline" | null | undefined;
|
|
22
22
|
justify?: "start" | "center" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
23
23
|
wrap?: boolean | null | undefined;
|
|
24
24
|
fullWidth?: boolean | null | undefined;
|
|
25
25
|
fullHeight?: boolean | null | undefined;
|
|
26
26
|
grow?: boolean | null | undefined;
|
|
27
|
-
padding?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
28
|
-
paddingX?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
29
|
-
paddingY?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
30
|
-
paddingTop?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
31
|
-
paddingRight?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
32
|
-
paddingBottom?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
33
|
-
paddingLeft?: 0 | 0.5 | 1 | 1.5 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
27
|
+
padding?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
28
|
+
paddingX?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
29
|
+
paddingY?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
30
|
+
paddingTop?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
31
|
+
paddingRight?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
32
|
+
paddingBottom?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
33
|
+
paddingLeft?: 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | null | undefined;
|
|
34
34
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
35
35
|
interface LayoutProps extends HTMLAttributes<HTMLDivElement>, Omit<VariantProps<typeof layoutVariants>, 'direction'> {
|
|
36
36
|
row?: boolean;
|
|
@@ -61,16 +61,19 @@ type ColorToken = (typeof COLOR_TOKENS)[number];
|
|
|
61
61
|
type HexColor = `#${string}`;
|
|
62
62
|
|
|
63
63
|
declare const boxVariants: (props?: ({
|
|
64
|
-
background?: "white" | "grey-100" | "grey-200" | "brand-gradient" | "brand-routes" | null | undefined;
|
|
64
|
+
background?: "white" | "blue-700" | "grey-100" | "grey-200" | "grey-300" | "blue-50" | "brand-gradient" | "brand-routes" | null | undefined;
|
|
65
65
|
bordered?: boolean | null | undefined;
|
|
66
|
+
borderColor?: "blue-700" | "grey-300" | null | undefined;
|
|
67
|
+
dashed?: boolean | null | undefined;
|
|
66
68
|
clickable?: boolean | null | undefined;
|
|
67
69
|
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
68
|
-
radius?: "none" | "sm" | "md" | null | undefined;
|
|
70
|
+
radius?: "none" | "sm" | "md" | "full" | null | undefined;
|
|
69
71
|
hasShadow?: boolean | null | undefined;
|
|
70
72
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
71
73
|
interface BoxProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof boxVariants> {
|
|
72
74
|
/** Left accent bar — status/score encoding. */
|
|
73
75
|
accent?: ColorToken | 'none';
|
|
76
|
+
accentWidth?: 3 | 4;
|
|
74
77
|
width?: string;
|
|
75
78
|
height?: string;
|
|
76
79
|
hexBackground?: HexColor;
|
|
@@ -82,7 +85,7 @@ interface BoxProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof b
|
|
|
82
85
|
declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
|
|
83
86
|
|
|
84
87
|
declare const cardVariants: (props?: ({
|
|
85
|
-
background?: "white" | "grey-300" | "
|
|
88
|
+
background?: "white" | "grey-300" | "blue-50" | "red-50" | "yellow-50" | null | undefined;
|
|
86
89
|
accent?: "none" | "blue-950" | "red-500" | "grey-400" | "yellow-400" | null | undefined;
|
|
87
90
|
padding?: "sm" | "md" | null | undefined;
|
|
88
91
|
clickable?: boolean | null | undefined;
|
|
@@ -116,6 +119,7 @@ declare const textVariants: (props?: ({
|
|
|
116
119
|
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
117
120
|
color?: "inherit" | "white" | "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "green-100" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "orange-600" | "purple-700" | "neutral-800" | "grey-500" | null | undefined;
|
|
118
121
|
align?: "center" | "left" | "right" | null | undefined;
|
|
122
|
+
lineHeight?: 4 | 5 | 6 | null | undefined;
|
|
119
123
|
lineClamp?: 1 | 2 | 3 | "none" | null | undefined;
|
|
120
124
|
italic?: boolean | null | undefined;
|
|
121
125
|
nowrap?: boolean | null | undefined;
|
|
@@ -145,6 +149,7 @@ declare const CopyableText: ({ value, label, placeholder, size, weight, color, i
|
|
|
145
149
|
declare const imageVariants: (props?: ({
|
|
146
150
|
fit?: "contain" | "cover" | "fill" | null | undefined;
|
|
147
151
|
radius?: "none" | "sm" | "md" | "full" | null | undefined;
|
|
152
|
+
ratio?: "1/1" | "4/3" | "16/9" | null | undefined;
|
|
148
153
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
149
154
|
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement>, VariantProps<typeof imageVariants> {
|
|
150
155
|
}
|
|
@@ -2021,7 +2026,8 @@ declare const Attachment: ({ name, size, status, progress, errorMessage, onRemov
|
|
|
2021
2026
|
interface PdfPreviewProps {
|
|
2022
2027
|
/** URL, `File` (input fichier), ou objet source pdf.js. */
|
|
2023
2028
|
file: DocumentProps['file'];
|
|
2024
|
-
|
|
2029
|
+
/** Largeur en px, ou `fill` : toute la largeur du conteneur, recalculée quand il change (modale, écran étroit). */
|
|
2030
|
+
width?: number | 'fill';
|
|
2025
2031
|
/** Hauteur max avant défilement vertical. */
|
|
2026
2032
|
maxHeight?: string;
|
|
2027
2033
|
className?: string;
|
package/dist/ui/index.js
CHANGED
|
@@ -297,6 +297,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
297
297
|
1: "gap-1",
|
|
298
298
|
1.5: "gap-1.5",
|
|
299
299
|
2: "gap-2",
|
|
300
|
+
2.5: "gap-2.5",
|
|
300
301
|
3: "gap-3",
|
|
301
302
|
4: "gap-4",
|
|
302
303
|
5: "gap-5",
|
|
@@ -343,6 +344,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
343
344
|
1: "p-1",
|
|
344
345
|
1.5: "p-1.5",
|
|
345
346
|
2: "p-2",
|
|
347
|
+
2.5: "p-2.5",
|
|
346
348
|
3: "p-3",
|
|
347
349
|
4: "p-4",
|
|
348
350
|
5: "p-5",
|
|
@@ -358,6 +360,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
358
360
|
1: "px-1",
|
|
359
361
|
1.5: "px-1.5",
|
|
360
362
|
2: "px-2",
|
|
363
|
+
2.5: "px-2.5",
|
|
361
364
|
3: "px-3",
|
|
362
365
|
4: "px-4",
|
|
363
366
|
5: "px-5",
|
|
@@ -373,6 +376,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
373
376
|
1: "py-1",
|
|
374
377
|
1.5: "py-1.5",
|
|
375
378
|
2: "py-2",
|
|
379
|
+
2.5: "py-2.5",
|
|
376
380
|
3: "py-3",
|
|
377
381
|
4: "py-4",
|
|
378
382
|
5: "py-5",
|
|
@@ -388,6 +392,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
388
392
|
1: "pt-1",
|
|
389
393
|
1.5: "pt-1.5",
|
|
390
394
|
2: "pt-2",
|
|
395
|
+
2.5: "pt-2.5",
|
|
391
396
|
3: "pt-3",
|
|
392
397
|
4: "pt-4",
|
|
393
398
|
5: "pt-5",
|
|
@@ -403,6 +408,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
403
408
|
1: "pr-1",
|
|
404
409
|
1.5: "pr-1.5",
|
|
405
410
|
2: "pr-2",
|
|
411
|
+
2.5: "pr-2.5",
|
|
406
412
|
3: "pr-3",
|
|
407
413
|
4: "pr-4",
|
|
408
414
|
5: "pr-5",
|
|
@@ -418,6 +424,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
418
424
|
1: "pb-1",
|
|
419
425
|
1.5: "pb-1.5",
|
|
420
426
|
2: "pb-2",
|
|
427
|
+
2.5: "pb-2.5",
|
|
421
428
|
3: "pb-3",
|
|
422
429
|
4: "pb-4",
|
|
423
430
|
5: "pb-5",
|
|
@@ -433,6 +440,7 @@ var layoutVariants = (0, import_class_variance_authority.cva)("flex box-border",
|
|
|
433
440
|
1: "pl-1",
|
|
434
441
|
1.5: "pl-1.5",
|
|
435
442
|
2: "pl-2",
|
|
443
|
+
2.5: "pl-2.5",
|
|
436
444
|
3: "pl-3",
|
|
437
445
|
4: "pl-4",
|
|
438
446
|
5: "pl-5",
|
|
@@ -562,6 +570,9 @@ var boxVariants = (0, import_class_variance_authority2.cva)("", {
|
|
|
562
570
|
white: "bg-white",
|
|
563
571
|
"grey-100": "bg-grey-100",
|
|
564
572
|
"grey-200": "bg-grey-200",
|
|
573
|
+
"grey-300": "bg-grey-300",
|
|
574
|
+
"blue-50": "bg-blue-50",
|
|
575
|
+
"blue-700": "bg-blue-700",
|
|
565
576
|
"brand-gradient": "bg-brand-gradient",
|
|
566
577
|
"brand-routes": "bg-brand-routes"
|
|
567
578
|
},
|
|
@@ -569,6 +580,14 @@ var boxVariants = (0, import_class_variance_authority2.cva)("", {
|
|
|
569
580
|
true: "border border-grey-300",
|
|
570
581
|
false: "border-0"
|
|
571
582
|
},
|
|
583
|
+
borderColor: {
|
|
584
|
+
"grey-300": "",
|
|
585
|
+
"blue-700": "border-blue-700"
|
|
586
|
+
},
|
|
587
|
+
dashed: {
|
|
588
|
+
true: "border-dashed",
|
|
589
|
+
false: ""
|
|
590
|
+
},
|
|
572
591
|
clickable: {
|
|
573
592
|
true: "cursor-pointer",
|
|
574
593
|
false: ""
|
|
@@ -582,7 +601,8 @@ var boxVariants = (0, import_class_variance_authority2.cva)("", {
|
|
|
582
601
|
radius: {
|
|
583
602
|
none: "rounded-none",
|
|
584
603
|
sm: "rounded-[5px]",
|
|
585
|
-
md: "rounded-lg"
|
|
604
|
+
md: "rounded-lg",
|
|
605
|
+
full: "rounded-full"
|
|
586
606
|
},
|
|
587
607
|
hasShadow: {
|
|
588
608
|
true: "shadow-[0_2px_15px_0_rgba(198,198,198,0.25)]",
|
|
@@ -603,11 +623,14 @@ var Box = (0, import_react2.forwardRef)(
|
|
|
603
623
|
var _b = _a, {
|
|
604
624
|
background,
|
|
605
625
|
bordered,
|
|
626
|
+
borderColor,
|
|
627
|
+
dashed,
|
|
606
628
|
clickable,
|
|
607
629
|
padding,
|
|
608
630
|
radius,
|
|
609
631
|
hasShadow,
|
|
610
632
|
accent = "none",
|
|
633
|
+
accentWidth = 4,
|
|
611
634
|
width,
|
|
612
635
|
height,
|
|
613
636
|
hexBackground,
|
|
@@ -616,11 +639,14 @@ var Box = (0, import_react2.forwardRef)(
|
|
|
616
639
|
} = _b, props = __objRest(_b, [
|
|
617
640
|
"background",
|
|
618
641
|
"bordered",
|
|
642
|
+
"borderColor",
|
|
643
|
+
"dashed",
|
|
619
644
|
"clickable",
|
|
620
645
|
"padding",
|
|
621
646
|
"radius",
|
|
622
647
|
"hasShadow",
|
|
623
648
|
"accent",
|
|
649
|
+
"accentWidth",
|
|
624
650
|
"width",
|
|
625
651
|
"height",
|
|
626
652
|
"hexBackground",
|
|
@@ -635,12 +661,15 @@ var Box = (0, import_react2.forwardRef)(
|
|
|
635
661
|
boxVariants({
|
|
636
662
|
background,
|
|
637
663
|
bordered,
|
|
664
|
+
borderColor,
|
|
665
|
+
dashed,
|
|
638
666
|
clickable,
|
|
639
667
|
padding,
|
|
640
668
|
radius,
|
|
641
669
|
hasShadow
|
|
642
670
|
}),
|
|
643
671
|
ACCENT_CLASS[accent],
|
|
672
|
+
accent !== "none" && accentWidth === 3 && "border-l-[3px]",
|
|
644
673
|
className
|
|
645
674
|
),
|
|
646
675
|
style: __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, width && { width }), height && { height }), hexBackground && { backgroundColor: hexBackground }), style)
|
|
@@ -833,6 +862,11 @@ var textVariants = (0, import_class_variance_authority6.cva)("font-sans", {
|
|
|
833
862
|
center: "text-center",
|
|
834
863
|
right: "text-right"
|
|
835
864
|
},
|
|
865
|
+
lineHeight: {
|
|
866
|
+
4: "leading-4",
|
|
867
|
+
5: "leading-5",
|
|
868
|
+
6: "leading-6"
|
|
869
|
+
},
|
|
836
870
|
lineClamp: {
|
|
837
871
|
none: "",
|
|
838
872
|
1: "line-clamp-1",
|
|
@@ -871,6 +905,7 @@ var Text = (0, import_react5.forwardRef)(
|
|
|
871
905
|
weight,
|
|
872
906
|
color,
|
|
873
907
|
align,
|
|
908
|
+
lineHeight,
|
|
874
909
|
lineClamp,
|
|
875
910
|
italic,
|
|
876
911
|
nowrap,
|
|
@@ -884,6 +919,7 @@ var Text = (0, import_react5.forwardRef)(
|
|
|
884
919
|
"weight",
|
|
885
920
|
"color",
|
|
886
921
|
"align",
|
|
922
|
+
"lineHeight",
|
|
887
923
|
"lineClamp",
|
|
888
924
|
"italic",
|
|
889
925
|
"nowrap",
|
|
@@ -902,6 +938,7 @@ var Text = (0, import_react5.forwardRef)(
|
|
|
902
938
|
weight,
|
|
903
939
|
color: hexColor ? void 0 : color,
|
|
904
940
|
align,
|
|
941
|
+
lineHeight,
|
|
905
942
|
lineClamp,
|
|
906
943
|
italic,
|
|
907
944
|
nowrap,
|
|
@@ -1368,19 +1405,24 @@ var imageVariants = (0, import_class_variance_authority7.cva)("block w-full", {
|
|
|
1368
1405
|
sm: "rounded-[5px]",
|
|
1369
1406
|
md: "rounded-lg",
|
|
1370
1407
|
full: "rounded-full"
|
|
1408
|
+
},
|
|
1409
|
+
ratio: {
|
|
1410
|
+
"1/1": "aspect-square",
|
|
1411
|
+
"4/3": "aspect-[4/3]",
|
|
1412
|
+
"16/9": "aspect-video"
|
|
1371
1413
|
}
|
|
1372
1414
|
},
|
|
1373
1415
|
defaultVariants: { fit: "cover", radius: "sm" }
|
|
1374
1416
|
});
|
|
1375
1417
|
var Image2 = (0, import_react9.forwardRef)(
|
|
1376
1418
|
(_a, ref) => {
|
|
1377
|
-
var _b = _a, { alt = "", fit, radius, className, width, height, style } = _b, props = __objRest(_b, ["alt", "fit", "radius", "className", "width", "height", "style"]);
|
|
1419
|
+
var _b = _a, { alt = "", fit, radius, ratio, className, width, height, style } = _b, props = __objRest(_b, ["alt", "fit", "radius", "ratio", "className", "width", "height", "style"]);
|
|
1378
1420
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1379
1421
|
"img",
|
|
1380
1422
|
__spreadValues({
|
|
1381
1423
|
ref,
|
|
1382
1424
|
alt,
|
|
1383
|
-
className: cn(imageVariants({ fit, radius }), className),
|
|
1425
|
+
className: cn(imageVariants({ fit, radius, ratio }), className),
|
|
1384
1426
|
style: __spreadValues(__spreadValues(__spreadValues({}, width !== void 0 ? { width } : {}), height !== void 0 ? { height } : {}), style),
|
|
1385
1427
|
width,
|
|
1386
1428
|
height
|
|
@@ -2723,12 +2765,19 @@ var Tabs = ({
|
|
|
2723
2765
|
const triggerRefs = (0, import_react23.useRef)(/* @__PURE__ */ new Map());
|
|
2724
2766
|
const [bar, setBar] = (0, import_react23.useState)({ left: 0, width: 0 });
|
|
2725
2767
|
const updateBar = (0, import_react23.useCallback)(() => {
|
|
2726
|
-
const root = listRef.current;
|
|
2727
2768
|
const activeEl = triggerRefs.current.get(value);
|
|
2728
|
-
if (!
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2769
|
+
if (!activeEl) return;
|
|
2770
|
+
setBar({ left: activeEl.offsetLeft, width: activeEl.offsetWidth });
|
|
2771
|
+
}, [value]);
|
|
2772
|
+
(0, import_react23.useEffect)(() => {
|
|
2773
|
+
const list = listRef.current;
|
|
2774
|
+
const activeEl = triggerRefs.current.get(value);
|
|
2775
|
+
if (!list || !activeEl) return;
|
|
2776
|
+
const start = activeEl.offsetLeft;
|
|
2777
|
+
const end = start + activeEl.offsetWidth;
|
|
2778
|
+
if (start < list.scrollLeft) list.scrollLeft = start;
|
|
2779
|
+
else if (end > list.scrollLeft + list.clientWidth)
|
|
2780
|
+
list.scrollLeft = end - list.clientWidth;
|
|
2732
2781
|
}, [value]);
|
|
2733
2782
|
(0, import_react23.useEffect)(() => {
|
|
2734
2783
|
updateBar();
|
|
@@ -2740,7 +2789,7 @@ var Tabs = ({
|
|
|
2740
2789
|
const isPills = variant === "pills";
|
|
2741
2790
|
const isChips = variant === "chips";
|
|
2742
2791
|
const isLine = variant === "line";
|
|
2743
|
-
return /* @__PURE__ */ (0, import_jsx_runtime33.
|
|
2792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2744
2793
|
RadixTabs.Root,
|
|
2745
2794
|
{
|
|
2746
2795
|
value,
|
|
@@ -2750,71 +2799,92 @@ var Tabs = ({
|
|
|
2750
2799
|
isLine && "border-b border-grey-300",
|
|
2751
2800
|
className
|
|
2752
2801
|
),
|
|
2753
|
-
children:
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2803
|
+
RadixTabs.List,
|
|
2804
|
+
{
|
|
2805
|
+
ref: listRef,
|
|
2806
|
+
className: cn(
|
|
2807
|
+
"flex items-center",
|
|
2808
|
+
isPills && "gap-0 rounded-lg bg-grey-200 p-1",
|
|
2809
|
+
// Overlaps the root border by 1px so the active bar sits on it, and scrolls sideways when the tabs don't fit.
|
|
2810
|
+
isLine && "relative -mb-px min-h-[48px] gap-6 overflow-x-auto pb-[13px] pt-3 [scrollbar-width:none]",
|
|
2811
|
+
// Chips scroll sideways instead of wrapping when they don't fit (mobile).
|
|
2812
|
+
isChips && "gap-2 overflow-x-auto [scrollbar-width:none]",
|
|
2813
|
+
fullWidth && "w-full gap-0"
|
|
2814
|
+
),
|
|
2815
|
+
children: [
|
|
2816
|
+
items.map((item) => {
|
|
2817
|
+
const infoOutside = Boolean(item.info && item.disabled);
|
|
2818
|
+
const info = item.info && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2819
|
+
IconTooltip,
|
|
2820
|
+
{
|
|
2821
|
+
name: "circle-info",
|
|
2822
|
+
size: "xs",
|
|
2823
|
+
color: "inherit",
|
|
2824
|
+
label: item.info
|
|
2825
|
+
}
|
|
2826
|
+
);
|
|
2827
|
+
const trigger = /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2828
|
+
RadixTabs.Trigger,
|
|
2829
|
+
{
|
|
2830
|
+
value: item.id,
|
|
2831
|
+
disabled: item.disabled,
|
|
2832
|
+
ref: (el) => {
|
|
2833
|
+
if (el) triggerRefs.current.set(item.id, el);
|
|
2834
|
+
},
|
|
2835
|
+
className: cn(
|
|
2836
|
+
"relative inline-flex select-none items-center justify-center gap-1.5 whitespace-nowrap border-0 text-center outline-none transition-colors",
|
|
2837
|
+
"disabled:cursor-not-allowed disabled:opacity-60",
|
|
2838
|
+
fullWidth && "flex-1",
|
|
2839
|
+
uppercase && "uppercase tracking-[0.01em]",
|
|
2840
|
+
isPills && cn(
|
|
2841
|
+
"rounded-md px-4 py-2 text-sm",
|
|
2842
|
+
value === item.id ? "bg-white font-bold text-neutral-800" : "bg-transparent font-medium text-neutral-800"
|
|
2843
|
+
),
|
|
2844
|
+
isChips && cn(
|
|
2845
|
+
"h-8 shrink-0 rounded-full border border-solid px-3 text-[13px]",
|
|
2846
|
+
value === item.id ? "border-blue-800 bg-blue-800 font-semibold text-white" : "border-grey-300 bg-white font-medium text-neutral-800"
|
|
2847
|
+
),
|
|
2848
|
+
isLine && cn(
|
|
2849
|
+
"py-0 text-base font-semibold",
|
|
2850
|
+
value === item.id ? "text-blue-700 font-bold" : "text-grey-400"
|
|
2851
|
+
)
|
|
2786
2852
|
),
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2853
|
+
children: [
|
|
2854
|
+
item.label,
|
|
2855
|
+
!infoOutside && info,
|
|
2856
|
+
Boolean(item.bubbleNumber) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "flex h-[18px] min-w-[20px] items-center justify-center rounded-full bg-red-500 px-1.5 text-[10px] font-semibold leading-none text-white", children: item.bubbleNumber })
|
|
2857
|
+
]
|
|
2858
|
+
},
|
|
2859
|
+
item.id
|
|
2860
|
+
);
|
|
2861
|
+
return infoOutside ? /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2862
|
+
"span",
|
|
2863
|
+
{
|
|
2864
|
+
className: cn(
|
|
2865
|
+
"inline-flex items-center gap-1.5",
|
|
2866
|
+
fullWidth && "flex-1 justify-center",
|
|
2867
|
+
isLine ? "text-grey-400" : "text-neutral-800"
|
|
2802
2868
|
),
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2869
|
+
children: [
|
|
2870
|
+
trigger,
|
|
2871
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "inline-flex opacity-60", children: info })
|
|
2872
|
+
]
|
|
2873
|
+
},
|
|
2874
|
+
item.id
|
|
2875
|
+
) : trigger;
|
|
2876
|
+
}),
|
|
2877
|
+
isLine && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2878
|
+
"div",
|
|
2879
|
+
{
|
|
2880
|
+
"aria-hidden": "true",
|
|
2881
|
+
className: "pointer-events-none absolute bottom-0 h-0.5 bg-blue-700 transition-all duration-[180ms] ease-out",
|
|
2882
|
+
style: { left: bar.left, width: bar.width }
|
|
2883
|
+
}
|
|
2884
|
+
)
|
|
2885
|
+
]
|
|
2886
|
+
}
|
|
2887
|
+
)
|
|
2818
2888
|
}
|
|
2819
2889
|
);
|
|
2820
2890
|
};
|
|
@@ -2998,6 +3068,8 @@ var Modal = ({
|
|
|
2998
3068
|
MODAL_LAYER,
|
|
2999
3069
|
"fixed left-1/2 top-1/2 flex max-h-[90vh] -translate-x-1/2 -translate-y-1/2 flex-col gap-4",
|
|
3000
3070
|
"rounded-xl bg-white p-6 shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-2px_rgba(0,0,0,0.05)] outline-none",
|
|
3071
|
+
// On a phone a width in vw or a narrow px value would leave a sliver: take the screen, margins kept.
|
|
3072
|
+
"max-md:!w-[calc(100vw-32px)]",
|
|
3001
3073
|
className
|
|
3002
3074
|
),
|
|
3003
3075
|
style: {
|
|
@@ -9719,8 +9791,22 @@ var PdfPreview = ({
|
|
|
9719
9791
|
}) => {
|
|
9720
9792
|
const [hasError, setHasError] = (0, import_react65.useState)(false);
|
|
9721
9793
|
const [numPages, setNumPages] = (0, import_react65.useState)(0);
|
|
9722
|
-
const
|
|
9723
|
-
const
|
|
9794
|
+
const isFill = width === "fill";
|
|
9795
|
+
const containerRef = (0, import_react65.useRef)(null);
|
|
9796
|
+
const [measuredWidth, setMeasuredWidth] = (0, import_react65.useState)(0);
|
|
9797
|
+
(0, import_react65.useEffect)(() => {
|
|
9798
|
+
const container = containerRef.current;
|
|
9799
|
+
if (!isFill || !container) return;
|
|
9800
|
+
const observer = new ResizeObserver(
|
|
9801
|
+
([entry]) => setMeasuredWidth(entry.contentRect.width)
|
|
9802
|
+
);
|
|
9803
|
+
observer.observe(container);
|
|
9804
|
+
return () => observer.disconnect();
|
|
9805
|
+
}, [isFill]);
|
|
9806
|
+
const pixelWidth = isFill ? measuredWidth : width;
|
|
9807
|
+
const containerWidth = isFill ? "100%" : width;
|
|
9808
|
+
const height = Math.round(pixelWidth * 1.3);
|
|
9809
|
+
const thumbnailSkeleton = /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Skeleton, { width: containerWidth, height });
|
|
9724
9810
|
if (hasError) {
|
|
9725
9811
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)(
|
|
9726
9812
|
Layout,
|
|
@@ -9733,7 +9819,7 @@ var PdfPreview = ({
|
|
|
9733
9819
|
"rounded-[6px] border border-grey-300 bg-grey-100 text-grey-500",
|
|
9734
9820
|
className
|
|
9735
9821
|
),
|
|
9736
|
-
style: { width, height },
|
|
9822
|
+
style: { width: containerWidth, height: height || void 0 },
|
|
9737
9823
|
children: [
|
|
9738
9824
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)(FaIcon, { name: "file-pdf", size: 24 }),
|
|
9739
9825
|
/* @__PURE__ */ (0, import_jsx_runtime121.jsx)("span", { className: "text-xs", children: "Aper\xE7u indisponible" })
|
|
@@ -9744,11 +9830,12 @@ var PdfPreview = ({
|
|
|
9744
9830
|
return /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9745
9831
|
"div",
|
|
9746
9832
|
{
|
|
9833
|
+
ref: containerRef,
|
|
9747
9834
|
className: cn(
|
|
9748
9835
|
"overflow-y-auto rounded-[6px] border border-grey-300",
|
|
9749
9836
|
className
|
|
9750
9837
|
),
|
|
9751
|
-
style: { width, maxHeight },
|
|
9838
|
+
style: { width: containerWidth, maxHeight },
|
|
9752
9839
|
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9753
9840
|
import_react_pdf.Document,
|
|
9754
9841
|
{
|
|
@@ -9757,11 +9844,11 @@ var PdfPreview = ({
|
|
|
9757
9844
|
onLoadError: () => setHasError(true),
|
|
9758
9845
|
loading: thumbnailSkeleton,
|
|
9759
9846
|
error: thumbnailSkeleton,
|
|
9760
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(Layout, { column: true, gap: 2, className: "p-2", children: pixelWidth > 0 && Array.from({ length: numPages }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
9761
9848
|
import_react_pdf.Page,
|
|
9762
9849
|
{
|
|
9763
9850
|
pageNumber: i + 1,
|
|
9764
|
-
width:
|
|
9851
|
+
width: pixelWidth - 16,
|
|
9765
9852
|
renderTextLayer: false,
|
|
9766
9853
|
renderAnnotationLayer: false
|
|
9767
9854
|
},
|
|
@@ -11174,17 +11261,18 @@ var MessageDateSeparator = ({
|
|
|
11174
11261
|
tone = "neutral",
|
|
11175
11262
|
className
|
|
11176
11263
|
}) => /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(Layout, { fullWidth: true, gap: 2, align: "center", className, children: [
|
|
11177
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
|
|
11178
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { width: "auto", className: "
|
|
11264
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { flex: 1, className: "min-w-4", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) }),
|
|
11265
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { width: "auto", className: "min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
11179
11266
|
Text,
|
|
11180
11267
|
{
|
|
11181
11268
|
size: "xs",
|
|
11182
11269
|
weight: tone === "alert" ? "semibold" : "normal",
|
|
11183
11270
|
color: SEPARATOR_TEXT[tone],
|
|
11271
|
+
className: "text-center",
|
|
11184
11272
|
children: label
|
|
11185
11273
|
}
|
|
11186
11274
|
) }),
|
|
11187
|
-
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { flex: 1, children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
|
|
11275
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Layout, { flex: 1, className: "min-w-4", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(Divider, { className: SEPARATOR_LINE[tone] }) })
|
|
11188
11276
|
] });
|
|
11189
11277
|
var MessageScroller = ({
|
|
11190
11278
|
children,
|