@mmb-digital/ds-lilly 0.3.9 → 0.3.12

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/ds-lilly.js CHANGED
@@ -6200,7 +6200,7 @@ __webpack_require__.d(__webpack_exports__, "v", function() { return /* binding *
6200
6200
  // UNUSED EXPORTS: getDomainOfErrorBars, offsetSign, offsetPositive, getStackedData, calculateDomainOfTicks, MIN_VALUE_REG, MAX_VALUE_REG
6201
6201
 
6202
6202
  // EXTERNAL MODULE: ./node_modules/lodash/isEqual.js
6203
- var isEqual = __webpack_require__(28);
6203
+ var isEqual = __webpack_require__(27);
6204
6204
  var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual);
6205
6205
 
6206
6206
  // EXTERNAL MODULE: ./node_modules/lodash/sortBy.js
@@ -12630,7 +12630,7 @@ AnimateGroup.defaultProps = {
12630
12630
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
12631
12631
  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8);
12632
12632
  /* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
12633
- /* harmony import */ var _Text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29);
12633
+ /* harmony import */ var _Text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(28);
12634
12634
  /* harmony import */ var _util_ReactUtils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
12635
12635
  /* harmony import */ var _util_DataUtils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
12636
12636
  /* harmony import */ var _util_PolarUtils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12);
@@ -13190,8 +13190,7 @@ var SYNC_EVENT = 'recharts.syncMouseEvents'; // eslint-disable-next-line no-rede
13190
13190
 
13191
13191
  /***/ }),
13192
13192
  /* 26 */,
13193
- /* 27 */,
13194
- /* 28 */
13193
+ /* 27 */
13195
13194
  /***/ (function(module, exports, __webpack_require__) {
13196
13195
 
13197
13196
  var baseIsEqual = __webpack_require__(654);
@@ -13232,7 +13231,7 @@ module.exports = isEqual;
13232
13231
 
13233
13232
 
13234
13233
  /***/ }),
13235
- /* 29 */
13234
+ /* 28 */
13236
13235
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
13237
13236
 
13238
13237
  "use strict";
@@ -13581,7 +13580,7 @@ Text.defaultProps = {
13581
13580
  };
13582
13581
 
13583
13582
  /***/ }),
13584
- /* 30 */
13583
+ /* 29 */
13585
13584
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
13586
13585
 
13587
13586
  "use strict";
@@ -13612,7 +13611,7 @@ var warn = function warn(condition, format) {
13612
13611
  };
13613
13612
 
13614
13613
  /***/ }),
13615
- /* 31 */
13614
+ /* 30 */
13616
13615
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
13617
13616
 
13618
13617
  "use strict";
@@ -14455,6 +14454,7 @@ Curve_Curve.defaultProps = {
14455
14454
  };
14456
14455
 
14457
14456
  /***/ }),
14457
+ /* 31 */,
14458
14458
  /* 32 */
14459
14459
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
14460
14460
 
@@ -17371,7 +17371,7 @@ module.exports = uniqBy;
17371
17371
  /* harmony import */ var _util_ShallowEqual__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(47);
17372
17372
  /* harmony import */ var _util_DOMUtils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(32);
17373
17373
  /* harmony import */ var _container_Layer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
17374
- /* harmony import */ var _component_Text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(29);
17374
+ /* harmony import */ var _component_Text__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28);
17375
17375
  /* harmony import */ var _component_Label__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(24);
17376
17376
  /* harmony import */ var _util_Global__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(20);
17377
17377
  /* harmony import */ var _util_DataUtils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1);
@@ -33986,7 +33986,7 @@ function tickFormat(start, stop, count, specifier) {
33986
33986
  /* harmony import */ var _container_Layer__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(9);
33987
33987
  /* harmony import */ var _component_Tooltip__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(80);
33988
33988
  /* harmony import */ var _component_Legend__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(78);
33989
- /* harmony import */ var _shape_Curve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(31);
33989
+ /* harmony import */ var _shape_Curve__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(30);
33990
33990
  /* harmony import */ var _shape_Cross__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(893);
33991
33991
  /* harmony import */ var _shape_Sector__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(77);
33992
33992
  /* harmony import */ var _shape_Dot__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(36);
@@ -39054,7 +39054,7 @@ var ifOverflowMatches = function ifOverflowMatches(props, value) {
39054
39054
  var CartesianUtils = __webpack_require__(38);
39055
39055
 
39056
39056
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/LogUtils.js
39057
- var LogUtils = __webpack_require__(30);
39057
+ var LogUtils = __webpack_require__(29);
39058
39058
 
39059
39059
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/types.js
39060
39060
  var types = __webpack_require__(4);
@@ -39585,7 +39585,7 @@ var band = __webpack_require__(658);
39585
39585
  var Layer = __webpack_require__(9);
39586
39586
 
39587
39587
  // EXTERNAL MODULE: ./node_modules/recharts/es6/component/Text.js
39588
- var Text = __webpack_require__(29);
39588
+ var Text = __webpack_require__(28);
39589
39589
 
39590
39590
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/ChartUtils.js + 10 modules
39591
39591
  var ChartUtils = __webpack_require__(6);
@@ -97375,7 +97375,7 @@ var FormField = Object(external_root_React_commonjs2_react_commonjs_react_amd_re
97375
97375
  ref: ref, autoComplete: autoComplete, disabled: disabled, hasAutoFocus: hasAutoFocus, id: uniqueID, maxLength: maxLength || maxCharacters, name: name, readOnly: isReadOnly, required: isRequired, spellCheck: "false", value: value, onClick: handleOnClick })),
