@splunk/react-ui 4.32.0 → 4.34.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/Button.js +59 -65
- package/ButtonGroup.js +20 -23
- package/ButtonSimple.js +374 -339
- package/CHANGELOG.md +54 -0
- package/Card.js +56 -44
- package/Chip.js +2 -6
- package/Clickable.js +21 -19
- package/CollapsiblePanel.js +281 -264
- package/Color.js +88 -86
- package/Concertina.js +7 -7
- package/ControlGroup.js +18 -18
- package/DualListbox.js +8 -11
- package/File.js +25 -30
- package/FormRows.js +232 -210
- package/Image.js +13 -13
- package/JSONTree.js +22 -22
- package/MIGRATION.mdx +99 -0
- package/Markdown.js +12 -12
- package/Menu.js +505 -719
- package/Message.js +205 -204
- package/MessageBar.js +104 -104
- package/Modal.js +158 -133
- package/Multiselect.js +81 -70
- package/Paginator.js +8 -8
- package/Popover.js +53 -54
- package/Progress.js +45 -46
- package/RadioBar.js +117 -115
- package/RadioList.js +8 -5
- package/ResultsMenu.js +256 -261
- package/Search.js +21 -24
- package/Select.js +265 -246
- package/Slider.js +9 -9
- package/SplitButton.js +1 -4
- package/StaticContent.js +1 -1
- package/StepBar.js +1 -1
- package/Switch.js +169 -171
- package/TabBar.js +14 -6
- package/Table.js +65 -67
- package/Text.js +30 -37
- package/TextArea.js +162 -163
- package/Tooltip.js +1 -1
- package/package.json +9 -9
- package/stubs-splunkui.d.ts +11 -0
- package/types/src/Button/Button.d.ts +4 -4
- package/types/src/ButtonSimple/ButtonSimple.d.ts +8 -6
- package/types/src/ButtonSimple/mixin.d.ts +2 -2
- package/types/src/Card/Card.d.ts +3 -1
- package/types/src/Card/Header.d.ts +22 -3
- package/types/src/Clickable/Clickable.d.ts +3 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +5 -0
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +1 -3
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/Menu/Item.d.ts +3 -1
- package/types/src/Menu/Menu.d.ts +16 -21
- package/types/src/Menu/MenuContext.d.ts +3 -2
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/RadioBar/Option.d.ts +4 -1
- package/types/src/RadioBar/RadioBar.d.ts +6 -4
- package/types/src/RadioBar/docs/examples/MenuBar.d.ts +2 -0
- package/types/src/ResultsMenu/ResultsMenu.d.ts +5 -22
- package/types/src/Select/Select.d.ts +8 -4
- package/types/src/Select/SelectBase.d.ts +8 -4
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/Table/Body.d.ts +0 -4
- package/types/src/Text/docs/examples/Basic.d.ts +1 -9
- package/types/src/Text/docs/examples/Error.d.ts +2 -10
- package/types/src/Text/docs/examples/Inline.d.ts +1 -9
- package/types/src/Text/docs/examples/Multiline.d.ts +1 -9
- package/types/src/Text/docs/examples/Password.d.ts +1 -9
- package/types/src/Text/docs/examples/Search.d.ts +1 -9
- package/useRovingFocus.js +26 -40
- package/types/src/Button/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Block.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Disabled.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Icons.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Menus.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/To.d.ts +0 -2
- package/types/src/Button/docs/examples/prisma/Truncated.d.ts +0 -2
- package/types/src/Select/docs/examples/prisma/Appearance.d.ts +0 -14
- /package/types/src/{Button/docs/examples/prisma → Clickable/docs/examples}/Dimmed.d.ts +0 -0
package/Button.js
CHANGED
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
const o = require("lodash/isString");
|
|
74
74
|
var l = e.n(o);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
76
|
-
const
|
|
76
|
+
const s = require("@splunk/react-ui/Dropdown");
|
|
77
77
|
// CONCATENATED MODULE: external "@splunk/ui-utils/style"
|
|
78
|
-
const
|
|
78
|
+
const c = require("@splunk/ui-utils/style");
|
|
79
79
|
// CONCATENATED MODULE: external "styled-components"
|
|
80
80
|
const p = require("styled-components");
|
|
81
81
|
var u = e.n(p);
|
|
@@ -85,26 +85,26 @@
|
|
|
85
85
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
86
86
|
const m = require("@splunk/themes");
|
|
87
87
|
// CONCATENATED MODULE: ./src/Button/ButtonStyles.ts
|
|
88
|
-
var
|
|
88
|
+
var y = u().span.withConfig({
|
|
89
89
|
displayName: "ButtonStyles__StyledIcon",
|
|
90
90
|
componentId: "eqxqs2-0"
|
|
91
|
-
})([ "display:flex;align-items:center;flex-shrink:0;font-size:", ";", "
|
|
91
|
+
})([ "display:flex;align-items:center;flex-shrink:0;font-size:", ";", "" ], (0,
|
|
92
92
|
m.pick)({
|
|
93
93
|
enterprise: "inherit",
|
|
94
94
|
prisma: {
|
|
95
95
|
comfortable: "21px",
|
|
96
96
|
compact: "16px"
|
|
97
97
|
}
|
|
98
|
-
}), (0, m.pickVariant)("$
|
|
99
|
-
|
|
98
|
+
}), (0, m.pickVariant)("$isStartIcon", {
|
|
99
|
+
true: {
|
|
100
100
|
enterprise: (0, p.css)([ "padding-right:3px;" ]),
|
|
101
101
|
prisma: (0, p.css)([ "padding-right:8px;" ])
|
|
102
102
|
}
|
|
103
103
|
}));
|
|
104
|
-
var
|
|
104
|
+
var v = u()(d()).withConfig({
|
|
105
105
|
displayName: "ButtonStyles__StyledButtonSimple",
|
|
106
106
|
componentId: "eqxqs2-1"
|
|
107
|
-
})([ "text-
|
|
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;}vertical-align:middle;", "}[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",
|
|
@@ -125,15 +125,15 @@
|
|
|
125
125
|
return !t && !n && !r && (0, p.css)([ "width:100%;" ]);
|
|
126
126
|
}), (function(e) {
|
|
127
127
|
var t = e.$isIconOnly;
|
|
128
|
-
return t && (0, p.css)([ "box-sizing:border-box;
|
|
128
|
+
return t && (0, p.css)([ "box-sizing:border-box;", ";width:", ";min-width:", ";" ], (0,
|
|
129
129
|
m.pick)({
|
|
130
130
|
enterprise: {
|
|
131
|
-
comfortable: "0 5px",
|
|
132
|
-
compact: "0 2px"
|
|
131
|
+
comfortable: (0, p.css)([ "padding:0 5px;" ]),
|
|
132
|
+
compact: (0, p.css)([ "padding:0 2px;" ])
|
|
133
133
|
},
|
|
134
134
|
prisma: {
|
|
135
|
-
comfortable: (0, p.css)([ "
|
|
136
|
-
compact: (0, p.css)([ "
|
|
135
|
+
comfortable: (0, p.css)([ "padding:0 calc(", " / 2 - 1px);" ], m.variables.inputHeight),
|
|
136
|
+
compact: (0, p.css)([ "padding:0 calc(", " / 2 - 1px);" ], m.variables.inputHeight)
|
|
137
137
|
}
|
|
138
138
|
}), m.variables.inputHeight, m.variables.inputHeight);
|
|
139
139
|
}), (function(e) {
|
|
@@ -141,15 +141,12 @@
|
|
|
141
141
|
return t ? null : (0, p.css)([ "width:auto;" ]);
|
|
142
142
|
}), (function(e) {
|
|
143
143
|
var t = e.prepend;
|
|
144
|
-
return !t && (0, p.css)([ "margin-left:", ";" ],
|
|
145
|
-
enterprise: m.variables.spacingHalf,
|
|
146
|
-
prisma: m.variables.spacingSmall
|
|
147
|
-
}));
|
|
144
|
+
return !t && (0, p.css)([ "margin-left:", ";" ], m.variables.spacingSmall);
|
|
148
145
|
}));
|
|
149
146
|
var b = u().span.withConfig({
|
|
150
147
|
displayName: "ButtonStyles__StyledContentWrapper",
|
|
151
148
|
componentId: "eqxqs2-2"
|
|
152
|
-
})([ "display:flex;flex-direction:row;justify-content:center;align-items:center;max-width:100%;padding:", ";" ], (0,
|
|
149
|
+
})([ "display:flex;flex-direction:row;justify-content:center;align-items:center;flex:1 0 auto;max-width:100%;box-sizing:border-box;padding:", ";" ], (0,
|
|
153
150
|
m.pick)({
|
|
154
151
|
enterprise: function e(t) {
|
|
155
152
|
var n = t.$error;
|
|
@@ -164,7 +161,9 @@
|
|
|
164
161
|
pill: "0",
|
|
165
162
|
toggle: "0",
|
|
166
163
|
// === default
|
|
167
|
-
flat: "0"
|
|
164
|
+
flat: "0",
|
|
165
|
+
// === default
|
|
166
|
+
subtle: "0"
|
|
168
167
|
});
|
|
169
168
|
},
|
|
170
169
|
prisma: (0, m.pickVariant)("$appearance", {
|
|
@@ -175,7 +174,8 @@
|
|
|
175
174
|
pill: "1px 0",
|
|
176
175
|
// === secondary
|
|
177
176
|
toggle: "0",
|
|
178
|
-
flat: "1px 0"
|
|
177
|
+
flat: "1px 0",
|
|
178
|
+
subtle: "1px 0"
|
|
179
179
|
})
|
|
180
180
|
}));
|
|
181
181
|
var h = u().span.withConfig({
|
|
@@ -198,9 +198,9 @@
|
|
|
198
198
|
true: (0, p.css)([ "color:", ";" ], m.variables.contentColorInverted),
|
|
199
199
|
false: (0, p.css)([ "color:", ";", ":hover > * > &,", ":active > * > &,{color:", ";}" ], m.variables.contentColorDefault,
|
|
200
200
|
/* sc-sel */
|
|
201
|
-
|
|
201
|
+
v,
|
|
202
202
|
/* sc-sel */
|
|
203
|
-
|
|
203
|
+
v, m.variables.contentColorDefault)
|
|
204
204
|
})
|
|
205
205
|
}
|
|
206
206
|
}));
|
|
@@ -208,13 +208,13 @@
|
|
|
208
208
|
const g = require("@splunk/react-icons/CaretSmallDown");
|
|
209
209
|
var w = e.n(g);
|
|
210
210
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
|
|
211
|
-
const
|
|
212
|
-
var
|
|
211
|
+
const S = require("@splunk/react-icons/enterprise/Caret");
|
|
212
|
+
var k = e.n(S);
|
|
213
213
|
// CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
|
|
214
214
|
var O = function e() {
|
|
215
215
|
var t = (0, m.useSplunkTheme)(), n = t.isEnterprise, i = t.isCompact;
|
|
216
216
|
var a = i ? "20px" : "24px";
|
|
217
|
-
return n ? r().createElement(
|
|
217
|
+
return n ? r().createElement(k(), {
|
|
218
218
|
screenReaderText: null,
|
|
219
219
|
hideDefaultTooltip: true,
|
|
220
220
|
size: .5
|
|
@@ -226,27 +226,20 @@
|
|
|
226
226
|
/* harmony default export */ const C = O;
|
|
227
227
|
// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
|
|
228
228
|
const q = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
229
|
-
var
|
|
229
|
+
var $ = e.n(q);
|
|
230
230
|
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
|
|
231
|
-
const
|
|
232
|
-
var I = e.n(
|
|
231
|
+
const _ = require("@splunk/react-icons/enterprise/External");
|
|
232
|
+
var I = e.n(_);
|
|
233
233
|
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
234
234
|
const E = require("@splunk/ui-utils/i18n");
|
|
235
235
|
// CONCATENATED MODULE: ./src/Button/icons/External.tsx
|
|
236
236
|
var P = (0, E._)("Open externally");
|
|
237
237
|
function j() {
|
|
238
|
-
var e = (0, m.useSplunkTheme)(), t = e.isEnterprise
|
|
239
|
-
var i = n ? "20px" : "24px";
|
|
238
|
+
var e = (0, m.useSplunkTheme)(), t = e.isEnterprise;
|
|
240
239
|
return t ? r().createElement(I(), {
|
|
241
|
-
screenReaderText: P
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
verticalAlign: "baseline"
|
|
245
|
-
}
|
|
246
|
-
}) : r().createElement(_(), {
|
|
247
|
-
"aria-label": P,
|
|
248
|
-
height: i,
|
|
249
|
-
width: i
|
|
240
|
+
screenReaderText: P
|
|
241
|
+
}) : r().createElement($(), {
|
|
242
|
+
"aria-label": P
|
|
250
243
|
}, r().createElement("title", null, P));
|
|
251
244
|
}
|
|
252
245
|
/* harmony default export */ const N = j;
|
|
@@ -327,16 +320,16 @@
|
|
|
327
320
|
} else {
|
|
328
321
|
i = r.apply(this, arguments);
|
|
329
322
|
}
|
|
330
|
-
return
|
|
323
|
+
return W(this, i);
|
|
331
324
|
};
|
|
332
325
|
}
|
|
333
|
-
function
|
|
326
|
+
function W(e, t) {
|
|
334
327
|
if (t && (M(t) === "object" || typeof t === "function")) {
|
|
335
328
|
return t;
|
|
336
329
|
}
|
|
337
|
-
return
|
|
330
|
+
return A(e);
|
|
338
331
|
}
|
|
339
|
-
function
|
|
332
|
+
function A(e) {
|
|
340
333
|
if (e === void 0) {
|
|
341
334
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
342
335
|
}
|
|
@@ -374,7 +367,7 @@
|
|
|
374
367
|
}
|
|
375
368
|
var J = {
|
|
376
369
|
action: a().string,
|
|
377
|
-
appearance: a().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat" ]),
|
|
370
|
+
appearance: a().oneOf([ "default", "secondary", "primary", "destructive", "pill", "toggle", "flat", "subtle" ]),
|
|
378
371
|
append: a().bool,
|
|
379
372
|
children: a().node,
|
|
380
373
|
/** @private An additional className to add to the button. */
|
|
@@ -401,8 +394,7 @@
|
|
|
401
394
|
inline: true,
|
|
402
395
|
isMenu: false,
|
|
403
396
|
openInNewContext: false,
|
|
404
|
-
prepend: false
|
|
405
|
-
selected: false
|
|
397
|
+
prepend: false
|
|
406
398
|
};
|
|
407
399
|
var Q = function(e) {
|
|
408
400
|
H(n, e);
|
|
@@ -412,8 +404,8 @@
|
|
|
412
404
|
var r;
|
|
413
405
|
R(this, n);
|
|
414
406
|
r = t.call(this, e);
|
|
415
|
-
G(
|
|
416
|
-
G(
|
|
407
|
+
G(A(r), "component", null);
|
|
408
|
+
G(A(r), "handleClick", (function(e) {
|
|
417
409
|
var t = r.props, n = t.label, i = t.icon, a = t.value, o = t.action, l = t.onClick;
|
|
418
410
|
l === null || l === void 0 ? void 0 : l(e, {
|
|
419
411
|
label: n,
|
|
@@ -422,7 +414,7 @@
|
|
|
422
414
|
action: o
|
|
423
415
|
});
|
|
424
416
|
}));
|
|
425
|
-
G(
|
|
417
|
+
G(A(r), "handleMount", (function(e) {
|
|
426
418
|
r.component = e;
|
|
427
419
|
}));
|
|
428
420
|
if (false) {}
|
|
@@ -440,26 +432,26 @@
|
|
|
440
432
|
}, {
|
|
441
433
|
key: "render",
|
|
442
434
|
value: function e() {
|
|
443
|
-
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className,
|
|
444
|
-
var q = this.props,
|
|
445
|
-
if (
|
|
446
|
-
|
|
447
|
-
|
|
435
|
+
var t = this.props, n = t.action, i = t.appearance, a = t.append, o = t.className, s = t.classNamePrivate, p = t.disabled, u = t.error, f = t.icon, d = t.inline, m = t.isMenu, g = t.onClick, w = t.openInNewContext, S = t.prepend, k = t.to, O = t.value;
|
|
436
|
+
var q = this.props, $ = q.children, _ = q.label;
|
|
437
|
+
if (!_ && l()($)) {
|
|
438
|
+
_ = $;
|
|
439
|
+
$ = null;
|
|
448
440
|
}
|
|
449
|
-
var I = !!(f &&
|
|
450
|
-
var E =
|
|
441
|
+
var I = !!(f && !_ && !m && !$);
|
|
442
|
+
var E = k && w || m || !!f;
|
|
451
443
|
|
|
452
|
-
return r().createElement(
|
|
444
|
+
return r().createElement(v, T({
|
|
453
445
|
"aria-haspopup": m || undefined,
|
|
454
446
|
"aria-invalid": u || undefined,
|
|
455
447
|
"data-test": "button"
|
|
456
448
|
}, this.props, {
|
|
457
|
-
className: (0,
|
|
449
|
+
className: (0, c.toClassName)(o, s),
|
|
458
450
|
"data-action": n,
|
|
459
451
|
"data-inline": d || null,
|
|
460
452
|
disabled: p,
|
|
461
453
|
append: a,
|
|
462
|
-
prepend:
|
|
454
|
+
prepend: S,
|
|
463
455
|
$inline: d,
|
|
464
456
|
$hasPrismaIcon: E,
|
|
465
457
|
$isIconOnly: I,
|
|
@@ -472,22 +464,24 @@
|
|
|
472
464
|
}), r().createElement(b, {
|
|
473
465
|
$appearance: i,
|
|
474
466
|
$error: u
|
|
475
|
-
}, f && r().createElement(
|
|
476
|
-
$
|
|
477
|
-
}, f),
|
|
467
|
+
}, f && r().createElement(y, {
|
|
468
|
+
$isStartIcon: !I
|
|
469
|
+
}, f), _ && r().createElement(h, {
|
|
478
470
|
"data-test": "label",
|
|
479
471
|
$isMenu: m
|
|
480
|
-
},
|
|
472
|
+
}, _), $, m && r().createElement(x, {
|
|
481
473
|
$disabled: p,
|
|
482
474
|
$primary: i === "primary"
|
|
483
|
-
}, r().createElement(C, null)), w && r().createElement(
|
|
475
|
+
}, r().createElement(C, null)), w && r().createElement(y, {
|
|
476
|
+
$isStartIcon: false
|
|
477
|
+
}, r().createElement(N, null))));
|
|
484
478
|
}
|
|
485
479
|
} ]);
|
|
486
480
|
return n;
|
|
487
481
|
}(n.Component);
|
|
488
482
|
G(Q, "propTypes", J);
|
|
489
483
|
G(Q, "defaultProps", K);
|
|
490
|
-
G(Q,
|
|
484
|
+
G(Q, s.legacyRefMode, true);
|
|
491
485
|
/* harmony default export */ const U = Q;
|
|
492
486
|
// CONCATENATED MODULE: ./src/Button/index.ts
|
|
493
487
|
module.exports = t;
|
package/ButtonGroup.js
CHANGED
|
@@ -68,23 +68,20 @@
|
|
|
68
68
|
var n = e.n(t);
|
|
69
69
|
// CONCATENATED MODULE: external "prop-types"
|
|
70
70
|
const o = require("prop-types");
|
|
71
|
-
var
|
|
71
|
+
var l = e.n(o);
|
|
72
72
|
// CONCATENATED MODULE: external "styled-components"
|
|
73
|
-
const
|
|
74
|
-
var
|
|
73
|
+
const i = require("styled-components");
|
|
74
|
+
var a = e.n(i);
|
|
75
75
|
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
76
76
|
const u = require("@splunk/react-ui/Box");
|
|
77
77
|
var p = e.n(u);
|
|
78
78
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
79
79
|
const c = require("@splunk/themes");
|
|
80
80
|
// CONCATENATED MODULE: ./src/ButtonGroup/ButtonGroupStyles.ts
|
|
81
|
-
var s =
|
|
81
|
+
var s = a()(p()).withConfig({
|
|
82
82
|
displayName: "ButtonGroupStyles__StyledBox",
|
|
83
83
|
componentId: "sc-14fs2xs-0"
|
|
84
|
-
})([ "position:relative;[data-inline] + &{margin-left:", ";}" ],
|
|
85
|
-
enterprise: c.variables.spacingHalf,
|
|
86
|
-
prisma: c.variables.spacingSmall
|
|
87
|
-
}));
|
|
84
|
+
})([ "position:relative;[data-inline] + &{margin-left:", ";}" ], c.variables.spacingSmall);
|
|
88
85
|
// CONCATENATED MODULE: ./src/ButtonGroup/ButtonGroup.tsx
|
|
89
86
|
function f() {
|
|
90
87
|
f = Object.assign || function(e) {
|
|
@@ -102,12 +99,12 @@
|
|
|
102
99
|
}
|
|
103
100
|
function d(e, r) {
|
|
104
101
|
if (e == null) return {};
|
|
105
|
-
var t =
|
|
102
|
+
var t = y(e, r);
|
|
106
103
|
var n, o;
|
|
107
104
|
if (Object.getOwnPropertySymbols) {
|
|
108
|
-
var
|
|
109
|
-
for (o = 0; o <
|
|
110
|
-
n =
|
|
105
|
+
var l = Object.getOwnPropertySymbols(e);
|
|
106
|
+
for (o = 0; o < l.length; o++) {
|
|
107
|
+
n = l[o];
|
|
111
108
|
if (r.indexOf(n) >= 0) continue;
|
|
112
109
|
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
113
110
|
t[n] = e[n];
|
|
@@ -115,28 +112,28 @@
|
|
|
115
112
|
}
|
|
116
113
|
return t;
|
|
117
114
|
}
|
|
118
|
-
function
|
|
115
|
+
function y(e, r) {
|
|
119
116
|
if (e == null) return {};
|
|
120
117
|
var t = {};
|
|
121
118
|
var n = Object.keys(e);
|
|
122
|
-
var o,
|
|
123
|
-
for (
|
|
124
|
-
o = n[
|
|
119
|
+
var o, l;
|
|
120
|
+
for (l = 0; l < n.length; l++) {
|
|
121
|
+
o = n[l];
|
|
125
122
|
if (r.indexOf(o) >= 0) continue;
|
|
126
123
|
t[o] = e[o];
|
|
127
124
|
}
|
|
128
125
|
return t;
|
|
129
126
|
}
|
|
130
|
-
var
|
|
131
|
-
children:
|
|
132
|
-
elementRef:
|
|
127
|
+
var v = {
|
|
128
|
+
children: l().node,
|
|
129
|
+
elementRef: l().oneOfType([ l().func, l().object ]),
|
|
133
130
|
/** @private */
|
|
134
|
-
flex:
|
|
131
|
+
flex: l().bool
|
|
135
132
|
};
|
|
136
133
|
function b(e) {
|
|
137
134
|
var r = e.children, o = d(e, [ "children" ]);
|
|
138
135
|
// @docs-props-type ButtonGroupPropsBase
|
|
139
|
-
var
|
|
136
|
+
var l = t.Children.toArray(r).filter(t.isValidElement).map((function(e, r, n) {
|
|
140
137
|
var o = n.length;
|
|
141
138
|
|
|
142
139
|
return (0, t.cloneElement)(e, {
|
|
@@ -152,9 +149,9 @@
|
|
|
152
149
|
flex: true,
|
|
153
150
|
"data-test": "button-group",
|
|
154
151
|
role: "menubar"
|
|
155
|
-
}, o),
|
|
152
|
+
}, o), l);
|
|
156
153
|
}
|
|
157
|
-
b.propTypes =
|
|
154
|
+
b.propTypes = v;
|
|
158
155
|
/* harmony default export */ const m = b;
|
|
159
156
|
// CONCATENATED MODULE: ./src/ButtonGroup/index.ts
|
|
160
157
|
module.exports = r;
|