@splunk/react-ui 4.16.3 → 4.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +13 -13
- package/Anchor.js +2 -2
- package/Animation.js +4 -4
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +101 -247
- package/ButtonGroup.js +4 -4
- package/ButtonSimple.js +6 -6
- package/CHANGELOG.md +60 -2
- package/Calendar.js +76 -275
- package/Card.js +75 -227
- package/CardLayout.js +2 -2
- package/Chip.js +40 -211
- package/Clickable.js +10 -10
- package/CloseButton.js +38 -206
- package/Code.js +28 -20
- package/CollapsiblePanel.js +74 -228
- package/Color.js +62 -319
- package/ColumnLayout.js +6 -6
- package/ComboBox.js +34 -32
- package/Concertina.js +40 -40
- package/ControlGroup.js +20 -20
- package/Date.js +22 -22
- package/DefinitionList.js +2 -2
- package/Divider.js +2 -2
- package/Dropdown.js +32 -32
- package/DualListbox.d.ts +2 -0
- package/DualListbox.js +1780 -0
- package/EventListener.js +4 -4
- package/File.js +85 -250
- package/FormRows.js +60 -215
- package/Heading.js +39 -27
- package/Image.js +73 -227
- package/JSONTree.js +18 -18
- package/Layer.js +30 -30
- package/Link.js +60 -28
- package/List.js +9 -9
- package/MIGRATION.md +28 -0
- package/Markdown.js +21 -21
- package/Menu.js +180 -371
- package/Message.js +141 -411
- package/MessageBar.js +170 -400
- package/Modal.js +31 -31
- package/ModalLayer.js +6 -6
- package/Monogram.js +4 -4
- package/Multiselect.js +2299 -2517
- package/Number.js +32 -32
- package/Paginator.js +94 -323
- package/Paragraph.js +2 -2
- package/Popover.js +125 -125
- package/Progress.js +15 -15
- package/RadioBar.js +23 -19
- package/RadioList.js +13 -12
- package/Resize.js +18 -18
- package/ResultsMenu.js +21 -21
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +33 -33
- package/ScrollContainerContext.js +13 -13
- package/Search.js +34 -32
- package/Select.js +226 -372
- package/SidePanel.js +12 -12
- package/Slider.js +28 -28
- package/SlidingPanels.js +29 -29
- package/SplitButton.js +59 -62
- package/StaticContent.js +4 -4
- package/StepBar.js +36 -239
- package/Switch.js +23 -23
- package/TabBar.js +47 -47
- package/TabLayout.js +30 -28
- package/Table.js +295 -589
- package/Text.js +111 -324
- package/TextArea.js +164 -368
- package/Tooltip.js +23 -23
- package/TransitionOpen.js +21 -21
- package/Typography.js +32 -28
- package/WaitSpinner.js +2 -2
- package/docker-compose.yml +19 -7
- package/package.json +12 -13
- package/stubs-splunkui.d.ts +4 -25
- package/types/src/Button/icons/CaretSmallDown.d.ts +2 -0
- package/types/src/Button/icons/External.d.ts +2 -0
- package/types/src/Code/Code.d.ts +6 -1
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +0 -1
- package/types/src/CollapsiblePanel/icons/ExpandPanel.d.ts +11 -0
- package/types/src/Date/Icon.d.ts +1 -1
- package/types/src/Dropdown/docs/examples/Submenu.d.ts +2 -0
- package/types/src/DualListbox/DualListbox.d.ts +87 -0
- package/types/src/DualListbox/DualListboxContext.d.ts +27 -0
- package/types/src/DualListbox/Label.d.ts +37 -0
- package/types/src/DualListbox/Listbox.d.ts +54 -0
- package/types/src/DualListbox/ListboxContext.d.ts +32 -0
- package/types/src/DualListbox/Option.d.ts +35 -0
- package/types/src/DualListbox/ScreenReaderWrapper.d.ts +4 -0
- package/types/src/DualListbox/ToolbarButton.d.ts +38 -0
- package/types/src/DualListbox/ToolbarContext.d.ts +21 -0
- package/types/src/DualListbox/docs/examples/Basic.d.ts +2 -0
- package/types/src/DualListbox/docs/examples/Controlled.d.ts +2 -0
- package/types/src/DualListbox/docs/examples/Fill.d.ts +2 -0
- package/types/src/DualListbox/index.d.ts +2 -0
- package/types/src/DualListbox/listboxUtils.d.ts +4 -0
- package/types/src/File/Icon.d.ts +1 -1
- package/types/src/File/IconCloud.d.ts +1 -1
- package/types/src/File/PaperClip.d.ts +1 -1
- package/types/src/File/Retry.d.ts +1 -1
- package/types/src/File/Trash.d.ts +1 -1
- package/types/src/File/docs/examples/Progress.d.ts +1 -15
- package/types/src/FormRows/icons/FormRowsPlusIcon.d.ts +2 -0
- package/types/src/Heading/Heading.d.ts +12 -4
- package/types/src/Heading/docs/examples/Variant.d.ts +2 -0
- package/types/src/Image/Image.d.ts +1 -1
- package/types/src/Image/icons/Cross.d.ts +2 -0
- package/types/src/Link/icons/External.d.ts +2 -0
- package/types/src/Menu/Divider.d.ts +1 -0
- package/types/src/Menu/Heading.d.ts +1 -0
- package/types/src/Menu/Item.d.ts +5 -2
- package/types/src/Menu/Menu.d.ts +3 -1
- package/types/src/Menu/icons/External.d.ts +2 -0
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Number/IncrementIcon.d.ts +1 -1
- package/types/src/RadioBar/RadioBar.d.ts +1 -1
- package/types/src/Search/Option.d.ts +9 -0
- package/types/src/Select/OptionBase.d.ts +9 -0
- package/types/src/Select/icons/CaretSmallDown.d.ts +2 -0
- package/types/src/Select/icons/Search.d.ts +2 -0
- package/types/src/SplitButton/SplitButton.d.ts +8 -3
- package/types/src/SplitButton/docs/examples/Block.d.ts +1 -0
- package/types/src/TabBar/Tab.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +0 -1
- package/types/src/Table/HeadInner.d.ts +2 -2
- package/types/src/Table/icons/ExpansionRow.d.ts +6 -0
- package/types/src/Table/icons/HeadExpandRows.d.ts +1 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -1
- package/types/src/Text/IconOutlinedView.d.ts +1 -1
- package/types/src/TextArea/TextArea.d.ts +11 -4
- package/types/src/TextArea/docs/examples/ClearContent.d.ts +2 -0
- package/types/src/Tooltip/InfoIcon.d.ts +1 -1
- package/types/src/Typography/Typography.d.ts +4 -7
- package/types/src/useRovingFocus/index.d.ts +2 -0
- package/types/src/useRovingFocus/useRovingFocus.d.ts +27 -0
- package/useForceUpdate.js +2 -2
- package/useKeyPress.js +2 -2
- package/usePrevious.js +2 -2
- package/useRovingFocus.d.ts +2 -0
- package/useRovingFocus.js +237 -0
- package/Dockerfile.enterprise.storybook +0 -7
- package/Dockerfile.prisma.storybook +0 -7
- package/Dockerfile.visual +0 -10
- package/types/src/File/docs/examples/CustomChildren.d.ts +0 -12
- package/types/src/File/docs/examples/prisma/Progress.d.ts +0 -1
- package/types/src/Select/matchUtils.d.ts +0 -12
- package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +0 -1
- package/types/src/Table/HeadExpandRowsIcon.d.ts +0 -1
- package/types/src/icons/Alert.d.ts +0 -2
- package/types/src/icons/AlertFilled.d.ts +0 -2
- package/types/src/icons/CaretDown.d.ts +0 -2
- package/types/src/icons/CaretRight.d.ts +0 -2
- package/types/src/icons/Check.d.ts +0 -2
- package/types/src/icons/ChevronDown.d.ts +0 -2
- package/types/src/icons/ChevronLeft.d.ts +0 -2
- package/types/src/icons/ChevronRight.d.ts +0 -2
- package/types/src/icons/CrossMark.d.ts +0 -2
- package/types/src/icons/External.d.ts +0 -2
- package/types/src/icons/InfoFilled.d.ts +0 -2
- package/types/src/icons/More.d.ts +0 -2
- package/types/src/icons/MoreVertical.d.ts +0 -2
- package/types/src/icons/Plus.d.ts +0 -2
- package/types/src/icons/SVG.d.ts +0 -4
- package/types/src/icons/Search.d.ts +0 -2
- package/types/src/icons/Sort.d.ts +0 -2
- package/types/src/icons/SortedDown.d.ts +0 -2
- package/types/src/icons/SortedUp.d.ts +0 -2
- package/types/src/icons/Success.d.ts +0 -2
- package/types/src/icons/SuccessFilled.d.ts +0 -2
- package/types/src/icons/ThemedIcon.d.ts +0 -29
- package/types/src/icons/WarningFilled.d.ts +0 -2
- package/types/src/icons/types.d.ts +0 -11
package/TabBar.js
CHANGED
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 11:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
|
@@ -128,21 +128,14 @@ function updateReactRef(ref, current) {
|
|
|
128
128
|
|
|
129
129
|
/***/ }),
|
|
130
130
|
|
|
131
|
-
/***/
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 14:
|
|
131
|
+
/***/ 12:
|
|
139
132
|
/***/ (function(module, exports) {
|
|
140
133
|
|
|
141
134
|
module.exports = require("@splunk/react-ui/Clickable");
|
|
142
135
|
|
|
143
136
|
/***/ }),
|
|
144
137
|
|
|
145
|
-
/***/
|
|
138
|
+
/***/ 14:
|
|
146
139
|
/***/ (function(module, exports) {
|
|
147
140
|
|
|
148
141
|
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
@@ -169,7 +162,7 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
169
162
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
170
163
|
|
|
171
164
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
172
|
-
var keyboard_ = __webpack_require__(
|
|
165
|
+
var keyboard_ = __webpack_require__(7);
|
|
173
166
|
|
|
174
167
|
// EXTERNAL MODULE: external "styled-components"
|
|
175
168
|
var external_styled_components_ = __webpack_require__(3);
|
|
@@ -197,23 +190,23 @@ var Styled = external_styled_components_default.a.div.withConfig({
|
|
|
197
190
|
},
|
|
198
191
|
vertical: {
|
|
199
192
|
enterprise: Object(external_styled_components_["css"])(["display:inline-block;&::before{border-right-width:1px;}"]),
|
|
200
|
-
prisma: Object(external_styled_components_["css"])(["
|
|
193
|
+
prisma: Object(external_styled_components_["css"])(["display:inline-block;&::before{border-right-width:1px;}"])
|
|
201
194
|
}
|
|
202
195
|
}));
|
|
203
196
|
|
|
204
197
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
205
|
-
var id_ = __webpack_require__(
|
|
198
|
+
var id_ = __webpack_require__(8);
|
|
206
199
|
|
|
207
200
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
208
|
-
var Popover_ = __webpack_require__(
|
|
201
|
+
var Popover_ = __webpack_require__(21);
|
|
209
202
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
210
203
|
|
|
211
204
|
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
212
|
-
var ScreenReaderContent_ = __webpack_require__(
|
|
205
|
+
var ScreenReaderContent_ = __webpack_require__(14);
|
|
213
206
|
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
214
207
|
|
|
215
208
|
// EXTERNAL MODULE: external "@splunk/react-ui/Clickable"
|
|
216
|
-
var Clickable_ = __webpack_require__(
|
|
209
|
+
var Clickable_ = __webpack_require__(12);
|
|
217
210
|
var Clickable_default = /*#__PURE__*/__webpack_require__.n(Clickable_);
|
|
218
211
|
|
|
219
212
|
// CONCATENATED MODULE: ./src/TabBar/TabStyles.ts
|
|
@@ -239,13 +232,9 @@ var StyledClickable = external_styled_components_default()(Clickable_default.a).
|
|
|
239
232
|
var $icon = _ref.$icon;
|
|
240
233
|
return $icon && Object(external_styled_components_["css"])(["text-align:center;"]);
|
|
241
234
|
}),
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
prisma: {
|
|
246
|
-
comfortable: '0 20px',
|
|
247
|
-
compact: '0 16px'
|
|
248
|
-
}
|
|
235
|
+
prisma: Object(external_styled_components_["css"])(["width:100%;right:1px;padding:", ";"], Object(themes_["pick"])({
|
|
236
|
+
comfortable: '0 20px',
|
|
237
|
+
compact: '0 16px'
|
|
249
238
|
}))
|
|
250
239
|
}
|
|
251
240
|
}), Object(themes_["pick"])({
|
|
@@ -264,7 +253,7 @@ var StyledClickable = external_styled_components_default()(Clickable_default.a).
|
|
|
264
253
|
var StyledUnderline = external_styled_components_default.a.div.withConfig({
|
|
265
254
|
displayName: "TabStyles__StyledUnderline",
|
|
266
255
|
componentId: "sc-1ry8mzj-1"
|
|
267
|
-
})(["position:absolute;", " ", ";[aria-selected='true'] >
|
|
256
|
+
})(["position:absolute;", " ", ";[aria-selected='true'] > &&{background-color:", ";", ";}", ":hover:not([disabled]) > &&{", ";}"], Object(themes_["pick"])({
|
|
268
257
|
enterprise: Object(external_styled_components_["css"])(["background:", ";"], themes_["variables"].borderLightColor)
|
|
269
258
|
}), Object(themes_["pickVariant"])('$layout', {
|
|
270
259
|
horizontal: Object(external_styled_components_["css"])(["height:0;box-sizing:border-box;width:", ";", " transition:height 0.2s;"], Object(themes_["pick"])({
|
|
@@ -278,11 +267,7 @@ var StyledUnderline = external_styled_components_default.a.div.withConfig({
|
|
|
278
267
|
})),
|
|
279
268
|
vertical: {
|
|
280
269
|
enterprise: Object(external_styled_components_["css"])(["width:0;height:calc(100% - 10px * 2);top:10px;right:-1px;transition:width 0.2s;"]),
|
|
281
|
-
|
|
282
|
-
prisma: Object(external_styled_components_["css"])(["height:0;box-sizing:border-box;width:", ";transition:height 0.2s;"], Object(themes_["pick"])({
|
|
283
|
-
comfortable: Object(external_styled_components_["css"])(["calc(100% - 20px * 2)"]),
|
|
284
|
-
compact: Object(external_styled_components_["css"])(["calc(100% - 16px * 2)"])
|
|
285
|
-
}))
|
|
270
|
+
prisma: Object(external_styled_components_["css"])(["width:1px;height:calc(100% - 10px * 2);top:10px;right:-1px;transition:width 0.2s;box-sizing:border-box;"])
|
|
286
271
|
}
|
|
287
272
|
}), Object(themes_["pick"])({
|
|
288
273
|
enterprise: themes_["variables"].accentColor,
|
|
@@ -297,8 +282,7 @@ var StyledUnderline = external_styled_components_default.a.div.withConfig({
|
|
|
297
282
|
},
|
|
298
283
|
vertical: {
|
|
299
284
|
enterprise: Object(external_styled_components_["css"])(["width:3px;"]),
|
|
300
|
-
|
|
301
|
-
prisma: Object(external_styled_components_["css"])(["height:1px;"])
|
|
285
|
+
prisma: Object(external_styled_components_["css"])(["width:1px;"])
|
|
302
286
|
}
|
|
303
287
|
}), StyledClickable, Object(themes_["pickVariant"])('$layout', {
|
|
304
288
|
horizontal: {
|
|
@@ -334,37 +318,43 @@ var StyledLabel = external_styled_components_default.a.div.withConfig({
|
|
|
334
318
|
var StyledCount = external_styled_components_default.a.div.withConfig({
|
|
335
319
|
displayName: "TabStyles__StyledCount",
|
|
336
320
|
componentId: "sc-1ry8mzj-4"
|
|
337
|
-
})(["", " display:inline-block;
|
|
321
|
+
})(["", " display:inline-block;border-radius:18px;color:", ";font-size:", ";line-height:10px;padding:4px 6px;margin-left:", ";", " &[disabled]{background:", ";color:", ";}"], themes_["mixins"].reset('inlne-block'), themes_["variables"].contentColorDefault, Object(themes_["pick"])({
|
|
338
322
|
enterprise: 'inherit',
|
|
339
323
|
prisma: '10px'
|
|
340
324
|
}), Object(themes_["pick"])({
|
|
341
325
|
enterprise: '0',
|
|
342
326
|
prisma: '8px'
|
|
343
327
|
}), Object(themes_["pick"])({
|
|
344
|
-
enterprise: Object(external_styled_components_["css"])(["&::before{content:'(';}&::after{content:')';}"])
|
|
328
|
+
enterprise: Object(external_styled_components_["css"])(["&::before{content:'(';}&::after{content:')';}"]),
|
|
329
|
+
prisma: Object(external_styled_components_["css"])(["background:", ";"], themes_["variables"].neutral100)
|
|
345
330
|
}), themes_["variables"].interactiveColorBackgroundDisabled, themes_["variables"].contentColorDisabled);
|
|
346
331
|
var StyledTooltipContent = external_styled_components_default.a.div.withConfig({
|
|
347
332
|
displayName: "TabStyles__StyledTooltipContent",
|
|
348
333
|
componentId: "sc-1ry8mzj-5"
|
|
349
334
|
})(["padding:8px;font-size:", ";"], themes_["variables"].fontSizeSmall);
|
|
350
335
|
|
|
351
|
-
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
352
|
-
var updateReactRef = __webpack_require__(12);
|
|
353
|
-
|
|
354
336
|
// CONCATENATED MODULE: ./src/TabBar/TabBarContext.tsx
|
|
355
337
|
|
|
356
338
|
var TabBarContext = /*#__PURE__*/Object(external_react_["createContext"])({});
|
|
357
339
|
TabBarContext.displayName = 'TabBar';
|
|
358
340
|
/* harmony default export */ var TabBar_TabBarContext = (TabBarContext);
|
|
341
|
+
// CONCATENATED MODULE: ./src/utils/getCountValue.ts
|
|
342
|
+
// A utility for max count
|
|
343
|
+
var maxCountValue = function maxCountValue(count, maxCount) {
|
|
344
|
+
if (count > maxCount) {
|
|
345
|
+
return "".concat(maxCount, "+");
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
return count;
|
|
349
|
+
};
|
|
350
|
+
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
351
|
+
var updateReactRef = __webpack_require__(11);
|
|
352
|
+
|
|
359
353
|
// CONCATENATED MODULE: ./src/TabBar/Tab.tsx
|
|
360
354
|
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
361
355
|
|
|
362
356
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
363
357
|
|
|
364
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
365
|
-
|
|
366
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
367
|
-
|
|
368
358
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
369
359
|
|
|
370
360
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -399,6 +389,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
399
389
|
|
|
400
390
|
|
|
401
391
|
|
|
392
|
+
|
|
402
393
|
var propTypes = {
|
|
403
394
|
/** @private. Is the tab active. */
|
|
404
395
|
active: external_prop_types_default.a.bool,
|
|
@@ -409,6 +400,9 @@ var propTypes = {
|
|
|
409
400
|
icon: external_prop_types_default.a.node,
|
|
410
401
|
id: external_prop_types_default.a.string,
|
|
411
402
|
label: external_prop_types_default.a.oneOfType([external_prop_types_default.a.string, external_prop_types_default.a.element]),
|
|
403
|
+
|
|
404
|
+
/** @private Maximum count number in tab label */
|
|
405
|
+
maxCount: external_prop_types_default.a.number,
|
|
412
406
|
tabId: external_prop_types_default.a.string,
|
|
413
407
|
|
|
414
408
|
/** @private. The internal key of the tab */
|
|
@@ -515,9 +509,10 @@ var Tab_Tab = /*#__PURE__*/function (_Component) {
|
|
|
515
509
|
icon = _this$props3.icon,
|
|
516
510
|
label = _this$props3.label,
|
|
517
511
|
tabId = _this$props3.tabId,
|
|
512
|
+
maxCount = _this$props3.maxCount,
|
|
518
513
|
to = _this$props3.to,
|
|
519
514
|
tooltip = _this$props3.tooltip,
|
|
520
|
-
otherProps = _objectWithoutProperties(_this$props3, ["active", "ariaControls", "count", "disabled", "icon", "label", "tabId", "to", "tooltip"]);
|
|
515
|
+
otherProps = _objectWithoutProperties(_this$props3, ["active", "ariaControls", "count", "disabled", "icon", "label", "tabId", "maxCount", "to", "tooltip"]);
|
|
521
516
|
|
|
522
517
|
var _this$state = this.state,
|
|
523
518
|
anchor = _this$state.anchor,
|
|
@@ -528,9 +523,7 @@ var Tab_Tab = /*#__PURE__*/function (_Component) {
|
|
|
528
523
|
iconSize = _this$context.iconSize,
|
|
529
524
|
layout = _this$context.layout,
|
|
530
525
|
widthContext = _this$context.width;
|
|
531
|
-
|
|
532
|
-
var style = _objectSpread({}, otherProps);
|
|
533
|
-
|
|
526
|
+
var style = otherProps.style;
|
|
534
527
|
var disabledValue = disabledContext || disabled;
|
|
535
528
|
var iconSizeValue = iconSize || 'inline';
|
|
536
529
|
var layoutValue = layout || 'horizontal';
|
|
@@ -569,7 +562,7 @@ var Tab_Tab = /*#__PURE__*/function (_Component) {
|
|
|
569
562
|
}, icon), label, (count === 0 || count) && /*#__PURE__*/external_react_default.a.createElement(StyledCount, {
|
|
570
563
|
"data-test": "count",
|
|
571
564
|
disabled: disabledValue
|
|
572
|
-
}, count)), /*#__PURE__*/external_react_default.a.createElement(StyledUnderline, {
|
|
565
|
+
}, maxCount ? maxCountValue(count, maxCount) : count)), /*#__PURE__*/external_react_default.a.createElement(StyledUnderline, {
|
|
573
566
|
$layout: layoutValue,
|
|
574
567
|
$withUnderline: appearance === 'navigation'
|
|
575
568
|
}), !disabled && tooltip && /*#__PURE__*/external_react_default.a.createElement(Popover_default.a, {
|
|
@@ -755,7 +748,7 @@ module.exports = require("react");
|
|
|
755
748
|
|
|
756
749
|
/***/ }),
|
|
757
750
|
|
|
758
|
-
/***/
|
|
751
|
+
/***/ 21:
|
|
759
752
|
/***/ (function(module, exports) {
|
|
760
753
|
|
|
761
754
|
module.exports = require("@splunk/react-ui/Popover");
|
|
@@ -808,11 +801,18 @@ function getPrevListItem(refs, currentIndex, prevIndex) {
|
|
|
808
801
|
|
|
809
802
|
/***/ }),
|
|
810
803
|
|
|
811
|
-
/***/
|
|
804
|
+
/***/ 7:
|
|
812
805
|
/***/ (function(module, exports) {
|
|
813
806
|
|
|
814
807
|
module.exports = require("@splunk/ui-utils/keyboard");
|
|
815
808
|
|
|
809
|
+
/***/ }),
|
|
810
|
+
|
|
811
|
+
/***/ 8:
|
|
812
|
+
/***/ (function(module, exports) {
|
|
813
|
+
|
|
814
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
815
|
+
|
|
816
816
|
/***/ })
|
|
817
817
|
|
|
818
818
|
/******/ });
|
package/TabLayout.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 207);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -104,13 +104,6 @@ module.exports = require("prop-types");
|
|
|
104
104
|
/***/ 10:
|
|
105
105
|
/***/ (function(module, exports) {
|
|
106
106
|
|
|
107
|
-
module.exports = require("lodash/keys");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 11:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
107
|
module.exports = require("lodash/has");
|
|
115
108
|
|
|
116
109
|
/***/ }),
|
|
@@ -122,14 +115,14 @@ module.exports = require("@splunk/react-ui/TabBar");
|
|
|
122
115
|
|
|
123
116
|
/***/ }),
|
|
124
117
|
|
|
125
|
-
/***/
|
|
118
|
+
/***/ 2:
|
|
126
119
|
/***/ (function(module, exports) {
|
|
127
120
|
|
|
128
|
-
module.exports = require("
|
|
121
|
+
module.exports = require("react");
|
|
129
122
|
|
|
130
123
|
/***/ }),
|
|
131
124
|
|
|
132
|
-
/***/
|
|
125
|
+
/***/ 207:
|
|
133
126
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
134
127
|
|
|
135
128
|
"use strict";
|
|
@@ -149,11 +142,11 @@ var external_prop_types_ = __webpack_require__(1);
|
|
|
149
142
|
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
150
143
|
|
|
151
144
|
// EXTERNAL MODULE: external "lodash/has"
|
|
152
|
-
var has_ = __webpack_require__(
|
|
145
|
+
var has_ = __webpack_require__(10);
|
|
153
146
|
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
154
147
|
|
|
155
148
|
// EXTERNAL MODULE: external "lodash/keys"
|
|
156
|
-
var keys_ = __webpack_require__(
|
|
149
|
+
var keys_ = __webpack_require__(9);
|
|
157
150
|
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
158
151
|
|
|
159
152
|
// EXTERNAL MODULE: external "lodash/omit"
|
|
@@ -161,7 +154,7 @@ var omit_ = __webpack_require__(5);
|
|
|
161
154
|
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
162
155
|
|
|
163
156
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
164
|
-
var id_ = __webpack_require__(
|
|
157
|
+
var id_ = __webpack_require__(8);
|
|
165
158
|
|
|
166
159
|
// EXTERNAL MODULE: external "@splunk/react-ui/TabBar"
|
|
167
160
|
var TabBar_ = __webpack_require__(120);
|
|
@@ -184,12 +177,12 @@ var StyledPanel = external_styled_components_default.a.div.withConfig({
|
|
|
184
177
|
var Styled = external_styled_components_default.a.div.withConfig({
|
|
185
178
|
displayName: "TabLayoutStyles__Styled",
|
|
186
179
|
componentId: "lf0quy-1"
|
|
187
|
-
})(["text-align:center;margin-top:", "
|
|
188
|
-
|
|
180
|
+
})(["text-align:center;margin-top:", ";", ""], themes_["variables"].spacingLarge, function (_ref) {
|
|
181
|
+
var $layout = _ref.$layout;
|
|
182
|
+
return $layout === 'vertical' && Object(external_styled_components_["css"])(["display:flex;& > [role='tablist']{flex:0 0 auto;}& > ", "{width:100%;}"],
|
|
189
183
|
/* sc-sel */
|
|
190
|
-
StyledPanel)
|
|
191
|
-
|
|
192
|
-
}));
|
|
184
|
+
StyledPanel);
|
|
185
|
+
});
|
|
193
186
|
|
|
194
187
|
// CONCATENATED MODULE: ./src/TabLayout/Panel.tsx
|
|
195
188
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
@@ -355,7 +348,9 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
355
348
|
value: function render() {
|
|
356
349
|
var _this2 = this;
|
|
357
350
|
|
|
358
|
-
var
|
|
351
|
+
var _this$props2 = this.props,
|
|
352
|
+
children = _this$props2.children,
|
|
353
|
+
layout = _this$props2.layout;
|
|
359
354
|
var activePanelId = this.isControlled() ? this.props.activePanelId : this.state.activePanelId;
|
|
360
355
|
var panel;
|
|
361
356
|
var tabs = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]).map(function (child) {
|
|
@@ -386,10 +381,10 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
386
381
|
if (false) {}
|
|
387
382
|
|
|
388
383
|
return /*#__PURE__*/external_react_default.a.createElement(Styled, TabLayout_extends({
|
|
389
|
-
"data-flex": this.props.layout === 'vertical' || undefined,
|
|
390
384
|
"data-test-active-panel-id": activePanelId,
|
|
391
385
|
"data-test": "tab-layout",
|
|
392
|
-
ref: this.props.elementRef
|
|
386
|
+
ref: this.props.elementRef,
|
|
387
|
+
$layout: layout
|
|
393
388
|
}, omit_default()(this.props, keys_default()(TabLayout.propTypes))), /*#__PURE__*/external_react_default.a.createElement(TabBar_default.a, {
|
|
394
389
|
autoActivate: this.props.autoActivate,
|
|
395
390
|
activeTabId: activePanelId,
|
|
@@ -419,24 +414,31 @@ _defineProperty(TabLayout_TabLayout, "Panel", TabLayout_Panel);
|
|
|
419
414
|
|
|
420
415
|
/***/ }),
|
|
421
416
|
|
|
422
|
-
/***/
|
|
417
|
+
/***/ 3:
|
|
423
418
|
/***/ (function(module, exports) {
|
|
424
419
|
|
|
425
|
-
module.exports = require("
|
|
420
|
+
module.exports = require("styled-components");
|
|
426
421
|
|
|
427
422
|
/***/ }),
|
|
428
423
|
|
|
429
|
-
/***/
|
|
424
|
+
/***/ 5:
|
|
430
425
|
/***/ (function(module, exports) {
|
|
431
426
|
|
|
432
|
-
module.exports = require("
|
|
427
|
+
module.exports = require("lodash/omit");
|
|
433
428
|
|
|
434
429
|
/***/ }),
|
|
435
430
|
|
|
436
|
-
/***/
|
|
431
|
+
/***/ 8:
|
|
437
432
|
/***/ (function(module, exports) {
|
|
438
433
|
|
|
439
|
-
module.exports = require("
|
|
434
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
435
|
+
|
|
436
|
+
/***/ }),
|
|
437
|
+
|
|
438
|
+
/***/ 9:
|
|
439
|
+
/***/ (function(module, exports) {
|
|
440
|
+
|
|
441
|
+
module.exports = require("lodash/keys");
|
|
440
442
|
|
|
441
443
|
/***/ })
|
|
442
444
|
|