97376
97376
  label &&
97377
97377
  (isCheckbox || isRadio) &&
97378
- hocs_withDisabledTooltip(disabled, disabledTooltip)(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", null, LabelComponent)),
97378
+ hocs_withDisabledTooltip(disabled, disabledTooltip)(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: "disabled-tooltip-wrapper" }, LabelComponent)),
97379
97379
  suffix && external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-control__suffix" }, suffix))),
97380
97380
  afterControl && external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "after-control" }, afterControl)));
97381
97381
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup, { error: error, hasError: hasError, hasLabel: Boolean(label) && !isLabelHidden, kind: kind, theme: classBinder_cx(suffix && 'has-suffix', prefix && 'has-prefix', {
@@ -97799,7 +97799,7 @@ var Select2CategorisedOptions = function (_a) {
97799
97799
  setFocusedItemIndex(-1, -1);
97800
97800
  } }, emptyValueLabel))),
97801
97801
  items.map(function (category, categoryIndex) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownMenu, Select2CategorisedOptions_assign({ key: categoryIndex, activeDescendant: name + "_option-" + categoryIndex + "-" + focusedItemIndex, id: name + "_list-" + categoryIndex, labelledBy: name + "_label", role: "listbox", title: category.label, onBlur: onBlur }, additionalProps), category.items.map(function (item, itemIndex) {
97802
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownItem, { key: itemIndex, id: name + "_option-" + categoryIndex + "-" + itemIndex, isDisabled: item.isDisabled, isFocused: itemIndex === focusedItemIndex && categoryIndex === focusedCategoryIndex, isSelected: item.value === value, perex: item.perex, role: "option", onClick: function () {
97802
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(DropdownItem, { key: itemIndex, amount: item.amount, iconBackground: item.iconBackground, iconName: item.iconName, id: name + "_option-" + categoryIndex + "-" + itemIndex, isDisabled: item.isDisabled, isFocused: itemIndex === focusedItemIndex && categoryIndex === focusedCategoryIndex, isSelected: item.value === value, perex: item.perex, role: "option", onClick: function () {
97803
97803
  setFocusedCategoryIndex(categoryIndex);
97804
97804
  setValue(item.value);
97805
97805
  setFocusedItemIndex(itemIndex, categoryIndex);
@@ -106871,19 +106871,20 @@ var Radio2_assign = (undefined && undefined.__assign) || function () {
106871
106871
 
106872
106872
 
106873
106873
 
106874
+ var classRoot = 'f-radio2';
106874
106875
  var Radio2 = function (_a) {
106875
106876
  var _b;
106876
- var _c = _a.allowEventPropagation, allowEventPropagation = _c === void 0 ? false : _c, disabledTooltip = _a.disabledTooltip, error = _a.error, help = _a.help, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isInRow, isInRow = _e === void 0 ? false : _e, _f = _a.isTitleHidden, isTitleHidden = _f === void 0 ? false : _f, items = _a.items, label = _a.label, name = _a.name, onChange = _a.onChange, testId = _a.testId, theme = _a.theme, value = _a.value;
106877
- var getCheckedIndex = function (value) { return items.findIndex(function (item) { return item.value === value; }); };
106878
- var _g = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(getCheckedIndex(value)), checked = _g[0], setChecked = _g[1];
106879
- var _h = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isFocused = _h[0], setIsFocused = _h[1];
106880
- var handleChange = function (newIndex) {
106877
+ var _c = _a.allowEventPropagation, allowEventPropagation = _c === void 0 ? false : _c, disabledTooltip = _a.disabledTooltip, error = _a.error, help = _a.help, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, _e = _a.isInRow, isInRow = _e === void 0 ? false : _e, _f = _a.isLabelTitle, isLabelTitle = _f === void 0 ? true : _f, _g = _a.isTitleHidden, isTitleHidden = _g === void 0 ? false : _g, _h = _a.items, items = _h === void 0 ? [] : _h, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, onChange = _a.onChange, testId = _a.testId, theme = _a.theme, value = _a.value;
106878
+ var getCheckedIndex = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (value) { return items.findIndex(function (item) { return item.value === value; }); }, [items]);
106879
+ var _j = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(getCheckedIndex(value)), checked = _j[0], setChecked = _j[1];
106880
+ var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isFocused = _k[0], setIsFocused = _k[1];
106881
+ var handleChange = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (newIndex) {
106881
106882
  if (!isDisabled) {
106882
106883
  onChange && onChange(items[newIndex].value);
106883
106884
  setChecked(newIndex);
106884
106885
  }
106885
- };
106886
- var handleKeyUp = function (current) {
106886
+ }, [isDisabled, items, onChange, setChecked]);
106887
+ var handleKeyUp = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (current) {
106887
106888
  var next = current;
106888
106889
  for (var i = current - 1; i >= 0; --i) {
106889
106890
  if (!items[i].disabled) {
@@ -106894,8 +106895,8 @@ var Radio2 = function (_a) {
106894
106895
  if (next !== current) {
106895
106896
  handleChange(next);
106896
106897
  }
106897
- };
106898
- var handleKeyDown = function (current) {
106898
+ }, [handleChange, items]);
106899
+ var handleKeyDown = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (current) {
106899
106900
  var next = current;
106900
106901
  for (var i = current + 1; i < items.length; ++i) {
106901
106902
  if (!items[i].disabled) {
@@ -106906,18 +106907,18 @@ var Radio2 = function (_a) {
106906
106907
  if (next !== current) {
106907
106908
  handleChange(next);
106908
106909
  }
106909
- };
106910
- var handleOnClick = function (checkedValue) { return function (event) {
106910
+ }, [handleChange, items]);
106911
+ var handleOnClick = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (checkedValue) { return function (event) {
106911
106912
  var newCheckedIndex = getCheckedIndex(checkedValue);
106912
106913
  handleChange(newCheckedIndex);
106913
106914
  if (!allowEventPropagation) {
106914
106915
  event.stopPropagation();
106915
106916
  }
106916
- }; };
106917
+ }; }, [allowEventPropagation, getCheckedIndex, handleChange]);
106917
106918
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
106918
106919
  setChecked(getCheckedIndex(value));
106919
- }, [value]);
106920
- var handleOnKeyPress = function (event) {
106920
+ }, [value, getCheckedIndex, setChecked]);
106921
+ var handleOnKeyPress = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (event) {
106921
106922
  var key = event.key;
106922
106923
  if (key === KEYS.ArrowDown || key === KEYS.ArrowRight) {
106923
106924
  event.preventDefault();
@@ -106934,7 +106935,8 @@ var Radio2 = function (_a) {
106934
106935
  if (!allowEventPropagation) {
106935
106936
  event.stopPropagation();
106936
106937
  }
106937
- };
106938
+ }, [allowEventPropagation, checked, handleChange, handleKeyDown, handleKeyUp]);
106939
+ var handleSetIsFocused = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (value) { return function () { return setIsFocused(value); }; }, []);
106938
106940
  var formGroupProps = {
106939
106941
  error: error,
106940
106942
  disabledTooltip: disabledTooltip,
@@ -106944,18 +106946,19 @@ var Radio2 = function (_a) {
106944
106946
  name: name,
106945
106947
  theme: theme
106946
106948
  };
106947
- var classRoot = 'f-radio2';
106948
106949
  var errorMessageId = !!error ? name + "_errorMessage" : undefined;
106950
+ var isLabel = !isTitleHidden && !!label;
106949
106951
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Radio2_assign({}, formGroupProps),
106950
106952
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("fieldset", { className: classBinder_cx(classRoot, theme) },
106951
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("legend", { className: classBinder_cx(classRoot + "__legend", { 'u-vHide': isTitleHidden }), id: "label" }, label),
106952
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("ul", { "aria-activedescendant": items[checked] ? name + "_value-" + items[checked].value : '', "aria-disabled": isDisabled ? 'true' : 'false', "aria-labelledby": "label", className: classBinder_cx(classRoot + "__list", (_b = {}, _b[classRoot + "__list--inRow"] = isInRow, _b)), "data-testid": testId, role: "radiogroup", tabIndex: 0, onBlur: function () { return setIsFocused(false); }, onFocus: function () { return setIsFocused(true); }, onKeyDown: isDisabled ? es_noop : handleOnKeyPress }, items.map(function (item, index) {
106953
+ isLabel &&
106954
+ (isLabelTitle ? (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("legend", { className: classRoot + "__legend", id: "label" }, label)) : (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Label2, { identifier: name + "_label", labelTooltip: labelTooltip }, label))),
106955
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("ul", { "aria-activedescendant": items[checked] ? name + "_value-" + items[checked].value : '', "aria-disabled": isDisabled ? 'true' : 'false', "aria-labelledby": "label", className: classBinder_cx(classRoot + "__list", (_b = {}, _b[classRoot + "__list--inRow"] = isInRow, _b)), "data-testid": testId, role: "radiogroup", tabIndex: 0, onBlur: handleSetIsFocused(false), onFocus: handleSetIsFocused(true), onKeyDown: isDisabled ? noop : handleOnKeyPress }, items.map(function (item, index) {
106953
106956
  var _a;
106954
106957
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("li", { key: "radio_value" + item.value, "aria-checked": checked === index ? 'true' : 'false', "aria-describedby": errorMessageId, "aria-disabled": item.disabled ? 'true' : 'false', className: classBinder_cx(classRoot + "__item", (_a = {},
106955
106958
  _a[classRoot + "__item--focus"] = isFocused && (checked === index || (checked === -1 && index === 0)),
106956
106959
  _a[classRoot + "__item--checked"] = checked === index,
106957
106960
  _a[classRoot + "__item--disabled"] = item.disabled || isDisabled,
106958
- _a)), id: name + "_value-" + item.value, role: "radio", onClick: item.disabled ? es_noop : handleOnClick(item.value) },
106961
+ _a)), id: name + "_value-" + item.value, role: "radio", onClick: item.disabled ? noop : handleOnClick(item.value) },
106959
106962
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classRoot + "__indicator" }),
106960
106963
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classRoot + "__text" }, item.label)));
106961
106964
  })))));
