@sb1/ffe-lists-react 9.1.13 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +0 -5
  2. package/es/BulletList.js +25 -23
  3. package/es/BulletListItem.js +25 -17
  4. package/es/CheckList.js +25 -24
  5. package/es/CheckListItem.js +29 -35
  6. package/es/DescriptionList.js +25 -33
  7. package/es/DescriptionListDescription.js +25 -17
  8. package/es/DescriptionListMultiCol.js +35 -32
  9. package/es/DescriptionListTerm.js +25 -17
  10. package/es/DetailListCard.js +25 -18
  11. package/es/DetailListCardItem.js +31 -32
  12. package/es/NumberedList.js +25 -23
  13. package/es/NumberedListItem.js +25 -17
  14. package/es/StylizedNumberedList.js +25 -19
  15. package/es/StylizedNumberedListItem.js +26 -20
  16. package/es/index.js +14 -16
  17. package/lib/BulletList.js +32 -30
  18. package/lib/BulletListItem.js +32 -24
  19. package/lib/CheckList.js +32 -31
  20. package/lib/CheckListItem.js +37 -43
  21. package/lib/DescriptionList.js +32 -40
  22. package/lib/DescriptionListDescription.js +32 -24
  23. package/lib/DescriptionListMultiCol.js +42 -39
  24. package/lib/DescriptionListTerm.js +32 -24
  25. package/lib/DetailListCard.js +32 -25
  26. package/lib/DetailListCardItem.js +38 -39
  27. package/lib/NumberedList.js +32 -30
  28. package/lib/NumberedListItem.js +32 -24
  29. package/lib/StylizedNumberedList.js +32 -26
  30. package/lib/StylizedNumberedListItem.js +33 -27
  31. package/lib/index.js +30 -105
  32. package/package.json +5 -6
  33. package/types/BulletList.d.ts +6 -0
  34. package/types/BulletListItem.d.ts +4 -0
  35. package/types/CheckList.d.ts +5 -0
  36. package/types/CheckListItem.d.ts +6 -0
  37. package/types/DescriptionList.d.ts +7 -0
  38. package/types/DescriptionListDescription.d.ts +4 -0
  39. package/types/DescriptionListMultiCol.d.ts +4 -0
  40. package/types/DescriptionListTerm.d.ts +4 -0
  41. package/types/DetailListCard.d.ts +4 -0
  42. package/types/DetailListCardItem.d.ts +8 -0
  43. package/types/NumberedList.d.ts +6 -0
  44. package/types/NumberedListItem.d.ts +4 -0
  45. package/types/StylizedNumberedList.d.ts +4 -0
  46. package/types/StylizedNumberedListItem.d.ts +4 -0
  47. package/types/index.d.ts +14 -103
  48. package/es/index.d.js +0 -1
  49. package/lib/index.d.js +0 -6
package/README.md CHANGED
@@ -10,11 +10,6 @@ npm install --save @sb1/ffe-lists-react
10
10
 
11
11
  Full documentation on lists usage is available at https://design.sparebank1.no/komponenter/lister/.
12
12
 
13
- ## TypeScript definition files
14
-
15
- This component supports TypeScript - please update `index.d.ts` if you change any
16
- of the external methods or properties in this component.
17
-
18
13
  ## Development
19
14
 
20
15
  To start a local development server, run the following from the designsystem root folder:
