@splunk/react-ui 4.21.0 → 4.21.1

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 (83) hide show
  1. package/Accordion.js +425 -325
  2. package/Anchor.js +147 -117
  3. package/Animation.js +142 -94
  4. package/AnimationToggle.js +197 -193
  5. package/Box.js +145 -118
  6. package/Breadcrumbs.js +288 -206
  7. package/Button.js +488 -465
  8. package/ButtonGroup.js +160 -128
  9. package/ButtonSimple.js +543 -462
  10. package/CHANGELOG.md +7 -2
  11. package/Calendar.js +1111 -1001
  12. package/Card.js +771 -598
  13. package/CardLayout.js +205 -147
  14. package/Chip.js +509 -488
  15. package/Clickable.js +414 -352
  16. package/CloseButton.js +165 -142
  17. package/Code.js +1808 -2084
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -519
  20. package/Color.js +1066 -1069
  21. package/ColumnLayout.js +402 -363
  22. package/ComboBox.js +891 -794
  23. package/Concertina.js +997 -802
  24. package/ControlGroup.js +687 -594
  25. package/Date.js +567 -547
  26. package/DefinitionList.js +308 -234
  27. package/Divider.js +149 -118
  28. package/Dropdown.js +459 -416
  29. package/DualListbox.js +1479 -1541
  30. package/EventListener.js +94 -97
  31. package/File.js +1051 -969
  32. package/FormRows.js +883 -696
  33. package/Heading.js +216 -193
  34. package/Image.js +446 -402
  35. package/JSONTree.js +690 -551
  36. package/Layer.js +437 -410
  37. package/Link.js +336 -255
  38. package/List.js +213 -161
  39. package/Markdown.js +509 -487
  40. package/Menu.js +1105 -1056
  41. package/Message.js +475 -441
  42. package/MessageBar.js +387 -373
  43. package/Modal.js +810 -634
  44. package/ModalLayer.js +326 -243
  45. package/Monogram.js +308 -276
  46. package/Multiselect.js +3550 -3364
  47. package/Number.js +729 -687
  48. package/Paginator.js +510 -449
  49. package/Paragraph.js +145 -112
  50. package/Popover.js +1459 -1432
  51. package/Progress.js +301 -246
  52. package/RadioBar.js +610 -527
  53. package/RadioList.js +483 -444
  54. package/Resize.js +530 -489
  55. package/ResultsMenu.js +494 -455
  56. package/ScreenReaderContent.js +142 -111
  57. package/Scroll.js +595 -456
  58. package/ScrollContainerContext.js +197 -206
  59. package/Search.js +744 -650
  60. package/Select.js +2442 -2345
  61. package/SidePanel.js +390 -284
  62. package/Slider.js +669 -676
  63. package/SlidingPanels.js +639 -503
  64. package/SplitButton.js +464 -367
  65. package/StaticContent.js +161 -133
  66. package/StepBar.js +386 -358
  67. package/Switch.js +710 -640
  68. package/TabBar.js +726 -680
  69. package/TabLayout.js +406 -322
  70. package/Table.js +4842 -4616
  71. package/Text.js +1170 -1138
  72. package/TextArea.js +1102 -1090
  73. package/Tooltip.js +624 -581
  74. package/TransitionOpen.js +489 -422
  75. package/Typography.js +176 -153
  76. package/WaitSpinner.js +230 -206
  77. package/package.json +5 -5
  78. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  79. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  80. package/useForceUpdate.js +112 -82
  81. package/useKeyPress.js +74 -71
  82. package/usePrevious.js +65 -65
  83. package/useRovingFocus.js +122 -138
