@engrate/components 0.0.5 → 0.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.ts CHANGED
@@ -11,6 +11,7 @@ import * as React_2 from 'react';
11
11
  import * as SelectPrimitive from '@radix-ui/react-select';
12
12
  import * as SwitchPrimitive from '@radix-ui/react-switch';
13
13
  import * as ToastPrimitives from '@radix-ui/react-toast';
14
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
14
15
  import { VariantProps } from 'class-variance-authority';
15
16
 
16
17
  export declare const ActionsMenuButton: React_2.ForwardRefExoticComponent<ActionsMenuButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
@@ -93,6 +94,54 @@ export declare const badgeVariants: (props?: ({
93
94
  size?: "sm" | "lg" | "xs" | "md" | "xl" | null | undefined;
94
95
  } & ClassProp) | undefined) => string;
95
96
 
97
+ /**
98
+ * Individual breadcrumb item. Use href for links or isCurrentPage for the current location.
99
+ */
100
+ export declare const BreadcrumbItem: React_2.ForwardRefExoticComponent<BreadcrumbItemProps & React_2.RefAttributes<HTMLAnchorElement>>;
101
+
102
+ export declare interface BreadcrumbItemProps extends React_2.AnchorHTMLAttributes<HTMLAnchorElement>, VariantProps<typeof breadcrumbItemVariants> {
103
+ /** Render as a child component (for use with Next.js Link, etc.) */
104
+ asChild?: boolean;
105
+ /** Indicates this is the current page (should not be a link) */
106
+ isCurrentPage?: boolean;
107
+ }
108
+
109
+ export declare const breadcrumbItemVariants: (props?: ({
110
+ isCurrentPage?: boolean | null | undefined;
111
+ } & ClassProp) | undefined) => string;
112
+
113
+ /**
114
+ * Breadcrumbs navigation component following Engrate brand guidelines.
115
+ * Provides a navigation trail showing the user's location within a hierarchy.
116
+ *
117
+ * @example
118
+ * ```tsx
119
+ * <Breadcrumbs>
120
+ * <BreadcrumbItem href="/">Home</BreadcrumbItem>
121
+ * <BreadcrumbItem href="/products">Products</BreadcrumbItem>
122
+ * <BreadcrumbItem isCurrentPage>Current Product</BreadcrumbItem>
123
+ * </Breadcrumbs>
124
+ * ```
125
+ */
126
+ export declare const Breadcrumbs: React_2.ForwardRefExoticComponent<BreadcrumbsProps & React_2.RefAttributes<HTMLElement>>;
127
+
128
+ /**
129
+ * Separator between breadcrumb items. Defaults to a chevron icon.
130
+ */
131
+ export declare const BreadcrumbSeparator: React_2.ForwardRefExoticComponent<BreadcrumbSeparatorProps & React_2.RefAttributes<HTMLSpanElement>>;
132
+
133
+ export declare interface BreadcrumbSeparatorProps extends React_2.HTMLAttributes<HTMLSpanElement> {
134
+ }
135
+
136
+ export declare interface BreadcrumbsProps extends React_2.HTMLAttributes<HTMLElement>, VariantProps<typeof breadcrumbsVariants> {
137
+ /** Custom separator between breadcrumb items */
138
+ separator?: React_2.ReactNode;
139
+ }
140
+
141
+ export declare const breadcrumbsVariants: (props?: ({
142
+ size?: "sm" | "default" | "lg" | null | undefined;
143
+ } & ClassProp) | undefined) => string;
144
+
96
145
  /**
97
146
  * Primary UI button component following Engrate brand guidelines.
98
147
  * Features pill-shaped design with Sunflower yellow as primary color.
@@ -116,6 +165,10 @@ export declare const buttonVariants: (props?: ({
116
165
  size?: "sm" | "default" | "lg" | "icon" | null | undefined;
117
166
  } & ClassProp) | undefined) => string;
118
167
 
168
+ export declare const calendarDayVariants: (props?: ({
169
+ state?: "default" | "disabled" | "selected" | "today" | "outside" | null | undefined;
170
+ } & ClassProp) | undefined) => string;
171
+
119
172
  /**
120
173
  * Card component for displaying content in a contained area.
121
174
  * Follows Engrate design system with support for variants, padding, and background colors.
@@ -232,6 +285,100 @@ export declare interface ContextMenuSubTriggerProps extends React_2.ComponentPro
232
285
 
233
286
  export declare const ContextMenuTrigger: React_2.ForwardRefExoticComponent<ContextMenuPrimitive.ContextMenuTriggerProps & React_2.RefAttributes<HTMLSpanElement>>;
234
287
 
288
+ /**
289
+ * DatePicker component following Engrate brand guidelines.
290
+ * Features a calendar popup with month/year navigation and accessible keyboard controls.
291
+ *
292
+ * @example
293
+ * ```tsx
294
+ * const [date, setDate] = useState<Date | null>(null)
295
+ * <DatePicker value={date} onChange={setDate} placeholder="Select a date" />
296
+ * ```
297
+ */
298
+ export declare const DatePicker: React_2.ForwardRefExoticComponent<DatePickerProps & React_2.RefAttributes<HTMLButtonElement>>;
299
+
300
+ export declare interface DatePickerProps extends VariantProps<typeof datePickerTriggerVariants> {
301
+ /** The currently selected date */
302
+ value?: Date | null;
303
+ /** Callback when the date changes */
304
+ onChange?: (date: Date | null) => void;
305
+ /** Placeholder text when no date is selected */
306
+ placeholder?: string;
307
+ /** Date format string (supports MM, dd, yyyy) */
308
+ format?: string;
309
+ /** Minimum selectable date */
310
+ minDate?: Date;
311
+ /** Maximum selectable date */
312
+ maxDate?: Date;
313
+ /** Whether the date picker is disabled */
314
+ disabled?: boolean;
315
+ /** Additional class name for the trigger */
316
+ className?: string;
317
+ /** ID for the trigger element */
318
+ id?: string;
319
+ /** Name attribute for form integration */
320
+ name?: string;
321
+ /** aria-label for accessibility */
322
+ 'aria-label'?: string;
323
+ /** aria-describedby for accessibility */
324
+ 'aria-describedby'?: string;
325
+ }
326
+
327
+ export declare const datePickerTriggerVariants: (props?: ({
328
+ variant?: "default" | "error" | null | undefined;
329
+ } & ClassProp) | undefined) => string;
330
+
331
+ /**
332
+ * DateTimePicker component following Engrate brand guidelines.
333
+ * Features a calendar popup with time selection and accessible keyboard controls.
334
+ *
335
+ * @example
336
+ * ```tsx
337
+ * const [dateTime, setDateTime] = useState<Date | null>(null)
338
+ * <DateTimePicker value={dateTime} onChange={setDateTime} placeholder="Select date and time" />
339
+ * ```
340
+ */
341
+ export declare const DateTimePicker: React_2.ForwardRefExoticComponent<DateTimePickerProps & React_2.RefAttributes<HTMLButtonElement>>;
342
+
343
+ export declare const dateTimePickerCalendarDayVariants: (props?: ({
344
+ state?: "default" | "disabled" | "selected" | "today" | "outside" | null | undefined;
345
+ } & ClassProp) | undefined) => string;
346
+
347
+ export declare interface DateTimePickerProps extends VariantProps<typeof dateTimePickerTriggerVariants> {
348
+ /** The currently selected date and time */
349
+ value?: Date | null;
350
+ /** Callback when the date/time changes */
351
+ onChange?: (date: Date | null) => void;
352
+ /** Placeholder text when no date is selected */
353
+ placeholder?: string;
354
+ /** Date/time format string (supports MM, dd, yyyy, HH, hh, mm, a) */
355
+ format?: string;
356
+ /** Minimum selectable date */
357
+ minDate?: Date;
358
+ /** Maximum selectable date */
359
+ maxDate?: Date;
360
+ /** Whether the date time picker is disabled */
361
+ disabled?: boolean;
362
+ /** Additional class name for the trigger */
363
+ className?: string;
364
+ /** ID for the trigger element */
365
+ id?: string;
366
+ /** Name attribute for form integration */
367
+ name?: string;
368
+ /** Use 24-hour format for time (default: true) */
369
+ use24Hour?: boolean;
370
+ /** Step for minutes (default: 1) */
371
+ minuteStep?: number;
372
+ /** aria-label for accessibility */
373
+ 'aria-label'?: string;
374
+ /** aria-describedby for accessibility */
375
+ 'aria-describedby'?: string;
376
+ }
377
+
378
+ export declare const dateTimePickerTriggerVariants: (props?: ({
379
+ variant?: "default" | "error" | null | undefined;
380
+ } & ClassProp) | undefined) => string;
381
+
235
382
  /**
236
383
  * Divider component for visually separating content.
237
384
  * Supports both horizontal and vertical orientations.
@@ -382,6 +529,57 @@ export declare interface FormMessageProps extends React_2.HTMLAttributes<HTMLPar
382
529
  variant?: 'default' | 'error';
383
530
  }
384
531
 
532
+ /**
533
+ * Grid component for consistent layout structures.
534
+ * Provides a flexible grid system with configurable columns, gaps, and alignment.
535
+ *
536
+ * @example
537
+ * ```tsx
538
+ * <Grid cols={3} gap="lg">
539
+ * <Card>Item 1</Card>
540
+ * <Card>Item 2</Card>
541
+ * <Card>Item 3</Card>
542
+ * </Grid>
543
+ * ```
544
+ */
545
+ export declare const Grid: React_2.ForwardRefExoticComponent<GridProps & React_2.RefAttributes<HTMLDivElement>>;
546
+
547
+ /**
548
+ * GridItem component for controlling individual item placement within a Grid.
549
+ *
550
+ * @example
551
+ * ```tsx
552
+ * <Grid cols={12}>
553
+ * <GridItem colSpan={8}>Main content</GridItem>
554
+ * <GridItem colSpan={4}>Sidebar</GridItem>
555
+ * </Grid>
556
+ * ```
557
+ */
558
+ export declare const GridItem: React_2.ForwardRefExoticComponent<GridItemProps & React_2.RefAttributes<HTMLDivElement>>;
559
+
560
+ export declare interface GridItemProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridItemVariants> {
561
+ /** Render as a child component using Slot */
562
+ asChild?: boolean;
563
+ }
564
+
565
+ export declare const gridItemVariants: (props?: ({
566
+ colSpan?: 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 10 | "full" | 7 | 8 | 9 | null | undefined;
567
+ rowSpan?: 1 | 2 | 3 | 4 | 5 | 6 | "full" | null | undefined;
568
+ colStart?: 1 | "auto" | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 10 | 7 | 8 | 9 | null | undefined;
569
+ } & ClassProp) | undefined) => string;
570
+
571
+ export declare interface GridProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof gridVariants> {
572
+ /** Render as a child component using Slot */
573
+ asChild?: boolean;
574
+ }
575
+
576
+ export declare const gridVariants: (props?: ({
577
+ cols?: 1 | 2 | 3 | 4 | 5 | 6 | 12 | null | undefined;
578
+ gap?: "sm" | "lg" | "none" | "xs" | "md" | "xl" | "2xl" | null | undefined;
579
+ align?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
580
+ justify?: "end" | "start" | "center" | "stretch" | null | undefined;
581
+ } & ClassProp) | undefined) => string;
582
+
385
583
  export declare const Heading: React_2.ForwardRefExoticComponent<HeadingProps & React_2.RefAttributes<HTMLHeadingElement>>;
