@splunk/react-ui 4.34.0 → 4.35.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/Breadcrumbs.js +20 -29
- package/Button.js +1 -1
- package/CHANGELOG.md +26 -2
- package/Card.js +86 -82
- package/Chip.js +73 -76
- package/CollapsiblePanel.js +1 -1
- package/Color.js +23 -15
- package/ComboBox.js +3 -2
- package/Concertina.js +136 -135
- package/ControlGroup.js +27 -23
- package/JSONTree.js +66 -64
- package/List.js +9 -13
- package/MIGRATION.mdx +24 -0
- package/Menu.js +352 -345
- package/Message.js +16 -19
- package/Monogram.js +140 -94
- package/Multiselect.js +9 -10
- package/ResultsMenu.js +124 -126
- package/Search.js +182 -181
- package/Select.js +55 -56
- package/StepBar.js +91 -87
- package/Switch.js +105 -97
- package/Table.js +686 -687
- package/Text.js +78 -58
- package/package.json +6 -6
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +0 -1
- package/types/src/Breadcrumbs/Item.d.ts +0 -1
- package/types/src/Card/Header.d.ts +0 -2
- package/types/src/Chip/Chip.d.ts +2 -4
- package/types/src/Color/Color.d.ts +5 -5
- package/types/src/ComboBox/Option.d.ts +0 -1
- package/types/src/List/List.d.ts +2 -4
- package/types/src/Menu/Heading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +7 -5
- package/types/src/Menu/Menu.d.ts +13 -16
- package/types/src/Menu/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/Monogram/Monogram.d.ts +5 -6
- package/types/src/Multiselect/Option.d.ts +0 -1
- package/types/src/Progress/Progress.d.ts +4 -1
- package/types/src/ResultsMenu/ResultsMenu.d.ts +11 -9
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +3 -5
- package/types/src/Search/Option.d.ts +19 -6
- package/types/src/Search/docs/examples/OptionsLinks.d.ts +2 -0
- package/types/src/Select/Option.d.ts +0 -1
- package/types/src/Select/OptionBase.d.ts +2 -3
- package/types/src/Table/DragHandle.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -0
package/Breadcrumbs.js
CHANGED
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
e.r(r);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(r, {
|
|
64
|
-
BreadcrumbsContext: () => /* reexport */
|
|
65
|
-
Item: () => /* reexport */
|
|
66
|
-
default: () => /* reexport */
|
|
64
|
+
BreadcrumbsContext: () => /* reexport */ x,
|
|
65
|
+
Item: () => /* reexport */ C,
|
|
66
|
+
default: () => /* reexport */ E
|
|
67
67
|
});
|
|
68
68
|
// CONCATENATED MODULE: external "react"
|
|
69
69
|
const t = require("react");
|
|
@@ -143,14 +143,10 @@
|
|
|
143
143
|
startAdornment: o().node,
|
|
144
144
|
to: o().string.isRequired
|
|
145
145
|
};
|
|
146
|
-
|
|
147
|
-
enableCurrentPage: false,
|
|
148
|
-
isCurrent: false
|
|
149
|
-
};
|
|
150
|
-
function C(e) {
|
|
146
|
+
function g(e) {
|
|
151
147
|
var r = e.enableCurrentPage, a = e.endAdornment, o = e.isCurrent, l = e.label, i = e.onClick, c = e.startAdornment, u = e.to, s = b(e, [ "enableCurrentPage", "endAdornment", "isCurrent", "label", "onClick", "startAdornment", "to" ]);
|
|
152
148
|
// @docs-props-type ItemPropsBase
|
|
153
|
-
var f = (0, t.useContext)(
|
|
149
|
+
var f = (0, t.useContext)(x), v = f.onClick;
|
|
154
150
|
var y = {
|
|
155
151
|
to: u
|
|
156
152
|
};
|
|
@@ -178,19 +174,18 @@
|
|
|
178
174
|
"data-test": "item"
|
|
179
175
|
}, C, y, s), c && c, l, a && a);
|
|
180
176
|
}
|
|
181
|
-
|
|
182
|
-
C
|
|
183
|
-
/* harmony default export */ const O = C;
|
|
177
|
+
g.propTypes = y;
|
|
178
|
+
/* harmony default export */ const C = g;
|
|
184
179
|
// CONCATENATED MODULE: ./src/Breadcrumbs/BreadcrumbsStyles.ts
|
|
185
|
-
var
|
|
180
|
+
var O = c().ol.withConfig({
|
|
186
181
|
displayName: "BreadcrumbsStyles__StyledList",
|
|
187
182
|
componentId: "sc-1maeyfk-0"
|
|
188
183
|
})([ "", " flex-wrap:wrap;" ], u.mixins.reset("flex"));
|
|
189
|
-
var
|
|
184
|
+
var h = c().li.withConfig({
|
|
190
185
|
displayName: "BreadcrumbsStyles__StyledListItem",
|
|
191
186
|
componentId: "sc-1maeyfk-1"
|
|
192
187
|
})([ "display:flex;min-width:max-content;a[aria-current]{font-weight:", ";color:", ";cursor:default;}" ], u.variables.fontWeightSemiBold, u.variables.contentColorActive);
|
|
193
|
-
var
|
|
188
|
+
var k = c().span.withConfig({
|
|
194
189
|
displayName: "BreadcrumbsStyles__StyledSeparator",
|
|
195
190
|
componentId: "sc-1maeyfk-2"
|
|
196
191
|
})([ "cursor:default;padding:0 ", ";color:", ";" ], u.variables.spacingSmall, u.variables.contentColorDefault);
|
|
@@ -236,17 +231,14 @@
|
|
|
236
231
|
}
|
|
237
232
|
return t;
|
|
238
233
|
}
|
|
239
|
-
var
|
|
234
|
+
var P = {
|
|
240
235
|
children: o().node.isRequired,
|
|
241
236
|
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
242
237
|
enableCurrentPage: o().bool,
|
|
243
238
|
onClick: o().func
|
|
244
239
|
};
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
};
|
|
248
|
-
var E = n().createContext({});
|
|
249
|
-
function I(e) {
|
|
240
|
+
var x = n().createContext({});
|
|
241
|
+
function _(e) {
|
|
250
242
|
var r = e.children, a = e.elementRef, o = e.enableCurrentPage, i = e.onClick, c = S(e, [ "children", "elementRef", "enableCurrentPage", "onClick" ]);
|
|
251
243
|
// @docs-props-type BreadcrumbsPropsBase
|
|
252
244
|
var u;
|
|
@@ -260,9 +252,9 @@
|
|
|
260
252
|
enableCurrentPage: o
|
|
261
253
|
});
|
|
262
254
|
|
|
263
|
-
return n().createElement(
|
|
255
|
+
return n().createElement(h, {
|
|
264
256
|
key: e.props.to
|
|
265
|
-
}, i, !l && n().createElement(
|
|
257
|
+
}, i, !l && n().createElement(k, {
|
|
266
258
|
"aria-hidden": "true"
|
|
267
259
|
}, "/"));
|
|
268
260
|
}));
|
|
@@ -270,18 +262,17 @@
|
|
|
270
262
|
onClick: i
|
|
271
263
|
};
|
|
272
264
|
|
|
273
|
-
return n().createElement(
|
|
265
|
+
return n().createElement(x.Provider, {
|
|
274
266
|
value: f
|
|
275
267
|
}, n().createElement("nav", w({
|
|
276
268
|
"data-test": "breadcrumbs",
|
|
277
269
|
"aria-label": (0, l._)("Breadcrumbs"),
|
|
278
270
|
ref: a
|
|
279
|
-
}, c), n().createElement(
|
|
271
|
+
}, c), n().createElement(O, null, s)));
|
|
280
272
|
}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
/* harmony default export */ const q = I;
|
|
273
|
+
_.propTypes = P;
|
|
274
|
+
_.Item = C;
|
|
275
|
+
/* harmony default export */ const E = _;
|
|
285
276
|
// CONCATENATED MODULE: ./src/Breadcrumbs/index.ts
|
|
286
277
|
module.exports = r;
|
|
287
278
|
/******/})();
|
package/Button.js
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
var v = u()(d()).withConfig({
|
|
105
105
|
displayName: "ButtonStyles__StyledButtonSimple",
|
|
106
106
|
componentId: "eqxqs2-1"
|
|
107
|
-
})([ "text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}
|
|
107
|
+
})([ "vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{:where(:not(a)){display:inline-block;}:where(a){display:inline-flex;}", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}" ], m.variables.lineHeight, m.variables.inputHeight, (0,
|
|
108
108
|
m.pick)({
|
|
109
109
|
enterprise: {
|
|
110
110
|
comfortable: "5px 14px",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
3
|
|
|
4
|
+
4.35.0 - August 26, 2024
|
|
5
|
+
----------
|
|
6
|
+
New Features:
|
|
7
|
+
* `Color`'s `hideInput` prop is now supported in Enterprise themes. Defaults to `true` in Enterprise and `false` in Prisma themes, maintaining existing behavior (SUI-6458).
|
|
8
|
+
* `Menu.Item` now supports a new `"dimmed"` value for the `disabled` prop (SUI-5671).
|
|
9
|
+
* `ControlGroup` uses `aria-errormessage` to help associate the input with its error message (SUI-6395).
|
|
10
|
+
* Refactored uses of styled-components `withComponent` functionality to increase compatibility with styled-components v6 where it will no longer be available.
|
|
11
|
+
|
|
12
|
+
Bug Fixes:
|
|
13
|
+
* `Button` with `inline={false}` now aligns correctly with text when set to `display: inline-block` (SUI-6472).
|
|
14
|
+
* `Text`'s border now shows focus when clicked and has a cursor text when hovering over the border now (SUI-5199).
|
|
15
|
+
* `Text`'s nonclickable adornments now shows focus on the input when clicked (SUI-5199).
|
|
16
|
+
* Reverted change to `CollapsiblePanel` focus shadow, now uses inset shadow:
|
|
17
|
+
* Note `@splunk/themes@0.21.0` should be used to ensure contrast requirements are met.
|
|
18
|
+
* `Message`'s remove button styling for focus and hover states has been corrected (SUI-6520).
|
|
19
|
+
|
|
20
|
+
Deprecations:
|
|
21
|
+
* `Progress`'s `type="warning"` value has been deprecated and will be removed in the next major version.
|
|
22
|
+
* `Menu` now supports `focusMode` prop, which specifies how the menu manages focus (SUI-6164).
|
|
23
|
+
* `Menu`'s `retainFocus` prop has been deprecated and will be removed in the next major version. See the migration guide for details (SUI-6164).
|
|
24
|
+
|
|
25
|
+
Docs:
|
|
26
|
+
* `Combobox.Option`, `Multiselect.Option`, `Search.Option` and `Select.Option` no longer incorrectly list `descriptionPosition="right"` as unsupported in Prisma themes (SUI-6568).
|
|
27
|
+
|
|
4
28
|
4.34.0 - August 7, 2024
|
|
5
29
|
----------
|
|
6
30
|
New Features:
|
|
@@ -18,7 +42,7 @@ Bug Fixes:
|
|
|
18
42
|
* `Button`s with an `appearance` of `primary` or `destructive` no longer have incorrect background colors on focus when `disabled="dimmed"` (SUI-6357).
|
|
19
43
|
* `JSONTree's` active border has been removed to avoid a layout shift (SUI-6324).
|
|
20
44
|
* `CollapsiblePanel`'s focus shadow has been updated to improve contrast (SUI-6340).
|
|
21
|
-
* `Search`'s `role` has been changed from `"textbox"` to `"searchbox"`.
|
|
45
|
+
* `Search`'s `role` has been changed from `"textbox"` to `"searchbox"`.
|
|
22
46
|
* `Search`'s default labels have been removed to avoid redundant screen reader output (SUI-6332).
|
|
23
47
|
* `CollapsiblePanel`'s Enterprise dark theme toggle button is now visible when `disabled` (SUI-6425).
|
|
24
48
|
* `Popover` no longer moves focus to the container when no focusable children exist to ensure the focus indicator remains visible (SUI-6446).
|
|
@@ -39,7 +63,7 @@ New Features:
|
|
|
39
63
|
* `Button` now supports `appearance="subtle"` with a visual appearance similar to the Enterprise `"pill"` and Prisma `"secondary"` appearances (SUI-6051).
|
|
40
64
|
* `Button` now sets the `aria-pressed` attribute appropriately when the `selected` prop is provided (SUI-2791).
|
|
41
65
|
* `Select` has a new `toggleContent` prop that specifies whether the children (`"optionChildren"`) or label (`"optionLabel"`) of the matched `Option` are rendered in the toggle button (SUI-6316).
|
|
42
|
-
* `Menu.Item` now
|
|
66
|
+
* `Menu.Item`, `Combobox.Option`, `Multiselect.Option`, `Search.Option` and `Select.Option` now support `descriptionPosition="right"` for Prisma themes (SUI-5664).
|
|
43
67
|
|
|
44
68
|
Bug Fixes:
|
|
45
69
|
* `Modal.Header` uses semantic HTML elements for the `title` and `subtitle` props to improve accessibility.
|
package/Card.js
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
Body: () => /* reexport */ m,
|
|
65
65
|
Footer: () => /* reexport */ k,
|
|
66
66
|
Header: () => /* reexport */ Q,
|
|
67
|
-
default: () => /* reexport */
|
|
67
|
+
default: () => /* reexport */ Re
|
|
68
68
|
});
|
|
69
69
|
// CONCATENATED MODULE: external "react"
|
|
70
70
|
const t = require("react");
|
|
@@ -422,10 +422,7 @@
|
|
|
422
422
|
var Y = e.n(X);
|
|
423
423
|
// CONCATENATED MODULE: ./src/Card/CardStyles.ts
|
|
424
424
|
var Z = "0.2s";
|
|
425
|
-
var ee =
|
|
426
|
-
displayName: "CardStyles__Styled",
|
|
427
|
-
componentId: "ola3x0-0"
|
|
428
|
-
})([ "", ";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,
|
|
425
|
+
var ee = (0, a.css)([ "", ";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,
|
|
429
426
|
u.pick)({
|
|
430
427
|
enterprise: (0, a.css)([ "background-color:", ";border:1px solid transparent;" ], u.variables.backgroundColor),
|
|
431
428
|
prisma: (0, a.css)([ "background-color:", ";border-radius:", ";box-shadow:", ";" ], u.variables.backgroundColorSection, u.variables.borderRadius, u.variables.embossShadow)
|
|
@@ -447,36 +444,43 @@
|
|
|
447
444
|
enterprise: (0, a.css)([ "box-shadow:", ";" ], u.variables.focusShadow),
|
|
448
445
|
prisma: (0, a.css)([ "box-shadow:", ",", ";background-color:", ";" ], u.variables.embossShadow, u.variables.focusShadow, u.mixins.overlayColors(u.variables.backgroundColorSection, u.variables.interactiveColorOverlayHover))
|
|
449
446
|
}));
|
|
450
|
-
var re =
|
|
447
|
+
var re = l().article.withConfig({
|
|
448
|
+
displayName: "CardStyles__Styled",
|
|
449
|
+
componentId: "ola3x0-0"
|
|
450
|
+
})([ "", "" ], ee);
|
|
451
|
+
var te = l()(Y()).withConfig({
|
|
452
|
+
displayName: "CardStyles__StyledClickable",
|
|
453
|
+
componentId: "ola3x0-1"
|
|
454
|
+
})([ "", "" ], ee);
|
|
451
455
|
/* A child element we add to <button>s to make flexbox work.
|
|
452
456
|
Without this wrapper element, child elements won't flex
|
|
453
457
|
in Firefox.
|
|
454
458
|
This unfortunately exposes some fragility in IE (e.g., adding
|
|
455
459
|
a flex: 1 style here will cause the card to collapse) so test
|
|
456
460
|
across the supported browsers if making a change here.
|
|
457
|
-
*/ var
|
|
461
|
+
*/ var ne = l().div.withConfig({
|
|
458
462
|
displayName: "CardStyles__StyledFirefoxFlexHack",
|
|
459
|
-
componentId: "ola3x0-
|
|
463
|
+
componentId: "ola3x0-2"
|
|
460
464
|
})([ "display:flex;flex:1 1 auto;flex-direction:column;align-items:stretch;justify-content:stretch;height:100%;", "" ], (0,
|
|
461
465
|
u.pick)({
|
|
462
466
|
prisma: (0, a.css)([ "border-radius:", ";" ], u.variables.borderRadius)
|
|
463
467
|
}));
|
|
464
468
|
// CONCATENATED MODULE: ./src/Card/Card.tsx
|
|
465
|
-
function
|
|
469
|
+
function oe(e) {
|
|
466
470
|
"@babel/helpers - typeof";
|
|
467
471
|
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
468
|
-
|
|
472
|
+
oe = function e(r) {
|
|
469
473
|
return typeof r;
|
|
470
474
|
};
|
|
471
475
|
} else {
|
|
472
|
-
|
|
476
|
+
oe = function e(r) {
|
|
473
477
|
return r && typeof Symbol === "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
474
478
|
};
|
|
475
479
|
}
|
|
476
|
-
return
|
|
480
|
+
return oe(e);
|
|
477
481
|
}
|
|
478
|
-
function
|
|
479
|
-
|
|
482
|
+
function ie() {
|
|
483
|
+
ie = Object.assign || function(e) {
|
|
480
484
|
for (var r = 1; r < arguments.length; r++) {
|
|
481
485
|
var t = arguments[r];
|
|
482
486
|
for (var n in t) {
|
|
@@ -487,30 +491,30 @@
|
|
|
487
491
|
}
|
|
488
492
|
return e;
|
|
489
493
|
};
|
|
490
|
-
return
|
|
494
|
+
return ie.apply(this, arguments);
|
|
491
495
|
}
|
|
492
|
-
function
|
|
493
|
-
return
|
|
496
|
+
function ae(e, r) {
|
|
497
|
+
return pe(e) || ue(e, r) || ce(e, r) || le();
|
|
494
498
|
}
|
|
495
|
-
function
|
|
499
|
+
function le() {
|
|
496
500
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
497
501
|
}
|
|
498
|
-
function
|
|
502
|
+
function ce(e, r) {
|
|
499
503
|
if (!e) return;
|
|
500
|
-
if (typeof e === "string") return
|
|
504
|
+
if (typeof e === "string") return se(e, r);
|
|
501
505
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
502
506
|
if (t === "Object" && e.constructor) t = e.constructor.name;
|
|
503
507
|
if (t === "Map" || t === "Set") return Array.from(e);
|
|
504
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return
|
|
508
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return se(e, r);
|
|
505
509
|
}
|
|
506
|
-
function
|
|
510
|
+
function se(e, r) {
|
|
507
511
|
if (r == null || r > e.length) r = e.length;
|
|
508
512
|
for (var t = 0, n = new Array(r); t < r; t++) {
|
|
509
513
|
n[t] = e[t];
|
|
510
514
|
}
|
|
511
515
|
return n;
|
|
512
516
|
}
|
|
513
|
-
function
|
|
517
|
+
function ue(e, r) {
|
|
514
518
|
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
|
|
515
519
|
var t = [];
|
|
516
520
|
var n = true;
|
|
@@ -533,15 +537,15 @@
|
|
|
533
537
|
}
|
|
534
538
|
return t;
|
|
535
539
|
}
|
|
536
|
-
function
|
|
540
|
+
function pe(e) {
|
|
537
541
|
if (Array.isArray(e)) return e;
|
|
538
542
|
}
|
|
539
|
-
function
|
|
543
|
+
function de(e, r) {
|
|
540
544
|
if (!(e instanceof r)) {
|
|
541
545
|
throw new TypeError("Cannot call a class as a function");
|
|
542
546
|
}
|
|
543
547
|
}
|
|
544
|
-
function
|
|
548
|
+
function fe(e, r) {
|
|
545
549
|
for (var t = 0; t < r.length; t++) {
|
|
546
550
|
var n = r[t];
|
|
547
551
|
n.enumerable = n.enumerable || false;
|
|
@@ -550,12 +554,12 @@
|
|
|
550
554
|
Object.defineProperty(e, n.key, n);
|
|
551
555
|
}
|
|
552
556
|
}
|
|
553
|
-
function
|
|
554
|
-
if (r)
|
|
555
|
-
if (t)
|
|
557
|
+
function be(e, r, t) {
|
|
558
|
+
if (r) fe(e.prototype, r);
|
|
559
|
+
if (t) fe(e, t);
|
|
556
560
|
return e;
|
|
557
561
|
}
|
|
558
|
-
function
|
|
562
|
+
function ve(e, r) {
|
|
559
563
|
if (typeof r !== "function" && r !== null) {
|
|
560
564
|
throw new TypeError("Super expression must either be null or a function");
|
|
561
565
|
}
|
|
@@ -566,41 +570,41 @@
|
|
|
566
570
|
configurable: true
|
|
567
571
|
}
|
|
568
572
|
});
|
|
569
|
-
if (r)
|
|
573
|
+
if (r) ye(e, r);
|
|
570
574
|
}
|
|
571
|
-
function
|
|
572
|
-
|
|
575
|
+
function ye(e, r) {
|
|
576
|
+
ye = Object.setPrototypeOf || function e(r, t) {
|
|
573
577
|
r.__proto__ = t;
|
|
574
578
|
return r;
|
|
575
579
|
};
|
|
576
|
-
return
|
|
580
|
+
return ye(e, r);
|
|
577
581
|
}
|
|
578
|
-
function
|
|
579
|
-
var r =
|
|
582
|
+
function me(e) {
|
|
583
|
+
var r = we();
|
|
580
584
|
return function t() {
|
|
581
|
-
var n =
|
|
585
|
+
var n = Oe(e), o;
|
|
582
586
|
if (r) {
|
|
583
|
-
var i =
|
|
587
|
+
var i = Oe(this).constructor;
|
|
584
588
|
o = Reflect.construct(n, arguments, i);
|
|
585
589
|
} else {
|
|
586
590
|
o = n.apply(this, arguments);
|
|
587
591
|
}
|
|
588
|
-
return
|
|
592
|
+
return he(this, o);
|
|
589
593
|
};
|
|
590
594
|
}
|
|
591
|
-
function
|
|
592
|
-
if (r && (
|
|
595
|
+
function he(e, r) {
|
|
596
|
+
if (r && (oe(r) === "object" || typeof r === "function")) {
|
|
593
597
|
return r;
|
|
594
598
|
}
|
|
595
|
-
return
|
|
599
|
+
return ge(e);
|
|
596
600
|
}
|
|
597
|
-
function
|
|
601
|
+
function ge(e) {
|
|
598
602
|
if (e === void 0) {
|
|
599
603
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
600
604
|
}
|
|
601
605
|
return e;
|
|
602
606
|
}
|
|
603
|
-
function
|
|
607
|
+
function we() {
|
|
604
608
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
605
609
|
if (Reflect.construct.sham) return false;
|
|
606
610
|
if (typeof Proxy === "function") return true;
|
|
@@ -611,13 +615,13 @@
|
|
|
611
615
|
return false;
|
|
612
616
|
}
|
|
613
617
|
}
|
|
614
|
-
function
|
|
615
|
-
|
|
618
|
+
function Oe(e) {
|
|
619
|
+
Oe = Object.setPrototypeOf ? Object.getPrototypeOf : function e(r) {
|
|
616
620
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
617
621
|
};
|
|
618
|
-
return
|
|
622
|
+
return Oe(e);
|
|
619
623
|
}
|
|
620
|
-
function
|
|
624
|
+
function xe(e, r) {
|
|
621
625
|
var t = Object.keys(e);
|
|
622
626
|
if (Object.getOwnPropertySymbols) {
|
|
623
627
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -628,24 +632,24 @@
|
|
|
628
632
|
}
|
|
629
633
|
return t;
|
|
630
634
|
}
|
|
631
|
-
function
|
|
635
|
+
function Se(e) {
|
|
632
636
|
for (var r = 1; r < arguments.length; r++) {
|
|
633
637
|
var t = arguments[r] != null ? arguments[r] : {};
|
|
634
638
|
if (r % 2) {
|
|
635
|
-
|
|
636
|
-
|
|
639
|
+
xe(Object(t), true).forEach((function(r) {
|
|
640
|
+
ke(e, r, t[r]);
|
|
637
641
|
}));
|
|
638
642
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
639
643
|
Object.defineProperties(e, Object.getOwnPropertyDescriptors(t));
|
|
640
644
|
} else {
|
|
641
|
-
|
|
645
|
+
xe(Object(t)).forEach((function(r) {
|
|
642
646
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
643
647
|
}));
|
|
644
648
|
}
|
|
645
649
|
}
|
|
646
650
|
return e;
|
|
647
651
|
}
|
|
648
|
-
function
|
|
652
|
+
function ke(e, r, t) {
|
|
649
653
|
if (r in e) {
|
|
650
654
|
Object.defineProperty(e, r, {
|
|
651
655
|
value: t,
|
|
@@ -658,9 +662,9 @@
|
|
|
658
662
|
}
|
|
659
663
|
return e;
|
|
660
664
|
}
|
|
661
|
-
function
|
|
665
|
+
function je(e, r) {
|
|
662
666
|
if (e == null) return {};
|
|
663
|
-
var t =
|
|
667
|
+
var t = Ce(e, r);
|
|
664
668
|
var n, o;
|
|
665
669
|
if (Object.getOwnPropertySymbols) {
|
|
666
670
|
var i = Object.getOwnPropertySymbols(e);
|
|
@@ -673,7 +677,7 @@
|
|
|
673
677
|
}
|
|
674
678
|
return t;
|
|
675
679
|
}
|
|
676
|
-
function
|
|
680
|
+
function Ce(e, r) {
|
|
677
681
|
if (e == null) return {};
|
|
678
682
|
var t = {};
|
|
679
683
|
var n = Object.keys(e);
|
|
@@ -685,7 +689,7 @@
|
|
|
685
689
|
}
|
|
686
690
|
return t;
|
|
687
691
|
}
|
|
688
|
-
var
|
|
692
|
+
var Pe = {
|
|
689
693
|
children: i().node,
|
|
690
694
|
elementRef: i().oneOfType([ i().func, i().object ]),
|
|
691
695
|
/** @private */
|
|
@@ -702,16 +706,16 @@
|
|
|
702
706
|
value: i().any,
|
|
703
707
|
tag: i().oneOf([ "article", "div", "aside", "section" ])
|
|
704
708
|
};
|
|
705
|
-
var
|
|
709
|
+
var _e = {
|
|
706
710
|
openInNewContext: false,
|
|
707
711
|
showBorder: true
|
|
708
712
|
};
|
|
709
|
-
function
|
|
713
|
+
function Ee(e) {
|
|
710
714
|
return !!e.onClick || !!e.to;
|
|
711
715
|
}
|
|
712
|
-
function
|
|
713
|
-
var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.showBorder, i = e.style, a =
|
|
714
|
-
var l =
|
|
716
|
+
function Te(e) {
|
|
717
|
+
var r = e.margin, t = e.maxWidth, n = e.minWidth, o = e.showBorder, i = e.style, a = je(e, [ "margin", "maxWidth", "minWidth", "showBorder", "style" ]);
|
|
718
|
+
var l = Se({
|
|
715
719
|
minWidth: n,
|
|
716
720
|
maxWidth: t,
|
|
717
721
|
margin: r
|
|
@@ -723,17 +727,17 @@
|
|
|
723
727
|
};
|
|
724
728
|
return [ c, a ];
|
|
725
729
|
}
|
|
726
|
-
var
|
|
727
|
-
|
|
728
|
-
var r =
|
|
730
|
+
var Be = function(e) {
|
|
731
|
+
ve(t, e);
|
|
732
|
+
var r = me(t);
|
|
729
733
|
function t() {
|
|
730
734
|
var e;
|
|
731
|
-
|
|
735
|
+
de(this, t);
|
|
732
736
|
for (var n = arguments.length, o = new Array(n), i = 0; i < n; i++) {
|
|
733
737
|
o[i] = arguments[i];
|
|
734
738
|
}
|
|
735
739
|
e = r.call.apply(r, [ this ].concat(o));
|
|
736
|
-
|
|
740
|
+
ke(ge(e), "handleCardClick", (function(r) {
|
|
737
741
|
var t, n;
|
|
738
742
|
var o = e.props, i = o.selected, a = o.value;
|
|
739
743
|
(t = (n = e.props).onClick) === null || t === void 0 ? void 0 : t.call(n, r, {
|
|
@@ -743,15 +747,15 @@
|
|
|
743
747
|
}));
|
|
744
748
|
return e;
|
|
745
749
|
}
|
|
746
|
-
|
|
750
|
+
be(t, [ {
|
|
747
751
|
key: "render",
|
|
748
752
|
value: function e() {
|
|
749
|
-
if (
|
|
750
|
-
var r =
|
|
753
|
+
if (Ee(this.props)) {
|
|
754
|
+
var r = Te(this.props), t = ae(r, 2), o = t[0], i = t[1];
|
|
751
755
|
var a = o.showBorder;
|
|
752
|
-
var l = i.children, c = i.elementRef, s = i.onClick, u = i.openInNewContext, p = i.selected, d = i.to, f =
|
|
756
|
+
var l = i.children, c = i.elementRef, s = i.onClick, u = i.openInNewContext, p = i.selected, d = i.to, f = je(i, [ "children", "elementRef", "onClick", "openInNewContext", "selected", "to" ]);
|
|
753
757
|
|
|
754
|
-
return n().createElement(
|
|
758
|
+
return n().createElement(te, ie({
|
|
755
759
|
"data-clickable": true,
|
|
756
760
|
$selected: p || false,
|
|
757
761
|
$cardHasBorder: a,
|
|
@@ -760,13 +764,13 @@
|
|
|
760
764
|
onClick: s ? this.handleCardClick : undefined,
|
|
761
765
|
openInNewContext: u,
|
|
762
766
|
to: d || undefined
|
|
763
|
-
}), n().createElement(
|
|
767
|
+
}), n().createElement(ne, null, l));
|
|
764
768
|
}
|
|
765
|
-
var b =
|
|
769
|
+
var b = Te(this.props), v = ae(b, 2), y = v[0], m = v[1];
|
|
766
770
|
var h = y.showBorder;
|
|
767
|
-
var g = m.children, w = m.elementRef, O = m.tag, x =
|
|
771
|
+
var g = m.children, w = m.elementRef, O = m.tag, x = je(m, [ "children", "elementRef", "tag" ]);
|
|
768
772
|
|
|
769
|
-
return n().createElement(
|
|
773
|
+
return n().createElement(re, ie({
|
|
770
774
|
$selected: false,
|
|
771
775
|
$cardHasBorder: h,
|
|
772
776
|
ref: w,
|
|
@@ -778,12 +782,12 @@
|
|
|
778
782
|
} ]);
|
|
779
783
|
return t;
|
|
780
784
|
}(t.Component);
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
/* harmony default export */ const
|
|
785
|
+
ke(Be, "propTypes", Pe);
|
|
786
|
+
ke(Be, "defaultProps", _e);
|
|
787
|
+
ke(Be, "Header", Q);
|
|
788
|
+
ke(Be, "Body", m);
|
|
789
|
+
ke(Be, "Footer", k);
|
|
790
|
+
/* harmony default export */ const Re = Be;
|
|
787
791
|
// CONCATENATED MODULE: ./src/Card/index.ts
|
|
788
792
|
module.exports = r;
|
|
789
793
|
/******/})();
|