@eqtylab/equality 2.0.1 → 2.1.0

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/index.d.cts CHANGED
@@ -779,6 +779,25 @@ declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, o
779
779
 
780
780
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
781
781
 
782
+ type FormatDateDisplayMode = 'relative' | 'absolute';
783
+ interface FormatDateProps extends Omit<React$1.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'children'> {
784
+ /** The date to display. Accepts an ISO 8601 string, epoch milliseconds, or a Date. */
785
+ date: string | number | Date;
786
+ /** Render relative ("2 weeks ago") or absolute ("Jun 9 2026, 18:42:03 UTC") time. */
787
+ displayAs?: FormatDateDisplayMode;
788
+ /** Time zone used for absolute formatting. Defaults to "UTC". */
789
+ timeZone?: string;
790
+ /** BCP 47 locale used for formatting. Defaults to "en-US". */
791
+ locale?: string;
792
+ /** When relative, show a tooltip with the absolute time on hover/focus. Defaults to true. */
793
+ tooltip?: boolean;
794
+ /** When relative, re-render on an interval so the value stays current. Defaults to true. */
795
+ live?: boolean;
796
+ /** Override the Intl options used for absolute formatting. */
797
+ absoluteOptions?: Intl.DateTimeFormatOptions;
798
+ }
799
+ declare function FormatDate({ date, displayAs, timeZone, locale, tooltip, live, absoluteOptions, className, ...props }: FormatDateProps): react_jsx_runtime.JSX.Element;
800
+
782
801
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
783
802
  declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
784
803
  declare const ToastContainer: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
@@ -893,4 +912,4 @@ declare const ThemeProvider: ({ customVars, children }: ThemeProviderProps) => r
893
912
 
894
913
  declare const useTheme: () => readonly [Theme$1 | undefined, (theme: Theme$1) => void];
895
914
 