package/Card.js CHANGED
@@ -1,606 +1,779 @@
1
- /******/ (() => { // webpackBootstrap
2
- /******/ "use strict";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/compat get default export */
8
- /******/ (() => {
9
- /******/ // getDefaultExport function for compatibility with non-harmony modules
10
- /******/ __webpack_require__.n = (module) => {
11
- /******/ var getter = module && module.__esModule ?
12
- /******/ () => (module['default']) :
13
- /******/ () => (module);
14
- /******/ __webpack_require__.d(getter, { a: getter });
15
- /******/ return getter;
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/define property getters */
20
- /******/ (() => {
21
- /******/ // define getter functions for harmony exports
22
- /******/ __webpack_require__.d = (exports, definition) => {
23
- /******/ for(var key in definition) {
24
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
26
- /******/ }
27
- /******/ }
28
- /******/ };
29
- /******/ })();
30
- /******/
31
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
32
- /******/ (() => {
33
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
34
- /******/ })();
35
- /******/
36
- /******/ /* webpack/runtime/make namespace object */
37
- /******/ (() => {
38
- /******/ // define __esModule on exports
39
- /******/ __webpack_require__.r = (exports) => {
40
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
41
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
42
- /******/ }
43
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
44
- /******/ };
45
- /******/ })();
46
- /******/
47
- /************************************************************************/
48
- var __webpack_exports__ = {};
49
- // ESM COMPAT FLAG
50
- __webpack_require__.r(__webpack_exports__);
51
-
52
- // EXPORTS
53
- __webpack_require__.d(__webpack_exports__, {
54
- Body: () => (/* reexport */ Card_Body),
55
- Footer: () => (/* reexport */ Card_Footer),
56
- Header: () => (/* reexport */ Card_Header),
57
- "default": () => (/* reexport */ Card_Card)
58
- });
59
-
60
- ;// CONCATENATED MODULE: external "react"
61
- const external_react_namespaceObject = require("react");
62
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
63
- ;// CONCATENATED MODULE: external "prop-types"
64
- const external_prop_types_namespaceObject = require("prop-types");
65
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
66
- ;// CONCATENATED MODULE: external "styled-components"
67
- const external_styled_components_namespaceObject = require("styled-components");
68
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
69
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
70
- const Box_namespaceObject = require("@splunk/react-ui/Box");
71
- var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
72
- ;// CONCATENATED MODULE: external "@splunk/themes"
73
- const themes_namespaceObject = require("@splunk/themes");
74
- ;// CONCATENATED MODULE: ./src/Card/BodyStyles.ts
75
-
76
-
77
-
78
- var StyledBox = external_styled_components_default()((Box_default())).withConfig({
79
- displayName: "BodyStyles__StyledBox",
80
- componentId: "sc-1130udp-0"
81
- })(["flex:1 1 auto;overflow:auto;height:100%;", ";", ""], function (_ref) {
82
- var $inset = _ref.$inset;
83
- return $inset ? (0,external_styled_components_namespaceObject.css)(["", ""], (0,themes_namespaceObject.pick)({
84
- enterprise: (0,external_styled_components_namespaceObject.css)(["padding:", ";&:not(:first-child){padding-top:0;}"], themes_namespaceObject.variables.spacing),
85
- prisma: {
86
- comfortable: (0,external_styled_components_namespaceObject.css)(["padding:12px 24px;&:first-child{padding-top:28px;}&:last-child{padding-bottom:28px;}"]),
87
- compact: (0,external_styled_components_namespaceObject.css)(["padding:8px 24px;&:first-child{padding-top:20px;}&:last-child{padding-bottom:20px;}"])
88
- }
89
- })) : (0,external_styled_components_namespaceObject.css)(["padding:0;"]);
90
- }, (0,themes_namespaceObject.pick)({
91
- prisma: {
92
- comfortable: (0,external_styled_components_namespaceObject.css)(["border-radius:", ";color:", ";"], themes_namespaceObject.variables.borderRadius, themes_namespaceObject.variables.contentColorMuted),
93
- compact: (0,external_styled_components_namespaceObject.css)(["border-radius:", ";color:", ";"], themes_namespaceObject.variables.borderRadius, themes_namespaceObject.variables.contentColorMuted)
94
- }
95
- }));
96
-
97
- ;// CONCATENATED MODULE: ./src/Card/Body.tsx
98
- 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); }
99
-
100
- 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; }
101
-
102
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
103
-
104
-
105
-
106
-
107
- var propTypes = {
108
- children: (external_prop_types_default()).node,
109
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
110
- inset: (external_prop_types_default()).bool
111
- };
112
-
113
- /**
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = r => {
12
+ /******/ var t = r && r.__esModule ?
13
+ /******/ () => r["default"]
14
+ /******/ : () => r
15
+ /******/;
16
+ e.d(t, {
17
+ a: t
18
+ });
19
+ /******/ return t;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (r, t) => {
27
+ /******/ for (var n in t) {
28
+ /******/ if (e.o(t, n) && !e.o(r, n)) {
29
+ /******/ Object.defineProperty(r, n, {
30
+ enumerable: true,
31
+ get: t[n]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, r) => Object.prototype.hasOwnProperty.call(e, r)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var r = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(r);
62
+ // EXPORTS
63
+ e.d(r, {
64
+ Body: () => /* reexport */ m,
65
+ Footer: () => /* reexport */ S,
66
+ Header: () => /* reexport */ Q,
67
+ default: () => /* reexport */ Be
68
+ });
69
+ // CONCATENATED MODULE: external "react"
70
+ const t = require("react");
71
+ var n = e.n(t);
72
+ // CONCATENATED MODULE: external "prop-types"
73
+ const o = require("prop-types");
74
+ var i = e.n(o);
75
+ // CONCATENATED MODULE: external "styled-components"
76
+ const a = require("styled-components");
77
+ var l = e.n(a);
78
+ // CONCATENATED MODULE: external "@splunk/react-ui/Box"
79
+ const c = require("@splunk/react-ui/Box");
80
+ var s = e.n(c);
81
+ // CONCATENATED MODULE: external "@splunk/themes"
82
+ const u = require("@splunk/themes");
83
+ // CONCATENATED MODULE: ./src/Card/BodyStyles.ts
84
+ var p = l()(s()).withConfig({
85
+ displayName: "BodyStyles__StyledBox",
86
+ componentId: "sc-1130udp-0"
87
+ })([ "flex:1 1 auto;overflow:auto;height:100%;", ";", "" ], (function(e) {
88
+ var r = e.$inset;
89
+ return r ? (0, a.css)([ "", "" ], (0, u.pick)({
90
+ enterprise: (0, a.css)([ "padding:", ";&:not(:first-child){padding-top:0;}" ], u.variables.spacing),
91
+ prisma: {
92
+ comfortable: (0, a.css)([ "padding:12px 24px;&:first-child{padding-top:28px;}&:last-child{padding-bottom:28px;}" ]),
93
+ compact: (0, a.css)([ "padding:8px 24px;&:first-child{padding-top:20px;}&:last-child{padding-bottom:20px;}" ])
94
+ }
95
+ })) : (0, a.css)([ "padding:0;" ]);
96
+ }), (0, u.pick)({
97
+ prisma: {
98
+ comfortable: (0, a.css)([ "border-radius:", ";color:", ";" ], u.variables.borderRadius, u.variables.contentColorMuted),
99
+ compact: (0, a.css)([ "border-radius:", ";color:", ";" ], u.variables.borderRadius, u.variables.contentColorMuted)
100
+ }
101
+ }));
102
+ // CONCATENATED MODULE: ./src/Card/Body.tsx
103
+ function d() {
104
+ d = Object.assign || function(e) {
105
+ for (var r = 1; r < arguments.length; r++) {
106
+ var t = arguments[r];
107
+ for (var n in t) {
108
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
109
+ e[n] = t[n];
110
+ }
111
+ }
112
+ }
113
+ return e;
114
+ };
115
+ return d.apply(this, arguments);
116
+ }
117
+ function f(e, r) {
118
+ if (e == null) return {};
119
+ var t = b(e, r);
120
+ var n, o;
121
+ if (Object.getOwnPropertySymbols) {
122
+ var i = Object.getOwnPropertySymbols(e);
123
+ for (o = 0; o < i.length; o++) {
124
+ n = i[o];
125
+ if (r.indexOf(n) >= 0) continue;
126
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
127
+ t[n] = e[n];
128
+ }
129
+ }
130
+ return t;
131
+ }
132
+ function b(e, r) {
133
+ if (e == null) return {};
134
+ var t = {};
135
+ var n = Object.keys(e);
136
+ var o, i;
137
+ for (i = 0; i < n.length; i++) {
138
+ o = n[i];
139
+ if (r.indexOf(o) >= 0) continue;
140
+ t[o] = e[o];
141
+ }
142
+ return t;
143
+ }
144
+ var v = {
145
+ children: i().node,
146
+ elementRef: i().oneOfType([ i().func, i().object ]),
147
+ inset: i().bool
148
+ };
149
+ /**
114
150
  * A styled container for `Card` body content.
115
- */
116
- function Body(_ref) {
117
- var children = _ref.children,
118
- _ref$inset = _ref.inset,
119
- inset = _ref$inset === void 0 ? true : _ref$inset,
120
- otherProps = _objectWithoutProperties(_ref, ["children", "inset"]);
121
-
122
- // @docs-props-type BodyPropsBase
123
- return /*#__PURE__*/external_react_default().createElement(StyledBox, _extends({
124
- "data-test": "body",
125
- $inset: inset
126
- }, otherProps), children);
127
- }
128
-
129
- Body.propTypes = propTypes;
130
- /* harmony default export */ const Card_Body = (Body);
131
- ;// CONCATENATED MODULE: ./src/Card/FooterStyles.ts
132
-
133
-
134
-
135
- var FooterStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
136
- displayName: "FooterStyles__StyledBox",
137
- componentId: "sc-1yu3r4s-0"
138
- })(["", ";text-align:right;color:", ";", ""], (0,themes_namespaceObject.pick)({
139
- enterprise: (0,external_styled_components_namespaceObject.css)(["padding:", ";&:first-child{border-top:none;}"], themes_namespaceObject.variables.spacing),
140
- prisma: {
141
- comfortable: (0,external_styled_components_namespaceObject.css)(["padding:24px;"]),
142
- compact: "padding: 18px 24px"
143
- }
144
- }), themes_namespaceObject.variables.contentColorMuted, function (_ref) {
145
- var $showTopBorder = _ref.$showTopBorder;
146
- return $showTopBorder && (0,themes_namespaceObject.pick)({
147
- enterprise: (0,external_styled_components_namespaceObject.css)(["border-top:1px solid ", ";"], themes_namespaceObject.variables.gray92)
148
- });
149
- });
150
-
151
- ;// CONCATENATED MODULE: ./src/Card/Footer.tsx
152
- function Footer_extends() { Footer_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 Footer_extends.apply(this, arguments); }
153
-
154
- function Footer_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Footer_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; }
155
-
156
- function Footer_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
157
-
158
-
159
-
160
-
161
- var Footer_propTypes = {
162
- children: (external_prop_types_default()).node,
163
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
164
- showBorder: (external_prop_types_default()).bool
165
- };
166
-
167
- /**
151
+ */ function y(e) {
152
+ var r = e.children, t = e.inset, o = t === void 0 ? true : t, i = f(e, [ "children", "inset" ]);
153
+ // @docs-props-type BodyPropsBase
154
+
155
+ return n().createElement(p, d({
156
+ "data-test": "body",
157
+ $inset: o
158
+ }, i), r);
159
+ }
160
+ y.propTypes = v;
161
+ /* harmony default export */ const m = y;
162
+ // CONCATENATED MODULE: ./src/Card/FooterStyles.ts
163
+ var h = l()(s()).withConfig({
164
+ displayName: "FooterStyles__StyledBox",
165
+ componentId: "sc-1yu3r4s-0"
166
+ })([ "", ";text-align:right;color:", ";", "" ], (0, u.pick)({
167
+ enterprise: (0, a.css)([ "padding:", ";&:first-child{border-top:none;}" ], u.variables.spacing),
168
+ prisma: {
169
+ comfortable: (0, a.css)([ "padding:24px;" ]),
170
+ compact: "padding: 18px 24px"
171
+ }
172
+ }), u.variables.contentColorMuted, (function(e) {
173
+ var r = e.$showTopBorder;
174
+ return r && (0, u.pick)({
175
+ enterprise: (0, a.css)([ "border-top:1px solid ", ";" ], u.variables.gray92)
176
+ });
177
+ }));
178
+ // CONCATENATED MODULE: ./src/Card/Footer.tsx
179
+ function g() {
180
+ g = Object.assign || function(e) {
181
+ for (var r = 1; r < arguments.length; r++) {
182
+ var t = arguments[r];
183
+ for (var n in t) {
184
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
185
+ e[n] = t[n];
186
+ }
187
+ }
188
+ }
189
+ return e;
190
+ };
191
+ return g.apply(this, arguments);
192
+ }
193
+ function w(e, r) {
194
+ if (e == null) return {};
195
+ var t = O(e, r);
196
+ var n, o;
197
+ if (Object.getOwnPropertySymbols) {
198
+ var i = Object.getOwnPropertySymbols(e);
199
+ for (o = 0; o < i.length; o++) {
200
+ n = i[o];
201
+ if (r.indexOf(n) >= 0) continue;
202
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
203
+ t[n] = e[n];
204
+ }
205
+ }
206
+ return t;
207
+ }
208
+ function O(e, r) {
209
+ if (e == null) return {};
210
+ var t = {};
211
+ var n = Object.keys(e);
212
+ var o, i;
213
+ for (i = 0; i < n.length; i++) {
214
+ o = n[i];
215
+ if (r.indexOf(o) >= 0) continue;
216
+ t[o] = e[o];
217
+ }
218
+ return t;
219
+ }
220
+ var x = {
221
+ children: i().node,
222
+ elementRef: i().oneOfType([ i().func, i().object ]),
223
+ showBorder: i().bool
224
+ };
225
+ /**
168
226
  * A styled container for `Card` footer content.
169
- */
170
- function Footer(_ref) {
171
- var children = _ref.children,
172
- _ref$showBorder = _ref.showBorder,
173
- showBorder = _ref$showBorder === void 0 ? true : _ref$showBorder,
174
- otherProps = Footer_objectWithoutProperties(_ref, ["children", "showBorder"]);
175
-
176
- // @docs-props-type FooterPropsBase
177
- return /*#__PURE__*/external_react_default().createElement(FooterStyles_StyledBox, Footer_extends({
178
- "data-test": "footer",
179
- $showTopBorder: showBorder
180
- }, otherProps), children);
181
- }
182
-
183
- Footer.propTypes = Footer_propTypes;
184
- /* harmony default export */ const Card_Footer = (Footer);
185
- ;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
186
- const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
187
- ;// CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeVertical"
188
- const DotsThreeVertical_namespaceObject = require("@splunk/react-icons/DotsThreeVertical");
189
- var DotsThreeVertical_default = /*#__PURE__*/__webpack_require__.n(DotsThreeVertical_namespaceObject);
190
- ;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/MoreVertical"
191
- const MoreVertical_namespaceObject = require("@splunk/react-icons/enterprise/MoreVertical");
192
- var MoreVertical_default = /*#__PURE__*/__webpack_require__.n(MoreVertical_namespaceObject);
193
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Anchor"
194
- const Anchor_namespaceObject = require("@splunk/react-ui/Anchor");
195
- var Anchor_default = /*#__PURE__*/__webpack_require__.n(Anchor_namespaceObject);
196
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
197
- const Dropdown_namespaceObject = require("@splunk/react-ui/Dropdown");
198
- var Dropdown_default = /*#__PURE__*/__webpack_require__.n(Dropdown_namespaceObject);
199
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
200
- const Tooltip_namespaceObject = require("@splunk/react-ui/Tooltip");
201
- var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_namespaceObject);
202
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Button"
203
- const Button_namespaceObject = require("@splunk/react-ui/Button");
204
- var Button_default = /*#__PURE__*/__webpack_require__.n(Button_namespaceObject);
205
- ;// CONCATENATED MODULE: ./src/Card/HeaderStyles.ts
206
-
207
-
208
-
209
-
210
- var StyledTitle = external_styled_components_default().div.withConfig({
211
- displayName: "HeaderStyles__StyledTitle",
212
- componentId: "eqi6uk-0"
213
- })(["", " ", " margin:0;overflow-wrap:break-word;padding:0;"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
214
- enterprise: (0,external_styled_components_namespaceObject.css)(["font-weight:", ";font-size:", ";line-height:1.2;"], themes_namespaceObject.variables.fontWeightSemiBold, themes_namespaceObject.variables.fontSizeLarge),
215
- prisma: (0,external_styled_components_namespaceObject.css)(["font-weight:", ";color:", ";"], themes_namespaceObject.variables.fontWeightBold, themes_namespaceObject.variables.contentColorActive)
216
- }));
217
- var StyledSubtitle = external_styled_components_default().div.withConfig({
218
- displayName: "HeaderStyles__StyledSubtitle",
219
- componentId: "eqi6uk-1"
220
- })(["", " ", " margin:0;overflow-wrap:break-word;padding:0;font-weight:normal;"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
221
- enterprise: (0,external_styled_components_namespaceObject.css)(["font-size:", ";color:", ";"], themes_namespaceObject.variables.fontSizeSmall, themes_namespaceObject.variables.textGray),
222
- prisma: (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorDefault)
223
- }));
224
- var StyledTitleContainer = external_styled_components_default().div.withConfig({
225
- displayName: "HeaderStyles__StyledTitleContainer",
226
- componentId: "eqi6uk-2"
227
- })(["", " flex:0 1 auto;", " &:not(:last-child){margin-right:", ";}"], themes_namespaceObject.mixins.reset('block'), function (_ref) {
228
- var $truncateTitle = _ref.$truncateTitle;
229
- return $truncateTitle && (0,external_styled_components_namespaceObject.css)(["overflow:hidden;& > ", ",& > ", "{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}"],
230
- /* sc-sel */
231
- StyledTitle,
232
- /* sc-sel */
233
- StyledSubtitle);
234
- }, (0,themes_namespaceObject.pick)({
235
- enterprise: themes_namespaceObject.variables.spacingHalf,
236
- prisma: themes_namespaceObject.variables.spacingSmall
237
- }));
238
- var StyledActionContainer = external_styled_components_default().div.withConfig({
239
- displayName: "HeaderStyles__StyledActionContainer",
240
- componentId: "eqi6uk-3"
241
- })(["", " align-items:center;display:flex;flex:0 0 auto;justify-content:space-between;", ";"], themes_namespaceObject.mixins.reset('block'), (0,themes_namespaceObject.pick)({
242
- prisma: {
243
- comfortable: (0,external_styled_components_namespaceObject.css)(["margin-right:-12px;margin-top:-4px;"]),
244
- compact: (0,external_styled_components_namespaceObject.css)(["margin-right:-12px;margin-top:0;"])
245
- }
246
- }));
247
- var StyledSecondaryAction = external_styled_components_default()((Button_default())).withConfig({
248
- displayName: "HeaderStyles__StyledSecondaryAction",
249
- componentId: "eqi6uk-4"
250
- })(["margin-left:10px;"]);
251
- var HeaderStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
252
- displayName: "HeaderStyles__StyledBox",
253
- componentId: "eqi6uk-5"
254
- })(["align-items:start;display:flex;flex:0 0 auto;justify-content:space-between;position:relative;min-height:30px;", " ", " >:not(", "):not(", "){flex:1 0 auto;}"], (0,themes_namespaceObject.pick)({
255
- enterprise: (0,external_styled_components_namespaceObject.css)(["padding:", ";"], themes_namespaceObject.variables.spacing),
256
- prisma: {
257
- comfortable: (0,external_styled_components_namespaceObject.css)(["padding:16px 24px;&:last-child{padding-bottom:32px;}"]),
258
- compact: (0,external_styled_components_namespaceObject.css)(["padding:12px 24px;&:last-child{padding-bottom:24px;}"])
259
- }
260
- }), (0,themes_namespaceObject.pick)({
261
- prisma: (0,external_styled_components_namespaceObject.css)(["border-top-left-radius:", ";border-top-right-radius:", ";"], themes_namespaceObject.variables.borderRadius, themes_namespaceObject.variables.borderRadius)
262
- }),
263
- /* sc-sel */
264
- StyledTitleContainer,
265
- /* sc-sel */
266
- StyledActionContainer);
267
-
268
- ;// CONCATENATED MODULE: ./src/Card/Header.tsx
269
- function Header_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Header_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; }
270
-
271
- function Header_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
272
-
273
- function Header_extends() { Header_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 Header_extends.apply(this, arguments); }
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
- var Header_propTypes = {
286
- actionPrimary: (external_prop_types_default()).node,
287
- actionsSecondary: (external_prop_types_default()).node,
288
- anchor: (external_prop_types_default()).string,
289
- children: (external_prop_types_default()).node,
290
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
291
- subtitle: (external_prop_types_default()).node,
292
- title: (external_prop_types_default()).node,
293
- truncateTitle: (external_prop_types_default()).bool
294
- };
295
- // `forwardRef` is used to enable focus on toggle when Dropdown is closing
296
- var ActionsSecondaryToggle = /*#__PURE__*/external_react_default().forwardRef(function (props, ref) {
297
- var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
298
- family = _useSplunkTheme.family,
299
- isCompact = _useSplunkTheme.isCompact;
300
-
301
- var iconPrismaSize = isCompact ? '20px' : '24px';
302
- var actionsIcon = family === 'prisma' ? /*#__PURE__*/external_react_default().createElement((DotsThreeVertical_default()), {
303
- height: iconPrismaSize,
304
- width: iconPrismaSize
305
- }) : /*#__PURE__*/external_react_default().createElement((MoreVertical_default()), null);
306
- return /*#__PURE__*/external_react_default().createElement((Tooltip_default()), Header_extends({
307
- content: (0,i18n_namespaceObject._)('Actions'),
308
- contentRelationship: "label"
309
- }, props), /*#__PURE__*/external_react_default().createElement(StyledSecondaryAction, {
310
- appearance: "secondary",
311
- "data-test": "actions-secondary-toggle",
312
- icon: actionsIcon,
313
- elementRef: ref
314
- }));
315
- });
316
- /**
227
+ */ function k(e) {
228
+ var r = e.children, t = e.showBorder, o = t === void 0 ? true : t, i = w(e, [ "children", "showBorder" ]);
229
+ // @docs-props-type FooterPropsBase
230
+
231
+ return n().createElement(h, g({
232
+ "data-test": "footer",
233
+ $showTopBorder: o
234
+ }, i), r);
235
+ }
236
+ k.propTypes = x;
237
+ /* harmony default export */ const S = k;
238
+ // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
239
+ const j = require("@splunk/ui-utils/i18n");
240
+ // CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeVertical"
241
+ const C = require("@splunk/react-icons/DotsThreeVertical");
242
+ var P = e.n(C);
243
+ // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/MoreVertical"
244
+ const _ = require("@splunk/react-icons/enterprise/MoreVertical");
245
+ var T = e.n(_);
246
+ // CONCATENATED MODULE: external "@splunk/react-ui/Anchor"
247
+ const E = require("@splunk/react-ui/Anchor");
248
+ var B = e.n(E);
249
+ // CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
250
+ const R = require("@splunk/react-ui/Dropdown");
251
+ var I = e.n(R);
252
+ // CONCATENATED MODULE: external "@splunk/react-ui/Tooltip"
253
+ const q = require("@splunk/react-ui/Tooltip");
254
+ var H = e.n(q);
255
+ // CONCATENATED MODULE: external "@splunk/react-ui/Button"
256
+ const N = require("@splunk/react-ui/Button");
257
+ var $ = e.n(N);
258
+ // CONCATENATED MODULE: ./src/Card/HeaderStyles.ts
259
+ var A = l().div.withConfig({
260
+ displayName: "HeaderStyles__StyledTitle",
261
+ componentId: "eqi6uk-0"
262
+ })([ "", " ", " margin:0;overflow-wrap:break-word;padding:0;" ], u.mixins.reset("block"), (0,
263
+ u.pick)({
264
+ enterprise: (0, a.css)([ "font-weight:", ";font-size:", ";line-height:1.2;" ], u.variables.fontWeightSemiBold, u.variables.fontSizeLarge),
265
+ prisma: (0, a.css)([ "font-weight:", ";color:", ";" ], u.variables.fontWeightBold, u.variables.contentColorActive)
266
+ }));
267
+ var W = l().div.withConfig({
268
+ displayName: "HeaderStyles__StyledSubtitle",
269
+ componentId: "eqi6uk-1"
270
+ })([ "", " ", " margin:0;overflow-wrap:break-word;padding:0;font-weight:normal;" ], u.mixins.reset("block"), (0,
271
+ u.pick)({
272
+ enterprise: (0, a.css)([ "font-size:", ";color:", ";" ], u.variables.fontSizeSmall, u.variables.textGray),
273
+ prisma: (0, a.css)([ "color:", ";" ], u.variables.contentColorDefault)
274
+ }));
275
+ var D = l().div.withConfig({
276
+ displayName: "HeaderStyles__StyledTitleContainer",
277
+ componentId: "eqi6uk-2"
278
+ })([ "", " flex:0 1 auto;", " &:not(:last-child){margin-right:", ";}" ], u.mixins.reset("block"), (function(e) {
279
+ var r = e.$truncateTitle;
280
+ return r && (0, a.css)([ "overflow:hidden;& > ", ",& > ", "{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}" ],
281
+ /* sc-sel */
282
+ A,
283
+ /* sc-sel */
284
+ W);
285
+ }), (0, u.pick)({
286
+ enterprise: u.variables.spacingHalf,
287
+ prisma: u.variables.spacingSmall
288
+ }));
289
+ var M = l().div.withConfig({
290
+ displayName: "HeaderStyles__StyledActionContainer",
291
+ componentId: "eqi6uk-3"
292
+ })([ "", " align-items:center;display:flex;flex:0 0 auto;justify-content:space-between;", ";" ], u.mixins.reset("block"), (0,
293
+ u.pick)({
294
+ prisma: {
295
+ comfortable: (0, a.css)([ "margin-right:-12px;margin-top:-4px;" ]),
296
+ compact: (0, a.css)([ "margin-right:-12px;margin-top:0;" ])
297
+ }
298
+ }));
299
+ var F = l()($()).withConfig({
300
+ displayName: "HeaderStyles__StyledSecondaryAction",
301
+ componentId: "eqi6uk-4"
302
+ })([ "margin-left:10px;" ]);
303
+ var z = l()(s()).withConfig({
304
+ displayName: "HeaderStyles__StyledBox",
305
+ componentId: "eqi6uk-5"
306
+ })([ "align-items:start;display:flex;flex:0 0 auto;justify-content:space-between;position:relative;min-height:30px;", " ", " >:not(", "):not(", "){flex:1 0 auto;}" ], (0,
307
+ u.pick)({
308
+ enterprise: (0, a.css)([ "padding:", ";" ], u.variables.spacing),
309
+ prisma: {
310
+ comfortable: (0, a.css)([ "padding:16px 24px;&:last-child{padding-bottom:32px;}" ]),
311
+ compact: (0, a.css)([ "padding:12px 24px;&:last-child{padding-bottom:24px;}" ])
312
+ }
313
+ }), (0, u.pick)({
314
+ prisma: (0, a.css)([ "border-top-left-radius:", ";border-top-right-radius:", ";" ], u.variables.borderRadius, u.variables.borderRadius)
315
+ }),
316
+ /* sc-sel */
317
+ D,
318
+ /* sc-sel */
319
+ M);
320
+ // CONCATENATED MODULE: ./src/Card/Header.tsx
321
+ function L(e, r) {
322
+ if (e == null) return {};
323
+ var t = V(e, r);
324
+ var n, o;
325
+ if (Object.getOwnPropertySymbols) {
326
+ var i = Object.getOwnPropertySymbols(e);
327
+ for (o = 0; o < i.length; o++) {
328
+ n = i[o];
329
+ if (r.indexOf(n) >= 0) continue;
330
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
331
+ t[n] = e[n];
332
+ }
333
+ }
334
+ return t;
335
+ }
336
+ function V(e, r) {
337
+ if (e == null) return {};
338
+ var t = {};
339
+ var n = Object.keys(e);
340
+ var o, i;
341
+ for (i = 0; i < n.length; i++) {
342
+ o = n[i];
343
+ if (r.indexOf(o) >= 0) continue;
344
+ t[o] = e[o];
345
+ }
346
+ return t;
347
+ }
348
+ function G() {
349
+ G = Object.assign || function(e) {
350
+ for (var r = 1; r < arguments.length; r++) {
351
+ var t = arguments[r];
352
+ for (var n in t) {
353
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
354
+ e[n] = t[n];
355
+ }
356
+ }
357
+ }
358
+ return e;
359
+ };
360
+ return G.apply(this, arguments);
361
+ }
362
+ var U = {
363
+ actionPrimary: i().node,
364
+ actionsSecondary: i().node,
365
+ anchor: i().string,
366
+ children: i().node,
367
+ elementRef: i().oneOfType([ i().func, i().object ]),
368
+ subtitle: i().node,
369
+ title: i().node,
370
+ truncateTitle: i().bool
371
+ };
372
+ // `forwardRef` is used to enable focus on toggle when Dropdown is closing
373
+ var J = n().forwardRef((function(e, r) {
374
+ var t = (0, u.useSplunkTheme)(), o = t.family, i = t.isCompact;
375
+ var a = i ? "20px" : "24px";
376
+ var l = o === "prisma" ? n().createElement(P(), {
377
+ height: a,
378
+ width: a
379
+ }) : n().createElement(T(), null);
380
+
381
+ return n().createElement(H(), G({
382
+ content: (0, j._)("Actions"),
383
+ contentRelationship: "label"
384
+ }, e), n().createElement(F, {
385
+ appearance: "secondary",
386
+ "data-test": "actions-secondary-toggle",
387
+ icon: l,
388
+ elementRef: r
389
+ }));
390
+ }));
391
+ /**
317
392
  * A styled container for `Card` header content.
318
- */
319
-
320
- function Header(_ref) {
321
- var actionPrimary = _ref.actionPrimary,
322
- actionsSecondary = _ref.actionsSecondary,
323
- anchor = _ref.anchor,
324
- children = _ref.children,
325
- subtitle = _ref.subtitle,
326
- title = _ref.title,
327
- _ref$truncateTitle = _ref.truncateTitle,
328
- truncateTitle = _ref$truncateTitle === void 0 ? true : _ref$truncateTitle,
329
- otherProps = Header_objectWithoutProperties(_ref, ["actionPrimary", "actionsSecondary", "anchor", "children", "subtitle", "title", "truncateTitle"]);
330
-
331
- // @docs-props-type HeaderPropsBase
332
- var _useSplunkTheme2 = (0,themes_namespaceObject.useSplunkTheme)(),
333
- family = _useSplunkTheme2.family;
334
-
335
- var defaultPlacement = family === 'prisma' ? 'right' : 'below';
336
- return /*#__PURE__*/external_react_default().createElement(HeaderStyles_StyledBox, Header_extends({
337
- "data-test": "header"
338
- }, otherProps), (title || subtitle) && /*#__PURE__*/external_react_default().createElement(StyledTitleContainer, {
339
- $truncateTitle: truncateTitle
340
- }, title && /*#__PURE__*/external_react_default().createElement(StyledTitle, null, anchor ? /*#__PURE__*/external_react_default().createElement((Anchor_default()), {
341
- name: anchor
342
- }, title) : title), subtitle && /*#__PURE__*/external_react_default().createElement(StyledSubtitle, null, subtitle)), children, (actionPrimary || actionsSecondary) && /*#__PURE__*/external_react_default().createElement(StyledActionContainer, null, actionPrimary, actionsSecondary && /*#__PURE__*/external_react_default().createElement((Dropdown_default()), {
343
- defaultPlacement: defaultPlacement,
344
- toggle: /*#__PURE__*/external_react_default().createElement(ActionsSecondaryToggle, null)
345
- }, actionsSecondary)));
346
- }
347
-
348
- Header.propTypes = Header_propTypes;
349
- /* harmony default export */ const Card_Header = (Header);
350
- ;// CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
351
- const Clickable_namespaceObject = require("@splunk/react-ui/Clickable");
352
- var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_namespaceObject);
353
- ;// CONCATENATED MODULE: ./src/Card/CardStyles.ts
354
-
355
-
356
-
357
- var cardTransitionTime = '0.2s';
358
- var Styled = external_styled_components_default().div.withConfig({
359
- displayName: "CardStyles__Styled",
360
- componentId: "ola3x0-0"
361
- })(["", ";flex-direction:column;align-items:stretch;min-width:100px;flex:1;vertical-align:top;", " transition:height ", ",width ", ",min-width ", ",max-width ", ",margin ", ",box-shadow ", ",border-color ", ";", " &[data-clickable='true']{cursor:pointer;", " &:hover{", "}&:focus{", "}}"], themes_namespaceObject.mixins.reset('inline-flex'), (0,themes_namespaceObject.pick)({
362
- enterprise: (0,external_styled_components_namespaceObject.css)(["background-color:", ";border:1px solid transparent;"], themes_namespaceObject.variables.backgroundColor),
363
- prisma: (0,external_styled_components_namespaceObject.css)(["background-color:", ";border-radius:", ";box-shadow:", ";"], themes_namespaceObject.variables.backgroundColorSection, themes_namespaceObject.variables.borderRadius, themes_namespaceObject.variables.embossShadow)
364
- }), cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, cardTransitionTime, function (_ref) {
365
- var $cardHasBorder = _ref.$cardHasBorder;
366
- return $cardHasBorder && (0,themes_namespaceObject.pick)({
367
- enterprise: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.borderLightColor)
368
- });
369
- }, function (_ref2) {
370
- var $selected = _ref2.$selected;
371
- return $selected && (0,themes_namespaceObject.pick)({
372
- enterprise: (0,external_styled_components_namespaceObject.css)(["border-color:", ";"], themes_namespaceObject.variables.focusColor),
373
- prisma: (0,external_styled_components_namespaceObject.css)(["background-color:", ";"], themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorSection, themes_namespaceObject.variables.interactiveColorOverlaySelected))
374
- });
375
- }, (0,themes_namespaceObject.pick)({
376
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.overlayShadow),
377
- prisma: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], themes_namespaceObject.variables.embossShadow, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorSection, themes_namespaceObject.variables.interactiveColorOverlayHover))
378
- }), (0,themes_namespaceObject.pick)({
379
- enterprise: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";"], themes_namespaceObject.variables.focusShadow),
380
- prisma: (0,external_styled_components_namespaceObject.css)(["box-shadow:", ";background-color:", ";"], themes_namespaceObject.variables.embossShadow, themes_namespaceObject.mixins.overlayColors(themes_namespaceObject.variables.backgroundColorSection, themes_namespaceObject.variables.interactiveColorOverlayHover))
381
- }));
382
- var StyledClickable = Styled.withComponent((Clickable_default()));
383
- /* A child element we add to <button>s to make flexbox work.
393
+ */ function K(e) {
394
+ var r = e.actionPrimary, t = e.actionsSecondary, o = e.anchor, i = e.children, a = e.subtitle, l = e.title, c = e.truncateTitle, s = c === void 0 ? true : c, p = L(e, [ "actionPrimary", "actionsSecondary", "anchor", "children", "subtitle", "title", "truncateTitle" ]);
395
+ // @docs-props-type HeaderPropsBase
396
+ var d = (0, u.useSplunkTheme)(), f = d.family;
397
+ var b = f === "prisma" ? "right" : "below";
398
+
399
+ return n().createElement(z, G({
400
+ "data-test": "header"
401
+ }, p), (l || a) && n().createElement(D, {
402
+ $truncateTitle: s
403
+ }, l && n().createElement(A, null, o ? n().createElement(B(), {
404
+ name: o
405
+ }, l) : l), a && n().createElement(W, null, a)), i, (r || t) && n().createElement(M, null, r, t && n().createElement(I(), {
406
+ defaultPlacement: b,
407
+ toggle: n().createElement(J, null)
408
+ }, t)));
409
+ }
410
+ K.propTypes = U;
411
+ /* harmony default export */ const Q = K;
412
+ // CONCATENATED MODULE: external "@splunk/react-ui/Clickable"
413
+ const X = require("@splunk/react-ui/Clickable");
414
+ var Y = e.n(X);
415
+ // CONCATENATED MODULE: ./src/Card/CardStyles.ts
416
+ var Z = "0.2s";
417
+ var ee = l().div.withConfig({
418
+ displayName: "CardStyles__Styled",
419
+ componentId: "ola3x0-0"
420
+ })([ "", ";flex-direction:column;align-items:stretch;min-width:100px;flex:1;vertical-align:top;", " transition:height ", ",width ", ",min-width ", ",max-width ", ",margin ", ",box-shadow ", ",border-color ", ";", " &[data-clickable='true']{cursor:pointer;", " &:hover{", "}&:focus{", "}}" ], u.mixins.reset("inline-flex"), (0,
421
+ u.pick)({
422
+ enterprise: (0, a.css)([ "background-color:", ";border:1px solid transparent;" ], u.variables.backgroundColor),
423
+ prisma: (0, a.css)([ "background-color:", ";border-radius:", ";box-shadow:", ";" ], u.variables.backgroundColorSection, u.variables.borderRadius, u.variables.embossShadow)
424
+ }), Z, Z, Z, Z, Z, Z, Z, (function(e) {
425
+ var r = e.$cardHasBorder;
426
+ return r && (0, u.pick)({
427
+ enterprise: (0, a.css)([ "border-color:", ";" ], u.variables.borderLightColor)
428
+ });
429
+ }), (function(e) {
430
+ var r = e.$selected;
431
+ return r && (0, u.pick)({
432
+ enterprise: (0, a.css)([ "border-color:", ";" ], u.variables.focusColor),
433
+ prisma: (0, a.css)([ "background-color:", ";" ], u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlaySelected))
434
+ });
435
+ }), (0, u.pick)({
436
+ enterprise: (0, a.css)([ "box-shadow:", ";" ], u.variables.overlayShadow),
437
+ prisma: (0, a.css)([ "box-shadow:", ";background-color:", ";" ], u.variables.embossShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
438
+ }), (0, u.pick)({
439
+ enterprise: (0, a.css)([ "box-shadow:", ";" ], u.variables.focusShadow),
440
+ prisma: (0, a.css)([ "box-shadow:", ";background-color:", ";" ], u.variables.embossShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
441
+ }));
442
+ var re = ee.withComponent(Y());
443
+ /* A child element we add to <button>s to make flexbox work.
384
444
  Without this wrapper element, child elements won't flex
385
445
  in Firefox.
386
446
  This unfortunately exposes some fragility in IE (e.g., adding
387
447
  a flex: 1 style here will cause the card to collapse) so test
388
448
  across the supported browsers if making a change here.
389
- */
390
-
391
- var StyledFirefoxFlexHack = external_styled_components_default().div.withConfig({
392
- displayName: "CardStyles__StyledFirefoxFlexHack",
393
- componentId: "ola3x0-1"
394
- })(["display:flex;flex:1 1 auto;flex-direction:column;align-items:stretch;justify-content:stretch;height:100%;", ""], (0,themes_namespaceObject.pick)({
395
- prisma: (0,external_styled_components_namespaceObject.css)(["border-radius:", ";"], themes_namespaceObject.variables.borderRadius)
396
- }));
397
-
398
- ;// CONCATENATED MODULE: ./src/Card/Card.tsx
399
- 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); }
400
-
401
- function Card_extends() { Card_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 Card_extends.apply(this, arguments); }
402
-
403
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
404
-
405
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
406
-
407
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
408
-
409
- 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; }
410
-
411
- 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; }
412
-
413
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
414
-
415
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
416
-
417
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
418
-
419
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
420
-
421
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
422
-
423
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
424
-
425
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
426
-
427
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
428
-
429
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
430
-
431
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
432
-
433
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
434
-
435
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
436
-
437
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
438
-
439
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
440
-
441
- function Card_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = Card_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; }
442
-
443
- function Card_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
444
-
445
-
446
-
447
-
448
-
449
-
450
-
451
- var Card_propTypes = {
452
- children: (external_prop_types_default()).node,
453
- elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
454
-
455
- /** @private */
456
- margin: (external_prop_types_default()).number,
457
-
458
- /** @private */
459
- maxWidth: external_prop_types_default().oneOfType([(external_prop_types_default()).number, (external_prop_types_default()).string]),
460
-
461
- /** @private */
462
- minWidth: external_prop_types_default().oneOfType([(external_prop_types_default()).number, (external_prop_types_default()).string]),
463
- onClick: (external_prop_types_default()).func,
464
- openInNewContext: (external_prop_types_default()).bool,
465
- selected: (external_prop_types_default()).bool,
466
- showBorder: (external_prop_types_default()).bool,
467
- to: (external_prop_types_default()).string,
468
- value: (external_prop_types_default()).any
469
- };
470
- var defaultProps = {
471
- openInNewContext: false,
472
- selected: false,
473
- showBorder: true
474
- };
475
-
476
- function isClickable(props) {
477
- return !!props.onClick || !!props.to;
478
- }
479
-
480
- function getSharedProps(props) {
481
- var margin = props.margin,
482
- maxWidth = props.maxWidth,
483
- minWidth = props.minWidth,
484
- selected = props.selected,
485
- showBorder = props.showBorder,
486
- style = props.style,
487
- otherProps = Card_objectWithoutProperties(props, ["margin", "maxWidth", "minWidth", "selected", "showBorder", "style"]);
488
-
489
- var cardStyle = _objectSpread({
490
- minWidth: minWidth,
491
- maxWidth: maxWidth,
492
- margin: margin
493
- }, style);
494
-
495
- var sharedProps = {
496
- showBorder: showBorder,
497
- selected: selected,
498
- 'data-test': 'card',
499
- style: cardStyle
500
- };
501
- return [sharedProps, otherProps];
502
- }
503
-
504
- var Card = /*#__PURE__*/function (_Component) {
505
- _inherits(Card, _Component);
506
-
507
- var _super = _createSuper(Card);
508
-
509
- function Card() {
510
- var _this;
511
-
512
- _classCallCheck(this, Card);
513
-
514
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
515
- args[_key] = arguments[_key];
516
- }
517
-
518
- _this = _super.call.apply(_super, [this].concat(args));
519
-
520
- _defineProperty(_assertThisInitialized(_this), "handleCardClick", function (e) {
521
- var _this$props$onClick, _this$props2;
522
-
523
- var _this$props = _this.props,
524
- selected = _this$props.selected,
525
- value = _this$props.value;
526
- (_this$props$onClick = (_this$props2 = _this.props).onClick) === null || _this$props$onClick === void 0 ? void 0 : _this$props$onClick.call(_this$props2, e, {
527
- selected: selected,
528
- value: value
529
- });
530
- });
531
-
532
- return _this;
533
- }
534
-
535
- _createClass(Card, [{
536
- key: "render",
537
- value: function render() {
538
- if (isClickable(this.props)) {
539
- var _getSharedProps = getSharedProps(this.props),
540
- _getSharedProps2 = _slicedToArray(_getSharedProps, 2),
541
- _sharedProps = _getSharedProps2[0],
542
- _ownProps = _getSharedProps2[1];
543
-
544
- var _selected = _sharedProps.selected,
545
- _showBorder = _sharedProps.showBorder;
546
-
547
- var _children = _ownProps.children,
548
- _elementRef = _ownProps.elementRef,
549
- onClick = _ownProps.onClick,
550
- openInNewContext = _ownProps.openInNewContext,
551
- to = _ownProps.to,
552
- _otherProps = Card_objectWithoutProperties(_ownProps, ["children", "elementRef", "onClick", "openInNewContext", "to"]);
553
-
554
- return /*#__PURE__*/external_react_default().createElement(StyledClickable, Card_extends({
555
- "data-clickable": true,
556
- $selected: _selected,
557
- $cardHasBorder: _showBorder,
558
- elementRef: _elementRef
559
- }, _sharedProps, _otherProps, {
560
- onClick: onClick ? this.handleCardClick : undefined,
561
- openInNewContext: openInNewContext,
562
- to: to || undefined
563
- }), /*#__PURE__*/external_react_default().createElement(StyledFirefoxFlexHack, null, _children));
564
- }
565
-
566
- var _getSharedProps3 = getSharedProps(this.props),
567
- _getSharedProps4 = _slicedToArray(_getSharedProps3, 2),
568
- sharedProps = _getSharedProps4[0],
569
- ownProps = _getSharedProps4[1];
570
-
571
- var selected = sharedProps.selected,
572
- showBorder = sharedProps.showBorder;
573
-
574
- var children = ownProps.children,
575
- elementRef = ownProps.elementRef,
576
- otherProps = Card_objectWithoutProperties(ownProps, ["children", "elementRef"]);
577
-
578
- return /*#__PURE__*/external_react_default().createElement(Styled, Card_extends({
579
- $selected: selected,
580
- $cardHasBorder: showBorder,
581
- ref: elementRef
582
- }, sharedProps, otherProps), children);
583
- }
584
- }]);
585
-
586
- return Card;
587
- }(external_react_namespaceObject.Component);
588
-
589
- _defineProperty(Card, "propTypes", Card_propTypes);
590
-
591
- _defineProperty(Card, "defaultProps", defaultProps);
592
-
593
- _defineProperty(Card, "Header", Card_Header);
594
-
595
- _defineProperty(Card, "Body", Card_Body);
596
-
597
- _defineProperty(Card, "Footer", Card_Footer);
598
-
599
- /* harmony default export */ const Card_Card = (Card);
600
-
601
- ;// CONCATENATED MODULE: ./src/Card/index.ts
602
-
603
-
604
- module.exports = __webpack_exports__;
605
- /******/ })()
606
- ;
449
+ */ var te = l().div.withConfig({
450
+ displayName: "CardStyles__StyledFirefoxFlexHack",
451
+ componentId: "ola3x0-1"
452
+ })([ "display:flex;flex:1 1 auto;flex-direction:column;align-items:stretch;justify-content:stretch;height:100%;", "" ], (0,
453
+ u.pick)({
454
+ prisma: (0, a.css)([ "border-radius:", ";" ], u.variables.borderRadius)
455
+ }));
456
+ // CONCATENATED MODULE: ./src/Card/Card.tsx
457
+ function ne(e) {
458
+ "@babel/helpers - typeof";
459
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
460
+ ne = function e(r) {
461
+ return typeof r;
462
+ };
463
+ } else {
464
+ ne = function e(r) {
465
+ return r && typeof Symbol === "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
466
+ };
467
+ }
468
+ return ne(e);
469
+ }
470
+ function oe() {
471
+ oe = Object.assign || function(e) {
472
+ for (var r = 1; r < arguments.length; r++) {
473
+ var t = arguments[r];
474
+ for (var n in t) {
475
+ if (Object.prototype.hasOwnProperty.call(t, n)) {
476
+ e[n] = t[n];
477
+ }
478
+ }
479
+ }
480
+ return e;
481
+ };
482
+ return oe.apply(this, arguments);
483
+ }
484
+ function ie(e, r) {
485
+ return ue(e) || se(e, r) || le(e, r) || ae();
486
+ }
487
+ function ae() {
488
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
489
+ }
490
+ function le(e, r) {
491
+ if (!e) return;
492
+ if (typeof e === "string") return ce(e, r);
493
+ var t = Object.prototype.toString.call(e).slice(8, -1);
494
+ if (t === "Object" && e.constructor) t = e.constructor.name;
495
+ if (t === "Map" || t === "Set") return Array.from(e);
496
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return ce(e, r);
497
+ }
498
+ function ce(e, r) {
499
+ if (r == null || r > e.length) r = e.length;
500
+ for (var t = 0, n = new Array(r); t < r; t++) {
501
+ n[t] = e[t];
502
+ }
503
+ return n;
504
+ }
505
+ function se(e, r) {
506
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
507
+ var t = [];
508
+ var n = true;
509
+ var o = false;
510
+ var i = undefined;
511
+ try {
512
+ for (var a = e[Symbol.iterator](), l; !(n = (l = a.next()).done); n = true) {
513
+ t.push(l.value);
514
+ if (r && t.length === r) break;
515
+ }
516
+ } catch (e) {
517
+ o = true;
518
+ i = e;
519
+ } finally {
520
+ try {
521
+ if (!n && a["return"] != null) a["return"]();
522
+ } finally {
523
+ if (o) throw i;
524
+ }
525
+ }
526
+ return t;
527
+ }
528
+ function ue(e) {
529
+ if (Array.isArray(e)) return e;
530
+ }
531
+ function pe(e, r) {
532
+ if (!(e instanceof r)) {
533
+ throw new TypeError("Cannot call a class as a function");
534
+ }
535
+ }
536
+ function de(e, r) {
537
+ for (var t = 0; t < r.length; t++) {
538
+ var n = r[t];
539
+ n.enumerable = n.enumerable || false;
540
+ n.configurable = true;
541
+ if ("value" in n) n.writable = true;
542
+ Object.defineProperty(e, n.key, n);
543
+ }
544
+ }
545
+ function fe(e, r, t) {
546
+ if (r) de(e.prototype, r);
547
+ if (t) de(e, t);
548
+ return e;
549
+ }
550
+ function be(e, r) {
551
+ if (typeof r !== "function" && r !== null) {
552
+ throw new TypeError("Super expression must either be null or a function");
553
+ }
554
+ e.prototype = Object.create(r && r.prototype, {
555
+ constructor: {
556
+ value: e,
557
+ writable: true,
558
+ configurable: true
559
+ }
560
+ });
561
+ if (r) ve(e, r);
562
+ }
563
+ function ve(e, r) {
564
+ ve = Object.setPrototypeOf || function e(r, t) {
565
+ r.__proto__ = t;
566
+ return r;
567
+ };
568
+ return ve(e, r);
569
+ }
570
+ function ye(e) {
571
+ var r = ge();
572
+ return function t() {
573
+ var n = we(e), o;
574
+ if (r) {
575
+ var i = we(this).constructor;
576
+ o = Reflect.construct(n, arguments, i);
577
+ } else {
578
+ o = n.apply(this, arguments);
579
+ }
580
+ return me(this, o);
581
+ };
582
+ }
583
+ function me(e, r) {
584
+ if (r && (ne(r) === "object" || typeof r === "function")) {
585
+ return r;
586
+ }
587
+ return he(e);
588
+ }
589
+ function he(e) {
590
+ if (e === void 0) {
591
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
592
+ }
593
+ return e;
594
+ }
595
+ function ge() {
596
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
597
+ if (Reflect.construct.sham) return false;
598
+ if (typeof Proxy === "function") return true;
599
+ try {
600
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
601
+ return true;
602
+ } catch (e) {
603
+ return false;
604
+ }
605
+ }
606
+ function we(e) {
607
+ we = Object.setPrototypeOf ? Object.getPrototypeOf : function e(r) {
608
+ return r.__proto__ || Object.getPrototypeOf(r);
609
+ };
610
+ return we(e);
611
+ }
612
+ function Oe(e, r) {
613
+ var t = Object.keys(e);
614
+ if (Object.getOwnPropertySymbols) {
615
+ var n = Object.getOwnPropertySymbols(e);
616
+ if (r) n = n.filter((function(r) {
617
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
618
+ }));
619
+ t.push.apply(t, n);
620
+ }
621
+ return t;
622
+ }
623
+ function xe(e) {
624
+ for (var r = 1; r < arguments.length; r++) {
625
+ var t = arguments[r] != null ? arguments[r] : {};
626
+ if (r % 2) {
627
+ Oe(Object(t), true).forEach((function(r) {
628
+ ke(e, r, t[r]);
629
+ }));
630
+ } else if (Object.getOwnPropertyDescriptors) {
631
+ Object.defineProperties(e, Object.getOwnPropertyDescriptors(t));
632
+ } else {
633
+ Oe(Object(t)).forEach((function(r) {
634
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
635
+ }));
636
+ }
637
+ }
638
+ return e;
639
+ }
640
+ function ke(e, r, t) {
641
+ if (r in e) {
642
+ Object.defineProperty(e, r, {
643
+ value: t,
644
+ enumerable: true,
645
+ configurable: true,
646
+ writable: true
647
+ });
648
+ } else {
649
+ e[r] = t;
650
+ }
651
+ return e;
652
+ }
653
+ function Se(e, r) {
654
+ if (e == null) return {};
655
+ var t = je(e, r);
656
+ var n, o;
657
+ if (Object.getOwnPropertySymbols) {
658
+ var i = Object.getOwnPropertySymbols(e);
659
+ for (o = 0; o < i.length; o++) {
660
+ n = i[o];
661
+ if (r.indexOf(n) >= 0) continue;
662
+ if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
663
+ t[n] = e[n];
664
+ }
665
+ }
666
+ return t;
667
+ }
668
+ function je(e, r) {
669
+ if (e == null) return {};
670
+ var t = {};
671
+ var n = Object.keys(e);
672
+ var o, i;
673
+ for (i = 0; i < n.length; i++) {
674
+ o = n[i];
675
+ if (r.indexOf(o) >= 0) continue;
676
+ t[o] = e[o];
677
+ }
678
+ return t;
679
+ }
680
+ var Ce = {
681
+ children: i().node,
682
+ elementRef: i().oneOfType([ i().func, i().object ]),
683
+ /** @private */
684
+ margin: i().number,
685
+ /** @private */
686
+ maxWidth: i().oneOfType([ i().number, i().string ]),
687
+ /** @private */
688
+ minWidth: i().oneOfType([ i().number, i().string ]),
689
+ onClick: i().func,
690
+ openInNewContext: i().bool,
691
+ selected: i().bool,
692
+ showBorder: i().bool,
693
+ to: i().string,
694
+ value: i().any
695
+ };
696
+ var Pe = {
697
+ openInNewContext: false,
698
+ selected: false,
699
+ showBorder: true
700
+ };
701
+ function _e(e) {
702
+ return !!e.onClick || !!e.to;
703
+ }
704
+ function Te(e) {
705
+ var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.selected, i = e.showBorder, a = e.style, l = Se(e, [ "margin", "maxWidth", "minWidth", "selected", "showBorder", "style" ]);
706
+ var c = xe({
707
+ minWidth: n,
708
+ maxWidth: t,
709
+ margin: r
710
+ }, a);
711
+ var s = {
712
+ showBorder: i,
713
+ selected: o,
714
+ "data-test": "card",
715
+ style: c
716
+ };
717
+ return [ s, l ];
718
+ }
719
+ var Ee = function(e) {
720
+ be(t, e);
721
+ var r = ye(t);
722
+ function t() {
723
+ var e;
724
+ pe(this, t);
725
+ for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) {
726
+ o[i] = arguments[i];
727
+ }
728
+ e = r.call.apply(r, [ this ].concat(o));
729
+ ke(he(e), "handleCardClick", (function(r) {
730
+ var t, n;
731
+ var o = e.props, i = o.selected, a = o.value;
732
+ (t = (n = e.props).onClick) === null || t === void 0 ? void 0 : t.call(n, r, {
733
+ selected: i,
734
+ value: a
735
+ });
736
+ }));
737
+ return e;
738
+ }
739
+ fe(t, [ {
740
+ key: "render",
741
+ value: function e() {
742
+ if (_e(this.props)) {
743
+ var r = Te(this.props), t = ie(r, 2), o = t[0], i = t[1];
744
+ var a = o.selected, l = o.showBorder;
745
+ var c = i.children, s = i.elementRef, u = i.onClick, p = i.openInNewContext, d = i.to, f = Se(i, [ "children", "elementRef", "onClick", "openInNewContext", "to" ]);
746
+
747
+ return n().createElement(re, oe({
748
+ "data-clickable": true,
749
+ $selected: a,
750
+ $cardHasBorder: l,
751
+ elementRef: s
752
+ }, o, f, {
753
+ onClick: u ? this.handleCardClick : undefined,
754
+ openInNewContext: p,
755
+ to: d || undefined
756
+ }), n().createElement(te, null, c));
757
+ }
758
+ var b = Te(this.props), v = ie(b, 2), y = v[0], m = v[1];
759
+ var h = y.selected, g = y.showBorder;
760
+ var w = m.children, O = m.elementRef, x = Se(m, [ "children", "elementRef" ]);
761
+
762
+ return n().createElement(ee, oe({
763
+ $selected: h,
764
+ $cardHasBorder: g,
765
+ ref: O
766
+ }, y, x), w);
767
+ }
768
+ } ]);
769
+ return t;
770
+ }(t.Component);
771
+ ke(Ee, "propTypes", Ce);
772
+ ke(Ee, "defaultProps", Pe);
773
+ ke(Ee, "Header", Q);
774
+ ke(Ee, "Body", m);
775
+ ke(Ee, "Footer", S);
776
+ /* harmony default export */ const Be = Ee;
777
+ // CONCATENATED MODULE: ./src/Card/index.ts
778
+ module.exports = r;
779
+ /******/})();