@mmb-digital/ds-lilly 0.0.1-alpha.322 → 0.0.1-alpha.326

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
@@ -8585,7 +8585,8 @@ function Layer(props) {
8585
8585
  }
8586
8586
 
8587
8587
  /***/ }),
8588
- /* 12 */
8588
+ /* 12 */,
8589
+ /* 13 */
8589
8590
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
8590
8591
 
8591
8592
  "use strict";
@@ -8620,7 +8621,6 @@ function initInterpolator(domain, interpolator) {
8620
8621
 
8621
8622
 
8622
8623
  /***/ }),
8623
- /* 13 */,
8624
8624
  /* 14 */
8625
8625
  /***/ (function(module, exports, __webpack_require__) {
8626
8626
 
@@ -11236,7 +11236,7 @@ module.exports = isObject;
11236
11236
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return linear; });
11237
11237
  /* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(888);
11238
11238
  /* harmony import */ var _continuous_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
11239
- /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12);
11239
+ /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
11240
11240
  /* harmony import */ var _tickFormat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(624);
11241
11241
 
11242
11242
 
@@ -16720,7 +16720,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__67__;
16720
16720
  "use strict";
16721
16721
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return implicit; });
16722
16722
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ordinal; });
16723
- /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
16723
+ /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
16724
16724
 
16725
16725
 
16726
16726
  const implicit = Symbol("implicit");
