@splunk/react-ui 4.20.0 → 4.21.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 +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -354
- package/Menu.js +489 -760
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +943 -1448
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/TabLayout.js
CHANGED
|
@@ -1,190 +1,103 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
10
|
+
/******/ __webpack_require__.n = (module) => {
|
|
11
|
+
/******/ var getter = module && module.__esModule ?
|
|
12
|
+
/******/ () => (module['default']) :
|
|
13
|
+
/******/ () => (module);
|
|
14
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
15
|
+
/******/ return getter;
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/define property getters */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ // define getter functions for harmony exports
|
|
22
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
23
|
+
/******/ for(var key in definition) {
|
|
24
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
25
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
26
|
+
/******/ }
|
|
27
|
+
/******/ }
|
|
28
|
+
/******/ };
|
|
29
|
+
/******/ })();
|
|
30
|
+
/******/
|
|
31
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
32
|
+
/******/ (() => {
|
|
33
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
34
|
+
/******/ })();
|
|
35
|
+
/******/
|
|
36
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
37
|
+
/******/ (() => {
|
|
38
|
+
/******/ // define __esModule on exports
|
|
39
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
40
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
41
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
42
|
+
/******/ }
|
|
43
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
18
44
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 210);
|
|
86
|
-
/******/ })
|
|
45
|
+
/******/ })();
|
|
46
|
+
/******/
|
|
87
47
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("prop-types");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 11:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("lodash/has");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 124:
|
|
112
|
-
/***/ (function(module, exports) {
|
|
113
|
-
|
|
114
|
-
module.exports = require("@splunk/react-ui/TabBar");
|
|
115
|
-
|
|
116
|
-
/***/ }),
|
|
117
|
-
|
|
118
|
-
/***/ 2:
|
|
119
|
-
/***/ (function(module, exports) {
|
|
120
|
-
|
|
121
|
-
module.exports = require("react");
|
|
122
|
-
|
|
123
|
-
/***/ }),
|
|
124
|
-
|
|
125
|
-
/***/ 210:
|
|
126
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
127
|
-
|
|
128
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
129
49
|
// ESM COMPAT FLAG
|
|
130
50
|
__webpack_require__.r(__webpack_exports__);
|
|
131
51
|
|
|
132
52
|
// EXPORTS
|
|
133
|
-
__webpack_require__.d(__webpack_exports__,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
var external_react_ = __webpack_require__(2);
|
|
138
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
139
|
-
|
|
140
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
141
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
142
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
143
|
-
|
|
144
|
-
// EXTERNAL MODULE: external "lodash/has"
|
|
145
|
-
var has_ = __webpack_require__(11);
|
|
146
|
-
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
147
|
-
|
|
148
|
-
// EXTERNAL MODULE: external "lodash/keys"
|
|
149
|
-
var keys_ = __webpack_require__(9);
|
|
150
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
151
|
-
|
|
152
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
153
|
-
var omit_ = __webpack_require__(5);
|
|
154
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
155
|
-
|
|
156
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
157
|
-
var id_ = __webpack_require__(8);
|
|
158
|
-
|
|
159
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/TabBar"
|
|
160
|
-
var TabBar_ = __webpack_require__(124);
|
|
161
|
-
var TabBar_default = /*#__PURE__*/__webpack_require__.n(TabBar_);
|
|
162
|
-
|
|
163
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
164
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
165
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
166
|
-
|
|
167
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
168
|
-
var themes_ = __webpack_require__(0);
|
|
169
|
-
|
|
170
|
-
// CONCATENATED MODULE: ./src/TabLayout/TabLayoutStyles.ts
|
|
171
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
Panel: () => (/* reexport */ TabLayout_Panel),
|
|
55
|
+
"default": () => (/* reexport */ TabLayout_TabLayout)
|
|
56
|
+
});
|
|
172
57
|
|
|
173
|
-
|
|
58
|
+
;// CONCATENATED MODULE: external "react"
|
|
59
|
+
const external_react_namespaceObject = require("react");
|
|
60
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
61
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
62
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
63
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
64
|
+
;// CONCATENATED MODULE: external "lodash/has"
|
|
65
|
+
const has_namespaceObject = require("lodash/has");
|
|
66
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_namespaceObject);
|
|
67
|
+
;// CONCATENATED MODULE: external "lodash/keys"
|
|
68
|
+
const keys_namespaceObject = require("lodash/keys");
|
|
69
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_namespaceObject);
|
|
70
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
71
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
72
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
73
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
74
|
+
const id_namespaceObject = require("@splunk/ui-utils/id");
|
|
75
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/TabBar"
|
|
76
|
+
const TabBar_namespaceObject = require("@splunk/react-ui/TabBar");
|
|
77
|
+
var TabBar_default = /*#__PURE__*/__webpack_require__.n(TabBar_namespaceObject);
|
|
78
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
79
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
80
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
81
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
82
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
83
|
+
;// CONCATENATED MODULE: ./src/TabLayout/TabLayoutStyles.ts
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
var StyledPanel = external_styled_components_default().div.withConfig({
|
|
174
87
|
displayName: "TabLayoutStyles__StyledPanel",
|
|
175
88
|
componentId: "lf0quy-0"
|
|
176
|
-
})(["", ""],
|
|
177
|
-
var Styled = external_styled_components_default.
|
|
89
|
+
})(["", ""], themes_namespaceObject.mixins.reset('block'));
|
|
90
|
+
var Styled = external_styled_components_default().div.withConfig({
|
|
178
91
|
displayName: "TabLayoutStyles__Styled",
|
|
179
92
|
componentId: "lf0quy-1"
|
|
180
|
-
})(["text-align:center;margin-top:", ";", ""],
|
|
93
|
+
})(["text-align:center;margin-top:", ";", ""], themes_namespaceObject.variables.spacingLarge, function (_ref) {
|
|
181
94
|
var $layout = _ref.$layout;
|
|
182
|
-
return $layout === 'vertical' &&
|
|
95
|
+
return $layout === 'vertical' && (0,external_styled_components_namespaceObject.css)(["display:flex;& > [role='tablist']{flex:0 0 auto;}& > ", "{width:100%;}"],
|
|
183
96
|
/* sc-sel */
|
|
184
97
|
StyledPanel);
|
|
185
98
|
});
|
|
186
99
|
|
|
187
|
-
|
|
100
|
+
;// CONCATENATED MODULE: ./src/TabLayout/Panel.tsx
|
|
188
101
|
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); }
|
|
189
102
|
|
|
190
103
|
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; }
|
|
@@ -196,14 +109,14 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
196
109
|
|
|
197
110
|
|
|
198
111
|
var propTypes = {
|
|
199
|
-
children: external_prop_types_default.
|
|
200
|
-
count: external_prop_types_default.
|
|
201
|
-
disabled: external_prop_types_default.
|
|
202
|
-
elementRef: external_prop_types_default.
|
|
203
|
-
icon: external_prop_types_default.
|
|
204
|
-
label: external_prop_types_default.
|
|
205
|
-
panelId: external_prop_types_default.
|
|
206
|
-
tooltip: external_prop_types_default.
|
|
112
|
+
children: (external_prop_types_default()).node,
|
|
113
|
+
count: (external_prop_types_default()).number,
|
|
114
|
+
disabled: (external_prop_types_default()).bool,
|
|
115
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
116
|
+
icon: (external_prop_types_default()).node,
|
|
117
|
+
label: external_prop_types_default().oneOfType([(external_prop_types_default()).string, (external_prop_types_default()).element]),
|
|
118
|
+
panelId: (external_prop_types_default()).string.isRequired,
|
|
119
|
+
tooltip: (external_prop_types_default()).node
|
|
207
120
|
};
|
|
208
121
|
|
|
209
122
|
function Panel(_ref) {
|
|
@@ -215,7 +128,7 @@ function Panel(_ref) {
|
|
|
215
128
|
otherProps = _objectWithoutProperties(_ref, ["children", "disabled", "elementRef", "panelId"]);
|
|
216
129
|
|
|
217
130
|
// @docs-props-type PanelPropsBase
|
|
218
|
-
return /*#__PURE__*/external_react_default.
|
|
131
|
+
return /*#__PURE__*/external_react_default().createElement(StyledPanel, _extends({
|
|
219
132
|
"data-test-panel-id": panelId,
|
|
220
133
|
"data-test": "panel",
|
|
221
134
|
ref: elementRef,
|
|
@@ -224,8 +137,8 @@ function Panel(_ref) {
|
|
|
224
137
|
}
|
|
225
138
|
|
|
226
139
|
Panel.propTypes = propTypes;
|
|
227
|
-
/* harmony default export */
|
|
228
|
-
|
|
140
|
+
/* harmony default export */ const TabLayout_Panel = (Panel);
|
|
141
|
+
;// CONCATENATED MODULE: ./src/TabLayout/TabLayout.tsx
|
|
229
142
|
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); }
|
|
230
143
|
|
|
231
144
|
function TabLayout_extends() { TabLayout_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 TabLayout_extends.apply(this, arguments); }
|
|
@@ -262,17 +175,17 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
262
175
|
|
|
263
176
|
|
|
264
177
|
var TabLayout_propTypes = {
|
|
265
|
-
autoActivate: external_prop_types_default.
|
|
266
|
-
activePanelId: external_prop_types_default.
|
|
267
|
-
appearance: external_prop_types_default.
|
|
268
|
-
children: external_prop_types_default.
|
|
269
|
-
count: external_prop_types_default.
|
|
270
|
-
defaultActivePanelId: external_prop_types_default.
|
|
271
|
-
elementRef: external_prop_types_default.
|
|
272
|
-
iconSize: external_prop_types_default.
|
|
273
|
-
layout: external_prop_types_default.
|
|
274
|
-
onChange: external_prop_types_default.
|
|
275
|
-
tabWidth: external_prop_types_default.
|
|
178
|
+
autoActivate: (external_prop_types_default()).bool,
|
|
179
|
+
activePanelId: (external_prop_types_default()).string,
|
|
180
|
+
appearance: external_prop_types_default().oneOf(['navigation', 'context']),
|
|
181
|
+
children: (external_prop_types_default()).node,
|
|
182
|
+
count: (external_prop_types_default()).number,
|
|
183
|
+
defaultActivePanelId: (external_prop_types_default()).string,
|
|
184
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
185
|
+
iconSize: external_prop_types_default().oneOf(['inline', 'small', 'large']),
|
|
186
|
+
layout: external_prop_types_default().oneOf(['horizontal', 'vertical']),
|
|
187
|
+
onChange: (external_prop_types_default()).func,
|
|
188
|
+
tabWidth: (external_prop_types_default()).number
|
|
276
189
|
};
|
|
277
190
|
var defaultProps = {
|
|
278
191
|
appearance: 'navigation',
|
|
@@ -284,7 +197,7 @@ var defaultProps = {
|
|
|
284
197
|
* The `TabLayout` is a group of managed `Panels`. Only one panel can be open at a time.
|
|
285
198
|
* `TabLayout` supports both the controlled and uncontrolled patterns.
|
|
286
199
|
*/
|
|
287
|
-
var
|
|
200
|
+
var TabLayout = /*#__PURE__*/function (_Component) {
|
|
288
201
|
_inherits(TabLayout, _Component);
|
|
289
202
|
|
|
290
203
|
var _super = _createSuper(TabLayout);
|
|
@@ -318,7 +231,7 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
318
231
|
});
|
|
319
232
|
|
|
320
233
|
_this.controlledExternally = has_default()(props, 'activePanelId');
|
|
321
|
-
_this.guid =
|
|
234
|
+
_this.guid = (0,id_namespaceObject.createDOMID)();
|
|
322
235
|
|
|
323
236
|
if (!_this.isControlled()) {
|
|
324
237
|
_this.state = {
|
|
@@ -353,19 +266,19 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
353
266
|
layout = _this$props2.layout;
|
|
354
267
|
var activePanelId = this.isControlled() ? this.props.activePanelId : this.state.activePanelId;
|
|
355
268
|
var panel;
|
|
356
|
-
var tabs =
|
|
269
|
+
var tabs = external_react_namespaceObject.Children.toArray(children).filter(external_react_namespaceObject.isValidElement).map(function (child) {
|
|
357
270
|
var props = child.props;
|
|
358
271
|
var id = "".concat(_this2.guid, "-").concat(props.panelId);
|
|
359
272
|
var tabId = "".concat(_this2.guid, "-").concat(props.panelId, "-tab");
|
|
360
273
|
|
|
361
274
|
if (props.panelId === activePanelId) {
|
|
362
|
-
panel = /*#__PURE__*/
|
|
275
|
+
panel = /*#__PURE__*/(0,external_react_namespaceObject.cloneElement)(child, {
|
|
363
276
|
'aria-labelledby': tabId,
|
|
364
277
|
id: id
|
|
365
278
|
});
|
|
366
279
|
}
|
|
367
280
|
|
|
368
|
-
return /*#__PURE__*/external_react_default.
|
|
281
|
+
return /*#__PURE__*/external_react_default().createElement((TabBar_default()).Tab, {
|
|
369
282
|
count: props.count,
|
|
370
283
|
icon: props.icon,
|
|
371
284
|
key: props.panelId,
|
|
@@ -380,12 +293,12 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
380
293
|
|
|
381
294
|
if (false) {}
|
|
382
295
|
|
|
383
|
-
return /*#__PURE__*/external_react_default.
|
|
296
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, TabLayout_extends({
|
|
384
297
|
"data-test-active-panel-id": activePanelId,
|
|
385
298
|
"data-test": "tab-layout",
|
|
386
299
|
ref: this.props.elementRef,
|
|
387
300
|
$layout: layout
|
|
388
|
-
}, omit_default()(this.props, keys_default()(TabLayout.propTypes))), /*#__PURE__*/external_react_default.
|
|
301
|
+
}, omit_default()(this.props, keys_default()(TabLayout.propTypes))), /*#__PURE__*/external_react_default().createElement((TabBar_default()), {
|
|
389
302
|
autoActivate: this.props.autoActivate,
|
|
390
303
|
activeTabId: activePanelId,
|
|
391
304
|
appearance: this.props.appearance,
|
|
@@ -398,48 +311,19 @@ var TabLayout_TabLayout = /*#__PURE__*/function (_Component) {
|
|
|
398
311
|
}]);
|
|
399
312
|
|
|
400
313
|
return TabLayout;
|
|
401
|
-
}(
|
|
402
|
-
|
|
403
|
-
_defineProperty(TabLayout_TabLayout, "propTypes", TabLayout_propTypes);
|
|
404
|
-
|
|
405
|
-
_defineProperty(TabLayout_TabLayout, "defaultProps", defaultProps);
|
|
406
|
-
|
|
407
|
-
_defineProperty(TabLayout_TabLayout, "Panel", TabLayout_Panel);
|
|
408
|
-
|
|
409
|
-
/* harmony default export */ var src_TabLayout_TabLayout = (TabLayout_TabLayout);
|
|
410
|
-
|
|
411
|
-
// CONCATENATED MODULE: ./src/TabLayout/index.ts
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
/***/ }),
|
|
416
|
-
|
|
417
|
-
/***/ 3:
|
|
418
|
-
/***/ (function(module, exports) {
|
|
419
|
-
|
|
420
|
-
module.exports = require("styled-components");
|
|
421
|
-
|
|
422
|
-
/***/ }),
|
|
423
|
-
|
|
424
|
-
/***/ 5:
|
|
425
|
-
/***/ (function(module, exports) {
|
|
426
|
-
|
|
427
|
-
module.exports = require("lodash/omit");
|
|
428
|
-
|
|
429
|
-
/***/ }),
|
|
314
|
+
}(external_react_namespaceObject.Component);
|
|
430
315
|
|
|
431
|
-
|
|
432
|
-
/***/ (function(module, exports) {
|
|
316
|
+
_defineProperty(TabLayout, "propTypes", TabLayout_propTypes);
|
|
433
317
|
|
|
434
|
-
|
|
318
|
+
_defineProperty(TabLayout, "defaultProps", defaultProps);
|
|
435
319
|
|
|
436
|
-
|
|
320
|
+
_defineProperty(TabLayout, "Panel", TabLayout_Panel);
|
|
437
321
|
|
|
438
|
-
|
|
439
|
-
/***/ (function(module, exports) {
|
|
322
|
+
/* harmony default export */ const TabLayout_TabLayout = (TabLayout);
|
|
440
323
|
|
|
441
|
-
|
|
324
|
+
;// CONCATENATED MODULE: ./src/TabLayout/index.ts
|
|
442
325
|
|
|
443
|
-
/***/ })
|
|
444
326
|
|
|
445
|
-
|
|
327
|
+
module.exports = __webpack_exports__;
|
|
328
|
+
/******/ })()
|
|
329
|
+
;
|