@sb1/ffe-accordion-react 9.2.1 → 9.2.5
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/es/Accordion.js +4 -2
- package/es/AccordionItem.js +9 -5
- package/lib/Accordion.js +6 -4
- package/lib/AccordionItem.js +11 -7
- package/package.json +12 -14
- package/CHANGELOG.md +0 -794
- package/es/Accordion.spec.js +0 -83
- package/lib/Accordion.spec.js +0 -103
package/es/Accordion.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
var _excluded = ["children", "headingLevel", "className"];
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
4
|
|
|
3
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -8,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
10
|
|
|
9
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
12
|
|
|
11
|
-
function _iterableToArrayLimit(arr, i) {
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
14
|
|
|
13
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
16
|
|
|
@@ -28,7 +30,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
28
30
|
var children = _ref.children,
|
|
29
31
|
headingLevel = _ref.headingLevel,
|
|
30
32
|
className = _ref.className,
|
|
31
|
-
rest = _objectWithoutProperties(_ref,
|
|
33
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
34
|
|
|
33
35
|
var _useState = useState(false),
|
|
34
36
|
_useState2 = _slicedToArray(_useState, 2),
|
package/es/AccordionItem.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var _excluded = ["children", "heading", "defaultOpen", "isOpen", "className", "onToggleOpen", "ariaLabel"],
|
|
2
|
+
_excluded2 = ["headingLevel", "onFocus", "onBlur", "forwardedRef"];
|
|
3
|
+
|
|
1
4
|
function _extends() { _extends = Object.assign || 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); }
|
|
2
5
|
|
|
3
6
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -8,7 +11,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
11
|
|
|
9
12
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
10
13
|
|
|
11
|
-
function _iterableToArrayLimit(arr, i) {
|
|
14
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
12
15
|
|
|
13
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
14
17
|
|
|
@@ -32,7 +35,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
32
35
|
_ref$onToggleOpen = _ref.onToggleOpen,
|
|
33
36
|
onToggleOpen = _ref$onToggleOpen === void 0 ? Function.prototype : _ref$onToggleOpen,
|
|
34
37
|
ariaLabel = _ref.ariaLabel,
|
|
35
|
-
accordionProps = _objectWithoutProperties(_ref,
|
|
38
|
+
accordionProps = _objectWithoutProperties(_ref, _excluded);
|
|
36
39
|
|
|
37
40
|
var _useState = useState(defaultOpen),
|
|
38
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -66,8 +69,9 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
66
69
|
onFocus = accordionProps.onFocus,
|
|
67
70
|
onBlur = accordionProps.onBlur,
|
|
68
71
|
forwardedRef = accordionProps.forwardedRef,
|
|
69
|
-
rest = _objectWithoutProperties(accordionProps,
|
|
72
|
+
rest = _objectWithoutProperties(accordionProps, _excluded2);
|
|
70
73
|
|
|
74
|
+
var collapseHidden = !isExpanded && !isAnimating;
|
|
71
75
|
return /*#__PURE__*/React.createElement("div", _extends({
|
|
72
76
|
className: classNames(className, 'ffe-accordion-item', {
|
|
73
77
|
'ffe-accordion-item--open': isExpanded
|
|
@@ -98,9 +102,9 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
98
102
|
},
|
|
99
103
|
id: contentId.current,
|
|
100
104
|
"aria-labelledby": buttonId.current,
|
|
101
|
-
hidden:
|
|
105
|
+
hidden: collapseHidden,
|
|
102
106
|
role: "region"
|
|
103
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
}, !collapseHidden && /*#__PURE__*/React.createElement("div", {
|
|
104
108
|
className: "ffe-accordion-body"
|
|
105
109
|
}, children)));
|
|
106
110
|
};
|
package/lib/Accordion.js
CHANGED
|
@@ -13,11 +13,13 @@ var _propTypes = require("prop-types");
|
|
|
13
13
|
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
|
|
16
|
+
var _excluded = ["children", "headingLevel", "className"];
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
20
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
21
|
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
22
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
23
|
|
|
22
24
|
function _extends() { _extends = Object.assign || 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); }
|
|
23
25
|
|
|
@@ -29,7 +31,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
29
31
|
|
|
30
32
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
31
33
|
|
|
32
|
-
function _iterableToArrayLimit(arr, i) {
|
|
34
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
33
35
|
|
|
34
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
37
|
|
|
@@ -46,7 +48,7 @@ var Accordion = function Accordion(_ref) {
|
|
|
46
48
|
var children = _ref.children,
|
|
47
49
|
headingLevel = _ref.headingLevel,
|
|
48
50
|
className = _ref.className,
|
|
49
|
-
rest = _objectWithoutProperties(_ref,
|
|
51
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
50
52
|
|
|
51
53
|
var _useState = (0, _react.useState)(false),
|
|
52
54
|
_useState2 = _slicedToArray(_useState, 2),
|
package/lib/AccordionItem.js
CHANGED
|
@@ -19,11 +19,14 @@ var _ffeCollapseReact = _interopRequireDefault(require("@sb1/ffe-collapse-react"
|
|
|
19
19
|
|
|
20
20
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
21
21
|
|
|
22
|
+
var _excluded = ["children", "heading", "defaultOpen", "isOpen", "className", "onToggleOpen", "ariaLabel"],
|
|
23
|
+
_excluded2 = ["headingLevel", "onFocus", "onBlur", "forwardedRef"];
|
|
24
|
+
|
|
22
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
26
|
|
|
24
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
27
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
28
|
|
|
26
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
30
|
|
|
28
31
|
function _extends() { _extends = Object.assign || 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); }
|
|
29
32
|
|
|
@@ -35,7 +38,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
35
38
|
|
|
36
39
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37
40
|
|
|
38
|
-
function _iterableToArrayLimit(arr, i) {
|
|
41
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
39
42
|
|
|
40
43
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
41
44
|
|
|
@@ -52,7 +55,7 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
52
55
|
_ref$onToggleOpen = _ref.onToggleOpen,
|
|
53
56
|
onToggleOpen = _ref$onToggleOpen === void 0 ? Function.prototype : _ref$onToggleOpen,
|
|
54
57
|
ariaLabel = _ref.ariaLabel,
|
|
55
|
-
accordionProps = _objectWithoutProperties(_ref,
|
|
58
|
+
accordionProps = _objectWithoutProperties(_ref, _excluded);
|
|
56
59
|
|
|
57
60
|
var _useState = (0, _react.useState)(defaultOpen),
|
|
58
61
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -86,8 +89,9 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
86
89
|
onFocus = accordionProps.onFocus,
|
|
87
90
|
onBlur = accordionProps.onBlur,
|
|
88
91
|
forwardedRef = accordionProps.forwardedRef,
|
|
89
|
-
rest = _objectWithoutProperties(accordionProps,
|
|
92
|
+
rest = _objectWithoutProperties(accordionProps, _excluded2);
|
|
90
93
|
|
|
94
|
+
var collapseHidden = !isExpanded && !isAnimating;
|
|
91
95
|
return /*#__PURE__*/_react.default.createElement("div", _extends({
|
|
92
96
|
className: (0, _classnames.default)(className, 'ffe-accordion-item', {
|
|
93
97
|
'ffe-accordion-item--open': isExpanded
|
|
@@ -118,9 +122,9 @@ var AccordionItem = function AccordionItem(_ref) {
|
|
|
118
122
|
},
|
|
119
123
|
id: contentId.current,
|
|
120
124
|
"aria-labelledby": buttonId.current,
|
|
121
|
-
hidden:
|
|
125
|
+
hidden: collapseHidden,
|
|
122
126
|
role: "region"
|
|
123
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
127
|
+
}, !collapseHidden && /*#__PURE__*/_react.default.createElement("div", {
|
|
124
128
|
className: "ffe-accordion-body"
|
|
125
129
|
}, children)));
|
|
126
130
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-accordion-react",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "SpareBank 1",
|
|
6
6
|
"files": [
|
|
@@ -17,11 +17,8 @@
|
|
|
17
17
|
"url": "ssh://git@github.com:SpareBank1/designsystem.git"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "
|
|
21
|
-
"
|
|
22
|
-
"build:es": "babel -d es/. --root-mode=upward --env-name=es --ignore=*.spec.js src/.",
|
|
23
|
-
"build:types": "copyfiles -f src/index.d.ts types/",
|
|
24
|
-
"lint": "eslint src/.",
|
|
20
|
+
"build": "ffe-buildtool babel",
|
|
21
|
+
"lint": "eslint src",
|
|
25
22
|
"test": "jest",
|
|
26
23
|
"test:watch": "jest --watch"
|
|
27
24
|
},
|
|
@@ -29,13 +26,14 @@
|
|
|
29
26
|
"setupTestFrameworkScriptFile": "../../test-setup.js"
|
|
30
27
|
},
|
|
31
28
|
"dependencies": {
|
|
32
|
-
"@sb1/ffe-collapse-react": "^1.1.
|
|
33
|
-
"@sb1/ffe-icons-react": "^7.2.
|
|
34
|
-
"classnames": "^2.
|
|
35
|
-
"prop-types": "^15.
|
|
36
|
-
"uuid": "^8.
|
|
29
|
+
"@sb1/ffe-collapse-react": "^1.1.7",
|
|
30
|
+
"@sb1/ffe-icons-react": "^7.2.20",
|
|
31
|
+
"classnames": "^2.3.1",
|
|
32
|
+
"prop-types": "^15.7.2",
|
|
33
|
+
"uuid": "^8.3.2"
|
|
37
34
|
},
|
|
38
35
|
"devDependencies": {
|
|
36
|
+
"@sb1/ffe-buildtool": "^0.1.0",
|
|
39
37
|
"enzyme": "^3.7.0",
|
|
40
38
|
"enzyme-adapter-react-16": "^1.7.0",
|
|
41
39
|
"jest": "^26.0.0",
|
|
@@ -43,11 +41,11 @@
|
|
|
43
41
|
"react-dom": "^16.9.0"
|
|
44
42
|
},
|
|
45
43
|
"peerDependencies": {
|
|
46
|
-
"@sb1/ffe-accordion": "
|
|
47
|
-
"react": "
|
|
44
|
+
"@sb1/ffe-accordion": "*",
|
|
45
|
+
"react": ">=16.9.0"
|
|
48
46
|
},
|
|
49
47
|
"publishConfig": {
|
|
50
48
|
"access": "public"
|
|
51
49
|
},
|
|
52
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "59eb2e12625e744f1a116c14a40cf69f1bbecdc6"
|
|
53
51
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,794 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [9.2.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.2.0...@sb1/ffe-accordion-react@9.2.1) (2021-03-08)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [9.2.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.6...@sb1/ffe-accordion-react@9.2.0) (2021-03-08)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
### Features
|
|
18
|
-
|
|
19
|
-
* **ffe-accordion-react:** possible to pass properties to button ([4bb3d34](https://github.com/SpareBank1/designsystem/commit/4bb3d3466fbe4817d22cf5f4039bc88f871a14ae))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## [9.1.6](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.5...@sb1/ffe-accordion-react@9.1.6) (2021-02-05)
|
|
26
|
-
|
|
27
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## [9.1.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.4...@sb1/ffe-accordion-react@9.1.5) (2021-02-04)
|
|
34
|
-
|
|
35
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## [9.1.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.3...@sb1/ffe-accordion-react@9.1.4) (2021-02-03)
|
|
42
|
-
|
|
43
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## [9.1.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.2...@sb1/ffe-accordion-react@9.1.3) (2021-02-03)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### Bug Fixes
|
|
53
|
-
|
|
54
|
-
* packages/ffe-accordion-react/package.json to reduce vulnerabilities ([88b1e26](https://github.com/SpareBank1/designsystem/commit/88b1e26a8280ad7811689d93f45f165ea135c79c))
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
## [9.1.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.1...@sb1/ffe-accordion-react@9.1.2) (2021-02-02)
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Bug Fixes
|
|
64
|
-
|
|
65
|
-
* **ffe-accordion-react:** reduce vulnerabilities ([7bb8af5](https://github.com/SpareBank1/designsystem/commit/7bb8af5bf84c3cfcaba1f6087b0a6091efce21a7))
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
## [9.1.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.1.0...@sb1/ffe-accordion-react@9.1.1) (2021-01-27)
|
|
72
|
-
|
|
73
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
# [9.1.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.0.3...@sb1/ffe-accordion-react@9.1.0) (2021-01-19)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
### Features
|
|
83
|
-
|
|
84
|
-
* **ffe-accordion-react:** Add isOpen as new prop on items ([401066d](https://github.com/SpareBank1/designsystem/commit/401066dacd0071fc685efff6fcf5fc5afb18c58c))
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
## [9.0.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.0.2...@sb1/ffe-accordion-react@9.0.3) (2020-11-18)
|
|
91
|
-
|
|
92
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
## [9.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.0.1...@sb1/ffe-accordion-react@9.0.2) (2020-11-10)
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
### Bug Fixes
|
|
102
|
-
|
|
103
|
-
* **ffe-accordion-react:** fix ts types ([b6d0e76](https://github.com/SpareBank1/designsystem/commit/b6d0e766447b7dda1263384cf4152d822289d038))
|
|
104
|
-
* **ffe-accordion-react:** hidden after animation is done ([dff60ae](https://github.com/SpareBank1/designsystem/commit/dff60aee86c077e06d3bd53d0e27f9b0000c065f))
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
## [9.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@9.0.0...@sb1/ffe-accordion-react@9.0.1) (2020-11-05)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
### Bug Fixes
|
|
114
|
-
|
|
115
|
-
* **ffe-accordion-react:** set type of button ([7612ac5](https://github.com/SpareBank1/designsystem/commit/7612ac50f4f3c3c13ea37b204e022ff38091052b))
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
# [9.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@8.0.4...@sb1/ffe-accordion-react@9.0.0) (2020-11-04)
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### Features
|
|
125
|
-
|
|
126
|
-
* **ffe-accordion-react:** accessibility fixes ([ee40ce7](https://github.com/SpareBank1/designsystem/commit/ee40ce752ce6f9b344dded2068ea195c65d69cdb))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### BREAKING CHANGES
|
|
130
|
-
|
|
131
|
-
* **ffe-accordion-react:** Changing the API of this component to make it more accessible
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## [8.0.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@8.0.3...@sb1/ffe-accordion-react@8.0.4) (2020-09-15)
|
|
138
|
-
|
|
139
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
## [8.0.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@8.0.2...@sb1/ffe-accordion-react@8.0.3) (2020-08-27)
|
|
146
|
-
|
|
147
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## [8.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@8.0.1...@sb1/ffe-accordion-react@8.0.2) (2020-08-12)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
### Bug Fixes
|
|
157
|
-
|
|
158
|
-
* **ffe-accordion-react:** a11y fixes ([837abf4](https://github.com/SpareBank1/designsystem/commit/837abf475adb0f248f26da85b8ec2ebb38bb6f77))
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
## [8.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@8.0.0...@sb1/ffe-accordion-react@8.0.1) (2020-08-04)
|
|
165
|
-
|
|
166
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
# [8.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.20...@sb1/ffe-accordion-react@8.0.0) (2020-07-30)
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
### Bug Fixes
|
|
176
|
-
|
|
177
|
-
* **ffe-accordion-react:** renamed title tag ([ee21117](https://github.com/SpareBank1/designsystem/commit/ee211179b4795e922128561140621876f69d3136))
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
### BREAKING CHANGES
|
|
181
|
-
|
|
182
|
-
* **ffe-accordion-react:** title is an existing property on li-elements and could cause confusion (TypeScript isn't amused when we override it, either).
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
## [7.0.20](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.19...@sb1/ffe-accordion-react@7.0.20) (2020-06-29)
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
### Bug Fixes
|
|
192
|
-
|
|
193
|
-
* **ffe-accordion-react:** added types ([2634cd5](https://github.com/SpareBank1/designsystem/commit/2634cd5598156808af7e2d353279113b873a5d61))
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
## [7.0.19](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.18...@sb1/ffe-accordion-react@7.0.19) (2020-06-24)
|
|
200
|
-
|
|
201
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
## [7.0.18](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.17...@sb1/ffe-accordion-react@7.0.18) (2020-05-27)
|
|
208
|
-
|
|
209
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
## [7.0.17](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.16...@sb1/ffe-accordion-react@7.0.17) (2020-05-19)
|
|
216
|
-
|
|
217
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
## [7.0.16](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.15...@sb1/ffe-accordion-react@7.0.16) (2020-03-31)
|
|
224
|
-
|
|
225
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
226
|
-
|
|
227
|
-
## [7.0.15](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.14...@sb1/ffe-accordion-react@7.0.15) (2020-03-18)
|
|
228
|
-
|
|
229
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
230
|
-
|
|
231
|
-
## [7.0.14](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.13...@sb1/ffe-accordion-react@7.0.14) (2020-03-17)
|
|
232
|
-
|
|
233
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
234
|
-
|
|
235
|
-
## [7.0.13](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.12...@sb1/ffe-accordion-react@7.0.13) (2020-03-16)
|
|
236
|
-
|
|
237
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
238
|
-
|
|
239
|
-
## [7.0.12](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.11...@sb1/ffe-accordion-react@7.0.12) (2020-03-13)
|
|
240
|
-
|
|
241
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
242
|
-
|
|
243
|
-
## [7.0.11](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.10...@sb1/ffe-accordion-react@7.0.11) (2020-03-10)
|
|
244
|
-
|
|
245
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
246
|
-
|
|
247
|
-
## [7.0.10](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.9...@sb1/ffe-accordion-react@7.0.10) (2020-03-06)
|
|
248
|
-
|
|
249
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
250
|
-
|
|
251
|
-
## [7.0.9](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.8...@sb1/ffe-accordion-react@7.0.9) (2020-02-26)
|
|
252
|
-
|
|
253
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
254
|
-
|
|
255
|
-
## [7.0.8](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.7...@sb1/ffe-accordion-react@7.0.8) (2020-02-26)
|
|
256
|
-
|
|
257
|
-
### Bug Fixes
|
|
258
|
-
|
|
259
|
-
- **ffe-accordion-react:** update uuid to version 7.0.0 ([dcf4aee](https://github.com/SpareBank1/designsystem/commit/dcf4aee5cb3341f936343e54c469fc0208bb6f0b))
|
|
260
|
-
|
|
261
|
-
## [7.0.7](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.5...@sb1/ffe-accordion-react@7.0.7) (2020-02-26)
|
|
262
|
-
|
|
263
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
264
|
-
|
|
265
|
-
## [7.0.6](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.5...@sb1/ffe-accordion-react@7.0.6) (2020-02-25)
|
|
266
|
-
|
|
267
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
268
|
-
|
|
269
|
-
## [7.0.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.4...@sb1/ffe-accordion-react@7.0.5) (2019-11-20)
|
|
270
|
-
|
|
271
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
272
|
-
|
|
273
|
-
## [7.0.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.3...@sb1/ffe-accordion-react@7.0.4) (2019-10-28)
|
|
274
|
-
|
|
275
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
276
|
-
|
|
277
|
-
## [7.0.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.2...@sb1/ffe-accordion-react@7.0.3) (2019-10-03)
|
|
278
|
-
|
|
279
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
280
|
-
|
|
281
|
-
## [7.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.1...@sb1/ffe-accordion-react@7.0.2) (2019-08-28)
|
|
282
|
-
|
|
283
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
284
|
-
|
|
285
|
-
## [7.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@7.0.0...@sb1/ffe-accordion-react@7.0.1) (2019-08-28)
|
|
286
|
-
|
|
287
|
-
### Bug Fixes
|
|
288
|
-
|
|
289
|
-
- **ffe-accordion-react:** use our own Collapse component ([04db7bc](https://github.com/SpareBank1/designsystem/commit/04db7bc))
|
|
290
|
-
|
|
291
|
-
# [7.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.3.4...@sb1/ffe-accordion-react@7.0.0) (2019-08-27)
|
|
292
|
-
|
|
293
|
-
### chore
|
|
294
|
-
|
|
295
|
-
- bump React to 16.9 to allow for using hooks etc ([e3901f1](https://github.com/SpareBank1/designsystem/commit/e3901f1))
|
|
296
|
-
|
|
297
|
-
### BREAKING CHANGES
|
|
298
|
-
|
|
299
|
-
- peerDep of React is raised to 16.9. While this in itself
|
|
300
|
-
isn't a breaking change, it allows for the use of hooks in later releases.
|
|
301
|
-
Such changes would just be a minor version, or even a patch, but without
|
|
302
|
-
this major version bump it would result in a runtime error for consumers.
|
|
303
|
-
|
|
304
|
-
## [6.3.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.3.3...@sb1/ffe-accordion-react@6.3.4) (2019-08-12)
|
|
305
|
-
|
|
306
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
307
|
-
|
|
308
|
-
## [6.3.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.3.2...@sb1/ffe-accordion-react@6.3.3) (2019-04-24)
|
|
309
|
-
|
|
310
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
311
|
-
|
|
312
|
-
## [6.3.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.3.1...@sb1/ffe-accordion-react@6.3.2) (2019-04-08)
|
|
313
|
-
|
|
314
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
315
|
-
|
|
316
|
-
## [6.3.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.3.0...@sb1/ffe-accordion-react@6.3.1) (2019-03-25)
|
|
317
|
-
|
|
318
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
319
|
-
|
|
320
|
-
# [6.3.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.12...@sb1/ffe-accordion-react@6.3.0) (2019-03-14)
|
|
321
|
-
|
|
322
|
-
### Features
|
|
323
|
-
|
|
324
|
-
- **ffe-accordion-react:** DIG-48762 - Added support for supplying id to AccordionItem ([1943cbf](https://github.com/SpareBank1/designsystem/commit/1943cbf))
|
|
325
|
-
|
|
326
|
-
## [6.2.12](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.11...@sb1/ffe-accordion-react@6.2.12) (2019-02-18)
|
|
327
|
-
|
|
328
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
329
|
-
|
|
330
|
-
## [6.2.11](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.10...@sb1/ffe-accordion-react@6.2.11) (2019-01-29)
|
|
331
|
-
|
|
332
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
333
|
-
|
|
334
|
-
## [6.2.10](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.9...@sb1/ffe-accordion-react@6.2.10) (2018-12-19)
|
|
335
|
-
|
|
336
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
337
|
-
|
|
338
|
-
## [6.2.9](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.8...@sb1/ffe-accordion-react@6.2.9) (2018-12-18)
|
|
339
|
-
|
|
340
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
341
|
-
|
|
342
|
-
## [6.2.8](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.7...@sb1/ffe-accordion-react@6.2.8) (2018-12-11)
|
|
343
|
-
|
|
344
|
-
### Bug Fixes
|
|
345
|
-
|
|
346
|
-
- Build tree shakeable packages ([fb4a9ea](https://github.com/SpareBank1/designsystem/commit/fb4a9ea))
|
|
347
|
-
|
|
348
|
-
## [6.2.7](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.6...@sb1/ffe-accordion-react@6.2.7) (2018-12-04)
|
|
349
|
-
|
|
350
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
351
|
-
|
|
352
|
-
## [6.2.6](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.5...@sb1/ffe-accordion-react@6.2.6) (2018-11-26)
|
|
353
|
-
|
|
354
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
355
|
-
|
|
356
|
-
## [6.2.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.4...@sb1/ffe-accordion-react@6.2.5) (2018-11-16)
|
|
357
|
-
|
|
358
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
359
|
-
|
|
360
|
-
## [6.2.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.3...@sb1/ffe-accordion-react@6.2.4) (2018-11-13)
|
|
361
|
-
|
|
362
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
363
|
-
|
|
364
|
-
## [6.2.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.2...@sb1/ffe-accordion-react@6.2.3) (2018-11-08)
|
|
365
|
-
|
|
366
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
367
|
-
|
|
368
|
-
## [6.2.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.1...@sb1/ffe-accordion-react@6.2.2) (2018-10-17)
|
|
369
|
-
|
|
370
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
371
|
-
|
|
372
|
-
## [6.2.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.2.0...@sb1/ffe-accordion-react@6.2.1) (2018-10-15)
|
|
373
|
-
|
|
374
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
375
|
-
|
|
376
|
-
# [6.2.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.1.1...@sb1/ffe-accordion-react@6.2.0) (2018-10-09)
|
|
377
|
-
|
|
378
|
-
### Features
|
|
379
|
-
|
|
380
|
-
- **ffe-accordion-react:** Add classname prop for Accordion and AccordionItem ([79859cb](https://github.com/SpareBank1/designsystem/commit/79859cb))
|
|
381
|
-
|
|
382
|
-
<a name="6.1.1"></a>
|
|
383
|
-
|
|
384
|
-
## [6.1.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.1.0...@sb1/ffe-accordion-react@6.1.1) (2018-09-24)
|
|
385
|
-
|
|
386
|
-
### Bug Fixes
|
|
387
|
-
|
|
388
|
-
- **ffe-accordion-react:** fixed async issues with setState ([706dee5](https://github.com/SpareBank1/designsystem/commit/706dee5))
|
|
389
|
-
|
|
390
|
-
<a name="6.1.0"></a>
|
|
391
|
-
|
|
392
|
-
# [6.1.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.7...@sb1/ffe-accordion-react@6.1.0) (2018-09-06)
|
|
393
|
-
|
|
394
|
-
### Features
|
|
395
|
-
|
|
396
|
-
- **ffe-accordion-react:** Use css transition ([8aae70c](https://github.com/SpareBank1/designsystem/commit/8aae70c))
|
|
397
|
-
- **ffe-accordion-react:** Use new modifier class names ([8bf9c03](https://github.com/SpareBank1/designsystem/commit/8bf9c03))
|
|
398
|
-
|
|
399
|
-
### BREAKING CHANGES
|
|
400
|
-
|
|
401
|
-
- **ffe-accordion-react:** Replaces `react-collapse` with `react-css-collapse`,
|
|
402
|
-
which is internally used for toggling the accordion items with help of
|
|
403
|
-
css transitions. Further, this change drops support for property
|
|
404
|
-
`hasNestedCollapse`, which is a flag used by `react-collapse`.
|
|
405
|
-
|
|
406
|
-
See https://www.npmjs.com/package/react-css-collapse
|
|
407
|
-
|
|
408
|
-
<a name="6.0.7"></a>
|
|
409
|
-
|
|
410
|
-
## [6.0.7](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.6...@sb1/ffe-accordion-react@6.0.7) (2018-08-09)
|
|
411
|
-
|
|
412
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
413
|
-
|
|
414
|
-
<a name="6.0.6"></a>
|
|
415
|
-
|
|
416
|
-
## [6.0.6](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.5...@sb1/ffe-accordion-react@6.0.6) (2018-06-14)
|
|
417
|
-
|
|
418
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
419
|
-
|
|
420
|
-
<a name="6.0.5"></a>
|
|
421
|
-
|
|
422
|
-
## [6.0.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.4...@sb1/ffe-accordion-react@6.0.5) (2018-06-04)
|
|
423
|
-
|
|
424
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
425
|
-
|
|
426
|
-
<a name="6.0.4"></a>
|
|
427
|
-
|
|
428
|
-
## [6.0.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.3...@sb1/ffe-accordion-react@6.0.4) (2018-06-04)
|
|
429
|
-
|
|
430
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
431
|
-
|
|
432
|
-
<a name="6.0.3"></a>
|
|
433
|
-
|
|
434
|
-
## [6.0.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.2...@sb1/ffe-accordion-react@6.0.3) (2018-05-29)
|
|
435
|
-
|
|
436
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
437
|
-
|
|
438
|
-
<a name="6.0.2"></a>
|
|
439
|
-
|
|
440
|
-
## [6.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.1...@sb1/ffe-accordion-react@6.0.2) (2018-05-04)
|
|
441
|
-
|
|
442
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
443
|
-
|
|
444
|
-
<a name="6.0.1"></a>
|
|
445
|
-
|
|
446
|
-
## [6.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@6.0.0...@sb1/ffe-accordion-react@6.0.1) (2018-04-11)
|
|
447
|
-
|
|
448
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
449
|
-
|
|
450
|
-
<a name="6.0.0"></a>
|
|
451
|
-
|
|
452
|
-
# [6.0.0](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.5...@sb1/ffe-accordion-react@6.0.0) (2018-04-11)
|
|
453
|
-
|
|
454
|
-
### Features
|
|
455
|
-
|
|
456
|
-
- **ffe-accordion-react:** Make AccordionItems controllable ([a2761e8](https://github.com/SpareBank1/designsystem/commit/a2761e8)), closes [#155](https://github.com/SpareBank1/designsystem/issues/155)
|
|
457
|
-
|
|
458
|
-
### BREAKING CHANGES
|
|
459
|
-
|
|
460
|
-
- **ffe-accordion-react:** `AccordionItem`'s prop `isOpen` is renamed to
|
|
461
|
-
`defaultOpen`, while a new `open` prop let's the consumer control the
|
|
462
|
-
open state of the accordion. To migrate, simply rename all `isOpen`
|
|
463
|
-
props to `defaultOpen`.
|
|
464
|
-
- **ffe-accordion-react:** `AccordionItem`'s props `onOpen` and `onClose` replaced
|
|
465
|
-
with `onToggleOpen(nextIsOpen)`.
|
|
466
|
-
|
|
467
|
-
<a name="5.0.5"></a>
|
|
468
|
-
|
|
469
|
-
## [5.0.5](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.4...@sb1/ffe-accordion-react@5.0.5) (2018-04-06)
|
|
470
|
-
|
|
471
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
472
|
-
|
|
473
|
-
<a name="5.0.4"></a>
|
|
474
|
-
|
|
475
|
-
## [5.0.4](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.3...@sb1/ffe-accordion-react@5.0.4) (2018-03-27)
|
|
476
|
-
|
|
477
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
478
|
-
|
|
479
|
-
<a name="5.0.3"></a>
|
|
480
|
-
|
|
481
|
-
## [5.0.3](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.2...@sb1/ffe-accordion-react@5.0.3) (2018-03-13)
|
|
482
|
-
|
|
483
|
-
**Note:** Version bump only for package @sb1/ffe-accordion-react
|
|
484
|
-
|
|
485
|
-
<a name="5.0.2"></a>
|
|
486
|
-
|
|
487
|
-
## [5.0.2](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.0...@sb1/ffe-accordion-react@5.0.2) (2018-03-07)
|
|
488
|
-
|
|
489
|
-
### Bug Fixes
|
|
490
|
-
|
|
491
|
-
- Correct peerDependencies after breaking change ([aab59ce](https://github.com/SpareBank1/designsystem/commit/aab59ce))
|
|
492
|
-
|
|
493
|
-
<a name="5.0.1"></a>
|
|
494
|
-
|
|
495
|
-
## [5.0.1](https://github.com/SpareBank1/designsystem/compare/@sb1/ffe-accordion-react@5.0.0...@sb1/ffe-accordion-react@5.0.1) (2018-03-02)
|
|
496
|
-
|
|
497
|
-
### Bug Fixes
|
|
498
|
-
|
|
499
|
-
- Correct peerDependencies after breaking change ([4318363](https://github.com/SpareBank1/designsystem/commit/4318363))
|
|
500
|
-
|
|
501
|
-
<a name="5.0.0"></a>
|
|
502
|
-
|
|
503
|
-
# 5.0.0 (2018-02-25)
|
|
504
|
-
|
|
505
|
-
### Bug Fixes
|
|
506
|
-
|
|
507
|
-
- **ffe-accordion-react:** Create ID only once ([dc94925](https://github.com/SpareBank1/designsystem/commit/dc94925))
|
|
508
|
-
- **ffe-accordion-react:** Remove "expandableContent" prop ([be8043d](https://github.com/SpareBank1/designsystem/commit/be8043d))
|
|
509
|
-
- Treeshake ffe-icons ([6bc9d6f](https://github.com/SpareBank1/designsystem/commit/6bc9d6f))
|
|
510
|
-
- Upgrade ffe-icons-react to v4 ([01bc161](https://github.com/SpareBank1/designsystem/commit/01bc161))
|
|
511
|
-
|
|
512
|
-
### Chores
|
|
513
|
-
|
|
514
|
-
- add [@sb1](https://github.com/sb1)/ scope to all packages ([37efbb4](https://github.com/SpareBank1/designsystem/commit/37efbb4))
|
|
515
|
-
|
|
516
|
-
### BREAKING CHANGES
|
|
517
|
-
|
|
518
|
-
- All packages have been renamed to add the @sb1 scope.
|
|
519
|
-
|
|
520
|
-
See links [1] and [2] to read more about package scopes.
|
|
521
|
-
|
|
522
|
-
Unfortunately this requires you update both your dependencies in
|
|
523
|
-
`package.json` and all `import` or `require` statements in your code.
|
|
524
|
-
Also, you unfortunately have to upgrade all FFE packages at once due to
|
|
525
|
-
dependency between packages. If you are on the latest version prior to
|
|
526
|
-
this breaking change the upgrade should be a matter of updating
|
|
527
|
-
`package.json` with new package names and versions, and updating your
|
|
528
|
-
imports.
|
|
529
|
-
|
|
530
|
-
To help find the proper package versions you can either browse to the
|
|
531
|
-
packages you need or check out the list of Git tags either on
|
|
532
|
-
Github [3] or by cloning the repository and running the `git tag`
|
|
533
|
-
command. All package versions get a tag in the format
|
|
534
|
-
_package@version_.
|
|
535
|
-
|
|
536
|
-
Update your `package.json` with the latest package version and add the
|
|
537
|
-
@sb1 scope to the package name:
|
|
538
|
-
|
|
539
|
-
```diff
|
|
540
|
-
- "ffe-core": "11.0.2",
|
|
541
|
-
+ "@sb1/ffe-core": "11.0.2",
|
|
542
|
-
```
|
|
543
|
-
|
|
544
|
-
Scoped packages all get put in a subdirectory in `node_modules/`. In our
|
|
545
|
-
case packages will be put in the `node_modules/@sb1/` directory. If your
|
|
546
|
-
build depends on file paths (for instance for copying fonts) you need to
|
|
547
|
-
update that path to include the scope.
|
|
548
|
-
|
|
549
|
-
The directory structure also means you have to update your imports, both
|
|
550
|
-
in Less and in JavaScript.
|
|
551
|
-
|
|
552
|
-
Using `less-plugin-npm-import`:
|
|
553
|
-
|
|
554
|
-
```diff
|
|
555
|
-
- @import 'npm://ffe-core/less/ffe';
|
|
556
|
-
+ @import 'npm://@sb1/ffe-core/less/ffe';
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
Using Webpack:
|
|
560
|
-
|
|
561
|
-
```diff
|
|
562
|
-
- @import '~ffe-core/less/ffe';
|
|
563
|
-
+ @import '~@sb1/ffe-core/less/ffe';
|
|
564
|
-
```
|
|
565
|
-
|
|
566
|
-
Using plain old paths:
|
|
567
|
-
|
|
568
|
-
```diff
|
|
569
|
-
- @import '../path/to/node_modules/ffe-core/less/ffe';
|
|
570
|
-
+ @import '../path/to/node_modules/@sb1/ffe-core/less/ffe';
|
|
571
|
-
```
|
|
572
|
-
|
|
573
|
-
JavaScript `import`:
|
|
574
|
-
|
|
575
|
-
```diff
|
|
576
|
-
- import { ActionButton } from 'ffe-buttons-react';
|
|
577
|
-
+ import { ActionButton } from '@sb1/ffe-buttons-react';
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
JavaScript `require`:
|
|
581
|
-
|
|
582
|
-
```diff
|
|
583
|
-
- const { ActionButton } = require('ffe-buttons-react').default;
|
|
584
|
-
+ const { ActionButton } = require('@sb1/ffe-buttons-react').default;
|
|
585
|
-
```
|
|
586
|
-
|
|
587
|
-
[1]: https://docs.npmjs.com/misc/scope
|
|
588
|
-
[2]: https://docs.npmjs.com/getting-started/scoped-packages
|
|
589
|
-
[3]: https://github.com/sparebank1/designsystem/tags
|
|
590
|
-
|
|
591
|
-
- **ffe-accordion-react:** Replace "expandedContent" with children- & title- prop
|
|
592
|
-
|
|
593
|
-
This commit changes the structure of ffe-accordion-react by making
|
|
594
|
-
the expandable content of the accordion item the children, while the heading of the item
|
|
595
|
-
is now a new "title"-prop. This previous soulution was somewhat backwards,
|
|
596
|
-
while this change will be more the React way of doing things.
|
|
597
|
-
|
|
598
|
-
<a name="4.0.10"></a>
|
|
599
|
-
|
|
600
|
-
## [4.0.10](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.9...ffe-accordion-react@4.0.10) (2018-02-23)
|
|
601
|
-
|
|
602
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
603
|
-
|
|
604
|
-
<a name="4.0.9"></a>
|
|
605
|
-
|
|
606
|
-
## [4.0.9](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.8...ffe-accordion-react@4.0.9) (2018-02-22)
|
|
607
|
-
|
|
608
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
609
|
-
|
|
610
|
-
<a name="4.0.8"></a>
|
|
611
|
-
|
|
612
|
-
## [4.0.8](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.7...ffe-accordion-react@4.0.8) (2018-02-20)
|
|
613
|
-
|
|
614
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
615
|
-
|
|
616
|
-
<a name="4.0.7"></a>
|
|
617
|
-
|
|
618
|
-
## [4.0.7](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.6...ffe-accordion-react@4.0.7) (2018-02-15)
|
|
619
|
-
|
|
620
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
621
|
-
|
|
622
|
-
<a name="4.0.6"></a>
|
|
623
|
-
|
|
624
|
-
## [4.0.6](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.5...ffe-accordion-react@4.0.6) (2018-02-01)
|
|
625
|
-
|
|
626
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
627
|
-
|
|
628
|
-
<a name="4.0.5"></a>
|
|
629
|
-
|
|
630
|
-
## [4.0.5](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.4...ffe-accordion-react@4.0.5) (2018-01-31)
|
|
631
|
-
|
|
632
|
-
### Bug Fixes
|
|
633
|
-
|
|
634
|
-
- Treeshake ffe-icons
|
|
635
|
-
|
|
636
|
-
<a name="4.0.4"></a>
|
|
637
|
-
|
|
638
|
-
## [4.0.4](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.3...ffe-accordion-react@4.0.4) (2018-01-31)
|
|
639
|
-
|
|
640
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
641
|
-
|
|
642
|
-
<a name="4.0.3"></a>
|
|
643
|
-
|
|
644
|
-
## [4.0.3](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.2...ffe-accordion-react@4.0.3) (2018-01-19)
|
|
645
|
-
|
|
646
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
647
|
-
|
|
648
|
-
<a name="4.0.2"></a>
|
|
649
|
-
|
|
650
|
-
## [4.0.2](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.1...ffe-accordion-react@4.0.2) (2018-01-19)
|
|
651
|
-
|
|
652
|
-
### Bug Fixes
|
|
653
|
-
|
|
654
|
-
- Upgrade ffe-icons-react to v4
|
|
655
|
-
|
|
656
|
-
<a name="4.0.1"></a>
|
|
657
|
-
|
|
658
|
-
## [4.0.1](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@4.0.0...ffe-accordion-react@4.0.1) (2018-01-19)
|
|
659
|
-
|
|
660
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
661
|
-
|
|
662
|
-
<a name="4.0.0"></a>
|
|
663
|
-
|
|
664
|
-
# [4.0.0](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@3.1.6...ffe-accordion-react@4.0.0) (2018-01-19)
|
|
665
|
-
|
|
666
|
-
### Bug Fixes
|
|
667
|
-
|
|
668
|
-
- **ffe-accordion-react:** Remove "expandableContent" prop
|
|
669
|
-
|
|
670
|
-
### BREAKING CHANGES
|
|
671
|
-
|
|
672
|
-
- **ffe-accordion-react:** Replace "expandedContent" with children- & title- prop
|
|
673
|
-
|
|
674
|
-
This commit changes the structure of ffe-accordion-react by making
|
|
675
|
-
the expandable content of the accordion item the children, while the heading of the item
|
|
676
|
-
is now a new "title"-prop. This previous soulution was somewhat backwards,
|
|
677
|
-
while this change will be more the React way of doing things.
|
|
678
|
-
|
|
679
|
-
<a name="3.1.6"></a>
|
|
680
|
-
|
|
681
|
-
## [3.1.6](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@3.1.5...ffe-accordion-react@3.1.6) (2018-01-10)
|
|
682
|
-
|
|
683
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
684
|
-
|
|
685
|
-
<a name="3.1.5"></a>
|
|
686
|
-
|
|
687
|
-
## [3.1.5](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@3.1.4...ffe-accordion-react@3.1.5) (2018-01-09)
|
|
688
|
-
|
|
689
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
690
|
-
|
|
691
|
-
<a name="3.1.4"></a>
|
|
692
|
-
|
|
693
|
-
## [3.1.4](https://github.com/SpareBank1/designsystem/compare/ffe-accordion-react@3.1.3...ffe-accordion-react@3.1.4) (2018-01-05)
|
|
694
|
-
|
|
695
|
-
**Note:** Version bump only for package ffe-accordion-react
|
|
696
|
-
|
|
697
|
-
<a name="3.1.3"></a>
|
|
698
|
-
|
|
699
|
-
## 3.1.3 (2018-01-04)
|
|
700
|
-
|
|
701
|
-
### Bug Fixes
|
|
702
|
-
|
|
703
|
-
- **ffe-accordion-react:** Create ID only once
|
|
704
|
-
|
|
705
|
-
## 3.1.2
|
|
706
|
-
|
|
707
|
-
- Added documentation and refactored internally.
|
|
708
|
-
|
|
709
|
-
## 3.1.1
|
|
710
|
-
|
|
711
|
-
- Removed button and replaced with div to fix bug in internet explorer
|
|
712
|
-
|
|
713
|
-
# 3.1.0
|
|
714
|
-
|
|
715
|
-
- Upgraded to react 16. Enzyme to 3.1.1 to support react 16. Added repository to remove warning.
|
|
716
|
-
Upgraded ffe-accordian to remove warning.
|
|
717
|
-
|
|
718
|
-
## 3.0.1
|
|
719
|
-
|
|
720
|
-
- Fix a propType error that would happen if isOpen was not set on AccordionItem. Collapse complained that
|
|
721
|
-
`this.state.isOpen` was undefined, so it now defaults to the boolean `false`.
|
|
722
|
-
|
|
723
|
-
# 3.0.0
|
|
724
|
-
|
|
725
|
-
### BREAKING CHANGES
|
|
726
|
-
|
|
727
|
-
- Changing to use flex to align items instead of absolute positioning
|
|
728
|
-
|
|
729
|
-
# 2.1.0
|
|
730
|
-
|
|
731
|
-
Use `react-collapse` instead of ffe-expandable-react, since the latter is deprecated. Also add a new property
|
|
732
|
-
`hasNestedCollapse`, which lets the consumer use another `react-collapse` element inside the accordion.
|
|
733
|
-
|
|
734
|
-
## 2.0.4
|
|
735
|
-
|
|
736
|
-
Set `type="button"` for Button-toggler to prevent submit when accordion is used inside a form.
|
|
737
|
-
|
|
738
|
-
## .2.0.3
|
|
739
|
-
|
|
740
|
-
- Use PropTypes from prop-types package
|
|
741
|
-
|
|
742
|
-
## 2.0.2
|
|
743
|
-
|
|
744
|
-
Remove the `--white` modifier classes, since they are now the default.
|
|
745
|
-
|
|
746
|
-
## 2.0.1
|
|
747
|
-
|
|
748
|
-
Bump ffe-accordion version.
|
|
749
|
-
|
|
750
|
-
# 2.0.0
|
|
751
|
-
|
|
752
|
-
### BREAKING CHANGES
|
|
753
|
-
|
|
754
|
-
Use `<button>` (instead of `<a>`) for the toggler to prevent unnecessary links.
|
|
755
|
-
Add `ffe-accordion` as a peer dependency.
|
|
756
|
-
|
|
757
|
-
## 1.2.7
|
|
758
|
-
|
|
759
|
-
Fixed bug in aria label id
|
|
760
|
-
|
|
761
|
-
## 1.2.6
|
|
762
|
-
|
|
763
|
-
Update ffe-expandable-react to 1.0.5 or above
|
|
764
|
-
|
|
765
|
-
## 1.2.5
|
|
766
|
-
|
|
767
|
-
Update eslint configuration
|
|
768
|
-
|
|
769
|
-
## 1.2.4
|
|
770
|
-
|
|
771
|
-
This release fixes a few issues from v1.2.3.
|
|
772
|
-
|
|
773
|
-
- Use `uuid` instead of `nfe-hash` for unique IDs.
|
|
774
|
-
- Make `uuid` and `isOpen` optional props.
|
|
775
|
-
|
|
776
|
-
## 1.2.3
|
|
777
|
-
|
|
778
|
-
Make accordion items have globally unique IDs.
|
|
779
|
-
|
|
780
|
-
## 1.2.2
|
|
781
|
-
|
|
782
|
-
Updated ffe-expandable-react to use react-height to calculate panel height
|
|
783
|
-
|
|
784
|
-
## 1.2.1
|
|
785
|
-
|
|
786
|
-
Updated ffe-expandable-react and ffe-icons-react to fix some bugs.
|
|
787
|
-
|
|
788
|
-
# 1.2.0
|
|
789
|
-
|
|
790
|
-
Added aria-label-tag to be able to set text screen-readers read.
|
|
791
|
-
|
|
792
|
-
# 1.0.0
|
|
793
|
-
|
|
794
|
-
Initial version
|
package/es/Accordion.spec.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import Accordion from './Accordion';
|
|
2
|
-
import AccordionItem from './AccordionItem';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { fireEvent, render, screen } from '@testing-library/react';
|
|
5
|
-
describe('<Accordion />', function () {
|
|
6
|
-
it('should render headings', function () {
|
|
7
|
-
render( /*#__PURE__*/React.createElement(Accordion, {
|
|
8
|
-
headingLevel: 3
|
|
9
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
10
|
-
heading: "heading1"
|
|
11
|
-
}, "content1"), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
12
|
-
heading: "heading2"
|
|
13
|
-
}, "content2")));
|
|
14
|
-
expect(screen.getByRole('heading', {
|
|
15
|
-
name: /heading1/i,
|
|
16
|
-
level: 3
|
|
17
|
-
})).toBeInTheDocument();
|
|
18
|
-
expect(screen.getByRole('heading', {
|
|
19
|
-
name: /heading2/i,
|
|
20
|
-
level: 3
|
|
21
|
-
})).toBeInTheDocument();
|
|
22
|
-
});
|
|
23
|
-
it('should set up correct associations between heading and content', function () {
|
|
24
|
-
render( /*#__PURE__*/React.createElement(Accordion, {
|
|
25
|
-
headingLevel: 3
|
|
26
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
27
|
-
defaultOpen: true,
|
|
28
|
-
heading: "heading1"
|
|
29
|
-
}, "content1"), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
30
|
-
defaultOpen: true,
|
|
31
|
-
heading: "heading2"
|
|
32
|
-
}, "content2")));
|
|
33
|
-
var firstButton = screen.getByRole('button', {
|
|
34
|
-
name: /heading1/i
|
|
35
|
-
});
|
|
36
|
-
var firstContent = screen.getByRole('region', {
|
|
37
|
-
name: /heading1/i
|
|
38
|
-
});
|
|
39
|
-
expect(firstButton.getAttribute('aria-controls')).toEqual(firstContent.getAttribute('id'));
|
|
40
|
-
expect(firstContent.getAttribute('aria-labelledby')).toEqual(firstButton.getAttribute('id'));
|
|
41
|
-
var secondButton = screen.getByRole('button', {
|
|
42
|
-
name: /heading2/i
|
|
43
|
-
});
|
|
44
|
-
var secondContent = screen.getByRole('region', {
|
|
45
|
-
name: /heading2/i
|
|
46
|
-
});
|
|
47
|
-
expect(secondButton.getAttribute('aria-controls')).toEqual(secondContent.getAttribute('id'));
|
|
48
|
-
expect(secondContent.getAttribute('aria-labelledby')).toEqual(secondButton.getAttribute('id'));
|
|
49
|
-
});
|
|
50
|
-
it('should expand sections', function () {
|
|
51
|
-
render( /*#__PURE__*/React.createElement(Accordion, {
|
|
52
|
-
headingLevel: 3
|
|
53
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
54
|
-
heading: "heading1"
|
|
55
|
-
}, "content1"), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
56
|
-
heading: "heading2"
|
|
57
|
-
}, "content2")));
|
|
58
|
-
var firstButton = screen.getByRole('button', {
|
|
59
|
-
name: /heading1/i
|
|
60
|
-
});
|
|
61
|
-
var secondButton = screen.getByRole('button', {
|
|
62
|
-
name: /heading2/i
|
|
63
|
-
});
|
|
64
|
-
expect(firstButton.getAttribute('aria-expanded')).toEqual('false');
|
|
65
|
-
expect(secondButton.getAttribute('aria-expanded')).toEqual('false');
|
|
66
|
-
expect(screen.queryByRole('region', {
|
|
67
|
-
name: /heading1/i
|
|
68
|
-
})).not.toBeInTheDocument();
|
|
69
|
-
expect(screen.queryByRole('region', {
|
|
70
|
-
name: /heading2/i
|
|
71
|
-
})).not.toBeInTheDocument();
|
|
72
|
-
fireEvent.click(firstButton);
|
|
73
|
-
fireEvent.click(secondButton);
|
|
74
|
-
expect(firstButton.getAttribute('aria-expanded')).toEqual('true');
|
|
75
|
-
expect(secondButton.getAttribute('aria-expanded')).toEqual('true');
|
|
76
|
-
expect(screen.getByRole('region', {
|
|
77
|
-
name: /heading1/i
|
|
78
|
-
})).toBeInTheDocument();
|
|
79
|
-
expect(screen.getByRole('region', {
|
|
80
|
-
name: /heading2/i
|
|
81
|
-
})).toBeInTheDocument();
|
|
82
|
-
});
|
|
83
|
-
});
|
package/lib/Accordion.spec.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
4
|
-
|
|
5
|
-
var _AccordionItem = _interopRequireDefault(require("./AccordionItem"));
|
|
6
|
-
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
|
|
9
|
-
var _react2 = require("@testing-library/react");
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
describe('<Accordion />', function () {
|
|
14
|
-
it('should render headings', function () {
|
|
15
|
-
(0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
16
|
-
headingLevel: 3
|
|
17
|
-
}, /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
18
|
-
heading: "heading1"
|
|
19
|
-
}, "content1"), /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
20
|
-
heading: "heading2"
|
|
21
|
-
}, "content2")));
|
|
22
|
-
expect(_react2.screen.getByRole('heading', {
|
|
23
|
-
name: /heading1/i,
|
|
24
|
-
level: 3
|
|
25
|
-
})).toBeInTheDocument();
|
|
26
|
-
expect(_react2.screen.getByRole('heading', {
|
|
27
|
-
name: /heading2/i,
|
|
28
|
-
level: 3
|
|
29
|
-
})).toBeInTheDocument();
|
|
30
|
-
});
|
|
31
|
-
it('should set up correct associations between heading and content', function () {
|
|
32
|
-
(0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
33
|
-
headingLevel: 3
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
35
|
-
defaultOpen: true,
|
|
36
|
-
heading: "heading1"
|
|
37
|
-
}, "content1"), /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
38
|
-
defaultOpen: true,
|
|
39
|
-
heading: "heading2"
|
|
40
|
-
}, "content2")));
|
|
41
|
-
|
|
42
|
-
var firstButton = _react2.screen.getByRole('button', {
|
|
43
|
-
name: /heading1/i
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
var firstContent = _react2.screen.getByRole('region', {
|
|
47
|
-
name: /heading1/i
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
expect(firstButton.getAttribute('aria-controls')).toEqual(firstContent.getAttribute('id'));
|
|
51
|
-
expect(firstContent.getAttribute('aria-labelledby')).toEqual(firstButton.getAttribute('id'));
|
|
52
|
-
|
|
53
|
-
var secondButton = _react2.screen.getByRole('button', {
|
|
54
|
-
name: /heading2/i
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
var secondContent = _react2.screen.getByRole('region', {
|
|
58
|
-
name: /heading2/i
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
expect(secondButton.getAttribute('aria-controls')).toEqual(secondContent.getAttribute('id'));
|
|
62
|
-
expect(secondContent.getAttribute('aria-labelledby')).toEqual(secondButton.getAttribute('id'));
|
|
63
|
-
});
|
|
64
|
-
it('should expand sections', function () {
|
|
65
|
-
(0, _react2.render)( /*#__PURE__*/_react.default.createElement(_Accordion.default, {
|
|
66
|
-
headingLevel: 3
|
|
67
|
-
}, /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
68
|
-
heading: "heading1"
|
|
69
|
-
}, "content1"), /*#__PURE__*/_react.default.createElement(_AccordionItem.default, {
|
|
70
|
-
heading: "heading2"
|
|
71
|
-
}, "content2")));
|
|
72
|
-
|
|
73
|
-
var firstButton = _react2.screen.getByRole('button', {
|
|
74
|
-
name: /heading1/i
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
var secondButton = _react2.screen.getByRole('button', {
|
|
78
|
-
name: /heading2/i
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
expect(firstButton.getAttribute('aria-expanded')).toEqual('false');
|
|
82
|
-
expect(secondButton.getAttribute('aria-expanded')).toEqual('false');
|
|
83
|
-
expect(_react2.screen.queryByRole('region', {
|
|
84
|
-
name: /heading1/i
|
|
85
|
-
})).not.toBeInTheDocument();
|
|
86
|
-
expect(_react2.screen.queryByRole('region', {
|
|
87
|
-
name: /heading2/i
|
|
88
|
-
})).not.toBeInTheDocument();
|
|
89
|
-
|
|
90
|
-
_react2.fireEvent.click(firstButton);
|
|
91
|
-
|
|
92
|
-
_react2.fireEvent.click(secondButton);
|
|
93
|
-
|
|
94
|
-
expect(firstButton.getAttribute('aria-expanded')).toEqual('true');
|
|
95
|
-
expect(secondButton.getAttribute('aria-expanded')).toEqual('true');
|
|
96
|
-
expect(_react2.screen.getByRole('region', {
|
|
97
|
-
name: /heading1/i
|
|
98
|
-
})).toBeInTheDocument();
|
|
99
|
-
expect(_react2.screen.getByRole('region', {
|
|
100
|
-
name: /heading2/i
|
|
101
|
-
})).toBeInTheDocument();
|
|
102
|
-
});
|
|
103
|
-
});
|