package/es/BulletList.js CHANGED
@@ -1,26 +1,28 @@
1
- var _excluded = ["className", "condensed"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string, bool } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var BulletList = function BulletList(_ref) {
9
- var className = _ref.className,
10
- condensed = _ref.condensed,
11
- rest = _objectWithoutProperties(_ref, _excluded);
12
- return /*#__PURE__*/React.createElement("ul", _extends({
13
- className: classNames('ffe-bullet-list', {
14
- 'ffe-bullet-list--condensed': condensed
15
- }, className)
16
- }, rest));
17
- };
18
- BulletList.propTypes = {
19
- /** List items */
20
- children: node.isRequired,
21
- /** Any extra classes */
22
- className: string,
23
- /** Condensed modifier. Use in condensed designs */
24
- condensed: bool
25
+ export var BulletList = function (_a) {
26
+ var className = _a.className, condensed = _a.condensed, rest = __rest(_a, ["className", "condensed"]);
27
+ return (React.createElement("ul", __assign({ className: classNames('ffe-bullet-list', { 'ffe-bullet-list--condensed': condensed }, className) }, rest)));
25
28
  };
26
- export default BulletList;
@@ -1,20 +1,28 @@
1
- var _excluded = ["className"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var BulletListItem = function BulletListItem(props) {
9
- var className = props.className,
10
- rest = _objectWithoutProperties(props, _excluded);
11
- return /*#__PURE__*/React.createElement("li", _extends({
12
- className: classNames('ffe-bullet-list__item', className)
13
- }, rest));
14
- };
15
- BulletListItem.propTypes = {
16
- children: node,
17
- /** Any extra classes */
18
- className: string
25
+ export var BulletListItem = function (_a) {
26
+ var className = _a.className, rest = __rest(_a, ["className"]);
27
+ return (React.createElement("li", __assign({ className: classNames('ffe-bullet-list__item', className) }, rest)));
19
28
  };
20
- export default BulletListItem;
package/es/CheckList.js CHANGED
@@ -1,27 +1,28 @@
1
- var _excluded = ["className", "columns"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
24
  import classNames from 'classnames';
7
- import { node, oneOf, string } from 'prop-types';
8
- var CheckList = function CheckList(_ref) {
9
- var className = _ref.className,
10
- _ref$columns = _ref.columns,
11
- columns = _ref$columns === void 0 ? 1 : _ref$columns,
12
- rest = _objectWithoutProperties(_ref, _excluded);
13
- return /*#__PURE__*/React.createElement("ul", _extends({
14
- role: "list",
15
- className: classNames('ffe-check-list', {
16
- 'ffe-check-list--two-columns': Number(columns) === 2
17
- }, className)
18
- }, rest));
19
- };
20
- CheckList.propTypes = {
21
- /** List items */
22
- children: node.isRequired,
23
- /** Any extra classes */
24
- className: string,
25
- columns: oneOf([1, 2, '1', '2'])
25
+ export var CheckList = function (_a) {
26
+ var className = _a.className, _b = _a.columns, columns = _b === void 0 ? 1 : _b, rest = __rest(_a, ["className", "columns"]);
27
+ return (React.createElement("ul", __assign({ role: "list", className: classNames('ffe-check-list', { 'ffe-check-list--two-columns': Number(columns) === 2 }, className) }, rest)));
26
28
  };
27
- export default CheckList;
@@ -1,39 +1,33 @@
1
- var _excluded = ["className", "isCross"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { bool, node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
25
  import { Icon } from '@sb1/ffe-icons-react';
9
- var CheckListItem = function CheckListItem(props) {
10
- var className = props.className,
11
- _props$isCross = props.isCross,
12
- isCross = _props$isCross === void 0 ? false : _props$isCross,
13
- rest = _objectWithoutProperties(props, _excluded);
14
- var closeIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik00ODAtNDM3Ljg0NyAyNzcuMDc2LTIzNC45MjRxLTguMzA3IDguMzA4LTIwLjg4NCA4LjUtMTIuNTc2LjE5My0yMS4yNjgtOC41LTguNjkzLTguNjkyLTguNjkzLTIxLjA3NnQ4LjY5My0yMS4wNzZMNDM3Ljg0Ny00ODAgMjM0LjkyNC02ODIuOTI0cS04LjMwOC04LjMwNy04LjUtMjAuODg0LS4xOTMtMTIuNTc2IDguNS0yMS4yNjggOC42OTItOC42OTMgMjEuMDc2LTguNjkzdDIxLjA3NiA4LjY5M0w0ODAtNTIyLjE1M2wyMDIuOTI0LTIwMi45MjNxOC4zMDctOC4zMDggMjAuODg0LTguNSAxMi41NzYtLjE5MyAyMS4yNjggOC41IDguNjkzIDguNjkyIDguNjkzIDIxLjA3NnQtOC42OTMgMjEuMDc2TDUyMi4xNTMtNDgwbDIwMi45MjMgMjAyLjkyNHE4LjMwOCA4LjMwNyA4LjUgMjAuODg0LjE5MyAxMi41NzYtOC41IDIxLjI2OC04LjY5MiA4LjY5My0yMS4wNzYgOC42OTN0LTIxLjA3Ni04LjY5M0w0ODAtNDM3Ljg0N1oiLz48L3N2Zz4=';
15
- var checkIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Im0zODItMzM5LjM4NCAzNDUuNTM5LTM0NS41MzhxOC45MjMtOC45MjMgMjEuMTkyLTkuMTE2IDEyLjI2OS0uMTkyIDIxLjU3NiA5LjExNiA5LjMwOCA5LjMwNyA5LjMwOCAyMS4zODQgMCAxMi4wNzYtOS4zMDggMjEuMzg0bC0zNjMgMzYyLjk5OVEzOTYuNDYxLTI2OC4zMDkgMzgyLTI2OC4zMDlxLTE0LjQ2MSAwLTI1LjMwNy0xMC44NDZsLTE2Ny0xNjYuOTk5cS04LjkyMy04LjkyMy04LjgwOC0yMS4xOTIuMTE2LTEyLjI2OSA5LjQyMy0yMS41NzYgOS4zMDgtOS4zMDggMjEuMzg0LTkuMzA4IDEyLjA3NyAwIDIxLjM4NCA5LjMwOEwzODItMzM5LjM4NFoiLz48L3N2Zz4=';
16
- return /*#__PURE__*/React.createElement("li", _extends({
17
- className: classNames('ffe-check-list__item', className)
18
- }, rest), isCross ? /*#__PURE__*/React.createElement(Icon, {
19
- className: "ffe-check-list__icon ffe-check-list__icon--cross",
20
- fileUrl: closeIcon,
21
- ariaLabel: "kryss",
22
- size: "md"
23
- }) : /*#__PURE__*/React.createElement(Icon, {
24
- className: "ffe-check-list__icon ffe-check-list__icon--check",
25
- fileUrl: checkIcon,
26
- size: "md",
27
- ariaLabel: "hake"
28
- }), /*#__PURE__*/React.createElement("div", {
29
- className: "ffe-check-list__item-content"
30
- }, rest.children));
31
- };
32
- CheckListItem.propTypes = {
33
- children: node,
34
- /** Any extra classes */
35
- className: string,
36
- /** If true, render a red cross instead of a green checkmark */
37
- isCross: bool
26
+ export var CheckListItem = function (_a) {
27
+ var className = _a.className, _b = _a.isCross, isCross = _b === void 0 ? false : _b, rest = __rest(_a, ["className", "isCross"]);
28
+ var closeIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Ik00ODAtNDM3Ljg0NyAyNzcuMDc2LTIzNC45MjRxLTguMzA3IDguMzA4LTIwLjg4NCA4LjUtMTIuNTc2LjE5My0yMS4yNjgtOC41LTguNjkzLTguNjkyLTguNjkzLTIxLjA3NnQ4LjY5My0yMS4wNzZMNDM3Ljg0Ny00ODAgMjM0LjkyNC02ODIuOTI0cS04LjMwOC04LjMwNy04LjUtMjAuODg0LS4xOTMtMTIuNTc2IDguNS0yMS4yNjggOC42OTItOC42OTMgMjEuMDc2LTguNjkzdDIxLjA3NiA4LjY5M0w0ODAtNTIyLjE1M2wyMDIuOTI0LTIwMi45MjNxOC4zMDctOC4zMDggMjAuODg0LTguNSAxMi41NzYtLjE5MyAyMS4yNjggOC41IDguNjkzIDguNjkyIDguNjkzIDIxLjA3NnQtOC42OTMgMjEuMDc2TDUyMi4xNTMtNDgwbDIwMi45MjMgMjAyLjkyNHE4LjMwOCA4LjMwNyA4LjUgMjAuODg0LjE5MyAxMi41NzYtOC41IDIxLjI2OC04LjY5MiA4LjY5My0yMS4wNzYgOC42OTN0LTIxLjA3Ni04LjY5M0w0ODAtNDM3Ljg0N1oiLz48L3N2Zz4=';
29
+ var checkIcon = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgLTk2MCA5NjAgOTYwIiB3aWR0aD0iMjQiPjxwYXRoIGQ9Im0zODItMzM5LjM4NCAzNDUuNTM5LTM0NS41MzhxOC45MjMtOC45MjMgMjEuMTkyLTkuMTE2IDEyLjI2OS0uMTkyIDIxLjU3NiA5LjExNiA5LjMwOCA5LjMwNyA5LjMwOCAyMS4zODQgMCAxMi4wNzYtOS4zMDggMjEuMzg0bC0zNjMgMzYyLjk5OVEzOTYuNDYxLTI2OC4zMDkgMzgyLTI2OC4zMDlxLTE0LjQ2MSAwLTI1LjMwNy0xMC44NDZsLTE2Ny0xNjYuOTk5cS04LjkyMy04LjkyMy04LjgwOC0yMS4xOTIuMTE2LTEyLjI2OSA5LjQyMy0yMS41NzYgOS4zMDgtOS4zMDggMjEuMzg0LTkuMzA4IDEyLjA3NyAwIDIxLjM4NCA5LjMwOEwzODItMzM5LjM4NFoiLz48L3N2Zz4=';
30
+ return (React.createElement("li", __assign({ className: classNames('ffe-check-list__item', className) }, rest),
31
+ isCross ? (React.createElement(Icon, { className: "ffe-check-list__icon ffe-check-list__icon--cross", fileUrl: closeIcon, ariaLabel: "kryss", size: "md" })) : (React.createElement(Icon, { className: "ffe-check-list__icon ffe-check-list__icon--check", fileUrl: checkIcon, size: "md", ariaLabel: "hake" })),
32
+ React.createElement("div", { className: "ffe-check-list__item-content" }, rest.children)));
38
33
  };
39
- export default CheckListItem;
@@ -1,36 +1,28 @@
1
- var _excluded = ["medium", "large", "className", "horizontal"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { bool, string, node } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var DescriptionList = function DescriptionList(_ref) {
9
- var medium = _ref.medium,
10
- large = _ref.large,
11
- className = _ref.className,
12
- horizontal = _ref.horizontal,
13
- rest = _objectWithoutProperties(_ref, _excluded);
14
- return /*#__PURE__*/React.createElement("dl", _extends({
15
- className: classNames('ffe-description-list', {
16
- 'ffe-description-list--horizontal': horizontal
17
- }, {
18
- 'ffe-description-list--md': medium
19
- }, {
20
- 'ffe-description-list--lg': large
21
- }, className)
22
- }, rest));
23
- };
24
- DescriptionList.propTypes = {
25
- /** List items */
26
- children: node.isRequired,
27
- /** Any extra classes */
28
- className: string,
29
- /** Medium list. Can't be used with `large` prop */
30
- medium: bool,
31
- /** Large list. Can't be used with `medium` prop */
32
- large: bool,
33
- /** Displays dts and dds inline*/
34
- horizontal: bool
25
+ export var DescriptionList = function (_a) {
26
+ var size = _a.size, className = _a.className, horizontal = _a.horizontal, rest = __rest(_a, ["size", "className", "horizontal"]);
27
+ return (React.createElement("dl", __assign({ className: classNames('ffe-description-list', { 'ffe-description-list--horizontal': horizontal }, { 'ffe-description-list--md': size === 'md' }, { 'ffe-description-list--lg': size === 'lg' }, className) }, rest)));
35
28
  };
36
- export default DescriptionList;
@@ -1,20 +1,28 @@
1
- var _excluded = ["className"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var DescriptionListDescription = function DescriptionListDescription(props) {
9
- var className = props.className,
10
- rest = _objectWithoutProperties(props, _excluded);
11
- return /*#__PURE__*/React.createElement("dd", _extends({
12
- className: classNames('ffe-description-list__description', className)
13
- }, rest));
14
- };
15
- DescriptionListDescription.propTypes = {
16
- children: node,
17
- /** Any extra classes */
18
- className: string
25
+ export var DescriptionListDescription = function (_a) {
26
+ var className = _a.className, rest = __rest(_a, ["className"]);
27
+ return (React.createElement("dd", __assign({ className: classNames('ffe-description-list__description', className) }, rest)));
19
28
  };
20
- export default DescriptionListDescription;
@@ -1,35 +1,38 @@
1
- var _excluded = ["children", "className"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var DescriptionListMultiCol = function DescriptionListMultiCol(_ref) {
9
- var children = _ref.children,
10
- className = _ref.className,
11
- rest = _objectWithoutProperties(_ref, _excluded);
12
- var pairs = [];
13
- React.Children.forEach(children, function (child, i) {
14
- var j = i % 2;
15
- if (j === 0) {
16
- pairs.push([]);
17
- }
18
- pairs[Math.floor(i / 2)][j] = child;
19
- });
20
- return /*#__PURE__*/React.createElement("dl", _extends({
21
- className: classNames('ffe-description-list-multicol', className)
22
- }, rest), pairs.map(function (pair, idx) {
23
- return /*#__PURE__*/React.createElement("div", {
24
- className: "ffe-description-list-multicol__avoid-break",
25
- key: idx
26
- }, pair[0], pair[1]);
27
- }));
28
- };
29
- DescriptionListMultiCol.propTypes = {
30
- /** List items */
31
- children: node.isRequired,
32
- /** Any extra classes */
33
- className: string
25
+ export var DescriptionListMultiCol = function (_a) {
26
+ var children = _a.children, className = _a.className, rest = __rest(_a, ["children", "className"]);
27
+ var pairs = [];
28
+ React.Children.forEach(children, function (child, i) {
29
+ var j = i % 2;
30
+ if (j === 0) {
31
+ pairs.push([]);
32
+ }
33
+ pairs[Math.floor(i / 2)][j] = child;
34
+ });
35
+ return (React.createElement("dl", __assign({ className: classNames('ffe-description-list-multicol', className) }, rest), pairs.map(function (pair, idx) { return (React.createElement("div", { className: "ffe-description-list-multicol__avoid-break", key: idx },
36
+ pair[0],
37
+ pair[1])); })));
34
38
  };
35
- export default DescriptionListMultiCol;
@@ -1,20 +1,28 @@
1
- var _excluded = ["className"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
- import { node, string } from 'prop-types';
7
24
  import classNames from 'classnames';
8
- var DescriptionListTerm = function DescriptionListTerm(props) {
9
- var className = props.className,
10
- rest = _objectWithoutProperties(props, _excluded);
11
- return /*#__PURE__*/React.createElement("dt", _extends({
12
- className: classNames('ffe-description-list__term', className)
13
- }, rest));
14
- };
15
- DescriptionListTerm.propTypes = {
16
- children: node,
17
- /** Any extra classes */
18
- className: string
25
+ export var DescriptionListTerm = function (_a) {
26
+ var className = _a.className, rest = __rest(_a, ["className"]);
27
+ return (React.createElement("dt", __assign({ className: classNames('ffe-description-list__term', className) }, rest)));
19
28
  };
20
- export default DescriptionListTerm;
@@ -1,21 +1,28 @@
1
- var _excluded = ["className", "children"];
2
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
5
23
  import React from 'react';
6
24
  import classNames from 'classnames';
7
- import { node, string } from 'prop-types';
8
- var DetailListCard = function DetailListCard(props) {
9
- var className = props.className,
10
- children = props.children,
11
- rest = _objectWithoutProperties(props, _excluded);
12
- return /*#__PURE__*/React.createElement("dl", _extends({
13
- className: classNames('ffe-detail-list-card', className)
14
- }, rest), children);
15
- };
16
- DetailListCard.propTypes = {
17
- /** Additional classnames */
18
- className: string,
19
- children: node
25
+ export var DetailListCard = function (_a) {
26
+ var className = _a.className, children = _a.children, rest = __rest(_a, ["className", "children"]);
27
+ return (React.createElement("dl", __assign({ className: classNames('ffe-detail-list-card', className) }, rest), children));
20
28
  };
21
- export default DetailListCard;
@@ -1,35 +1,34 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["className", "label", "value"];
3
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
11
23
  import React from 'react';
12
24
  import classNames from 'classnames';
13
- import { string, node } from 'prop-types';
14
- var DetailListCardItem = function DetailListCardItem(_ref) {
15
- var className = _ref.className,
16
- label = _ref.label,
17
- value = _ref.value,
18
- rest = _objectWithoutProperties(_ref, _excluded);
19
- return /*#__PURE__*/React.createElement("div", _extends({
20
- className: classNames('ffe-detail-list-card__item', className)
21
- }, rest), /*#__PURE__*/React.createElement("dt", {
22
- className: "ffe-detail-list-card__item-label"
23
- }, typeof label === 'string' ? label : /*#__PURE__*/React.cloneElement(label, _objectSpread({}, label.props))), /*#__PURE__*/React.createElement("dd", {
24
- className: "ffe-detail-list-card__item-value"
25
- }, typeof value === 'string' ? value : /*#__PURE__*/React.cloneElement(value, _objectSpread({}, value.props))));
26
- };
27
- DetailListCardItem.propTypes = {
28
- /** Additional classnames */
29
- className: string,
30
- /** Content of the label / left column */
31
- label: node.isRequired,
32
- /** Content of the value / right column */
33
- value: node.isRequired
25
+ export var DetailListCardItem = function (_a) {
26
+ var className = _a.className, label = _a.label, value = _a.value, rest = __rest(_a, ["className", "label", "value"]);
27
+ return (React.createElement("div", __assign({ className: classNames('ffe-detail-list-card__item', className) }, rest),
28
+ React.createElement("dt", { className: "ffe-detail-list-card__item-label" }, React.isValidElement(label)
29
+ ? React.cloneElement(label, __assign({}, label.props))
30
+ : label),
31
+ React.createElement("dd", { className: "ffe-detail-list-card__item-value" }, React.isValidElement(value)
32
+ ? React.cloneElement(value, __assign({}, value.props))
33
+ : value)));
34
34
  };
35
- export default DetailListCardItem;