@homefile/components-v2 2.40.32 → 2.40.34
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/assets/locales/en/index.json +3 -0
- package/dist/components/homeAssistant/StartHomiSetup.d.ts +2 -0
- package/dist/components/homeAssistant/StartHomiSetup.js +10 -0
- package/dist/components/homeAssistant/index.d.ts +1 -0
- package/dist/components/homeAssistant/index.js +1 -0
- package/dist/interfaces/homeAssistant/StartHomiSetup.interface.d.ts +5 -0
- package/dist/interfaces/homeAssistant/StartHomiSetup.interface.js +1 -0
- package/dist/interfaces/homeAssistant/index.d.ts +1 -0
- package/dist/interfaces/homeAssistant/index.js +1 -0
- package/dist/stories/homeAssistant/StartHomiSetup.stories.d.ts +5 -0
- package/dist/stories/homeAssistant/StartHomiSetup.stories.js +19 -0
- package/package.json +1 -1
|
@@ -438,6 +438,9 @@
|
|
|
438
438
|
},
|
|
439
439
|
"notifications": "Notification coming",
|
|
440
440
|
"selectAppliances": "Select the appliances you have in your home:",
|
|
441
|
+
"setupButton": "Start Homi Setup",
|
|
442
|
+
"setupSubtitle": "Homi learns your home so he can warn you before things fail, \ntrack warranties automatically, and tell you what to do next.",
|
|
443
|
+
"setupTitle": "Let’s set up Homi, your \nintelligent home assistant. ",
|
|
441
444
|
"steps": {
|
|
442
445
|
"appliances": "Appliances",
|
|
443
446
|
"goals": "Goals",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { t } from 'i18next';
|
|
4
|
+
import { Box, Button, Circle, Flex, GridItem, Stack, Text, } from '@chakra-ui/react';
|
|
5
|
+
import { ChevronRight, TileTooltip, VideoPlayerModal, VideoPlayerTrigger, } from '../../components';
|
|
6
|
+
import { colors } from '../../theme/colors';
|
|
7
|
+
export const StartHomiSetup = ({ onStart, videoUrl, onSkip, }) => {
|
|
8
|
+
const [url, setUrl] = useState();
|
|
9
|
+
return (_jsx(GridItem, { colSpan: [1, 2], children: _jsx(TileTooltip, { label: "homeAssistant", children: _jsxs(Stack, { w: "full", h: "full", spacing: "4", align: "center", justify: "center", bg: "lightGreen.1", pt: "12", children: [_jsx(Text, { fontSize: "24px", lineHeight: "28px", textAlign: "center", whiteSpace: "pre-line", children: t('homeAssistant.setupTitle') }), _jsx(Text, { fontFamily: "secondary", textAlign: "center", whiteSpace: "pre-line", children: t('homeAssistant.setupSubtitle') }), videoUrl && (_jsx(Box, { boxShadow: "lg", w: "395px", my: "3", children: _jsx(VideoPlayerTrigger, { url: videoUrl, value: videoUrl, ratio: 16 / 9, onPlay: (value) => setUrl(value) }) })), _jsxs(Stack, { bg: "neutral.white", pb: "4", pt: "2", spacing: "4", w: "full", align: "center", children: [_jsx(Button, { onClick: onStart, textTransform: "capitalize", mt: "4", w: "395px", children: _jsxs(Flex, { align: "center", justify: "space-between", w: "full", px: "base", children: [_jsx(Text, { color: "neutral.white", children: t('homeAssistant.setupButton') }), _jsx(Circle, { size: "40px", bg: "blue.1", color: "neutral.white", children: _jsx(ChevronRight, { size: 26, stroke: colors.neutral.white }) })] }) }), onSkip && (_jsx(Button, { variant: "text", onClick: onSkip, children: t('buttons.skip') }))] }), url && (_jsx(VideoPlayerModal, { url: url, onClose: () => setUrl(undefined), showOverlay: true }))] }) }) }));
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,4 +12,5 @@ export * from './HomeMonitorPanel.interface';
|
|
|
12
12
|
export * from './HomeMonitorSteps.interface';
|
|
13
13
|
export * from './HomieAddItems.interface';
|
|
14
14
|
export * from './MonitorAlerts.interface';
|
|
15
|
+
export * from './StartHomiSetup.interface';
|
|
15
16
|
export * from './WeatherWidget.interface';
|
|
@@ -12,4 +12,5 @@ export * from './HomeMonitorPanel.interface';
|
|
|
12
12
|
export * from './HomeMonitorSteps.interface';
|
|
13
13
|
export * from './HomieAddItems.interface';
|
|
14
14
|
export * from './MonitorAlerts.interface';
|
|
15
|
+
export * from './StartHomiSetup.interface';
|
|
15
16
|
export * from './WeatherWidget.interface';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta } from '@storybook/react';
|
|
2
|
+
import { StartHomiSetupI } from '../../interfaces';
|
|
3
|
+
declare const _default: Meta<StartHomiSetupI>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const StartHomiSetupComponent: (args: StartHomiSetupI) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '@chakra-ui/react';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
import { StartHomiSetup } from '../../components';
|
|
5
|
+
import { videoMock } from '../../mocks';
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Components/HomeAssistant',
|
|
8
|
+
component: StartHomiSetup,
|
|
9
|
+
args: {
|
|
10
|
+
onSkip: action('onSkip'),
|
|
11
|
+
onStart: action('onStart'),
|
|
12
|
+
},
|
|
13
|
+
decorators: [
|
|
14
|
+
(Story) => (_jsx(Box, { p: "base", w: ['full', '669px'], h: "477px", children: _jsx(Story, {}) })),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
export const StartHomiSetupComponent = (args) => {
|
|
18
|
+
return _jsx(StartHomiSetup, Object.assign({}, args, { videoUrl: videoMock }));
|
|
19
|
+
};
|