@pinuts/bsr-uikit-relaunch 0.0.8 → 0.0.9

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.
@@ -29,18 +29,21 @@ const Button = _ref => {
29
29
  return null;
30
30
  }
31
31
  const usedText = text ? t(text) : '';
32
- const usedAriaLabel = ariaLabel ? t(ariaLabel) : '';
32
+ const usedAriaLabel = ariaLabel ? t(ariaLabel) : usedText;
33
33
 
34
34
  // !!! ??? linter: The button type attribute must be specified by a static string or a trivial ternary expression
35
35
  const btnType = type || 'button';
36
36
  /* eslint-disable react/button-has-type */
37
37
 
38
+ const key = inputProps?.key || 'button';
38
39
  return /*#__PURE__*/_react.default.createElement("button", _extends({
39
40
  type: btnType,
40
41
  onClick: onClick,
41
42
  className: _formBuilder.utils.getClassNames(['btn', color && `btn-${color}`, rounded && 'btn-rounded', circular && 'btn-circular', className, ariaAttributes?.['aria-disabled'] && 'disabled']),
42
43
  "aria-label": usedAriaLabel
43
- }, ariaAttributes, inputProps), usedText, children);
44
+ }, ariaAttributes, inputProps, {
45
+ key: key
46
+ }), usedText, children);
44
47
  /* eslint-enable react/button-has-type */
45
48
  };
46
49
  Button.propTypes = {
@@ -51,7 +54,7 @@ Button.propTypes = {
51
54
  circular: _propTypes.default.bool,
52
55
  inputProps: _propTypes.default.object,
53
56
  onClick: _propTypes.default.func,
54
- ariaLabel: _propTypes.default.string.isRequired,
57
+ ariaLabel: _propTypes.default.string,
55
58
  ariaAttributes: _propTypes.default.object,
56
59
  children: _propTypes.default.node,
57
60
  type: _propTypes.default.string
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../src/items/Button/SubmitButton.jsx"],"names":[],"mappings":";AAKA;;;gBAQC"}
1
+ {"version":3,"file":"SubmitButton.d.ts","sourceRoot":"","sources":["../../../src/items/Button/SubmitButton.jsx"],"names":[],"mappings":";AAKA;;;gBASC"}
@@ -19,7 +19,8 @@ const SubmitButton = _ref => {
19
19
  inputProps: {
20
20
  ...inputProps,
21
21
  type: 'submit'
22
- }
22
+ },
23
+ key: inputProps.key
23
24
  }));
24
25
  };
25
26
  SubmitButton.propTypes = {
@@ -30,7 +31,9 @@ const FormBuilderSubmitButton = _ref2 => {
30
31
  config = {},
31
32
  ...otherProps
32
33
  } = _ref2;
33
- return /*#__PURE__*/_react.default.createElement(SubmitButton, _extends({}, otherProps, config));
34
+ return /*#__PURE__*/_react.default.createElement(SubmitButton, _extends({}, otherProps, config, {
35
+ key: config.key
36
+ }));
34
37
  };
35
38
  FormBuilderSubmitButton.propTypes = {
36
39
  config: _propTypes.default.shape(SubmitButton.propTypes)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinuts/bsr-uikit-relaunch",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "private": false,
5
5
  "description": "BSR UI-KIT Relaunch",
6
6
  "main": "dist/index.js",