@splunk/react-ui 4.20.0 → 4.21.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 +425 -441
- package/Anchor.js +147 -193
- package/Animation.js +142 -166
- package/AnimationToggle.js +197 -253
- package/Box.js +145 -194
- package/Breadcrumbs.js +288 -298
- package/Button.js +488 -613
- package/ButtonGroup.js +160 -212
- package/ButtonSimple.js +543 -562
- package/CHANGELOG.md +26 -0
- package/Calendar.js +1107 -1195
- package/Card.js +771 -746
- package/CardLayout.js +205 -223
- package/Chip.js +509 -612
- package/Clickable.js +416 -472
- package/CloseButton.js +165 -250
- package/Code.js +1808 -2172
- package/Code.js.LICENSE.txt +8 -0
- package/CollapsiblePanel.js +586 -675
- package/Color.js +1066 -1297
- package/ColumnLayout.js +402 -465
- package/ComboBox.js +892 -969
- package/Concertina.js +998 -963
- package/ControlGroup.js +687 -718
- package/Date.js +567 -697
- package/DefinitionList.js +308 -310
- package/Divider.js +149 -194
- package/Dropdown.js +459 -558
- package/DualListbox.js +1480 -1735
- package/EventListener.js +94 -165
- package/File.js +1051 -1173
- package/FormRows.js +885 -880
- package/Heading.js +216 -263
- package/Image.js +446 -558
- package/JSONTree.js +690 -699
- package/Layer.js +442 -582
- package/Link.js +336 -361
- package/List.js +213 -237
- package/Markdown.js +510 -612
- package/Menu.js +1109 -1331
- package/Message.js +474 -629
- package/MessageBar.js +387 -561
- package/Modal.js +810 -798
- package/ModalLayer.js +326 -343
- package/Monogram.js +308 -368
- package/Multiselect.js +3558 -3998
- package/Number.js +729 -843
- package/Paginator.js +510 -615
- package/Paragraph.js +145 -188
- package/Popover.js +1470 -1693
- package/Progress.js +301 -362
- package/RadioBar.js +610 -651
- package/RadioList.js +483 -544
- package/Resize.js +530 -623
- package/ResultsMenu.js +494 -597
- package/ScreenReaderContent.js +142 -187
- package/Scroll.js +595 -598
- package/ScrollContainerContext.js +197 -278
- package/Search.js +745 -817
- package/Select.js +2441 -2746
- package/SidePanel.js +390 -392
- package/Slider.js +668 -825
- package/SlidingPanels.js +639 -645
- package/SplitButton.js +464 -499
- package/StaticContent.js +161 -217
- package/StepBar.js +386 -466
- package/Switch.js +710 -764
- package/TabBar.js +724 -815
- package/TabLayout.js +406 -438
- package/Table.js +4842 -5121
- package/Text.js +1169 -1351
- package/TextArea.js +1097 -1307
- package/Tooltip.js +624 -721
- package/TransitionOpen.js +489 -546
- package/Typography.js +176 -229
- package/WaitSpinner.js +230 -298
- 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/JSONTree/JSONTreeContext.d.ts +7 -0
- package/types/src/JSONTree/TreeNode.d.ts +5 -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 +112 -146
- package/useKeyPress.js +74 -128
- package/usePrevious.js +65 -129
- package/useRovingFocus.js +122 -218
- 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/SplitButton.js
CHANGED
|
@@ -1,509 +1,474 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/******/
|
|
4
|
-
/******/
|
|
5
|
-
/******/
|
|
6
|
-
/******/
|
|
7
|
-
|
|
8
|
-
/******/
|
|
9
|
-
/******/
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/
|
|
38
|
-
/******/
|
|
39
|
-
/******/
|
|
40
|
-
/******/
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
/******/
|
|
44
|
-
/******/
|
|
45
|
-
/******/
|
|
46
|
-
/******/
|
|
47
|
-
/******/
|
|
48
|
-
/******/
|
|
49
|
-
/******/
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/******/
|
|
53
|
-
/******/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/******/
|
|
57
|
-
/******/
|
|
58
|
-
/******/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
var
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Menu"
|
|
160
|
-
var Menu_ = __webpack_require__(13);
|
|
161
|
-
var Menu_default = /*#__PURE__*/__webpack_require__.n(Menu_);
|
|
162
|
-
|
|
163
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
164
|
-
var i18n_ = __webpack_require__(4);
|
|
165
|
-
|
|
166
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
167
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
168
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
169
|
-
|
|
170
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Button"
|
|
171
|
-
var Button_ = __webpack_require__(17);
|
|
172
|
-
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_);
|
|
173
|
-
|
|
174
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Box"
|
|
175
|
-
var Box_ = __webpack_require__(6);
|
|
176
|
-
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
177
|
-
|
|
178
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
179
|
-
var themes_ = __webpack_require__(0);
|
|
180
|
-
|
|
181
|
-
// CONCATENATED MODULE: ./src/SplitButton/SplitButtonStyles.ts
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
var StyledButton = external_styled_components_default()(Button_default.a).withConfig({
|
|
187
|
-
displayName: "SplitButtonStyles__StyledButton",
|
|
188
|
-
componentId: "sc-9igsyh-0"
|
|
189
|
-
})(["", ""], Object(themes_["pick"])({
|
|
190
|
-
prisma: function prisma(_ref) {
|
|
191
|
-
var appearance = _ref.appearance;
|
|
192
|
-
return appearance === 'default' && Object(external_styled_components_["css"])(["&:first-child{border-right:1px solid ", ";}"], themes_["variables"].interactiveColorBorder);
|
|
193
|
-
}
|
|
194
|
-
}));
|
|
195
|
-
var StyledSeparator = external_styled_components_default()(Box_default.a).withConfig({
|
|
196
|
-
displayName: "SplitButtonStyles__StyledSeparator",
|
|
197
|
-
componentId: "sc-9igsyh-1"
|
|
198
|
-
})(["width:", ";height:", ";background-color:", ";"], Object(themes_["pick"])({
|
|
199
|
-
prisma: Object(themes_["pickVariant"])('$appearance', {
|
|
200
|
-
primary: '2px',
|
|
201
|
-
destructive: '2px'
|
|
202
|
-
}),
|
|
203
|
-
enterprise: '1px'
|
|
204
|
-
}), themes_["variables"].inputHeight, Object(themes_["pickVariant"])('$appearance', {
|
|
205
|
-
primary: {
|
|
206
|
-
enterprise: themes_["variables"].white,
|
|
207
|
-
prisma: {
|
|
208
|
-
light: themes_["variables"].white,
|
|
209
|
-
dark: themes_["variables"].black
|
|
1
|
+
/******/ (() => {
|
|
2
|
+
// webpackBootstrap
|
|
3
|
+
/******/ "use strict";
|
|
4
|
+
/******/ // The require scope
|
|
5
|
+
/******/ var e = {};
|
|
6
|
+
/******/
|
|
7
|
+
/************************************************************************/
|
|
8
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
9
|
+
/******/ (() => {
|
|
10
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
11
|
+
/******/ e.n = t => {
|
|
12
|
+
/******/ var r = t && t.__esModule ?
|
|
13
|
+
/******/ () => t["default"]
|
|
14
|
+
/******/ : () => t
|
|
15
|
+
/******/;
|
|
16
|
+
e.d(r, {
|
|
17
|
+
a: r
|
|
18
|
+
});
|
|
19
|
+
/******/ return r;
|
|
20
|
+
/******/ };
|
|
21
|
+
/******/ })();
|
|
22
|
+
/******/
|
|
23
|
+
/******/ /* webpack/runtime/define property getters */
|
|
24
|
+
/******/ (() => {
|
|
25
|
+
/******/ // define getter functions for harmony exports
|
|
26
|
+
/******/ e.d = (t, r) => {
|
|
27
|
+
/******/ for (var n in r) {
|
|
28
|
+
/******/ if (e.o(r, n) && !e.o(t, n)) {
|
|
29
|
+
/******/ Object.defineProperty(t, n, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: r[n]
|
|
32
|
+
});
|
|
33
|
+
/******/ }
|
|
34
|
+
/******/ }
|
|
35
|
+
/******/ };
|
|
36
|
+
/******/ })();
|
|
37
|
+
/******/
|
|
38
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
39
|
+
/******/ (() => {
|
|
40
|
+
/******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
|
|
41
|
+
/******/;
|
|
42
|
+
})();
|
|
43
|
+
/******/
|
|
44
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
45
|
+
/******/ (() => {
|
|
46
|
+
/******/ // define __esModule on exports
|
|
47
|
+
/******/ e.r = e => {
|
|
48
|
+
/******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
|
|
49
|
+
/******/ Object.defineProperty(e, Symbol.toStringTag, {
|
|
50
|
+
value: "Module"
|
|
51
|
+
});
|
|
52
|
+
/******/ }
|
|
53
|
+
/******/ Object.defineProperty(e, "__esModule", {
|
|
54
|
+
value: true
|
|
55
|
+
});
|
|
56
|
+
/******/ };
|
|
57
|
+
/******/ })();
|
|
58
|
+
/******/
|
|
59
|
+
/************************************************************************/ var t = {};
|
|
60
|
+
// ESM COMPAT FLAG
|
|
61
|
+
e.r(t);
|
|
62
|
+
// EXPORTS
|
|
63
|
+
e.d(t, {
|
|
64
|
+
Item: () => /* reexport */ F,
|
|
65
|
+
default: () => /* reexport */ U
|
|
66
|
+
});
|
|
67
|
+
// CONCATENATED MODULE: external "react"
|
|
68
|
+
const r = require("react");
|
|
69
|
+
var n = e.n(r);
|
|
70
|
+
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
+
const i = require("prop-types");
|
|
72
|
+
var a = e.n(i);
|
|
73
|
+
// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronDown"
|
|
74
|
+
const o = require("@splunk/react-icons/enterprise/ChevronDown");
|
|
75
|
+
var l = e.n(o);
|
|
76
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
77
|
+
const c = require("@splunk/react-ui/Dropdown");
|
|
78
|
+
var u = e.n(c);
|
|
79
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Menu"
|
|
80
|
+
const s = require("@splunk/react-ui/Menu");
|
|
81
|
+
var p = e.n(s);
|
|
82
|
+
// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
83
|
+
const f = require("@splunk/ui-utils/i18n");
|
|
84
|
+
// CONCATENATED MODULE: external "styled-components"
|
|
85
|
+
const d = require("styled-components");
|
|
86
|
+
var v = e.n(d);
|
|
87
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
88
|
+
const b = require("@splunk/react-ui/Button");
|
|
89
|
+
var y = e.n(b);
|
|
90
|
+
// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
91
|
+
const h = require("@splunk/react-ui/Box");
|
|
92
|
+
var m = e.n(h);
|
|
93
|
+
// CONCATENATED MODULE: external "@splunk/themes"
|
|
94
|
+
const g = require("@splunk/themes");
|
|
95
|
+
// CONCATENATED MODULE: ./src/SplitButton/SplitButtonStyles.ts
|
|
96
|
+
var O = v()(y()).withConfig({
|
|
97
|
+
displayName: "SplitButtonStyles__StyledButton",
|
|
98
|
+
componentId: "sc-9igsyh-0"
|
|
99
|
+
})([ "", "" ], (0, g.pick)({
|
|
100
|
+
prisma: function e(t) {
|
|
101
|
+
var r = t.appearance;
|
|
102
|
+
return r === "default" && (0, d.css)([ "&:first-child{border-right:1px solid ", ";}" ], g.variables.interactiveColorBorder);
|
|
103
|
+
}
|
|
104
|
+
}));
|
|
105
|
+
var k = v()(m()).withConfig({
|
|
106
|
+
displayName: "SplitButtonStyles__StyledSeparator",
|
|
107
|
+
componentId: "sc-9igsyh-1"
|
|
108
|
+
})([ "width:", ";height:", ";background-color:", ";" ], (0, g.pick)({
|
|
109
|
+
prisma: (0, g.pickVariant)("$appearance", {
|
|
110
|
+
primary: "2px",
|
|
111
|
+
destructive: "2px"
|
|
112
|
+
}),
|
|
113
|
+
enterprise: "1px"
|
|
114
|
+
}), g.variables.inputHeight, (0, g.pickVariant)("$appearance", {
|
|
115
|
+
primary: {
|
|
116
|
+
enterprise: g.variables.white,
|
|
117
|
+
prisma: {
|
|
118
|
+
light: g.variables.white,
|
|
119
|
+
dark: g.variables.black
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
destructive: {
|
|
123
|
+
enterprise: {
|
|
124
|
+
light: g.variables.white,
|
|
125
|
+
dark: g.variables.black
|
|
126
|
+
},
|
|
127
|
+
prisma: {
|
|
128
|
+
light: g.variables.white,
|
|
129
|
+
dark: g.variables.black
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}));
|
|
133
|
+
var w = v()(m()).withConfig({
|
|
134
|
+
displayName: "SplitButtonStyles__StyledBox",
|
|
135
|
+
componentId: "sc-9igsyh-2"
|
|
136
|
+
})([ "", " [data-inline] + &{margin-left:", ";}" ], (function(e) {
|
|
137
|
+
var t = e.$inline;
|
|
138
|
+
return !t && (0, d.css)([ "width:100%;" ]);
|
|
139
|
+
}), (0, g.pick)({
|
|
140
|
+
enterprise: g.variables.spacingHalf,
|
|
141
|
+
prisma: g.variables.spacingSmall
|
|
142
|
+
}));
|
|
143
|
+
// CONCATENATED MODULE: external "lodash/omit"
|
|
144
|
+
const S = require("lodash/omit");
|
|
145
|
+
var j = e.n(S);
|
|
146
|
+
// CONCATENATED MODULE: ./src/SplitButton/Item.tsx
|
|
147
|
+
function _(e) {
|
|
148
|
+
"@babel/helpers - typeof";
|
|
149
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
150
|
+
_ = function e(t) {
|
|
151
|
+
return typeof t;
|
|
152
|
+
};
|
|
153
|
+
} else {
|
|
154
|
+
_ = function e(t) {
|
|
155
|
+
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
return _(e);
|
|
210
159
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
160
|
+
function C() {
|
|
161
|
+
C = Object.assign || function(e) {
|
|
162
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
163
|
+
var r = arguments[t];
|
|
164
|
+
for (var n in r) {
|
|
165
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
166
|
+
e[n] = r[n];
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return e;
|
|
171
|
+
};
|
|
172
|
+
return C.apply(this, arguments);
|
|
220
173
|
}
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
var
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
var omit_ = __webpack_require__(5);
|
|
236
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
237
|
-
|
|
238
|
-
// CONCATENATED MODULE: ./src/SplitButton/Item.tsx
|
|
239
|
-
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); }
|
|
240
|
-
|
|
241
|
-
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); }
|
|
242
|
-
|
|
243
|
-
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; }
|
|
244
|
-
|
|
245
|
-
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; }
|
|
246
|
-
|
|
247
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
248
|
-
|
|
249
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
250
|
-
|
|
251
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
252
|
-
|
|
253
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
254
|
-
|
|
255
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
256
|
-
|
|
257
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
258
|
-
|
|
259
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
260
|
-
|
|
261
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
262
|
-
|
|
263
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
264
|
-
|
|
265
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
266
|
-
|
|
267
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
var propTypes = {
|
|
275
|
-
appearance: external_prop_types_default.a.oneOf(['default', 'primary', 'destructive']),
|
|
276
|
-
children: external_prop_types_default.a.node,
|
|
277
|
-
disabled: external_prop_types_default.a.bool,
|
|
278
|
-
isMain: external_prop_types_default.a.bool,
|
|
279
|
-
onClick: external_prop_types_default.a.func
|
|
280
|
-
};
|
|
281
|
-
var defaultProps = {
|
|
282
|
-
appearance: 'default'
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
/**
|
|
286
|
-
* An item within a `SplitButton`. This inherits from
|
|
287
|
-
* [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
|
|
288
|
-
* so any elements passed to it must also be pure.
|
|
289
|
-
*/
|
|
290
|
-
var Item_Item = /*#__PURE__*/function (_PureComponent) {
|
|
291
|
-
_inherits(Item, _PureComponent);
|
|
292
|
-
|
|
293
|
-
var _super = _createSuper(Item);
|
|
294
|
-
|
|
295
|
-
function Item() {
|
|
296
|
-
var _this;
|
|
297
|
-
|
|
298
|
-
_classCallCheck(this, Item);
|
|
299
|
-
|
|
300
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
301
|
-
args[_key] = arguments[_key];
|
|
174
|
+
function P(e, t) {
|
|
175
|
+
if (e == null) return {};
|
|
176
|
+
var r = E(e, t);
|
|
177
|
+
var n, i;
|
|
178
|
+
if (Object.getOwnPropertySymbols) {
|
|
179
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
180
|
+
for (i = 0; i < a.length; i++) {
|
|
181
|
+
n = a[i];
|
|
182
|
+
if (t.indexOf(n) >= 0) continue;
|
|
183
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
184
|
+
r[n] = e[n];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return r;
|
|
302
188
|
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
189
|
+
function E(e, t) {
|
|
190
|
+
if (e == null) return {};
|
|
191
|
+
var r = {};
|
|
192
|
+
var n = Object.keys(e);
|
|
193
|
+
var i, a;
|
|
194
|
+
for (a = 0; a < n.length; a++) {
|
|
195
|
+
i = n[a];
|
|
196
|
+
if (t.indexOf(i) >= 0) continue;
|
|
197
|
+
r[i] = e[i];
|
|
198
|
+
}
|
|
199
|
+
return r;
|
|
200
|
+
}
|
|
201
|
+
function x(e, t) {
|
|
202
|
+
if (!(e instanceof t)) {
|
|
203
|
+
throw new TypeError("Cannot call a class as a function");
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function I(e, t) {
|
|
207
|
+
for (var r = 0; r < t.length; r++) {
|
|
208
|
+
var n = t[r];
|
|
209
|
+
n.enumerable = n.enumerable || false;
|
|
210
|
+
n.configurable = true;
|
|
211
|
+
if ("value" in n) n.writable = true;
|
|
212
|
+
Object.defineProperty(e, n.key, n);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
function q(e, t, r) {
|
|
216
|
+
if (t) I(e.prototype, t);
|
|
217
|
+
if (r) I(e, r);
|
|
218
|
+
return e;
|
|
219
|
+
}
|
|
220
|
+
function R(e, t) {
|
|
221
|
+
if (typeof t !== "function" && t !== null) {
|
|
222
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
223
|
+
}
|
|
224
|
+
e.prototype = Object.create(t && t.prototype, {
|
|
225
|
+
constructor: {
|
|
226
|
+
value: e,
|
|
227
|
+
writable: true,
|
|
228
|
+
configurable: true
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
if (t) M(e, t);
|
|
232
|
+
}
|
|
233
|
+
function M(e, t) {
|
|
234
|
+
M = Object.setPrototypeOf || function e(t, r) {
|
|
235
|
+
t.__proto__ = r;
|
|
236
|
+
return t;
|
|
237
|
+
};
|
|
238
|
+
return M(e, t);
|
|
327
239
|
}
|
|
240
|
+
function B(e) {
|
|
241
|
+
var t = V();
|
|
242
|
+
return function r() {
|
|
243
|
+
var n = $(e), i;
|
|
244
|
+
if (t) {
|
|
245
|
+
var a = $(this).constructor;
|
|
246
|
+
i = Reflect.construct(n, arguments, a);
|
|
247
|
+
} else {
|
|
248
|
+
i = n.apply(this, arguments);
|
|
249
|
+
}
|
|
250
|
+
return T(this, i);
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
function T(e, t) {
|
|
254
|
+
if (t && (_(t) === "object" || typeof t === "function")) {
|
|
255
|
+
return t;
|
|
256
|
+
}
|
|
257
|
+
return N(e);
|
|
258
|
+
}
|
|
259
|
+
function N(e) {
|
|
260
|
+
if (e === void 0) {
|
|
261
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
262
|
+
}
|
|
263
|
+
return e;
|
|
264
|
+
}
|
|
265
|
+
function V() {
|
|
266
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
267
|
+
if (Reflect.construct.sham) return false;
|
|
268
|
+
if (typeof Proxy === "function") return true;
|
|
269
|
+
try {
|
|
270
|
+
Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
|
|
271
|
+
return true;
|
|
272
|
+
} catch (e) {
|
|
273
|
+
return false;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
function $(e) {
|
|
277
|
+
$ = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
|
|
278
|
+
return t.__proto__ || Object.getPrototypeOf(t);
|
|
279
|
+
};
|
|
280
|
+
return $(e);
|
|
281
|
+
}
|
|
282
|
+
function D(e, t, r) {
|
|
283
|
+
if (t in e) {
|
|
284
|
+
Object.defineProperty(e, t, {
|
|
285
|
+
value: r,
|
|
286
|
+
enumerable: true,
|
|
287
|
+
configurable: true,
|
|
288
|
+
writable: true
|
|
289
|
+
});
|
|
290
|
+
} else {
|
|
291
|
+
e[t] = r;
|
|
292
|
+
}
|
|
293
|
+
return e;
|
|
294
|
+
}
|
|
295
|
+
var A = {
|
|
296
|
+
appearance: a().oneOf([ "default", "primary", "destructive" ]),
|
|
297
|
+
children: a().node,
|
|
298
|
+
disabled: a().bool,
|
|
299
|
+
isMain: a().bool,
|
|
300
|
+
onClick: a().func
|
|
301
|
+
};
|
|
302
|
+
var H = {
|
|
303
|
+
appearance: "default"
|
|
304
|
+
};
|
|
328
305
|
/**
|
|
306
|
+
* An item within a `SplitButton`. This inherits from
|
|
307
|
+
* [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
|
|
308
|
+
* so any elements passed to it must also be pure.
|
|
309
|
+
*/ var z = function(e) {
|
|
310
|
+
R(r, e);
|
|
311
|
+
var t = B(r);
|
|
312
|
+
function r() {
|
|
313
|
+
var e;
|
|
314
|
+
x(this, r);
|
|
315
|
+
for (var n = arguments.length, i = new Array(n), a = 0; a < n; a++) {
|
|
316
|
+
i[a] = arguments[a];
|
|
317
|
+
}
|
|
318
|
+
e = t.call.apply(t, [ this ].concat(i));
|
|
319
|
+
D(N(e), "item", null);
|
|
320
|
+
D(N(e), "handleClick", (function(t) {
|
|
321
|
+
var r = e.props, n = r.disabled, i = r.onClick;
|
|
322
|
+
if (!n) {
|
|
323
|
+
i === null || i === void 0 ? void 0 : i(t);
|
|
324
|
+
}
|
|
325
|
+
}));
|
|
326
|
+
return e;
|
|
327
|
+
}
|
|
328
|
+
q(r, [ {
|
|
329
|
+
key: "scrollIntoViewIfNeeded",
|
|
330
|
+
value: function e() {
|
|
331
|
+
var t;
|
|
332
|
+
(t = this.item) === null || t === void 0 ? void 0 : t.scrollIntoViewIfNeeded();
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
329
335
|
* Place focus on the item.
|
|
330
|
-
*/
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
*/ }, {
|
|
337
|
+
key: "focus",
|
|
338
|
+
value: function e() {
|
|
339
|
+
var t;
|
|
340
|
+
(t = this.item) === null || t === void 0 ? void 0 : t.focus();
|
|
341
|
+
}
|
|
342
|
+
}, {
|
|
343
|
+
key: "render",
|
|
344
|
+
value: function e() {
|
|
345
|
+
var t = this;
|
|
346
|
+
var r = this.props, i = r.disabled, a = r.isMain, o = r.children, l = r.appearance, c = P(r, [ "disabled", "isMain", "children", "appearance" ]);
|
|
347
|
+
if (a) {
|
|
348
|
+
|
|
349
|
+
return n().createElement(O, C({
|
|
350
|
+
onClick: this.handleClick,
|
|
351
|
+
disabled: i,
|
|
352
|
+
append: true,
|
|
353
|
+
appearance: l
|
|
354
|
+
}, c), o);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
return n().createElement(p().Item, C({
|
|
358
|
+
ref: function e(r) {
|
|
359
|
+
t.item = r;
|
|
360
|
+
},
|
|
361
|
+
onClick: this.handleClick,
|
|
362
|
+
disabled: i
|
|
363
|
+
}, j()(c, [ "role" ])), o);
|
|
364
|
+
}
|
|
365
|
+
} ]);
|
|
366
|
+
return r;
|
|
367
|
+
}(r.PureComponent);
|
|
368
|
+
D(z, "propTypes", A);
|
|
369
|
+
D(z, "defaultProps", H);
|
|
370
|
+
/* harmony default export */ const F = z;
|
|
371
|
+
// CONCATENATED MODULE: ./src/SplitButton/SplitButton.tsx
|
|
372
|
+
function G() {
|
|
373
|
+
G = Object.assign || function(e) {
|
|
374
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
375
|
+
var r = arguments[t];
|
|
376
|
+
for (var n in r) {
|
|
377
|
+
if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
378
|
+
e[n] = r[n];
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return e;
|
|
383
|
+
};
|
|
384
|
+
return G.apply(this, arguments);
|
|
338
385
|
}
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
return
|
|
353
|
-
onClick: this.handleClick,
|
|
354
|
-
disabled: disabled,
|
|
355
|
-
append: true,
|
|
356
|
-
appearance: appearance
|
|
357
|
-
}, otherProps), children);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
return /*#__PURE__*/external_react_default.a.createElement(Menu_default.a.Item, _extends({
|
|
361
|
-
ref: function ref(c) {
|
|
362
|
-
_this2.item = c;
|
|
363
|
-
},
|
|
364
|
-
onClick: this.handleClick,
|
|
365
|
-
disabled: disabled
|
|
366
|
-
}, omit_default()(otherProps, ['role'])), children);
|
|
386
|
+
function J(e, t) {
|
|
387
|
+
if (e == null) return {};
|
|
388
|
+
var r = K(e, t);
|
|
389
|
+
var n, i;
|
|
390
|
+
if (Object.getOwnPropertySymbols) {
|
|
391
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
392
|
+
for (i = 0; i < a.length; i++) {
|
|
393
|
+
n = a[i];
|
|
394
|
+
if (t.indexOf(n) >= 0) continue;
|
|
395
|
+
if (!Object.prototype.propertyIsEnumerable.call(e, n)) continue;
|
|
396
|
+
r[n] = e[n];
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
return r;
|
|
367
400
|
}
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
function SplitButton_extends() { SplitButton_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 SplitButton_extends.apply(this, arguments); }
|
|
380
|
-
|
|
381
|
-
function SplitButton_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = SplitButton_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; }
|
|
382
|
-
|
|
383
|
-
function SplitButton_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; }
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
var SplitButton_propTypes = {
|
|
394
|
-
appearance: external_prop_types_default.a.oneOf(['default', 'primary', 'destructive']),
|
|
395
|
-
children: external_prop_types_default.a.node,
|
|
396
|
-
disabled: external_prop_types_default.a.bool,
|
|
397
|
-
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
398
|
-
onClick: external_prop_types_default.a.func,
|
|
399
|
-
inline: external_prop_types_default.a.bool
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
function SplitButton(_ref) {
|
|
403
|
-
var _ref$appearance = _ref.appearance,
|
|
404
|
-
appearance = _ref$appearance === void 0 ? 'default' : _ref$appearance,
|
|
405
|
-
children = _ref.children,
|
|
406
|
-
disabled = _ref.disabled,
|
|
407
|
-
elementRef = _ref.elementRef,
|
|
408
|
-
_ref$inline = _ref.inline,
|
|
409
|
-
inline = _ref$inline === void 0 ? true : _ref$inline,
|
|
410
|
-
onClick = _ref.onClick,
|
|
411
|
-
otherProps = SplitButton_objectWithoutProperties(_ref, ["appearance", "children", "disabled", "elementRef", "inline", "onClick"]);
|
|
412
|
-
|
|
413
|
-
var filteredChildren = external_react_["Children"].toArray(children).filter(external_react_["isValidElement"]);
|
|
414
|
-
var indexOfMain = 0;
|
|
415
|
-
var numDisabledItems = 0;
|
|
416
|
-
filteredChildren.forEach(function (item, index) {
|
|
417
|
-
var _item$props = item.props,
|
|
418
|
-
itemDisabled = _item$props.disabled,
|
|
419
|
-
itemIsMain = _item$props.isMain;
|
|
420
|
-
|
|
421
|
-
if (itemIsMain) {
|
|
422
|
-
indexOfMain = index;
|
|
401
|
+
function K(e, t) {
|
|
402
|
+
if (e == null) return {};
|
|
403
|
+
var r = {};
|
|
404
|
+
var n = Object.keys(e);
|
|
405
|
+
var i, a;
|
|
406
|
+
for (a = 0; a < n.length; a++) {
|
|
407
|
+
i = n[a];
|
|
408
|
+
if (t.indexOf(i) >= 0) continue;
|
|
409
|
+
r[i] = e[i];
|
|
410
|
+
}
|
|
411
|
+
return r;
|
|
423
412
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
413
|
+
var L = {
|
|
414
|
+
appearance: a().oneOf([ "default", "primary", "destructive" ]),
|
|
415
|
+
children: a().node,
|
|
416
|
+
disabled: a().bool,
|
|
417
|
+
elementRef: a().oneOfType([ a().func, a().object ]),
|
|
418
|
+
onClick: a().func,
|
|
419
|
+
inline: a().bool
|
|
420
|
+
};
|
|
421
|
+
function Q(e) {
|
|
422
|
+
var t = e.appearance, i = t === void 0 ? "default" : t, a = e.children, o = e.disabled, c = e.elementRef, s = e.inline, d = s === void 0 ? true : s, v = e.onClick, b = J(e, [ "appearance", "children", "disabled", "elementRef", "inline", "onClick" ]);
|
|
423
|
+
var y = r.Children.toArray(a).filter(r.isValidElement);
|
|
424
|
+
var h = 0;
|
|
425
|
+
var m = 0;
|
|
426
|
+
y.forEach((function(e, t) {
|
|
427
|
+
var r = e.props, n = r.disabled, i = r.isMain;
|
|
428
|
+
if (i) {
|
|
429
|
+
h = t;
|
|
430
|
+
}
|
|
431
|
+
if (n) {
|
|
432
|
+
m += 1;
|
|
433
|
+
}
|
|
434
|
+
}));
|
|
435
|
+
var g = (0, r.cloneElement)(y[h], {
|
|
436
|
+
isMain: true,
|
|
437
|
+
appearance: i,
|
|
438
|
+
disabled: o || y[h].props.disabled
|
|
439
|
+
});
|
|
440
|
+
// Remove mainButton from array of dropdown items
|
|
441
|
+
y.splice(h, 1);
|
|
442
|
+
var S = y;
|
|
443
|
+
var j = n().createElement(O, {
|
|
444
|
+
prepend: true,
|
|
445
|
+
disabled: o || m === S.length,
|
|
446
|
+
appearance: i,
|
|
447
|
+
"data-test": "split-button-toggle",
|
|
448
|
+
"aria-label": (0, f._)("Open more options"),
|
|
449
|
+
icon: n().createElement(l(), null)
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
return n().createElement(w, G({
|
|
453
|
+
"aria-label": (0, f._)("Split button"),
|
|
454
|
+
"data-inline": d || null,
|
|
455
|
+
"data-test": "split-button-container",
|
|
456
|
+
elementRef: c,
|
|
457
|
+
$inline: d,
|
|
458
|
+
inline: true,
|
|
459
|
+
flex: true,
|
|
460
|
+
role: "group",
|
|
461
|
+
onClick: o ? undefined : v
|
|
462
|
+
}, b), g, i !== "default" && n().createElement(k, {
|
|
463
|
+
inline: true,
|
|
464
|
+
$appearance: i
|
|
465
|
+
}), n().createElement("div", null, n().createElement(u(), {
|
|
466
|
+
toggle: j
|
|
467
|
+
}, n().createElement(p(), null, S))));
|
|
427
468
|
}
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
filteredChildren.splice(indexOfMain, 1);
|
|
436
|
-
var items = filteredChildren;
|
|
437
|
-
var toggle = /*#__PURE__*/external_react_default.a.createElement(StyledButton, {
|
|
438
|
-
prepend: true // disable toggle if all items within dropdown are disabled
|
|
439
|
-
,
|
|
440
|
-
disabled: disabled || numDisabledItems === items.length,
|
|
441
|
-
appearance: appearance,
|
|
442
|
-
"data-test": "split-button-toggle",
|
|
443
|
-
"aria-label": Object(i18n_["_"])('Open more options'),
|
|
444
|
-
icon: /*#__PURE__*/external_react_default.a.createElement(ChevronDown_default.a, null)
|
|
445
|
-
});
|
|
446
|
-
return /*#__PURE__*/external_react_default.a.createElement(StyledBox, SplitButton_extends({
|
|
447
|
-
"aria-label": Object(i18n_["_"])('Split button'),
|
|
448
|
-
"data-inline": inline || null,
|
|
449
|
-
"data-test": "split-button-container",
|
|
450
|
-
elementRef: elementRef,
|
|
451
|
-
$inline: inline,
|
|
452
|
-
inline: true,
|
|
453
|
-
flex: true,
|
|
454
|
-
role: "group",
|
|
455
|
-
onClick: disabled ? undefined : onClick
|
|
456
|
-
}, otherProps), mainButton, appearance !== 'default' && /*#__PURE__*/external_react_default.a.createElement(StyledSeparator, {
|
|
457
|
-
inline: true,
|
|
458
|
-
$appearance: appearance
|
|
459
|
-
}), /*#__PURE__*/external_react_default.a.createElement("div", null, /*#__PURE__*/external_react_default.a.createElement(Dropdown_default.a, {
|
|
460
|
-
toggle: toggle
|
|
461
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Menu_default.a, null, items))));
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
SplitButton.propTypes = SplitButton_propTypes;
|
|
465
|
-
SplitButton.Item = SplitButton_Item;
|
|
466
|
-
/* harmony default export */ var SplitButton_SplitButton = (SplitButton);
|
|
467
|
-
|
|
468
|
-
// CONCATENATED MODULE: ./src/SplitButton/index.ts
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
/***/ }),
|
|
473
|
-
|
|
474
|
-
/***/ 22:
|
|
475
|
-
/***/ (function(module, exports) {
|
|
476
|
-
|
|
477
|
-
module.exports = require("@splunk/react-ui/Dropdown");
|
|
478
|
-
|
|
479
|
-
/***/ }),
|
|
480
|
-
|
|
481
|
-
/***/ 3:
|
|
482
|
-
/***/ (function(module, exports) {
|
|
483
|
-
|
|
484
|
-
module.exports = require("styled-components");
|
|
485
|
-
|
|
486
|
-
/***/ }),
|
|
487
|
-
|
|
488
|
-
/***/ 4:
|
|
489
|
-
/***/ (function(module, exports) {
|
|
490
|
-
|
|
491
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
492
|
-
|
|
493
|
-
/***/ }),
|
|
494
|
-
|
|
495
|
-
/***/ 5:
|
|
496
|
-
/***/ (function(module, exports) {
|
|
497
|
-
|
|
498
|
-
module.exports = require("lodash/omit");
|
|
499
|
-
|
|
500
|
-
/***/ }),
|
|
501
|
-
|
|
502
|
-
/***/ 6:
|
|
503
|
-
/***/ (function(module, exports) {
|
|
504
|
-
|
|
505
|
-
module.exports = require("@splunk/react-ui/Box");
|
|
506
|
-
|
|
507
|
-
/***/ })
|
|
508
|
-
|
|
509
|
-
/******/ });
|
|
469
|
+
Q.propTypes = L;
|
|
470
|
+
Q.Item = F;
|
|
471
|
+
/* harmony default export */ const U = Q;
|
|
472
|
+
// CONCATENATED MODULE: ./src/SplitButton/index.ts
|
|
473
|
+
module.exports = t;
|
|
474
|
+
/******/})();
|