@campxdev/react-blueprint 2.3.0 → 2.3.2

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.
Files changed (23) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/types/src/components/Layout/AppHeader/AppHeader.d.ts +2 -1
  3. package/dist/cjs/types/src/components/Layout/AppLayout/components/AppBar.d.ts +2 -0
  4. package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +2 -0
  5. package/dist/cjs/types/src/components/Navigation/Stepper/Stepper.d.ts +37 -1
  6. package/dist/cjs/types/src/components/Navigation/Stepper/StepperComponents.d.ts +3 -1
  7. package/dist/cjs/types/src/stories/Navigation/Stepper.stories.d.ts +3 -0
  8. package/dist/esm/index.js +2 -2
  9. package/dist/esm/types/src/components/Layout/AppHeader/AppHeader.d.ts +2 -1
  10. package/dist/esm/types/src/components/Layout/AppLayout/components/AppBar.d.ts +2 -0
  11. package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +2 -0
  12. package/dist/esm/types/src/components/Navigation/Stepper/Stepper.d.ts +37 -1
  13. package/dist/esm/types/src/components/Navigation/Stepper/StepperComponents.d.ts +3 -1
  14. package/dist/esm/types/src/stories/Navigation/Stepper.stories.d.ts +3 -0
  15. package/dist/index.d.ts +41 -2
  16. package/package.json +1 -1
  17. package/src/components/Layout/AppHeader/AppHeader.tsx +9 -0
  18. package/src/components/Layout/AppLayout/AppLayout.tsx +6 -1
  19. package/src/components/Layout/AppLayout/components/AppBar.tsx +27 -1
  20. package/src/components/Layout/AppLayout/types.ts +3 -0
  21. package/src/components/Navigation/Stepper/Stepper.tsx +60 -1
  22. package/src/components/Navigation/Stepper/StepperComponents.tsx +21 -8
  23. package/src/stories/Navigation/Stepper.stories.tsx +68 -1
@@ -4,6 +4,7 @@ export type AppHeaderProps = {
4
4
  actions?: ReactNode[];
5
5
  profileActions?: ReactNode[];
6
6
  appsMenu?: ReactNode;
7
+ centerContent?: ReactNode;
7
8
  clientLogoUrl?: string;
8
9
  clientName?: string;
9
10
  userFullName: string;
@@ -19,4 +20,4 @@ export type AppHeaderProps = {
19
20
  onChangeInstitutionClick?: () => void;
20
21
  onAvatarClick?: () => void;
21
22
  };
22
- export declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, centerContent, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,8 @@ import { SideMenuItemProps } from './Sidebar/interfaces';
3
3
  interface AppBarProps {
4
4
  /** Right section component (actions, profile, etc.) */
5
5
  rightSection?: React.ReactNode;
6
+ /** Center section component (workspace switcher, etc.) */
7
+ centerSection?: React.ReactNode;
6
8
  /** Menu items for mobile drawer */
7
9
  menu?: SideMenuItemProps[];
8
10
  /** Custom className for the AppBar */
@@ -17,6 +17,8 @@ export interface AppLayoutProps {
17
17
  menu: SideMenuItemProps[];
18
18
  /** AppBar customization - Primary approach */
19
19
  rightSection?: ReactNode;
20
+ /** AppBar center section customization */
21
+ centerSection?: ReactNode;
20
22
  /** Layout customization */
21
23
  mainContainerSx?: any;
22
24
  /** Help documentation configuration for route-based contextual help */
@@ -1,13 +1,49 @@
1
1
  import { SxProps } from '@mui/material';
2
2
  interface StepperProps {
3
+ /** Orientation of the stepper */
3
4
  orientation: 'vertical' | 'horizontal';
5
+ /** Current active step index (0-based) */
4
6
  activeStep: number;
7
+ /** Array of step items with labels and optional descriptions */
5
8
  steps: StepItem[];
9
+ /** Additional styles for the container */
6
10
  containerSx: SxProps;
11
+ /** Callback function called when a step is clicked. Receives the step index as parameter */
12
+ onStepClick?: (stepIndex: number) => void;
13
+ /** Whether to allow navigation by clicking on steps. Defaults to true */
14
+ allowNavigation?: boolean;
7
15
  }
8
16
  interface StepItem {
17
+ /** The label text for the step */
9
18
  label: string;
19
+ /** Optional description text shown below the label */
10
20
  description?: string;
11
21
  }
12
- export declare const Stepper: ({ orientation, steps, activeStep, containerSx, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
22
+ /**
23
+ * Enhanced Stepper component with navigation capabilities
24
+ *
25
+ * Features:
26
+ * - Click on any step to navigate to it (when allowNavigation is true)
27
+ * - Supports both vertical and horizontal orientations
28
+ * - Customizable styling through containerSx prop
29
+ * - Optional step descriptions
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * const [activeStep, setActiveStep] = useState(0);
34
+ *
35
+ * <Stepper
36
+ * orientation="vertical"
37
+ * activeStep={activeStep}
38
+ * steps={[
39
+ * { label: "Step 1", description: "First step" },
40
+ * { label: "Step 2", description: "Second step" }
41
+ * ]}
42
+ * onStepClick={(stepIndex) => setActiveStep(stepIndex)}
43
+ * allowNavigation={true}
44
+ * containerSx={{}}
45
+ * />
46
+ * ```
47
+ */
48
+ export declare const Stepper: ({ orientation, steps, activeStep, containerSx, onStepClick, allowNavigation, }: StepperProps) => import("react/jsx-runtime").JSX.Element;
13
49
  export {};
@@ -9,5 +9,7 @@ interface ConnectorProps {
9
9
  isVertical: boolean;
10
10
  }
11
11
  export declare const Connector: import("@mui/styled-engine").StyledComponent<import("@mui/material").StepConnectorProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & ConnectorProps, {}, {}>;
12
- export declare function StepIcon(props: StepIconProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function StepIcon(props: StepIconProps & {
13
+ onClick?: () => void;
14
+ }): import("react/jsx-runtime").JSX.Element;
13
15
  export {};
@@ -4,6 +4,9 @@ declare const meta: Meta<typeof Stepper>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Stepper>;
6
6
  export declare const VerticalStepper: Story;
7
+ export declare const InteractiveVerticalStepper: Story;
7
8
  export declare const VerticalStepperWithNoDescription: Story;
8
9
  export declare const HorizontalStepper: Story;
10
+ export declare const InteractiveHorizontalStepper: Story;
11
+ export declare const NonNavigableStepper: Story;
9
12
  export declare const HorizontalStepperWithNoDescription: Story;