@eqtylab/equality 2.0.1 → 2.1.1

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;
@@ -3406,6 +3499,18 @@ var Heading = forwardRef(
3406
3499
  Heading.displayName = "Heading";
3407
3500
  var ControlStatusBadge = ({ status, display = "both" }) => {
3408
3501
  const config = getStatusConfig(status);
3502
+ if (config.subLabel) {
3503
+ if (display === "icon-only") {
3504
+ return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display: "icon-only", className: config.className, variant: null, children: config.label });
3505
+ }
3506
+ return /* @__PURE__ */ jsxs("div", { className: cn(styles61["split-badge"], config.className), children: [
3507
+ /* @__PURE__ */ jsxs("span", { className: styles61["split-badge__status"], children: [
3508
+ display !== "text-only" && /* @__PURE__ */ jsx(Icon, { icon: config.icon, size: "xs", className: styles61["icon"] }),
3509
+ config.label
3510
+ ] }),
3511
+ /* @__PURE__ */ jsx("span", { className: styles61["split-badge__sub-status"], children: config.subLabel })
3512
+ ] });
3513
+ }
3409
3514
  return /* @__PURE__ */ jsx(Badge, { icon: config.icon, display, className: config.className, variant: null, children: config.label });
3410
3515
  };
3411
3516
  var getStatusConfig = (status) => {
@@ -3413,79 +3518,76 @@ var getStatusConfig = (status) => {
3413
3518
  case "in-progress":
3414
3519
  return {
3415
3520
  icon: "Clock",
3416
- className: styles60["badge--in-progress"],
3521
+ className: styles61["badge--in-progress"],
3417
3522
  label: "In Progress"
3418
3523
  };
3419
3524
  case "not-started":
3420
3525
  return {
3421
- icon: "Circle",
3422
- className: styles60["badge--not-started"],
3526
+ icon: "CircleDashed",
3527
+ className: styles61["badge--not-started"],
3423
3528
  label: "Not Started"
3424
3529
  };
3425
3530
  case "ready-for-review":
3426
3531
  return {
3427
3532
  icon: "ClipboardCheck",
3428
- className: styles60["badge--ready-for-review"],
3533
+ className: styles61["badge--ready-for-review"],
3429
3534
  label: "Ready for Review"
3430
3535
  };
3431
3536
  case "in-review":
3432
3537
  return {
3433
3538
  icon: "Eye",
3434
- className: styles60["badge--in-review"],
3539
+ className: styles61["badge--in-review"],
3435
3540
  label: "In Review"
3436
3541
  };
3437
3542
  case "comment":
3438
3543
  return {
3439
- icon: "MessageCircle",
3440
- className: styles60["badge--comment"],
3441
- label: "Comment"
3544
+ icon: "Eye",
3545
+ className: styles61["badge--comment"],
3546
+ label: "In Review",
3547
+ subLabel: "General"
3442
3548
  };
3443
3549
  case "not-applicable":
3444
3550
  return {
3445
3551
  icon: "MinusCircle",
3446
- className: styles60["badge--not-applicable"],
3552
+ className: styles61["badge--not-applicable"],
3447
3553
  label: "Not Applicable"
3448
3554
  };
3449
3555
  case "accepted":
3450
3556
  return {
3451
- icon: /* @__PURE__ */ jsx(MessageCircleCheckIcon, {}),
3452
- className: styles60["badge--accepted"],
3453
- label: "Accepted"
3557
+ icon: "Eye",
3558
+ className: styles61["badge--accepted"],
3559
+ label: "In Review",
3560
+ subLabel: "Accepted"
3454
3561
  };
3455
3562
  case "questioned":
3456
3563
  return {
3457
- icon: "MessageCircleQuestion",
3458
- className: styles60["badge--question"],
3459
- label: "Questioned"
3460
- };
3461
- case "general":
3462
- return {
3463
- icon: "MessageCircle",
3464
- className: styles60["badge--comment"],
3465
- label: "General"
3564
+ icon: "Eye",
3565
+ className: styles61["badge--question"],
3566
+ label: "In Review",
3567
+ subLabel: "Questioned"
3466
3568
  };
3467
3569
  case "compliant":
3468
3570
  return {
3469
- icon: "Check",
3470
- className: styles60["badge--compliant"],
3571
+ icon: /* @__PURE__ */ jsx(CircleCheckFillIcon, {}),
3572
+ className: styles61["badge--compliant"],
3471
3573
  label: "Compliant"
3472
3574
  };
3473
3575
  case "non-compliant":
3474
3576
  return {
3475
- icon: "TriangleAlert",
3476
- className: styles60["badge--non-compliant"],
3577
+ icon: "X",
3578
+ className: styles61["badge--non-compliant"],
3477
3579
  label: "Non-compliant"
3478
3580
  };
3479
3581
  default:
3480
3582
  return {
3481
- icon: "Circle",
3482
- className: styles60["badge--not-started"],
3583
+ icon: "CircleDashed",
3584
+ className: styles61["badge--not-started"],
3483
3585
  label: status
3484
3586
  };
3485
3587
  }
3486
3588
  };
3487
- var MessageCircleCheckIcon = ({ className }) => {
3488
- return /* @__PURE__ */ jsxs(
3589
+ var CircleCheckFillIcon = ({ className }) => {
3590
+ return /* @__PURE__ */ jsx(
3489
3591
  "svg",
3490
3592
  {
3491
3593
  className,
@@ -3493,15 +3595,8 @@ var MessageCircleCheckIcon = ({ className }) => {
3493
3595
  width: "12",
3494
3596
  height: "12",
3495
3597
  viewBox: "0 0 24 24",
3496
- fill: "none",
3497
- stroke: "currentColor",
3498
- "stroke-width": "2",
3499
- "stroke-linecap": "round",
3500
- "stroke-linejoin": "round",
3501
- children: [
3502
- /* @__PURE__ */ jsx("path", { d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719" }),
3503
- /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
3504
- ]
3598
+ fill: "currentColor",
3599
+ children: /* @__PURE__ */ jsx("path", { d: "M12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1ZM15.707 9.29297C15.3165 8.90245 14.6835 8.90244 14.293 9.29297L11 12.5859L9.70703 11.293C9.31651 10.9024 8.68349 10.9024 8.29297 11.293C7.90244 11.6835 7.90245 12.3165 8.29297 12.707L10.293 14.707C10.6835 15.0976 11.3165 15.0976 11.707 14.707L15.707 10.707C16.0976 10.3165 16.0976 9.68349 15.707 9.29297Z" })
3505
3600
  }
3506
3601
  );
3507
3602
  };
@@ -3509,12 +3604,12 @@ var Portal8 = () => {
3509
3604
  return /* @__PURE__ */ jsx("div", { id: "equality-theme-provider-root-portal" });
3510
3605
  };
3511
3606
  var ThemeProvider = ({ customVars, children }) => {
3512
- return /* @__PURE__ */ jsxs("div", { id: "equality-theme-provider-root", className: styles61.root, style: customVars, children: [
3607
+ return /* @__PURE__ */ jsxs("div", { id: "equality-theme-provider-root", className: styles62.root, style: customVars, children: [
3513
3608
  children,
3514
3609
  /* @__PURE__ */ jsx(Portal8, {})
3515
3610
  ] });
3516
3611
  };
3517
3612
 
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 };
3613
+ 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
3614
  //# sourceMappingURL=index.js.map
3520
3615
  //# sourceMappingURL=index.js.map