386
584
 
387
585
  declare type HeadingElement = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
@@ -507,6 +705,39 @@ export declare interface ModalTitleProps extends React_2.ComponentPropsWithoutRe
507
705
 
508
706
  export declare const ModalTrigger: React_2.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
509
707
 
708
+ export declare const progressBarVariants: (props?: ({
709
+ variant?: "default" | "muted" | "success" | null | undefined;
710
+ animated?: boolean | null | undefined;
711
+ } & ClassProp) | undefined) => string;
712
+
713
+ /**
714
+ * Progress indicator component following Engrate brand guidelines.
715
+ * Uses Sunflower yellow as the default color for the progress bar.
716
+ *
717
+ * @example
718
+ * ```tsx
719
+ * <ProgressIndicator value={50} />
720
+ * <ProgressIndicator value={75} size="lg" variant="success" />
721
+ * <ProgressIndicator indeterminate label="Loading..." />
722
+ * ```
723
+ */
724
+ export declare const ProgressIndicator: React_2.ForwardRefExoticComponent<ProgressIndicatorProps & React_2.RefAttributes<HTMLDivElement>>;
725
+
726
+ export declare interface ProgressIndicatorProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof progressIndicatorVariants>, VariantProps<typeof progressBarVariants> {
727
+ /** Current progress value (0-100) */
728
+ value?: number;
729
+ /** Maximum progress value */
730
+ max?: number;
731
+ /** Accessible label for screen readers */
732
+ label?: string;
733
+ /** Whether to show indeterminate loading state */
734
+ indeterminate?: boolean;
735
+ }
736
+
737
+ export declare const progressIndicatorVariants: (props?: ({
738
+ size?: "sm" | "default" | "lg" | "xl" | null | undefined;
739
+ } & ClassProp) | undefined) => string;
740
+
510
741
  /**
511
742
  * Radio group container component.
512
743
  * Built on Radix UI RadioGroup for accessibility.
@@ -581,8 +812,90 @@ export declare interface SelectTriggerProps extends React_2.ComponentPropsWithou
581
812
 
582
813
  export declare const SelectValue: React_2.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React_2.RefAttributes<HTMLSpanElement>>;
583
814
 
815
+ /**
816
+ * Skeleton component for indicating loading states.
817
+ * Displays a pulsing placeholder while content is loading.
818
+ *
819
+ * @example
820
+ * ```tsx
821
+ * <Skeleton width={200} height={20} />
822
+ * <Skeleton variant="circular" width={40} height={40} />
823
+ * <Skeleton variant="text" className="w-full h-4" />
824
+ * ```
825
+ */
826
+ export declare const Skeleton: React_2.ForwardRefExoticComponent<SkeletonProps & React_2.RefAttributes<HTMLDivElement>>;
827
+
828
+ export declare interface SkeletonProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof skeletonVariants> {
829
+ /** Width of the skeleton (CSS value or Tailwind class) */
830
+ width?: string | number;
831
+ /** Height of the skeleton (CSS value or Tailwind class) */
832
+ height?: string | number;
833
+ }
834
+
835
+ export declare const skeletonVariants: (props?: ({
836
+ variant?: "text" | "default" | "circular" | null | undefined;
837
+ } & ClassProp) | undefined) => string;
838
+
584
839
  export declare type SortDirection = 'asc' | 'desc' | null;