@@ -32854,7 +32854,7 @@ function nice(domain, interval) {
32854
32854
  var continuous = __webpack_require__(16);
32855
32855
 
32856
32856
  // EXTERNAL MODULE: ./node_modules/d3-scale/src/init.js
32857
- var init = __webpack_require__(12);
32857
+ var init = __webpack_require__(13);
32858
32858
 
32859
32859
  // CONCATENATED MODULE: ./node_modules/d3-scale/src/log.js
32860
32860
 
@@ -39310,7 +39310,7 @@ __webpack_require__.d(__webpack_exports__, "b", function() { return /* binding *
39310
39310
  });
39311
39311
 
39312
39312
  // EXTERNAL MODULE: ./node_modules/d3-scale/src/init.js
39313
- var init = __webpack_require__(12);
39313
+ var init = __webpack_require__(13);
39314
39314
 
39315
39315
  // EXTERNAL MODULE: ./node_modules/d3-scale/src/ordinal.js
39316
39316
  var ordinal = __webpack_require__(68);
@@ -80091,6 +80091,7 @@ __webpack_require__.d(__webpack_exports__, "SelectMenu", function() { return /*
80091
80091
  __webpack_require__.d(__webpack_exports__, "SelectOption", function() { return /* reexport */ SelectOption; });
80092
80092
  __webpack_require__.d(__webpack_exports__, "Slider", function() { return /* reexport */ Slider_Slider; });
80093
80093
  __webpack_require__.d(__webpack_exports__, "Textarea", function() { return /* reexport */ Textarea; });
80094
+ __webpack_require__.d(__webpack_exports__, "Textarea2", function() { return /* reexport */ Textarea2; });
80094
80095
  __webpack_require__.d(__webpack_exports__, "TextareaControl", function() { return /* reexport */ TextareaControl; });
80095
80096
  __webpack_require__.d(__webpack_exports__, "TextInput", function() { return /* reexport */ TextInput; });
80096
80097
  __webpack_require__.d(__webpack_exports__, "TextInputControl", function() { return /* reexport */ TextInputControl; });
@@ -96998,6 +96999,9 @@ var IntegerInput_rest = (undefined && undefined.__rest) || function (s, e) {
96998
96999
 
96999
97000
 
97000
97001
 
97002
+ /**
97003
+ * @deprecated This component is **deprecated** please use **Input2**
97004
+ */
97001
97005
  var IntegerInput = function (_a) {
97002
97006
  var _b = _a.allowNegative, allowNegative = _b === void 0 ? false : _b, _c = _a.integerPlaces, integerPlaces = _c === void 0 ? 0 : _c, _d = _a.thousandSeparator, customThousandSeparator = _d === void 0 ? '' : _d, _e = _a.allowLeadingZeros, allowLeadingZeros = _e === void 0 ? false : _e, value = _a.value, maxValue = _a.maxValue, _f = _a.onChange, onChange = _f === void 0 ? es_noop : _f, _g = _a.onBlur, onBlur = _g === void 0 ? es_noop : _g, rest = IntegerInput_rest(_a, ["allowNegative", "integerPlaces", "thousandSeparator", "allowLeadingZeros", "value", "maxValue", "onChange", "onBlur"]);
97003
97007
  var thousandSeparator = es_defaultToEmptyString(customThousandSeparator);
@@ -97222,12 +97226,13 @@ var Label2 = function (_a) {
97222
97226
 
97223
97227
 
97224
97228
  var FormGroup2 = function (_a) {
97225
- var children = _a.children, error = _a.error, _b = _a.hasError, hasError = _b === void 0 ? false : _b, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, theme = _a.theme;
97229
+ var charCounter = _a.charCounter, children = _a.children, error = _a.error, _b = _a.hasError, hasError = _b === void 0 ? false : _b, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, name = _a.name, theme = _a.theme;
97226
97230
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-group2', { 'f-group2--disabled': isDisabled, 'f-group2--error': hasError }, theme) },
97227
97231
  label && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Label2, { htmlFor: name, identifier: name + "_label", labelTooltip: labelTooltip }, label)),
97228
97232
  children,
97229
- help && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlHelp", id: name + "_help" }, help)),
97230
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-live": "assertive", className: "f-validationMsg f-validationMsg--invalid", id: name + "_errorMessage" }, error)));
97233
+ charCounter && charCounter.max > 0 && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-controlCounter', { 'f-controlCounter--error': charCounter.length > charCounter.max }) }, (charCounter.length || 0) + " / " + charCounter.max)),
97234
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { "aria-live": "assertive", className: "f-validationMsg f-validationMsg--invalid", id: name + "_errorMessage" }, error),
97235
+ help && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlHelp", id: name + "_help" }, help))));
97231
97236
  };
97232
97237
 
97233
97238
  // CONCATENATED MODULE: ./src/components/Form/Select2/_elements_/Select2CategorisedOptions.tsx
@@ -102457,6 +102462,9 @@ var TextInput_assign = (undefined && undefined.__assign) || function () {
102457
102462
  };
102458
102463
 
102459
102464
 
102465
+ /**
102466
+ * @deprecated This component is **deprecated** please use **Input2**
102467
+ */
102460
102468
  var TextInput = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["forwardRef"])(function (props, ref) { return (
102461
102469
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102462
102470
  // @ts-ignore
@@ -102942,6 +102950,9 @@ var getGroupedItemsLength = function (groupedItems) {
102942
102950
  groupedItems.map(function (groupedItem) { return (length = length + groupedItem.items.length); });
102943
102951
  return length;
102944
102952
  };
102953
+ /**
102954
+ * @deprecated This component is **deprecated** please use **Select2**
102955
+ */
102945
102956
  var BankAccountSelect = function (_a) {
102946
102957
  var _b = _a.hasAlwaysValue, hasAlwaysValue = _b === void 0 ? true : _b, hasAutocomplete = _a.hasAutocomplete, items = _a.items, rest = BankAccountSelect_rest(_a, ["hasAlwaysValue", "hasAutocomplete", "items"]);
102947
102958
  var itemsLength = !hasGroups(items) ? items.length : getGroupedItemsLength(items);
@@ -103156,6 +103167,9 @@ var DecimalInput_rest = (undefined && undefined.__rest) || function (s, e) {
103156
103167
 
103157
103168
 
103158
103169
 
103170
+ /**
103171
+ * @deprecated This component is **deprecated** please use **Input2**
103172
+ */
103159
103173
  var DecimalInput = function (_a) {
103160
103174
  var _b = _a.allowNegative, allowNegative = _b === void 0 ? false : _b, _c = _a.allowLeadingZeroes, allowLeadingZeroes = _c === void 0 ? true : _c, customDecimalSeparator = _a.decimalSeparator, _d = _a.decimalPlaces, decimalPlaces = _d === void 0 ? 2 : _d, _e = _a.integerPlaces, integerPlaces = _e === void 0 ? 0 : _e, _f = _a.thousandSeparator, customThousandSeparator = _f === void 0 ? ' ' : _f, value = _a.value, _g = _a.onChange, onChange = _g === void 0 ? es_noop : _g, _h = _a.onBlur, onBlur = _h === void 0 ? es_noop : _h, rest = DecimalInput_rest(_a, ["allowNegative", "allowLeadingZeroes", "decimalSeparator", "decimalPlaces", "integerPlaces", "thousandSeparator", "value", "onChange", "onBlur"]);
103161
103175
  var thousandSeparator = es_defaultToEmptyString(customThousandSeparator);
@@ -104460,23 +104474,26 @@ function es_reducer(state, action) {
104460
104474
  // CONCATENATED MODULE: ./src/components/Form/FileUpload/_parts_/FileList.tsx
104461
104475
 
104462
104476
 
104477
+
104463
104478
  var FileList = function (_a) {
104464
- var files = _a.files, handleOnDelete = _a.handleOnDelete, _b = _a.hideImagePreview, hideImagePreview = _b === void 0 ? false : _b, _c = _a.messages, ariaForDelete = _c.ariaForDelete, ariaForShow = _c.ariaForShow, errorMessages = _c.multipleUploaderErrors, onShow = _a.onShow, _d = _a.selectMultiple, selectMultiple = _d === void 0 ? false : _d, uploadProgress = _a.uploadProgress, _e = _a.withProgressBar, withProgressBar = _e === void 0 ? false : _e;
104479
+ var files = _a.files, handleOnDelete = _a.handleOnDelete, _b = _a.hideImagePreview, hideImagePreview = _b === void 0 ? false : _b, _c = _a.messages, ariaForDelete = _c.ariaForDelete, errorMessages = _c.multipleUploaderErrors, onShow = _a.onShow, _d = _a.selectMultiple, selectMultiple = _d === void 0 ? false : _d, uploadProgress = _a.uploadProgress, _e = _a.withProgressBar, withProgressBar = _e === void 0 ? false : _e;
104465
104480
  var handleOnShow = function (id) { return function () { return onShow && onShow(id); }; };
104466
104481
  var handleOnDeleteAction = function (id) { return function () { return handleOnDelete && handleOnDelete(id); }; };
104467
104482
  var renderImage = function (file) {
104468
104483
  if (!file.src)
104469
104484
  return external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], null);
104470
104485
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-fileUpload__imagePreview') },
104471
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("img", { alt: "img - " + file.name, className: "file-img", src: file.src }),
104486
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("img", { alt: "", className: "file-img", src: file.src }),
104472
104487
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-fileUpload__imageOverlay" }),
104473
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isRounded: true, ariaLabel: ariaForShow + " " + file.name, onlyIconName: "search", theme: "f-fileUpload__overlaySearch", onClick: handleOnShow(file.id) }),
104488
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isRounded: true, "aria-hidden": "true", ariaLabel: "", onlyIconName: "search", theme: "f-fileUpload__overlaySearch", onClick: handleOnShow(file.id) }),
104474
104489
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isRounded: true, ariaLabel: ariaForDelete + " " + file.name, onlyIconName: "bin", theme: "f-fileUpload__overlayDelete", onClick: handleOnDeleteAction(file.id) })));
104475
104490
  };
