design-zystem 1.0.374 → 1.0.376

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.
@@ -1560,6 +1560,8 @@ declare const formatName: (person?: {
1560
1560
 
1561
1561
  declare const getRelativeTime: (date: Date | string) => string;
1562
1562
 
1563
+ declare const getElapsedTime: (date: Date | string) => string;
1564
+
1563
1565
  declare const formatTime: (time: string | null | undefined) => string;
1564
1566
 
1565
1567
  declare const easterDate: (year: number) => Date;
@@ -1624,6 +1626,19 @@ declare const getInitials: (author: AuthorLike | null | undefined) => string;
1624
1626
 
1625
1627
  declare const getAvatarColor: (key: string) => string;
1626
1628
 
1629
+ declare const PASTEL_COLORS: {
1630
+ background: string;
1631
+ text: string;
1632
+ }[];
1633
+ type PastelColorPair = (typeof PASTEL_COLORS)[number];
1634
+ /**
1635
+ * Couleur d'avatar déterministe pour un nom, en pastel avec sa couleur de texte
1636
+ * lisible. `generateHexColor` et `getAvatarColor` renvoient un hex saturé et
1637
+ * seul : ils ne conviennent ni au rendu pastel attendu, ni aux props
1638
+ * `backgroundColor` + `textColor` de l'`Avatar`.
1639
+ */
1640
+ declare const getPastelColorPair: (firstName?: string, lastName?: string) => PastelColorPair;
1641
+
1627
1642
  declare const formatNameWithInitial: (firstname: string | null, lastname: string | null) => string | null;
1628
1643
 
1629
1644
  declare const getFileNameFromUrl: (url: string | null | undefined, fallback?: string) => string;
@@ -1725,4 +1740,4 @@ declare const allowAutofill: (autoComplete: string) => {
1725
1740
  "data-form-type": undefined;
1726
1741
  };
1727
1742
 
1728
- 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, type IconVariant, 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 SelectBubbleOption, 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 };
1743
+ 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, type IconVariant, 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 SelectBubbleOption, 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, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getPastelColorPair, getRelativeTime, isHoliday, isSameDay, isolateCity, noAutofillProps, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText, useAvatarSize };
@@ -1560,6 +1560,8 @@ declare const formatName: (person?: {
1560
1560
 
1561
1561
  declare const getRelativeTime: (date: Date | string) => string;
1562
1562
 
1563
+ declare const getElapsedTime: (date: Date | string) => string;
1564
+
1563
1565
  declare const formatTime: (time: string | null | undefined) => string;
1564
1566
 
1565
1567
  declare const easterDate: (year: number) => Date;
@@ -1624,6 +1626,19 @@ declare const getInitials: (author: AuthorLike | null | undefined) => string;
1624
1626
 
1625
1627
  declare const getAvatarColor: (key: string) => string;
1626
1628
 
1629
+ declare const PASTEL_COLORS: {
1630
+ background: string;
1631
+ text: string;
1632
+ }[];
1633
+ type PastelColorPair = (typeof PASTEL_COLORS)[number];
1634
+ /**
1635
+ * Couleur d'avatar déterministe pour un nom, en pastel avec sa couleur de texte
1636
+ * lisible. `generateHexColor` et `getAvatarColor` renvoient un hex saturé et
1637
+ * seul : ils ne conviennent ni au rendu pastel attendu, ni aux props
1638
+ * `backgroundColor` + `textColor` de l'`Avatar`.
1639
+ */
1640
+ declare const getPastelColorPair: (firstName?: string, lastName?: string) => PastelColorPair;
1641
+
1627
1642
  declare const formatNameWithInitial: (firstname: string | null, lastname: string | null) => string | null;
1628
1643
 
1629
1644
  declare const getFileNameFromUrl: (url: string | null | undefined, fallback?: string) => string;
@@ -1725,4 +1740,4 @@ declare const allowAutofill: (autoComplete: string) => {
1725
1740
  "data-form-type": undefined;
1726
1741
  };
1727
1742
 
1728
- 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, type IconVariant, 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 SelectBubbleOption, 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 };
1743
+ 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, type IconVariant, 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 SelectBubbleOption, 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, getElapsedTime, getFileIconByMimeType, getFileKind, getFileNameFromUrl, getInitials, getMimeCategory, getPastelColorPair, getRelativeTime, isHoliday, isSameDay, isolateCity, noAutofillProps, optimizeImage, parseAmount, parseIsoDate, toast, truncateFileName, truncateText, useAvatarSize };
package/dist/ui/index.js CHANGED
@@ -199,11 +199,13 @@ __export(index_exports, {
199
199
  generateHexColor: () => generateHexColor,
200
200
  getAvatarColor: () => getAvatarColor,
201
201
  getCleanFileName: () => getCleanFileName,
202
+ getElapsedTime: () => getElapsedTime,
202
203
  getFileIconByMimeType: () => getFileIconByMimeType,
203
204
  getFileKind: () => getFileKind,
204
205
  getFileNameFromUrl: () => getFileNameFromUrl,
205
206
  getInitials: () => getInitials,
206
207
  getMimeCategory: () => getMimeCategory,
208
+ getPastelColorPair: () => getPastelColorPair,
207
209
  getRelativeTime: () => getRelativeTime,
208
210
  isHoliday: () => isHoliday,
209
211
  isSameDay: () => isSameDay,
@@ -3220,6 +3222,48 @@ var getAvatarColor = (key) => {
3220
3222
  return AVATAR_COLORS[hashString(key) % AVATAR_COLORS.length];
3221
3223
  };
3222
3224
 
3225
+ // src/utils/string/getPastelColorPair.ts
3226
+ var PASTEL_COLORS = [
3227
+ { background: "#ffe5e5", text: "#993333" },
3228
+ { background: "#ffd9cc", text: "#994d33" },
3229
+ { background: "#ffedcc", text: "#996633" },
3230
+ { background: "#fff5cc", text: "#997a33" },
3231
+ { background: "#f9ffcc", text: "#7a9933" },
3232
+ { background: "#ecffcc", text: "#669933" },
3233
+ { background: "#ddffcc", text: "#339933" },
3234
+ { background: "#ccffd9", text: "#33996b" },
3235
+ { background: "#ccffe5", text: "#339988" },
3236
+ { background: "#ccfff5", text: "#339999" },
3237
+ { background: "#ccf5ff", text: "#337a99" },
3238
+ { background: "#ccecff", text: "#336699" },
3239
+ { background: "#ccdfff", text: "#334d99" },
3240
+ { background: "#ccd1ff", text: "#333399" },
3241
+ { background: "#e5ccff", text: "#5c3399" },
3242
+ { background: "#f2ccff", text: "#7a3399" },
3243
+ { background: "#ffccf9", text: "#99337a" },
3244
+ { background: "#ffcce5", text: "#993366" },
3245
+ { background: "#ffccd9", text: "#99334d" },
3246
+ { background: "#dbffcc", text: "#4d9933" },
3247
+ { background: "#ccffe8", text: "#33997a" },
3248
+ { background: "#daccff", text: "#443399" },
3249
+ { background: "#ecccff", text: "#663399" },
3250
+ { background: "#cce0ff", text: "#334d99" },
3251
+ { background: "#f5ccff", text: "#7a3399" },
3252
+ { background: "#ffcce8", text: "#993366" },
3253
+ { background: "#f0ffcc", text: "#669933" },
3254
+ { background: "#ccffd2", text: "#33994d" },
3255
+ { background: "#ccffe0", text: "#339966" }
3256
+ ];
3257
+ var getPastelColorPair = (firstName = "", lastName = "") => {
3258
+ var _a, _b, _c, _d;
3259
+ const fullName = ((_b = (_a = firstName == null ? void 0 : firstName.trim()) == null ? void 0 : _a.toLowerCase()) != null ? _b : "") + ((_d = (_c = lastName == null ? void 0 : lastName.trim()) == null ? void 0 : _c.toLowerCase()) != null ? _d : "");
3260
+ let hash = 0;
3261
+ for (let i = 0; i < fullName.length; i++) {
3262
+ hash = fullName.charCodeAt(i) + ((hash << 5) - hash);
3263
+ }
3264
+ return PASTEL_COLORS[Math.abs(hash) % PASTEL_COLORS.length];
3265
+ };
3266
+
3223
3267
  // src/utils/string/formatNameWithInitial.ts
3224
3268
  var formatNameWithInitial = (firstname, lastname) => {
3225
3269
  if (!firstname && !lastname) return null;
@@ -7238,6 +7282,27 @@ var getRelativeTime = (date) => {
7238
7282
  return "\xE0 l'instant";
7239
7283
  };
7240
7284
 
7285
+ // src/utils/date/getElapsedTime.ts
7286
+ var UNITS2 = [
7287
+ { name: "an", seconds: 31536e3, pluralize: true },
7288
+ { name: "mois", seconds: 2592e3, pluralize: false },
7289
+ { name: "semaine", seconds: 604800, pluralize: true },
7290
+ { name: "jour", seconds: 86400, pluralize: true }
7291
+ ];
7292
+ var getElapsedTime = (date) => {
7293
+ const elapsedSeconds = Math.floor(
7294
+ (Date.now() - new Date(date).getTime()) / 1e3
7295
+ );
7296
+ for (const unit of UNITS2) {
7297
+ const interval = Math.floor(elapsedSeconds / unit.seconds);
7298
+ if (interval >= 1) {
7299
+ const suffix = unit.pluralize && interval > 1 ? "s" : "";
7300
+ return `${interval} ${unit.name}${suffix}`;
7301
+ }
7302
+ }
7303
+ return "aujourd'hui";
7304
+ };
7305
+
7241
7306
  // src/utils/date/formatTime.ts
7242
7307
  var formatTime = (time) => {
7243
7308
  if (!time) return "";
@@ -7780,11 +7845,13 @@ var optimizeImage = async (file, desiredBaseName, opts = {}) => {
7780
7845
  generateHexColor,
7781
7846
  getAvatarColor,
7782
7847
  getCleanFileName,
7848
+ getElapsedTime,
7783
7849
  getFileIconByMimeType,
7784
7850
  getFileKind,
7785
7851
  getFileNameFromUrl,
7786
7852
  getInitials,
7787
7853
  getMimeCategory,
7854
+ getPastelColorPair,
7788
7855
  getRelativeTime,
7789
7856
  isHoliday,
7790
7857
  isSameDay,
package/dist/ui/index.mjs CHANGED
@@ -3050,6 +3050,48 @@ var getAvatarColor = (key) => {
3050
3050
  return AVATAR_COLORS[hashString(key) % AVATAR_COLORS.length];
3051
3051
  };
3052
3052
 
3053
+ // src/utils/string/getPastelColorPair.ts
3054
+ var PASTEL_COLORS = [
3055
+ { background: "#ffe5e5", text: "#993333" },
3056
+ { background: "#ffd9cc", text: "#994d33" },
3057
+ { background: "#ffedcc", text: "#996633" },
3058
+ { background: "#fff5cc", text: "#997a33" },
3059
+ { background: "#f9ffcc", text: "#7a9933" },
3060
+ { background: "#ecffcc", text: "#669933" },
3061
+ { background: "#ddffcc", text: "#339933" },
3062
+ { background: "#ccffd9", text: "#33996b" },
3063
+ { background: "#ccffe5", text: "#339988" },
3064
+ { background: "#ccfff5", text: "#339999" },
3065
+ { background: "#ccf5ff", text: "#337a99" },
3066
+ { background: "#ccecff", text: "#336699" },
3067
+ { background: "#ccdfff", text: "#334d99" },
3068
+ { background: "#ccd1ff", text: "#333399" },
3069
+ { background: "#e5ccff", text: "#5c3399" },
3070
+ { background: "#f2ccff", text: "#7a3399" },
3071
+ { background: "#ffccf9", text: "#99337a" },
3072
+ { background: "#ffcce5", text: "#993366" },
3073
+ { background: "#ffccd9", text: "#99334d" },
3074
+ { background: "#dbffcc", text: "#4d9933" },
3075
+ { background: "#ccffe8", text: "#33997a" },
3076
+ { background: "#daccff", text: "#443399" },
3077
+ { background: "#ecccff", text: "#663399" },
3078
+ { background: "#cce0ff", text: "#334d99" },
3079
+ { background: "#f5ccff", text: "#7a3399" },
3080
+ { background: "#ffcce8", text: "#993366" },
3081
+ { background: "#f0ffcc", text: "#669933" },
3082
+ { background: "#ccffd2", text: "#33994d" },
3083
+ { background: "#ccffe0", text: "#339966" }
3084
+ ];
3085
+ var getPastelColorPair = (firstName = "", lastName = "") => {
3086
+ var _a, _b, _c, _d;
3087
+ const fullName = ((_b = (_a = firstName == null ? void 0 : firstName.trim()) == null ? void 0 : _a.toLowerCase()) != null ? _b : "") + ((_d = (_c = lastName == null ? void 0 : lastName.trim()) == null ? void 0 : _c.toLowerCase()) != null ? _d : "");
3088
+ let hash = 0;
3089
+ for (let i = 0; i < fullName.length; i++) {
3090
+ hash = fullName.charCodeAt(i) + ((hash << 5) - hash);
3091
+ }
3092
+ return PASTEL_COLORS[Math.abs(hash) % PASTEL_COLORS.length];
3093
+ };
3094
+
3053
3095
  // src/utils/string/formatNameWithInitial.ts
3054
3096
  var formatNameWithInitial = (firstname, lastname) => {
3055
3097
  if (!firstname && !lastname) return null;
@@ -7088,6 +7130,27 @@ var getRelativeTime = (date) => {
7088
7130
  return "\xE0 l'instant";
7089
7131
  };
7090
7132
 
7133
+ // src/utils/date/getElapsedTime.ts
7134
+ var UNITS2 = [
7135
+ { name: "an", seconds: 31536e3, pluralize: true },
7136
+ { name: "mois", seconds: 2592e3, pluralize: false },
7137
+ { name: "semaine", seconds: 604800, pluralize: true },
7138
+ { name: "jour", seconds: 86400, pluralize: true }
7139
+ ];
7140
+ var getElapsedTime = (date) => {
7141
+ const elapsedSeconds = Math.floor(
7142
+ (Date.now() - new Date(date).getTime()) / 1e3
7143
+ );
7144
+ for (const unit of UNITS2) {
7145
+ const interval = Math.floor(elapsedSeconds / unit.seconds);
7146
+ if (interval >= 1) {
7147
+ const suffix = unit.pluralize && interval > 1 ? "s" : "";
7148
+ return `${interval} ${unit.name}${suffix}`;
7149
+ }
7150
+ }
7151
+ return "aujourd'hui";
7152
+ };
7153
+
7091
7154
  // src/utils/date/formatTime.ts
7092
7155
  var formatTime = (time) => {
7093
7156
  if (!time) return "";
@@ -7629,11 +7692,13 @@ export {
7629
7692
  generateHexColor,
7630
7693
  getAvatarColor,
7631
7694
  getCleanFileName,
7695
+ getElapsedTime,
7632
7696
  getFileIconByMimeType,
7633
7697
  getFileKind,
7634
7698
  getFileNameFromUrl,
7635
7699
  getInitials,
7636
7700
  getMimeCategory,
7701
+ getPastelColorPair,
7637
7702
  getRelativeTime,
7638
7703
  isHoliday,
7639
7704
  isSameDay,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "design-zystem",
3
- "version": "1.0.374",
3
+ "version": "1.0.376",
4
4
  "description": "A React design system of importable components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",