@mmb-digital/ds-lilly 0.3.10 → 0.3.13

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);
@@ -96928,62 +96928,34 @@ var Tile = function (_a) {
96928
96928
 
96929
96929
 
96930
96930
  // CONCATENATED MODULE: ./src/components/Components/Toast/Toast.hook.ts
96931
- var Toast_hook_assign = (undefined && undefined.__assign) || function () {
96932
- Toast_hook_assign = Object.assign || function(t) {
96933
- for (var s, i = 1, n = arguments.length; i < n; i++) {
96934
- s = arguments[i];
96935
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
96936
- t[p] = s[p];
96937
- }
96938
- return t;
96939
- };
96940
- return Toast_hook_assign.apply(this, arguments);
96931
+ var ADD_TOAST_EVENT = 'toast/add';
96932
+ var REMOVE_TOAST_EVENT = 'toast/remove';
96933
+ var REMOVE_ALL_TOASTS_EVENT = 'toast/removeAll';
96934
+ var triggerEvent = function (eventType, data) {
96935
+ try {
96936
+ var event_1 = new CustomEvent(eventType, { detail: data });
96937
+ document.dispatchEvent(event_1);
96938
+ }
96939
+ catch (err) {
96940
+ var event_2 = document.createEvent('CustomEvent');
96941
+ event_2.initCustomEvent(eventType, true, false, data);
96942
+ document.dispatchEvent(event_2);
96943
+ }
96941
96944
  };
96942
- var Toast_hook_rest = (undefined && undefined.__rest) || function (s, e) {
96943
- var t = {};
96944
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
96945
- t[p] = s[p];
96946
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
96947
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
96948
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
96949
- t[p[i]] = s[p[i]];
96950
- }
96951
- return t;
96945
+ var addToast = function (toast) {
96946
+ triggerEvent(ADD_TOAST_EVENT, toast);
96952
96947
  };
96953
- var Toast_hook_spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
96954
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
96955
- to[j] = from[i];
96956
- return to;
96948
+ var removeToast = function (toastId) {
96949
+ triggerEvent(REMOVE_TOAST_EVENT, toastId);
96957
96950
  };
96958
-
96959
- var Toast_hook_toasts = [];
96960
- var useToast = function (_a) {
96961
- var _b = _a === void 0 ? {} : _a, autoCloseMilliseconds = _b.autoCloseMilliseconds;
96962
- var _c = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useReducer"])(function (x) { return x + 1; }, 0), forceUpdate = _c[1];
96963
- var removeAllToasts = function () {
96964
- Toast_hook_toasts = [];
96965
- forceUpdate();
96966
- };
96967
- var removeToast = function (toastId) {
96968
- Toast_hook_toasts = Toast_hook_toasts.filter(function (toast) { return toast.toastId !== toastId; });
96969
- forceUpdate();
96970
- };
96971
- var addToast = function (toast) {
96972
- var toastAutoCloseMilliseconds = toast.autoCloseMilliseconds, rest = Toast_hook_rest(toast, ["autoCloseMilliseconds"]);
96973
- var toastId = rest.toastId || "toast-" + Math.random().toString();
96974
- Toast_hook_toasts = Toast_hook_spreadArray([Toast_hook_assign(Toast_hook_assign({}, rest), { toastId: toastId })], Toast_hook_toasts);
96975
- forceUpdate();
96976
- if ((autoCloseMilliseconds || toastAutoCloseMilliseconds) && toastAutoCloseMilliseconds !== 0) {
96977
- setTimeout(function () { return removeToast(toastId); }, autoCloseMilliseconds || toastAutoCloseMilliseconds);
96978
- }
96979
- };
96980
- return {
96981
- toasts: Toast_hook_toasts,
96982
- addToast: addToast,
96983
- removeToast: removeToast,
96984
- removeAllToasts: removeAllToasts
96985
- };
96951
+ var removeAllToasts = function () {
96952
+ triggerEvent(REMOVE_ALL_TOASTS_EVENT);
96986
96953
  };
96954
+ var useToast = function () { return ({
96955
+ addToast: addToast,
96956
+ removeToast: removeToast,
96957
+ removeAllToasts: removeAllToasts
96958
+ }); };
96987
96959
 
96988
96960
  // CONCATENATED MODULE: ./src/components/Components/Toast/Toast.tsx
96989
96961
  var Toast_assign = (undefined && undefined.__assign) || function () {
@@ -97008,18 +96980,41 @@ var Toast_rest = (undefined && undefined.__rest) || function (s, e) {
97008
96980
  }
97009
96981
  return t;
97010
96982
  };
96983
+ var Toast_spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
96984
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
96985
+ to[j] = from[i];
96986
+ return to;
96987
+ };
97011
96988
 
97012
96989
 
97013
96990
 
97014
96991
 
97015
- var ToastContainer = function () {
97016
- var _a = useToast(), removeAllToasts = _a.removeAllToasts, removeToast = _a.removeToast, toasts = _a.toasts;
97017
- Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return function () {
97018
- removeAllToasts();
97019
- }; }, []);
97020
- var handleCloseToast = function (id) { return function () {
97021
- removeToast(id);
96992
+
96993
+ var ToastContainer = function (_a) {
96994
+ var autoCloseMilliseconds = _a.autoCloseMilliseconds;
96995
+ var _b = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])([]), toasts = _b[0], setToasts = _b[1];
96996
+ var handleCloseToast = function (toastId) { return function () {
96997
+ setToasts(function (prev) { return prev.filter(function (toast) { return toast.toastId !== toastId; }); });
97022
96998
  }; };
96999
+ var handleAddToast = function (event) {
97000
+ var _a = event.detail, toastAutoCloseMilliseconds = _a.autoCloseMilliseconds, rest = Toast_rest(_a, ["autoCloseMilliseconds"]);
97001
+ var toastId = rest.toastId || "toast-" + Math.random().toString();
97002
+ setToasts(function (prev) { return Toast_spreadArray([Toast_assign(Toast_assign({}, rest), { toastId: toastId })], prev); });
97003
+ if ((autoCloseMilliseconds || toastAutoCloseMilliseconds) && toastAutoCloseMilliseconds !== 0) {
97004
+ setTimeout(function () { return handleCloseToast(toastId)(); }, autoCloseMilliseconds || toastAutoCloseMilliseconds);
97005
+ }
97006
+ };
97007
+ var handleRemoveToast = function (event) { return handleCloseToast(event.detail)(); };
97008
+ var handleRemoveAllToasts = function () { return setToasts([]); };
97009
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97010
+ // @ts-ignore
97011
+ useEventListener(ADD_TOAST_EVENT, handleAddToast, document);
97012
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97013
+ // @ts-ignore
97014
+ useEventListener(REMOVE_TOAST_EVENT, handleRemoveToast, document);
97015
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
97016
+ // @ts-ignore
97017
+ useEventListener(REMOVE_ALL_TOASTS_EVENT, handleRemoveAllToasts, document);
97023
97018
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "c-toast__container" },
97024
97019
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(AnimatePresence, null, toasts.map(function (_a) {
97025
97020
  var content = _a.content, toastId = _a.toastId, props = Toast_rest(_a, ["content", "toastId"]);
@@ -97799,7 +97794,7 @@ var Select2CategorisedOptions = function (_a) {
97799
97794
  setFocusedItemIndex(-1, -1);
97800
97795
  } }, emptyValueLabel))),