104476
- var isFileUploading = function (file) { return uploadProgress && uploadProgress[file.id]; };
104491
+ var isFileUploading = function (file) { return uploadProgress && !es_isNil(uploadProgress[file.id]); };
104492
+ var getUploadProgress = function (file) { return (uploadProgress && uploadProgress[file.id]) || 0; };
104477
104493
  var renderList = function (file) {
104478
104494
  var _a, _b, _c;
104479
104495
  var uploading = isFileUploading(file);
104496
+ var progress = getUploadProgress(file);
104480
104497
  var hasErrors = file.errors && ((_a = file.errors) === null || _a === void 0 ? void 0 : _a.length) > 0;
104481
104498
  var iconName = undefined;
104482
104499
  if (hasErrors) {
@@ -104505,8 +104522,8 @@ var FileList = function (_a) {
104505
104522
  hasErrors && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-fileUpload__errorTitle') },
104506
104523
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("strong", null, file.name + " " + (errorMessages === null || errorMessages === void 0 ? void 0 : errorMessages.didNotUpload)))),
104507
104524
  !hasErrors && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["Fragment"], null,
104508
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, ariaLabel: ariaForShow, theme: 'f-fileUpload__fileName', type: "transparent", onClick: handleOnShow(file.id) }, file.name),
104509
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { ariaLabel: ariaForDelete, color: "red", onlyIconName: uploading ? 'close' : 'bin', type: "transparent", onClick: function () { return handleOnDelete(file.id); } }))),
104525
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { isSmall: true, "aria-hidden": "true", ariaLabel: "", theme: 'f-fileUpload__fileName', type: "transparent", onClick: handleOnShow(file.id) }, file.name),
104526
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Button, { ariaLabel: ariaForDelete + " " + file.name, color: "red", onlyIconName: uploading ? 'close' : 'bin', type: "transparent", onClick: function () { return handleOnDelete(file.id); } }))),
104510
104527
  hasErrors &&
104511
104528
  ((_c = file === null || file === void 0 ? void 0 : file.errors) === null || _c === void 0 ? void 0 : _c.map(function (error, index) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { key: index, className: classBinder_cx('f-fileUpload__errorDesc') },
104512
104529
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Text, { component: "div", size: "xSmall", type: "secondary" }, errorMessages &&
@@ -104515,7 +104532,7 @@ var FileList = function (_a) {
104515
104532
  errorMessages[error.code]))); })),
104516
104533
  uploading && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-fileUpload__progressBar') },
104517
104534
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-fileUpload__progress'), style: {
104518
- right: 100 - uploading + "%"
104535
+ right: 100 - progress + "%"
104519
104536
  } }))))));
104520
104537
  };
