@sb1/ffe-cards-react 100.12.3 → 101.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 (39) hide show
  1. package/es/CardBase.js +11 -37
  2. package/es/GroupCard/GroupCard.js +7 -31
  3. package/es/GroupCard/GroupCardElement.js +6 -31
  4. package/es/GroupCard/GroupCardFooter.js +6 -31
  5. package/es/GroupCard/GroupCardTitle.js +6 -31
  6. package/es/IconCard/IconCard.js +19 -36
  7. package/es/IllustrationCard/IllustrationCard.js +11 -34
  8. package/es/ImageCard/ImageCard.js +16 -41
  9. package/es/StippledCard/StippledCard.js +18 -43
  10. package/es/TextCard/TextCard.js +6 -31
  11. package/es/components/CardAction.js +3 -25
  12. package/es/components/CardName.js +2 -24
  13. package/es/components/ComponentBase.js +2 -24
  14. package/es/components/Subtext.js +2 -24
  15. package/es/components/Text.js +2 -24
  16. package/es/components/Title.js +3 -25
  17. package/es/components/WithCardAction.js +12 -35
  18. package/es/fixedForwardRef.js +1 -1
  19. package/es/mergeRefs.js +2 -2
  20. package/lib/CardBase.js +14 -40
  21. package/lib/GroupCard/GroupCard.js +9 -33
  22. package/lib/GroupCard/GroupCardElement.js +9 -34
  23. package/lib/GroupCard/GroupCardFooter.js +9 -34
  24. package/lib/GroupCard/GroupCardTitle.js +9 -34
  25. package/lib/IconCard/IconCard.js +18 -35
  26. package/lib/IllustrationCard/IllustrationCard.js +10 -33
  27. package/lib/ImageCard/ImageCard.js +19 -44
  28. package/lib/StippledCard/StippledCard.js +21 -46
  29. package/lib/TextCard/TextCard.js +9 -34
  30. package/lib/components/CardAction.js +4 -26
  31. package/lib/components/CardName.js +5 -27
  32. package/lib/components/ComponentBase.js +3 -25
  33. package/lib/components/Subtext.js +5 -27
  34. package/lib/components/Text.js +5 -27
  35. package/lib/components/Title.js +6 -28
  36. package/lib/components/WithCardAction.js +16 -39
  37. package/lib/fixedForwardRef.js +1 -1
  38. package/lib/mergeRefs.js +2 -2
  39. package/package.json +6 -6
package/es/CardBase.js CHANGED
@@ -1,43 +1,17 @@
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
- };
23
1
  import classNames from 'classnames';
24
2
  import React from 'react';
25
3
  import { WithCardAction } from './components';
26
4
  import { fixedForwardRef } from './fixedForwardRef';
27
5
  function CardBaseWithForwardRef(props, ref) {
28
- var _a;
29
- var className = props.className, noMargin = props.noMargin, textCenter = props.textCenter, _b = props.bgColor, bgColor = _b === void 0 ? 'primary' : _b, noPadding = props.noPadding, _c = props.appearance, appearance = _c === void 0 ? 'default' : _c, children = props.children, rest = __rest(props, ["className", "noMargin", "textCenter", "bgColor", "noPadding", "appearance", "children"]);
30
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-card-base", className: classNames('ffe-card-base', className, (_a = {},
31
- _a["ffe-card-base--bg-".concat(bgColor)] = bgColor,
32
- _a['ffe-card-base--no-margin'] = noMargin,
33
- _a['ffe-card-base--text-center'] = textCenter,
34
- _a['ffe-card-base--no-padding'] = noPadding,
35
- _a['ffe-default-mode'] = appearance === 'default',
36
- _a)) }, rest, { ref: ref }), function (_a) {
37
- var CardAction = _a.CardAction;
38
- return typeof children === 'function'
39
- ? children({ CardAction: CardAction })
40
- : children;
41
- }));
6
+ const { className, noMargin, textCenter, bgColor = 'primary', noPadding, appearance = 'default', children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-card-base", className: classNames('ffe-card-base', className, {
8
+ [`ffe-card-base--bg-${bgColor}`]: bgColor,
9
+ 'ffe-card-base--no-margin': noMargin,
10
+ 'ffe-card-base--text-center': textCenter,
11
+ 'ffe-card-base--no-padding': noPadding,
12
+ 'ffe-default-mode': appearance === 'default',
13
+ }), ...rest, ref: ref }, ({ CardAction }) => typeof children === 'function'
14
+ ? children({ CardAction })
15
+ : children));
42
16
  }
