@pareto-engineering/design-system 2.0.0-alpha.4 → 2.0.0-alpha.42
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/BackgroundGradient/BackgroundGradient.js +77 -0
- package/dist/cjs/a/BackgroundGradient/index.js +15 -0
- package/dist/cjs/a/BackgroundGradient/styles.scss +16 -0
- package/dist/cjs/a/ContentTree/ContentTree.js +83 -0
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +116 -0
- package/dist/cjs/a/ContentTree/common/Tree/index.js +15 -0
- package/dist/cjs/a/ContentTree/common/index.js +31 -0
- package/dist/cjs/a/ContentTree/common/useContentTree.js +82 -0
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +65 -0
- package/dist/cjs/a/ContentTree/index.js +15 -0
- package/dist/cjs/a/ContentTree/styles.scss +33 -0
- package/dist/cjs/a/Conversation/Conversation.js +14 -8
- package/dist/cjs/a/Conversation/common/Message/Message.js +32 -6
- package/dist/cjs/a/Conversation/styles.scss +132 -33
- package/dist/cjs/a/OvalIllustration/OvalIllustration.js +133 -0
- package/dist/cjs/a/OvalIllustration/index.js +15 -0
- package/dist/cjs/a/OvalIllustration/styles.scss +102 -0
- package/dist/cjs/a/Popover/Popover.js +134 -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/a/Popover/index.js +15 -0
- package/dist/cjs/a/Popover/styles.scss +43 -0
- package/dist/cjs/a/Shapes/Shapes.js +39 -9
- package/dist/cjs/a/Shapes/styles.scss +78 -22
- package/dist/cjs/a/SnapScroller/SnapScroller.js +77 -0
- package/dist/cjs/a/SnapScroller/index.js +15 -0
- package/dist/cjs/a/SnapScroller/styles.scss +38 -0
- package/dist/cjs/a/index.js +49 -1
- package/dist/cjs/b/Button/Button.js +10 -4
- package/dist/cjs/b/Button/styles.scss +55 -10
- package/dist/cjs/b/Logo/Logo.js +41 -41
- package/dist/cjs/b/Logo/styles.scss +0 -138
- package/dist/cjs/b/Page/common/Section/Section.js +56 -5
- package/dist/cjs/b/Page/styles.scss +8 -2
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/cjs/c/ContentSlides/styles.scss +10 -4
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +105 -0
- package/dist/cjs/c/SocialMediaShareButton/index.js +15 -0
- package/dist/cjs/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/cjs/c/index.js +9 -1
- package/dist/cjs/f/common/Debugger/Debugger.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +1 -1
- package/dist/cjs/f/common/Label/styles.scss +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +39 -6
- package/dist/cjs/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +36 -10
- package/dist/cjs/f/fields/SelectInput/styles.scss +13 -8
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +35 -7
- package/dist/cjs/f/fields/TextInput/styles.scss +16 -7
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/cjs/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/cjs/f/fields/index.js +0 -24
- package/dist/cjs/form-reset.scss +1 -1
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/utils/hooks/index.js +23 -0
- package/dist/cjs/utils/hooks/useDynamicPosition.js +107 -0
- package/dist/cjs/utils/hooks/useWindowSize.js +39 -0
- package/dist/cjs/utils/index.js +19 -0
- package/dist/es/a/BackgroundGradient/BackgroundGradient.js +55 -0
- package/dist/es/a/BackgroundGradient/index.js +2 -0
- package/dist/es/a/BackgroundGradient/styles.scss +16 -0
- package/dist/es/a/ContentTree/ContentTree.js +67 -0
- package/dist/es/a/ContentTree/common/Tree/Tree.js +98 -0
- package/dist/es/a/ContentTree/common/Tree/index.js +2 -0
- package/dist/es/a/ContentTree/common/index.js +3 -0
- package/dist/es/a/ContentTree/common/useContentTree.js +74 -0
- package/dist/es/a/ContentTree/common/useFirstVisibleNode.js +54 -0
- package/dist/es/a/ContentTree/index.js +2 -0
- package/dist/es/a/ContentTree/styles.scss +33 -0
- package/dist/es/a/Conversation/Conversation.js +14 -8
- package/dist/es/a/Conversation/common/Message/Message.js +32 -6
- package/dist/es/a/Conversation/styles.scss +132 -33
- package/dist/es/a/OvalIllustration/OvalIllustration.js +111 -0
- package/dist/es/a/OvalIllustration/index.js +2 -0
- package/dist/es/a/OvalIllustration/styles.scss +102 -0
- package/dist/es/a/Popover/Popover.js +118 -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/a/Popover/index.js +2 -0
- package/dist/es/a/Popover/styles.scss +43 -0
- package/dist/es/a/Shapes/Shapes.js +39 -9
- package/dist/es/a/Shapes/styles.scss +78 -22
- package/dist/es/a/SnapScroller/SnapScroller.js +61 -0
- package/dist/es/a/SnapScroller/index.js +2 -0
- package/dist/es/a/SnapScroller/styles.scss +38 -0
- package/dist/es/a/index.js +7 -1
- package/dist/es/b/Button/Button.js +8 -2
- package/dist/es/b/Button/styles.scss +55 -10
- package/dist/es/b/Logo/Logo.js +41 -41
- package/dist/es/b/Logo/styles.scss +0 -138
- package/dist/es/b/Page/common/Section/Section.js +55 -4
- package/dist/es/b/Page/styles.scss +8 -2
- package/dist/es/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +16 -9
- package/dist/es/c/ContentSlides/common/Navigator/Navigator.js +4 -3
- package/dist/es/c/ContentSlides/styles.scss +10 -4
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +89 -0
- package/dist/es/c/SocialMediaShareButton/index.js +2 -0
- package/dist/es/c/SocialMediaShareButton/styles.scss +39 -0
- package/dist/es/c/index.js +2 -1
- package/dist/es/f/common/Debugger/Debugger.js +1 -1
- package/dist/es/f/common/Label/Label.js +1 -1
- package/dist/es/f/common/Label/styles.scss +1 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +1 -1
- package/dist/es/f/fields/ChoicesInput/styles.scss +17 -2
- package/dist/es/f/fields/RatingsInput/RatingsInput.js +38 -6
- package/dist/es/f/fields/RatingsInput/styles.scss +29 -20
- package/dist/es/f/fields/SelectInput/SelectInput.js +36 -10
- package/dist/es/f/fields/SelectInput/styles.scss +13 -8
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TextInput/TextInput.js +35 -7
- package/dist/es/f/fields/TextInput/styles.scss +16 -7
- package/dist/es/f/fields/TextareaInput/TextareaInput.js +15 -8
- package/dist/es/f/fields/TextareaInput/styles.scss +19 -6
- package/dist/es/f/fields/index.js +0 -3
- package/dist/es/form-reset.scss +1 -1
- package/dist/es/index.js +2 -1
- package/dist/es/utils/hooks/index.js +2 -0
- package/dist/es/utils/hooks/useDynamicPosition.js +93 -0
- package/dist/es/utils/hooks/useWindowSize.js +27 -0
- package/dist/es/utils/index.js +1 -0
- package/package.json +4 -3
- package/src/__snapshots__/Storyshots.test.js.snap +4755 -1734
- package/src/local.scss +2 -0
- package/src/stories/StyleGuide/Sprites.stories.mdx +25 -0
- package/src/stories/StyleGuide/helpers.js +16 -0
- package/src/stories/a/BackgroundGradient.stories.jsx +38 -0
- package/src/stories/a/ContentTree.stories.jsx +662 -0
- package/src/stories/a/Conversation.stories.jsx +78 -1
- package/src/stories/a/OvalIllustration.stories.jsx +59 -0
- package/src/stories/a/Popover.stories.jsx +106 -0
- package/src/stories/a/Shapes.stories.jsx +143 -0
- package/src/stories/a/SnapScroller.stories.jsx +98 -0
- package/src/stories/b/Button.stories.jsx +27 -4
- package/src/stories/b/Logo.stories.jsx +17 -9
- package/src/stories/b/Page.stories.jsx +51 -1
- package/src/stories/c/ContentSlides.stories.jsx +154 -2
- package/src/stories/c/SocialMediaShareButton.stories.jsx +25 -0
- package/src/stories/f/RatingsInput.stories.jsx +3 -2
- package/src/stories/f/SelectInput.stories.jsx +36 -5
- package/src/stories/f/TextInput.stories.jsx +15 -4
- package/src/stories/f/TextareaInput.stories.jsx +42 -6
- package/src/stories/utils/lorem.js +15 -0
- package/src/ui/a/BackgroundGradient/BackgroundGradient.jsx +76 -0
- package/src/ui/a/BackgroundGradient/index.js +2 -0
- package/src/ui/a/BackgroundGradient/styles.scss +16 -0
- package/src/ui/a/ContentTree/ContentTree.jsx +88 -0
- package/src/ui/a/ContentTree/common/Tree/Tree.jsx +138 -0
- package/src/ui/a/ContentTree/common/Tree/index.js +2 -0
- package/src/ui/a/ContentTree/common/index.js +3 -0
- package/src/ui/a/ContentTree/common/useContentTree.js +83 -0
- package/src/ui/a/ContentTree/common/useFirstVisibleNode.js +59 -0
- package/src/ui/a/ContentTree/index.js +2 -0
- package/src/ui/a/ContentTree/styles.scss +33 -0
- package/src/ui/a/Conversation/Conversation.jsx +15 -7
- package/src/ui/a/Conversation/common/Message/Message.jsx +38 -6
- package/src/ui/a/Conversation/styles.scss +132 -33
- package/src/ui/a/OvalIllustration/OvalIllustration.jsx +134 -0
- package/src/ui/a/OvalIllustration/index.js +2 -0
- package/src/ui/a/OvalIllustration/styles.scss +102 -0
- package/src/ui/a/Popover/Popover.jsx +157 -0
- package/src/ui/a/Popover/index.js +2 -0
- package/src/ui/a/Popover/styles.scss +43 -0
- package/src/ui/a/Shapes/Shapes.jsx +191 -0
- package/src/ui/a/Shapes/index.js +2 -0
- package/src/ui/a/Shapes/styles.scss +255 -0
- package/src/ui/a/SnapScroller/SnapScroller.jsx +83 -0
- package/src/ui/a/SnapScroller/index.js +2 -0
- package/src/ui/a/SnapScroller/styles.scss +38 -0
- package/src/ui/a/index.js +6 -0
- package/src/ui/b/Button/Button.jsx +9 -1
- package/src/ui/b/Button/styles.scss +55 -10
- package/src/ui/b/Logo/Logo.jsx +41 -41
- package/src/ui/b/Logo/styles.scss +0 -138
- package/src/ui/b/Page/common/Section/Section.jsx +68 -2
- package/src/ui/b/Page/styles.scss +8 -2
- package/src/ui/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.jsx +12 -5
- package/src/ui/c/ContentSlides/common/Navigator/Navigator.jsx +3 -2
- package/src/ui/c/ContentSlides/styles.scss +10 -4
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +113 -0
- package/src/ui/c/SocialMediaShareButton/index.js +2 -0
- package/src/ui/c/SocialMediaShareButton/styles.scss +39 -0
- package/src/ui/c/index.js +1 -0
- package/src/ui/f/common/Debugger/Debugger.jsx +1 -1
- package/src/ui/f/common/Label/Label.jsx +1 -1
- package/src/ui/f/common/Label/styles.scss +1 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +1 -1
- package/src/ui/f/fields/ChoicesInput/styles.scss +17 -2
- package/src/ui/f/fields/RatingsInput/RatingsInput.jsx +54 -19
- package/src/ui/f/fields/RatingsInput/styles.scss +29 -20
- package/src/ui/f/fields/SelectInput/SelectInput.jsx +43 -5
- package/src/ui/f/fields/SelectInput/styles.scss +13 -8
- package/src/ui/f/fields/TextInput/TextInput.jsx +31 -3
- package/src/ui/f/fields/TextInput/styles.scss +16 -7
- package/src/ui/f/fields/TextareaInput/TextareaInput.jsx +24 -13
- package/src/ui/f/fields/TextareaInput/styles.scss +19 -6
- package/src/ui/f/fields/index.js +0 -3
- package/src/ui/form-reset.scss +1 -1
- package/src/ui/index.js +1 -0
- package/src/ui/utils/hooks/index.js +2 -0
- package/src/ui/utils/hooks/useDynamicPosition.js +104 -0
- package/src/ui/utils/hooks/useWindowSize.js +32 -0
- package/src/ui/utils/index.js +1 -0
- package/stylelint.config.js +13 -13
- package/src/stories/f/CheckboxInput.stories.jsx +0 -37
- package/src/stories/f/RadioInput.stories.jsx +0 -37
- package/src/stories/f/TaskRecommendationInput.stories.jsx +0 -38
- package/src/ui/f/fields/CheckboxInput/CheckboxInput.jsx +0 -107
- package/src/ui/f/fields/CheckboxInput/index.js +0 -2
- package/src/ui/f/fields/CheckboxInput/styles.scss +0 -28
- package/src/ui/f/fields/RadioInput/RadioInput.jsx +0 -112
- package/src/ui/f/fields/RadioInput/index.js +0 -2
- package/src/ui/f/fields/RadioInput/styles.scss +0 -26
- package/src/ui/f/fields/TaskRecommendationInput/TaskRecommendationInput.jsx +0 -130
- package/src/ui/f/fields/TaskRecommendationInput/index.js +0 -2
- package/src/ui/f/fields/TaskRecommendationInput/styles.scss +0 -41
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
19
|
+
|
|
20
|
+
// Local Definitions
|
|
21
|
+
var baseClassName = _bem.default.base;
|
|
22
|
+
var componentClassName = 'social-media-share-button';
|
|
23
|
+
/**
|
|
24
|
+
* This is the component description.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
var SocialMediaShareButton = _ref => {
|
|
28
|
+
var {
|
|
29
|
+
id,
|
|
30
|
+
className: userClassName,
|
|
31
|
+
style,
|
|
32
|
+
icon,
|
|
33
|
+
// children,
|
|
34
|
+
type,
|
|
35
|
+
color
|
|
36
|
+
} = _ref;
|
|
37
|
+
(0, React.useLayoutEffect)(() => {
|
|
38
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
39
|
+
}, []);
|
|
40
|
+
var isServer = typeof window === 'undefined';
|
|
41
|
+
var title = isServer ? '' : document.title;
|
|
42
|
+
var link = isServer ? '' : window.location.href;
|
|
43
|
+
var defaultsMap = {
|
|
44
|
+
facebook: {
|
|
45
|
+
icon: 'f',
|
|
46
|
+
link: "https://www.facebook.com/sharer/sharer.php?u=".concat(link, ""e=").concat(title)
|
|
47
|
+
},
|
|
48
|
+
twitter: {
|
|
49
|
+
icon: 't',
|
|
50
|
+
link: "https://twitter.com/intent/tweet?text=".concat(title, "&url=").concat(link)
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
54
|
+
href: defaultsMap[type].link,
|
|
55
|
+
target: "_blank",
|
|
56
|
+
rel: "noreferrer",
|
|
57
|
+
id: id,
|
|
58
|
+
className: [baseClassName, componentClassName, "x-".concat(color || type), userClassName].filter(e => e).join(' '),
|
|
59
|
+
style: style
|
|
60
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
61
|
+
type: "button"
|
|
62
|
+
}, icon || defaultsMap[type].icon));
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
SocialMediaShareButton.propTypes = {
|
|
66
|
+
/**
|
|
67
|
+
* The HTML id for this element
|
|
68
|
+
*/
|
|
69
|
+
id: _propTypes.default.string,
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* The HTML class names for this element
|
|
73
|
+
*/
|
|
74
|
+
className: _propTypes.default.string,
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The React-written, css properties for this element.
|
|
78
|
+
*/
|
|
79
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The children JSX
|
|
83
|
+
*/
|
|
84
|
+
// children:PropTypes.node,
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The Social Media to Target.
|
|
88
|
+
* If blank, you need to provide both an icon letter (from glyphter) and a link.
|
|
89
|
+
*/
|
|
90
|
+
type: _propTypes.default.oneOf(['twitter', 'facebook']),
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The icon of the social media
|
|
94
|
+
*/
|
|
95
|
+
icon: _propTypes.default.string,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* The button color
|
|
99
|
+
*/
|
|
100
|
+
color: _propTypes.default.string
|
|
101
|
+
};
|
|
102
|
+
SocialMediaShareButton.defaultProps = {// someProp:false
|
|
103
|
+
};
|
|
104
|
+
var _default = SocialMediaShareButton;
|
|
105
|
+
exports.default = _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "SocialMediaShareButton", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _SocialMediaShareButton.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
var _SocialMediaShareButton = _interopRequireDefault(require("./SocialMediaShareButton"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
@use "@aztlan/stylebook/src/mixins";
|
|
5
|
+
@use "@aztlan/stylebook/src/globals" as *;
|
|
6
|
+
|
|
7
|
+
$default-dimensions: 2em;
|
|
8
|
+
$mobile-dimensions: 2.75em;
|
|
9
|
+
|
|
10
|
+
.#{bem.$base}.social-media-share-button{
|
|
11
|
+
|
|
12
|
+
> button {
|
|
13
|
+
appearance: none;
|
|
14
|
+
background: transparent;
|
|
15
|
+
border: 0;
|
|
16
|
+
border-radius: 3em;
|
|
17
|
+
color: var(--x);
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
font-family: "icons", sans-serif;
|
|
20
|
+
height: $default-dimensions;
|
|
21
|
+
transition: all .3s;
|
|
22
|
+
width: $default-dimensions;
|
|
23
|
+
|
|
24
|
+
@include mixins.media($to:$sm-md) {
|
|
25
|
+
height: $mobile-dimensions;
|
|
26
|
+
width: $mobile-dimensions;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--x);
|
|
31
|
+
color: var(--on-x);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:focus, &:active {
|
|
35
|
+
background: var(--light-x);
|
|
36
|
+
color: var(--on-x);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
package/dist/cjs/c/index.js
CHANGED
|
@@ -27,9 +27,17 @@ Object.defineProperty(exports, "Shortener", {
|
|
|
27
27
|
return _Shortener.Shortener;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "SocialMediaShareButton", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _SocialMediaShareButton.SocialMediaShareButton;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
|
|
31
37
|
var _Hero = require("./Hero");
|
|
32
38
|
|
|
33
39
|
var _ContentSlides = require("./ContentSlides");
|
|
34
40
|
|
|
35
|
-
var _Shortener = require("./Shortener");
|
|
41
|
+
var _Shortener = require("./Shortener");
|
|
42
|
+
|
|
43
|
+
var _SocialMediaShareButton = require("./SocialMediaShareButton");
|
|
@@ -47,7 +47,7 @@ var Debugger = _ref => {
|
|
|
47
47
|
style: style
|
|
48
48
|
}, /*#__PURE__*/React.createElement(_b.Button, {
|
|
49
49
|
onClick: toggleDebugger,
|
|
50
|
-
color: "
|
|
50
|
+
color: "main2"
|
|
51
51
|
}, isOpen ? 'Close FormDebugger' : 'Open FormDebugger'), isOpen && /*#__PURE__*/React.createElement("pre", {
|
|
52
52
|
className: "debuger-content"
|
|
53
53
|
}, JSON.stringify(formikContext, null, 2)));
|
|
@@ -29,10 +29,21 @@ $default-transition:all .3s;
|
|
|
29
29
|
z-index: -1;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
input:disabled + label {
|
|
33
|
+
background-color: var(--dark-x);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
input:not(:disabled) + label {
|
|
37
|
+
&:hover {
|
|
38
|
+
border-color: var(--light-y);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
32
42
|
label {
|
|
33
|
-
|
|
34
|
-
|
|
43
|
+
border: var(--theme-border-style) var(--dark-x);
|
|
44
|
+
background: var(--light-x);
|
|
35
45
|
color: var(--on-x);
|
|
46
|
+
border-radius: var(--theme-border-radius);
|
|
36
47
|
display: block;
|
|
37
48
|
height: 100%;
|
|
38
49
|
padding: $default-padding;
|
|
@@ -44,6 +55,10 @@ $default-transition:all .3s;
|
|
|
44
55
|
input:checked + label {
|
|
45
56
|
background: var(--y);
|
|
46
57
|
color: var(--on-y);
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
border-color: var(--y);
|
|
61
|
+
}
|
|
47
62
|
}
|
|
48
63
|
}
|
|
49
64
|
}
|
|
@@ -13,6 +13,8 @@ var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
|
13
13
|
|
|
14
14
|
var _common = require("./common");
|
|
15
15
|
|
|
16
|
+
var _common2 = require("../../common");
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
20
|
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); }
|
|
@@ -33,9 +35,13 @@ var RatingsInput = _ref => {
|
|
|
33
35
|
name,
|
|
34
36
|
ratingCount,
|
|
35
37
|
showRatingValue,
|
|
38
|
+
oneInputLabel,
|
|
39
|
+
label,
|
|
40
|
+
labelColor,
|
|
36
41
|
labelMax,
|
|
37
42
|
labelMin,
|
|
38
|
-
displayRatingsLabel
|
|
43
|
+
displayRatingsLabel,
|
|
44
|
+
optional // ...otherProps
|
|
39
45
|
|
|
40
46
|
} = _ref;
|
|
41
47
|
(0, React.useLayoutEffect)(() => {
|
|
@@ -45,8 +51,14 @@ var RatingsInput = _ref => {
|
|
|
45
51
|
return /*#__PURE__*/React.createElement("div", {
|
|
46
52
|
id: id,
|
|
47
53
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
48
|
-
style: style
|
|
49
|
-
|
|
54
|
+
style: style
|
|
55
|
+
}, /*#__PURE__*/React.createElement(_common2.FormLabel, {
|
|
56
|
+
className: ['input-label', oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
57
|
+
name: name,
|
|
58
|
+
color: labelColor,
|
|
59
|
+
optional: optional
|
|
60
|
+
}, label), /*#__PURE__*/React.createElement("div", {
|
|
61
|
+
className: "stars"
|
|
50
62
|
}, displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
|
|
51
63
|
className: "label-text md-s-1 s-2 x-metadata c-x"
|
|
52
64
|
}, labelMin), [...Array(ratingCount)].map((_, index) => {
|
|
@@ -62,7 +74,7 @@ var RatingsInput = _ref => {
|
|
|
62
74
|
});
|
|
63
75
|
}), displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
|
|
64
76
|
className: "label-text md-s-1 s-2 x-metadata c-x"
|
|
65
|
-
}, labelMax));
|
|
77
|
+
}, labelMax)));
|
|
66
78
|
};
|
|
67
79
|
|
|
68
80
|
RatingsInput.propTypes = {
|
|
@@ -96,6 +108,11 @@ RatingsInput.propTypes = {
|
|
|
96
108
|
*/
|
|
97
109
|
showRatingValue: _propTypes.default.bool,
|
|
98
110
|
|
|
111
|
+
/**
|
|
112
|
+
* The label of the ratings input
|
|
113
|
+
*/
|
|
114
|
+
label: _propTypes.default.string.isRequired,
|
|
115
|
+
|
|
99
116
|
/**
|
|
100
117
|
* description for the highest rating value
|
|
101
118
|
*/
|
|
@@ -109,11 +126,27 @@ RatingsInput.propTypes = {
|
|
|
109
126
|
/**
|
|
110
127
|
* If the rating lables should be shown
|
|
111
128
|
*/
|
|
112
|
-
displayRatingsLabel: _propTypes.default.bool
|
|
129
|
+
displayRatingsLabel: _propTypes.default.bool,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Whether the input is optional or not
|
|
133
|
+
*/
|
|
134
|
+
optional: _propTypes.default.bool,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* If the slide will only have one input
|
|
138
|
+
*/
|
|
139
|
+
oneInputLabel: _propTypes.default.bool,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* String that will represent color for the label
|
|
143
|
+
*/
|
|
144
|
+
labelColor: _propTypes.default.string
|
|
113
145
|
};
|
|
114
146
|
RatingsInput.defaultProps = {
|
|
115
147
|
labelMin: 'not satisfied.',
|
|
116
|
-
labelMax: 'very satisfied.'
|
|
148
|
+
labelMax: 'very satisfied.',
|
|
149
|
+
labelColor: 'main2'
|
|
117
150
|
};
|
|
118
151
|
|
|
119
152
|
var _default = /*#__PURE__*/(0, React.memo)(RatingsInput);
|
|
@@ -7,34 +7,43 @@ $default-transition: all .2s;
|
|
|
7
7
|
|
|
8
8
|
.#{bem.$base}.ratings-input {
|
|
9
9
|
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
p {
|
|
13
|
+
padding: $default-padding;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
.stars {
|
|
16
17
|
display: flex;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
position: absolute;
|
|
21
|
-
visibility: none;
|
|
22
|
-
z-index: -1;
|
|
19
|
+
>:not(:last-child) {
|
|
20
|
+
margin-right: $default-rating-icon-margin;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
|
|
23
|
+
.#{bem.$base}.rating {
|
|
26
24
|
display: flex;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
|
|
26
|
+
input {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
position: absolute;
|
|
29
|
+
visibility: none;
|
|
30
|
+
z-index: -1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
label {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: $default-padding;
|
|
38
|
+
transition: $default-transition;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.label-text {
|
|
44
|
+
margin-bottom: 0;
|
|
45
|
+
align-self: flex-end;
|
|
32
46
|
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.label-text {
|
|
36
|
-
margin-bottom: 0;
|
|
37
|
-
align-self: flex-end;
|
|
38
47
|
}
|
|
39
48
|
}
|
|
40
49
|
|
|
@@ -37,25 +37,32 @@ var SelectInput = _ref => {
|
|
|
37
37
|
style,
|
|
38
38
|
name,
|
|
39
39
|
label,
|
|
40
|
+
color,
|
|
40
41
|
options,
|
|
42
|
+
validate,
|
|
43
|
+
description,
|
|
41
44
|
disabled // ...otherProps
|
|
42
45
|
|
|
43
46
|
} = _ref;
|
|
44
47
|
(0, React.useLayoutEffect)(() => {
|
|
45
48
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
46
49
|
}, []);
|
|
47
|
-
var [field, meta] = (0, _formik.useField)(
|
|
50
|
+
var [field, meta] = (0, _formik.useField)({
|
|
51
|
+
name,
|
|
52
|
+
validate
|
|
53
|
+
});
|
|
48
54
|
return /*#__PURE__*/React.createElement("div", {
|
|
49
55
|
id: id,
|
|
50
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
56
|
+
className: [baseClassName, componentClassName, userClassName, "y-".concat(color)].filter(e => e).join(' '),
|
|
51
57
|
style: style // {...otherProps}
|
|
52
58
|
|
|
53
59
|
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
54
60
|
className: "input-label",
|
|
55
61
|
name: name
|
|
56
62
|
}, label), /*#__PURE__*/React.createElement("select", _extends({
|
|
57
|
-
className: "input
|
|
63
|
+
className: "input"
|
|
58
64
|
}, field, {
|
|
65
|
+
value: field.value || '',
|
|
59
66
|
id: name,
|
|
60
67
|
disabled: disabled
|
|
61
68
|
}), options.map(option => {
|
|
@@ -66,11 +73,13 @@ var SelectInput = _ref => {
|
|
|
66
73
|
} : option;
|
|
67
74
|
return /*#__PURE__*/React.createElement("option", {
|
|
68
75
|
key: newOption.value,
|
|
69
|
-
value: newOption.value
|
|
76
|
+
value: newOption.value,
|
|
77
|
+
disabled: (newOption === null || newOption === void 0 ? void 0 : newOption.disabled) || false
|
|
70
78
|
}, newOption.label);
|
|
71
|
-
})), meta.
|
|
72
|
-
|
|
73
|
-
|
|
79
|
+
})), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
80
|
+
isError: !!meta.error,
|
|
81
|
+
className: "v50 mt-v s-1"
|
|
82
|
+
}, meta.error || description));
|
|
74
83
|
};
|
|
75
84
|
|
|
76
85
|
SelectInput.propTypes = {
|
|
@@ -99,21 +108,38 @@ SelectInput.propTypes = {
|
|
|
99
108
|
*/
|
|
100
109
|
label: _propTypes.default.string,
|
|
101
110
|
|
|
111
|
+
/**
|
|
112
|
+
* The input field validator function
|
|
113
|
+
*/
|
|
114
|
+
validate: _propTypes.default.func,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The select input description
|
|
118
|
+
*/
|
|
119
|
+
description: _propTypes.default.string,
|
|
120
|
+
|
|
102
121
|
/**
|
|
103
122
|
* The options of the select input
|
|
104
123
|
*/
|
|
105
124
|
options: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.shape({
|
|
106
125
|
value: _propTypes.default.string,
|
|
107
|
-
label: _propTypes.default.string
|
|
126
|
+
label: _propTypes.default.string,
|
|
127
|
+
disabled: _propTypes.default.bool
|
|
108
128
|
})])),
|
|
109
129
|
|
|
110
130
|
/**
|
|
111
131
|
* Whether the select input should be disabled
|
|
112
132
|
*/
|
|
113
|
-
disabled: _propTypes.default.bool
|
|
133
|
+
disabled: _propTypes.default.bool,
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The color of the select input
|
|
137
|
+
*/
|
|
138
|
+
color: _propTypes.default.string
|
|
114
139
|
};
|
|
115
140
|
SelectInput.defaultProps = {
|
|
116
|
-
disabled: false
|
|
141
|
+
disabled: false,
|
|
142
|
+
color: 'background2'
|
|
117
143
|
};
|
|
118
144
|
|
|
119
145
|
var _default = /*#__PURE__*/(0, React.memo)(SelectInput);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use "../../../form.scss";
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
$default-padding: 0.75em
|
|
8
|
+
$default-padding: 0.75em;
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
.#{bem.$base}.select-input {
|
|
@@ -13,17 +13,22 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
.input-label {
|
|
17
|
-
color: var(--main1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
16
|
.input {
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
border: var(--theme-border-style) var(--dark-y);
|
|
18
|
+
background: var(--light-y);
|
|
19
|
+
color:var(--on-y);
|
|
23
20
|
padding: $default-padding;
|
|
24
21
|
|
|
22
|
+
&:not(:disabled):hover{
|
|
23
|
+
border: var(--theme-border-style) var(--light-background4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:disabled {
|
|
27
|
+
background-color: var(--dark-y);
|
|
28
|
+
}
|
|
29
|
+
|
|
25
30
|
&:focus {
|
|
26
|
-
background: var(--
|
|
31
|
+
background: var(--y);
|
|
27
32
|
}
|
|
28
33
|
}
|
|
29
34
|
}
|
|
@@ -123,7 +123,7 @@ TaskRecommendationInput.propTypes = {
|
|
|
123
123
|
image: _propTypes.default.string.isRequired
|
|
124
124
|
};
|
|
125
125
|
TaskRecommendationInput.defaultProps = {
|
|
126
|
-
color: '
|
|
126
|
+
color: 'main2'
|
|
127
127
|
};
|
|
128
128
|
|
|
129
129
|
var _default = /*#__PURE__*/(0, React.memo)(TaskRecommendationInput);
|
|
@@ -38,10 +38,14 @@ var TextInput = _ref => {
|
|
|
38
38
|
type,
|
|
39
39
|
name,
|
|
40
40
|
label,
|
|
41
|
+
color,
|
|
42
|
+
labelColor,
|
|
41
43
|
validate,
|
|
42
44
|
oneInputLabel,
|
|
43
45
|
description,
|
|
44
|
-
disabled
|
|
46
|
+
disabled,
|
|
47
|
+
placeholder,
|
|
48
|
+
optional // ...otherProps
|
|
45
49
|
|
|
46
50
|
} = _ref;
|
|
47
51
|
(0, React.useLayoutEffect)(() => {
|
|
@@ -53,17 +57,20 @@ var TextInput = _ref => {
|
|
|
53
57
|
});
|
|
54
58
|
return /*#__PURE__*/React.createElement("div", {
|
|
55
59
|
id: id,
|
|
56
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
60
|
+
className: [baseClassName, componentClassName, userClassName, "y-".concat(color)].filter(e => e).join(' '),
|
|
57
61
|
style: style // {...otherProps}
|
|
58
62
|
|
|
59
63
|
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
60
|
-
className: [
|
|
61
|
-
name: name
|
|
64
|
+
className: [oneInputLabel ? 'md-s2 s0 v1 mb-v' : 'v50 mb-v'].filter(e => e).join(' '),
|
|
65
|
+
name: name,
|
|
66
|
+
color: labelColor,
|
|
67
|
+
optional: optional
|
|
62
68
|
}, label), /*#__PURE__*/React.createElement("input", _extends({
|
|
63
69
|
id: name,
|
|
64
|
-
className: "input
|
|
70
|
+
className: "input",
|
|
65
71
|
type: type,
|
|
66
|
-
disabled: disabled
|
|
72
|
+
disabled: disabled,
|
|
73
|
+
placeholder: placeholder
|
|
67
74
|
}, field)), (description || meta.touched && meta.error) && /*#__PURE__*/React.createElement(_common.FormDescription, {
|
|
68
75
|
isError: !!meta.error,
|
|
69
76
|
className: "v50 mt-v s-1"
|
|
@@ -96,6 +103,11 @@ TextInput.propTypes = {
|
|
|
96
103
|
*/
|
|
97
104
|
label: _propTypes.default.string.isRequired,
|
|
98
105
|
|
|
106
|
+
/**
|
|
107
|
+
* The input label color
|
|
108
|
+
*/
|
|
109
|
+
labelColor: _propTypes.default.string,
|
|
110
|
+
|
|
99
111
|
/**
|
|
100
112
|
* The type of the input (html)
|
|
101
113
|
*/
|
|
@@ -119,10 +131,26 @@ TextInput.propTypes = {
|
|
|
119
131
|
/**
|
|
120
132
|
* Whether the text input should be disabled
|
|
121
133
|
*/
|
|
122
|
-
disabled: _propTypes.default.bool
|
|
134
|
+
disabled: _propTypes.default.bool,
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* The placeholder text for the input
|
|
138
|
+
*/
|
|
139
|
+
placeholder: _propTypes.default.string,
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The text input color
|
|
143
|
+
*/
|
|
144
|
+
color: _propTypes.default.string,
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Whether the input is optional or not
|
|
148
|
+
*/
|
|
149
|
+
optional: _propTypes.default.bool
|
|
123
150
|
};
|
|
124
151
|
TextInput.defaultProps = {
|
|
125
152
|
type: 'text',
|
|
153
|
+
color: 'background2',
|
|
126
154
|
disabled: false
|
|
127
155
|
};
|
|
128
156
|
|
|
@@ -9,17 +9,26 @@ $default-padding: 0.75em 0.75em 0.55em;
|
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
|
|
12
|
-
.input-label {
|
|
13
|
-
color: var(--main1);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
12
|
.input {
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
border: var(--theme-border-style) var(--dark-y);
|
|
14
|
+
background: var(--light-y);
|
|
15
|
+
color: var(--on-y);
|
|
19
16
|
padding: $default-padding;
|
|
20
17
|
|
|
18
|
+
&::placeholder{
|
|
19
|
+
color: var(--metadata);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:not(:disabled):hover{
|
|
23
|
+
border: var(--theme-border-style) var(--light-background4);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:disabled {
|
|
27
|
+
background-color: var(--dark-y);
|
|
28
|
+
}
|
|
29
|
+
|
|
21
30
|
&:focus {
|
|
22
|
-
background: var(--
|
|
31
|
+
background: var(--light-background4);
|
|
23
32
|
}
|
|
24
33
|
}
|
|
25
34
|
}
|