@homefile/components-v2 2.36.7 → 2.36.9

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.
@@ -1,2 +1,2 @@
1
1
  import { HomeMonitortStepsI } from '../../interfaces';
2
- export declare const HomeMonitorSteps: ({ alerts, menuItems, onStepClick, }: HomeMonitortStepsI) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const HomeMonitorSteps: ({ alerts, menuItems, onStepClick, steps, }: HomeMonitortStepsI) => import("react/jsx-runtime").JSX.Element;
@@ -4,11 +4,11 @@ import { Box, Flex } from '@chakra-ui/react';
4
4
  import { HomeMonitorButton, IconMenu, MoreHorizontal } from '../../components';
5
5
  import { homeAssistantSteps } from '../../helpers';
6
6
  import { homeAssistantProxy } from '../../proxies';
7
- export const HomeMonitorSteps = ({ alerts = [], menuItems = [], onStepClick, }) => {
7
+ export const HomeMonitorSteps = ({ alerts = [], menuItems = [], onStepClick, steps = homeAssistantSteps, }) => {
8
8
  const { setSelectedId } = homeAssistantProxy;
9
9
  const isDisabled = menuItems.length === 0;
10
10
  const handleStepClick = (step) => onStepClick(step);
11
- return (_jsx(Flex, { gap: "base", justify: "center", children: homeAssistantSteps.map((step, index) => {
11
+ return (_jsx(Flex, { gap: "base", justify: "center", children: steps.map((step, index) => {
12
12
  var _a;
13
13
  return (_jsx(Box, { position: "relative", flex: "1", children: _jsxs(Fragment, { children: [_jsx(HomeMonitorButton, { alertCount: (_a = alerts.find((alert) => alert.step === index + 1)) === null || _a === void 0 ? void 0 : _a.count, currentStep: index + 1, onStepClick: handleStepClick, status: getStatus(index + 1, alerts), step: step }), _jsx(Box, { position: "absolute", top: "2px", right: "6px", zIndex: "1400", children: _jsx(IconMenu, { zIndex: "2", icon: _jsx(MoreHorizontal, { size: 26 }), itemForm: index + 1, menuItems: menuItems, disabled: isDisabled, onClick: () => setSelectedId(`homeMonitorButton-${index + 1}`) }) })] }) }, step === null || step === void 0 ? void 0 : step.title));
14
14
  }) }));
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Stack } from '@chakra-ui/react';
3
3
  import { AnimatePresence, motion } from 'framer-motion';
4
- const MotionBox = motion(typeof Box);
4
+ const MotionBox = motion.create(typeof Box);
5
5
  export function ControlledWizard({ step, setStep, steps, minHeight = '770px', headerBlink, }) {
6
6
  const current = steps[step];
7
7
  const headerVariants = {
@@ -7,6 +7,7 @@ export interface HomeMonitortStepsI {
7
7
  alerts?: AlertI[];
8
8
  menuItems: MenuItemI[];
9
9
  onStepClick: (step: number) => void;
10
+ steps?: HomeAssistantStepI[];
10
11
  }
11
12
  export interface HomeMonitorButtonI {
12
13
  alertCount?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homefile/components-v2",
3
- "version": "2.36.7",
3
+ "version": "2.36.9",
4
4
  "author": "Homefile",
5
5
  "license": "UNLICENSED",
6
6
  "typings": "dist/index.d.ts",