104521
104538
  if (files.length === 1 && !selectMultiple && withProgressBar) {
@@ -104752,12 +104769,12 @@ var Input2_assign = (undefined && undefined.__assign) || function () {
104752
104769
 
104753
104770
 
104754
104771
  var Input2 = function (_a) {
104755
- var _b = _a.allowLeadingZeros, allowLeadingZeros = _b === void 0 ? true : _b, _c = _a.allowNegative, allowNegative = _c === void 0 ? false : _c, autocomplete = _a.autocomplete, autofocus = _a.autofocus, _d = _a.decimalLimit, decimalLimit = _d === void 0 ? 0 : _d, _e = _a.decimalSeparator, decimalSeparator = _e === void 0 ? ',' : _e, error = _a.error, help = _a.help, _f = _a.integerPlaces, integerPlaces = _f === void 0 ? 0 : _f, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onPaste = _a.onPaste, placeholder = _a.placeholder, prefix = _a.prefix, prefixIconName = _a.prefixIconName, _g = _a.showPassword, showPassword = _g === void 0 ? true : _g, showPasswordTooltip = _a.showPasswordTooltip, suffixIconName = _a.suffixIconName, testId = _a.testId, theme = _a.theme, _h = _a.thousandSeparator, thousandSeparator = _h === void 0 ? '' : _h, _j = _a.type, type = _j === void 0 ? 'text' : _j, unit = _a.unit, outerValue = _a.value;
104772
+ var _b = _a.allowLeadingZeros, allowLeadingZeros = _b === void 0 ? true : _b, _c = _a.allowNegative, allowNegative = _c === void 0 ? false : _c, autocomplete = _a.autocomplete, autofocus = _a.autofocus, _d = _a.decimalLimit, decimalLimit = _d === void 0 ? 0 : _d, _e = _a.decimalSeparator, decimalSeparator = _e === void 0 ? ',' : _e, error = _a.error, help = _a.help, _f = _a.integerPlaces, integerPlaces = _f === void 0 ? 0 : _f, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, maxCharCounter = _a.maxCharCounter, maxLength = _a.maxLength, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onPaste = _a.onPaste, placeholder = _a.placeholder, prefix = _a.prefix, prefixIconName = _a.prefixIconName, _g = _a.showPassword, showPassword = _g === void 0 ? true : _g, showPasswordTooltip = _a.showPasswordTooltip, suffixIconName = _a.suffixIconName, testId = _a.testId, theme = _a.theme, _h = _a.thousandSeparator, thousandSeparator = _h === void 0 ? '' : _h, _j = _a.type, type = _j === void 0 ? 'text' : _j, unit = _a.unit, outerValue = _a.value;
104756
104773
  var minusCharacter = '-';
104757
104774
  var _k = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(outerValue || ''), value = _k[0], setValue = _k[1];
104758
104775
  var _l = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(false), isPasswordVisible = _l[0], setIsPasswordVisible = _l[1];
104759
104776
  var numberRegex = new RegExp(/^-*\d*[,.]*\d*$/);
104760
- var fromGroupProps = {
104777
+ var formGroupProps = {
104761
104778
  error: error,
104762
104779
  hasError: !!error,
104763
104780
  help: help,
@@ -104765,6 +104782,7 @@ var Input2 = function (_a) {
104765
104782
  label: label,
104766
104783
  labelTooltip: labelTooltip,
104767
104784
  name: name,
104785
+ charCounter: { length: (value === null || value === void 0 ? void 0 : value.length) || 0, max: maxCharCounter || 0 },
104768
104786
  theme: theme
104769
104787
  };
104770
104788
  var getConformedValue = function (value) {
@@ -104875,7 +104893,7 @@ var Input2 = function (_a) {
104875
104893
  var togglePasswordVisibility = function () { return setIsPasswordVisible(!isPasswordVisible); };
104876
104894
  if (type === 'search')
104877
104895
  prefixIconName = 'search';
104878
- return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Input2_assign({}, fromGroupProps),
104896
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Input2_assign({}, formGroupProps),
104879
104897
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlGroup" },
104880
104898
  prefix && external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: "f-controlGroup__prefix" }, prefix),
104881
104899
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("div", { className: classBinder_cx('f-controlWrap', {
@@ -104885,7 +104903,7 @@ var Input2 = function (_a) {
104885
104903
  }), "data-testid": testId },
104886
104904
  prefixIconName && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx('f-controlPrefix') },
104887
104905
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: "search", size: "small", theme: "f-controlPrefix__icon" }))),
104888
- external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("input", { "aria-describedby": name + "_help", "aria-errormessage": error ? name + "_errorMessage" : undefined, "aria-invalid": !!error, "aria-labelledby": name + "_label", autoComplete: autocomplete ? 'on' : 'off', autoFocus: autofocus, className: classBinder_cx("f-control2 f-control2--input f-control2__" + (value ? 'value' : 'placeholder')), "data-testid": testId, disabled: isDisabled, id: name, inputMode: getInputMode(), maxLength: maxLength, name: name, placeholder: placeholder, type: getInputType(), value: value, onBlur: handleOnBlur, onChange: handleOnChange, onFocus: onFocus, onPaste: handleOnPaste }),
104906
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("input", { "aria-describedby": name + "_help", "aria-errormessage": error ? name + "_errorMessage" : undefined, "aria-invalid": !!error, "aria-labelledby": name + "_label", autoComplete: autocomplete ? 'on' : 'off', autoFocus: autofocus, className: classBinder_cx("f-control2 f-control2__" + (value ? 'value' : 'placeholder')), "data-testid": testId, disabled: isDisabled, id: name, inputMode: getInputMode(), maxLength: maxLength, name: name, placeholder: placeholder, type: getInputType(), value: value, onBlur: handleOnBlur, onChange: handleOnChange, onFocus: onFocus, onPaste: handleOnPaste }),
104889
104907
  type === 'password' && showPassword && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(ShowPasswordIcon, { isPasswordVisible: isPasswordVisible, showPasswordTooltip: showPasswordTooltip, togglePasswordVisibility: togglePasswordVisibility })),
104890
104908
  suffixIconName && (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("span", { className: classBinder_cx('f-controlSuffix') },
104891
104909
  external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(Icon, { name: suffixIconName, size: "small", theme: "f-controlSuffix__icon" })))),