43
- export var CardBase = fixedForwardRef(CardBaseWithForwardRef);
17
+ export const CardBase = fixedForwardRef(CardBaseWithForwardRef);
@@ -1,36 +1,12 @@
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
- };
23
1
  import classNames from 'classnames';
24
2
  import React from 'react';
25
3
  import { fixedForwardRef } from '../fixedForwardRef';
26
4
  function GroupCardWithForwardRef(props, ref) {
27
- var _a;
28
- var className = props.className, children = props.children, _b = props.bgColor, bgColor = _b === void 0 ? 'primary' : _b, noMargin = props.noMargin, _c = props.appearance, appearance = _c === void 0 ? 'default' : _c, _d = props.as, Comp = _d === void 0 ? 'div' : _d, rest = __rest(props, ["className", "children", "bgColor", "noMargin", "appearance", "as"]);
29
- return (React.createElement(Comp, __assign({ className: classNames('ffe-group-card', (_a = {
30
- 'ffe-group-card--no-margin': noMargin
31
- },
32
- _a["ffe-group-card--bg-".concat(bgColor)] = bgColor,
33
- _a['ffe-default-mode'] = appearance === 'default',
34
- _a), className), role: Comp === 'div' ? 'group' : undefined }, rest, { ref: ref }), children));
5
+ const { className, children, bgColor = 'primary', noMargin, appearance = 'default', as: Comp = 'div', ...rest } = props;
6
+ return (React.createElement(Comp, { className: classNames('ffe-group-card', {
7
+ 'ffe-group-card--no-margin': noMargin,
8
+ [`ffe-group-card--bg-${bgColor}`]: bgColor,
9
+ 'ffe-default-mode': appearance === 'default',
10
+ }, className), role: Comp === 'div' ? 'group' : undefined, ...rest, ref: ref }, children));
35
11
  }
36
- export var GroupCard = fixedForwardRef(GroupCardWithForwardRef);
12
+ export const GroupCard = fixedForwardRef(GroupCardWithForwardRef);
@@ -1,39 +1,14 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function GroupCardElementWithForwardRef(props, ref) {
28
- var className = props.className, _a = props.noPadding, noPadding = _a === void 0 ? false : _a, _b = props.noSeparator, noSeparator = _b === void 0 ? false : _b, children = props.children, rest = __rest(props, ["className", "noPadding", "noSeparator", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-group-card__element", className: classNames('ffe-group-card__element', className, {
6
+ const { className, noPadding = false, noSeparator = false, children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-group-card__element", className: classNames('ffe-group-card__element', className, {
30
8
  'ffe-group-card__element--no-padding': noPadding,
31
9
  'ffe-group-card__element--no-separator': noSeparator,
32
- }) }, rest, { ref: ref }), function (_a) {
33
- var CardAction = _a.CardAction;
34
- return typeof children === 'function'
35
- ? children({ Text: Text, Subtext: Subtext, Title: Title, CardName: CardName, CardAction: CardAction })
36
- : children;
37
- }));
10
+ }), ...rest, ref: ref }, ({ CardAction }) => typeof children === 'function'
11
+ ? children({ Text, Subtext, Title, CardName, CardAction })
12
+ : children));
38
13
  }
