@splunk/react-ui 4.19.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.d.ts +2 -0
- package/Breadcrumbs.js +207 -0
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +35 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +132 -248
- package/CloseButton.js +92 -200
- package/Code.js +188 -251
- 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 -355
- package/Menu.js +396 -647
- 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 +2675 -2807
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +436 -623
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +183 -304
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1243 -1248
- 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 +975 -1447
- 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 +20 -21
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/types/src/Breadcrumbs/Item.d.ts +42 -0
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
- package/types/src/Breadcrumbs/index.d.ts +2 -0
- package/types/src/Code/Code.d.ts +1 -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 +12 -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/Compact.d.ts +4 -0
- package/types/src/Multiselect/Multiselect.d.ts +5 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
- 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/Select/SelectAllOption.d.ts +14 -0
- package/types/src/Select/SelectBase.d.ts +11 -3
- package/types/src/Table/Table.d.ts +4 -0
- package/types/src/Text/Text.d.ts +3 -3
- package/types/src/TextArea/TextArea.d.ts +3 -3
- 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/Typography/docs/examples/Variants.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/Button.js
CHANGED
|
@@ -1,175 +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
|
+
/******/ }
|
|
18
28
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
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 = 192);
|
|
86
|
-
/******/ })
|
|
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 });
|
|
44
|
+
/******/ };
|
|
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
|
-
/***/ 123:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 192:
|
|
112
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
|
-
|
|
114
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
115
49
|
// ESM COMPAT FLAG
|
|
116
50
|
__webpack_require__.r(__webpack_exports__);
|
|
117
51
|
|
|
118
52
|
// EXPORTS
|
|
119
|
-
__webpack_require__.d(__webpack_exports__,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
var external_react_ = __webpack_require__(2);
|
|
123
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
124
|
-
|
|
125
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
126
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
127
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
128
|
-
|
|
129
|
-
// EXTERNAL MODULE: external "lodash/isString"
|
|
130
|
-
var isString_ = __webpack_require__(23);
|
|
131
|
-
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_);
|
|
132
|
-
|
|
133
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Dropdown"
|
|
134
|
-
var Dropdown_ = __webpack_require__(22);
|
|
135
|
-
|
|
136
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/style"
|
|
137
|
-
var style_ = __webpack_require__(37);
|
|
138
|
-
|
|
139
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
140
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
141
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
142
|
-
|
|
143
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/ButtonSimple"
|
|
144
|
-
var ButtonSimple_ = __webpack_require__(62);
|
|
145
|
-
var ButtonSimple_default = /*#__PURE__*/__webpack_require__.n(ButtonSimple_);
|
|
146
|
-
|
|
147
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
148
|
-
var themes_ = __webpack_require__(0);
|
|
149
|
-
|
|
150
|
-
// CONCATENATED MODULE: ./src/Button/ButtonStyles.ts
|
|
151
|
-
|
|
152
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
"default": () => (/* reexport */ Button_Button)
|
|
55
|
+
});
|
|
153
56
|
|
|
154
|
-
|
|
57
|
+
;// CONCATENATED MODULE: external "react"
|
|
58
|
+
const external_react_namespaceObject = require("react");
|
|
59
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
60
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
61
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
62
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
63
|
+
;// CONCATENATED MODULE: external "lodash/isString"
|
|
64
|
+
const isString_namespaceObject = require("lodash/isString");
|
|
65
|
+
var isString_default = /*#__PURE__*/__webpack_require__.n(isString_namespaceObject);
|
|
66
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Dropdown"
|
|
67
|
+
const Dropdown_namespaceObject = require("@splunk/react-ui/Dropdown");
|
|
68
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/style"
|
|
69
|
+
const style_namespaceObject = require("@splunk/ui-utils/style");
|
|
70
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
71
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
72
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
73
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
|
|
74
|
+
const ButtonSimple_namespaceObject = require("@splunk/react-ui/ButtonSimple");
|
|
75
|
+
var ButtonSimple_default = /*#__PURE__*/__webpack_require__.n(ButtonSimple_namespaceObject);
|
|
76
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
77
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
78
|
+
;// CONCATENATED MODULE: ./src/Button/ButtonStyles.ts
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
var StyledIcon = external_styled_components_default().span.withConfig({
|
|
155
83
|
displayName: "ButtonStyles__StyledIcon",
|
|
156
84
|
componentId: "eqxqs2-0"
|
|
157
|
-
})(["display:flex;align-items:center;flex-shrink:0;font-size:", ";", ";"],
|
|
85
|
+
})(["display:flex;align-items:center;flex-shrink:0;font-size:", ";", ";"], (0,themes_namespaceObject.pick)({
|
|
158
86
|
enterprise: 'inherit',
|
|
159
87
|
prisma: {
|
|
160
88
|
comfortable: '21px',
|
|
161
89
|
compact: '16px'
|
|
162
90
|
}
|
|
163
|
-
}),
|
|
91
|
+
}), (0,themes_namespaceObject.pickVariant)('$isIconOnly', {
|
|
164
92
|
"false": {
|
|
165
|
-
enterprise:
|
|
166
|
-
prisma:
|
|
93
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["padding-right:3px;"]),
|
|
94
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["padding-right:8px;"])
|
|
167
95
|
}
|
|
168
96
|
}));
|
|
169
|
-
var StyledButtonSimple = external_styled_components_default()(ButtonSimple_default
|
|
97
|
+
var StyledButtonSimple = external_styled_components_default()((ButtonSimple_default())).withConfig({
|
|
170
98
|
displayName: "ButtonStyles__StyledButtonSimple",
|
|
171
99
|
componentId: "eqxqs2-1"
|
|
172
|
-
})(["text-align:center;vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{display:inline-block;vertical-align:middle;", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}"],
|
|
100
|
+
})(["text-align:center;vertical-align:middle;text-decoration:none;white-space:nowrap;flex-grow:1;min-width:0;max-width:100%;line-height:", ";min-height:", ";padding:", ";", " ", " &[data-inline]{display:inline-block;vertical-align:middle;", "}[data-inline] + &&[data-inline]{margin-bottom:0;", "}"], themes_namespaceObject.variables.lineHeight, themes_namespaceObject.variables.inputHeight, (0,themes_namespaceObject.pick)({
|
|
173
101
|
enterprise: {
|
|
174
102
|
comfortable: '5px 14px',
|
|
175
103
|
compact: '2px 14px'
|
|
@@ -188,33 +116,33 @@ var StyledButtonSimple = external_styled_components_default()(ButtonSimple_defau
|
|
|
188
116
|
var $inline = _ref3.$inline,
|
|
189
117
|
append = _ref3.append,
|
|
190
118
|
prepend = _ref3.prepend;
|
|
191
|
-
return !$inline && !append && !prepend &&
|
|
119
|
+
return !$inline && !append && !prepend && (0,external_styled_components_namespaceObject.css)(["width:100%;"]);
|
|
192
120
|
}, function (_ref4) {
|
|
193
121
|
var $isIconOnly = _ref4.$isIconOnly;
|
|
194
|
-
return $isIconOnly &&
|
|
122
|
+
return $isIconOnly && (0,external_styled_components_namespaceObject.css)(["box-sizing:border-box;padding:", ";width:", ";min-width:", ";"], (0,themes_namespaceObject.pick)({
|
|
195
123
|
enterprise: {
|
|
196
124
|
comfortable: '0 5px',
|
|
197
125
|
compact: '0 2px'
|
|
198
126
|
},
|
|
199
127
|
prisma: {
|
|
200
|
-
comfortable:
|
|
201
|
-
compact:
|
|
128
|
+
comfortable: (0,external_styled_components_namespaceObject.css)(["0px calc(", " / 2 - 1px)"], themes_namespaceObject.variables.inputHeight),
|
|
129
|
+
compact: (0,external_styled_components_namespaceObject.css)(["0px calc(", " / 2 - 1px)"], themes_namespaceObject.variables.inputHeight)
|
|
202
130
|
}
|
|
203
|
-
}),
|
|
131
|
+
}), themes_namespaceObject.variables.inputHeight, themes_namespaceObject.variables.inputHeight);
|
|
204
132
|
}, function (_ref5) {
|
|
205
133
|
var $isIconOnly = _ref5.$isIconOnly;
|
|
206
|
-
return $isIconOnly ? null :
|
|
134
|
+
return $isIconOnly ? null : (0,external_styled_components_namespaceObject.css)(["width:auto;"]);
|
|
207
135
|
}, function (_ref6) {
|
|
208
136
|
var prepend = _ref6.prepend;
|
|
209
|
-
return !prepend &&
|
|
210
|
-
enterprise:
|
|
211
|
-
prisma:
|
|
137
|
+
return !prepend && (0,external_styled_components_namespaceObject.css)(["margin-left:", ";"], (0,themes_namespaceObject.pick)({
|
|
138
|
+
enterprise: themes_namespaceObject.variables.spacingHalf,
|
|
139
|
+
prisma: themes_namespaceObject.variables.spacingSmall
|
|
212
140
|
}));
|
|
213
141
|
});
|
|
214
|
-
var StyledContentWrapper = external_styled_components_default.
|
|
142
|
+
var StyledContentWrapper = external_styled_components_default().span.withConfig({
|
|
215
143
|
displayName: "ButtonStyles__StyledContentWrapper",
|
|
216
144
|
componentId: "eqxqs2-2"
|
|
217
|
-
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;max-width:100%;padding:", ";"],
|
|
145
|
+
})(["display:flex;flex-direction:row;justify-content:center;align-items:center;max-width:100%;padding:", ";"], (0,themes_namespaceObject.pick)({
|
|
218
146
|
enterprise: function enterprise(_ref7) {
|
|
219
147
|
var $error = _ref7.$error;
|
|
220
148
|
|
|
@@ -222,7 +150,7 @@ var StyledContentWrapper = external_styled_components_default.a.span.withConfig(
|
|
|
222
150
|
return '1px';
|
|
223
151
|
}
|
|
224
152
|
|
|
225
|
-
return
|
|
153
|
+
return (0,themes_namespaceObject.pickVariant)('$appearance', {
|
|
226
154
|
"default": '0',
|
|
227
155
|
secondary: '0',
|
|
228
156
|
destructive: '1px',
|
|
@@ -234,7 +162,7 @@ var StyledContentWrapper = external_styled_components_default.a.span.withConfig(
|
|
|
234
162
|
|
|
235
163
|
});
|
|
236
164
|
},
|
|
237
|
-
prisma:
|
|
165
|
+
prisma: (0,themes_namespaceObject.pickVariant)('$appearance', {
|
|
238
166
|
"default": 0,
|
|
239
167
|
secondary: '1px 0',
|
|
240
168
|
primary: '1px 0',
|
|
@@ -245,104 +173,99 @@ var StyledContentWrapper = external_styled_components_default.a.span.withConfig(
|
|
|
245
173
|
flat: '1px 0'
|
|
246
174
|
})
|
|
247
175
|
}));
|
|
248
|
-
var StyledLabel = external_styled_components_default.
|
|
176
|
+
var StyledLabel = external_styled_components_default().span.withConfig({
|
|
249
177
|
displayName: "ButtonStyles__StyledLabel",
|
|
250
178
|
componentId: "eqxqs2-3"
|
|
251
|
-
})(["text-overflow:ellipsis;overflow:hidden;flex:0 1 auto;&:not(:last-child){padding-right:", ";}", ""],
|
|
179
|
+
})(["text-overflow:ellipsis;overflow:hidden;flex:0 1 auto;&:not(:last-child){padding-right:", ";}", ""], (0,themes_namespaceObject.pick)({
|
|
252
180
|
enterprise: '3px',
|
|
253
181
|
prisma: '10px'
|
|
254
182
|
}), function (_ref8) {
|
|
255
183
|
var $isMenu = _ref8.$isMenu;
|
|
256
|
-
return $isMenu &&
|
|
184
|
+
return $isMenu && (0,external_styled_components_namespaceObject.css)(["flex:1 1 auto;text-align:left;"]);
|
|
257
185
|
});
|
|
258
|
-
var StyledCaretWrapper = external_styled_components_default.
|
|
186
|
+
var StyledCaretWrapper = external_styled_components_default().span.withConfig({
|
|
259
187
|
displayName: "ButtonStyles__StyledCaretWrapper",
|
|
260
188
|
componentId: "eqxqs2-4"
|
|
261
|
-
})(["display:inline-flex;", ""],
|
|
189
|
+
})(["display:inline-flex;", ""], (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
262
190
|
"false": {
|
|
263
|
-
prisma:
|
|
264
|
-
"true":
|
|
265
|
-
"false":
|
|
191
|
+
prisma: (0,themes_namespaceObject.pickVariant)('$primary', {
|
|
192
|
+
"true": (0,external_styled_components_namespaceObject.css)(["color:", ";"], themes_namespaceObject.variables.contentColorInverted),
|
|
193
|
+
"false": (0,external_styled_components_namespaceObject.css)(["color:", ";", ":hover > * > &,", ":active > * > &,{color:", ";}"], themes_namespaceObject.variables.contentColorDefault,
|
|
266
194
|
/* sc-sel */
|
|
267
195
|
StyledButtonSimple,
|
|
268
196
|
/* sc-sel */
|
|
269
|
-
StyledButtonSimple,
|
|
197
|
+
StyledButtonSimple, themes_namespaceObject.variables.contentColorDefault)
|
|
270
198
|
})
|
|
271
199
|
}
|
|
272
200
|
}));
|
|
273
201
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
var CaretSmallDown_default = /*#__PURE__*/__webpack_require__.n(
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
var
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
// CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
|
|
202
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/CaretSmallDown"
|
|
203
|
+
const CaretSmallDown_namespaceObject = require("@splunk/react-icons/CaretSmallDown");
|
|
204
|
+
var CaretSmallDown_default = /*#__PURE__*/__webpack_require__.n(CaretSmallDown_namespaceObject);
|
|
205
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/Caret"
|
|
206
|
+
const Caret_namespaceObject = require("@splunk/react-icons/enterprise/Caret");
|
|
207
|
+
var Caret_default = /*#__PURE__*/__webpack_require__.n(Caret_namespaceObject);
|
|
208
|
+
;// CONCATENATED MODULE: ./src/Button/icons/CaretSmallDown.tsx
|
|
283
209
|
|
|
284
210
|
|
|
285
211
|
|
|
286
212
|
|
|
287
213
|
|
|
288
|
-
var
|
|
289
|
-
var _useSplunkTheme =
|
|
214
|
+
var CaretSmallDown = function CaretSmallDown() {
|
|
215
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
290
216
|
isEnterprise = _useSplunkTheme.isEnterprise,
|
|
291
217
|
isCompact = _useSplunkTheme.isCompact;
|
|
292
218
|
|
|
293
219
|
var prismaSize = isCompact ? '20px' : '24px';
|
|
294
|
-
return isEnterprise ? /*#__PURE__*/external_react_default.
|
|
220
|
+
return isEnterprise ? /*#__PURE__*/external_react_default().createElement((Caret_default()), {
|
|
295
221
|
screenReaderText: null,
|
|
296
222
|
hideDefaultTooltip: true,
|
|
297
223
|
size: 0.5
|
|
298
|
-
}) : /*#__PURE__*/external_react_default.
|
|
224
|
+
}) : /*#__PURE__*/external_react_default().createElement((CaretSmallDown_default()), {
|
|
299
225
|
height: prismaSize,
|
|
300
226
|
width: prismaSize
|
|
301
227
|
});
|
|
302
228
|
};
|
|
303
229
|
|
|
304
|
-
/* harmony default export */
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
var ArrowSquareTopRightInset_default = /*#__PURE__*/__webpack_require__.n(
|
|
230
|
+
/* harmony default export */ const icons_CaretSmallDown = (CaretSmallDown);
|
|
231
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/ArrowSquareTopRightInset"
|
|
232
|
+
const ArrowSquareTopRightInset_namespaceObject = require("@splunk/react-icons/ArrowSquareTopRightInset");
|
|
233
|
+
var ArrowSquareTopRightInset_default = /*#__PURE__*/__webpack_require__.n(ArrowSquareTopRightInset_namespaceObject);
|
|
234
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/External"
|
|
235
|
+
const External_namespaceObject = require("@splunk/react-icons/enterprise/External");
|
|
236
|
+
var External_default = /*#__PURE__*/__webpack_require__.n(External_namespaceObject);
|
|
237
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
238
|
+
const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
|
|
239
|
+
;// CONCATENATED MODULE: ./src/Button/icons/External.tsx
|
|
308
240
|
|
|
309
|
-
// EXTERNAL MODULE: external "@splunk/react-icons/enterprise/External"
|
|
310
|
-
var External_ = __webpack_require__(63);
|
|
311
|
-
var External_default = /*#__PURE__*/__webpack_require__.n(External_);
|
|
312
241
|
|
|
313
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/i18n"
|
|
314
|
-
var i18n_ = __webpack_require__(4);
|
|
315
242
|
|
|
316
|
-
// CONCATENATED MODULE: ./src/Button/icons/External.tsx
|
|
317
243
|
|
|
318
244
|
|
|
319
245
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
var External_label = Object(i18n_["_"])('Open externally');
|
|
246
|
+
var label = (0,i18n_namespaceObject._)('Open externally');
|
|
324
247
|
|
|
325
248
|
function External() {
|
|
326
|
-
var _useSplunkTheme =
|
|
249
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
327
250
|
isEnterprise = _useSplunkTheme.isEnterprise,
|
|
328
251
|
isCompact = _useSplunkTheme.isCompact;
|
|
329
252
|
|
|
330
253
|
var prismaSize = isCompact ? '20px' : '24px';
|
|
331
|
-
return isEnterprise ? /*#__PURE__*/external_react_default.
|
|
332
|
-
screenReaderText:
|
|
254
|
+
return isEnterprise ? /*#__PURE__*/external_react_default().createElement((External_default()), {
|
|
255
|
+
screenReaderText: label,
|
|
333
256
|
size: 0.8,
|
|
334
257
|
style: {
|
|
335
258
|
verticalAlign: 'baseline'
|
|
336
259
|
}
|
|
337
|
-
}) : /*#__PURE__*/external_react_default.
|
|
338
|
-
"aria-label":
|
|
260
|
+
}) : /*#__PURE__*/external_react_default().createElement((ArrowSquareTopRightInset_default()), {
|
|
261
|
+
"aria-label": label,
|
|
339
262
|
height: prismaSize,
|
|
340
263
|
width: prismaSize
|
|
341
|
-
}, /*#__PURE__*/external_react_default.
|
|
264
|
+
}, /*#__PURE__*/external_react_default().createElement("title", null, label));
|
|
342
265
|
}
|
|
343
266
|
|
|
344
|
-
/* harmony default export */
|
|
345
|
-
|
|
267
|
+
/* harmony default export */ const icons_External = (External);
|
|
268
|
+
;// CONCATENATED MODULE: ./src/Button/Button.tsx
|
|
346
269
|
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); }
|
|
347
270
|
|
|
348
271
|
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); }
|
|
@@ -378,26 +301,26 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
378
301
|
|
|
379
302
|
|
|
380
303
|
var propTypes = {
|
|
381
|
-
action: external_prop_types_default.
|
|
382
|
-
appearance: external_prop_types_default.
|
|
383
|
-
append: external_prop_types_default.
|
|
384
|
-
children: external_prop_types_default.
|
|
304
|
+
action: (external_prop_types_default()).string,
|
|
305
|
+
appearance: external_prop_types_default().oneOf(['default', 'secondary', 'primary', 'destructive', 'pill', 'toggle', 'flat']),
|
|
306
|
+
append: (external_prop_types_default()).bool,
|
|
307
|
+
children: (external_prop_types_default()).node,
|
|
385
308
|
|
|
386
309
|
/** @private An additional className to add to the button. */
|
|
387
|
-
classNamePrivate: external_prop_types_default.
|
|
388
|
-
disabled: external_prop_types_default.
|
|
389
|
-
elementRef: external_prop_types_default.
|
|
390
|
-
error: external_prop_types_default.
|
|
391
|
-
icon: external_prop_types_default.
|
|
392
|
-
inline: external_prop_types_default.
|
|
393
|
-
isMenu: external_prop_types_default.
|
|
394
|
-
label: external_prop_types_default.
|
|
395
|
-
onClick: external_prop_types_default.
|
|
396
|
-
openInNewContext: external_prop_types_default.
|
|
397
|
-
prepend: external_prop_types_default.
|
|
398
|
-
selected: external_prop_types_default.
|
|
399
|
-
to: external_prop_types_default.
|
|
400
|
-
value: external_prop_types_default.
|
|
310
|
+
classNamePrivate: (external_prop_types_default()).string,
|
|
311
|
+
disabled: (external_prop_types_default()).bool,
|
|
312
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
313
|
+
error: (external_prop_types_default()).bool,
|
|
314
|
+
icon: (external_prop_types_default()).node,
|
|
315
|
+
inline: (external_prop_types_default()).bool,
|
|
316
|
+
isMenu: (external_prop_types_default()).bool,
|
|
317
|
+
label: (external_prop_types_default()).node,
|
|
318
|
+
onClick: (external_prop_types_default()).func,
|
|
319
|
+
openInNewContext: (external_prop_types_default()).bool,
|
|
320
|
+
prepend: (external_prop_types_default()).bool,
|
|
321
|
+
selected: (external_prop_types_default()).bool,
|
|
322
|
+
to: (external_prop_types_default()).string,
|
|
323
|
+
value: (external_prop_types_default()).any
|
|
401
324
|
};
|
|
402
325
|
var defaultProps = {
|
|
403
326
|
appearance: 'default',
|
|
@@ -411,7 +334,7 @@ var defaultProps = {
|
|
|
411
334
|
selected: false
|
|
412
335
|
};
|
|
413
336
|
|
|
414
|
-
var
|
|
337
|
+
var Button = /*#__PURE__*/function (_Component) {
|
|
415
338
|
_inherits(Button, _Component);
|
|
416
339
|
|
|
417
340
|
var _super = _createSuper(Button);
|
|
@@ -491,12 +414,12 @@ var Button_Button = /*#__PURE__*/function (_Component) {
|
|
|
491
414
|
|
|
492
415
|
var isIconOnly = !!(icon && !label && !isMenu && !children);
|
|
493
416
|
var hasPrismaIcon = to && openInNewContext || isMenu || !!icon;
|
|
494
|
-
return /*#__PURE__*/external_react_default.
|
|
417
|
+
return /*#__PURE__*/external_react_default().createElement(StyledButtonSimple, _extends({
|
|
495
418
|
"aria-haspopup": isMenu || undefined,
|
|
496
419
|
"aria-invalid": error || undefined,
|
|
497
420
|
"data-test": "button"
|
|
498
421
|
}, this.props, {
|
|
499
|
-
className:
|
|
422
|
+
className: (0,style_namespaceObject.toClassName)(className, classNamePrivate),
|
|
500
423
|
"data-action": action,
|
|
501
424
|
"data-inline": inline || null,
|
|
502
425
|
disabled: disabled,
|
|
@@ -515,105 +438,34 @@ var Button_Button = /*#__PURE__*/function (_Component) {
|
|
|
515
438
|
ref: this.handleMount,
|
|
516
439
|
openInNewContext: openInNewContext,
|
|
517
440
|
appearance: appearance
|
|
518
|
-
}), /*#__PURE__*/external_react_default.
|
|
441
|
+
}), /*#__PURE__*/external_react_default().createElement(StyledContentWrapper, {
|
|
519
442
|
$appearance: appearance,
|
|
520
443
|
$error: error
|
|
521
|
-
}, icon && /*#__PURE__*/external_react_default.
|
|
444
|
+
}, icon && /*#__PURE__*/external_react_default().createElement(StyledIcon, {
|
|
522
445
|
$isIconOnly: isIconOnly
|
|
523
|
-
}, icon), label && /*#__PURE__*/external_react_default.
|
|
446
|
+
}, icon), label && /*#__PURE__*/external_react_default().createElement(StyledLabel, {
|
|
524
447
|
"data-test": "label",
|
|
525
448
|
$isMenu: isMenu
|
|
526
|
-
}, label), children, isMenu && /*#__PURE__*/external_react_default.
|
|
449
|
+
}, label), children, isMenu && /*#__PURE__*/external_react_default().createElement(StyledCaretWrapper, {
|
|
527
450
|
$disabled: disabled,
|
|
528
451
|
$primary: appearance === 'primary'
|
|
529
|
-
}, /*#__PURE__*/external_react_default.
|
|
452
|
+
}, /*#__PURE__*/external_react_default().createElement(icons_CaretSmallDown, null)), openInNewContext && /*#__PURE__*/external_react_default().createElement(icons_External, null)));
|
|
530
453
|
}
|
|
531
454
|
}]);
|
|
532
455
|
|
|
533
456
|
return Button;
|
|
534
|
-
}(
|
|
535
|
-
|
|
536
|
-
_defineProperty(Button_Button, "propTypes", propTypes);
|
|
537
|
-
|
|
538
|
-
_defineProperty(Button_Button, "defaultProps", defaultProps);
|
|
539
|
-
|
|
540
|
-
_defineProperty(Button_Button, Dropdown_["legacyRefMode"], true);
|
|
541
|
-
|
|
542
|
-
/* harmony default export */ var src_Button_Button = (Button_Button);
|
|
543
|
-
// CONCATENATED MODULE: ./src/Button/index.ts
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
/***/ }),
|
|
548
|
-
|
|
549
|
-
/***/ 2:
|
|
550
|
-
/***/ (function(module, exports) {
|
|
551
|
-
|
|
552
|
-
module.exports = require("react");
|
|
553
|
-
|
|
554
|
-
/***/ }),
|
|
555
|
-
|
|
556
|
-
/***/ 22:
|
|
557
|
-
/***/ (function(module, exports) {
|
|
558
|
-
|
|
559
|
-
module.exports = require("@splunk/react-ui/Dropdown");
|
|
560
|
-
|
|
561
|
-
/***/ }),
|
|
562
|
-
|
|
563
|
-
/***/ 23:
|
|
564
|
-
/***/ (function(module, exports) {
|
|
565
|
-
|
|
566
|
-
module.exports = require("lodash/isString");
|
|
567
|
-
|
|
568
|
-
/***/ }),
|
|
569
|
-
|
|
570
|
-
/***/ 3:
|
|
571
|
-
/***/ (function(module, exports) {
|
|
572
|
-
|
|
573
|
-
module.exports = require("styled-components");
|
|
574
|
-
|
|
575
|
-
/***/ }),
|
|
576
|
-
|
|
577
|
-
/***/ 37:
|
|
578
|
-
/***/ (function(module, exports) {
|
|
579
|
-
|
|
580
|
-
module.exports = require("@splunk/ui-utils/style");
|
|
581
|
-
|
|
582
|
-
/***/ }),
|
|
583
|
-
|
|
584
|
-
/***/ 4:
|
|
585
|
-
/***/ (function(module, exports) {
|
|
586
|
-
|
|
587
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
588
|
-
|
|
589
|
-
/***/ }),
|
|
590
|
-
|
|
591
|
-
/***/ 53:
|
|
592
|
-
/***/ (function(module, exports) {
|
|
593
|
-
|
|
594
|
-
module.exports = require("@splunk/react-icons/CaretSmallDown");
|
|
595
|
-
|
|
596
|
-
/***/ }),
|
|
597
|
-
|
|
598
|
-
/***/ 54:
|
|
599
|
-
/***/ (function(module, exports) {
|
|
600
|
-
|
|
601
|
-
module.exports = require("@splunk/react-icons/enterprise/Caret");
|
|
602
|
-
|
|
603
|
-
/***/ }),
|
|
604
|
-
|
|
605
|
-
/***/ 62:
|
|
606
|
-
/***/ (function(module, exports) {
|
|
457
|
+
}(external_react_namespaceObject.Component);
|
|
607
458
|
|
|
608
|
-
|
|
459
|
+
_defineProperty(Button, "propTypes", propTypes);
|
|
609
460
|
|
|
610
|
-
|
|
461
|
+
_defineProperty(Button, "defaultProps", defaultProps);
|
|
611
462
|
|
|
612
|
-
|
|
613
|
-
/***/ (function(module, exports) {
|
|
463
|
+
_defineProperty(Button, Dropdown_namespaceObject.legacyRefMode, true);
|
|
614
464
|
|
|
615
|
-
|
|
465
|
+
/* harmony default export */ const Button_Button = (Button);
|
|
466
|
+
;// CONCATENATED MODULE: ./src/Button/index.ts
|
|
616
467
|
|
|
617
|
-
/***/ })
|
|
618
468
|
|
|
619
|
-
|
|
469
|
+
module.exports = __webpack_exports__;
|
|
470
|
+
/******/ })()
|
|
471
|
+
;
|