@splunk/react-ui 4.37.0 → 4.39.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 +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +208 -219
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +50 -1
- package/Calendar.js +353 -414
- package/Card.js +183 -243
- package/CardLayout.js +86 -83
- package/Chip.js +104 -122
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +1107 -980
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +267 -305
- package/Concertina.js +406 -454
- package/ControlGroup.js +165 -194
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +92 -38
- package/Markdown.js +288 -347
- package/Menu.js +512 -530
- package/Message.js +173 -196
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +1600 -1923
- package/Number.js +159 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +448 -441
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +130 -94
- package/Scroll.js +209 -244
- package/Search.js +375 -384
- package/Select.js +1076 -1354
- package/SidePanel.js +122 -142
- package/Slider.js +192 -222
- package/SlidingPanels.js +238 -270
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +211 -236
- package/TabBar.js +222 -258
- package/TabLayout.js +114 -139
- package/Table.js +2017 -2180
- package/Text.js +401 -512
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +60 -68
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +17 -17
- package/types/src/Button/Button.d.ts +20 -6
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +5 -2
- package/types/src/Color/Palette.d.ts +6 -2
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -3
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Link/Link.d.ts +3 -4
- package/types/src/Menu/Item.d.ts +24 -8
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +16 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +2 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +0 -1
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -3
- package/types/src/Slider/docs/examples/Error.d.ts +2 -0
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +6 -4
- package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/useForceUpdate.js +30 -32
- package/useKeyPress.js +1 -1
- package/types/src/Button/docs/examples/Selected.d.ts +0 -2
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
- /package/types/src/Message/docs/examples/{prisma/Title.d.ts → Title.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/TabLayout.js
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
Panel: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
Panel: () => /* reexport */ S,
|
|
65
|
+
default: () => /* reexport */ V
|
|
66
66
|
});
|
|
67
67
|
// CONCATENATED MODULE: external "react"
|
|
68
68
|
const n = require("react");
|
|
@@ -77,75 +77,65 @@
|
|
|
77
77
|
const c = require("lodash/keys");
|
|
78
78
|
var u = e.n(c);
|
|
79
79
|
// CONCATENATED MODULE: external "lodash/omit"
|
|
80
|
-
const
|
|
81
|
-
var
|
|
80
|
+
const s = require("lodash/omit");
|
|
81
|
+
var p = e.n(s);
|
|
82
82
|
// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
83
|
-
const
|
|
83
|
+
const f = require("@splunk/ui-utils/id");
|
|
84
84
|
// CONCATENATED MODULE: external "@splunk/react-ui/TabBar"
|
|
85
85
|
const d = require("@splunk/react-ui/TabBar");
|
|
86
86
|
var y = e.n(d);
|
|
87
87
|
// CONCATENATED MODULE: external "styled-components"
|
|
88
|
-
const
|
|
89
|
-
var
|
|
88
|
+
const b = require("styled-components");
|
|
89
|
+
var v = e.n(b);
|
|
90
90
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
91
91
|
const h = require("@splunk/themes");
|
|
92
92
|
// CONCATENATED MODULE: ./src/TabLayout/TabLayoutStyles.ts
|
|
93
|
-
var m =
|
|
93
|
+
var m = v().div.withConfig({
|
|
94
94
|
displayName: "TabLayoutStyles__StyledPanel",
|
|
95
95
|
componentId: "lf0quy-0"
|
|
96
96
|
})([ "", "" ], h.mixins.reset("block"));
|
|
97
|
-
var g =
|
|
97
|
+
var g = v().div.withConfig({
|
|
98
98
|
displayName: "TabLayoutStyles__Styled",
|
|
99
99
|
componentId: "lf0quy-1"
|
|
100
100
|
})([ "text-align:center;margin-top:", ";", "" ], h.variables.spacingLarge, (function(e) {
|
|
101
101
|
var t = e.$layout;
|
|
102
|
-
return t === "vertical" && (0,
|
|
103
|
-
/* sc-sel */
|
|
104
|
-
m);
|
|
102
|
+
return t === "vertical" && (0, b.css)([ "display:flex;& > [role='tablist']{flex:0 0 auto;}& > ", "{width:100%;}" ], /* sc-sel */ m);
|
|
105
103
|
}));
|
|
106
104
|
// CONCATENATED MODULE: ./src/TabLayout/Panel.tsx
|
|
107
105
|
function O() {
|
|
108
|
-
O = Object.assign
|
|
106
|
+
return O = Object.assign ? Object.assign.bind() : function(e) {
|
|
109
107
|
for (var t = 1; t < arguments.length; t++) {
|
|
110
108
|
var n = arguments[t];
|
|
111
109
|
for (var r in n) {
|
|
112
|
-
|
|
113
|
-
e[r] = n[r];
|
|
114
|
-
}
|
|
110
|
+
({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
115
111
|
}
|
|
116
112
|
}
|
|
117
113
|
return e;
|
|
118
|
-
};
|
|
119
|
-
return O.apply(this, arguments);
|
|
114
|
+
}, O.apply(null, arguments);
|
|
120
115
|
}
|
|
121
116
|
function P(e, t) {
|
|
122
|
-
if (
|
|
123
|
-
var n =
|
|
124
|
-
var r, o;
|
|
117
|
+
if (null == e) return {};
|
|
118
|
+
var n, r, o = j(e, t);
|
|
125
119
|
if (Object.getOwnPropertySymbols) {
|
|
126
120
|
var a = Object.getOwnPropertySymbols(e);
|
|
127
|
-
for (
|
|
128
|
-
|
|
129
|
-
if (t.indexOf(r) >= 0) continue;
|
|
130
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
|
|
131
|
-
n[r] = e[r];
|
|
121
|
+
for (r = 0; r < a.length; r++) {
|
|
122
|
+
n = a[r], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (o[n] = e[n]);
|
|
132
123
|
}
|
|
133
124
|
}
|
|
134
|
-
return
|
|
125
|
+
return o;
|
|
135
126
|
}
|
|
136
|
-
function
|
|
137
|
-
if (
|
|
127
|
+
function j(e, t) {
|
|
128
|
+
if (null == e) return {};
|
|
138
129
|
var n = {};
|
|
139
|
-
var r
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
n[o] = e[o];
|
|
130
|
+
for (var r in e) {
|
|
131
|
+
if ({}.hasOwnProperty.call(e, r)) {
|
|
132
|
+
if (t.includes(r)) continue;
|
|
133
|
+
n[r] = e[r];
|
|
134
|
+
}
|
|
145
135
|
}
|
|
146
136
|
return n;
|
|
147
137
|
}
|
|
148
|
-
var
|
|
138
|
+
var w = {
|
|
149
139
|
children: a().node,
|
|
150
140
|
count: a().number,
|
|
151
141
|
disabled: a().bool,
|
|
@@ -155,7 +145,7 @@
|
|
|
155
145
|
panelId: a().string.isRequired,
|
|
156
146
|
tooltip: a().node
|
|
157
147
|
};
|
|
158
|
-
function
|
|
148
|
+
function I(e) {
|
|
159
149
|
var t = e.children, n = e.disabled, o = n === void 0 ? false : n, a = e.elementRef, i = e.panelId, l = P(e, [ "children", "disabled", "elementRef", "panelId" ]);
|
|
160
150
|
// @docs-props-type PanelPropsBase
|
|
161
151
|
|
|
@@ -164,133 +154,118 @@
|
|
|
164
154
|
"data-test": "panel",
|
|
165
155
|
ref: a,
|
|
166
156
|
role: "tabpanel"
|
|
167
|
-
},
|
|
157
|
+
}, p()(l, [ "icon", "label", "tooltip" ])), t);
|
|
168
158
|
}
|
|
169
|
-
|
|
170
|
-
/* harmony default export */ const
|
|
159
|
+
I.propTypes = w;
|
|
160
|
+
/* harmony default export */ const S = I;
|
|
171
161
|
// CONCATENATED MODULE: ./src/TabLayout/TabLayout.tsx
|
|
172
162
|
function T(e) {
|
|
173
163
|
"@babel/helpers - typeof";
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
T = function e(t) {
|
|
180
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
return T(e);
|
|
164
|
+
return T = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
165
|
+
return typeof e;
|
|
166
|
+
} : function(e) {
|
|
167
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
168
|
+
}, T(e);
|
|
184
169
|
}
|
|
185
170
|
function _() {
|
|
186
|
-
_ = Object.assign
|
|
171
|
+
return _ = Object.assign ? Object.assign.bind() : function(e) {
|
|
187
172
|
for (var t = 1; t < arguments.length; t++) {
|
|
188
173
|
var n = arguments[t];
|
|
189
174
|
for (var r in n) {
|
|
190
|
-
|
|
191
|
-
e[r] = n[r];
|
|
192
|
-
}
|
|
175
|
+
({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
193
176
|
}
|
|
194
177
|
}
|
|
195
178
|
return e;
|
|
196
|
-
};
|
|
197
|
-
return _.apply(this, arguments);
|
|
179
|
+
}, _.apply(null, arguments);
|
|
198
180
|
}
|
|
199
181
|
function C(e, t) {
|
|
200
|
-
if (!(e instanceof t))
|
|
201
|
-
throw new TypeError("Cannot call a class as a function");
|
|
202
|
-
}
|
|
182
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
203
183
|
}
|
|
204
|
-
function
|
|
184
|
+
function E(e, t) {
|
|
205
185
|
for (var n = 0; n < t.length; n++) {
|
|
206
186
|
var r = t[n];
|
|
207
|
-
r.enumerable = r.enumerable ||
|
|
208
|
-
r.
|
|
209
|
-
if ("value" in r) r.writable = true;
|
|
210
|
-
Object.defineProperty(e, r.key, r);
|
|
187
|
+
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0),
|
|
188
|
+
Object.defineProperty(e, L(r.key), r);
|
|
211
189
|
}
|
|
212
190
|
}
|
|
213
|
-
function
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
191
|
+
function q(e, t, n) {
|
|
192
|
+
return t && E(e.prototype, t), n && E(e, n), Object.defineProperty(e, "prototype", {
|
|
193
|
+
writable: !1
|
|
194
|
+
}), e;
|
|
217
195
|
}
|
|
218
|
-
function
|
|
219
|
-
if (typeof t !== "
|
|
220
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
221
|
-
}
|
|
196
|
+
function k(e, t) {
|
|
197
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
222
198
|
e.prototype = Object.create(t && t.prototype, {
|
|
223
199
|
constructor: {
|
|
224
200
|
value: e,
|
|
225
|
-
writable:
|
|
226
|
-
configurable:
|
|
201
|
+
writable: !0,
|
|
202
|
+
configurable: !0
|
|
227
203
|
}
|
|
228
|
-
})
|
|
229
|
-
|
|
204
|
+
}), Object.defineProperty(e, "prototype", {
|
|
205
|
+
writable: !1
|
|
206
|
+
}), t && x(e, t);
|
|
230
207
|
}
|
|
231
|
-
function
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
return R(e, t);
|
|
208
|
+
function x(e, t) {
|
|
209
|
+
return x = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
210
|
+
return e.__proto__ = t, e;
|
|
211
|
+
}, x(e, t);
|
|
237
212
|
}
|
|
238
|
-
function
|
|
213
|
+
function R(e) {
|
|
239
214
|
var t = D();
|
|
240
|
-
return function
|
|
241
|
-
var r = M(e)
|
|
215
|
+
return function() {
|
|
216
|
+
var n, r = M(e);
|
|
242
217
|
if (t) {
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
} else
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
return z(this, o);
|
|
218
|
+
var o = M(this).constructor;
|
|
219
|
+
n = Reflect.construct(r, arguments, o);
|
|
220
|
+
} else n = r.apply(this, arguments);
|
|
221
|
+
return z(this, n);
|
|
249
222
|
};
|
|
250
223
|
}
|
|
251
224
|
function z(e, t) {
|
|
252
|
-
if (t && (T(t)
|
|
253
|
-
|
|
254
|
-
}
|
|
225
|
+
if (t && ("object" == T(t) || "function" == typeof t)) return t;
|
|
226
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
255
227
|
return A(e);
|
|
256
228
|
}
|
|
257
229
|
function A(e) {
|
|
258
|
-
if (
|
|
259
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
260
|
-
}
|
|
230
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
261
231
|
return e;
|
|
262
232
|
}
|
|
263
233
|
function D() {
|
|
264
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
265
|
-
if (Reflect.construct.sham) return false;
|
|
266
|
-
if (typeof Proxy === "function") return true;
|
|
267
234
|
try {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
return
|
|
272
|
-
}
|
|
235
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
236
|
+
} catch (e) {}
|
|
237
|
+
return (D = function t() {
|
|
238
|
+
return !!e;
|
|
239
|
+
})();
|
|
273
240
|
}
|
|
274
241
|
function M(e) {
|
|
275
|
-
M = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
276
|
-
return
|
|
277
|
-
};
|
|
278
|
-
return M(e);
|
|
242
|
+
return M = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
243
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
244
|
+
}, M(e);
|
|
279
245
|
}
|
|
280
|
-
function
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
246
|
+
function B(e, t, n) {
|
|
247
|
+
return (t = L(t)) in e ? Object.defineProperty(e, t, {
|
|
248
|
+
value: n,
|
|
249
|
+
enumerable: !0,
|
|
250
|
+
configurable: !0,
|
|
251
|
+
writable: !0
|
|
252
|
+
}) : e[t] = n, e;
|
|
253
|
+
}
|
|
254
|
+
function L(e) {
|
|
255
|
+
var t = N(e, "string");
|
|
256
|
+
return "symbol" == T(t) ? t : t + "";
|
|
257
|
+
}
|
|
258
|
+
function N(e, t) {
|
|
259
|
+
if ("object" != T(e) || !e) return e;
|
|
260
|
+
var n = e[Symbol.toPrimitive];
|
|
261
|
+
if (void 0 !== n) {
|
|
262
|
+
var r = n.call(e, t || "default");
|
|
263
|
+
if ("object" != T(r)) return r;
|
|
264
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
290
265
|
}
|
|
291
|
-
return e;
|
|
266
|
+
return ("string" === t ? String : Number)(e);
|
|
292
267
|
}
|
|
293
|
-
var W = {
|
|
268
|
+
/** @public */ var W = {
|
|
294
269
|
autoActivate: a().bool,
|
|
295
270
|
activePanelId: a().string,
|
|
296
271
|
appearance: a().oneOf([ "navigation", "context" ]),
|
|
@@ -303,7 +278,7 @@
|
|
|
303
278
|
onChange: a().func,
|
|
304
279
|
tabWidth: a().number
|
|
305
280
|
};
|
|
306
|
-
var
|
|
281
|
+
var $ = {
|
|
307
282
|
appearance: "navigation",
|
|
308
283
|
iconSize: "inline",
|
|
309
284
|
layout: "horizontal"
|
|
@@ -311,17 +286,17 @@
|
|
|
311
286
|
/**
|
|
312
287
|
* The `TabLayout` is a group of managed `Panels`. Only one panel can be open at a time.
|
|
313
288
|
* `TabLayout` supports both the controlled and uncontrolled patterns.
|
|
314
|
-
*/ var
|
|
315
|
-
|
|
316
|
-
var t =
|
|
289
|
+
*/ var U = function(e) {
|
|
290
|
+
k(o, e);
|
|
291
|
+
var t = R(o);
|
|
317
292
|
// @docs-props-type TabLayoutPropsBase
|
|
318
293
|
function o(e) {
|
|
319
294
|
var n;
|
|
320
295
|
C(this, o);
|
|
321
296
|
n = t.call(this, e);
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
297
|
+
B(A(n), "controlledExternally", void 0);
|
|
298
|
+
B(A(n), "guid", void 0);
|
|
299
|
+
B(A(n), "handleChange", (function(e, t) {
|
|
325
300
|
var r, o;
|
|
326
301
|
var a = t.selectedTabId;
|
|
327
302
|
if (!n.isControlled()) {
|
|
@@ -334,7 +309,7 @@
|
|
|
334
309
|
});
|
|
335
310
|
}));
|
|
336
311
|
n.controlledExternally = l()(e, "activePanelId");
|
|
337
|
-
n.guid = (0,
|
|
312
|
+
n.guid = (0, f.createDOMID)();
|
|
338
313
|
if (!n.isControlled()) {
|
|
339
314
|
n.state = {
|
|
340
315
|
activePanelId: e.defaultActivePanelId
|
|
@@ -343,7 +318,7 @@
|
|
|
343
318
|
if (false) {}
|
|
344
319
|
return n;
|
|
345
320
|
}
|
|
346
|
-
|
|
321
|
+
q(o, [ {
|
|
347
322
|
key: "componentDidUpdate",
|
|
348
323
|
value: function e(t) {
|
|
349
324
|
if (false) {}
|
|
@@ -360,13 +335,13 @@
|
|
|
360
335
|
var t = this;
|
|
361
336
|
var a = this.props, i = a.children, l = a.layout;
|
|
362
337
|
var c = this.isControlled() ? this.props.activePanelId : this.state.activePanelId;
|
|
363
|
-
var
|
|
364
|
-
var
|
|
338
|
+
var s;
|
|
339
|
+
var f = n.Children.toArray(i).filter(n.isValidElement).map((function(e) {
|
|
365
340
|
var o = e.props;
|
|
366
341
|
var a = "".concat(t.guid, "-").concat(o.panelId);
|
|
367
342
|
var i = "".concat(t.guid, "-").concat(o.panelId, "-tab");
|
|
368
343
|
if (o.panelId === c) {
|
|
369
|
-
|
|
344
|
+
s = (0, n.cloneElement)(e, {
|
|
370
345
|
"aria-labelledby": i,
|
|
371
346
|
id: a
|
|
372
347
|
});
|
|
@@ -391,7 +366,7 @@
|
|
|
391
366
|
"data-test": "tab-layout",
|
|
392
367
|
ref: this.props.elementRef,
|
|
393
368
|
$layout: l
|
|
394
|
-
},
|
|
369
|
+
}, p()(this.props, u()(o.propTypes))), r().createElement(y(), {
|
|
395
370
|
autoActivate: this.props.autoActivate,
|
|
396
371
|
activeTabId: c,
|
|
397
372
|
appearance: this.props.appearance,
|
|
@@ -399,15 +374,15 @@
|
|
|
399
374
|
layout: this.props.layout,
|
|
400
375
|
onChange: this.handleChange,
|
|
401
376
|
tabWidth: this.props.tabWidth
|
|
402
|
-
},
|
|
377
|
+
}, f), s);
|
|
403
378
|
}
|
|
404
379
|
} ]);
|
|
405
380
|
return o;
|
|
406
381
|
}(n.Component);
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
/* harmony default export */ const
|
|
382
|
+
B(U, "propTypes", W);
|
|
383
|
+
B(U, "defaultProps", $);
|
|
384
|
+
B(U, "Panel", S);
|
|
385
|
+
/* harmony default export */ const V = U;
|
|
411
386
|
// CONCATENATED MODULE: ./src/TabLayout/index.ts
|
|
412
387
|
module.exports = t;
|
|
413
388
|
/******/})();
|