39
- export var GroupCardElement = fixedForwardRef(GroupCardElementWithForwardRef);
14
+ export const GroupCardElement = fixedForwardRef(GroupCardElementWithForwardRef);
@@ -1,38 +1,13 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function GroupCardFooterWithForwardRef(props, ref) {
28
- var className = props.className, _a = props.noPadding, noPadding = _a === void 0 ? false : _a, children = props.children, rest = __rest(props, ["className", "noPadding", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-group-card__footer", className: classNames('ffe-group-card__footer', className, {
6
+ const { className, noPadding = false, children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-group-card__footer", className: classNames('ffe-group-card__footer', className, {
30
8
  'ffe-group-card__element--no-padding': noPadding,
31
- }) }, rest, { ref: ref }), function (_a) {
32
- var CardAction = _a.CardAction;
33
- return typeof children === 'function'
34
- ? children({ Text: Text, Subtext: Subtext, Title: Title, CardName: CardName, CardAction: CardAction })
35
- : children;
36
- }));
9
+ }), ...rest, ref: ref }, ({ CardAction }) => typeof children === 'function'
10
+ ? children({ Text, Subtext, Title, CardName, CardAction })
11
+ : children));
37
12
  }
38
- export var GroupCardFooter = fixedForwardRef(GroupCardFooterWithForwardRef);
13
+ export const GroupCardFooter = fixedForwardRef(GroupCardFooterWithForwardRef);
@@ -1,39 +1,14 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function GroupCardTitleWithForwardRef(props, ref) {
28
- var className = props.className, _a = props.noPadding, noPadding = _a === void 0 ? false : _a, _b = props.noSeparator, noSeparator = _b === void 0 ? false : _b, children = props.children, rest = __rest(props, ["className", "noPadding", "noSeparator", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-group-card__title", className: classNames('ffe-group-card__title', className, {
6
+ const { className, noPadding = false, noSeparator = false, children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-group-card__title", className: classNames('ffe-group-card__title', className, {
30
8
  'ffe-group-card__element--no-padding': noPadding,
31
9
  'ffe-group-card__element--no-separator': noSeparator,
32
- }) }, rest, { ref: ref }), function (_a) {
33
- var CardAction = _a.CardAction;
34
- return typeof children === 'function'
35
- ? children({ Text: Text, Subtext: Subtext, Title: Title, CardName: CardName, CardAction: CardAction })
36
- : children;
37
- }));
10
+ }), ...rest, ref: ref }, ({ CardAction }) => typeof children === 'function'
11
+ ? children({ Text, Subtext, Title, CardName, CardAction })
12
+ : children));
38
13
  }
39
- export var GroupCardTitle = fixedForwardRef(GroupCardTitleWithForwardRef);
14
+ export const GroupCardTitle = fixedForwardRef(GroupCardTitleWithForwardRef);
@@ -1,50 +1,33 @@
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
- };
23
1
  import classNames from 'classnames';
