@sb1/ffe-accordion-react 9.2.2 → 9.2.6

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