97801
97796
  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 () {
97797
+ 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
97798
  setFocusedCategoryIndex(categoryIndex);
97804
97799
  setValue(item.value);
97805
97800
  setFocusedItemIndex(itemIndex, categoryIndex);
@@ -106871,19 +106866,20 @@ var Radio2_assign = (undefined && undefined.__assign) || function () {
106871
106866
 
106872
106867
 
106873
106868
 
106869
+ var classRoot = 'f-radio2';
106874
106870
  var Radio2 = function (_a) {
106875
106871
  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) {
106872
+ 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;
106873
+ 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]);
106874
+ var _j = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(getCheckedIndex(value)), checked = _j[0], setChecked = _j[1];
106875
+ var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isFocused = _k[0], setIsFocused = _k[1];
106876
+ var handleChange = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (newIndex) {
106881
106877
  if (!isDisabled) {
106882
106878
  onChange && onChange(items[newIndex].value);
106883
106879
  setChecked(newIndex);
106884
106880
  }
106885
- };
106886
- var handleKeyUp = function (current) {
106881
+ }, [isDisabled, items, onChange, setChecked]);
106882
+ var handleKeyUp = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (current) {
106887
106883
  var next = current;
106888
106884
  for (var i = current - 1; i >= 0; --i) {
106889
106885
  if (!items[i].disabled) {
@@ -106894,8 +106890,8 @@ var Radio2 = function (_a) {
106894
106890
  if (next !== current) {
106895
106891
  handleChange(next);
106896
106892
  }
106897
- };
106898
- var handleKeyDown = function (current) {
106893
+ }, [handleChange, items]);
106894
+ var handleKeyDown = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (current) {
106899
106895
  var next = current;
106900
106896
  for (var i = current + 1; i < items.length; ++i) {
106901
106897
  if (!items[i].disabled) {
@@ -106906,18 +106902,18 @@ var Radio2 = function (_a) {
106906
106902
  if (next !== current) {
106907
106903
  handleChange(next);
106908
106904
  }
106909
- };
106910
- var handleOnClick = function (checkedValue) { return function (event) {
106905
+ }, [handleChange, items]);
106906
+ var handleOnClick = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (checkedValue) { return function (event) {
106911
106907
  var newCheckedIndex = getCheckedIndex(checkedValue);
106912
106908
  handleChange(newCheckedIndex);
106913
106909
  if (!allowEventPropagation) {
106914
106910
  event.stopPropagation();
106915
106911
  }
106916
- }; };
106912
+ }; }, [allowEventPropagation, getCheckedIndex, handleChange]);
106917
106913
  Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () {
106918
106914
  setChecked(getCheckedIndex(value));
106919
- }, [value]);
106920
- var handleOnKeyPress = function (event) {
106915
+ }, [value, getCheckedIndex, setChecked]);
106916
+ var handleOnKeyPress = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (event) {
106921
106917
  var key = event.key;
106922
106918
  if (key === KEYS.ArrowDown || key === KEYS.ArrowRight) {
106923
106919
  event.preventDefault();
@@ -106934,7 +106930,8 @@ var Radio2 = function (_a) {
106934
106930
  if (!allowEventPropagation) {
106935
106931
  event.stopPropagation();
106936
106932
  }
106937
- };
106933
+ }, [allowEventPropagation, checked, handleChange, handleKeyDown, handleKeyUp]);
106934
+ var handleSetIsFocused = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useCallback"])(function (value) { return function () { return setIsFocused(value); }; }, []);
106938
106935
  var formGroupProps = {
106939
106936
  error: error,
106940
106937
  disabledTooltip: disabledTooltip,
@@ -106944,18 +106941,19 @@ var Radio2 = function (_a) {
106944
106941
  name: name,
106945
106942
  theme: theme
106946
106943
  };
106947
- var classRoot = 'f-radio2';
106948
106944
  var errorMessageId = !!error ? name + "_errorMessage" : undefined;
106945
+ var isLabel = !isTitleHidden && !!label;
106949
106946
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Radio2_assign({}, formGroupProps),
106950
106947
  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) {
106948
+ isLabel &&
106949
+ (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))),
106950
+ 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
106951
  var _a;