24
2
  import React from 'react';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function IconCardWithForwardRef(props, ref) {
28
- var className = props.className, condensed = props.condensed, icon = props.icon, rightIcon = props.rightIcon, noMargin = props.noMargin, _a = props.appearance, appearance = _a === void 0 ? 'default' : _a, children = props.children, rest = __rest(props, ["className", "condensed", "icon", "rightIcon", "noMargin", "appearance", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-icon-card", className: classNames('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, { 'ffe-icon-card--no-margin': noMargin }, { 'ffe-default-mode': appearance === 'default' }, className) }, rest, { ref: ref }), function (_a) {
30
- var CardAction = _a.CardAction;
31
- var bodyElement = (React.createElement("div", { className: "ffe-icon-card__body" }, typeof children === 'function'
6
+ const { className, condensed, icon, rightIcon, noMargin, appearance = 'default', children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-icon-card", className: classNames('ffe-icon-card', { 'ffe-icon-card--condensed': condensed }, { 'ffe-icon-card--no-margin': noMargin }, { 'ffe-default-mode': appearance === 'default' }, className), ...rest, ref: ref }, ({ CardAction }) => {
8
+ const bodyElement = (React.createElement("div", { className: "ffe-icon-card__body" }, typeof children === 'function'
32
9
  ? children({
33
- Text: Text,
34
- Subtext: Subtext,
35
- Title: Title,
36
- CardName: CardName,
37
- CardAction: CardAction,
10
+ Text,
11
+ Subtext,
12
+ Title,
13
+ CardName,
14
+ CardAction,
38
15
  })
39
16
  : children));
40
- var iconElement = icon &&
41
- React.cloneElement(icon, __assign(__assign({}, icon.props), { className: classNames('ffe-icon-card__icon', icon.props.className) }));
42
- var rightIconElement = rightIcon &&
43
- React.cloneElement(rightIcon, __assign(__assign({}, rightIcon.props), { className: classNames('ffe-icon-card__icon', rightIcon.props.className) }));
17
+ const iconElement = icon &&
18
+ React.cloneElement(icon, {
19
+ ...icon.props,
20
+ className: classNames('ffe-icon-card__icon', icon.props.className),
21
+ });
22
+ const rightIconElement = rightIcon &&
23
+ React.cloneElement(rightIcon, {
24
+ ...rightIcon.props,
25
+ className: classNames('ffe-icon-card__icon', rightIcon.props.className),
26
+ });
44
27
  return (React.createElement(React.Fragment, null,
45
28
  iconElement,
46
29
  bodyElement,
47
30
  rightIconElement));
48
31
  }));
49
32
  }
50
- export var IconCard = fixedForwardRef(IconCardWithForwardRef);
33
+ export const IconCard = fixedForwardRef(IconCardWithForwardRef);
@@ -1,43 +1,20 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { WithCardAction, Text, Subtext, Title, CardName } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function IllustrationCardWithForwardRef(props, ref) {
28
- var className = props.className, condensed = props.condensed, img = props.img, illustrationPosition = props.illustrationPosition, noMargin = props.noMargin, _a = props.appearance, appearance = _a === void 0 ? 'default' : _a, children = props.children, rest = __rest(props, ["className", "condensed", "img", "illustrationPosition", "noMargin", "appearance", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-illustration-card", className: classNames('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, { 'ffe-illustration-card--no-margin': noMargin }, {
6
+ const { className, condensed, img, illustrationPosition, noMargin, appearance = 'default', children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-illustration-card", className: classNames('ffe-illustration-card', { 'ffe-illustration-card--condensed': condensed }, { 'ffe-illustration-card--no-margin': noMargin }, {
30
8
  'ffe-illustration-card--right': illustrationPosition === 'right',
31
- }, { ' ffe-default-mode': appearance === 'default' }, className) }, rest, { ref: ref }), function (_a) {
32
- var CardAction = _a.CardAction;
33
- var illustrationElement = (React.createElement("div", { className: classNames('ffe-illustration-card__illustration') }, img));
34
- var bodyElement = (React.createElement("div", { className: "ffe-illustration-card__body" }, typeof children === 'function'
9
+ }, { ' ffe-default-mode': appearance === 'default' }, className), ...rest, ref: ref }, ({ CardAction }) => {
10
+ const illustrationElement = (React.createElement("div", { className: classNames('ffe-illustration-card__illustration') }, img));
11
+ const bodyElement = (React.createElement("div", { className: "ffe-illustration-card__body" }, typeof children === 'function'
35
12
  ? children({
36
- Text: Text,
37
- Subtext: Subtext,
38
- Title: Title,
39
- CardName: CardName,
40
- CardAction: CardAction,
13
+ Text,
14
+ Subtext,
15
+ Title,
16
+ CardName,
17
+ CardAction,
41
18
  })
42
19
  : children));
43
20
  return illustrationPosition === 'right' ? (React.createElement(React.Fragment, null,
@@ -47,4 +24,4 @@ function IllustrationCardWithForwardRef(props, ref) {
47
24
  bodyElement));
48
25
  }));
49
26
  }