@@ -105260,6 +105278,9 @@ var PasswordInput_rest = (undefined && undefined.__rest) || function (s, e) {
105260
105278
 
105261
105279
 
105262
105280
 
105281
+ /**
105282
+ * @deprecated This component is **deprecated** please use **Input2**
105283
+ */
105263
105284
  var PasswordInput = function (_a) {
105264
105285
  var hideLabel = _a.hideLabel, name = _a.name, showLabel = _a.showLabel, value = _a.value, props = PasswordInput_rest(_a, ["hideLabel", "name", "showLabel", "value"]);
105265
105286
  return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(WithShowPassword, { hideLabel: hideLabel, name: name, password: value, showLabel: showLabel }, function (_a) {
@@ -106038,6 +106059,9 @@ var Textarea_assign = (undefined && undefined.__assign) || function () {
106038
106059
 
106039
106060
 
106040
106061
 
106062
+ /**
106063
+ * @deprecated This component is **deprecated** please use **Textarea2**
106064
+ */
106041
106065
  var Textarea = function (props) { return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormField, Textarea_assign({ className: classBinder_cx('f-control', 'f-control--textarea'),
106042
106066
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
106043
106067
  // @ts-ignore
@@ -106046,6 +106070,53 @@ var Textarea = function (props) { return (external_root_React_commonjs2_react_co
106046
106070
  // CONCATENATED MODULE: ./src/components/Form/Textarea/index.ts
106047
106071
 
106048
106072
 
106073
+ // CONCATENATED MODULE: ./src/components/Form/Textarea2/Textarea2.tsx
106074
+ var Textarea2_assign = (undefined && undefined.__assign) || function () {
106075
+ Textarea2_assign = Object.assign || function(t) {
106076
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
106077
+ s = arguments[i];
106078
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
106079
+ t[p] = s[p];
106080
+ }
106081
+ return t;
106082
+ };
106083
+ return Textarea2_assign.apply(this, arguments);
106084
+ };
106085
+
106086
+
106087
+
106088
+ var Textarea2 = function (_a) {
106089
+ var autofocus = _a.autofocus, children = _a.children, error = _a.error, height = _a.height, help = _a.help, isDisabled = _a.isDisabled, label = _a.label, labelTooltip = _a.labelTooltip, maxCharCounter = _a.maxCharCounter, name = _a.name, onBlur = _a.onBlur, onChange = _a.onChange, onFocus = _a.onFocus, onPaste = _a.onPaste, placeholder = _a.placeholder, testId = _a.testId, theme = _a.theme, outerValue = _a.value;
106090
+ var _b = Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useState"])(outerValue), value = _b[0], setValue = _b[1];
106091
+ var formGroupProps = {
106092
+ error: error,
106093
+ hasError: !!error,
106094
+ help: help,
106095
+ isDisabled: isDisabled,
106096
+ label: label,
106097
+ labelTooltip: labelTooltip,
106098
+ charCounter: { length: (value === null || value === void 0 ? void 0 : value.length) || 0, max: maxCharCounter || 0 },
106099
+ name: name,
106100
+ theme: theme
106101
+ };
106102
+ Object(external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_["useEffect"])(function () { return setValue(outerValue); }, [outerValue]);
106103
+ var handleOnChange = function (_a) {
106104
+ var value = _a.target.value;
106105
+ setValue(value);
106106
+ onChange && onChange(value);
106107
+ };
106108
+ var handleOnBlur = function (_a) {
106109
+ var value = _a.target.value;
106110
+ setValue(value);
106111
+ onBlur && onBlur(value);
106112
+ };
106113
+ return (external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement(FormGroup2, Textarea2_assign({}, formGroupProps),
106114
+ external_root_React_commonjs2_react_commonjs_react_amd_react_umd_react_default.a.createElement("textarea", { "aria-describedby": name + "_help", "aria-errormessage": error ? name + "_errorMessage" : undefined, "aria-invalid": !!error, "aria-labelledby": name + "_label", autoFocus: autofocus, className: classBinder_cx("f-control2 f-control2--textarea f-control2__" + (value ? 'value' : 'placeholder')), "data-testid": testId, disabled: isDisabled, id: name, name: name, placeholder: placeholder, style: { height: height }, value: value, onBlur: handleOnBlur, onChange: handleOnChange, onFocus: onFocus, onPaste: onPaste }, children)));
106115
+ };
106116
+
106117
+ // CONCATENATED MODULE: ./src/components/Form/Textarea2/index.ts
106118
+
106119
+
106049
106120
  // CONCATENATED MODULE: ./src/components/Form/TextareaControl/index.ts
106050
106121
 
106051
106122
 
@@ -106112,6 +106183,7 @@ var Toggle = function (_a) {
106112
106183
 
106113
106184
 
106114
106185
 
106186
+
106115
106187
 
106116
106188
 
106117
106189
 
@@ -5,5 +5,8 @@ export interface BankAccountSelectPropsType extends SelectPropsType {
5
5
  /** OnBlur will not reset value. */
6
6
  hasAlwaysValue?: boolean;
7
7
  }
8
+ /**
9
+ * @deprecated This component is **deprecated** please use **Select2**
10
+ */
8
11
  export declare const BankAccountSelect: ({ hasAlwaysValue, hasAutocomplete, items, ...rest }: BankAccountSelectPropsType) => JSX.Element;
9
12
  //# sourceMappingURL=BankAccountSelect.d.ts.map
@@ -5,5 +5,8 @@ export interface DecimalInputPropsType extends NumberMaskType, FormFieldType {
5
5
  onChange: (val: string | number) => void;
6
6
  value?: number;
7
7
  }
8
+ /**
9
+ * @deprecated This component is **deprecated** please use **Input2**
10
+ */
8
11
  export declare const DecimalInput: ({ allowNegative, allowLeadingZeroes, decimalSeparator: customDecimalSeparator, decimalPlaces, integerPlaces, thousandSeparator: customThousandSeparator, value, onChange, onBlur, ...rest }: DecimalInputPropsType) => JSX.Element;
9
12
  //# sourceMappingURL=DecimalInput.d.ts.map
@@ -14,8 +14,6 @@ export interface FileUploadPropsType extends ComponentPropsType {
14
14
  maxSizeBytes?: number;
15
15
  /** Set of all used text messages. */
16
16
  messages: {
17
- /** ARIA label for `preview` button */
18
- ariaForShow: FileListPropsType['messages']['ariaForShow'];
19
17
  /** ARIA label for `delete` button */
20
18
  ariaForDelete: FileListPropsType['messages']['ariaForDelete'];
21
19
  /** Message for `active` drag area e.g. "Drag file here" */
@@ -5,7 +5,6 @@ export interface FileListPropsType {
5
5
  handleOnDelete: (id: string) => void;
6
6
  hideImagePreview?: boolean;
7
7
  messages: {
8
- ariaForShow: string;
9
8
  ariaForDelete: string;
10
9
  multipleUploaderErrors?: {
11
10
  'file-invalid-type': ReactNode;
@@ -18,5 +17,5 @@ export interface FileListPropsType {
18
17
  uploadProgress?: Record<string, number>;
19
18
  withProgressBar?: boolean;
20
19
  }
21
- export declare const FileList: ({ files, handleOnDelete, hideImagePreview, messages: { ariaForDelete, ariaForShow, multipleUploaderErrors: errorMessages }, onShow, selectMultiple, uploadProgress, withProgressBar }: FileListPropsType) => JSX.Element;
20
+ export declare const FileList: ({ files, handleOnDelete, hideImagePreview, messages: { ariaForDelete, multipleUploaderErrors: errorMessages }, onShow, selectMultiple, uploadProgress, withProgressBar }: FileListPropsType) => JSX.Element;
22
21
  //# sourceMappingURL=FileList.d.ts.map
@@ -3,20 +3,25 @@ import { ComponentPropsType } from '../../../utils';
3
3
  export interface FormGroup2PropsType extends ComponentPropsType {
4
4
  /** Children to be rendered in the main container. */
5
5
  children: ReactNode;
6
- /** If `true`, the form group is disabled. */
7
- isDisabled?: boolean;
8
- /** If `true`, form field is in error state. `hasWarning` is ignored */
9
- hasError?: boolean;
10
6
  /** Error message shown in error state + switch component to error state. */
11
7
  error?: string;
8
+ /** If `true`, form field is in error state. `hasWarning` is ignored */
9
+ hasError?: boolean;
12
10
  /** Additional information for form field. */
13
11
  help?: ReactNode;
12
+ /** If `true`, the form group is disabled. */
13
+ isDisabled?: boolean;
14
14
  /** Form field label. */
15
15
  label?: ReactNode;
16
16
  /** Content of additional label tooltip. */
17
17
  labelTooltip?: ReactNode;
18
+ /** Defines counter of maximum characters to be inserted. */
19
+ charCounter?: {
20
+ length: number;
21
+ max: number;
22
+ };
18
23
  /** Name of form field. */
19
24
  name: string;
20
25
  }
21
- export declare const FormGroup2: ({ children, error, hasError, help, isDisabled, label, labelTooltip, name, theme }: FormGroup2PropsType) => JSX.Element;
26
+ export declare const FormGroup2: ({ charCounter, children, error, hasError, help, isDisabled, label, labelTooltip, name, theme }: FormGroup2PropsType) => JSX.Element;
22
27
  //# sourceMappingURL=FormGroup2.d.ts.map
@@ -1,4 +1,4 @@
1
- import { ReactNode, SyntheticEvent } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { FormField2PropsType, IconNameType } from '../../../types';
3
3
  export interface Input2PropsType extends FormField2PropsType {
4
4
  /** If `true` number can start with zeros. */
@@ -17,8 +17,6 @@ export interface Input2PropsType extends FormField2PropsType {
17
17
  integerPlaces?: number;
18
18
  /** Sets maximum value length. */
19
19
  maxLength?: HTMLInputElement['maxLength'];
20
- /** Custom handler function for onPaste event. */
21
- onPaste?: (event: SyntheticEvent) => void;
22
20
  /** Text placed before input itself. */
23
21
  prefix?: ReactNode;
24
22
  /** Icon placed inside input before value. */
@@ -41,5 +39,5 @@ export interface Input2PropsType extends FormField2PropsType {
41
39
  value?: string;
42
40
  }
43
41
  export declare type Input2TypeType = 'text' | 'number' | 'password' | 'tel' | 'email' | 'search';
44
- export declare const Input2: ({ allowLeadingZeros, allowNegative, autocomplete, autofocus, decimalLimit, decimalSeparator, error, help, integerPlaces, isDisabled, label, labelTooltip, maxLength, name, onBlur, onChange, onFocus, onPaste, placeholder, prefix, prefixIconName, showPassword, showPasswordTooltip, suffixIconName, testId, theme, thousandSeparator, type, unit, value: outerValue }: Input2PropsType) => JSX.Element;
42
+ export declare const Input2: ({ allowLeadingZeros, allowNegative, autocomplete, autofocus, decimalLimit, decimalSeparator, error, help, integerPlaces, isDisabled, label, labelTooltip, maxCharCounter, maxLength, name, onBlur, onChange, onFocus, onPaste, placeholder, prefix, prefixIconName, showPassword, showPasswordTooltip, suffixIconName, testId, theme, thousandSeparator, type, unit, value: outerValue }: Input2PropsType) => JSX.Element;
45
43
  //# sourceMappingURL=Input2.d.ts.map
@@ -9,5 +9,8 @@ export interface IntegerInputPropsType extends IntegerMaskType, FormFieldType {
9
9
  /** Value of the form control. */
10
10
  value?: number | string | undefined;
11
11
  }
12
+ /**
13
+ * @deprecated This component is **deprecated** please use **Input2**
14
+ */
12
15
  export declare const IntegerInput: ({ allowNegative, integerPlaces, thousandSeparator: customThousandSeparator, allowLeadingZeros, value, maxValue, onChange, onBlur, ...rest }: IntegerInputPropsType) => JSX.Element;
13
16
  //# sourceMappingURL=IntegerInput.d.ts.map
@@ -4,6 +4,9 @@ interface PasswordInputPropsType extends FormFieldType {
4
4
  showLabel?: string;
5
5
  value: string;
6
6
  }
7
+ /**
8
+ * @deprecated This component is **deprecated** please use **Input2**
9
+ */
7
10
  export declare const PasswordInput: ({ hideLabel, name, showLabel, value, ...props }: PasswordInputPropsType) => JSX.Element;
8
11
  export {};
9
12
  //# sourceMappingURL=PasswordInput.d.ts.map
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
2
  import { FormFieldType } from '../';
3
+ /**
4
+ * @deprecated This component is **deprecated** please use **Input2**
5
+ */
3
6
  export declare const TextInput: React.ForwardRefExoticComponent<FormFieldType & React.RefAttributes<unknown>>;
4
7
  //# sourceMappingURL=TextInput.d.ts.map
@@ -1,3 +1,6 @@
1
1
  import { FormFieldType } from '../';
2
+ /**
3
+ * @deprecated This component is **deprecated** please use **Textarea2**
4
+ */
2
5
  export declare const Textarea: (props: FormFieldType) => JSX.Element;
3
6
  //# sourceMappingURL=Textarea.d.ts.map
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { FormField2PropsType } from '../../../types';
3
+ export interface Textarea2PropsType extends FormField2PropsType {
4
+ /** If `true` textarea will be focused after render. */
5
+ autofocus?: boolean;
6
+ /** Children to be rendered in the main container. */
7
+ children?: ReactNode;
8
+ /** Custom textarea height in px. */
9
+ height?: number;
10
+ }
11
+ export declare const Textarea2: ({ autofocus, children, error, height, help, isDisabled, label, labelTooltip, maxCharCounter, name, onBlur, onChange, onFocus, onPaste, placeholder, testId, theme, value: outerValue }: Textarea2PropsType) => JSX.Element;
12
+ //# sourceMappingURL=Textarea2.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './Textarea2';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -31,6 +31,7 @@ export * from './SelectMenu';
31
31
  export * from './SelectOption';
32
32
  export * from './Slider';
33
33
  export * from './Textarea';
34
+ export * from './Textarea2';
34
35
  export * from './TextareaControl';
35
36
  export * from './TextInput';
36
37
  export * from './TextInputControl';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="css-modules" />
2
- import { FocusEventHandler, ReactNode } from 'react';
2
+ import { FocusEventHandler, ReactNode, SyntheticEvent } from 'react';
3
3
  import { ComponentPropsType } from '../utils';
4
4
  declare type ThemeValue = CSSModule | string;
5
5
  export declare type Theme = ThemeValue | Array<Theme>;
@@ -16,6 +16,8 @@ export interface FormField2PropsType extends ComponentPropsType {
16
16
  label?: ReactNode;
17
17
  /** Content of additional label tooltip. */
18
18
  labelTooltip?: ReactNode;
19
+ /** Defines counter of maximum characters to be inserted. (use only for Input or Textarea) */
20
+ maxCharCounter?: number;
19
21
  /** Name of form field. */
20
22
  name: string;
21
23
  /** Handler for input blur. */
@@ -24,6 +26,8 @@ export interface FormField2PropsType extends ComponentPropsType {
24
26
  onChange?: (value: string | number | null) => void;
25
27
  /** Function to call when the form control emits a `focus` event. */
26
28
  onFocus?: FocusEventHandler<HTMLElement>;
29
+ /** Custom handler function for onPaste event. */
30
+ onPaste?: (event: SyntheticEvent) => void;
27
31
  /** Placeholder content for empty form field. */
28
32
  placeholder?: string;
29
33
  value?: string;
@@ -1,2 +1,2 @@
1
- export declare type IconBackgroundType = 'info' | 'warning' | 'error' | 'success' | 'blueRed' | 'redLightest' | 'redNormal' | 'redDark' | 'redDarker' | 'redHover' | 'redActive' | 'greenLightest' | 'greenNormal' | 'greenDark' | 'greenDarker' | 'greenDarkest' | 'greenHover' | 'greenActive' | 'orangeLightest' | 'orangeNormal' | 'orangeDark' | 'orangeDarker' | 'orangeHover' | 'orangeActive' | 'primaryLightest' | 'primaryLighter' | 'primaryLight' | 'primaryNormal' | 'primaryDark' | 'primaryDarker' | 'primaryDarkest' | 'primaryHover' | 'primaryActive' | 'cloudLightest' | 'cloudLighter' | 'cloudLight' | 'cloudNormal' | 'cloudDark' | 'cloudDarker' | 'cloudHover' | 'cloudActive' | 'secondaryLightest' | 'secondaryLighter' | 'secondaryLight' | 'secondaryNormal' | 'secondaryDark' | 'secondaryDarker' | 'secondaryDarkest' | 'secondaryHover' | 'secondaryActive' | 'greyLightest' | 'greyLighter' | 'greyLight' | 'greyNormal' | 'greyDark' | 'greyDarker' | 'greyDarkest' | 'greyHover' | 'greyActive' | 'goldNormal' | 'goldDark' | 'goldDarker' | 'whiteNormal' | 'blackNormal' | 'categoryYellow' | 'categoryOrange' | 'categoryPink' | 'categoryCherry' | 'categoryViolet' | 'categoryOceanBlue' | 'categorySkyBlue' | 'categoryMidnightBlue' | 'categorySemiBlue' | 'categoryTorquise' | 'categoryMintGreen' | 'categoryForestGreen' | 'categoryOliveGreen' | 'thirdPartyFacebook' | 'thirdPartyTwitter';
1
+ export declare type IconBackgroundType = 'info' | 'warning' | 'error' | 'success' | 'blueRed' | 'blueRedDark' | 'redLightest' | 'redNormal' | 'redDark' | 'redDarker' | 'redHover' | 'redActive' | 'greenLightest' | 'greenNormal' | 'greenDark' | 'greenDarker' | 'greenDarkest' | 'greenHover' | 'greenActive' | 'orangeLightest' | 'orangeNormal' | 'orangeDark' | 'orangeDarker' | 'orangeHover' | 'orangeActive' | 'primaryLightest' | 'primaryLighter' | 'primaryLight' | 'primaryNormal' | 'primaryDark' | 'primaryDarker' | 'primaryDarkest' | 'primaryHover' | 'primaryActive' | 'cloudLightest' | 'cloudLighter' | 'cloudLight' | 'cloudNormal' | 'cloudDark' | 'cloudDarker' | 'cloudHover' | 'cloudActive' | 'secondaryLightest' | 'secondaryLighter' | 'secondaryLight' | 'secondaryNormal' | 'secondaryDark' | 'secondaryDarker' | 'secondaryDarkest' | 'secondaryHover' | 'secondaryActive' | 'greyLightest' | 'greyLighter' | 'greyLight' | 'greyNormal' | 'greyDark' | 'greyDarker' | 'greyDarkest' | 'greyHover' | 'greyActive' | 'goldNormal' | 'goldDark' | 'goldDarker' | 'whiteNormal' | 'blackNormal' | 'categoryYellow' | 'categoryOrange' | 'categoryPink' | 'categoryCherry' | 'categoryViolet' | 'categoryOceanBlue' | 'categorySkyBlue' | 'categoryMidnightBlue' | 'categorySemiBlue' | 'categoryTorquise' | 'categoryMintGreen' | 'categoryForestGreen' | 'categoryOliveGreen' | 'thirdPartyFacebook' | 'thirdPartyTwitter';
2
2
  //# sourceMappingURL=iconBackground.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mmb-digital/ds-lilly",
3
- "version": "0.0.1-alpha.322",
3
+ "version": "0.0.1-alpha.326",
4
4
  "description": "MMB LILLY design system",
5
5
  "license": "UNLICENSED",
6
6
  "sideEffects": false,