@engrate/components 0.1.25 → 0.1.27

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.
@@ -101,5 +101,45 @@ declare function SidebarLogo({ ...props }: SidebarLogoProps): import("react/jsx-
101
101
  declare namespace SidebarLogo {
102
102
  var displayName: string;
103
103
  }
104
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, SidebarLogo, sidebarVariants, sidebarItemVariants, useSidebarContext, };
105
- export type { SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarItemProps, SidebarTriggerProps, SidebarSeparatorProps, SidebarLogoProps, };
104
+ interface SidebarSubContextValue {
105
+ open: boolean;
106
+ setOpen: (open: boolean) => void;
107
+ }
108
+ declare function useSidebarSubContext(): SidebarSubContextValue;
109
+ interface SidebarSubProps extends React.HTMLAttributes<HTMLDivElement> {
110
+ /** Whether the sub-items are open by default */
111
+ defaultOpen?: boolean;
112
+ /** Controlled open state */
113
+ open?: boolean;
114
+ /** Callback when open state changes */
115
+ onOpenChange?: (open: boolean) => void;
116
+ }
117
+ /**
118
+ * Wraps a SidebarSubTrigger and SidebarSubContent to create an expandable
119
+ * navigation item with sub-items.
120
+ *
121
+ * When the sidebar is expanded the sub-items collapse/expand inline.
122
+ * When the sidebar is collapsed they appear in a popover on hover.
123
+ *
124
+ * @example
125
+ * ```tsx
126
+ * <SidebarSub>
127
+ * <SidebarSubTrigger icon={<Zap />}>Power Tariffs</SidebarSubTrigger>
128
+ * <SidebarSubContent>
129
+ * <SidebarItem>Spot Prices</SidebarItem>
130
+ * <SidebarItem>Forward Prices</SidebarItem>
131
+ * </SidebarSubContent>
132
+ * </SidebarSub>
133
+ * ```
134
+ */
135
+ declare const SidebarSub: React.ForwardRefExoticComponent<SidebarSubProps & React.RefAttributes<HTMLDivElement>>;
136
+ interface SidebarSubTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof sidebarItemVariants> {
137
+ /** Icon to display before the label */
138
+ icon?: React.ReactNode;
139
+ }
140
+ declare const SidebarSubTrigger: React.ForwardRefExoticComponent<SidebarSubTriggerProps & React.RefAttributes<HTMLButtonElement>>;
141
+ interface SidebarSubContentProps extends React.HTMLAttributes<HTMLDivElement> {
142
+ }
143
+ declare const SidebarSubContent: React.ForwardRefExoticComponent<SidebarSubContentProps & React.RefAttributes<HTMLDivElement>>;
144
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, SidebarLogo, SidebarSub, SidebarSubTrigger, SidebarSubContent, sidebarVariants, sidebarItemVariants, useSidebarContext, useSidebarSubContext, };
145
+ export type { SidebarProps, SidebarHeaderProps, SidebarContentProps, SidebarFooterProps, SidebarGroupProps, SidebarGroupLabelProps, SidebarItemProps, SidebarTriggerProps, SidebarSeparatorProps, SidebarLogoProps, SidebarSubProps, SidebarSubTriggerProps, SidebarSubContentProps, };
@@ -1 +1 @@
1
- export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, sidebarVariants, sidebarItemVariants, useSidebarContext, type SidebarProps, type SidebarHeaderProps, type SidebarContentProps, type SidebarFooterProps, type SidebarGroupProps, type SidebarGroupLabelProps, type SidebarItemProps, type SidebarTriggerProps, type SidebarSeparatorProps, } from './Sidebar';
1
+ export { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarItem, SidebarTrigger, SidebarSeparator, SidebarSub, SidebarSubTrigger, SidebarSubContent, sidebarVariants, sidebarItemVariants, useSidebarContext, useSidebarSubContext, type SidebarProps, type SidebarHeaderProps, type SidebarContentProps, type SidebarFooterProps, type SidebarGroupProps, type SidebarGroupLabelProps, type SidebarItemProps, type SidebarTriggerProps, type SidebarSeparatorProps, type SidebarSubProps, type SidebarSubTriggerProps, type SidebarSubContentProps, } from './Sidebar';
@@ -0,0 +1,115 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from 'react';
3
+ declare const stepperVariants: (props?: ({
4
+ orientation?: "horizontal" | "vertical" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ declare const miniStepperVariants: (props?: ({
7
+ size?: "default" | "sm" | "lg" | null | undefined;
8
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
9
+ declare const miniStepperIndicatorVariants: (props?: ({
10
+ size?: "default" | "sm" | "lg" | null | undefined;
11
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
+ declare const miniStepperSeparatorVariants: (props?: ({
13
+ size?: "default" | "sm" | "lg" | null | undefined;
14
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
15
+ interface StepperProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof stepperVariants> {
16
+ /** Visual style — `"default"` for compound component, `"mini"` for inline compact stepper */
17
+ variant?: 'default' | 'mini';
18
+ /** The current active step (1-indexed) */
19
+ activeStep?: number;
20
+ /** Orientation of the stepper (default variant only) */
21
+ orientation?: 'horizontal' | 'vertical';
22
+ /** Total number of steps (mini variant only) */
23
+ totalSteps?: number;
24
+ /** Indicator size (mini variant only) */
25
+ size?: 'sm' | 'default' | 'lg' | null;
26
+ /** Labels for each step, used as aria-label (mini variant only) */
27
+ labels?: string[];
28
+ /** Callback when a step indicator is clicked (mini variant only) */
29
+ onStepClick?: (step: number) => void;
30
+ }
31
+ /**
32
+ * Root container for the stepper component.
33
+ * Displays progress through a multi-step process.
34
+ *
35
+ * Use `variant="default"` (or omit) for a compound component with titles/descriptions.
36
+ * Use `variant="mini"` for a compact inline stepper with numbered dots and connectors.
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * // Default — compound component
41
+ * <Stepper activeStep={2}>
42
+ * <StepperItem step={1}>
43
+ * <StepperTrigger>
44
+ * <StepperIndicator />
45
+ * <StepperTitle>Step 1</StepperTitle>
46
+ * </StepperTrigger>
47
+ * <StepperSeparator />
48
+ * </StepperItem>
49
+ * <StepperItem step={2}>
50
+ * <StepperTrigger>
51
+ * <StepperIndicator />
52
+ * <StepperTitle>Step 2</StepperTitle>
53
+ * </StepperTrigger>
54
+ * </StepperItem>
55
+ * </Stepper>
56
+ *
57
+ * // Mini — compact inline
58
+ * <Stepper variant="mini" totalSteps={4} activeStep={2} />
59
+ * <Stepper variant="mini" totalSteps={3} activeStep={2} size="sm" labels={['A','B','C']} />
60
+ * ```
61
+ */
62
+ declare const Stepper: React.ForwardRefExoticComponent<StepperProps & React.RefAttributes<HTMLDivElement>>;
63
+ declare const stepperItemVariants: (props?: ({
64
+ orientation?: "horizontal" | "vertical" | null | undefined;
65
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
66
+ interface StepperItemProps extends React.HTMLAttributes<HTMLDivElement> {
67
+ /** Step number (1-indexed) */
68
+ step: number;
69
+ }
70
+ /**
71
+ * Individual step item. Wraps the trigger, separator, and any content.
72
+ */
73
+ declare const StepperItem: React.ForwardRefExoticComponent<StepperItemProps & React.RefAttributes<HTMLDivElement>>;
74
+ declare const stepperTriggerVariants: (props?: ({
75
+ orientation?: "horizontal" | "vertical" | null | undefined;
76
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
77
+ interface StepperTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
78
+ }
79
+ /**
80
+ * Clickable trigger for a step. Contains the indicator and labels.
81
+ */
82
+ declare const StepperTrigger: React.ForwardRefExoticComponent<StepperTriggerProps & React.RefAttributes<HTMLButtonElement>>;
83
+ declare const stepperIndicatorVariants: (props?: ({
84
+ size?: "default" | "sm" | "lg" | null | undefined;
85
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
86
+ interface StepperIndicatorProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof stepperIndicatorVariants> {
87
+ }
88
+ /**
89
+ * Visual indicator showing the step number or completion state.
90
+ * Automatically shows a check icon for completed steps.
91
+ */
92
+ declare const StepperIndicator: React.ForwardRefExoticComponent<StepperIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
93
+ interface StepperTitleProps extends React.HTMLAttributes<HTMLSpanElement> {
94
+ }
95
+ /**
96
+ * Title text for a step.
97
+ */
98
+ declare const StepperTitle: React.ForwardRefExoticComponent<StepperTitleProps & React.RefAttributes<HTMLSpanElement>>;
99
+ interface StepperDescriptionProps extends React.HTMLAttributes<HTMLParagraphElement> {
100
+ }
101
+ /**
102
+ * Description text for a step.
103
+ */
104
+ declare const StepperDescription: React.ForwardRefExoticComponent<StepperDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
105
+ declare const stepperSeparatorVariants: (props?: ({
106
+ orientation?: "horizontal" | "vertical" | null | undefined;
107
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
108
+ interface StepperSeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
109
+ }
110
+ /**
111
+ * Separator line between steps. Indicates completion status.
112
+ */
113
+ declare const StepperSeparator: React.ForwardRefExoticComponent<StepperSeparatorProps & React.RefAttributes<HTMLDivElement>>;
114
+ export { Stepper, stepperVariants, miniStepperVariants, miniStepperIndicatorVariants, miniStepperSeparatorVariants, StepperItem, stepperItemVariants, StepperTrigger, stepperTriggerVariants, StepperIndicator, stepperIndicatorVariants, StepperTitle, StepperDescription, StepperSeparator, stepperSeparatorVariants, };
115
+ export type { StepperProps, StepperItemProps, StepperTriggerProps, StepperIndicatorProps, StepperTitleProps, StepperDescriptionProps, StepperSeparatorProps, };
@@ -0,0 +1,2 @@
1
+ export { Stepper, stepperVariants, miniStepperVariants, miniStepperIndicatorVariants, miniStepperSeparatorVariants, StepperItem, stepperItemVariants, StepperTrigger, stepperTriggerVariants, StepperIndicator, stepperIndicatorVariants, StepperTitle, StepperDescription, StepperSeparator, stepperSeparatorVariants, } from './Stepper';
2
+ export type { StepperProps, StepperItemProps, StepperTriggerProps, StepperIndicatorProps, StepperTitleProps, StepperDescriptionProps, StepperSeparatorProps, } from './Stepper';
@@ -12,6 +12,8 @@ declare const tableHeadVariants: (props?: ({
12
12
  size?: "default" | "compact" | null | undefined;
13
13
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
14
14
  interface TableProps extends React.HTMLAttributes<HTMLTableElement>, VariantProps<typeof tableVariants> {
15
+ /** Add visible horizontal borders between table rows */
16
+ bordered?: boolean;
15
17
  }
16
18
  /**
17
19
  * Table root component following Engrate brand guidelines.
@@ -38,6 +38,7 @@ export * from './Skeleton';
38
38
  export * from './Slider';
39
39
  export * from './Spinner';
40
40
  export * from './Stack';
41
+ export * from './Stepper';
41
42
  export * from './Switch';
42
43
  export * from './Table';
43
44
  export * from './TabList';