@sb1/ffe-form-react 9.1.6 → 10.0.0

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.
@@ -1,6 +1,6 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
 
3
- var _excluded = ["aria-invalid", "children", "checked", "className", "labelProps", "selectedValue", "tooltip", "tooltipProps", "value", "innerRef"];
3
+ var _excluded = ["children", "checked", "className", "labelProps", "selectedValue", "tooltip", "tooltipProps", "value", "innerRef"];
4
4
 
5
5
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
6
 
@@ -32,7 +32,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
32
32
 
33
33
  import React, { Component, Fragment } from 'react';
34
34
  import classNames from 'classnames';
35
- import { bool, node, oneOf, oneOfType, shape, string, func, object, number } from 'prop-types';
35
+ import { bool, node, oneOfType, shape, string, func, object, number } from 'prop-types';
36
36
  import { v4 as uuid } from 'uuid';
37
37
  import Tooltip from './Tooltip';
38
38
 
@@ -61,7 +61,6 @@ var BaseRadioButton = /*#__PURE__*/function (_Component) {
61
61
  key: "render",
62
62
  value: function render() {
63
63
  var _this$props = this.props,
64
- ariaInvalid = _this$props['aria-invalid'],
65
64
  children = _this$props.children,
66
65
  checked = _this$props.checked,
67
66
  className = _this$props.className,
@@ -74,13 +73,10 @@ var BaseRadioButton = /*#__PURE__*/function (_Component) {
74
73
  inputProps = _objectWithoutProperties(_this$props, _excluded);
75
74
 
76
75
  var labelClasses = classNames({
77
- 'ffe-radio-button--invalid': ariaInvalid === 'true'
78
- }, {
79
76
  'ffe-radio-button--with-tooltip': tooltip
80
77
  }, className);
81
78
  var isSelected = selectedValue !== undefined ? selectedValue === value : checked;
82
79
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("input", _extends({
83
- "aria-invalid": ariaInvalid,
84
80
  className: "ffe-radio-input",
85
81
  id: this.id,
86
82
  ref: innerRef,
@@ -103,9 +99,6 @@ BaseRadioButton.defaultProps = {
103
99
  tooltipProps: {}
104
100
  };
105
101
  BaseRadioButton.propTypes = {
106
- /** Indicates whether the radio button is invalid or not */
107
- 'aria-invalid': oneOf(['true', 'false']),
108
-
109
102
  /** Whether or not the radio button is selected */
110
103
  checked: bool,
111
104
 
@@ -1,4 +1,4 @@
1
- var _excluded = ["aria-invalid", "children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip"];
1
+ var _excluded = ["children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip"];
2
2
 
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
4
 
@@ -19,8 +19,7 @@ import ErrorFieldMessage from './ErrorFieldMessage';
19
19
  import Tooltip from './Tooltip';
20
20
 
21
21
  var RadioButtonInputGroup = function RadioButtonInputGroup(props) {
22
- var ariaInvalid = props['aria-invalid'],
23
- children = props.children,
22
+ var children = props.children,
24
23
  className = props.className,
25
24
  extraMargin = props.extraMargin,
26
25
  description = props.description,
@@ -37,7 +36,6 @@ var RadioButtonInputGroup = function RadioButtonInputGroup(props) {
37
36
  }
38
37
 
39
38
  var buttonProps = {
40
- 'aria-invalid': ariaInvalid || String(!!fieldMessage),
41
39
  inline: inline,
42
40
  name: name,
43
41
  onChange:
@@ -17,7 +17,7 @@ var _uuid = require("uuid");
17
17
 
18
18
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
19
19
 
20
- var _excluded = ["aria-invalid", "children", "checked", "className", "labelProps", "selectedValue", "tooltip", "tooltipProps", "value", "innerRef"];
20
+ var _excluded = ["children", "checked", "className", "labelProps", "selectedValue", "tooltip", "tooltipProps", "value", "innerRef"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -78,7 +78,6 @@ var BaseRadioButton = /*#__PURE__*/function (_Component) {
78
78
  key: "render",
79
79
  value: function render() {
80
80
  var _this$props = this.props,
81
- ariaInvalid = _this$props['aria-invalid'],
82
81
  children = _this$props.children,
83
82
  checked = _this$props.checked,
84
83
  className = _this$props.className,
@@ -91,13 +90,10 @@ var BaseRadioButton = /*#__PURE__*/function (_Component) {
91
90
  inputProps = _objectWithoutProperties(_this$props, _excluded);
92
91
 
93
92
  var labelClasses = (0, _classnames.default)({
94
- 'ffe-radio-button--invalid': ariaInvalid === 'true'
95
- }, {
96
93
  'ffe-radio-button--with-tooltip': tooltip
97
94
  }, className);
98
95
  var isSelected = selectedValue !== undefined ? selectedValue === value : checked;
99
96
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("input", _extends({
100
- "aria-invalid": ariaInvalid,
101
97
  className: "ffe-radio-input",
102
98
  id: this.id,
103
99
  ref: innerRef,
@@ -120,9 +116,6 @@ BaseRadioButton.defaultProps = {
120
116
  tooltipProps: {}
121
117
  };
122
118
  BaseRadioButton.propTypes = {
123
- /** Indicates whether the radio button is invalid or not */
124
- 'aria-invalid': (0, _propTypes.oneOf)(['true', 'false']),
125
-
126
119
  /** Whether or not the radio button is selected */
127
120
  checked: _propTypes.bool,
128
121
 
@@ -15,7 +15,7 @@ var _ErrorFieldMessage = _interopRequireDefault(require("./ErrorFieldMessage"));
15
15
 
16
16
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
17
17
 
18
- var _excluded = ["aria-invalid", "children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip"];
18
+ var _excluded = ["children", "className", "extraMargin", "description", "fieldMessage", "inline", "label", "name", "selectedValue", "tooltip"];
19
19
 
20
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
21
 
@@ -32,8 +32,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
32
32
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
33
33
 
34
34
  var RadioButtonInputGroup = function RadioButtonInputGroup(props) {
35
- var ariaInvalid = props['aria-invalid'],
36
- children = props.children,
35
+ var children = props.children,
37
36
  className = props.className,
38
37
  extraMargin = props.extraMargin,
39
38
  description = props.description,
@@ -50,7 +49,6 @@ var RadioButtonInputGroup = function RadioButtonInputGroup(props) {
50
49
  }
51
50
 
52
51
  var buttonProps = {
53
- 'aria-invalid': ariaInvalid || String(!!fieldMessage),
54
52
  inline: inline,
55
53
  name: name,
56
54
  onChange:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-form-react",
3
- "version": "9.1.6",
3
+ "version": "10.0.0",
4
4
  "description": "React component for form elements in ffe",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "b6aa8be25c11fb3f354bd97731e1d7aee9ffa2be"
48
+ "gitHead": "7a088bd483edae5850404e186324ea9e117e5d17"
49
49
  }