@@ -107773,7 +107776,7 @@ var withPolyfill_default = /*#__PURE__*/__webpack_require__.n(withPolyfill);
107773
107776
  var DataUtils = __webpack_require__(1);
107774
107777
 
107775
107778
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/LogUtils.js
107776
- var LogUtils = __webpack_require__(30);
107779
+ var LogUtils = __webpack_require__(29);
107777
107780
 
107778
107781
  // CONCATENATED MODULE: ./node_modules/recharts/es6/component/ResponsiveContainer.js
107779
107782
  function ResponsiveContainer_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ResponsiveContainer_typeof = function _typeof(obj) { return typeof obj; }; } else { ResponsiveContainer_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ResponsiveContainer_typeof(obj); }
@@ -107976,7 +107979,7 @@ ResponsiveContainer_ResponsiveContainer.defaultProps = {
107976
107979
  var generateCategoricalChart = __webpack_require__(635);
107977
107980
 
107978
107981
  // EXTERNAL MODULE: ./node_modules/lodash/isEqual.js
107979
- var isEqual = __webpack_require__(28);
107982
+ var isEqual = __webpack_require__(27);
107980
107983
  var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual);
107981
107984
 
107982
107985
  // EXTERNAL MODULE: ./node_modules/lodash/isNaN.js
@@ -108007,7 +108010,7 @@ var isArray_default = /*#__PURE__*/__webpack_require__.n(lodash_isArray);
108007
108010
  var es6 = __webpack_require__(23);
108008
108011
 
108009
108012
  // EXTERNAL MODULE: ./node_modules/recharts/es6/shape/Curve.js + 12 modules
108010
- var Curve = __webpack_require__(31);
108013
+ var Curve = __webpack_require__(30);
108011
108014
 
108012
108015
  // EXTERNAL MODULE: ./node_modules/recharts/es6/shape/Dot.js
108013
108016
  var Dot = __webpack_require__(36);
@@ -111368,7 +111371,7 @@ var Polygon_Polygon = /*#__PURE__*/function (_PureComponent) {
111368
111371
  return Polygon;
111369
111372
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["PureComponent"]);
111370
111373
  // EXTERNAL MODULE: ./node_modules/recharts/es6/component/Text.js
111371
- var component_Text = __webpack_require__(29);
111374
+ var component_Text = __webpack_require__(28);
111372
111375
 
111373
111376
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/PolarUtils.js
111374
111377
  var PolarUtils = __webpack_require__(12);