design-zystem 1.0.346 → 1.0.348
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 +110 -24
- package/dist/ui/index.d.ts +110 -24
- package/dist/ui/index.js +443 -240
- package/dist/ui/index.mjs +443 -237
- package/dist/ui/style.css +1 -1
- package/package.json +3 -2
package/dist/ui/index.d.mts
CHANGED
|
@@ -50,6 +50,7 @@ declare const Layout: react.ForwardRefExoticComponent<LayoutProps & react.RefAtt
|
|
|
50
50
|
*/
|
|
51
51
|
declare const COLOR_TOKENS: readonly ["blue-700", "blue-900", "blue-950", "red-900", "red-500", "green-700", "grey-600", "yellow-500", "yellow-300", "yellow-200", "purple-700"];
|
|
52
52
|
type ColorToken = (typeof COLOR_TOKENS)[number];
|
|
53
|
+
type HexColor = `#${string}`;
|
|
53
54
|
|
|
54
55
|
declare const boxVariants: (props?: ({
|
|
55
56
|
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
@@ -266,18 +267,58 @@ interface IconBadgeProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'on
|
|
|
266
267
|
*/
|
|
267
268
|
declare const IconBadge: react.ForwardRefExoticComponent<IconBadgeProps & react.RefAttributes<HTMLElement>>;
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
declare const THEME_VARIANT_CLASSES: {
|
|
271
|
+
solid: {
|
|
272
|
+
'blue-700': string;
|
|
273
|
+
'blue-900': string;
|
|
274
|
+
'blue-950': string;
|
|
275
|
+
'red-900': string;
|
|
276
|
+
'red-500': string;
|
|
277
|
+
'green-700': string;
|
|
278
|
+
'grey-600': string;
|
|
279
|
+
'yellow-500': string;
|
|
280
|
+
'yellow-300': string;
|
|
281
|
+
'yellow-200': string;
|
|
282
|
+
'purple-700': string;
|
|
283
|
+
};
|
|
284
|
+
pale: {
|
|
285
|
+
'blue-700': string;
|
|
286
|
+
'blue-900': string;
|
|
287
|
+
'blue-950': string;
|
|
288
|
+
'red-900': string;
|
|
289
|
+
'red-500': string;
|
|
290
|
+
'green-700': string;
|
|
291
|
+
'grey-600': string;
|
|
292
|
+
'yellow-500': string;
|
|
293
|
+
'yellow-300': string;
|
|
294
|
+
'yellow-200': string;
|
|
295
|
+
'purple-700': string;
|
|
296
|
+
};
|
|
297
|
+
outline: {
|
|
298
|
+
'blue-700': string;
|
|
299
|
+
'blue-900': string;
|
|
300
|
+
'blue-950': string;
|
|
301
|
+
'red-900': string;
|
|
302
|
+
'red-500': string;
|
|
303
|
+
'green-700': string;
|
|
304
|
+
'grey-600': string;
|
|
305
|
+
'yellow-500': string;
|
|
306
|
+
'yellow-300': string;
|
|
307
|
+
'yellow-200': string;
|
|
308
|
+
'purple-700': string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
type ButtonVariant = Extract<keyof typeof THEME_VARIANT_CLASSES, 'solid' | 'outline'>;
|
|
272
313
|
declare const buttonVariants: (props?: ({
|
|
273
|
-
color?: "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "purple-700" | null | undefined;
|
|
274
|
-
look?: "filled" | "outline" | null | undefined;
|
|
275
314
|
size?: "s" | "m" | "l" | null | undefined;
|
|
276
315
|
iconOnly?: boolean | null | undefined;
|
|
277
316
|
fullWidth?: boolean | null | undefined;
|
|
278
317
|
elevated?: boolean | null | undefined;
|
|
279
318
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
280
319
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, VariantProps<typeof buttonVariants> {
|
|
320
|
+
variant?: ButtonVariant;
|
|
321
|
+
theme?: ColorToken;
|
|
281
322
|
label?: string;
|
|
282
323
|
iconLeft?: ReactNode;
|
|
283
324
|
iconRight?: ReactNode;
|
|
@@ -295,9 +336,9 @@ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttri
|
|
|
295
336
|
* une barre — pas de bordure, un fond gris, et pas de poignée de redimension,
|
|
296
337
|
* qui déborderait d'une barre de saisie.
|
|
297
338
|
*/
|
|
298
|
-
type
|
|
339
|
+
type TextareaVariant = 'outline' | 'quiet';
|
|
299
340
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
300
|
-
|
|
341
|
+
variant?: TextareaVariant;
|
|
301
342
|
}
|
|
302
343
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
303
344
|
|
|
@@ -389,15 +430,22 @@ interface SwitchProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixSw
|
|
|
389
430
|
}
|
|
390
431
|
declare const Switch: ({ size, color, onChange, label, labelPosition, id, className, ...props }: SwitchProps) => react.JSX.Element;
|
|
391
432
|
|
|
433
|
+
type BadgeVariant = Extract<keyof typeof THEME_VARIANT_CLASSES, 'pale' | 'solid'>;
|
|
392
434
|
declare const badgeVariants: (props?: ({
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
size?: "s" | "xs" | "m" | "l" | "xxs" | "xl" | "xxl" | null | undefined;
|
|
396
|
-
isRound?: boolean | null | undefined;
|
|
397
|
-
pointer?: boolean | null | undefined;
|
|
398
|
-
pulse?: boolean | null | undefined;
|
|
435
|
+
size?: "s" | "m" | null | undefined;
|
|
436
|
+
shape?: "square" | "pill" | null | undefined;
|
|
399
437
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
400
438
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeVariants> {
|
|
439
|
+
/** `pale` : fond pâle, le défaut. `solid` : fond plein et texte blanc, pour un compteur qui doit rester lisible par-dessus du contenu. */
|
|
440
|
+
variant?: BadgeVariant;
|
|
441
|
+
theme?: ColorToken;
|
|
442
|
+
backgroundColor?: HexColor;
|
|
443
|
+
textColor?: HexColor;
|
|
444
|
+
pointer?: boolean;
|
|
445
|
+
pulse?: boolean;
|
|
446
|
+
fullWidth?: boolean;
|
|
447
|
+
/** Rend l'enfant à la place du `span` (un `button` ou un `a` pour un badge cliquable) en lui transmettant classes et props. */
|
|
448
|
+
asChild?: boolean;
|
|
401
449
|
}
|
|
402
450
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
403
451
|
|
|
@@ -426,10 +474,12 @@ interface ModalProps {
|
|
|
426
474
|
width?: string;
|
|
427
475
|
/** L'en-tête (`ModalHeader`) devient une poignée de glisser-déposer. */
|
|
428
476
|
draggable?: boolean;
|
|
477
|
+
/** Focus à l'ouverture (Radix). `e.preventDefault()` évite le focus auto du premier bouton — et l'ouverture de son tooltip. */
|
|
478
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
429
479
|
className?: string;
|
|
430
480
|
}
|
|
431
481
|
/** Construit sur `@radix-ui/react-dialog` — compose-le avec `ModalHeader`/`ModalTitle`/`ModalDescription`/`ModalBody`/`ModalFooter`/`ModalClose`, comme le `Table`. */
|
|
432
|
-
declare const Modal: ({ children, open, onClose, width, draggable, className, }: ModalProps) => react.JSX.Element;
|
|
482
|
+
declare const Modal: ({ children, open, onClose, width, draggable, onOpenAutoFocus, className, }: ModalProps) => react.JSX.Element;
|
|
433
483
|
declare const ModalHeader: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
434
484
|
declare const ModalTitle: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof RadixDialog.Title>) => react.JSX.Element;
|
|
435
485
|
declare const ModalDescription: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof RadixDialog.Description>) => react.JSX.Element;
|
|
@@ -903,14 +953,14 @@ interface EmptyStateProps {
|
|
|
903
953
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, className, }: EmptyStateProps) => react.JSX.Element;
|
|
904
954
|
|
|
905
955
|
/**
|
|
906
|
-
* Un
|
|
956
|
+
* Un thème = une famille de couleur, pas une nuance : tous les tokens d'une même
|
|
907
957
|
* famille donnent le même fond (`*-50`) et le même texte. La nuance passée en
|
|
908
|
-
* `
|
|
958
|
+
* `theme` sert à choisir la famille, pas à décliner le rendu.
|
|
909
959
|
*
|
|
910
960
|
* Pas de bordure : le fond teinté suffit à détacher la bannière de la page.
|
|
911
961
|
*/
|
|
912
962
|
declare const bannerVariants: (props?: ({
|
|
913
|
-
|
|
963
|
+
theme?: "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "purple-700" | null | undefined;
|
|
914
964
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
915
965
|
interface BannerAction {
|
|
916
966
|
label: string;
|
|
@@ -943,7 +993,7 @@ interface BannerProps extends VariantProps<typeof bannerVariants> {
|
|
|
943
993
|
width?: string;
|
|
944
994
|
className?: string;
|
|
945
995
|
}
|
|
946
|
-
declare const Banner: ({
|
|
996
|
+
declare const Banner: ({ theme, badge, title, subtitle, message, action, toggle, children, justify, fullWidth, width, className, }: BannerProps) => react.JSX.Element;
|
|
947
997
|
|
|
948
998
|
interface FloatingAction {
|
|
949
999
|
id: string;
|
|
@@ -1221,6 +1271,43 @@ interface PdfPreviewProps {
|
|
|
1221
1271
|
/** Lecture complète d'un PDF (toutes les pages, défilement vertical) — construit sur `react-pdf` (wrapper de `pdf.js`), shadcn n'a pas de composant de rendu de document. */
|
|
1222
1272
|
declare const PdfPreview: ({ file, width, maxHeight, className, }: PdfPreviewProps) => react.JSX.Element;
|
|
1223
1273
|
|
|
1274
|
+
interface VideoPlayerProps {
|
|
1275
|
+
src: string;
|
|
1276
|
+
/** Vignette (première image) affichée avant la lecture. Sans elle : tuile sombre. */
|
|
1277
|
+
poster?: string;
|
|
1278
|
+
/** Durée en secondes, affichée en `m:ss` sur la vignette. */
|
|
1279
|
+
duration?: number;
|
|
1280
|
+
/** Dimensions natives de la vidéo — servent uniquement au ratio de la vignette. */
|
|
1281
|
+
width?: number;
|
|
1282
|
+
height?: number;
|
|
1283
|
+
/** Titre du plein écran et nom proposé au téléchargement. */
|
|
1284
|
+
fileName?: string;
|
|
1285
|
+
/** URL de téléchargement (ex. URL Storage avec `?download=`). Défaut : `src`. */
|
|
1286
|
+
downloadUrl?: string;
|
|
1287
|
+
/** Remplace le téléchargement intégré. */
|
|
1288
|
+
onDownload?: () => void;
|
|
1289
|
+
/** Largeur max de la vignette dans le fil, en px. */
|
|
1290
|
+
maxWidth?: number;
|
|
1291
|
+
/** Hauteur max de la vignette dans le fil, en px (vidéos portrait). */
|
|
1292
|
+
maxHeight?: number;
|
|
1293
|
+
/** Contenu libre en haut à gauche de la vignette (ex. type de fichier). */
|
|
1294
|
+
label?: ReactNode;
|
|
1295
|
+
/** Contenu libre en bas à droite de la vignette (ex. heure d'envoi). */
|
|
1296
|
+
meta?: ReactNode;
|
|
1297
|
+
/** Volume appliqué à l'ouverture du lecteur (fil et plein écran), de 0 à 1. Défaut : 0,5. */
|
|
1298
|
+
defaultVolume?: number;
|
|
1299
|
+
className?: string;
|
|
1300
|
+
}
|
|
1301
|
+
/** `75` → `1:15`, `3725` → `1:02:05`. Chaîne vide si la durée est absente ou invalide. */
|
|
1302
|
+
declare const formatVideoDuration: (seconds?: number) => string;
|
|
1303
|
+
/**
|
|
1304
|
+
* Vidéo de conversation : vignette au format des photos (poster + bouton lecture + durée),
|
|
1305
|
+
* lecture/pause dans le fil au clic, agrandissement dans une `Modal`, téléchargement.
|
|
1306
|
+
* Jamais d'autoplay : la lecture ne démarre que sur une action de l'utilisateur.
|
|
1307
|
+
* Les clics ne remontent pas au conteneur (bulle de message cliquable).
|
|
1308
|
+
*/
|
|
1309
|
+
declare const VideoPlayer: ({ src, poster, duration, width, height, fileName, downloadUrl, onDownload, maxWidth, maxHeight, label, meta, defaultVolume, className, }: VideoPlayerProps) => react.JSX.Element;
|
|
1310
|
+
|
|
1224
1311
|
interface ScrollAreaProps extends Omit<ComponentPropsWithoutRef<typeof RadixScrollArea.Root>, 'children'> {
|
|
1225
1312
|
children?: ReactNode;
|
|
1226
1313
|
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
@@ -1230,13 +1317,12 @@ interface ScrollAreaProps extends Omit<ComponentPropsWithoutRef<typeof RadixScro
|
|
|
1230
1317
|
/** Construit sur `@radix-ui/react-scroll-area` (comme le `ScrollArea` de shadcn) — scrollbars custom au lieu de celles du système. */
|
|
1231
1318
|
declare const ScrollArea: ({ children, className, orientation, viewportRef, ...props }: ScrollAreaProps) => react.JSX.Element;
|
|
1232
1319
|
|
|
1233
|
-
type MessageVariant = '
|
|
1234
|
-
type MessageTone = 'solid' | 'soft';
|
|
1320
|
+
type MessageVariant = 'solid' | 'pale';
|
|
1235
1321
|
interface MessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
1236
|
-
/** `
|
|
1322
|
+
/** `true` = message de l'utilisateur courant (aligné à droite), `false` = interlocuteur (aligné à gauche). */
|
|
1323
|
+
isOwn?: boolean;
|
|
1324
|
+
/** `solid` = bulle pleine (messagerie), `pale` = bulle pâle (commentaires, fils de discussion). */
|
|
1237
1325
|
variant?: MessageVariant;
|
|
1238
|
-
/** `solid` = bulle pleine (messagerie), `soft` = bulle pâle (commentaires, fils de discussion). */
|
|
1239
|
-
tone?: MessageTone;
|
|
1240
1326
|
/** Contenu du message — texte brut ou nœuds riches (mentions, liens cliquables). */
|
|
1241
1327
|
children?: ReactNode;
|
|
1242
1328
|
/** Nom de l'auteur, affiché au-dessus de la bulle quand `showAuthor`. */
|
|
@@ -1577,4 +1663,4 @@ declare const allowAutofill: (autoComplete: string) => {
|
|
|
1577
1663
|
"data-form-type": undefined;
|
|
1578
1664
|
};
|
|
1579
1665
|
|
|
1580
|
-
export { Attachment, type AttachmentProps, type AttachmentStatus, Avatar, AvatarBadge, type AvatarBadgeConfig, type AvatarBadgeProps, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerAction, type BannerJustify, type BannerProps, type BannerToggle, Box, type BoxProps, Bulk, type BulkProps, type BulkSection, Button, type
|
|
1666
|
+
export { Attachment, type AttachmentProps, type AttachmentStatus, Avatar, AvatarBadge, type AvatarBadgeConfig, type AvatarBadgeProps, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerAction, type BannerJustify, type BannerProps, type BannerToggle, Box, type BoxProps, Bulk, type BulkProps, type BulkSection, Button, type ButtonProps, COLOR_TOKENS, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorKey, ColorPicker, type ColorPickerProps, type ColorToken, DatePicker, type DatePickerMode, type DatePickerProps, type DatePreset, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, EmailInput, type EmailInputProps, EmptyState, type EmptyStateProps, FilePicker, type FilePickerProps, FileUploadZone, type FileUploadZoneProps, type FloatingAction, FloatingButton, type FloatingButtonProps, type FloatingSafeArea, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, type HexColor, Icon, IconBadge, type IconBadgeProps, type IconColor, type IconFamily, type IconProps, type IconSize, type IconTabItem, IconTabs, type IconTabsProps, IconTooltip, type IconTooltipProps, Image, type ImageProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupProps, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemMedia, type ItemMediaProps, type ItemProps, ItemTitle, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Message, MessageDateSeparator, type MessageDateSeparatorProps, type MessageProps, MessageScroller, type MessageScrollerProps, type MessageSeparatorTone, type MessageVariant, MetricCard, type MetricCardProps, Modal, ModalBody, ModalClose, ModalDescription, ModalFooter, ModalHeader, type ModalProps, ModalTitle, type MultiSelectProps, type OptimizeImageOptions, type OptimizeImageResult, PageContainer, type PageContainerProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PdfPreview, type PdfPreviewProps, PhoneInput, type PhoneInputMeta, type PhoneInputProps, Popover, type PopoverMenuItem, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, type RadioOption, type RadioProps, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuSearchInput, type SidebarMenuSearchInputProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarProps, SidebarSupportInfo, type SidebarSupportInfoProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserMenu, type SidebarUserMenuAction, type SidebarUserMenuLeafAction, type SidebarUserMenuProps, type SingleSelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type SpinnerSize, Stepper, type StepperProps, Switch, type SwitchProps, type TabItem, Table, TableCell, type TableCellProps, type TableEmptyState, TableFooter, TableFooterCell, type TableFooterCellProps, type TableFooterProps, TableFooterRow, type TableFooterRowProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderRow, type TableHeaderRowProps, type TablePagination, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type TabsVariant, TagBubble, type TagBubbleProps, type TagOption, TagSelect, type TagSelectProps, Text, type TextProps, Textarea, type TextareaProps, type TextareaVariant, Timeline, type TimelineItem, type TimelineProps, type ToastOptions, type ToastType, Toaster, Tooltip, type TooltipProps, VideoPlayer, type VideoPlayerProps, addBusinessDays, allowAutofill, appendCacheBuster, appendQueryParam, buttonVariants, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVideoDuration, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, noAutofillProps, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText, useAvatarSize };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ declare const Layout: react.ForwardRefExoticComponent<LayoutProps & react.RefAtt
|
|
|
50
50
|
*/
|
|
51
51
|
declare const COLOR_TOKENS: readonly ["blue-700", "blue-900", "blue-950", "red-900", "red-500", "green-700", "grey-600", "yellow-500", "yellow-300", "yellow-200", "purple-700"];
|
|
52
52
|
type ColorToken = (typeof COLOR_TOKENS)[number];
|
|
53
|
+
type HexColor = `#${string}`;
|
|
53
54
|
|
|
54
55
|
declare const boxVariants: (props?: ({
|
|
55
56
|
padding?: "none" | "sm" | "md" | "lg" | null | undefined;
|
|
@@ -266,18 +267,58 @@ interface IconBadgeProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'on
|
|
|
266
267
|
*/
|
|
267
268
|
declare const IconBadge: react.ForwardRefExoticComponent<IconBadgeProps & react.RefAttributes<HTMLElement>>;
|
|
268
269
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
declare const THEME_VARIANT_CLASSES: {
|
|
271
|
+
solid: {
|
|
272
|
+
'blue-700': string;
|
|
273
|
+
'blue-900': string;
|
|
274
|
+
'blue-950': string;
|
|
275
|
+
'red-900': string;
|
|
276
|
+
'red-500': string;
|
|
277
|
+
'green-700': string;
|
|
278
|
+
'grey-600': string;
|
|
279
|
+
'yellow-500': string;
|
|
280
|
+
'yellow-300': string;
|
|
281
|
+
'yellow-200': string;
|
|
282
|
+
'purple-700': string;
|
|
283
|
+
};
|
|
284
|
+
pale: {
|
|
285
|
+
'blue-700': string;
|
|
286
|
+
'blue-900': string;
|
|
287
|
+
'blue-950': string;
|
|
288
|
+
'red-900': string;
|
|
289
|
+
'red-500': string;
|
|
290
|
+
'green-700': string;
|
|
291
|
+
'grey-600': string;
|
|
292
|
+
'yellow-500': string;
|
|
293
|
+
'yellow-300': string;
|
|
294
|
+
'yellow-200': string;
|
|
295
|
+
'purple-700': string;
|
|
296
|
+
};
|
|
297
|
+
outline: {
|
|
298
|
+
'blue-700': string;
|
|
299
|
+
'blue-900': string;
|
|
300
|
+
'blue-950': string;
|
|
301
|
+
'red-900': string;
|
|
302
|
+
'red-500': string;
|
|
303
|
+
'green-700': string;
|
|
304
|
+
'grey-600': string;
|
|
305
|
+
'yellow-500': string;
|
|
306
|
+
'yellow-300': string;
|
|
307
|
+
'yellow-200': string;
|
|
308
|
+
'purple-700': string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
type ButtonVariant = Extract<keyof typeof THEME_VARIANT_CLASSES, 'solid' | 'outline'>;
|
|
272
313
|
declare const buttonVariants: (props?: ({
|
|
273
|
-
color?: "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "purple-700" | null | undefined;
|
|
274
|
-
look?: "filled" | "outline" | null | undefined;
|
|
275
314
|
size?: "s" | "m" | "l" | null | undefined;
|
|
276
315
|
iconOnly?: boolean | null | undefined;
|
|
277
316
|
fullWidth?: boolean | null | undefined;
|
|
278
317
|
elevated?: boolean | null | undefined;
|
|
279
318
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
280
319
|
interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, VariantProps<typeof buttonVariants> {
|
|
320
|
+
variant?: ButtonVariant;
|
|
321
|
+
theme?: ColorToken;
|
|
281
322
|
label?: string;
|
|
282
323
|
iconLeft?: ReactNode;
|
|
283
324
|
iconRight?: ReactNode;
|
|
@@ -295,9 +336,9 @@ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttri
|
|
|
295
336
|
* une barre — pas de bordure, un fond gris, et pas de poignée de redimension,
|
|
296
337
|
* qui déborderait d'une barre de saisie.
|
|
297
338
|
*/
|
|
298
|
-
type
|
|
339
|
+
type TextareaVariant = 'outline' | 'quiet';
|
|
299
340
|
interface TextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
300
|
-
|
|
341
|
+
variant?: TextareaVariant;
|
|
301
342
|
}
|
|
302
343
|
declare const Textarea: react.ForwardRefExoticComponent<TextareaProps & react.RefAttributes<HTMLTextAreaElement>>;
|
|
303
344
|
|
|
@@ -389,15 +430,22 @@ interface SwitchProps extends Omit<React.ComponentPropsWithoutRef<typeof RadixSw
|
|
|
389
430
|
}
|
|
390
431
|
declare const Switch: ({ size, color, onChange, label, labelPosition, id, className, ...props }: SwitchProps) => react.JSX.Element;
|
|
391
432
|
|
|
433
|
+
type BadgeVariant = Extract<keyof typeof THEME_VARIANT_CLASSES, 'pale' | 'solid'>;
|
|
392
434
|
declare const badgeVariants: (props?: ({
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
size?: "s" | "xs" | "m" | "l" | "xxs" | "xl" | "xxl" | null | undefined;
|
|
396
|
-
isRound?: boolean | null | undefined;
|
|
397
|
-
pointer?: boolean | null | undefined;
|
|
398
|
-
pulse?: boolean | null | undefined;
|
|
435
|
+
size?: "s" | "m" | null | undefined;
|
|
436
|
+
shape?: "square" | "pill" | null | undefined;
|
|
399
437
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
400
438
|
interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>, VariantProps<typeof badgeVariants> {
|
|
439
|
+
/** `pale` : fond pâle, le défaut. `solid` : fond plein et texte blanc, pour un compteur qui doit rester lisible par-dessus du contenu. */
|
|
440
|
+
variant?: BadgeVariant;
|
|
441
|
+
theme?: ColorToken;
|
|
442
|
+
backgroundColor?: HexColor;
|
|
443
|
+
textColor?: HexColor;
|
|
444
|
+
pointer?: boolean;
|
|
445
|
+
pulse?: boolean;
|
|
446
|
+
fullWidth?: boolean;
|
|
447
|
+
/** Rend l'enfant à la place du `span` (un `button` ou un `a` pour un badge cliquable) en lui transmettant classes et props. */
|
|
448
|
+
asChild?: boolean;
|
|
401
449
|
}
|
|
402
450
|
declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
|
|
403
451
|
|
|
@@ -426,10 +474,12 @@ interface ModalProps {
|
|
|
426
474
|
width?: string;
|
|
427
475
|
/** L'en-tête (`ModalHeader`) devient une poignée de glisser-déposer. */
|
|
428
476
|
draggable?: boolean;
|
|
477
|
+
/** Focus à l'ouverture (Radix). `e.preventDefault()` évite le focus auto du premier bouton — et l'ouverture de son tooltip. */
|
|
478
|
+
onOpenAutoFocus?: (e: Event) => void;
|
|
429
479
|
className?: string;
|
|
430
480
|
}
|
|
431
481
|
/** Construit sur `@radix-ui/react-dialog` — compose-le avec `ModalHeader`/`ModalTitle`/`ModalDescription`/`ModalBody`/`ModalFooter`/`ModalClose`, comme le `Table`. */
|
|
432
|
-
declare const Modal: ({ children, open, onClose, width, draggable, className, }: ModalProps) => react.JSX.Element;
|
|
482
|
+
declare const Modal: ({ children, open, onClose, width, draggable, onOpenAutoFocus, className, }: ModalProps) => react.JSX.Element;
|
|
433
483
|
declare const ModalHeader: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react.JSX.Element;
|
|
434
484
|
declare const ModalTitle: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof RadixDialog.Title>) => react.JSX.Element;
|
|
435
485
|
declare const ModalDescription: ({ className, ...props }: React.ComponentPropsWithoutRef<typeof RadixDialog.Description>) => react.JSX.Element;
|
|
@@ -903,14 +953,14 @@ interface EmptyStateProps {
|
|
|
903
953
|
declare const EmptyState: ({ icon, title, description, actionLabel, onAction, className, }: EmptyStateProps) => react.JSX.Element;
|
|
904
954
|
|
|
905
955
|
/**
|
|
906
|
-
* Un
|
|
956
|
+
* Un thème = une famille de couleur, pas une nuance : tous les tokens d'une même
|
|
907
957
|
* famille donnent le même fond (`*-50`) et le même texte. La nuance passée en
|
|
908
|
-
* `
|
|
958
|
+
* `theme` sert à choisir la famille, pas à décliner le rendu.
|
|
909
959
|
*
|
|
910
960
|
* Pas de bordure : le fond teinté suffit à détacher la bannière de la page.
|
|
911
961
|
*/
|
|
912
962
|
declare const bannerVariants: (props?: ({
|
|
913
|
-
|
|
963
|
+
theme?: "blue-700" | "blue-900" | "blue-950" | "red-900" | "red-500" | "green-700" | "grey-600" | "yellow-500" | "yellow-300" | "yellow-200" | "purple-700" | null | undefined;
|
|
914
964
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
915
965
|
interface BannerAction {
|
|
916
966
|
label: string;
|
|
@@ -943,7 +993,7 @@ interface BannerProps extends VariantProps<typeof bannerVariants> {
|
|
|
943
993
|
width?: string;
|
|
944
994
|
className?: string;
|
|
945
995
|
}
|
|
946
|
-
declare const Banner: ({
|
|
996
|
+
declare const Banner: ({ theme, badge, title, subtitle, message, action, toggle, children, justify, fullWidth, width, className, }: BannerProps) => react.JSX.Element;
|
|
947
997
|
|
|
948
998
|
interface FloatingAction {
|
|
949
999
|
id: string;
|
|
@@ -1221,6 +1271,43 @@ interface PdfPreviewProps {
|
|
|
1221
1271
|
/** Lecture complète d'un PDF (toutes les pages, défilement vertical) — construit sur `react-pdf` (wrapper de `pdf.js`), shadcn n'a pas de composant de rendu de document. */
|
|
1222
1272
|
declare const PdfPreview: ({ file, width, maxHeight, className, }: PdfPreviewProps) => react.JSX.Element;
|
|
1223
1273
|
|
|
1274
|
+
interface VideoPlayerProps {
|
|
1275
|
+
src: string;
|
|
1276
|
+
/** Vignette (première image) affichée avant la lecture. Sans elle : tuile sombre. */
|
|
1277
|
+
poster?: string;
|
|
1278
|
+
/** Durée en secondes, affichée en `m:ss` sur la vignette. */
|
|
1279
|
+
duration?: number;
|
|
1280
|
+
/** Dimensions natives de la vidéo — servent uniquement au ratio de la vignette. */
|
|
1281
|
+
width?: number;
|
|
1282
|
+
height?: number;
|
|
1283
|
+
/** Titre du plein écran et nom proposé au téléchargement. */
|
|
1284
|
+
fileName?: string;
|
|
1285
|
+
/** URL de téléchargement (ex. URL Storage avec `?download=`). Défaut : `src`. */
|
|
1286
|
+
downloadUrl?: string;
|
|
1287
|
+
/** Remplace le téléchargement intégré. */
|
|
1288
|
+
onDownload?: () => void;
|
|
1289
|
+
/** Largeur max de la vignette dans le fil, en px. */
|
|
1290
|
+
maxWidth?: number;
|
|
1291
|
+
/** Hauteur max de la vignette dans le fil, en px (vidéos portrait). */
|
|
1292
|
+
maxHeight?: number;
|
|
1293
|
+
/** Contenu libre en haut à gauche de la vignette (ex. type de fichier). */
|
|
1294
|
+
label?: ReactNode;
|
|
1295
|
+
/** Contenu libre en bas à droite de la vignette (ex. heure d'envoi). */
|
|
1296
|
+
meta?: ReactNode;
|
|
1297
|
+
/** Volume appliqué à l'ouverture du lecteur (fil et plein écran), de 0 à 1. Défaut : 0,5. */
|
|
1298
|
+
defaultVolume?: number;
|
|
1299
|
+
className?: string;
|
|
1300
|
+
}
|
|
1301
|
+
/** `75` → `1:15`, `3725` → `1:02:05`. Chaîne vide si la durée est absente ou invalide. */
|
|
1302
|
+
declare const formatVideoDuration: (seconds?: number) => string;
|
|
1303
|
+
/**
|
|
1304
|
+
* Vidéo de conversation : vignette au format des photos (poster + bouton lecture + durée),
|
|
1305
|
+
* lecture/pause dans le fil au clic, agrandissement dans une `Modal`, téléchargement.
|
|
1306
|
+
* Jamais d'autoplay : la lecture ne démarre que sur une action de l'utilisateur.
|
|
1307
|
+
* Les clics ne remontent pas au conteneur (bulle de message cliquable).
|
|
1308
|
+
*/
|
|
1309
|
+
declare const VideoPlayer: ({ src, poster, duration, width, height, fileName, downloadUrl, onDownload, maxWidth, maxHeight, label, meta, defaultVolume, className, }: VideoPlayerProps) => react.JSX.Element;
|
|
1310
|
+
|
|
1224
1311
|
interface ScrollAreaProps extends Omit<ComponentPropsWithoutRef<typeof RadixScrollArea.Root>, 'children'> {
|
|
1225
1312
|
children?: ReactNode;
|
|
1226
1313
|
orientation?: 'vertical' | 'horizontal' | 'both';
|
|
@@ -1230,13 +1317,12 @@ interface ScrollAreaProps extends Omit<ComponentPropsWithoutRef<typeof RadixScro
|
|
|
1230
1317
|
/** Construit sur `@radix-ui/react-scroll-area` (comme le `ScrollArea` de shadcn) — scrollbars custom au lieu de celles du système. */
|
|
1231
1318
|
declare const ScrollArea: ({ children, className, orientation, viewportRef, ...props }: ScrollAreaProps) => react.JSX.Element;
|
|
1232
1319
|
|
|
1233
|
-
type MessageVariant = '
|
|
1234
|
-
type MessageTone = 'solid' | 'soft';
|
|
1320
|
+
type MessageVariant = 'solid' | 'pale';
|
|
1235
1321
|
interface MessageProps extends HTMLAttributes<HTMLDivElement> {
|
|
1236
|
-
/** `
|
|
1322
|
+
/** `true` = message de l'utilisateur courant (aligné à droite), `false` = interlocuteur (aligné à gauche). */
|
|
1323
|
+
isOwn?: boolean;
|
|
1324
|
+
/** `solid` = bulle pleine (messagerie), `pale` = bulle pâle (commentaires, fils de discussion). */
|
|
1237
1325
|
variant?: MessageVariant;
|
|
1238
|
-
/** `solid` = bulle pleine (messagerie), `soft` = bulle pâle (commentaires, fils de discussion). */
|
|
1239
|
-
tone?: MessageTone;
|
|
1240
1326
|
/** Contenu du message — texte brut ou nœuds riches (mentions, liens cliquables). */
|
|
1241
1327
|
children?: ReactNode;
|
|
1242
1328
|
/** Nom de l'auteur, affiché au-dessus de la bulle quand `showAuthor`. */
|
|
@@ -1577,4 +1663,4 @@ declare const allowAutofill: (autoComplete: string) => {
|
|
|
1577
1663
|
"data-form-type": undefined;
|
|
1578
1664
|
};
|
|
1579
1665
|
|
|
1580
|
-
export { Attachment, type AttachmentProps, type AttachmentStatus, Avatar, AvatarBadge, type AvatarBadgeConfig, type AvatarBadgeProps, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerAction, type BannerJustify, type BannerProps, type BannerToggle, Box, type BoxProps, Bulk, type BulkProps, type BulkSection, Button, type
|
|
1666
|
+
export { Attachment, type AttachmentProps, type AttachmentStatus, Avatar, AvatarBadge, type AvatarBadgeConfig, type AvatarBadgeProps, AvatarFallback, type AvatarFallbackProps, AvatarGroup, type AvatarGroupProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, Banner, type BannerAction, type BannerJustify, type BannerProps, type BannerToggle, Box, type BoxProps, Bulk, type BulkProps, type BulkSection, Button, type ButtonProps, COLOR_TOKENS, Checkbox, type CheckboxProps, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorKey, ColorPicker, type ColorPickerProps, type ColorToken, DatePicker, type DatePickerMode, type DatePickerProps, type DatePreset, Divider, type DividerProps, Drawer, DrawerBody, DrawerClose, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, type DrawerProps, DrawerTitle, EmailInput, type EmailInputProps, EmptyState, type EmptyStateProps, FilePicker, type FilePickerProps, FileUploadZone, type FileUploadZoneProps, type FloatingAction, FloatingButton, type FloatingButtonProps, type FloatingSafeArea, Gantt, type GanttBand, type GanttBar, type GanttDay, GanttDot, type GanttProps, type GanttRow, GanttSwatch, type HexColor, Icon, IconBadge, type IconBadgeProps, type IconColor, type IconFamily, type IconProps, type IconSize, type IconTabItem, IconTabs, type IconTabsProps, IconTooltip, type IconTooltipProps, Image, type ImageProps, Input, InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupButton, type InputGroupButtonProps, type InputGroupProps, type InputProps, Item, ItemActions, ItemContent, ItemDescription, ItemMedia, type ItemMediaProps, type ItemProps, ItemTitle, Label, type LabelProps, Layout, type LayoutProps, Link, type LinkProps, Message, MessageDateSeparator, type MessageDateSeparatorProps, type MessageProps, MessageScroller, type MessageScrollerProps, type MessageSeparatorTone, type MessageVariant, MetricCard, type MetricCardProps, Modal, ModalBody, ModalClose, ModalDescription, ModalFooter, ModalHeader, type ModalProps, ModalTitle, type MultiSelectProps, type OptimizeImageOptions, type OptimizeImageResult, PageContainer, type PageContainerProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PdfPreview, type PdfPreviewProps, PhoneInput, type PhoneInputMeta, type PhoneInputProps, Popover, type PopoverMenuItem, type PopoverProps, ProgressBar, type ProgressBarProps, Radio, type RadioOption, type RadioProps, ScrollArea, type ScrollAreaProps, SearchInput, type SearchInputProps, Select, type SelectOption, type SelectProps, Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarGroup, type SidebarGroupProps, SidebarHeader, type SidebarHeaderProps, SidebarMenuButton, type SidebarMenuButtonProps, SidebarMenuSearchInput, type SidebarMenuSearchInputProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, type SidebarMenuSubItemProps, type SidebarMenuSubProps, type SidebarProps, SidebarSupportInfo, type SidebarSupportInfoProps, SidebarTrigger, type SidebarTriggerProps, SidebarUserMenu, type SidebarUserMenuAction, type SidebarUserMenuLeafAction, type SidebarUserMenuProps, type SingleSelectProps, Skeleton, type SkeletonProps, Spinner, type SpinnerProps, type SpinnerSize, Stepper, type StepperProps, Switch, type SwitchProps, type TabItem, Table, TableCell, type TableCellProps, type TableEmptyState, TableFooter, TableFooterCell, type TableFooterCellProps, type TableFooterProps, TableFooterRow, type TableFooterRowProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderRow, type TableHeaderRowProps, type TablePagination, type TableProps, TableRow, type TableRowProps, Tabs, type TabsProps, type TabsVariant, TagBubble, type TagBubbleProps, type TagOption, TagSelect, type TagSelectProps, Text, type TextProps, Textarea, type TextareaProps, type TextareaVariant, Timeline, type TimelineItem, type TimelineProps, type ToastOptions, type ToastType, Toaster, Tooltip, type TooltipProps, VideoPlayer, type VideoPlayerProps, addBusinessDays, allowAutofill, appendCacheBuster, appendQueryParam, buttonVariants, capitalizeFirstLetter, colors, easterDate, formatAddress, formatCityFromFormattedAddress, formatCityWithPostalCode, formatDate, formatDateWithTime, formatDistance, formatDuration, formatEuro, formatKM, formatLocality, formatName, formatNameWithInitial, formatPhoneNumber, formatPlate, formatPlateWithoutDashes, formatPostalCodeFromFormattedAddress, formatRegionCode, formatTime, formatVideoDuration, formatVin, generateHexColor, getAvatarColor, getCleanFileName, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getRelativeTime, isHoliday, isSameDay, isolateCity, noAutofillProps, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText, useAvatarSize };
|