50
- export var IllustrationCard = fixedForwardRef(IllustrationCardWithForwardRef);
27
+ export const IllustrationCard = fixedForwardRef(IllustrationCardWithForwardRef);
@@ -1,49 +1,24 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function ImageCardWithForwardRef(props, ref) {
28
- var className = props.className, imageSrc = props.imageSrc, imageAltText = props.imageAltText, noMargin = props.noMargin, _a = props.appearance, appearance = _a === void 0 ? 'default' : _a, children = props.children, rest = __rest(props, ["className", "imageSrc", "imageAltText", "noMargin", "appearance", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-image-card", className: classNames('ffe-image-card', {
6
+ const { className, imageSrc, imageAltText, noMargin, appearance = 'default', children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-image-card", className: classNames('ffe-image-card', {
30
8
  'ffe-image-card--no-margin': noMargin,
31
9
  'ffe-default-mode': appearance === 'default',
32
- }, className) }, rest, { ref: ref }), function (_a) {
33
- var CardAction = _a.CardAction;
34
- return (React.createElement(React.Fragment, null,
35
- React.createElement("div", { className: "ffe-image-card__image-container" },
36
- React.createElement("div", { className: "ffe-image-card__image-overlay" }),
37
- React.createElement("img", { src: imageSrc, alt: imageAltText, className: "ffe-image-card__image" })),
38
- React.createElement("div", { className: "ffe-image-card__body" }, typeof children === 'function'
39
- ? children({
40
- Text: Text,
41
- Subtext: Subtext,
42
- Title: Title,
43
- CardName: CardName,
44
- CardAction: CardAction,
45
- })
46
- : children)));
47
- }));
10
+ }, className), ...rest, ref: ref }, ({ CardAction }) => (React.createElement(React.Fragment, null,
11
+ React.createElement("div", { className: "ffe-image-card__image-container" },
12
+ React.createElement("div", { className: "ffe-image-card__image-overlay" }),
13
+ React.createElement("img", { src: imageSrc, alt: imageAltText, className: "ffe-image-card__image" })),
14
+ React.createElement("div", { className: "ffe-image-card__body" }, typeof children === 'function'
15
+ ? children({
16
+ Text,
17
+ Subtext,
18
+ Title,
19
+ CardName,
20
+ CardAction,
21
+ })
22
+ : children)))));
48
23
  }
49
- export var ImageCard = fixedForwardRef(ImageCardWithForwardRef);
24
+ export const ImageCard = fixedForwardRef(ImageCardWithForwardRef);
@@ -1,49 +1,24 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function StippledCardWithForwardRef(props, ref) {
28
- var className = props.className, condensed = props.condensed, img = props.img, noMargin = props.noMargin, rightImg = props.rightImg, children = props.children, rest = __rest(props, ["className", "condensed", "img", "noMargin", "rightImg", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-stippled-card", className: classNames('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, { 'ffe-stippled-card--no-margin': noMargin }, className) }, rest, { ref: ref }), function (_a) {
30
- var CardAction = _a.CardAction;
31
- return (React.createElement(React.Fragment, null,
32
- img && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
33
- 'ffe-stippled-card__img--icon': (img === null || img === void 0 ? void 0 : img.type) === 'icon',
34
- }), "aria-hidden": (img === null || img === void 0 ? void 0 : img.type) === 'icon' }, img === null || img === void 0 ? void 0 : img.element)),
35
- React.createElement("div", { className: 'ffe-stippled-card__content' }, typeof children === 'function'
36
- ? children({
37
- CardName: CardName,
38
- Title: Title,
39
- Text: Text,
40
- Subtext: Subtext,
41
- CardAction: CardAction,
42
- })
43
- : children),
44
- rightImg && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
45
- 'ffe-stippled-card__img--icon': (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon',
46
- }), "aria-hidden": (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon' }, rightImg === null || rightImg === void 0 ? void 0 : rightImg.element))));
47
- }));
6
+ const { className, condensed, img, noMargin, rightImg, children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-stippled-card", className: classNames('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, { 'ffe-stippled-card--no-margin': noMargin }, className), ...rest, ref: ref }, ({ CardAction }) => (React.createElement(React.Fragment, null,
8
+ img && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
9
+ 'ffe-stippled-card__img--icon': (img === null || img === void 0 ? void 0 : img.type) === 'icon',
10
+ }), "aria-hidden": (img === null || img === void 0 ? void 0 : img.type) === 'icon' }, img === null || img === void 0 ? void 0 : img.element)),
11
+ React.createElement("div", { className: 'ffe-stippled-card__content' }, typeof children === 'function'
12
+ ? children({
13
+ CardName,
14
+ Title,
15
+ Text,
16
+ Subtext,
17
+ CardAction,
18
+ })
19
+ : children),
20
+ rightImg && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
21
+ 'ffe-stippled-card__img--icon': (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon',
22
+ }), "aria-hidden": (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon' }, rightImg === null || rightImg === void 0 ? void 0 : rightImg.element))))));
48
23
  }
