kitchen-simulator 5.0.0-test.17 → 5.0.0-test.18
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/package.json +11 -3
- package/src/_KitchenConfigurator.jsx +0 -88
- package/src/components/atoms/Snackbar/index.jsx +43 -0
- package/src/components/atoms/radio-button/index.jsx +20 -0
- package/src/components/atoms/radio-button/styles.js +56 -0
- package/src/components/button/MainButton.jsx +157 -0
- package/src/components/button/ToggleMeasureButton.jsx +65 -0
- package/src/components/content.jsx +136 -0
- package/src/components/molecules/slider/index.jsx +15 -0
- package/src/components/molecules/slider/styles.js +0 -0
- package/src/components/molecules/slider/styles.scss +3 -0
- package/src/components/style/button.jsx +95 -0
- package/src/components/style/cancel-button.jsx +20 -0
- package/src/components/style/content-container.jsx +29 -0
- package/src/components/style/content-title.jsx +20 -0
- package/src/components/style/delete-button.jsx +23 -0
- package/src/components/style/export.jsx +48 -0
- package/src/components/style/form-block.jsx +13 -0
- package/src/components/style/form-color-input.jsx +27 -0
- package/src/components/style/form-label.jsx +15 -0
- package/src/components/style/form-number-input.jsx +196 -0
- package/src/components/style/form-number-input_2.jsx +191 -0
- package/src/components/style/form-select.jsx +38 -0
- package/src/components/style/form-slider.jsx +36 -0
- package/src/components/style/form-submit-button.jsx +23 -0
- package/src/components/style/form-text-input.jsx +65 -0
- package/src/components/tutorial-view/Modal.jsx +584 -0
- package/src/components/tutorial-view/style.css +111 -0
- package/src/components/tutorial-view/styles.js +65 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as SharedStyle from '../../shared-style';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import {
|
|
5
|
+
TEXT_COLOR_NEUTRAL_3,
|
|
6
|
+
DEFAULT_FONT_FAMILY,
|
|
7
|
+
SECONDARY_PURPLE_COLOR
|
|
8
|
+
} from '../../constants';
|
|
9
|
+
|
|
10
|
+
const StyledSelect = styled.select`
|
|
11
|
+
display: block;
|
|
12
|
+
width: 120px;
|
|
13
|
+
float: right;
|
|
14
|
+
padding: 15px 10px 12px 0px;
|
|
15
|
+
color: ${TEXT_COLOR_NEUTRAL_3};
|
|
16
|
+
border: 2px solid;
|
|
17
|
+
font-family: ${DEFAULT_FONT_FAMILY};
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
line-height: 17px;
|
|
21
|
+
text-align: right;
|
|
22
|
+
outline: none;
|
|
23
|
+
border-radius: 5px;
|
|
24
|
+
:hover {
|
|
25
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
26
|
+
}
|
|
27
|
+
:focus {
|
|
28
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default function FormSelect({ children, style, ...rest }) {
|
|
33
|
+
return (
|
|
34
|
+
<StyledSelect type="text" style={style} {...rest}>
|
|
35
|
+
{children}
|
|
36
|
+
</StyledSelect>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactRange from '@mapbox/react-range';
|
|
3
|
+
import FormTextInput from './form-text-input';
|
|
4
|
+
|
|
5
|
+
const sliderContainerStyle = {
|
|
6
|
+
display: 'inline-block',
|
|
7
|
+
width: '80%',
|
|
8
|
+
marginRight: '5%'
|
|
9
|
+
};
|
|
10
|
+
const sliderStyle = { display: 'block', width: '100%', height: '30px' };
|
|
11
|
+
const textContainerStyle = {
|
|
12
|
+
display: 'inline-block',
|
|
13
|
+
width: '15%',
|
|
14
|
+
float: 'right'
|
|
15
|
+
};
|
|
16
|
+
const textStyle = { height: '34px', textAlign: 'center' };
|
|
17
|
+
|
|
18
|
+
export default function FormNumberInput({ value, onChange, ...rest }) {
|
|
19
|
+
return (
|
|
20
|
+
<div>
|
|
21
|
+
<div style={sliderContainerStyle}>
|
|
22
|
+
<ReactRange
|
|
23
|
+
type="range"
|
|
24
|
+
style={sliderStyle}
|
|
25
|
+
onChange={onChange}
|
|
26
|
+
value={value}
|
|
27
|
+
{...rest}
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div style={textContainerStyle}>
|
|
32
|
+
<FormTextInput value={value} onChange={onChange} style={textStyle} />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Button from './button';
|
|
3
|
+
import * as SharedStyle from '../../shared-style';
|
|
4
|
+
|
|
5
|
+
const STYLE = {
|
|
6
|
+
borderColor: '#415375',
|
|
7
|
+
backgroundColor: '#415375',
|
|
8
|
+
color: SharedStyle.COLORS.white
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const STYLE_HOVER = {
|
|
12
|
+
borderColor: '#1f3149',
|
|
13
|
+
backgroundColor: '#1f3149',
|
|
14
|
+
color: SharedStyle.COLORS.white
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default function FormSubmitButton({ children, ...rest }) {
|
|
18
|
+
return (
|
|
19
|
+
<Button type="submit" style={STYLE} styleHover={STYLE_HOVER} {...rest}>
|
|
20
|
+
{children}
|
|
21
|
+
</Button>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import * as SharedStyle from '../../shared-style';
|
|
3
|
+
import {
|
|
4
|
+
PROJECT_NAME_LENGTH_LIMIT,
|
|
5
|
+
TEXT_COLOR_NEUTRAL_3,
|
|
6
|
+
BG_COLOR_0,
|
|
7
|
+
DEFAULT_FONT_FAMILY,
|
|
8
|
+
SECONDARY_PURPLE_COLOR
|
|
9
|
+
} from '../../constants';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
|
|
12
|
+
const StyledInput = styled.input`
|
|
13
|
+
display: block;
|
|
14
|
+
padding: 15px 10px 12px 0px;
|
|
15
|
+
width: 120px;
|
|
16
|
+
font-family: ${DEFAULT_FONT_FAMILY};
|
|
17
|
+
font-size: 12px;
|
|
18
|
+
font-weight: 600;
|
|
19
|
+
line-height: 17px;
|
|
20
|
+
color: ${TEXT_COLOR_NEUTRAL_3};
|
|
21
|
+
background-color: ${BG_COLOR_0};
|
|
22
|
+
border: 2px solid;
|
|
23
|
+
text-align: right;
|
|
24
|
+
float: right;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
outline: 0;
|
|
27
|
+
:focus {
|
|
28
|
+
border-color: ${SECONDARY_PURPLE_COLOR};
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export default class FormTextInput extends Component {
|
|
33
|
+
constructor(props) {
|
|
34
|
+
super(props);
|
|
35
|
+
this.state = { focus: false };
|
|
36
|
+
this.input = React.createRef(null);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
componentDidMount() {
|
|
40
|
+
if (this.input.current) {
|
|
41
|
+
this.input.current.select();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
render() {
|
|
46
|
+
let { style, ...rest } = this.props;
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<StyledInput
|
|
50
|
+
ref={this.input}
|
|
51
|
+
onFocus={e => this.setState({ focus: true })}
|
|
52
|
+
onBlur={e => this.setState({ focus: false })}
|
|
53
|
+
style={style}
|
|
54
|
+
// autoFocus
|
|
55
|
+
type="text"
|
|
56
|
+
{...rest}
|
|
57
|
+
maxLength={PROJECT_NAME_LENGTH_LIMIT}
|
|
58
|
+
/>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
FormTextInput.defaultProps = {
|
|
64
|
+
style: {}
|
|
65
|
+
};
|