@pareto-engineering/design-system 2.0.0-alpha.23 → 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.
Files changed (46) hide show
  1. package/dist/cjs/a/BackgroundGradient/styles.scss +1 -1
  2. package/dist/cjs/a/GradientBackground/GradientBackground.js +140 -0
  3. package/dist/cjs/a/GradientBackground/index.js +15 -0
  4. package/dist/cjs/a/GradientBackground/styles.scss +191 -0
  5. package/dist/cjs/a/SVG/SVG.js +9 -3
  6. package/dist/cjs/a/Shapes/styles.scss +9 -9
  7. package/dist/cjs/b/Logo/Logo.js +11 -40
  8. package/dist/cjs/b/Logo/styles.scss +0 -138
  9. package/dist/cjs/{a/RatingsInput/RatingsInput.js → experimental/GradientBackground/GradientBackground.js} +37 -27
  10. package/dist/cjs/experimental/GradientBackground/index.js +15 -0
  11. package/dist/cjs/experimental/GradientBackground/styles.scss +64 -0
  12. package/dist/cjs/experimental/index.js +13 -0
  13. package/dist/cjs/f/fields/SelectInput/SelectInput.js +1 -2
  14. package/dist/es/a/BackgroundGradient/styles.scss +1 -1
  15. package/dist/es/a/GradientBackground/GradientBackground.js +118 -0
  16. package/dist/es/a/GradientBackground/index.js +2 -0
  17. package/dist/es/a/GradientBackground/styles.scss +191 -0
  18. package/dist/es/a/SVG/SVG.js +1 -1
  19. package/dist/es/a/Shapes/styles.scss +9 -9
  20. package/dist/es/b/Logo/Logo.js +11 -40
  21. package/dist/es/b/Logo/styles.scss +0 -138
  22. package/dist/es/experimental/GradientBackground/GradientBackground.js +76 -0
  23. package/dist/es/experimental/GradientBackground/index.js +2 -0
  24. package/dist/es/experimental/GradientBackground/styles.scss +64 -0
  25. package/dist/es/experimental/index.js +1 -0
  26. package/dist/es/f/fields/SelectInput/SelectInput.js +1 -2
  27. package/package.json +2 -2
  28. package/src/__snapshots__/Storyshots.test.js.snap +226 -1050
  29. package/src/stories/b/Logo.stories.jsx +9 -9
  30. package/src/ui/a/BackgroundGradient/styles.scss +1 -1
  31. package/src/ui/a/SVG/SVG.jsx +1 -1
  32. package/src/ui/a/Shapes/styles.scss +9 -9
  33. package/src/ui/b/Logo/Logo.jsx +11 -48
  34. package/src/ui/b/Logo/styles.scss +0 -138
  35. package/src/ui/f/fields/SelectInput/SelectInput.jsx +0 -1
  36. package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
  37. package/dist/cjs/a/RatingsInput/common/Rating/index.js +0 -15
  38. package/dist/cjs/a/RatingsInput/common/index.js +0 -13
  39. package/dist/cjs/a/RatingsInput/index.js +0 -15
  40. package/dist/cjs/a/RatingsInput/styles.scss +0 -35
  41. package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
  42. package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
  43. package/dist/es/a/RatingsInput/common/Rating/index.js +0 -2
  44. package/dist/es/a/RatingsInput/common/index.js +0 -1
  45. package/dist/es/a/RatingsInput/index.js +0 -2
  46. package/dist/es/a/RatingsInput/styles.scss +0 -35
@@ -1,102 +0,0 @@
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 PropTypes from 'prop-types';
6
- import { useField } from 'formik';
7
- import styleNames from '@pareto-engineering/bem'; // Local Definitions
8
-
9
- const baseClassName = styleNames.base;
10
- const componentClassName = 'rating';
11
- /**
12
- * This is the component description.
13
- */
14
-
15
- const Rating = ({
16
- id,
17
- className: userClassName,
18
- style,
19
- value,
20
- name,
21
- ratingId,
22
- hover,
23
- setHover,
24
- activeBackgroundColor,
25
- inactiveBackgroundColor // ...otherProps
26
-
27
- }) => {
28
- const [field] = useField(name);
29
- return /*#__PURE__*/React.createElement("div", {
30
- id: id,
31
- className: [baseClassName, componentClassName, userClassName, `x-${activeBackgroundColor}`, `y-${inactiveBackgroundColor}`].filter(e => e).join(' '),
32
- style: style
33
- }, /*#__PURE__*/React.createElement("label", {
34
- htmlFor: ratingId,
35
- onMouseEnter: () => setHover(value),
36
- onMouseLeave: () => setHover(null)
37
- }, ' ', /*#__PURE__*/React.createElement("span", {
38
- className: ['f-icons', value <= (hover || Number(field.value)) ? 'c-x' : 'c-dark-y'].filter(e => e).join(' ')
39
- }, "[")), /*#__PURE__*/React.createElement("input", _extends({}, field, {
40
- type: "radio",
41
- id: ratingId,
42
- name: name,
43
- value: value
44
- })));
45
- };
46
-
47
- Rating.propTypes = {
48
- /**
49
- * The HTML id for this element
50
- */
51
- id: PropTypes.string,
52
-
53
- /**
54
- * The HTML class names for this element
55
- */
56
- className: PropTypes.string,
57
-
58
- /**
59
- * The React-written, css properties for this element.
60
- */
61
- style: PropTypes.objectOf(PropTypes.string),
62
-
63
- /**
64
- * The value of each an every rating star
65
- */
66
- value: PropTypes.number,
67
-
68
- /**
69
- * The current hover value
70
- */
71
- hover: PropTypes.number,
72
-
73
- /**
74
- * Function to update the hover value
75
- */
76
- setHover: PropTypes.func,
77
-
78
- /**
79
- * Unique Id for each rating star
80
- */
81
- ratingId: PropTypes.string,
82
-
83
- /**
84
- * Name of the rating input
85
- */
86
- name: PropTypes.string,
87
-
88
- /**
89
- * The start rating backgriund color when hovered or clicked
90
- */
91
- activeBackgroundColor: PropTypes.string,
92
-
93
- /**
94
- * The start rating backgriund color when not hovered and not clicked
95
- */
96
- inactiveBackgroundColor: PropTypes.string
97
- };
98
- Rating.defaultProps = {
99
- activeBackgroundColor: 'secondary2',
100
- inactiveBackgroundColor: 'background'
101
- };
102
- export default Rating;
@@ -1,2 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- export { default as Rating } from "./Rating";
@@ -1 +0,0 @@
1
- export { Rating } from "./Rating";
@@ -1,2 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- export { default as RatingsInput } from "./RatingsInput";
@@ -1,35 +0,0 @@
1
- /* @pareto-engineering/generator-front 1.0.12 */
2
- @use "@pareto-engineering/bem";
3
-
4
- $default-rating-icon-margin: .5em;
5
- $default-padding: .2em;
6
- $default-transition: all .2s;
7
-
8
- .#{bem.$base}.ratings-input {
9
- display: flex;
10
-
11
- >:not(:first-child) {
12
- margin-left: $default-rating-icon-margin;
13
- }
14
-
15
- .#{bem.$base}.rating {
16
- display: flex;
17
-
18
- input {
19
- opacity: 0;
20
- position: absolute;
21
- visibility: none;
22
- z-index: -1;
23
- }
24
-
25
- label {
26
- padding: $default-padding;
27
- transition: $default-transition;
28
- cursor: pointer;
29
- }
30
- }
31
- }
32
-
33
-
34
-
35
-