@pareto-engineering/design-system 4.0.0-alpha.3 → 4.0.0-alpha.4
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/babel.config.js +24 -16
- package/dist/cjs/a/AppContext/Context.js +1 -1
- package/dist/cjs/a/AppContext/ContextProvider.js +19 -15
- package/dist/cjs/a/AppContext/index.js +4 -4
- package/dist/cjs/a/AppContext/useTheme.js +7 -7
- package/dist/cjs/a/ContentTree/ContentTree.js +6 -6
- package/dist/cjs/a/ContentTree/common/Tree/Tree.js +12 -12
- package/dist/cjs/a/ContentTree/common/Tree/index.js +1 -1
- package/dist/cjs/a/ContentTree/common/index.js +3 -3
- package/dist/cjs/a/ContentTree/common/useContentTree.js +14 -14
- package/dist/cjs/a/ContentTree/common/useFirstVisibleNode.js +10 -11
- package/dist/cjs/a/ContentTree/index.js +1 -1
- package/dist/cjs/a/Conversation/Context.js +1 -1
- package/dist/cjs/a/Conversation/Conversation.js +6 -6
- package/dist/cjs/a/Conversation/common/Message/Message.js +8 -8
- package/dist/cjs/a/Conversation/common/Message/index.js +1 -1
- package/dist/cjs/a/Conversation/common/index.js +1 -1
- package/dist/cjs/a/Conversation/index.js +3 -3
- package/dist/cjs/a/DotInfo/DotInfo.js +10 -14
- package/dist/cjs/a/DotInfo/index.js +1 -1
- package/dist/cjs/a/Figure/Figure.js +5 -5
- package/dist/cjs/a/Figure/index.js +1 -1
- package/dist/cjs/a/HamburgerButton/HamburgerButton.js +16 -19
- package/dist/cjs/a/HamburgerButton/index.js +1 -1
- package/dist/cjs/a/IconList/IconList.js +18 -25
- package/dist/cjs/a/IconList/common/Item/Item.js +17 -24
- package/dist/cjs/a/IconList/common/Item/index.js +1 -1
- package/dist/cjs/a/IconList/common/index.js +1 -1
- package/dist/cjs/a/IconList/index.js +1 -1
- package/dist/cjs/a/Label/Label.js +6 -6
- package/dist/cjs/a/Label/index.js +1 -1
- package/dist/cjs/a/LoadingCircle/LoadingCircle.js +10 -14
- package/dist/cjs/a/LoadingCircle/index.js +1 -1
- package/dist/cjs/a/People/People.js +8 -12
- package/dist/cjs/a/People/common/Person/Person.js +7 -7
- package/dist/cjs/a/People/common/Person/index.js +1 -1
- package/dist/cjs/a/People/common/index.js +1 -1
- package/dist/cjs/a/People/index.js +1 -1
- package/dist/cjs/a/Popover/Popover.js +8 -8
- package/dist/cjs/a/Popover/index.js +1 -1
- package/dist/cjs/a/ProgressBar/ProgressBar.js +10 -14
- package/dist/cjs/a/ProgressBar/index.js +1 -1
- package/dist/cjs/a/Quote/Quote.js +6 -6
- package/dist/cjs/a/Quote/index.js +1 -1
- package/dist/cjs/a/SVG/SVG.js +22 -25
- package/dist/cjs/a/SVG/common/UseSVG/UseSVG.js +9 -11
- package/dist/cjs/a/SVG/common/UseSVG/index.js +1 -1
- package/dist/cjs/a/SVG/common/index.js +1 -1
- package/dist/cjs/a/SVG/index.js +1 -1
- package/dist/cjs/a/SnapScroller/SnapScroller.js +5 -5
- package/dist/cjs/a/SnapScroller/index.js +1 -1
- package/dist/cjs/a/Spinner/Spinner.js +6 -6
- package/dist/cjs/a/Spinner/index.js +1 -1
- package/dist/cjs/a/Timestamp/Timestamp.js +11 -11
- package/dist/cjs/a/Timestamp/index.js +1 -1
- package/dist/cjs/a/index.js +20 -20
- package/dist/cjs/b/Button/Button.js +18 -21
- package/dist/cjs/b/Button/index.js +1 -1
- package/dist/cjs/b/Logo/Logo.js +12 -12
- package/dist/cjs/b/Logo/index.js +1 -1
- package/dist/cjs/b/Page/Context.js +1 -1
- package/dist/cjs/b/Page/Page.js +15 -18
- package/dist/cjs/b/Page/common/PageHelmet/PageHelmet.js +39 -43
- package/dist/cjs/b/Page/common/PageHelmet/index.js +1 -1
- package/dist/cjs/b/Page/common/Section/Section.js +13 -16
- package/dist/cjs/b/Page/common/Section/index.js +1 -1
- package/dist/cjs/b/Page/common/index.js +2 -2
- package/dist/cjs/b/Page/index.js +3 -3
- package/dist/cjs/b/SocialMediaButton/SocialMediaButton.js +20 -24
- package/dist/cjs/b/SocialMediaButton/index.js +1 -1
- package/dist/cjs/b/ThemeSelector/ThemeSelector.js +8 -8
- package/dist/cjs/b/ThemeSelector/index.js +1 -1
- package/dist/cjs/b/Title/Title.js +5 -5
- package/dist/cjs/b/Title/index.js +1 -1
- package/dist/cjs/b/index.js +6 -6
- package/dist/cjs/c/ContentSlides/ContentSlides.js +31 -28
- package/dist/cjs/c/ContentSlides/Context.js +1 -1
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/HorizontalMenu.js +8 -8
- package/dist/cjs/c/ContentSlides/common/HorizontalMenu/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Navigator/Navigator.js +7 -7
- package/dist/cjs/c/ContentSlides/common/Navigator/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Sidebar/Sidebar.js +5 -5
- package/dist/cjs/c/ContentSlides/common/Sidebar/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/Slide/Slide.js +6 -6
- package/dist/cjs/c/ContentSlides/common/Slide/index.js +1 -1
- package/dist/cjs/c/ContentSlides/common/index.js +4 -4
- package/dist/cjs/c/ContentSlides/index.js +3 -3
- package/dist/cjs/c/Modal/Modal.js +5 -5
- package/dist/cjs/c/Modal/common/ModalHeader/ModalHeader.js +5 -5
- package/dist/cjs/c/Modal/common/ModalHeader/index.js +1 -1
- package/dist/cjs/c/Modal/common/index.js +1 -1
- package/dist/cjs/c/Modal/index.js +1 -1
- package/dist/cjs/c/Shortener/Shortener.js +9 -9
- package/dist/cjs/c/Shortener/index.js +1 -1
- package/dist/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +11 -11
- package/dist/cjs/c/SocialMediaShareButton/index.js +1 -1
- package/dist/cjs/c/index.js +5 -5
- package/dist/cjs/f/FormInput/FormInput.js +13 -16
- package/dist/cjs/f/FormInput/index.js +1 -1
- package/dist/cjs/f/common/Debugger/Debugger.js +7 -7
- package/dist/cjs/f/common/Debugger/index.js +1 -1
- package/dist/cjs/f/common/Description/Description.js +7 -7
- package/dist/cjs/f/common/Description/index.js +1 -1
- package/dist/cjs/f/common/Label/Label.js +6 -6
- package/dist/cjs/f/common/Label/index.js +1 -1
- package/dist/cjs/f/common/index.js +3 -3
- package/dist/cjs/f/fields/Checkbox/Checkbox.js +6 -6
- package/dist/cjs/f/fields/Checkbox/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/ChoicesInput.js +11 -15
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/Choice.js +7 -7
- package/dist/cjs/f/fields/ChoicesInput/common/Choice/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/common/index.js +1 -1
- package/dist/cjs/f/fields/ChoicesInput/index.js +1 -1
- package/dist/cjs/f/fields/QueryChoices/QueryChoices.js +25 -30
- package/dist/cjs/f/fields/QueryChoices/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +19 -21
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/Combobox.js +12 -12
- package/dist/cjs/f/fields/QueryCombobox/common/Combobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/Menu.js +14 -17
- package/dist/cjs/f/fields/QueryCombobox/common/Menu/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/MultipleCombobox.js +22 -26
- package/dist/cjs/f/fields/QueryCombobox/common/MultipleCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QueryCombobox/common/index.js +3 -3
- package/dist/cjs/f/fields/QueryCombobox/index.js +1 -1
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +11 -11
- package/dist/cjs/f/fields/QuerySelect/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/RatingsInput.js +8 -8
- package/dist/cjs/f/fields/RatingsInput/common/Rating/Rating.js +7 -7
- package/dist/cjs/f/fields/RatingsInput/common/Rating/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/common/index.js +1 -1
- package/dist/cjs/f/fields/RatingsInput/index.js +1 -1
- package/dist/cjs/f/fields/SelectInput/SelectInput.js +9 -9
- package/dist/cjs/f/fields/SelectInput/index.js +1 -1
- package/dist/cjs/f/fields/TextInput/TextInput.js +7 -7
- package/dist/cjs/f/fields/TextInput/index.js +1 -1
- package/dist/cjs/f/fields/TextareaInput/TextareaInput.js +7 -7
- package/dist/cjs/f/fields/TextareaInput/index.js +1 -1
- package/dist/cjs/f/fields/index.js +9 -9
- package/dist/cjs/f/index.js +3 -3
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/r/SwitchRouteMap/SwitchRouteMap.js +7 -10
- package/dist/cjs/r/SwitchRouteMap/index.js +1 -1
- package/dist/cjs/r/common/PrivateRoute/PrivateRoute.js +13 -16
- package/dist/cjs/r/common/PrivateRoute/index.js +1 -1
- package/dist/cjs/r/common/index.js +1 -1
- package/dist/cjs/r/index.js +2 -2
- package/dist/cjs/test/QueryLoader/QueryLoader.js +4 -4
- package/dist/cjs/test/QueryLoader/__generated__/QueryLoaderHelloQuery.graphql.js +1 -1
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/PreloadedTestData.js +4 -4
- package/dist/cjs/test/QueryLoader/common/PreloadedTestData/index.js +1 -1
- package/dist/cjs/test/QueryLoader/common/index.js +1 -1
- package/dist/cjs/test/QueryLoader/index.js +1 -1
- package/dist/cjs/test/index.js +1 -1
- package/dist/cjs/utils/hooks/index.js +2 -2
- package/dist/cjs/utils/hooks/useDynamicPosition.js +24 -24
- package/dist/cjs/utils/hooks/useWindowSize.js +6 -6
- package/dist/cjs/utils/index.js +2 -2
- package/package.json +2 -2
|
@@ -10,18 +10,13 @@ var _reactRelay = require("react-relay");
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _common = require("./common");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
16
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
17
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
18
|
-
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); }
|
|
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); }
|
|
19
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; }
|
|
20
15
|
/**
|
|
21
16
|
* This is the component description.
|
|
22
17
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const QueryCombobox = _ref => {
|
|
19
|
+
let {
|
|
25
20
|
id,
|
|
26
21
|
style,
|
|
27
22
|
className,
|
|
@@ -45,31 +40,34 @@ var QueryCombobox = _ref => {
|
|
|
45
40
|
(0, React.useLayoutEffect)(() => {
|
|
46
41
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
47
42
|
}, []);
|
|
48
|
-
|
|
43
|
+
const [, meta, helpers] = (0, _formik.useField)({
|
|
49
44
|
name,
|
|
50
45
|
validate
|
|
51
46
|
});
|
|
52
|
-
|
|
47
|
+
const {
|
|
53
48
|
setValue,
|
|
54
49
|
setError
|
|
55
50
|
} = helpers;
|
|
56
|
-
|
|
51
|
+
const {
|
|
57
52
|
value
|
|
58
53
|
} = meta;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
55
|
+
const [isFetching, setIsFetching] = (0, React.useState)(false);
|
|
56
|
+
const [options, setOptions] = (0, React.useState)([]);
|
|
57
|
+
const {
|
|
63
58
|
graphql,
|
|
64
59
|
accessor
|
|
65
60
|
} = query;
|
|
66
|
-
|
|
61
|
+
const getOptions = inputValue => {
|
|
67
62
|
if (isFetching) return;
|
|
68
|
-
|
|
63
|
+
let variables = {
|
|
69
64
|
[searchVariable]: inputValue
|
|
70
65
|
};
|
|
71
66
|
if (extraVariables) {
|
|
72
|
-
variables =
|
|
67
|
+
variables = {
|
|
68
|
+
...variables,
|
|
69
|
+
...extraVariables
|
|
70
|
+
};
|
|
73
71
|
}
|
|
74
72
|
(0, _reactRelay.fetchQuery)(environment, graphql, variables).subscribe({
|
|
75
73
|
start: () => {
|
|
@@ -84,7 +82,7 @@ var QueryCombobox = _ref => {
|
|
|
84
82
|
},
|
|
85
83
|
next: data => {
|
|
86
84
|
setOptions(data[accessor].edges.map(_ref2 => {
|
|
87
|
-
|
|
85
|
+
let {
|
|
88
86
|
node
|
|
89
87
|
} = _ref2;
|
|
90
88
|
return {
|
|
@@ -95,7 +93,7 @@ var QueryCombobox = _ref => {
|
|
|
95
93
|
}
|
|
96
94
|
});
|
|
97
95
|
};
|
|
98
|
-
|
|
96
|
+
const comboboxProps = {
|
|
99
97
|
id,
|
|
100
98
|
style,
|
|
101
99
|
options,
|
|
@@ -114,7 +112,7 @@ var QueryCombobox = _ref => {
|
|
|
114
112
|
minLength,
|
|
115
113
|
transformSearch
|
|
116
114
|
};
|
|
117
|
-
|
|
115
|
+
const Input = multiple ? _common.MultipleCombobox : _common.Combobox;
|
|
118
116
|
return /*#__PURE__*/React.createElement(Input, comboboxProps);
|
|
119
117
|
};
|
|
120
118
|
QueryCombobox.propTypes = {
|
|
@@ -13,17 +13,17 @@ var _a = require("../../../../../a");
|
|
|
13
13
|
var _b = require("../../../../../b");
|
|
14
14
|
var _Menu = require("../Menu");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
16
|
+
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); }
|
|
17
17
|
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; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const baseClassName = _exports.default.base;
|
|
20
|
+
const componentClassName = 'combobox';
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* This is the component description.
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const Combobox = _ref => {
|
|
26
|
+
let {
|
|
27
27
|
id,
|
|
28
28
|
className: userClassName,
|
|
29
29
|
style,
|
|
@@ -42,7 +42,7 @@ var Combobox = _ref => {
|
|
|
42
42
|
optional
|
|
43
43
|
// ...otherProps
|
|
44
44
|
} = _ref;
|
|
45
|
-
|
|
45
|
+
const {
|
|
46
46
|
isOpen,
|
|
47
47
|
selectItem,
|
|
48
48
|
selectedItem,
|
|
@@ -59,10 +59,10 @@ var Combobox = _ref => {
|
|
|
59
59
|
initialSelectedItem: value,
|
|
60
60
|
itemToString: item => item ? item.label : '',
|
|
61
61
|
onInputValueChange: _ref2 => {
|
|
62
|
-
|
|
62
|
+
let {
|
|
63
63
|
inputValue: searchInputValue
|
|
64
64
|
} = _ref2;
|
|
65
|
-
|
|
65
|
+
const transformedInput = transformSearch(searchInputValue);
|
|
66
66
|
if (transformedInput.length > minLength) {
|
|
67
67
|
getOptions(transformedInput);
|
|
68
68
|
}
|
|
@@ -79,15 +79,15 @@ var Combobox = _ref => {
|
|
|
79
79
|
|
|
80
80
|
// If the formik state has a value, we'll set the selected item to the combobox state
|
|
81
81
|
(0, React.useEffect)(() => {
|
|
82
|
-
if (
|
|
82
|
+
if (value?.value !== selectedItem?.value) {
|
|
83
83
|
selectItem(value);
|
|
84
84
|
}
|
|
85
85
|
}, [value]);
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
const parentRef = (0, React.useRef)(null);
|
|
87
|
+
const resetInputValue = () => setInputValue('');
|
|
88
88
|
return /*#__PURE__*/React.createElement("div", {
|
|
89
89
|
id: id,
|
|
90
|
-
className: [baseClassName, componentClassName, userClassName,
|
|
90
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
91
91
|
style: style,
|
|
92
92
|
ref: parentRef
|
|
93
93
|
}, /*#__PURE__*/React.createElement(_.FormLabel, _extends({}, getLabelProps(), {
|
|
@@ -7,32 +7,29 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
10
|
-
var _excluded = ["id", "className", "style", "items", "isOpen", "highlightedIndex", "getItemProps"];
|
|
11
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
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); }
|
|
13
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; }
|
|
14
13
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
14
|
// Local Definitions
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
const baseClassName = _exports.default.base;
|
|
17
|
+
const componentClassName = 'menu';
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
20
|
* This is the component description.
|
|
24
21
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
const Menu = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
23
|
+
let {
|
|
24
|
+
id,
|
|
25
|
+
className: userClassName,
|
|
26
|
+
style,
|
|
27
|
+
items,
|
|
28
|
+
isOpen,
|
|
29
|
+
highlightedIndex,
|
|
30
|
+
getItemProps,
|
|
31
|
+
...otherProps
|
|
32
|
+
} = _ref;
|
|
36
33
|
return /*#__PURE__*/React.createElement("ul", _extends({
|
|
37
34
|
id: id,
|
|
38
35
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
@@ -13,16 +13,11 @@ var _a = require("../../../../../a");
|
|
|
13
13
|
var _ = require("../../../..");
|
|
14
14
|
var _Menu = require("../Menu");
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
16
|
+
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); }
|
|
17
17
|
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; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
23
|
-
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
24
|
-
var baseClassName = _exports.default.base;
|
|
25
|
-
var componentClassName = 'multiple-combobox';
|
|
19
|
+
const baseClassName = _exports.default.base;
|
|
20
|
+
const componentClassName = 'multiple-combobox';
|
|
26
21
|
|
|
27
22
|
/**
|
|
28
23
|
* @param {Array[Object]} first - first array to check if it has an item not in the second array.
|
|
@@ -30,13 +25,13 @@ var componentClassName = 'multiple-combobox';
|
|
|
30
25
|
*
|
|
31
26
|
* @returns {Boolean} - true if the first array has an item not in the second array.
|
|
32
27
|
*/
|
|
33
|
-
|
|
28
|
+
const testIfArraysAreUnique = (first, second) => first.filter(objInFirstArray => !second.some(objInSecondArray => objInFirstArray.value === objInSecondArray.value)).length > 0;
|
|
34
29
|
|
|
35
30
|
/**
|
|
36
31
|
* This is the component description.
|
|
37
32
|
*/
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
const MultipleCombobox = _ref => {
|
|
34
|
+
let {
|
|
40
35
|
id,
|
|
41
36
|
className: userClassName,
|
|
42
37
|
style,
|
|
@@ -55,8 +50,8 @@ var MultipleCombobox = _ref => {
|
|
|
55
50
|
disabled
|
|
56
51
|
// ...otherProps
|
|
57
52
|
} = _ref;
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
const [searchInputValue, setSearchInputValue] = (0, React.useState)('');
|
|
54
|
+
const {
|
|
60
55
|
getSelectedItemProps,
|
|
61
56
|
getDropdownProps,
|
|
62
57
|
addSelectedItem,
|
|
@@ -71,8 +66,8 @@ var MultipleCombobox = _ref => {
|
|
|
71
66
|
* @returns {Boolean} - Unique items from the options array so that the combobox
|
|
72
67
|
* shows only the options that are not yet selected.
|
|
73
68
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
69
|
+
const getFilteredItems = () => items.filter(item => selectedItems.findIndex(e => e.label === item.label) < 0);
|
|
70
|
+
const {
|
|
76
71
|
isOpen,
|
|
77
72
|
getLabelProps,
|
|
78
73
|
getMenuProps,
|
|
@@ -90,16 +85,17 @@ var MultipleCombobox = _ref => {
|
|
|
90
85
|
items: getFilteredItems(),
|
|
91
86
|
circularNavigation: true,
|
|
92
87
|
stateReducer: (state, actionAndChanges) => {
|
|
93
|
-
|
|
88
|
+
const {
|
|
94
89
|
changes,
|
|
95
90
|
type
|
|
96
91
|
} = actionAndChanges;
|
|
97
92
|
switch (type) {
|
|
98
93
|
case _downshift.useCombobox.stateChangeTypes.InputKeyDownEnter:
|
|
99
94
|
case _downshift.useCombobox.stateChangeTypes.ItemClick:
|
|
100
|
-
return
|
|
95
|
+
return {
|
|
96
|
+
...changes,
|
|
101
97
|
isOpen: true // keep the menu open after selection.
|
|
102
|
-
}
|
|
98
|
+
};
|
|
103
99
|
|
|
104
100
|
default:
|
|
105
101
|
break;
|
|
@@ -107,7 +103,7 @@ var MultipleCombobox = _ref => {
|
|
|
107
103
|
return changes;
|
|
108
104
|
},
|
|
109
105
|
onStateChange: _ref2 => {
|
|
110
|
-
|
|
106
|
+
let {
|
|
111
107
|
inputValue: newSearchInputValue,
|
|
112
108
|
type,
|
|
113
109
|
selectedItem
|
|
@@ -115,7 +111,7 @@ var MultipleCombobox = _ref => {
|
|
|
115
111
|
switch (type) {
|
|
116
112
|
case _downshift.useCombobox.stateChangeTypes.InputChange:
|
|
117
113
|
{
|
|
118
|
-
|
|
114
|
+
const transformedInput = transformSearch(newSearchInputValue);
|
|
119
115
|
if (transformedInput.length > minLength) {
|
|
120
116
|
getOptions(transformedInput);
|
|
121
117
|
}
|
|
@@ -136,25 +132,25 @@ var MultipleCombobox = _ref => {
|
|
|
136
132
|
}
|
|
137
133
|
});
|
|
138
134
|
(0, React.useEffect)(() => {
|
|
139
|
-
if (
|
|
135
|
+
if (selectedItems?.length > 0) {
|
|
140
136
|
setValue(selectedItems);
|
|
141
137
|
}
|
|
142
138
|
}, [selectedItems]);
|
|
143
139
|
(0, React.useEffect)(() => {
|
|
144
|
-
if (
|
|
140
|
+
if (value?.length > 0 && (testIfArraysAreUnique(value, selectedItems) || testIfArraysAreUnique(selectedItems, value))) {
|
|
145
141
|
setSelectedItems(value);
|
|
146
142
|
}
|
|
147
143
|
}, [value]);
|
|
148
|
-
|
|
149
|
-
|
|
144
|
+
const parentRef = (0, React.useRef)(null);
|
|
145
|
+
const resetInputValue = () => setInputValue('');
|
|
150
146
|
return /*#__PURE__*/React.createElement("div", {
|
|
151
147
|
id: id,
|
|
152
|
-
className: [baseClassName, componentClassName, userClassName,
|
|
148
|
+
className: [baseClassName, componentClassName, userClassName, `y-${color}`].filter(e => e).join(' '),
|
|
153
149
|
style: style
|
|
154
150
|
}, /*#__PURE__*/React.createElement(_.FormLabel, _extends({}, getLabelProps(), {
|
|
155
151
|
name: name,
|
|
156
152
|
optional: optional
|
|
157
|
-
}), label),
|
|
153
|
+
}), label), selectedItems?.length > 0 && /*#__PURE__*/React.createElement("div", {
|
|
158
154
|
className: "selected-items"
|
|
159
155
|
}, selectedItems.map((selectedItem, index) => /*#__PURE__*/React.createElement("div", _extends({
|
|
160
156
|
key: selectedItem.label
|
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "Combobox", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _Combobox.Combobox;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Menu", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _Menu.Menu;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "MultipleCombobox", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _MultipleCombobox.MultipleCombobox;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
@@ -10,7 +10,7 @@ var _formik = require("formik");
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _ = require("../..");
|
|
12
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
|
|
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
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; }
|
|
15
15
|
/* @pareto-engineering/generator-front 1.0.12 */
|
|
16
16
|
|
|
@@ -19,8 +19,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
19
19
|
/**
|
|
20
20
|
* This is the component description.
|
|
21
21
|
*/
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const QuerySelect = _ref => {
|
|
23
|
+
let {
|
|
24
24
|
id,
|
|
25
25
|
className: userClassName,
|
|
26
26
|
style,
|
|
@@ -38,21 +38,21 @@ var QuerySelect = _ref => {
|
|
|
38
38
|
validate
|
|
39
39
|
// ...otherProps
|
|
40
40
|
} = _ref;
|
|
41
|
-
|
|
41
|
+
const [,, helpers] = (0, _formik.useField)({
|
|
42
42
|
name,
|
|
43
43
|
validate
|
|
44
44
|
});
|
|
45
|
-
|
|
45
|
+
const {
|
|
46
46
|
setError
|
|
47
47
|
} = helpers;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
49
|
+
const [isFetching, setIsFetching] = (0, React.useState)(false);
|
|
50
|
+
const [options, setOptions] = (0, React.useState)([]);
|
|
51
|
+
const {
|
|
52
52
|
graphql,
|
|
53
53
|
accessor
|
|
54
54
|
} = query;
|
|
55
|
-
|
|
55
|
+
const getOptions = () => {
|
|
56
56
|
if (isFetching) return;
|
|
57
57
|
(0, _reactRelay.fetchQuery)(environment, graphql, variables).subscribe({
|
|
58
58
|
start: () => {
|
|
@@ -68,7 +68,7 @@ var QuerySelect = _ref => {
|
|
|
68
68
|
},
|
|
69
69
|
next: data => {
|
|
70
70
|
setOptions([defaultOption, ...data[accessor].edges.map(_ref2 => {
|
|
71
|
-
|
|
71
|
+
let {
|
|
72
72
|
node
|
|
73
73
|
} = _ref2;
|
|
74
74
|
return {
|
|
@@ -10,16 +10,16 @@ var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports")
|
|
|
10
10
|
var _common = require("./common");
|
|
11
11
|
var _common2 = require("../../common");
|
|
12
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
|
|
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
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; }
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const baseClassName = _exports.default.base;
|
|
16
|
+
const componentClassName = 'ratings-input';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* This is the component description.
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const RatingsInput = _ref => {
|
|
22
|
+
let {
|
|
23
23
|
id,
|
|
24
24
|
className: userClassName,
|
|
25
25
|
style,
|
|
@@ -38,7 +38,7 @@ var RatingsInput = _ref => {
|
|
|
38
38
|
(0, React.useLayoutEffect)(() => {
|
|
39
39
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
40
40
|
}, []);
|
|
41
|
-
|
|
41
|
+
const [hover, setHover] = (0, React.useState)(null);
|
|
42
42
|
return /*#__PURE__*/React.createElement("div", {
|
|
43
43
|
id: id,
|
|
44
44
|
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
@@ -53,10 +53,10 @@ var RatingsInput = _ref => {
|
|
|
53
53
|
}, displayRatingsLabel && /*#__PURE__*/React.createElement("p", {
|
|
54
54
|
className: "label-text md-s-1 s-2 x-metadata c-x"
|
|
55
55
|
}, labelMin), [...Array(ratingCount)].map((_, index) => {
|
|
56
|
-
|
|
56
|
+
const ratingValue = index + 1;
|
|
57
57
|
return /*#__PURE__*/React.createElement(_common.Rating, {
|
|
58
58
|
key: ratingValue,
|
|
59
|
-
ratingId:
|
|
59
|
+
ratingId: `${name}-${ratingValue}`,
|
|
60
60
|
value: ratingValue,
|
|
61
61
|
name: name,
|
|
62
62
|
hover: hover,
|
|
@@ -9,19 +9,19 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _formik = require("formik");
|
|
10
10
|
var _exports = _interopRequireDefault(require("@pareto-engineering/bem/exports"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function
|
|
12
|
+
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); }
|
|
13
13
|
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; }
|
|
14
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
15
|
// Local Definitions
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const baseClassName = _exports.default.base;
|
|
18
|
+
const componentClassName = 'rating';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* This is the component description.
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
const Rating = _ref => {
|
|
24
|
+
let {
|
|
25
25
|
id,
|
|
26
26
|
className: userClassName,
|
|
27
27
|
style,
|
|
@@ -36,13 +36,13 @@ var Rating = _ref => {
|
|
|
36
36
|
showRatingValue
|
|
37
37
|
// ...otherProps
|
|
38
38
|
} = _ref;
|
|
39
|
-
|
|
39
|
+
const [field] = (0, _formik.useField)({
|
|
40
40
|
name,
|
|
41
41
|
validate
|
|
42
42
|
});
|
|
43
43
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
id: id,
|
|
45
|
-
className: [baseClassName, componentClassName, userClassName,
|
|
45
|
+
className: [baseClassName, componentClassName, userClassName, `x-${activeBackgroundColor}`, `y-${inactiveBackgroundColor}`].filter(e => e).join(' '),
|
|
46
46
|
style: style
|
|
47
47
|
}, /*#__PURE__*/React.createElement("label", {
|
|
48
48
|
htmlFor: ratingId,
|