896
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
915
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
package/dist/index.d.ts CHANGED
@@ -779,6 +779,25 @@ declare const Tabs: ({ id, items, className, tabsListBackground, defaultValue, o
779
779
 
780
780
  declare const Textarea: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React$1.RefAttributes<HTMLTextAreaElement>>;
781
781
 
782
+ type FormatDateDisplayMode = 'relative' | 'absolute';
783
+ interface FormatDateProps extends Omit<React$1.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'children'> {
784
+ /** The date to display. Accepts an ISO 8601 string, epoch milliseconds, or a Date. */
785
+ date: string | number | Date;
786
+ /** Render relative ("2 weeks ago") or absolute ("Jun 9 2026, 18:42:03 UTC") time. */
787
+ displayAs?: FormatDateDisplayMode;
788
+ /** Time zone used for absolute formatting. Defaults to "UTC". */
789
+ timeZone?: string;
790
+ /** BCP 47 locale used for formatting. Defaults to "en-US". */
791
+ locale?: string;
792
+ /** When relative, show a tooltip with the absolute time on hover/focus. Defaults to true. */
793
+ tooltip?: boolean;
794
+ /** When relative, re-render on an interval so the value stays current. Defaults to true. */
795
+ live?: boolean;
796
+ /** Override the Intl options used for absolute formatting. */
797
+ absoluteOptions?: Intl.DateTimeFormatOptions;
798
+ }
799
+ declare function FormatDate({ date, displayAs, timeZone, locale, tooltip, live, absoluteOptions, className, ...props }: FormatDateProps): react_jsx_runtime.JSX.Element;
800
+
782
801
  declare const ToastProvider: React$1.FC<ToastPrimitives.ToastProviderProps>;
783
802
  declare const ToastViewport: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React$1.RefAttributes<HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
784
803
  declare const ToastContainer: React$1.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React$1.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
@@ -893,4 +912,4 @@ declare const ThemeProvider: ({ customVars, children }: ThemeProviderProps) => r
893
912
 
894
913
  declare const useTheme: () => readonly [Theme$1 | undefined, (theme: Theme$1) => void];
895
914
 
896
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
915
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeDisplayMode, type BadgeProps, BarGraph, type BarGraphProps, BarGraphSegment, type BarGraphSegmentProps, BgGradient, Button, type ButtonProps, Card, CardContent, CardContentHeader, type CardContentHeaderProps, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, type ControlStatusBadgeDisplayMode, CopyButton, type CopyButtonProps, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, type DisplayFieldProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, type Elevation, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, type FormatDateDisplayMode, type FormatDateProps, Heading, Icon, IconButton, type IconButtonProps, type IconProps, InfoCard, Input, type InputProps, Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, type ProgressIndicatorProps, ProgressIndicatorStep, type ProgressIndicatorStepProps, RadialGraph, type RadialGraphProps, RadioDropdown, RadioGroup, RadioGroupItem, ResourceBadge, type ResourceDisplayMode, type ResourceType, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, type SortField, type SortMode, type SortOrder, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, type Theme, ThemeProvider, Toast, ToastAction, type ToastActionElement, ToastClose, ToastContainer, ToastDescription, type ToastProps$1 as ToastProps, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, type ToasterToast, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, type ViewMode, type ViewOrder, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
package/dist/index.js CHANGED
@@ -85,13 +85,14 @@ import * as TabsPrimitive from '@radix-ui/react-tabs';
85
85
  import styles53 from './tabs-components.module.module.css.module.css';
86
86
  import styles54 from './tabs.module.module.css.module.css';
87
87
  import styles55 from './textarea.module.module.css.module.css';
88
+ import styles56 from './format-date.module.module.css.module.css';
88
89
  import * as ToastPrimitives from '@radix-ui/react-toast';
89
- import styles56 from './toast-components.module.module.css.module.css';
90
- import styles57 from './toast.module.module.css.module.css';
91
- import styles58 from './truncated-description.module.module.css.module.css';
92
- import styles59 from './heading.module.module.css.module.css';
93
- import styles60 from './control-status-badge.module.module.css.module.css';
94
- import styles61 from './theme.module.module.css.module.css';
90
+ import styles57 from './toast-components.module.module.css.module.css';
91
+ import styles58 from './toast.module.module.css.module.css';
92
+ import styles59 from './truncated-description.module.module.css.module.css';
93
+ import styles60 from './heading.module.module.css.module.css';
94
+ import styles61 from './control-status-badge.module.module.css.module.css';
95
+ import styles62 from './theme.module.module.css.module.css';
95
96
 
96
97
  // src/components/alert/alert.tsx
97
98
  var ELEVATION = {
@@ -100,12 +101,12 @@ var ELEVATION = {
100
101
  RAISED: "raised",
101
102
  OVERLAY: "overlay"
102
103
  };
103
- var generateElevationVariants = (styles62, baseClassName, defaultElevation) => {
104
+ var generateElevationVariants = (styles63, baseClassName, defaultElevation) => {
104
105
  const classNames = {};
105
106
  Object.values(ELEVATION).forEach((elevation) => {
106
- classNames[elevation] = styles62[`${baseClassName}--${elevation}`];
107
+ classNames[elevation] = styles63[`${baseClassName}--${elevation}`];
107
108
  });
108
- const variants = cva(styles62[baseClassName], {
109
+ const variants = cva(styles63[baseClassName], {
109
110
  variants: {
110
111
  elevation: classNames
111
112
  },
@@ -3163,24 +3164,116 @@ var Textarea = React16.forwardRef(
3163
3164
  }
3164
3165
  );
3165
3166
  Textarea.displayName = "Textarea";
3167
+ var DEFAULT_LOCALE = "en-US";
3168
+ var DEFAULT_ABSOLUTE_OPTIONS = {
3169
+ year: "numeric",
3170
+ month: "short",
3171
+ day: "numeric",
3172
+ hour: "2-digit",
3173
+ minute: "2-digit",
3174
+ second: "2-digit",
3175
+ hour12: false,
3176
+ timeZoneName: "short"
3177
+ };
3178
+ var RELATIVE_DIVISIONS = [
3179
+ { amount: 60, unit: "second" },
3180
+ { amount: 60, unit: "minute" },
3181
+ { amount: 24, unit: "hour" },
3182
+ { amount: 7, unit: "day" },
3183
+ { amount: 4.34524, unit: "week" },
3184
+ { amount: 12, unit: "month" },
3185
+ { amount: Number.POSITIVE_INFINITY, unit: "year" }
3186
+ ];
3187
+ var LIVE_INTERVAL_MS = 3e4;
3188
+ function toDate(value) {
3189
+ const date = value instanceof Date ? value : new Date(value);
3190
+ return Number.isNaN(date.getTime()) ? null : date;
3191
+ }
3192
+ function formatAbsolute(date, timeZone, options, locale) {
3193
+ return new Intl.DateTimeFormat(locale, { ...options, timeZone }).format(date);
3194
+ }
3195
+ function formatRelative(date, now, locale) {
3196
+ let duration = (date.getTime() - now.getTime()) / 1e3;
3197
+ if (Math.abs(duration) < 45) return "Just now";
3198
+ const rtf = new Intl.RelativeTimeFormat(locale, { numeric: "auto" });
3199
+ for (const division of RELATIVE_DIVISIONS) {
3200
+ if (Math.abs(duration) < division.amount) {
3201
+ return rtf.format(Math.round(duration), division.unit);
3202
+ }
3203
+ duration /= division.amount;
3204
+ }
3205
+ return "Just now";
3206
+ }
3207
+ function FormatDate({
3208
+ date,
3209
+ displayAs = "absolute",
3210
+ timeZone = "UTC",
3211
+ locale = DEFAULT_LOCALE,
3212
+ tooltip = true,
3213
+ live = true,
3214
+ absoluteOptions,
3215
+ className,
3216
+ ...props
3217
+ }) {
3218
+ const parsed = React16.useMemo(() => toDate(date), [date]);
3219
+ const [now, setNow] = React16.useState(() => /* @__PURE__ */ new Date());
3220
+ const [mounted, setMounted] = React16.useState(false);
3221
+ const isRelative = displayAs === "relative";
3222
+ React16.useEffect(() => setMounted(true), []);
3223
+ React16.useEffect(() => {
3224
+ if (!isRelative || !live) return;
3225
+ const id = setInterval(() => setNow(/* @__PURE__ */ new Date()), LIVE_INTERVAL_MS);
3226
+ return () => clearInterval(id);
3227
+ }, [isRelative, live]);
3228
+ if (!parsed) {
3229
+ return /* @__PURE__ */ jsx("time", { className: cn(styles56["format-date"], className), ...props, children: "Invalid date" });
3230
+ }
3231
+ const machineValue = parsed.toISOString();
3232
+ const absolute = formatAbsolute(
3233
+ parsed,
3234
+ timeZone,
3235
+ absoluteOptions ?? DEFAULT_ABSOLUTE_OPTIONS,
3236
+ locale
3237
+ );
3238
+ if (!isRelative) {
3239
+ return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(styles56["format-date"], className), ...props, children: absolute });
3240
+ }
3241
+ const relative = mounted ? formatRelative(parsed, now, locale) : absolute;
3242
+ if (!tooltip) {
3243
+ return /* @__PURE__ */ jsx("time", { dateTime: machineValue, className: cn(styles56["format-date"], className), ...props, children: relative });
3244
+ }
3245
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
3246
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
3247
+ "time",
3248
+ {
3249
+ dateTime: machineValue,
3250
+ tabIndex: 0,
3251
+ className: cn(styles56["format-date"], styles56["format-date--interactive"], className),
3252
+ ...props,
3253
+ children: relative
3254
+ }
3255
+ ) }),
3256
+ /* @__PURE__ */ jsx(TooltipContent, { children: absolute })
3257
+ ] }) });
3258
+ }
3166
3259
  var XIcon2 = X;
