@splunk/react-ui 4.38.0 → 4.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +131 -153
- package/Anchor.js +50 -58
- package/Animation.js +64 -59
- package/AnimationToggle.js +59 -61
- package/Box.js +59 -67
- package/Breadcrumbs.js +113 -127
- package/Button.js +151 -169
- package/ButtonGroup.js +41 -49
- package/ButtonSimple.js +264 -295
- package/CHANGELOG.md +49 -0
- package/Calendar.js +353 -414
- package/Card.js +186 -244
- package/CardLayout.js +86 -83
- package/Chip.js +136 -146
- package/Clickable.js +180 -198
- package/CloseButton.js +52 -60
- package/Code.js +24 -31
- package/CollapsiblePanel.js +172 -202
- package/Color.js +371 -412
- package/ColumnLayout.js +72 -96
- package/ComboBox.js +266 -303
- package/Concertina.js +406 -454
- package/ControlGroup.js +178 -210
- package/Date.js +116 -131
- package/DefinitionList.js +125 -149
- package/Divider.js +81 -79
- package/Dropdown.js +226 -237
- package/DualListbox.js +150 -186
- package/EventListener.js +4 -1
- package/File.js +1032 -955
- package/FormRows.js +281 -334
- package/Heading.js +27 -35
- package/Image.js +101 -116
- package/JSONTree.js +301 -344
- package/Layer.js +118 -126
- package/Link.js +141 -159
- package/List.js +61 -77
- package/MIGRATION.mdx +123 -38
- package/Markdown.js +288 -347
- package/Menu.js +506 -532
- package/Message.js +197 -207
- package/MessageBar.js +58 -66
- package/Modal.js +241 -290
- package/ModalLayer.js +130 -148
- package/Monogram.js +138 -138
- package/Multiselect.js +3137 -3433
- package/Number.js +164 -178
- package/Paginator.js +296 -335
- package/Paragraph.js +24 -32
- package/Popover.js +450 -442
- package/Progress.js +65 -75
- package/RadioBar.js +301 -303
- package/RadioList.js +77 -119
- package/Resize.js +105 -127
- package/ResultsMenu.js +373 -385
- package/ScreenReaderContent.js +50 -58
- package/Scroll.js +209 -244
- package/Search.js +379 -391
- package/Select.js +2085 -2345
- package/SidePanel.js +122 -142
- package/Slider.js +132 -145
- package/SlidingPanels.js +238 -270
- package/SplitButton.d.ts +2 -0
- package/SplitButton.js +222 -245
- package/StaticContent.js +68 -76
- package/StepBar.js +206 -205
- package/Switch.js +176 -205
- package/TabBar.js +235 -268
- package/TabLayout.js +122 -141
- package/Table.js +2103 -2261
- package/Text.js +379 -493
- package/TextArea.js +411 -441
- package/Tooltip.js +116 -132
- package/TransitionOpen.js +160 -178
- package/Tree.js +268 -287
- package/Typography.js +48 -52
- package/WaitSpinner.js +61 -69
- package/cypress/support/commands.ts +9 -0
- package/cypress/support/index.d.ts +6 -0
- package/cypress/tsconfig.cypress.json +1 -0
- package/docker-compose.yml +0 -1
- package/package.json +15 -15
- package/types/src/Button/Button.d.ts +5 -1
- package/types/src/ButtonSimple/ButtonSimple.d.ts +2 -2
- package/types/src/Card/Card.d.ts +1 -0
- package/types/src/Card/Footer.d.ts +1 -0
- package/types/src/Chip/Chip.d.ts +3 -6
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +1 -1
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Color/Palette.d.ts +4 -2
- package/types/src/ComboBox/ComboBox.d.ts +1 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/ControlGroup/ControlGroup.d.ts +1 -2
- package/types/src/Date/Date.d.ts +2 -2
- package/types/src/File/File.d.ts +2 -3
- package/types/src/File/Retry.d.ts +1 -2
- package/types/src/Menu/Item.d.ts +18 -5
- package/types/src/Menu/Menu.d.ts +3 -3
- package/types/src/Menu/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Menu/docs/examples/SelectableWithAdornments.d.ts +2 -0
- package/types/src/ModalLayer/ModalLayer.d.ts +1 -1
- package/types/src/Multiselect/Compact.d.ts +1 -1
- package/types/src/Multiselect/Multiselect.d.ts +1 -1
- package/types/src/Multiselect/Normal.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +2 -0
- package/types/src/Number/Number.d.ts +3 -3
- package/types/src/Popover/Popover.d.ts +3 -4
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ScrollContainerContext/ScrollContainerContext.d.ts +2 -2
- package/types/src/Search/Option.d.ts +9 -3
- package/types/src/Select/Option.d.ts +3 -1
- package/types/src/Select/OptionBase.d.ts +7 -5
- package/types/src/Select/Select.d.ts +4 -2
- package/types/src/Select/SelectAllOption.d.ts +4 -4
- package/types/src/Select/SelectBase.d.ts +104 -66
- package/types/src/Select/docs/examples/Appearance.d.ts +0 -2
- package/types/src/SidePanel/SidePanel.d.ts +1 -1
- package/types/src/Slider/Slider.d.ts +2 -2
- package/types/src/SlidingPanels/SlidingPanels.d.ts +1 -1
- package/types/src/StepBar/Step.d.ts +1 -2
- package/types/src/Switch/Switch.d.ts +0 -1
- package/types/src/TabBar/Tab.d.ts +1 -1
- package/types/src/TabBar/TabBar.d.ts +3 -1
- package/types/src/TabLayout/TabLayout.d.ts +2 -0
- package/types/src/Table/Cell.d.ts +0 -2
- package/types/src/Table/HeadDropdownCell.d.ts +2 -0
- package/types/src/Table/HeadInner.d.ts +5 -1
- package/types/src/Table/Table.d.ts +0 -1
- package/types/src/Table/docs/examples/StripeRows.d.ts +2 -0
- package/types/src/Text/IconOutlinedHide.d.ts +1 -2
- package/types/src/Text/IconOutlinedView.d.ts +1 -2
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Tooltip/Tooltip.d.ts +4 -4
- package/types/src/TransitionOpen/TransitionOpen.d.ts +1 -1
- package/types/src/WaitSpinner/WaitSpinner.d.ts +0 -1
- package/types/src/useControlled/index.d.ts +2 -0
- package/types/src/useControlled/useControlled.d.ts +21 -0
- package/types/src/useResizeObserver/index.d.ts +2 -0
- package/types/src/useResizeObserver/useResizeObserver.d.ts +12 -0
- package/useControlled.js +112 -0
- package/useForceUpdate.js +30 -32
- package/useKeyPress.d.ts +2 -0
- package/useKeyPress.js +1 -1
- package/useResizeObserver.d.ts +2 -0
- package/useResizeObserver.js +137 -0
- package/types/src/ButtonGroup/docs/examples/prisma/Basic.d.ts +0 -1
- package/types/src/Chip/docs/examples/Basic.d.ts +0 -2
- package/types/src/Chip/docs/examples/prisma/Appearance.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/Controlled.d.ts +0 -2
- package/types/src/Color/docs/examples/prisma/ThemeVariables.d.ts +0 -1
- package/types/src/Color/docs/examples/prisma/Uncontrolled.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/BasicMenu.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ControlledDropdown.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/Dialog.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/OtherToggles.d.ts +0 -2
- package/types/src/Dropdown/docs/examples/prisma/ScrollingMenu.d.ts +0 -2
- package/types/src/File/docs/examples/prisma/Disabled.d.ts +0 -12
- package/types/src/File/docs/examples/prisma/Error.d.ts +0 -1
- package/types/src/Menu/docs/examples/Icons.d.ts +0 -2
- package/types/src/Menu/docs/examples/SelectableWithIcons.d.ts +0 -2
- package/types/src/Message/docs/examples/prisma/Title.d.ts +0 -2
- package/types/src/TabBar/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/TabLayout/docs/examples/prisma/Context.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Basic.d.ts +0 -2
- package/types/src/WaitSpinner/docs/examples/prisma/Basic.d.ts +0 -2
- /package/types/src/Color/docs/examples/{prisma/CustomizedPalette.d.ts → CustomizedPalette.d.ts} +0 -0
- /package/types/src/Color/docs/examples/{prisma/HideInput.d.ts → HideInput.d.ts} +0 -0
- /package/types/src/StepBar/docs/examples/{prisma/Error.d.ts → Error.d.ts} +0 -0
- /package/types/src/TabBar/docs/examples/{prisma/Disabled.d.ts → Disabled.d.ts} +0 -0
package/Tooltip.js
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
default: () => /* reexport */
|
|
64
|
+
default: () => /* reexport */ ee
|
|
65
65
|
});
|
|
66
66
|
// CONCATENATED MODULE: external "react"
|
|
67
67
|
const n = require("react");
|
|
@@ -92,18 +92,15 @@
|
|
|
92
92
|
var b = e.n(y);
|
|
93
93
|
// CONCATENATED MODULE: ./src/Tooltip/InfoIcon.tsx
|
|
94
94
|
function g() {
|
|
95
|
-
g = Object.assign
|
|
95
|
+
return g = Object.assign ? Object.assign.bind() : function(e) {
|
|
96
96
|
for (var t = 1; t < arguments.length; t++) {
|
|
97
97
|
var n = arguments[t];
|
|
98
98
|
for (var o in n) {
|
|
99
|
-
|
|
100
|
-
e[o] = n[o];
|
|
101
|
-
}
|
|
99
|
+
({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
return e;
|
|
105
|
-
};
|
|
106
|
-
return g.apply(this, arguments);
|
|
103
|
+
}, g.apply(null, arguments);
|
|
107
104
|
}
|
|
108
105
|
function C(e) {
|
|
109
106
|
var t = (0, v.useSplunkTheme)(), n = t.family, r = t.density;
|
|
@@ -141,16 +138,16 @@
|
|
|
141
138
|
const S = require("@splunk/react-ui/Clickable");
|
|
142
139
|
var k = e.n(S);
|
|
143
140
|
// CONCATENATED MODULE: ./src/Tooltip/TooltipStyles.ts
|
|
144
|
-
var
|
|
141
|
+
var w = "16px";
|
|
145
142
|
var P = M().span.withConfig({
|
|
146
143
|
displayName: "TooltipStyles__Styled",
|
|
147
144
|
componentId: "sc-67fvgm-0"
|
|
148
145
|
})([ "", ";position:relative;" ], v.mixins.reset("block"));
|
|
149
|
-
var
|
|
146
|
+
var R = M().span.withConfig({
|
|
150
147
|
displayName: "TooltipStyles__StyledInline",
|
|
151
148
|
componentId: "sc-67fvgm-1"
|
|
152
149
|
})([ "", ";position:relative;" ], v.mixins.reset("inline-block"));
|
|
153
|
-
var
|
|
150
|
+
var T = M().span.withConfig({
|
|
154
151
|
displayName: "TooltipStyles__StyledToggle",
|
|
155
152
|
componentId: "sc-67fvgm-2"
|
|
156
153
|
})([ "display:block;" ]);
|
|
@@ -158,7 +155,7 @@
|
|
|
158
155
|
displayName: "TooltipStyles__StyledToggleInline",
|
|
159
156
|
componentId: "sc-67fvgm-3"
|
|
160
157
|
})([ "display:inline-block;" ]);
|
|
161
|
-
var
|
|
158
|
+
var L = M().div.withConfig({
|
|
162
159
|
displayName: "TooltipStyles__StyledContent",
|
|
163
160
|
componentId: "sc-67fvgm-4"
|
|
164
161
|
})([ "padding:", ";font-size:", ";line-height:", ";user-select:none;" ], (0, v.pick)({
|
|
@@ -177,11 +174,11 @@
|
|
|
177
174
|
true: "18px"
|
|
178
175
|
})
|
|
179
176
|
}));
|
|
180
|
-
var
|
|
177
|
+
var x = M()(k()).withConfig({
|
|
181
178
|
displayName: "TooltipStyles__StyledButton",
|
|
182
179
|
componentId: "sc-67fvgm-5"
|
|
183
180
|
})([ "cursor:default;", " ", " &:focus{box-shadow:", ";}" ], (0, v.pick)({
|
|
184
|
-
enterprise: (0, O.css)([ "display:inline-block;width:", ";height:", ";border:2px solid ", ";border-radius:", ";font-size:", ";font-weight:", ";line-height:calc(", " - 2px);text-align:center;color:", ";vertical-align:baseline;&:not([disabled]){&:hover{text-decoration:none;}}" ],
|
|
181
|
+
enterprise: (0, O.css)([ "display:inline-block;width:", ";height:", ";border:2px solid ", ";border-radius:", ";font-size:", ";font-weight:", ";line-height:calc(", " - 2px);text-align:center;color:", ";vertical-align:baseline;&:not([disabled]){&:hover{text-decoration:none;}}" ], w, w, v.variables.linkColor, w, v.variables.fontSizeSmall, v.variables.fontWeightSemiBold, w, v.variables.linkColor),
|
|
185
182
|
prisma: (0, O.css)([ "color:", ";border-radius:50%;display:inline-block;vertical-align:middle;&:hover,&:focus{color:", ";background:", ";}" ], v.variables.contentColorMuted, v.variables.contentColorActive, v.variables.interactiveColorOverlayHover)
|
|
186
183
|
}), (0, v.pick)({
|
|
187
184
|
prisma: {
|
|
@@ -192,153 +189,136 @@
|
|
|
192
189
|
// CONCATENATED MODULE: ./src/Tooltip/Tooltip.tsx
|
|
193
190
|
function _(e) {
|
|
194
191
|
"@babel/helpers - typeof";
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}
|
|
200
|
-
_ = function e(t) {
|
|
201
|
-
return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
return _(e);
|
|
192
|
+
return _ = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
|
|
193
|
+
return typeof e;
|
|
194
|
+
} : function(e) {
|
|
195
|
+
return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
196
|
+
}, _(e);
|
|
205
197
|
}
|
|
206
|
-
function
|
|
207
|
-
|
|
198
|
+
function j() {
|
|
199
|
+
return j = Object.assign ? Object.assign.bind() : function(e) {
|
|
208
200
|
for (var t = 1; t < arguments.length; t++) {
|
|
209
201
|
var n = arguments[t];
|
|
210
202
|
for (var o in n) {
|
|
211
|
-
|
|
212
|
-
e[o] = n[o];
|
|
213
|
-
}
|
|
203
|
+
({}).hasOwnProperty.call(n, o) && (e[o] = n[o]);
|
|
214
204
|
}
|
|
215
205
|
}
|
|
216
206
|
return e;
|
|
217
|
-
};
|
|
218
|
-
return I.apply(this, arguments);
|
|
207
|
+
}, j.apply(null, arguments);
|
|
219
208
|
}
|
|
220
|
-
function
|
|
221
|
-
if (
|
|
222
|
-
var n =
|
|
223
|
-
var o, r;
|
|
209
|
+
function I(e, t) {
|
|
210
|
+
if (null == e) return {};
|
|
211
|
+
var n, o, r = A(e, t);
|
|
224
212
|
if (Object.getOwnPropertySymbols) {
|
|
225
213
|
var a = Object.getOwnPropertySymbols(e);
|
|
226
|
-
for (
|
|
227
|
-
|
|
228
|
-
if (t.indexOf(o) >= 0) continue;
|
|
229
|
-
if (!Object.prototype.propertyIsEnumerable.call(e, o)) continue;
|
|
230
|
-
n[o] = e[o];
|
|
214
|
+
for (o = 0; o < a.length; o++) {
|
|
215
|
+
n = a[o], t.includes(n) || {}.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
|
|
231
216
|
}
|
|
232
217
|
}
|
|
233
|
-
return
|
|
218
|
+
return r;
|
|
234
219
|
}
|
|
235
|
-
function
|
|
236
|
-
if (
|
|
220
|
+
function A(e, t) {
|
|
221
|
+
if (null == e) return {};
|
|
237
222
|
var n = {};
|
|
238
|
-
var o
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
n[r] = e[r];
|
|
223
|
+
for (var o in e) {
|
|
224
|
+
if ({}.hasOwnProperty.call(e, o)) {
|
|
225
|
+
if (t.includes(o)) continue;
|
|
226
|
+
n[o] = e[o];
|
|
227
|
+
}
|
|
244
228
|
}
|
|
245
229
|
return n;
|
|
246
230
|
}
|
|
247
231
|
function H(e, t) {
|
|
248
|
-
if (!(e instanceof t))
|
|
249
|
-
throw new TypeError("Cannot call a class as a function");
|
|
250
|
-
}
|
|
232
|
+
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
|
|
251
233
|
}
|
|
252
234
|
function D(e, t) {
|
|
253
235
|
for (var n = 0; n < t.length; n++) {
|
|
254
236
|
var o = t[n];
|
|
255
|
-
o.enumerable = o.enumerable ||
|
|
256
|
-
o.
|
|
257
|
-
if ("value" in o) o.writable = true;
|
|
258
|
-
Object.defineProperty(e, o.key, o);
|
|
237
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0),
|
|
238
|
+
Object.defineProperty(e, G(o.key), o);
|
|
259
239
|
}
|
|
260
240
|
}
|
|
261
241
|
function B(e, t, n) {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
242
|
+
return t && D(e.prototype, t), n && D(e, n), Object.defineProperty(e, "prototype", {
|
|
243
|
+
writable: !1
|
|
244
|
+
}), e;
|
|
265
245
|
}
|
|
266
246
|
function V(e, t) {
|
|
267
|
-
if (typeof t !== "
|
|
268
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
269
|
-
}
|
|
247
|
+
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
270
248
|
e.prototype = Object.create(t && t.prototype, {
|
|
271
249
|
constructor: {
|
|
272
250
|
value: e,
|
|
273
|
-
writable:
|
|
274
|
-
configurable:
|
|
251
|
+
writable: !0,
|
|
252
|
+
configurable: !0
|
|
275
253
|
}
|
|
276
|
-
})
|
|
277
|
-
|
|
254
|
+
}), Object.defineProperty(e, "prototype", {
|
|
255
|
+
writable: !1
|
|
256
|
+
}), t && Z(e, t);
|
|
278
257
|
}
|
|
279
258
|
function Z(e, t) {
|
|
280
|
-
Z = Object.setPrototypeOf
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
};
|
|
284
|
-
return Z(e, t);
|
|
259
|
+
return Z = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
260
|
+
return e.__proto__ = t, e;
|
|
261
|
+
}, Z(e, t);
|
|
285
262
|
}
|
|
286
263
|
function N(e) {
|
|
287
264
|
var t = F();
|
|
288
|
-
return function
|
|
289
|
-
var o = $(e)
|
|
265
|
+
return function() {
|
|
266
|
+
var n, o = $(e);
|
|
290
267
|
if (t) {
|
|
291
|
-
var
|
|
292
|
-
|
|
293
|
-
} else
|
|
294
|
-
|
|
295
|
-
}
|
|
296
|
-
return W(this, r);
|
|
268
|
+
var r = $(this).constructor;
|
|
269
|
+
n = Reflect.construct(o, arguments, r);
|
|
270
|
+
} else n = o.apply(this, arguments);
|
|
271
|
+
return W(this, n);
|
|
297
272
|
};
|
|
298
273
|
}
|
|
299
274
|
function W(e, t) {
|
|
300
|
-
if (t && (_(t)
|
|
301
|
-
|
|
302
|
-
}
|
|
275
|
+
if (t && ("object" == _(t) || "function" == typeof t)) return t;
|
|
276
|
+
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
303
277
|
return z(e);
|
|
304
278
|
}
|
|
305
279
|
function z(e) {
|
|
306
|
-
if (
|
|
307
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
308
|
-
}
|
|
280
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
309
281
|
return e;
|
|
310
282
|
}
|
|
311
283
|
function F() {
|
|
312
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
313
|
-
if (Reflect.construct.sham) return false;
|
|
314
|
-
if (typeof Proxy === "function") return true;
|
|
315
284
|
try {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
return
|
|
320
|
-
}
|
|
285
|
+
var e = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function() {})));
|
|
286
|
+
} catch (e) {}
|
|
287
|
+
return (F = function t() {
|
|
288
|
+
return !!e;
|
|
289
|
+
})();
|
|
321
290
|
}
|
|
322
291
|
function $(e) {
|
|
323
|
-
$ = Object.setPrototypeOf ? Object.getPrototypeOf : function
|
|
324
|
-
return
|
|
325
|
-
};
|
|
326
|
-
return $(e);
|
|
292
|
+
return $ = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
293
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
294
|
+
}, $(e);
|
|
327
295
|
}
|
|
328
296
|
function U(e, t, n) {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
297
|
+
return (t = G(t)) in e ? Object.defineProperty(e, t, {
|
|
298
|
+
value: n,
|
|
299
|
+
enumerable: !0,
|
|
300
|
+
configurable: !0,
|
|
301
|
+
writable: !0
|
|
302
|
+
}) : e[t] = n, e;
|
|
303
|
+
}
|
|
304
|
+
function G(e) {
|
|
305
|
+
var t = K(e, "string");
|
|
306
|
+
return "symbol" == _(t) ? t : t + "";
|
|
307
|
+
}
|
|
308
|
+
function K(e, t) {
|
|
309
|
+
if ("object" != _(e) || !e) return e;
|
|
310
|
+
var n = e[Symbol.toPrimitive];
|
|
311
|
+
if (void 0 !== n) {
|
|
312
|
+
var o = n.call(e, t || "default");
|
|
313
|
+
if ("object" != _(o)) return o;
|
|
314
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
338
315
|
}
|
|
339
|
-
return e;
|
|
316
|
+
return ("string" === t ? String : Number)(e);
|
|
340
317
|
}
|
|
341
|
-
|
|
318
|
+
/** @public */
|
|
319
|
+
/** @public */
|
|
320
|
+
/** @public */
|
|
321
|
+
/** @public */ var J = {
|
|
342
322
|
/** @private */
|
|
343
323
|
appearance: a().string,
|
|
344
324
|
children: a().node,
|
|
@@ -357,8 +337,7 @@
|
|
|
357
337
|
/** @private */
|
|
358
338
|
splunkTheme: a().object
|
|
359
339
|
};
|
|
360
|
-
var
|
|
361
|
-
appearance: "inverted",
|
|
340
|
+
var Q = {
|
|
362
341
|
closeDelay: 300,
|
|
363
342
|
closeWhen: "default",
|
|
364
343
|
contentRelationship: "description",
|
|
@@ -369,7 +348,7 @@
|
|
|
369
348
|
/**
|
|
370
349
|
* The Tooltip component wraps arbitrary content to be displayed when the target element is hovered
|
|
371
350
|
* or focused.
|
|
372
|
-
*/ var
|
|
351
|
+
*/ var X = function(e) {
|
|
373
352
|
V(r, e);
|
|
374
353
|
var t = N(r);
|
|
375
354
|
// @docs-props-type TooltipPropsBase
|
|
@@ -558,28 +537,32 @@
|
|
|
558
537
|
}, {
|
|
559
538
|
key: "render",
|
|
560
539
|
value: function e() {
|
|
561
|
-
var t = this.props, r = t.appearance, a = t.children, i = t.content, l = t.defaultPlacement, s = t.elementRef, u = t.inline, c = t.onRequestClose, d = t.onRequestOpen, v = t.splunkTheme, h = t.contentRelationship, y =
|
|
540
|
+
var t = this.props, r = t.appearance, a = t.children, i = t.content, l = t.defaultPlacement, s = t.elementRef, u = t.inline, c = t.onRequestClose, d = t.onRequestOpen, v = t.splunkTheme, h = t.contentRelationship, y = I(t, [ "appearance", "children", "content", "defaultPlacement", "elementRef", "inline", "onRequestClose", "onRequestOpen", "splunkTheme", "contentRelationship" ]);
|
|
562
541
|
var b = this.state.anchorEl;
|
|
563
542
|
var g = !!i;
|
|
564
543
|
var C = this.isOpen();
|
|
565
|
-
var O = u ?
|
|
566
|
-
var M = u ? q :
|
|
567
|
-
var S = v.
|
|
568
|
-
var k = S ? "
|
|
569
|
-
var
|
|
544
|
+
var O = u ? R : P;
|
|
545
|
+
var M = u ? q : T;
|
|
546
|
+
var S = v.isEnterprise;
|
|
547
|
+
var k = S ? "above" : "below";
|
|
548
|
+
var w = r;
|
|
549
|
+
if (r === undefined) {
|
|
550
|
+
w = S ? "inverted" : "normal";
|
|
551
|
+
}
|
|
552
|
+
var _;
|
|
570
553
|
if (h === "label") {
|
|
571
|
-
|
|
554
|
+
_ = {
|
|
572
555
|
labelledBy: this.ariaId,
|
|
573
556
|
"aria-labelledby": this.ariaId
|
|
574
557
|
};
|
|
575
558
|
} else if (h === "description") {
|
|
576
|
-
|
|
559
|
+
_ = {
|
|
577
560
|
describedBy: this.ariaId,
|
|
578
561
|
"aria-describedby": this.ariaId
|
|
579
562
|
};
|
|
580
563
|
}
|
|
581
564
|
|
|
582
|
-
return o().createElement(O,
|
|
565
|
+
return o().createElement(O, j({
|
|
583
566
|
"data-test": "tooltip",
|
|
584
567
|
"data-test-open": C,
|
|
585
568
|
"data-test-popover-id": this.popoverId,
|
|
@@ -590,18 +573,18 @@
|
|
|
590
573
|
onBlur: this.handleBlur,
|
|
591
574
|
ref: this.handleMount,
|
|
592
575
|
"data-test": "toggle"
|
|
593
|
-
}, g && (0, n.isValidElement)(a) ? (0, n.cloneElement)(a,
|
|
576
|
+
}, g && (0, n.isValidElement)(a) ? (0, n.cloneElement)(a, _) : a, g && !a && o().createElement(x, {
|
|
594
577
|
"aria-describedby": this.ariaId
|
|
595
|
-
}, S ? o().createElement(
|
|
578
|
+
}, S ? o().createElement(o().Fragment, null, o().createElement("span", {
|
|
579
|
+
"aria-hidden": "true"
|
|
580
|
+
}, "?"), o().createElement(f(), null, (0, m._)("More info"))) : o().createElement(E, {
|
|
596
581
|
hideDefaultTooltip: true,
|
|
597
582
|
screenReaderText: (0, m._)("More info"),
|
|
598
583
|
style: {
|
|
599
584
|
height: "22px",
|
|
600
585
|
width: "22px"
|
|
601
586
|
}
|
|
602
|
-
})
|
|
603
|
-
"aria-hidden": "true"
|
|
604
|
-
}, "?"), o().createElement(f(), null, (0, m._)("More info")))), g && o().createElement(f(), {
|
|
587
|
+
})), g && o().createElement(f(), {
|
|
605
588
|
"aria-hidden": "true",
|
|
606
589
|
id: this.ariaId
|
|
607
590
|
}, i)), o().createElement(p(), {
|
|
@@ -611,7 +594,7 @@
|
|
|
611
594
|
animationConfig: {
|
|
612
595
|
tension: 400
|
|
613
596
|
},
|
|
614
|
-
appearance:
|
|
597
|
+
appearance: w,
|
|
615
598
|
closeReasons: [ "offScreen", "escapeKey" ],
|
|
616
599
|
defaultPlacement: l === "theme" ? k : l,
|
|
617
600
|
id: this.popoverId,
|
|
@@ -620,18 +603,19 @@
|
|
|
620
603
|
elementRef: this.handlePopoverMount,
|
|
621
604
|
hitAreaRef: this.handleHitAreaMount,
|
|
622
605
|
outerRef: this.handlePopoverOuterMount
|
|
623
|
-
}, o().createElement(
|
|
606
|
+
}, o().createElement(L, {
|
|
624
607
|
$isLabel: h === "label"
|
|
625
608
|
}, i)));
|
|
626
609
|
}
|
|
627
610
|
} ]);
|
|
628
611
|
return r;
|
|
629
612
|
}(n.Component);
|
|
630
|
-
U(
|
|
631
|
-
U(
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
/* harmony default export */ const
|
|
635
|
-
//
|
|
613
|
+
U(X, "propTypes", J);
|
|
614
|
+
U(X, "defaultProps", Q);
|
|
615
|
+
var Y = (0, v.withSplunkTheme)(X);
|
|
616
|
+
Y.propTypes = X.propTypes;
|
|
617
|
+
/* harmony default export */ const ee = Y;
|
|
618
|
+
// only for styled components using Tooltip
|
|
619
|
+
// CONCATENATED MODULE: ./src/Tooltip/index.ts
|
|
636
620
|
module.exports = t;
|
|
637
621
|
/******/})();
|