585
840
 
841
+ /**
842
+ * Loading spinner component following Engrate brand guidelines.
843
+ * Uses Sunflower yellow as the default color.
844
+ *
845
+ * @example
846
+ * ```tsx
847
+ * <Spinner />
848
+ * <Spinner size="lg" variant="muted" />
849
+ * <Spinner label="Loading data..." />
850
+ * ```
851
+ */
852
+ export declare const Spinner: React_2.ForwardRefExoticComponent<SpinnerProps & React_2.RefAttributes<HTMLSpanElement>>;
853
+
854
+ export declare interface SpinnerProps extends React_2.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof spinnerVariants> {
855
+ /** Accessible label for screen readers */
856
+ label?: string;
857
+ }
858
+
859
+ export declare const spinnerVariants: (props?: ({
860
+ variant?: "default" | "muted" | "inverted" | null | undefined;
861
+ size?: "sm" | "default" | "lg" | "xl" | null | undefined;
862
+ } & ClassProp) | undefined) => string;
863
+
864
+ /**
865
+ * Stack component for arranging elements in a vertical or horizontal stack.
866
+ * Provides a flexible layout system with configurable direction, gaps, and alignment.
867
+ *
868
+ * @example
869
+ * ```tsx
870
+ * // Vertical stack (default)
871
+ * <Stack gap="lg">
872
+ * <Card>Item 1</Card>
873
+ * <Card>Item 2</Card>
874
+ * <Card>Item 3</Card>
875
+ * </Stack>
876
+ *
877
+ * // Horizontal stack
878
+ * <Stack direction="horizontal" gap="md" align="center">
879
+ * <Button>Action 1</Button>
880
+ * <Button>Action 2</Button>
881
+ * </Stack>
882
+ * ```
883
+ */
884
+ export declare const Stack: React_2.ForwardRefExoticComponent<StackProps & React_2.RefAttributes<HTMLDivElement>>;
885
+
886
+ export declare interface StackProps extends React_2.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stackVariants> {
887
+ /** Render as a child component using Slot */
888
+ asChild?: boolean;
889
+ }
890
+
891
+ export declare const stackVariants: (props?: ({
892
+ direction?: "horizontal" | "vertical" | null | undefined;
893
+ gap?: "sm" | "lg" | "none" | "xs" | "md" | "xl" | "2xl" | null | undefined;
894
+ align?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
895
+ justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
896
+ wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
897
+ } & ClassProp) | undefined) => string;
898
+
586
899
  /**
587
900
  * Switch component following Engrate brand guidelines.
588
901
  * Built on Radix UI Switch for accessibility.
@@ -787,7 +1100,7 @@ export declare interface TextProps extends React_2.HTMLAttributes<HTMLElement>,
787
1100
 
788
1101
  export declare const textVariants: (props?: ({
789
1102
  variant?: "lead" | "semi-lead" | "body-lg" | "body" | "descriptive" | "label" | "label-sm" | null | undefined;
790
- weight?: "regular" | "medium" | null | undefined;
1103
+ weight?: "medium" | "regular" | null | undefined;
791
1104
  } & ClassProp) | undefined) => string;
792
1105
 
793
1106
  export declare const Toast: React_2.ForwardRefExoticComponent<ToastProps & React_2.RefAttributes<HTMLLIElement>>;
@@ -826,6 +1139,44 @@ export declare const ToastViewport: React_2.ForwardRefExoticComponent<ToastViewp
826
1139
  export declare interface ToastViewportProps extends React_2.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport> {
827
1140
  }
828
1141
 
1142
+ export declare const Tooltip: React_2.FC<TooltipPrimitive.TooltipProps>;
1143
+
1144
+ export declare const TooltipArrow: React_2.ForwardRefExoticComponent<TooltipArrowProps & React_2.RefAttributes<SVGSVGElement>>;
1145
+
1146
+ export declare interface TooltipArrowProps extends React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Arrow> {
1147
+ }
1148
+
1149
+ /**
1150
+ * Tooltip content component that displays contextual information.
1151
+ * Follows Engrate brand guidelines with dark background by default.
1152
+ *
1153
+ * @example
1154
+ * ```tsx
1155
+ * <TooltipProvider>
1156
+ * <Tooltip>
1157
+ * <TooltipTrigger>Hover me</TooltipTrigger>
1158
+ * <TooltipContent>Helpful information</TooltipContent>
1159
+ * </Tooltip>
1160
+ * </TooltipProvider>
1161
+ * ```
1162
+ */
1163
+ export declare const TooltipContent: React_2.ForwardRefExoticComponent<TooltipContentProps & React_2.RefAttributes<HTMLDivElement>>;
1164
+
1165
+ export declare interface TooltipContentProps extends React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>, VariantProps<typeof tooltipContentVariants> {
1166
+ /** Whether to show an arrow pointing to the trigger */
1167
+ showArrow?: boolean;
1168
+ }
1169
+
1170
+ export declare const tooltipContentVariants: (props?: ({
1171
+ variant?: "default" | "light" | null | undefined;
1172
+ } & ClassProp) | undefined) => string;
1173
+
1174
+ export declare const TooltipPortal: React_2.FC<TooltipPrimitive.TooltipPortalProps>;
1175
+
1176
+ export declare const TooltipProvider: React_2.FC<TooltipPrimitive.TooltipProviderProps>;
1177
+
1178
+ export declare const TooltipTrigger: React_2.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React_2.RefAttributes<HTMLButtonElement>>;
1179
+
829
1180
  export declare function useFilterableTable<T>({ data, filterKeys, }: UseFilterableTableOptions<T>): UseFilterableTableReturn<T>;
830
1181
 
831
1182
  declare interface UseFilterableTableOptions<T> {