@pareto-engineering/design-system 2.0.0-alpha.26 → 2.0.0-alpha.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.
- package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
- package/dist/cjs/a/GradientBackground/index.js +15 -0
- package/dist/cjs/a/GradientBackground/styles.scss +191 -0
- package/dist/cjs/c/AcceptCookies/AcceptCookies.js +134 -0
- package/dist/cjs/c/AcceptCookies/index.js +15 -0
- package/dist/cjs/c/AcceptCookies/styles.scss +49 -0
- package/dist/cjs/c/BlogCategoryButton/BlogCategoryButton.js +95 -0
- package/dist/cjs/c/BlogCategoryButton/index.js +15 -0
- package/dist/cjs/c/BlogContext/BlogContextProvider.js +63 -0
- package/dist/cjs/c/BlogContext/Context.js +16 -0
- package/dist/cjs/c/BlogContext/ContextProvider.js +63 -0
- package/dist/cjs/c/BlogContext/index.js +31 -0
- package/dist/cjs/c/BlogContext/useBlog.js +16 -0
- package/dist/cjs/c/BlogPost/BlogPost.js +147 -0
- package/dist/cjs/c/BlogPost/index.js +15 -0
- package/dist/cjs/c/BlogPost/styles.scss +33 -0
- package/dist/cjs/c/BlogPostsList/BlogPostsList.js +73 -0
- package/dist/cjs/c/BlogPostsList/common/Card/Card.js +170 -0
- package/dist/cjs/c/BlogPostsList/common/Card/index.js +15 -0
- package/dist/cjs/c/BlogPostsList/common/index.js +13 -0
- package/dist/cjs/c/BlogPostsList/index.js +15 -0
- package/dist/cjs/c/BlogPostsList/styles.scss +72 -0
- package/dist/cjs/c/SiteFooter/SiteFooter.js +73 -0
- package/dist/cjs/c/SiteFooter/common/Section/Section.js +95 -0
- package/dist/cjs/c/SiteFooter/common/Section/index.js +15 -0
- package/dist/cjs/c/SiteFooter/common/index.js +13 -0
- package/dist/cjs/c/SiteFooter/index.js +15 -0
- package/dist/cjs/c/SiteFooter/styles.scss +34 -0
- package/dist/cjs/c/SiteHeaderCTA/SiteHeaderCTA.js +108 -0
- package/dist/cjs/c/SiteHeaderCTA/index.js +15 -0
- package/dist/cjs/c/SiteHeaderCTA/styles.scss +44 -0
- package/dist/cjs/c/SiteMission/SiteMission.js +113 -0
- package/dist/cjs/c/SiteMission/index.js +15 -0
- package/dist/cjs/c/SiteMission/styles.scss +30 -0
- package/dist/cjs/c/SiteNavigation/SiteNavigation.js +130 -0
- package/dist/cjs/c/SiteNavigation/index.js +15 -0
- package/dist/cjs/c/SiteNavigation/styles.scss +118 -0
- package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +98 -0
- package/dist/cjs/c/SiteOnboardingStep/index.js +15 -0
- package/dist/cjs/c/SiteOnboardingStep/styles.scss +51 -0
- package/dist/cjs/c/SitePricing/SitePricing.js +108 -0
- package/dist/cjs/c/SitePricing/index.js +15 -0
- package/dist/cjs/c/SitePricing/styles.scss +73 -0
- package/dist/cjs/c/SiteServices/SiteServices.js +211 -0
- package/dist/cjs/c/SiteServices/index.js +15 -0
- package/dist/cjs/c/SiteServices/styles.scss +138 -0
- package/dist/cjs/c/TeamGallery/TeamGallery.js +80 -0
- package/dist/cjs/c/TeamGallery/common/PersonCard/PersonCard.js +84 -0
- package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +15 -0
- package/dist/cjs/c/TeamGallery/common/index.js +13 -0
- package/dist/cjs/c/TeamGallery/index.js +15 -0
- package/dist/cjs/c/TeamGallery/styles.scss +100 -0
- package/dist/cjs/c/Testimonials/Testimonials.js +119 -0
- package/dist/cjs/c/Testimonials/index.js +15 -0
- package/dist/cjs/c/Testimonials/styles.scss +112 -0
- package/dist/cjs/experimental/GradientBackground/GradientBackground.js +98 -0
- package/dist/cjs/experimental/GradientBackground/index.js +15 -0
- package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
- package/dist/cjs/experimental/index.js +13 -0
- package/dist/cjs/f/fields/CheckboxInput/CheckboxInput.js +105 -0
- package/dist/cjs/f/fields/CheckboxInput/index.js +15 -0
- package/dist/cjs/f/fields/CheckboxInput/styles.scss +28 -0
- package/dist/cjs/f/fields/RadioInput/RadioInput.js +110 -0
- package/dist/cjs/f/fields/RadioInput/index.js +15 -0
- package/dist/cjs/f/fields/RadioInput/styles.scss +26 -0
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +1 -2
- package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +129 -0
- package/dist/cjs/f/fields/TaskRecommendation/index.js +15 -0
- package/dist/cjs/f/fields/TaskRecommendation/styles.scss +37 -0
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +131 -0
- package/dist/cjs/f/fields/TaskRecommendationInput/index.js +15 -0
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +41 -0
- package/dist/cjs/f/fields/TextArea/TextArea.js +141 -0
- package/dist/cjs/f/fields/TextArea/index.js +15 -0
- package/dist/cjs/f/fields/TextArea/styles.scss +19 -0
- package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
- package/dist/es/a/GradientBackground/index.js +2 -0
- package/dist/es/a/GradientBackground/styles.scss +191 -0
- package/dist/es/c/AcceptCookies/AcceptCookies.js +117 -0
- package/dist/es/c/AcceptCookies/index.js +2 -0
- package/dist/es/c/AcceptCookies/styles.scss +49 -0
- package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +68 -0
- package/dist/es/c/BlogCategoryButton/index.js +2 -0
- package/dist/es/c/BlogContext/BlogContextProvider.js +45 -0
- package/dist/es/c/BlogContext/Context.js +2 -0
- package/dist/es/c/BlogContext/ContextProvider.js +45 -0
- package/dist/es/c/BlogContext/index.js +4 -0
- package/dist/es/c/BlogContext/useBlog.js +3 -0
- package/dist/es/c/BlogPost/BlogPost.js +128 -0
- package/dist/es/c/BlogPost/index.js +2 -0
- package/dist/es/c/BlogPost/styles.scss +33 -0
- package/dist/es/c/BlogPostsList/BlogPostsList.js +56 -0
- package/dist/es/c/BlogPostsList/common/Card/Card.js +143 -0
- package/dist/es/c/BlogPostsList/common/Card/index.js +2 -0
- package/dist/es/c/BlogPostsList/common/index.js +1 -0
- package/dist/es/c/BlogPostsList/index.js +2 -0
- package/dist/es/c/BlogPostsList/styles.scss +72 -0
- package/dist/es/c/SiteFooter/SiteFooter.js +56 -0
- package/dist/es/c/SiteFooter/common/Section/Section.js +73 -0
- package/dist/es/c/SiteFooter/common/Section/index.js +2 -0
- package/dist/es/c/SiteFooter/common/index.js +1 -0
- package/dist/es/c/SiteFooter/index.js +2 -0
- package/dist/es/c/SiteFooter/styles.scss +34 -0
- package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +92 -0
- package/dist/es/c/SiteHeaderCTA/index.js +2 -0
- package/dist/es/c/SiteHeaderCTA/styles.scss +44 -0
- package/dist/es/c/SiteMission/SiteMission.js +96 -0
- package/dist/es/c/SiteMission/index.js +2 -0
- package/dist/es/c/SiteMission/styles.scss +30 -0
- package/dist/es/c/SiteNavigation/SiteNavigation.js +111 -0
- package/dist/es/c/SiteNavigation/index.js +2 -0
- package/dist/es/c/SiteNavigation/styles.scss +118 -0
- package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +81 -0
- package/dist/es/c/SiteOnboardingStep/index.js +2 -0
- package/dist/es/c/SiteOnboardingStep/styles.scss +51 -0
- package/dist/es/c/SitePricing/SitePricing.js +91 -0
- package/dist/es/c/SitePricing/index.js +2 -0
- package/dist/es/c/SitePricing/styles.scss +73 -0
- package/dist/es/c/SiteServices/SiteServices.js +195 -0
- package/dist/es/c/SiteServices/index.js +2 -0
- package/dist/es/c/SiteServices/styles.scss +138 -0
- package/dist/es/c/TeamGallery/TeamGallery.js +64 -0
- package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +64 -0
- package/dist/es/c/TeamGallery/common/PersonCard/index.js +2 -0
- package/dist/es/c/TeamGallery/common/index.js +1 -0
- package/dist/es/c/TeamGallery/index.js +2 -0
- package/dist/es/c/TeamGallery/styles.scss +100 -0
- package/dist/es/c/Testimonials/Testimonials.js +99 -0
- package/dist/es/c/Testimonials/index.js +2 -0
- package/dist/es/c/Testimonials/styles.scss +112 -0
- package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
- package/dist/es/experimental/GradientBackground/index.js +2 -0
- package/dist/es/experimental/GradientBackground/styles.scss +64 -0
- package/dist/es/experimental/index.js +1 -0
- package/dist/es/f/fields/CheckboxInput/CheckboxInput.js +85 -0
- package/dist/es/f/fields/CheckboxInput/index.js +2 -0
- package/dist/es/f/fields/CheckboxInput/styles.scss +28 -0
- package/dist/es/f/fields/RadioInput/RadioInput.js +90 -0
- package/dist/es/f/fields/RadioInput/index.js +2 -0
- package/dist/es/f/fields/RadioInput/styles.scss +26 -0
- package/dist/es/f/fields/SelectInput/SelectInput.js +1 -2
- package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +111 -0
- package/dist/es/f/fields/TaskRecommendation/index.js +2 -0
- package/dist/es/f/fields/TaskRecommendation/styles.scss +37 -0
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +111 -0
- package/dist/es/f/fields/TaskRecommendationInput/index.js +2 -0
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +41 -0
- package/dist/es/f/fields/TextArea/TextArea.js +124 -0
- package/dist/es/f/fields/TextArea/index.js +2 -0
- package/dist/es/f/fields/TextArea/styles.scss +19 -0
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +1 -29
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +0 -1
|
@@ -57,8 +57,7 @@ const SelectInput = ({
|
|
|
57
57
|
return /*#__PURE__*/React.createElement("option", {
|
|
58
58
|
key: newOption.value,
|
|
59
59
|
value: newOption.value,
|
|
60
|
-
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
61
|
-
selected: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || true
|
|
60
|
+
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
62
61
|
}, newOption.label);
|
|
63
62
|
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
|
|
64
63
|
isError: !!meta.error,
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useLayoutEffect } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useField } from 'formik';
|
|
8
|
+
import styleNames from '@pareto-engineering/bem';
|
|
9
|
+
import { FormLabel } from "../../common"; // Local Definitions
|
|
10
|
+
|
|
11
|
+
const baseClassName = styleNames.base;
|
|
12
|
+
const componentClassName = 'task-recommendation';
|
|
13
|
+
/**
|
|
14
|
+
* This is the component description.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const TaskRecommendation = ({
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
name,
|
|
22
|
+
value,
|
|
23
|
+
oneLiner,
|
|
24
|
+
label,
|
|
25
|
+
color,
|
|
26
|
+
image // ...otherProps
|
|
27
|
+
|
|
28
|
+
}) => {
|
|
29
|
+
var _field$value;
|
|
30
|
+
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
import("./styles.scss");
|
|
33
|
+
}, []);
|
|
34
|
+
const [field] = useField(name);
|
|
35
|
+
const isOptionSelected = !!(((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.length) > 0 && field.value.includes(value));
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
id: id,
|
|
38
|
+
className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
|
|
39
|
+
style: style // {...otherProps}
|
|
40
|
+
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: `task-content ${isOptionSelected ? 'b-x' : 'b-on-x'}`
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "v1 p-v task"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
46
|
+
className: `uc mb-v ${isOptionSelected ? 'c-on-x' : 'c-x'}`,
|
|
47
|
+
name: name
|
|
48
|
+
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
49
|
+
value: value,
|
|
50
|
+
id: name,
|
|
51
|
+
className: "input",
|
|
52
|
+
type: "checkbox"
|
|
53
|
+
})), /*#__PURE__*/React.createElement("img", {
|
|
54
|
+
className: "image",
|
|
55
|
+
src: image,
|
|
56
|
+
alt: "img"
|
|
57
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
58
|
+
className: ['uc u2 mt-u', isOptionSelected && 'c-on-x'].filter(e => e).join(' ')
|
|
59
|
+
}, oneLiner))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
TaskRecommendation.propTypes = {
|
|
63
|
+
/**
|
|
64
|
+
* The HTML id for this element
|
|
65
|
+
*/
|
|
66
|
+
id: PropTypes.string,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The HTML class names for this element
|
|
70
|
+
*/
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The React-written, css properties for this element.
|
|
75
|
+
*/
|
|
76
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The name of the input
|
|
80
|
+
*/
|
|
81
|
+
name: PropTypes.string.isRequired,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The value of the input
|
|
85
|
+
*/
|
|
86
|
+
value: PropTypes.string.isRequired,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The task one liner description
|
|
90
|
+
*/
|
|
91
|
+
oneLiner: PropTypes.string.isRequired,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The task label
|
|
95
|
+
*/
|
|
96
|
+
label: PropTypes.string.isRequired,
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The color
|
|
100
|
+
*/
|
|
101
|
+
color: PropTypes.string,
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Task image
|
|
105
|
+
*/
|
|
106
|
+
image: PropTypes.string.isRequired
|
|
107
|
+
};
|
|
108
|
+
TaskRecommendation.defaultProps = {
|
|
109
|
+
color: 'main2'
|
|
110
|
+
};
|
|
111
|
+
export default TaskRecommendation;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
.#{bem.$base}.task-recommendation {
|
|
5
|
+
|
|
6
|
+
.task-content {
|
|
7
|
+
border-radius: var(--theme-border-radius);
|
|
8
|
+
border: 1px solid var(--x);
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
.task {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: space-around;
|
|
16
|
+
align-items: center;
|
|
17
|
+
height: 100%;
|
|
18
|
+
|
|
19
|
+
.input {
|
|
20
|
+
appearance: none;
|
|
21
|
+
position: absolute;
|
|
22
|
+
left: 0;
|
|
23
|
+
top: 0;
|
|
24
|
+
bottom:0;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
width: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.image {
|
|
30
|
+
width: 7rem;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useLayoutEffect, memo } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import { useField } from 'formik';
|
|
8
|
+
import styleNames from '@pareto-engineering/bem';
|
|
9
|
+
import { FormLabel } from "../../common"; // Local Definitions
|
|
10
|
+
|
|
11
|
+
const baseClassName = styleNames.base;
|
|
12
|
+
const componentClassName = 'task-recommendation-input';
|
|
13
|
+
/**
|
|
14
|
+
* This is the component description.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const TaskRecommendationInput = ({
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
name,
|
|
22
|
+
value,
|
|
23
|
+
oneLiner,
|
|
24
|
+
label,
|
|
25
|
+
color,
|
|
26
|
+
image // ...otherProps
|
|
27
|
+
|
|
28
|
+
}) => {
|
|
29
|
+
var _field$value;
|
|
30
|
+
|
|
31
|
+
useLayoutEffect(() => {
|
|
32
|
+
import("./styles.scss");
|
|
33
|
+
}, []);
|
|
34
|
+
const [field] = useField(name);
|
|
35
|
+
const isOptionSelected = !!(((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.length) > 0 && field.value.includes(value));
|
|
36
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
id: id,
|
|
38
|
+
className: [baseClassName, componentClassName, userClassName, `x-${color}`].filter(e => e).join(' '),
|
|
39
|
+
style: style // {...otherProps}
|
|
40
|
+
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: `task-content ${isOptionSelected ? 'b-x' : 'b-on-x'}`
|
|
43
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "v1 p-v task"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
46
|
+
className: `uc mb-v ${isOptionSelected ? styleNames.modifierActive : ''}`,
|
|
47
|
+
name: name
|
|
48
|
+
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
49
|
+
value: value,
|
|
50
|
+
id: name,
|
|
51
|
+
className: "input",
|
|
52
|
+
type: "checkbox"
|
|
53
|
+
})), /*#__PURE__*/React.createElement("img", {
|
|
54
|
+
className: "image",
|
|
55
|
+
src: image,
|
|
56
|
+
alt: "img"
|
|
57
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
58
|
+
className: ['uc u2 mt-u', isOptionSelected && 'c-on-x'].filter(e => e).join(' ')
|
|
59
|
+
}, oneLiner))));
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
TaskRecommendationInput.propTypes = {
|
|
63
|
+
/**
|
|
64
|
+
* The HTML id for this element
|
|
65
|
+
*/
|
|
66
|
+
id: PropTypes.string,
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The HTML class names for this element
|
|
70
|
+
*/
|
|
71
|
+
className: PropTypes.string,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The React-written, css properties for this element.
|
|
75
|
+
*/
|
|
76
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The name of the input
|
|
80
|
+
*/
|
|
81
|
+
name: PropTypes.string.isRequired,
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The value of the input
|
|
85
|
+
*/
|
|
86
|
+
value: PropTypes.string.isRequired,
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The task one liner description
|
|
90
|
+
*/
|
|
91
|
+
oneLiner: PropTypes.string.isRequired,
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* The task label
|
|
95
|
+
*/
|
|
96
|
+
label: PropTypes.string.isRequired,
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* The color
|
|
100
|
+
*/
|
|
101
|
+
color: PropTypes.string,
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Task image
|
|
105
|
+
*/
|
|
106
|
+
image: PropTypes.string.isRequired
|
|
107
|
+
};
|
|
108
|
+
TaskRecommendationInput.defaultProps = {
|
|
109
|
+
color: 'main2'
|
|
110
|
+
};
|
|
111
|
+
export default /*#__PURE__*/memo(TaskRecommendationInput);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
.#{bem.$base}.task-recommendation-input {
|
|
5
|
+
|
|
6
|
+
.task-content {
|
|
7
|
+
border-radius: var(--theme-border-radius);
|
|
8
|
+
border: 1px solid var(--x);
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
.task {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
justify-content: space-around;
|
|
16
|
+
align-items: center;
|
|
17
|
+
height: 100%;
|
|
18
|
+
|
|
19
|
+
.#{bem.$modifier-active} {
|
|
20
|
+
color: var(--on-x);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.input {
|
|
24
|
+
appearance: none;
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 0;
|
|
27
|
+
top: 0;
|
|
28
|
+
bottom:0;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
width: 100%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.image {
|
|
34
|
+
width: 7rem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { useLayoutEffect } from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import styleNames from '@pareto-engineering/bem';
|
|
8
|
+
import { useField } from 'formik'; // Local Definitions
|
|
9
|
+
|
|
10
|
+
import { FormLabel, FormDescription } from "../../common";
|
|
11
|
+
const baseClassName = styleNames.base;
|
|
12
|
+
const componentClassName = 'text-area';
|
|
13
|
+
/**
|
|
14
|
+
* This is the component description.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const TextArea = ({
|
|
18
|
+
id,
|
|
19
|
+
className: userClassName,
|
|
20
|
+
style,
|
|
21
|
+
name,
|
|
22
|
+
label,
|
|
23
|
+
validate,
|
|
24
|
+
labelAsDescription,
|
|
25
|
+
textAreaId,
|
|
26
|
+
rows,
|
|
27
|
+
textAreaColor,
|
|
28
|
+
labelColor,
|
|
29
|
+
description // ...otherProps
|
|
30
|
+
|
|
31
|
+
}) => {
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
import("./styles.scss");
|
|
34
|
+
}, []);
|
|
35
|
+
const [field, meta] = useField({
|
|
36
|
+
name,
|
|
37
|
+
validate
|
|
38
|
+
});
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
id: id,
|
|
41
|
+
className: [baseClassName, componentClassName, userClassName, `x-${textAreaColor}`, `y-${labelColor}`].filter(e => e).join(' '),
|
|
42
|
+
style: style // {...otherProps}
|
|
43
|
+
|
|
44
|
+
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
45
|
+
className: ['c-y', labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
46
|
+
name: name
|
|
47
|
+
}, label), /*#__PURE__*/React.createElement("textarea", _extends({
|
|
48
|
+
id: textAreaId,
|
|
49
|
+
className: `textarea v50 pv-v ${meta.touched && meta.error ? 'input-border-error' : 'input-border'}`
|
|
50
|
+
}, field, {
|
|
51
|
+
rows: rows
|
|
52
|
+
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(FormDescription, {
|
|
53
|
+
isError: !!meta.error,
|
|
54
|
+
className: "v50 mt-v s-1"
|
|
55
|
+
}, meta.error || description), ' ');
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
TextArea.propTypes = {
|
|
59
|
+
/**
|
|
60
|
+
* The HTML id for this element
|
|
61
|
+
*/
|
|
62
|
+
id: PropTypes.string,
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* The HTML class names for this element
|
|
66
|
+
*/
|
|
67
|
+
className: PropTypes.string,
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* The React-written, css properties for this element.
|
|
71
|
+
*/
|
|
72
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* The input name (html - and Formik state)
|
|
76
|
+
*/
|
|
77
|
+
name: PropTypes.string.isRequired,
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The input label
|
|
81
|
+
*/
|
|
82
|
+
label: PropTypes.string.isRequired,
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* The input value validator function
|
|
86
|
+
*/
|
|
87
|
+
validate: PropTypes.func,
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* If the text area depends on it's label's text as the default description
|
|
91
|
+
*/
|
|
92
|
+
labelAsDescription: PropTypes.bool,
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The textarea id
|
|
96
|
+
*/
|
|
97
|
+
textAreaId: PropTypes.string,
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The number of rows int the text area
|
|
101
|
+
*/
|
|
102
|
+
rows: PropTypes.number,
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Text area base color
|
|
106
|
+
*/
|
|
107
|
+
textAreaColor: PropTypes.string,
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Label base color
|
|
111
|
+
*/
|
|
112
|
+
labelColor: PropTypes.string,
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Text area description
|
|
116
|
+
*/
|
|
117
|
+
description: PropTypes.string
|
|
118
|
+
};
|
|
119
|
+
TextArea.defaultProps = {
|
|
120
|
+
rows: 3,
|
|
121
|
+
textAreaColor: 'background',
|
|
122
|
+
labelColor: 'main1'
|
|
123
|
+
};
|
|
124
|
+
export default TextArea;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
.#{bem.$base}.text-area{
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
|
|
8
|
+
.textarea {
|
|
9
|
+
background: var(--light-x);
|
|
10
|
+
color: var(--on-x);
|
|
11
|
+
|
|
12
|
+
&:focus {
|
|
13
|
+
background: var(--dark-x);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
package/package.json
CHANGED
|
@@ -2096,7 +2096,7 @@ exports[`Storyshots a/Timestamp Distance Format 1`] = `
|
|
|
2096
2096
|
className="base timestamp"
|
|
2097
2097
|
onClick={[Function]}
|
|
2098
2098
|
>
|
|
2099
|
-
in
|
|
2099
|
+
in 8 months
|
|
2100
2100
|
</p>
|
|
2101
2101
|
`;
|
|
2102
2102
|
|
|
@@ -8914,21 +8914,18 @@ exports[`Storyshots f/FormInput Base 1`] = `
|
|
|
8914
8914
|
>
|
|
8915
8915
|
<option
|
|
8916
8916
|
disabled={false}
|
|
8917
|
-
selected={true}
|
|
8918
8917
|
value="italian"
|
|
8919
8918
|
>
|
|
8920
8919
|
A nice pizza
|
|
8921
8920
|
</option>
|
|
8922
8921
|
<option
|
|
8923
8922
|
disabled={false}
|
|
8924
|
-
selected={true}
|
|
8925
8923
|
value="turkish"
|
|
8926
8924
|
>
|
|
8927
8925
|
A delicious kebab
|
|
8928
8926
|
</option>
|
|
8929
8927
|
<option
|
|
8930
8928
|
disabled={false}
|
|
8931
|
-
selected={true}
|
|
8932
8929
|
value="french"
|
|
8933
8930
|
>
|
|
8934
8931
|
A three course delicate french meal
|
|
@@ -9106,21 +9103,18 @@ exports[`Storyshots f/FormInput Disabled Form Input 1`] = `
|
|
|
9106
9103
|
>
|
|
9107
9104
|
<option
|
|
9108
9105
|
disabled={false}
|
|
9109
|
-
selected={true}
|
|
9110
9106
|
value="italian"
|
|
9111
9107
|
>
|
|
9112
9108
|
A nice pizza
|
|
9113
9109
|
</option>
|
|
9114
9110
|
<option
|
|
9115
9111
|
disabled={false}
|
|
9116
|
-
selected={true}
|
|
9117
9112
|
value="turkish"
|
|
9118
9113
|
>
|
|
9119
9114
|
A delicious kebab
|
|
9120
9115
|
</option>
|
|
9121
9116
|
<option
|
|
9122
9117
|
disabled={false}
|
|
9123
|
-
selected={true}
|
|
9124
9118
|
value="french"
|
|
9125
9119
|
>
|
|
9126
9120
|
A three course delicate french meal
|
|
@@ -10524,28 +10518,24 @@ exports[`Storyshots f/fields/SelectInput Base 1`] = `
|
|
|
10524
10518
|
>
|
|
10525
10519
|
<option
|
|
10526
10520
|
disabled={true}
|
|
10527
|
-
selected={true}
|
|
10528
10521
|
value=""
|
|
10529
10522
|
>
|
|
10530
10523
|
Select an option
|
|
10531
10524
|
</option>
|
|
10532
10525
|
<option
|
|
10533
10526
|
disabled={false}
|
|
10534
|
-
selected={true}
|
|
10535
10527
|
value="Work"
|
|
10536
10528
|
>
|
|
10537
10529
|
Work
|
|
10538
10530
|
</option>
|
|
10539
10531
|
<option
|
|
10540
10532
|
disabled={false}
|
|
10541
|
-
selected={true}
|
|
10542
10533
|
value="Managing"
|
|
10543
10534
|
>
|
|
10544
10535
|
Managing
|
|
10545
10536
|
</option>
|
|
10546
10537
|
<option
|
|
10547
10538
|
disabled={false}
|
|
10548
|
-
selected={true}
|
|
10549
10539
|
value="Training"
|
|
10550
10540
|
>
|
|
10551
10541
|
Training
|
|
@@ -10592,42 +10582,36 @@ exports[`Storyshots f/fields/SelectInput Disabled Select Input 1`] = `
|
|
|
10592
10582
|
>
|
|
10593
10583
|
<option
|
|
10594
10584
|
disabled={true}
|
|
10595
|
-
selected={true}
|
|
10596
10585
|
value=""
|
|
10597
10586
|
>
|
|
10598
10587
|
Select an option
|
|
10599
10588
|
</option>
|
|
10600
10589
|
<option
|
|
10601
10590
|
disabled={false}
|
|
10602
|
-
selected={true}
|
|
10603
10591
|
value="Work"
|
|
10604
10592
|
>
|
|
10605
10593
|
Work
|
|
10606
10594
|
</option>
|
|
10607
10595
|
<option
|
|
10608
10596
|
disabled={false}
|
|
10609
|
-
selected={true}
|
|
10610
10597
|
value="Managing"
|
|
10611
10598
|
>
|
|
10612
10599
|
Managing
|
|
10613
10600
|
</option>
|
|
10614
10601
|
<option
|
|
10615
10602
|
disabled={false}
|
|
10616
|
-
selected={true}
|
|
10617
10603
|
value="Training"
|
|
10618
10604
|
>
|
|
10619
10605
|
Training
|
|
10620
10606
|
</option>
|
|
10621
10607
|
<option
|
|
10622
10608
|
disabled={false}
|
|
10623
|
-
selected={true}
|
|
10624
10609
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
10625
10610
|
>
|
|
10626
10611
|
20th Aug 2020 to 19th Sept, 2020
|
|
10627
10612
|
</option>
|
|
10628
10613
|
<option
|
|
10629
10614
|
disabled={false}
|
|
10630
|
-
selected={true}
|
|
10631
10615
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
10632
10616
|
>
|
|
10633
10617
|
20th Sept 2020 to 19th Oct, 2020
|
|
@@ -10674,21 +10658,18 @@ exports[`Storyshots f/fields/SelectInput Objects 1`] = `
|
|
|
10674
10658
|
>
|
|
10675
10659
|
<option
|
|
10676
10660
|
disabled={true}
|
|
10677
|
-
selected={true}
|
|
10678
10661
|
value=""
|
|
10679
10662
|
>
|
|
10680
10663
|
Select an option
|
|
10681
10664
|
</option>
|
|
10682
10665
|
<option
|
|
10683
10666
|
disabled={false}
|
|
10684
|
-
selected={true}
|
|
10685
10667
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
10686
10668
|
>
|
|
10687
10669
|
20th Aug 2020 to 19th Sept, 2020
|
|
10688
10670
|
</option>
|
|
10689
10671
|
<option
|
|
10690
10672
|
disabled={false}
|
|
10691
|
-
selected={true}
|
|
10692
10673
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
10693
10674
|
>
|
|
10694
10675
|
20th Sept 2020 to 19th Oct, 2020
|
|
@@ -10735,21 +10716,18 @@ exports[`Storyshots f/fields/SelectInput Required Select 1`] = `
|
|
|
10735
10716
|
>
|
|
10736
10717
|
<option
|
|
10737
10718
|
disabled={true}
|
|
10738
|
-
selected={true}
|
|
10739
10719
|
value=""
|
|
10740
10720
|
>
|
|
10741
10721
|
Select an option
|
|
10742
10722
|
</option>
|
|
10743
10723
|
<option
|
|
10744
10724
|
disabled={false}
|
|
10745
|
-
selected={true}
|
|
10746
10725
|
value="review"
|
|
10747
10726
|
>
|
|
10748
10727
|
Review
|
|
10749
10728
|
</option>
|
|
10750
10729
|
<option
|
|
10751
10730
|
disabled={false}
|
|
10752
|
-
selected={true}
|
|
10753
10731
|
value="Approve"
|
|
10754
10732
|
>
|
|
10755
10733
|
Approve
|
|
@@ -10796,42 +10774,36 @@ exports[`Storyshots f/fields/SelectInput String And Objects 1`] = `
|
|
|
10796
10774
|
>
|
|
10797
10775
|
<option
|
|
10798
10776
|
disabled={true}
|
|
10799
|
-
selected={true}
|
|
10800
10777
|
value=""
|
|
10801
10778
|
>
|
|
10802
10779
|
Select an option
|
|
10803
10780
|
</option>
|
|
10804
10781
|
<option
|
|
10805
10782
|
disabled={false}
|
|
10806
|
-
selected={true}
|
|
10807
10783
|
value="Work"
|
|
10808
10784
|
>
|
|
10809
10785
|
Work
|
|
10810
10786
|
</option>
|
|
10811
10787
|
<option
|
|
10812
10788
|
disabled={false}
|
|
10813
|
-
selected={true}
|
|
10814
10789
|
value="Managing"
|
|
10815
10790
|
>
|
|
10816
10791
|
Managing
|
|
10817
10792
|
</option>
|
|
10818
10793
|
<option
|
|
10819
10794
|
disabled={false}
|
|
10820
|
-
selected={true}
|
|
10821
10795
|
value="Training"
|
|
10822
10796
|
>
|
|
10823
10797
|
Training
|
|
10824
10798
|
</option>
|
|
10825
10799
|
<option
|
|
10826
10800
|
disabled={false}
|
|
10827
|
-
selected={true}
|
|
10828
10801
|
value="20th Aug 2020 to 19th Sept, 2020"
|
|
10829
10802
|
>
|
|
10830
10803
|
20th Aug 2020 to 19th Sept, 2020
|
|
10831
10804
|
</option>
|
|
10832
10805
|
<option
|
|
10833
10806
|
disabled={false}
|
|
10834
|
-
selected={true}
|
|
10835
10807
|
value="20th Sept 2020 to 19th Oct, 2020"
|
|
10836
10808
|
>
|
|
10837
10809
|
20th Sept 2020 to 19th Oct, 2020
|