@pareto-engineering/design-system 4.0.0-alpha.23 → 4.0.0-alpha.24
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/BlurOverlay/BlurOverlay.js +59 -0
- package/dist/cjs/a/BlurOverlay/index.js +13 -0
- package/dist/cjs/a/BlurOverlay/styles.scss +31 -0
- package/dist/cjs/a/index.js +7 -0
- package/dist/cjs/b/Button/Button.js +1 -0
- package/dist/cjs/b/Button/common/WithLink/WithLink.js +60 -0
- package/dist/cjs/b/Button/common/WithLink/index.js +13 -0
- package/dist/cjs/b/Button/common/WithLink/styles.scss +9 -0
- package/dist/cjs/b/Button/common/index.js +8 -1
- package/dist/cjs/b/Button/styles.scss +4 -4
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +3 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +5 -4
- package/dist/cjs/f/fields/ChoicesInput/styles.scss +4 -0
- package/dist/cjs/f/fields/TextInput/styles.scss +3 -2
- package/dist/es/a/BlurOverlay/BlurOverlay.js +51 -0
- package/dist/es/a/BlurOverlay/index.js +2 -0
- package/dist/es/a/BlurOverlay/styles.scss +31 -0
- package/dist/es/a/index.js +1 -0
- package/dist/es/b/Button/Button.js +2 -1
- package/dist/es/b/Button/common/WithLink/WithLink.js +52 -0
- package/dist/es/b/Button/common/WithLink/index.js +1 -0
- package/dist/es/b/Button/common/WithLink/styles.scss +9 -0
- package/dist/es/b/Button/common/index.js +2 -1
- package/dist/es/b/Button/styles.scss +4 -4
- package/dist/es/b/ThemeSelector/ThemeSelector.js +3 -1
- package/dist/es/f/fields/ChoicesInput/ChoicesInput.js +5 -4
- package/dist/es/f/fields/ChoicesInput/styles.scss +4 -0
- package/dist/es/f/fields/TextInput/styles.scss +3 -2
- package/package.json +4 -3
- package/src/stories/a/BlurOverlay.stories.jsx +39 -0
- package/src/stories/b/Button/WithLink.stories.jsx +38 -0
- package/src/ui/a/BlurOverlay/BlurOverlay.jsx +75 -0
- package/src/ui/a/BlurOverlay/index.js +2 -0
- package/src/ui/a/BlurOverlay/styles.scss +31 -0
- package/src/ui/a/index.js +1 -0
- package/src/ui/b/Button/Button.jsx +2 -1
- package/src/ui/b/Button/common/WithLink/WithLink.jsx +80 -0
- package/src/ui/b/Button/common/WithLink/index.js +1 -0
- package/src/ui/b/Button/common/WithLink/styles.scss +9 -0
- package/src/ui/b/Button/common/index.js +1 -0
- package/src/ui/b/Button/styles.scss +4 -4
- package/src/ui/b/ThemeSelector/ThemeSelector.jsx +3 -1
- package/src/ui/f/fields/ChoicesInput/ChoicesInput.jsx +4 -2
- package/src/ui/f/fields/ChoicesInput/styles.scss +4 -0
- package/src/ui/f/fields/TextInput/styles.scss +3 -2
- package/tests/__snapshots__/Storyshots.test.js.snap +672 -2
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
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; } /* @pareto-engineering/generator-front 1.1.1-alpha.1 */
|
|
13
|
+
const baseClassName = _exports.default.base;
|
|
14
|
+
const componentClassName = 'blur-overlay';
|
|
15
|
+
const BlurOverlay = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
id,
|
|
18
|
+
className: userClassName,
|
|
19
|
+
style,
|
|
20
|
+
children,
|
|
21
|
+
blur
|
|
22
|
+
} = _ref;
|
|
23
|
+
(0, React.useInsertionEffect)(() => {
|
|
24
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
25
|
+
}, []);
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
id: id,
|
|
28
|
+
className: [baseClassName, componentClassName, userClassName, blur && _exports.default.modifierActive].filter(e => e).join(' '),
|
|
29
|
+
style: style
|
|
30
|
+
}, children);
|
|
31
|
+
};
|
|
32
|
+
BlurOverlay.propTypes = {
|
|
33
|
+
/**
|
|
34
|
+
* The HTML id for this element
|
|
35
|
+
*/
|
|
36
|
+
id: _propTypes.default.string,
|
|
37
|
+
/**
|
|
38
|
+
* The HTML class names for this element
|
|
39
|
+
*/
|
|
40
|
+
className: _propTypes.default.string,
|
|
41
|
+
/**
|
|
42
|
+
* The React-written, css properties for this element.
|
|
43
|
+
*/
|
|
44
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
45
|
+
/**
|
|
46
|
+
* The children JSX
|
|
47
|
+
*/
|
|
48
|
+
children: _propTypes.default.node,
|
|
49
|
+
/**
|
|
50
|
+
* Boolean to toggle blur effect
|
|
51
|
+
*/
|
|
52
|
+
blur: _propTypes.default.bool
|
|
53
|
+
};
|
|
54
|
+
BlurOverlay.defaultProps = {
|
|
55
|
+
blur: true
|
|
56
|
+
// someProp:false
|
|
57
|
+
};
|
|
58
|
+
var _default = BlurOverlay;
|
|
59
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlurOverlay", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _BlurOverlay.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _BlurOverlay = _interopRequireDefault(require("./BlurOverlay"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.1.1-alpha.1 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
.#{bem.$base}.blur-overlay {
|
|
6
|
+
background: inherit;
|
|
7
|
+
left: 0;
|
|
8
|
+
position: fixed;
|
|
9
|
+
top: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
z-index: 3;
|
|
12
|
+
&.#{bem.$modifier-active} {
|
|
13
|
+
animation: blurAnimation .3s ease-in-out;
|
|
14
|
+
backdrop-filter: blur(5px);
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes blurAnimation {
|
|
20
|
+
0% {
|
|
21
|
+
transform: translateX(-100%);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
1% {
|
|
25
|
+
transform: translateX(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: translateX(0);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/dist/cjs/a/index.js
CHANGED
|
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "AppContextProvider", {
|
|
|
27
27
|
return _AppContext.AppContextProvider;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
+
Object.defineProperty(exports, "BlurOverlay", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _BlurOverlay.BlurOverlay;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
30
36
|
Object.defineProperty(exports, "ContentTree", {
|
|
31
37
|
enumerable: true,
|
|
32
38
|
get: function () {
|
|
@@ -154,6 +160,7 @@ Object.defineProperty(exports, "useTheme", {
|
|
|
154
160
|
}
|
|
155
161
|
});
|
|
156
162
|
var _AppContext = require("./AppContext");
|
|
163
|
+
var _BlurOverlay = require("./BlurOverlay");
|
|
157
164
|
var _ContentTree = require("./ContentTree");
|
|
158
165
|
var _Conversation = require("./Conversation");
|
|
159
166
|
var _DotInfo = require("./DotInfo");
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
|
+
var _reactRouterDom = require("react-router-dom");
|
|
11
|
+
var _index = require("../../index");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
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; } /* @pareto-engineering/generator-front 1.0.12 */
|
|
15
|
+
// Local Definitions
|
|
16
|
+
|
|
17
|
+
const baseClassName = _exports.default.base;
|
|
18
|
+
const componentClassName = 'button-with-link';
|
|
19
|
+
const WithLink = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
id,
|
|
22
|
+
className: userClassName,
|
|
23
|
+
children,
|
|
24
|
+
path,
|
|
25
|
+
...otherProps
|
|
26
|
+
} = _ref;
|
|
27
|
+
(0, React.useInsertionEffect)(() => {
|
|
28
|
+
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
29
|
+
}, []);
|
|
30
|
+
return /*#__PURE__*/React.createElement(_reactRouterDom.Link, {
|
|
31
|
+
to: path,
|
|
32
|
+
id: id,
|
|
33
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' ')
|
|
34
|
+
}, /*#__PURE__*/React.createElement(_index.Button, otherProps, children));
|
|
35
|
+
};
|
|
36
|
+
WithLink.propTypes = {
|
|
37
|
+
/**
|
|
38
|
+
* The HTML id for this element
|
|
39
|
+
*/
|
|
40
|
+
id: _propTypes.default.string,
|
|
41
|
+
/**
|
|
42
|
+
* The HTML class names for this element
|
|
43
|
+
*/
|
|
44
|
+
className: _propTypes.default.string,
|
|
45
|
+
/**
|
|
46
|
+
* The React-written, css properties for this element.
|
|
47
|
+
*/
|
|
48
|
+
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
49
|
+
/**
|
|
50
|
+
* The children JSX
|
|
51
|
+
*/
|
|
52
|
+
children: _propTypes.default.node,
|
|
53
|
+
/**
|
|
54
|
+
* The path that this link would point to
|
|
55
|
+
*/
|
|
56
|
+
path: _propTypes.default.string
|
|
57
|
+
};
|
|
58
|
+
WithLink.defaultProps = {};
|
|
59
|
+
var _default = WithLink;
|
|
60
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "WithLink", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _WithLink.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _WithLink = _interopRequireDefault(require("./WithLink"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -9,4 +9,11 @@ Object.defineProperty(exports, "Group", {
|
|
|
9
9
|
return _Group.Group;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
12
|
+
Object.defineProperty(exports, "WithLink", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _WithLink.WithLink;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
var _Group = require("./Group");
|
|
19
|
+
var _WithLink = require("./WithLink");
|
|
@@ -113,8 +113,8 @@ $default-animation-time: .31s;
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&:disabled {
|
|
116
|
-
border: 1px solid var(--
|
|
117
|
-
color: var(--
|
|
116
|
+
border: 1px solid var(--hard-disabled, var(--#{$default-color}));
|
|
117
|
+
color: var(--hard-disabled, var(--#{$default-color}));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -150,12 +150,12 @@ $default-animation-time: .31s;
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
&:disabled {
|
|
153
|
-
color: var(--
|
|
153
|
+
color: var(--hard-disabled, var(--#{$default-color}));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
&:disabled {
|
|
158
|
-
background: var(--
|
|
158
|
+
background: var(--hard-disabled);
|
|
159
159
|
filter: brightness(125%);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -37,7 +37,9 @@ const ThemeSelector = _ref => {
|
|
|
37
37
|
const current = themes.indexOf(userTheme);
|
|
38
38
|
setPreferredTheme(themes[(current + 1) % themes.length]);
|
|
39
39
|
}, [userTheme]);
|
|
40
|
-
const
|
|
40
|
+
const current = userTheme ? themes.indexOf(userTheme) : 0;
|
|
41
|
+
const nextTheme = themes[(current + 1) % themes.length];
|
|
42
|
+
const themeText = nextTheme && nextTheme.charAt(0).toUpperCase() + nextTheme.slice(1);
|
|
41
43
|
return (
|
|
42
44
|
/*#__PURE__*/
|
|
43
45
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
|
|
@@ -34,8 +34,9 @@ const ChoicesInput = _ref => {
|
|
|
34
34
|
label,
|
|
35
35
|
optional,
|
|
36
36
|
disabled,
|
|
37
|
-
description
|
|
38
|
-
|
|
37
|
+
description,
|
|
38
|
+
spaceBetween,
|
|
39
|
+
...otherProps
|
|
39
40
|
} = _ref;
|
|
40
41
|
(0, React.useInsertionEffect)(() => {
|
|
41
42
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
@@ -53,7 +54,7 @@ const ChoicesInput = _ref => {
|
|
|
53
54
|
as: "p",
|
|
54
55
|
optional: optional
|
|
55
56
|
}, label), /*#__PURE__*/React.createElement("div", {
|
|
56
|
-
className:
|
|
57
|
+
className: ['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')
|
|
57
58
|
}, options.map(choice => /*#__PURE__*/React.createElement(_common.Choice, _extends({
|
|
58
59
|
labelClassName: "with-faded-border",
|
|
59
60
|
key: choice.value,
|
|
@@ -62,7 +63,7 @@ const ChoicesInput = _ref => {
|
|
|
62
63
|
multiple: multiple,
|
|
63
64
|
validate: validate,
|
|
64
65
|
disabled: disabled
|
|
65
|
-
}, choice)))), /*#__PURE__*/React.createElement(_common2.FormDescription, {
|
|
66
|
+
}, otherProps, choice)))), /*#__PURE__*/React.createElement(_common2.FormDescription, {
|
|
66
67
|
className: "v50 mt-v s-1",
|
|
67
68
|
description: description,
|
|
68
69
|
name: name
|
|
@@ -8,7 +8,7 @@ $default-symbol-left: 1em;
|
|
|
8
8
|
$default-padding-with-symbol:
|
|
9
9
|
.75em
|
|
10
10
|
calc($default-symbol-left - 1em)
|
|
11
|
-
.
|
|
11
|
+
.75em
|
|
12
12
|
calc($default-symbol-left + 1em);
|
|
13
13
|
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
14
14
|
|
|
@@ -30,7 +30,8 @@ $default-input-border-radius: var(--theme-default-input-border-radius);
|
|
|
30
30
|
content: var(--symbol);
|
|
31
31
|
left: $default-symbol-left;
|
|
32
32
|
position: absolute;
|
|
33
|
-
top:
|
|
33
|
+
top: 50%;
|
|
34
|
+
transform: translate(-50%, -50%);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
input {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.1.1-alpha.1 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
|
+
const baseClassName = styleNames.base;
|
|
7
|
+
const componentClassName = 'blur-overlay';
|
|
8
|
+
const BlurOverlay = ({
|
|
9
|
+
id,
|
|
10
|
+
className: userClassName,
|
|
11
|
+
style,
|
|
12
|
+
children,
|
|
13
|
+
blur
|
|
14
|
+
}) => {
|
|
15
|
+
useInsertionEffect(() => {
|
|
16
|
+
import("./styles.scss");
|
|
17
|
+
}, []);
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
id: id,
|
|
20
|
+
className: [baseClassName, componentClassName, userClassName, blur && styleNames.modifierActive].filter(e => e).join(' '),
|
|
21
|
+
style: style
|
|
22
|
+
}, children);
|
|
23
|
+
};
|
|
24
|
+
BlurOverlay.propTypes = {
|
|
25
|
+
/**
|
|
26
|
+
* The HTML id for this element
|
|
27
|
+
*/
|
|
28
|
+
id: PropTypes.string,
|
|
29
|
+
/**
|
|
30
|
+
* The HTML class names for this element
|
|
31
|
+
*/
|
|
32
|
+
className: PropTypes.string,
|
|
33
|
+
/**
|
|
34
|
+
* The React-written, css properties for this element.
|
|
35
|
+
*/
|
|
36
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
37
|
+
/**
|
|
38
|
+
* The children JSX
|
|
39
|
+
*/
|
|
40
|
+
children: PropTypes.node,
|
|
41
|
+
/**
|
|
42
|
+
* Boolean to toggle blur effect
|
|
43
|
+
*/
|
|
44
|
+
blur: PropTypes.bool
|
|
45
|
+
};
|
|
46
|
+
BlurOverlay.defaultProps = {
|
|
47
|
+
blur: true
|
|
48
|
+
// someProp:false
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default BlurOverlay;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.1.1-alpha.1 */
|
|
2
|
+
|
|
3
|
+
@use "@pareto-engineering/bem";
|
|
4
|
+
|
|
5
|
+
.#{bem.$base}.blur-overlay {
|
|
6
|
+
background: inherit;
|
|
7
|
+
left: 0;
|
|
8
|
+
position: fixed;
|
|
9
|
+
top: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
z-index: 3;
|
|
12
|
+
&.#{bem.$modifier-active} {
|
|
13
|
+
animation: blurAnimation .3s ease-in-out;
|
|
14
|
+
backdrop-filter: blur(5px);
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@keyframes blurAnimation {
|
|
20
|
+
0% {
|
|
21
|
+
transform: translateX(-100%);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
1% {
|
|
25
|
+
transform: translateX(0);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
100% {
|
|
29
|
+
transform: translateX(0);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/dist/es/a/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
|
|
|
7
7
|
// Package-level Imports
|
|
8
8
|
import styleNames from '@pareto-engineering/bem/exports';
|
|
9
9
|
import { LoadingCircle } from "../..";
|
|
10
|
-
import { Group } from "./common";
|
|
10
|
+
import { Group, WithLink } from "./common";
|
|
11
11
|
import "./styles.scss";
|
|
12
12
|
|
|
13
13
|
// Helper Definition
|
|
@@ -100,4 +100,5 @@ Button.defaultProps = {
|
|
|
100
100
|
color: 'main'
|
|
101
101
|
};
|
|
102
102
|
Button.Group = Group;
|
|
103
|
+
Button.WithLink = WithLink;
|
|
103
104
|
export default Button;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useInsertionEffect } from 'react';
|
|
4
|
+
import PropTypes from 'prop-types';
|
|
5
|
+
import styleNames from '@pareto-engineering/bem/exports';
|
|
6
|
+
import { Link } from 'react-router-dom';
|
|
7
|
+
import { Button } from "../../index";
|
|
8
|
+
|
|
9
|
+
// Local Definitions
|
|
10
|
+
|
|
11
|
+
const baseClassName = styleNames.base;
|
|
12
|
+
const componentClassName = 'button-with-link';
|
|
13
|
+
const WithLink = ({
|
|
14
|
+
id,
|
|
15
|
+
className: userClassName,
|
|
16
|
+
children,
|
|
17
|
+
path,
|
|
18
|
+
...otherProps
|
|
19
|
+
}) => {
|
|
20
|
+
useInsertionEffect(() => {
|
|
21
|
+
import("./styles.scss");
|
|
22
|
+
}, []);
|
|
23
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
24
|
+
to: path,
|
|
25
|
+
id: id,
|
|
26
|
+
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' ')
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Button, otherProps, children));
|
|
28
|
+
};
|
|
29
|
+
WithLink.propTypes = {
|
|
30
|
+
/**
|
|
31
|
+
* The HTML id for this element
|
|
32
|
+
*/
|
|
33
|
+
id: PropTypes.string,
|
|
34
|
+
/**
|
|
35
|
+
* The HTML class names for this element
|
|
36
|
+
*/
|
|
37
|
+
className: PropTypes.string,
|
|
38
|
+
/**
|
|
39
|
+
* The React-written, css properties for this element.
|
|
40
|
+
*/
|
|
41
|
+
style: PropTypes.objectOf(PropTypes.string),
|
|
42
|
+
/**
|
|
43
|
+
* The children JSX
|
|
44
|
+
*/
|
|
45
|
+
children: PropTypes.node,
|
|
46
|
+
/**
|
|
47
|
+
* The path that this link would point to
|
|
48
|
+
*/
|
|
49
|
+
path: PropTypes.string
|
|
50
|
+
};
|
|
51
|
+
WithLink.defaultProps = {};
|
|
52
|
+
export default WithLink;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as WithLink } from "./WithLink";
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { Group } from "./Group";
|
|
1
|
+
export { Group } from "./Group";
|
|
2
|
+
export { WithLink } from "./WithLink";
|
|
@@ -113,8 +113,8 @@ $default-animation-time: .31s;
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&:disabled {
|
|
116
|
-
border: 1px solid var(--
|
|
117
|
-
color: var(--
|
|
116
|
+
border: 1px solid var(--hard-disabled, var(--#{$default-color}));
|
|
117
|
+
color: var(--hard-disabled, var(--#{$default-color}));
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -150,12 +150,12 @@ $default-animation-time: .31s;
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
&:disabled {
|
|
153
|
-
color: var(--
|
|
153
|
+
color: var(--hard-disabled, var(--#{$default-color}));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
&:disabled {
|
|
158
|
-
background: var(--
|
|
158
|
+
background: var(--hard-disabled);
|
|
159
159
|
filter: brightness(125%);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -30,7 +30,9 @@ const ThemeSelector = ({
|
|
|
30
30
|
const current = themes.indexOf(userTheme);
|
|
31
31
|
setPreferredTheme(themes[(current + 1) % themes.length]);
|
|
32
32
|
}, [userTheme]);
|
|
33
|
-
const
|
|
33
|
+
const current = userTheme ? themes.indexOf(userTheme) : 0;
|
|
34
|
+
const nextTheme = themes[(current + 1) % themes.length];
|
|
35
|
+
const themeText = nextTheme && nextTheme.charAt(0).toUpperCase() + nextTheme.slice(1);
|
|
34
36
|
return (
|
|
35
37
|
/*#__PURE__*/
|
|
36
38
|
// eslint-disable-next-line jsx-a11y/anchor-is-valid, jsx-a11y/no-static-element-interactions
|
|
@@ -29,8 +29,9 @@ const ChoicesInput = ({
|
|
|
29
29
|
label,
|
|
30
30
|
optional,
|
|
31
31
|
disabled,
|
|
32
|
-
description
|
|
33
|
-
|
|
32
|
+
description,
|
|
33
|
+
spaceBetween,
|
|
34
|
+
...otherProps
|
|
34
35
|
}) => {
|
|
35
36
|
useInsertionEffect(() => {
|
|
36
37
|
import("./styles.scss");
|
|
@@ -48,7 +49,7 @@ const ChoicesInput = ({
|
|
|
48
49
|
as: "p",
|
|
49
50
|
optional: optional
|
|
50
51
|
}, label), /*#__PURE__*/React.createElement("div", {
|
|
51
|
-
className:
|
|
52
|
+
className: ['choices', spaceBetween && 'space-between'].filter(Boolean).join(' ')
|
|
52
53
|
}, options.map(choice => /*#__PURE__*/React.createElement(Choice, _extends({
|
|
53
54
|
labelClassName: "with-faded-border",
|
|
54
55
|
key: choice.value,
|
|
@@ -57,7 +58,7 @@ const ChoicesInput = ({
|
|
|
57
58
|
multiple: multiple,
|
|
58
59
|
validate: validate,
|
|
59
60
|
disabled: disabled
|
|
60
|
-
}, choice)))), /*#__PURE__*/React.createElement(FormDescription, {
|
|
61
|
+
}, otherProps, choice)))), /*#__PURE__*/React.createElement(FormDescription, {
|
|
61
62
|
className: "v50 mt-v s-1",
|
|
62
63
|
description: description,
|
|
63
64
|
name: name
|
|
@@ -8,7 +8,7 @@ $default-symbol-left: 1em;
|
|
|
8
8
|
$default-padding-with-symbol:
|
|
9
9
|
.75em
|
|
10
10
|
calc($default-symbol-left - 1em)
|
|
11
|
-
.
|
|
11
|
+
.75em
|
|
12
12
|
calc($default-symbol-left + 1em);
|
|
13
13
|
$default-input-border-radius: var(--theme-default-input-border-radius);
|
|
14
14
|
|
|
@@ -30,7 +30,8 @@ $default-input-border-radius: var(--theme-default-input-border-radius);
|
|
|
30
30
|
content: var(--symbol);
|
|
31
31
|
left: $default-symbol-left;
|
|
32
32
|
position: absolute;
|
|
33
|
-
top:
|
|
33
|
+
top: 50%;
|
|
34
|
+
transform: translate(-50%, -50%);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
input {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pareto-engineering/design-system",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -52,7 +52,8 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@pareto-engineering/assets": "^4.0.0-alpha.23",
|
|
54
54
|
"@pareto-engineering/bem": "^4.0.0-alpha.20",
|
|
55
|
-
"@pareto-engineering/styles": "^4.0.0-alpha.
|
|
55
|
+
"@pareto-engineering/styles": "^4.0.0-alpha.24",
|
|
56
|
+
"@pareto-engineering/utils": "^4.0.0-alpha.23",
|
|
56
57
|
"date-fns": "^2.29.3",
|
|
57
58
|
"downshift": "^6.1.12",
|
|
58
59
|
"formik": "^2.2.9",
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"relay-test-utils": "^15.0.0"
|
|
68
69
|
},
|
|
69
70
|
"browserslist": "> 2%",
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "711975d03e1556e4c99ecfee1471dbc59260aaf7"
|
|
71
72
|
}
|