@splunk/react-ui 4.21.0 → 4.22.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.
- package/Accordion.js +425 -325
- package/Anchor.js +147 -117
- package/Animation.js +142 -94
- package/AnimationToggle.js +197 -193
- package/Box.js +145 -118
- package/Breadcrumbs.js +288 -206
- package/Button.js +488 -465
- package/ButtonGroup.js +160 -128
- package/ButtonSimple.js +543 -462
- package/CHANGELOG.md +24 -3
- package/Calendar.js +1111 -1001
- package/Card.js +771 -598
- package/CardLayout.js +205 -147
- package/Chip.js +509 -488
- package/Clickable.js +414 -352
- package/CloseButton.js +165 -142
- package/Code.js +1807 -2084
- package/CollapsiblePanel.js +586 -519
- package/Color.js +1068 -1068
- package/ColumnLayout.js +402 -363
- package/ComboBox.js +903 -794
- package/Concertina.js +997 -802
- package/ControlGroup.js +687 -594
- package/Date.js +567 -547
- package/DefinitionList.js +308 -234
- package/Divider.js +149 -118
- package/Dropdown.js +459 -416
- package/DualListbox.js +1479 -1541
- package/EventListener.js +94 -97
- package/File.js +1051 -969
- package/FormRows.js +883 -696
- package/Heading.js +216 -193
- package/Image.js +446 -402
- package/JSONTree.js +690 -551
- package/Layer.js +437 -410
- package/Link.js +336 -255
- package/List.js +213 -161
- package/Markdown.js +509 -487
- package/Menu.js +1104 -1056
- package/Message.js +475 -441
- package/MessageBar.js +387 -373
- package/Modal.js +810 -634
- package/ModalLayer.js +326 -243
- package/Monogram.js +308 -276
- package/Multiselect.js +3564 -3364
- package/Number.js +729 -687
- package/Paginator.js +510 -449
- package/Paragraph.js +145 -112
- package/Popover.js +1459 -1432
- package/Progress.js +301 -246
- package/RadioBar.js +634 -527
- package/RadioList.js +483 -444
- package/Resize.js +530 -489
- package/ResultsMenu.js +479 -455
- package/ScreenReaderContent.js +142 -111
- package/Scroll.js +595 -456
- package/ScrollContainerContext.js +197 -206
- package/Search.js +756 -650
- package/Select.js +2446 -2345
- package/SidePanel.js +390 -284
- package/Slider.js +680 -676
- package/SlidingPanels.js +639 -503
- package/SplitButton.js +464 -367
- package/StaticContent.js +161 -133
- package/StepBar.js +386 -358
- package/Switch.js +710 -640
- package/TabBar.js +741 -680
- package/TabLayout.js +406 -322
- package/Table.js +4974 -4616
- package/Text.js +1170 -1138
- package/TextArea.js +1102 -1090
- package/Tooltip.js +624 -581
- package/TransitionOpen.js +489 -422
- package/Typography.js +176 -153
- package/WaitSpinner.js +230 -206
- package/package.json +7 -7
- package/types/src/Color/Color.d.ts +0 -1
- package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -0
- package/types/src/RadioBar/RadioBar.d.ts +1 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +0 -2
- package/types/src/Select/docs/examples/Icons.d.ts +1 -9
- package/types/src/Slider/Slider.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +10 -1
- package/types/src/TabBar/TabBar.d.ts +4 -2
- package/types/src/Table/Head.d.ts +7 -3
- package/types/src/Table/Table.d.ts +3 -2
- package/types/src/Table/TableContext.d.ts +2 -0
- package/useForceUpdate.js +112 -82
- package/useKeyPress.js +74 -71
- package/usePrevious.js +65 -65
- package/useRovingFocus.js +122 -138
package/Card.js
CHANGED
|
@@ -1,606 +1,779 @@
|
|
|
1
|
-
/******/ (() => {
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/
|
|
46
|
-
/******/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
}));
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
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
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
var
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}));
|
|
217
|
-
var
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
})(["", " ", "
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
})
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
},
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
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
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
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
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
function
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
function
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
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
|
+
/******/})();
|