106954
106952
  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
106953
  _a[classRoot + "__item--focus"] = isFocused && (checked === index || (checked === -1 && index === 0)),
106956
106954
  _a[classRoot + "__item--checked"] = checked === index,
106957
106955
  _a[classRoot + "__item--disabled"] = item.disabled || isDisabled,
106958
- _a)), id: name + "_value-" + item.value, role: "radio", onClick: item.disabled ? es_noop : handleOnClick(item.value) },
106956
+ _a)), id: name + "_value-" + item.value, role: "radio", onClick: item.disabled ? noop : handleOnClick(item.value) },
106959
106957
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classRoot + "__indicator" }),
106960
106958
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classRoot + "__text" }, item.label)));
106961
106959
  })))));
@@ -107773,7 +107771,7 @@ var withPolyfill_default = /*#__PURE__*/__webpack_require__.n(withPolyfill);
107773
107771
  var DataUtils = __webpack_require__(1);
107774
107772
 
107775
107773
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/LogUtils.js
107776
- var LogUtils = __webpack_require__(30);
107774
+ var LogUtils = __webpack_require__(29);
107777
107775
 
107778
107776
  // CONCATENATED MODULE: ./node_modules/recharts/es6/component/ResponsiveContainer.js
107779
107777
  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 +107974,7 @@ ResponsiveContainer_ResponsiveContainer.defaultProps = {
107976
107974
  var generateCategoricalChart = __webpack_require__(635);
107977
107975
 
107978
107976
  // EXTERNAL MODULE: ./node_modules/lodash/isEqual.js
107979
- var isEqual = __webpack_require__(28);
107977
+ var isEqual = __webpack_require__(27);
107980
107978
  var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual);
107981
107979
 
107982
107980
  // EXTERNAL MODULE: ./node_modules/lodash/isNaN.js
@@ -108007,7 +108005,7 @@ var isArray_default = /*#__PURE__*/__webpack_require__.n(lodash_isArray);
108007
108005
  var es6 = __webpack_require__(23);
