@pareto-engineering/design-system 2.0.0-alpha.61 → 2.0.0-alpha.63
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/a/Popover/common/Divider/Divider.js +67 -0
- package/dist/cjs/a/Popover/common/Divider/index.js +15 -0
- package/dist/cjs/a/Popover/common/Item/Item.js +67 -0
- package/dist/cjs/a/Popover/common/Item/index.js +15 -0
- package/dist/cjs/a/Popover/common/index.js +21 -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/{a/ColumnLabel → c/SiteMission}/index.js +3 -3
- 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/{a/ColumnLabel/ColumnLabel.js → experimental/GradientBackground/GradientBackground.js} +30 -32
- 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/FormInput/FormInput.js +7 -0
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -4
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +117 -0
- package/dist/cjs/f/fields/Checkbox/index.js +15 -0
- package/dist/cjs/f/fields/Checkbox/styles.scss +14 -0
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/cjs/f/fields/IntlTelInput/IntlTelInput.js +170 -0
- package/dist/cjs/f/fields/IntlTelInput/index.js +15 -0
- package/dist/cjs/f/fields/IntlTelInput/styles.scss +37 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/PhoneIntlTelInput.js +180 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/index.js +15 -0
- package/dist/cjs/f/fields/PhoneIntlTelInput/styles.scss +43 -0
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +12 -3
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +12 -3
- package/dist/cjs/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +11 -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 +1 -1
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +4 -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/cjs/f/fields/index.js +9 -1
- package/dist/cjs/test/QueryLoader/styles.scss +9 -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/a/Popover/common/Divider/Divider.js +47 -0
- package/dist/es/a/Popover/common/Divider/index.js +2 -0
- package/dist/es/a/Popover/common/Item/Item.js +47 -0
- package/dist/es/a/Popover/common/Item/index.js +2 -0
- package/dist/es/a/Popover/common/index.js +2 -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/FormInput/FormInput.js +8 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/common/Label/styles.scss +1 -4
- package/dist/es/f/fields/Checkbox/Checkbox.js +99 -0
- package/dist/es/f/fields/Checkbox/index.js +2 -0
- package/dist/es/f/fields/Checkbox/styles.scss +14 -0
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/ChoicesInput/common/Choice/Choice.js +5 -2
- package/dist/es/f/fields/IntlTelInput/IntlTelInput.js +152 -0
- package/dist/es/f/fields/IntlTelInput/index.js +2 -0
- package/dist/es/f/fields/IntlTelInput/styles.scss +37 -0
- package/dist/es/f/fields/PhoneIntlTelInput/PhoneIntlTelInput.js +163 -0
- package/dist/es/f/fields/PhoneIntlTelInput/index.js +2 -0
- package/dist/es/f/fields/PhoneIntlTelInput/styles.scss +43 -0
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +12 -3
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +12 -3
- package/dist/es/f/fields/QuerySelect/styles.scss +21 -0
- package/dist/es/f/fields/RatingsInput/common/Rating/Rating.js +11 -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 +1 -1
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +4 -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/dist/es/f/fields/index.js +2 -1
- package/dist/es/test/QueryLoader/styles.scss +9 -0
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +819 -158
- package/src/stories/f/Checkbox.stories.jsx +95 -0
- package/src/stories/f/ChoicesInput.stories.jsx +38 -10
- package/src/stories/f/FormInput.stories.jsx +5 -0
- package/src/ui/f/FormInput/FormInput.jsx +12 -0
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/common/Label/styles.scss +1 -4
- package/src/ui/f/fields/Checkbox/Checkbox.jsx +118 -0
- package/src/ui/f/fields/Checkbox/index.js +2 -0
- package/src/ui/f/fields/Checkbox/styles.scss +14 -0
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/common/Choice/Choice.jsx +10 -2
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +7 -1
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +7 -1
- package/src/ui/f/fields/RatingsInput/common/Rating/Rating.jsx +7 -1
- package/src/ui/f/fields/index.js +1 -0
- package/dist/cjs/a/ColumnLabel/styles.scss +0 -22
- package/dist/es/a/ColumnLabel/ColumnLabel.js +0 -78
- package/dist/es/a/ColumnLabel/index.js +0 -2
- package/dist/es/a/ColumnLabel/styles.scss +0 -22
|
@@ -47,13 +47,17 @@ var QueryCombobox = _ref => {
|
|
|
47
47
|
extraVariables,
|
|
48
48
|
optionsKeyMap,
|
|
49
49
|
minLength,
|
|
50
|
-
transformSearch
|
|
50
|
+
transformSearch,
|
|
51
|
+
validate // ...otherProps
|
|
51
52
|
|
|
52
53
|
} = _ref;
|
|
53
54
|
(0, React.useLayoutEffect)(() => {
|
|
54
55
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
55
56
|
}, []);
|
|
56
|
-
var [, meta, helpers] = (0, _formik.useField)(
|
|
57
|
+
var [, meta, helpers] = (0, _formik.useField)({
|
|
58
|
+
name,
|
|
59
|
+
validate
|
|
60
|
+
});
|
|
57
61
|
var {
|
|
58
62
|
setValue,
|
|
59
63
|
setError
|
|
@@ -217,7 +221,12 @@ QueryCombobox.propTypes = {
|
|
|
217
221
|
/**
|
|
218
222
|
* The function to transform the search input
|
|
219
223
|
*/
|
|
220
|
-
transformSearch: _propTypes.default.func
|
|
224
|
+
transformSearch: _propTypes.default.func,
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The query combobox field validator function
|
|
228
|
+
*/
|
|
229
|
+
validate: _propTypes.default.func
|
|
221
230
|
};
|
|
222
231
|
QueryCombobox.defaultProps = {
|
|
223
232
|
optionsKeyMap: {
|
|
@@ -41,10 +41,14 @@ var QuerySelect = _ref => {
|
|
|
41
41
|
disabled,
|
|
42
42
|
color,
|
|
43
43
|
loadingOption,
|
|
44
|
-
defaultOption
|
|
44
|
+
defaultOption,
|
|
45
|
+
validate // ...otherProps
|
|
45
46
|
|
|
46
47
|
} = _ref;
|
|
47
|
-
var [,, helpers] = (0, _formik.useField)(
|
|
48
|
+
var [,, helpers] = (0, _formik.useField)({
|
|
49
|
+
name,
|
|
50
|
+
validate
|
|
51
|
+
});
|
|
48
52
|
var {
|
|
49
53
|
setError
|
|
50
54
|
} = helpers;
|
|
@@ -181,7 +185,12 @@ QuerySelect.propTypes = {
|
|
|
181
185
|
value: _propTypes.default.string.isRequired,
|
|
182
186
|
label: _propTypes.default.string.isRequired,
|
|
183
187
|
disabled: _propTypes.default.bool.isRequired
|
|
184
|
-
})
|
|
188
|
+
}),
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The query select field validator function
|
|
192
|
+
*/
|
|
193
|
+
validate: _propTypes.default.func
|
|
185
194
|
};
|
|
186
195
|
QuerySelect.defaultProps = {
|
|
187
196
|
disabled: false,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
@use "@pareto-engineering/bem";
|
|
3
|
+
|
|
4
|
+
$default-loading-circle-displacement: .8em;
|
|
5
|
+
|
|
6
|
+
.#{bem.$base}.query-select {
|
|
7
|
+
position: relative;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
>.#{bem.$base}.select-input {
|
|
11
|
+
select:disabled {
|
|
12
|
+
appearance: none;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
>.#{bem.$base}.loading-circle {
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: $default-loading-circle-displacement;
|
|
19
|
+
bottom: $default-loading-circle-displacement;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -38,12 +38,16 @@ var Rating = _ref => {
|
|
|
38
38
|
ratingId,
|
|
39
39
|
hover,
|
|
40
40
|
setHover,
|
|
41
|
+
validate,
|
|
41
42
|
activeBackgroundColor,
|
|
42
43
|
inactiveBackgroundColor,
|
|
43
44
|
showRatingValue // ...otherProps
|
|
44
45
|
|
|
45
46
|
} = _ref;
|
|
46
|
-
var [field] = (0, _formik.useField)(
|
|
47
|
+
var [field] = (0, _formik.useField)({
|
|
48
|
+
name,
|
|
49
|
+
validate
|
|
50
|
+
});
|
|
47
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
48
52
|
id: id,
|
|
49
53
|
className: [baseClassName, componentClassName, userClassName, "x-".concat(activeBackgroundColor), "y-".concat(inactiveBackgroundColor)].filter(e => e).join(' '),
|
|
@@ -118,7 +122,12 @@ Rating.propTypes = {
|
|
|
118
122
|
/**
|
|
119
123
|
* Determines if the rating start value should be shown
|
|
120
124
|
*/
|
|
121
|
-
showRatingValue: _propTypes.default.bool
|
|
125
|
+
showRatingValue: _propTypes.default.bool,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The rating field validator function
|
|
129
|
+
*/
|
|
130
|
+
validate: _propTypes.default.func
|
|
122
131
|
};
|
|
123
132
|
Rating.defaultProps = {
|
|
124
133
|
activeBackgroundColor: 'main1',
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _formik = require("formik");
|
|
13
|
+
|
|
14
|
+
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
15
|
+
|
|
16
|
+
var _common = require("../../common");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
// Local Definitions
|
|
27
|
+
var baseClassName = _bem.default.base;
|
|
28
|
+
var componentClassName = 'task-recommendation';
|
|
29
|
+
/**
|
|
30
|
+
* This is the component description.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
var TaskRecommendation = _ref => {
|
|
34
|
+
var _field$value;
|
|
35
|
+
|
|
36
|
+
var {
|
|
37
|
+
id,
|
|
38
|
+
className: userClassName,
|
|
39
|
+
style,
|
|
40
|
+
name,
|
|
41
|
+
value,
|
|
42
|
+
oneLiner,
|
|
43
|
+
label,
|
|
44
|
+
color,
|
|
45
|
+
image // ...otherProps
|
|
46
|
+
|
|
47
|
+
} = _ref;
|
|
48
|
+
(0, React.useLayoutEffect)(() => {
|
|
49
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
50
|
+
}, []);
|
|
51
|
+
var [field] = (0, _formik.useField)(name);
|
|
52
|
+
var isOptionSelected = !!(((_field$value = field.value) === null || _field$value === void 0 ? void 0 : _field$value.length) > 0 && field.value.includes(value));
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
id: id,
|
|
55
|
+
className: [baseClassName, componentClassName, userClassName, "x-".concat(color)].filter(e => e).join(' '),
|
|
56
|
+
style: style // {...otherProps}
|
|
57
|
+
|
|
58
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
59
|
+
className: "task-content ".concat(isOptionSelected ? 'b-x' : 'b-on-x')
|
|
60
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: "v1 p-v task"
|
|
62
|
+
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
63
|
+
className: "uc mb-v ".concat(isOptionSelected ? 'c-on-x' : 'c-x'),
|
|
64
|
+
name: name
|
|
65
|
+
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
66
|
+
value: value,
|
|
67
|
+
id: name,
|
|
68
|
+
className: "input",
|
|
69
|
+
type: "checkbox"
|
|
70
|
+
})), /*#__PURE__*/React.createElement("img", {
|
|
71
|
+
className: "image",
|
|
72
|
+
src: image,
|
|
73
|
+
alt: "img"
|
|
74
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
75
|
+
className: ['uc u2 mt-u', isOptionSelected && 'c-on-x'].filter(e => e).join(' ')
|
|
76
|
+
}, oneLiner))));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
TaskRecommendation.propTypes = {
|
|
80
|
+
/**
|
|
81
|
+
* The HTML id for this element
|
|
82
|
+
*/
|
|
83
|
+
id: _propTypes.default.string,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The HTML class names for this element
|
|
87
|
+
*/
|
|
88
|
+
className: _propTypes.default.string,
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The React-written, css properties for this element.
|
|
92
|
+
*/
|
|
93
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The name of the input
|
|
97
|
+
*/
|
|
98
|
+
name: _propTypes.default.string.isRequired,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The value of the input
|
|
102
|
+
*/
|
|
103
|
+
value: _propTypes.default.string.isRequired,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The task one liner description
|
|
107
|
+
*/
|
|
108
|
+
oneLiner: _propTypes.default.string.isRequired,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The task label
|
|
112
|
+
*/
|
|
113
|
+
label: _propTypes.default.string.isRequired,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The color
|
|
117
|
+
*/
|
|
118
|
+
color: _propTypes.default.string,
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Task image
|
|
122
|
+
*/
|
|
123
|
+
image: _propTypes.default.string.isRequired
|
|
124
|
+
};
|
|
125
|
+
TaskRecommendation.defaultProps = {
|
|
126
|
+
color: 'main2'
|
|
127
|
+
};
|
|
128
|
+
var _default = TaskRecommendation;
|
|
129
|
+
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "TaskRecommendation", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _TaskRecommendation.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _TaskRecommendation = _interopRequireDefault(require("./TaskRecommendation"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -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
|
+
|
|
@@ -60,7 +60,7 @@ var TaskRecommendationInput = _ref => {
|
|
|
60
60
|
}, /*#__PURE__*/React.createElement("div", {
|
|
61
61
|
className: "v1 p-v task"
|
|
62
62
|
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
63
|
-
className: "uc mb-v ".concat(isOptionSelected ?
|
|
63
|
+
className: "uc mb-v ".concat(isOptionSelected ? _bem.default.modifierActive : ''),
|
|
64
64
|
name: name
|
|
65
65
|
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
66
66
|
value: value,
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
13
|
+
|
|
14
|
+
var _formik = require("formik");
|
|
15
|
+
|
|
16
|
+
var _common = require("../../common");
|
|
17
|
+
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
|
|
20
|
+
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); }
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
var baseClassName = _bem.default.base;
|
|
27
|
+
var componentClassName = 'text-area';
|
|
28
|
+
/**
|
|
29
|
+
* This is the component description.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
var TextArea = _ref => {
|
|
33
|
+
var {
|
|
34
|
+
id,
|
|
35
|
+
className: userClassName,
|
|
36
|
+
style,
|
|
37
|
+
name,
|
|
38
|
+
label,
|
|
39
|
+
validate,
|
|
40
|
+
labelAsDescription,
|
|
41
|
+
textAreaId,
|
|
42
|
+
rows,
|
|
43
|
+
textAreaColor,
|
|
44
|
+
labelColor,
|
|
45
|
+
description // ...otherProps
|
|
46
|
+
|
|
47
|
+
} = _ref;
|
|
48
|
+
(0, React.useLayoutEffect)(() => {
|
|
49
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
50
|
+
}, []);
|
|
51
|
+
var [field, meta] = (0, _formik.useField)({
|
|
52
|
+
name,
|
|
53
|
+
validate
|
|
54
|
+
});
|
|
55
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
id: id,
|
|
57
|
+
className: [baseClassName, componentClassName, userClassName, "x-".concat(textAreaColor), "y-".concat(labelColor)].filter(e => e).join(' '),
|
|
58
|
+
style: style // {...otherProps}
|
|
59
|
+
|
|
60
|
+
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
61
|
+
className: ['c-y', labelAsDescription ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
62
|
+
name: name
|
|
63
|
+
}, label), /*#__PURE__*/React.createElement("textarea", _extends({
|
|
64
|
+
id: textAreaId,
|
|
65
|
+
className: "textarea v50 pv-v ".concat(meta.touched && meta.error ? 'input-border-error' : 'input-border')
|
|
66
|
+
}, field, {
|
|
67
|
+
rows: rows
|
|
68
|
+
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
69
|
+
isError: !!meta.error,
|
|
70
|
+
className: "v50 mt-v s-1"
|
|
71
|
+
}, meta.error || description), ' ');
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
TextArea.propTypes = {
|
|
75
|
+
/**
|
|
76
|
+
* The HTML id for this element
|
|
77
|
+
*/
|
|
78
|
+
id: _propTypes.default.string,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The HTML class names for this element
|
|
82
|
+
*/
|
|
83
|
+
className: _propTypes.default.string,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The React-written, css properties for this element.
|
|
87
|
+
*/
|
|
88
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The input name (html - and Formik state)
|
|
92
|
+
*/
|
|
93
|
+
name: _propTypes.default.string.isRequired,
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The input label
|
|
97
|
+
*/
|
|
98
|
+
label: _propTypes.default.string.isRequired,
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* The input value validator function
|
|
102
|
+
*/
|
|
103
|
+
validate: _propTypes.default.func,
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* If the text area depends on it's label's text as the default description
|
|
107
|
+
*/
|
|
108
|
+
labelAsDescription: _propTypes.default.bool,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* The textarea id
|
|
112
|
+
*/
|
|
113
|
+
textAreaId: _propTypes.default.string,
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The number of rows int the text area
|
|
117
|
+
*/
|
|
118
|
+
rows: _propTypes.default.number,
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Text area base color
|
|
122
|
+
*/
|
|
123
|
+
textAreaColor: _propTypes.default.string,
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Label base color
|
|
127
|
+
*/
|
|
128
|
+
labelColor: _propTypes.default.string,
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Text area description
|
|
132
|
+
*/
|
|
133
|
+
description: _propTypes.default.string
|
|
134
|
+
};
|
|
135
|
+
TextArea.defaultProps = {
|
|
136
|
+
rows: 3,
|
|
137
|
+
textAreaColor: 'background',
|
|
138
|
+
labelColor: 'main1'
|
|
139
|
+
};
|
|
140
|
+
var _default = TextArea;
|
|
141
|
+
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "TextArea", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _TextArea.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _TextArea = _interopRequireDefault(require("./TextArea"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -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
|
+
|
|
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "QuerySelect", {
|
|
|
45
45
|
return _QuerySelect.QuerySelect;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "Checkbox", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _Checkbox.Checkbox;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
|
|
49
55
|
var _TextInput = require("./TextInput");
|
|
50
56
|
|
|
@@ -58,4 +64,6 @@ var _RatingsInput = require("./RatingsInput");
|
|
|
58
64
|
|
|
59
65
|
var _QueryCombobox = require("./QueryCombobox");
|
|
60
66
|
|
|
61
|
-
var _QuerySelect = require("./QuerySelect");
|
|
67
|
+
var _QuerySelect = require("./QuerySelect");
|
|
68
|
+
|
|
69
|
+
var _Checkbox = require("./Checkbox");
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useLayoutEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem'; // Local Definitions
|
|
6
|
+
|
|
7
|
+
const baseClassName = styleNames.base;
|
|
8
|
+
const componentClassName = 'gradient-background';
|
|
9
|
+
/**
|
|
10
|
+
* This is the component description.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const GradientBackground = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
style,
|
|
17
|
+
pin,
|
|
18
|
+
shape,
|
|
19
|
+
height,
|
|
20
|
+
width // ...otherProps
|
|
21
|
+
|
|
22
|
+
}) => {
|
|
23
|
+
useLayoutEffect(() => {
|
|
24
|
+
import("./styles.scss");
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
id: id,
|
|
28
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
29
|
+
style: { ...style,
|
|
30
|
+
'--pin': pin,
|
|
31
|
+
'--height': height,
|
|
32
|
+
'--width': width
|
|
33
|
+
} // {...otherProps}
|
|
34
|
+
|
|
35
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: "shapes"
|
|
37
|
+
}, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "triangle"
|
|
39
|
+
}), shape === 'half-ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "half-ellipses"
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: "up"
|
|
43
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "down"
|
|
45
|
+
})), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "ellipse"
|
|
47
|
+
}), shape === 'diamonds' && /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "diamonds"
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: "top-right"
|
|
51
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: "bottom-left"
|
|
53
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "bottom-right"
|
|
55
|
+
})), shape === 'rectangles' && /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: "rectangles"
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: "top"
|
|
59
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
className: "center"
|
|
61
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: "bottom"
|
|
63
|
+
})), shape === 'half-ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: "half-ellipse"
|
|
65
|
+
}), shape === 'circle' && /*#__PURE__*/React.createElement("div", {
|
|
66
|
+
className: "circle"
|
|
67
|
+
}), shape === 'half-circle' && /*#__PURE__*/React.createElement("div", {
|
|
68
|
+
className: "half-circle"
|
|
69
|
+
}), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
70
|
+
className: "ellipses"
|
|
71
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: "first"
|
|
73
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: "second"
|
|
75
|
+
})), shape === 'spiral' && /*#__PURE__*/React.createElement("div", {
|
|
76
|
+
className: "spiral"
|
|
77
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: "quater-circle-one"
|
|
79
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: "quater-circle-two"
|
|
81
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: "quater-circle-three"
|
|
83
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: "quater-circle-four"
|
|
85
|
+
}))));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
GradientBackground.propTypes = {
|
|
89
|
+
/**
|
|
90
|
+
* The HTML id for this element
|
|
91
|
+
*/
|
|
92
|
+
id: PropTypes.string,
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The HTML class names for this element
|
|
96
|
+
*/
|
|
97
|
+
className: PropTypes.string,
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The React-written, css properties for this element.
|
|
101
|
+
*/
|
|
102
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Where to pin the shapes
|
|
106
|
+
*/
|
|
107
|
+
pin: PropTypes.oneOf(['flex-start', 'center', 'flex-end']),
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* The options of a shape to use
|
|
111
|
+
*/
|
|
112
|
+
shape: PropTypes.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles'])
|
|
113
|
+
};
|
|
114
|
+
GradientBackground.defaultProps = {
|
|
115
|
+
pin: 'center',
|
|
116
|
+
shape: 'triangle'
|
|
117
|
+
};
|
|
118
|
+
export default GradientBackground;
|