3167
3260
  var ToastProvider = ToastPrimitives.Provider;
3168
3261
  var ToastViewport = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3169
3262
  ToastPrimitives.Viewport,
3170
3263
  {
3171
3264
  ref,
3172
- className: cn(styles56["toast-viewport"], className),
3265
+ className: cn(styles57["toast-viewport"], className),
3173
3266
  ...props
3174
3267
  }
3175
3268
  ));
3176
3269
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
3177
- var toastVariants = cva(styles56["toast"], {
3270
+ var toastVariants = cva(styles57["toast"], {
3178
3271
  variants: {
3179
3272
  variant: {
3180
- default: styles56["toast--default"],
3181
- danger: styles56["toast--danger"],
3182
- warning: styles56["toast--warning"],
3183
- success: styles56["toast--success"]
3273
+ default: styles57["toast--default"],
3274
+ danger: styles57["toast--danger"],
3275
+ warning: styles57["toast--warning"],
3276
+ success: styles57["toast--success"]
3184
3277
  }
3185
3278
  },
3186
3279
  defaultVariants: {
@@ -3198,17 +3291,17 @@ var ToastContainer = React16.forwardRef(({ className, variant, ...props }, ref)
3198
3291
  );
3199
3292
  });
3200
3293
  ToastContainer.displayName = ToastPrimitives.Root.displayName;
3201
- var ToastAction = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, { ref, className: cn(styles56["toast-action"], className), ...props }));
3294
+ var ToastAction = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Action, { ref, className: cn(styles57["toast-action"], className), ...props }));
3202
3295
  ToastAction.displayName = ToastPrimitives.Action.displayName;
3203
- var ToastClose = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, { ref, className: cn(styles56["toast-close"], className), ...props, children: /* @__PURE__ */ jsx(XIcon2, { className: styles56["toast-close-icon"] }) }));
3296
+ var ToastClose = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Close, { ref, className: cn(styles57["toast-close"], className), ...props, children: /* @__PURE__ */ jsx(XIcon2, { className: styles57["toast-close-icon"] }) }));
3204
3297
  ToastClose.displayName = ToastPrimitives.Close.displayName;