49
- export var StippledCard = fixedForwardRef(StippledCardWithForwardRef);
24
+ export const StippledCard = fixedForwardRef(StippledCardWithForwardRef);
@@ -1,40 +1,15 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
26
4
  import { fixedForwardRef } from '../fixedForwardRef';
27
5
  function TextCardWithForwardRef(props, ref) {
28
- var className = props.className, leftAlign = props.leftAlign, noMargin = props.noMargin, _a = props.appearance, appearance = _a === void 0 ? 'default' : _a, children = props.children, rest = __rest(props, ["className", "leftAlign", "noMargin", "appearance", "children"]);
29
- return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-text-card", className: classNames('ffe-text-card', {
6
+ const { className, leftAlign, noMargin, appearance = 'default', children, ...rest } = props;
7
+ return (React.createElement(WithCardAction, { baseClassName: "ffe-text-card", className: classNames('ffe-text-card', {
30
8
  'ffe-text-card--left-align': leftAlign,
31
9
  'ffe-text-card--no-margin': noMargin,
32
10
  'ffe-default-mode': appearance === 'default',
33
- }, className) }, rest, { ref: ref }), function (_a) {
34
- var CardAction = _a.CardAction;
35
- return typeof children === 'function'
36
- ? children({ Text: Text, Subtext: Subtext, Title: Title, CardName: CardName, CardAction: CardAction })
37
- : children;
38
- }));
11
+ }, className), ...rest, ref: ref }, ({ CardAction }) => typeof children === 'function'
12
+ ? children({ Text, Subtext, Title, CardName, CardAction })
13
+ : children));
39
14
  }
40
- export var TextCard = fixedForwardRef(TextCardWithForwardRef);
15
+ export const TextCard = fixedForwardRef(TextCardWithForwardRef);
@@ -1,29 +1,7 @@
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
- };
23
1
  import React from 'react';
24
2
  import { fixedForwardRef } from '../fixedForwardRef';
25
3
  function CardActionWithRef(props, ref) {
26
- var _a = props.as, Comp = _a === void 0 ? 'a' : _a, rest = __rest(props, ["as"]);
27
- return React.createElement(Comp, __assign({}, rest, { ref: ref }));
4
+ const { as: Comp = 'a', ...rest } = props;
5
+ return React.createElement(Comp, { ...rest, ref: ref });
28
6
  }
29
- export var CardAction = fixedForwardRef(CardActionWithRef);
7
+ export const CardAction = fixedForwardRef(CardActionWithRef);
@@ -1,29 +1,7 @@
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
- };
23
1
  import React from 'react';
24
2
  import classNames from 'classnames';
25
3
  import { ComponentBase } from './ComponentBase';
26
4
  export function CardName(props) {
27
- var className = props.className, rest = __rest(props, ["className"]);
28
- return (React.createElement(ComponentBase, __assign({ className: classNames('ffe-card-body__card-name', className) }, rest)));
5
+ const { className, ...rest } = props;
6
+ return (React.createElement(ComponentBase, { className: classNames('ffe-card-body__card-name', className), ...rest }));
29
7
  }