108008
108006
 
108009
108007
  // EXTERNAL MODULE: ./node_modules/recharts/es6/shape/Curve.js + 12 modules
108010
- var Curve = __webpack_require__(31);
108008
+ var Curve = __webpack_require__(30);
108011
108009
 
108012
108010
  // EXTERNAL MODULE: ./node_modules/recharts/es6/shape/Dot.js
108013
108011
  var Dot = __webpack_require__(36);
@@ -111368,7 +111366,7 @@ var Polygon_Polygon = /*#__PURE__*/function (_PureComponent) {
111368
111366
  return Polygon;
111369
111367
  }(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["PureComponent"]);
111370
111368
  // EXTERNAL MODULE: ./node_modules/recharts/es6/component/Text.js
111371
- var component_Text = __webpack_require__(29);
111369
+ var component_Text = __webpack_require__(28);
111372
111370
 
111373
111371
  // EXTERNAL MODULE: ./node_modules/recharts/es6/util/PolarUtils.js
111374
111372
  var PolarUtils = __webpack_require__(12);
@@ -1,2 +1,12 @@
1
- export declare const ToastContainer: () => JSX.Element;
1
+ import { ReactNode } from 'react';
2
+ import { AlertPropsType } from '..';
3
+ export declare type ToastType = Omit<AlertPropsType, 'alertRef' | 'children'> & {
4
+ autoCloseMilliseconds?: number;
5
+ toastId?: string;
6
+ content?: ReactNode;
7
+ };
8
+ export interface ToastContainerPropsType {
9
+ autoCloseMilliseconds?: number;
10
+ }
11
+ export declare const ToastContainer: ({ autoCloseMilliseconds }: ToastContainerPropsType) => JSX.Element;
2
12
  //# sourceMappingURL=Toast.d.ts.map
@@ -1,18 +1,12 @@
1
- import { ReactNode } from 'react';
2
- import { AlertPropsType } from '..';
3
- export declare type ToastType = Omit<AlertPropsType, 'alertRef' | 'children'> & {
4
- autoCloseMilliseconds?: number;
5
- toastId: string;
6
- content?: ReactNode;
7
- };
8
- export interface ToastHookType {
9
- toasts: ToastType[];
1
+ import { ToastType } from '.';
2
+ export declare const ADD_TOAST_EVENT = "toast/add";
3
+ export declare const REMOVE_TOAST_EVENT = "toast/remove";
4
+ export declare const REMOVE_ALL_TOASTS_EVENT = "toast/removeAll";
5
+ interface UseToastType {
10
6
  addToast(toast: ToastType): void;
11
- removeAllToasts(): void;
12
7
  removeToast(toastId?: string): void;
8
+ removeAllToasts(): void;
13
9
  }
14
- export interface UseToastHookPropsType {
15
- autoCloseMilliseconds?: number;
16
- }
17
- export declare const useToast: ({ autoCloseMilliseconds }?: UseToastHookPropsType) => ToastHookType;
10
+ export declare const useToast: () => UseToastType;
11
+ export {};
18
12
  //# sourceMappingURL=Toast.hook.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export * from './Toast';
2
- export * from './Toast.hook';
2
+ export { useToast } from './Toast.hook';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,13 +1,18 @@
1
1
  import { FormField2PropsType } from '../../../types';
2
+ declare type RadioItemValue = string | number | boolean;
2
3
  export interface Radio2PropsType extends FormField2PropsType {
3
4
  items: RadioItem[];
4
5
  isInRow?: boolean;
6
+ /** @deprecated please use empty label */
5
7
  isTitleHidden?: boolean;
8
+ /** for backward compatibility is default value TRUE will be removed in the future */
9
+ isLabelTitle?: boolean;
6
10
  }
7
11
  export declare type RadioItem = {
8
12
  label: string;
9
- value: string | boolean | number;
13
+ value: RadioItemValue;
10
14
  disabled?: boolean;
11
15
  };
12
- export declare const Radio2: ({ allowEventPropagation, disabledTooltip, error, help, isDisabled, isInRow, isTitleHidden, items, label, name, onChange, testId, theme, value }: Radio2PropsType) => JSX.Element;
16
+ export declare const Radio2: ({ allowEventPropagation, disabledTooltip, error, help, isDisabled, isInRow, isLabelTitle, isTitleHidden, items, label, labelTooltip, name, onChange, testId, theme, value }: Radio2PropsType) => JSX.Element;
17
+ export {};
13
18
  //# sourceMappingURL=Radio2.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.3.10",
3
+ "version": "0.3.13",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,