3205
- var ToastTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles56["toast-title"], className), ...props }));
3298
+ var ToastTitle = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(ToastPrimitives.Title, { ref, className: cn(styles57["toast-title"], className), ...props }));
3206
3299
  ToastTitle.displayName = ToastPrimitives.Title.displayName;
3207
3300
  var ToastDescription = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
3208
3301
  ToastPrimitives.Description,
3209
3302
  {
3210
3303
  ref,
3211
- className: cn(styles56["toast-description"], className),
3304
+ className: cn(styles57["toast-description"], className),
3212
3305
  ...props
3213
3306
  }
3214
3307
  ));
@@ -3343,14 +3436,14 @@ var Toast = ({ toast: toast2 }) => {
3343
3436
  };
3344
3437
  const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
3345
3438
  return /* @__PURE__ */ jsxs(ToastContainer, { ...props, variant, children: [
3346
- /* @__PURE__ */ jsxs("div", { className: styles57["toast-copy"], children: [
3347
- title && /* @__PURE__ */ jsxs("div", { className: styles57["toast-title-container"], children: [
3439
+ /* @__PURE__ */ jsxs("div", { className: styles58["toast-copy"], children: [
3440
+ title && /* @__PURE__ */ jsxs("div", { className: styles58["toast-title-container"], children: [
3348
3441
  displayIcon && /* @__PURE__ */ jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
3349
3442
  /* @__PURE__ */ jsx(ToastTitle, { children: title })
3350
3443
  ] }),
3351
3444
  description && /* @__PURE__ */ jsx(ToastDescription, { children: description })
3352
3445
  ] }),
3353
- action && /* @__PURE__ */ jsx("div", { className: styles57["toast-action"], children: action }),
3446
+ action && /* @__PURE__ */ jsx("div", { className: styles58["toast-action"], children: action }),
3354
3447
  /* @__PURE__ */ jsx(ToastClose, {})
3355
3448
  ] });
3356
3449
  };
@@ -3380,7 +3473,7 @@ var TruncatedDescription = ({
3380
3473
  e.stopPropagation();
3381
3474
  setExpanded(!expanded);
3382
3475
  };
3383
- return /* @__PURE__ */ jsxs("div", { className: cn(styles58["truncated-description"], className), children: [
3476
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles59["truncated-description"], className), children: [
3384
3477
  /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: displayDescription } }),
3385
3478
  isLongDescription && /* @__PURE__ */ jsx(Button, { variant: "link", size: "sm", onClick: handleToggle, children: expanded ? "Show less" : "Show more" })
3386
3479
  ] });
@@ -3391,12 +3484,12 @@ var removeHtmlTags = (html) => {
3391
3484
  var Heading = forwardRef(
3392
3485
  ({ className, as, displayAs, children, ...props }, ref) => {
3393
3486
  const displayClasses = {
3394
- h1: styles59["h1"],
3395
- h2: styles59["h2"],
3396
- h3: styles59["h3"],
3397
- h4: styles59["h4"],
3398
- h5: styles59["h5"],
3399
- h6: styles59["h6"]
3487
+ h1: styles60["h1"],
3488
+ h2: styles60["h2"],
3489
+ h3: styles60["h3"],
3490
+ h4: styles60["h4"],
3491
+ h5: styles60["h5"],
3492
+ h6: styles60["h6"]
3400
3493
  };
3401
3494
  const displayClass = displayClasses[displayAs] || displayClasses[as];
3402
3495
  const HeadingTag = as;
@@ -3413,73 +3506,73 @@ var getStatusConfig = (status) => {
3413
3506
  case "in-progress":
3414
3507
  return {
3415
3508
  icon: "Clock",
3416
- className: styles60["badge--in-progress"],
3509
+ className: styles61["badge--in-progress"],
3417
3510
  label: "In Progress"
3418
3511
  };
3419
3512
  case "not-started":
3420
3513
  return {
3421
3514
  icon: "Circle",
3422
- className: styles60["badge--not-started"],
3515
+ className: styles61["badge--not-started"],
3423
3516
  label: "Not Started"
3424
3517
  };
3425
3518
  case "ready-for-review":
3426
3519
  return {
3427
3520
  icon: "ClipboardCheck",
3428
- className: styles60["badge--ready-for-review"],
3521
+ className: styles61["badge--ready-for-review"],
3429
3522
  label: "Ready for Review"
3430
3523
  };
3431
3524
  case "in-review":
3432
3525
  return {
3433
3526
  icon: "Eye",
3434
- className: styles60["badge--in-review"],
3527
+ className: styles61["badge--in-review"],
3435
3528
  label: "In Review"
3436
3529
  };
3437
3530
  case "comment":
3438
3531
  return {
3439
3532
  icon: "MessageCircle",
3440
- className: styles60["badge--comment"],
3533
+ className: styles61["badge--comment"],
3441
3534
  label: "Comment"
3442
3535
  };
3443
3536
  case "not-applicable":
3444
3537
  return {
3445
3538
  icon: "MinusCircle",
3446
- className: styles60["badge--not-applicable"],
3539
+ className: styles61["badge--not-applicable"],
3447
3540
  label: "Not Applicable"
3448
3541
  };
3449
3542
  case "accepted":
3450
3543
  return {
3451
3544
  icon: /* @__PURE__ */ jsx(MessageCircleCheckIcon, {}),
3452
- className: styles60["badge--accepted"],
3545
+ className: styles61["badge--accepted"],
3453
3546
  label: "Accepted"
3454
3547
  };
3455
3548
  case "questioned":
3456
3549
  return {
3457
3550
  icon: "MessageCircleQuestion",
3458
- className: styles60["badge--question"],
3551
+ className: styles61["badge--question"],
3459
3552
  label: "Questioned"
3460
3553
  };
3461
3554
  case "general":
3462
3555
  return {
3463
3556
  icon: "MessageCircle",
3464
- className: styles60["badge--comment"],
3557
+ className: styles61["badge--comment"],
3465
3558
  label: "General"
3466
3559
  };
3467
3560
  case "compliant":
3468
3561
  return {
3469
3562
  icon: "Check",
3470
- className: styles60["badge--compliant"],
3563
+ className: styles61["badge--compliant"],
3471
3564
  label: "Compliant"
3472
3565
  };
3473
3566
  case "non-compliant":
3474
3567
  return {
3475
3568
  icon: "TriangleAlert",
3476
- className: styles60["badge--non-compliant"],
3569
+ className: styles61["badge--non-compliant"],
3477
3570
  label: "Non-compliant"
3478
3571
  };
3479
3572
  default:
3480
3573
  return {
3481
3574
  icon: "Circle",
3482
- className: styles60["badge--not-started"],
3575
+ className: styles61["badge--not-started"],
3483
3576
  label: status
3484
3577
  };
3485
3578
  }
@@ -3509,12 +3602,12 @@ var Portal8 = () => {
3509
3602
  return /* @__PURE__ */ jsx("div", { id: "equality-theme-provider-root-portal" });
3510
3603
  };
3511
3604
  var ThemeProvider = ({ customVars, children }) => {
3512
- return /* @__PURE__ */ jsxs("div", { id: "equality-theme-provider-root", className: styles61.root, style: customVars, children: [
3605
+ return /* @__PURE__ */ jsxs("div", { id: "equality-theme-provider-root", className: styles62.root, style: customVars, children: [
3513
3606
  children,
3514
3607
  /* @__PURE__ */ jsx(Portal8, {})
3515
3608
  ] });
3516
3609
  };
3517
3610
 
3518
- export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
3611
+ export { Alert, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Avatar, AvatarFallback, AvatarImage, Badge, BarGraph, BarGraphSegment, BgGradient, Button, Card, CardContent, CardContentHeader, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeBlock, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ControlStatusBadge, CopyButton, DateRangePicker, Dialog, DialogClose, DialogContainer, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogHeaderIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DisplayField, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerHeaderActions, DrawerInnerContent, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ELEVATION, EmptyTableState, FilterDropdown, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormatDate, Heading, Icon, IconButton, InfoCard, Input, Label2 as Label, ListOrGridViewToggle, LoadingOverlay, MetricCard, MotionCollapsibleContent, NotFound, Pagination, PanelLabel, Popover, PopoverContent, PopoverTrigger, Progress, ProgressIndicator, ProgressIndicatorStep, RadialGraph, RadioDropdown, RadioGroup2 as RadioGroup, RadioGroupItem, ResourceBadge, ScrollArea, ScrollBar, SearchBar, SectionHeading, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Sheet, SheetClose, SheetContainer, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetHeaderIcon, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, SortButton, SortSelector, Spinner, Switch, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContainer, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toast, ToastAction, ToastClose, ToastContainer, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TruncatedDescription, badgeVariants, buttonVariants, reducer, toast, useFormField, useTheme, useToast };
3519
3612
  //# sourceMappingURL=index.js.map
3520
3613
  //# sourceMappingURL=index.js.map