@splunk/react-ui 4.16.0 → 4.16.2
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/CHANGELOG.md +15 -1
- package/ControlGroup.js +24 -14
- package/Dropdown.js +56 -15
- package/Heading.js +10 -46
- package/Multiselect.js +1 -0
- package/Select.js +1 -0
- package/package.json +4 -4
- package/types/src/Dropdown/Dropdown.d.ts +12 -7
- package/types/src/Multiselect/Multiselect.d.ts +1 -1
- package/types/src/Select/Select.d.ts +1 -1
- package/types/src/Select/SelectBase.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
============
|
|
3
|
+
|
|
4
|
+
4.16.2 - January 26, 2023
|
|
5
|
+
----------
|
|
6
|
+
Bug Fixes:
|
|
7
|
+
* Revert usage of pre-release `@splunk/react-icons` features.
|
|
8
|
+
|
|
9
|
+
4.16.1 - January 25, 2023
|
|
10
|
+
----------
|
|
11
|
+
Bug Fixes:
|
|
12
|
+
* `Select` and `Multiselect` now can be opened with the up and down arrow keys (SUI-3527).
|
|
13
|
+
* Updated `ControlGroup` to fix `labelPosition="top"` misalignment in Prisma themes (SUI-5278).
|
|
14
|
+
* Note: this may cause slight layout changes for existing usages of `ControlGroup`.
|
|
15
|
+
* `axe-html-reporter` no longer incorrectly listed as a dependency.
|
|
16
|
+
|
|
3
17
|
4.16.0 - January 10, 2023
|
|
4
18
|
----------
|
|
5
19
|
New Features:
|
|
@@ -911,7 +925,7 @@ Bug Fixes:
|
|
|
911
925
|
* Changed primary and error `Button` font weight to semibold (SUI-1350).
|
|
912
926
|
* Corrected hover color on `Button` (SUI-1364).
|
|
913
927
|
|
|
914
|
-
1.1.0 - January
|
|
928
|
+
1.1.0 - January 25, 2018
|
|
915
929
|
----------
|
|
916
930
|
New Features:
|
|
917
931
|
* DOM hook added to `RenderToLayer` to facilitate interactions with Backbone components (SUI-1327).
|
package/ControlGroup.js
CHANGED
|
@@ -156,18 +156,19 @@ var Box_default = /*#__PURE__*/__webpack_require__.n(Box_);
|
|
|
156
156
|
var ScreenReaderContent_ = __webpack_require__(16);
|
|
157
157
|
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
158
158
|
|
|
159
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Tooltip"
|
|
160
|
-
var Tooltip_ = __webpack_require__(67);
|
|
161
|
-
var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_);
|
|
162
|
-
|
|
163
159
|
// EXTERNAL MODULE: external "styled-components"
|
|
164
160
|
var external_styled_components_ = __webpack_require__(3);
|
|
165
161
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
166
162
|
|
|
163
|
+
// EXTERNAL MODULE: external "@splunk/react-ui/Tooltip"
|
|
164
|
+
var Tooltip_ = __webpack_require__(67);
|
|
165
|
+
var Tooltip_default = /*#__PURE__*/__webpack_require__.n(Tooltip_);
|
|
166
|
+
|
|
167
167
|
// CONCATENATED MODULE: ./src/ControlGroup/ControlGroupStyles.ts
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
|
|
171
|
+
|
|
171
172
|
var StyledBox = external_styled_components_default()(Box_default.a).withConfig({
|
|
172
173
|
displayName: "ControlGroupStyles__StyledBox",
|
|
173
174
|
componentId: "wjnyif-0"
|
|
@@ -207,7 +208,7 @@ var StyledLabelWrapper = external_styled_components_default.a.div.withConfig({
|
|
|
207
208
|
}), function (_ref2) {
|
|
208
209
|
var $labelPosition = _ref2.$labelPosition;
|
|
209
210
|
return $labelPosition === 'top' ? Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
|
|
210
|
-
prisma: Object(external_styled_components_["css"])(["padding-bottom:", ";"], themes_["variables"].spacingXSmall)
|
|
211
|
+
prisma: Object(external_styled_components_["css"])(["height:24px;padding-bottom:", ";"], themes_["variables"].spacingXSmall)
|
|
211
212
|
})) : Object(external_styled_components_["css"])(["", ""], Object(themes_["pick"])({
|
|
212
213
|
prisma: Object(external_styled_components_["css"])(["min-height:", ";"], themes_["variables"].inputHeight)
|
|
213
214
|
}));
|
|
@@ -228,21 +229,30 @@ var StyledLabel = external_styled_components_default.a.label.withConfig({
|
|
|
228
229
|
enterprise: 'right',
|
|
229
230
|
prisma: 'left'
|
|
230
231
|
}));
|
|
232
|
+
var StyledTooltip = external_styled_components_default()(Tooltip_default.a).withConfig({
|
|
233
|
+
displayName: "ControlGroupStyles__StyledTooltip",
|
|
234
|
+
componentId: "wjnyif-5"
|
|
235
|
+
})(["", ""], function (_ref3) {
|
|
236
|
+
var $labelPosition = _ref3.$labelPosition;
|
|
237
|
+
return $labelPosition === 'top' && Object(external_styled_components_["css"])(["button{", "}"], Object(themes_["pick"])({
|
|
238
|
+
prisma: Object(external_styled_components_["css"])(["svg{width:20px;height:20px;}padding:4px;"])
|
|
239
|
+
}));
|
|
240
|
+
});
|
|
231
241
|
var StyledHelp = external_styled_components_default.a.div.withConfig({
|
|
232
242
|
displayName: "ControlGroupStyles__StyledHelp",
|
|
233
|
-
componentId: "wjnyif-
|
|
243
|
+
componentId: "wjnyif-6"
|
|
234
244
|
})(["", ";font-size:", ";color:", ";margin-top:", ";", ""], themes_["mixins"].reset('block'), themes_["variables"].fontSizeSmall, themes_["variables"].contentColorMuted, Object(themes_["pick"])({
|
|
235
245
|
enterprise: '2px',
|
|
236
246
|
prisma: '4px'
|
|
237
|
-
}), function (
|
|
238
|
-
var $error =
|
|
247
|
+
}), function (_ref4) {
|
|
248
|
+
var $error = _ref4.$error;
|
|
239
249
|
return $error && Object(external_styled_components_["css"])(["color:inherit;"]);
|
|
240
250
|
});
|
|
241
251
|
var StyledErrorText = external_styled_components_default.a.div.withConfig({
|
|
242
252
|
displayName: "ControlGroupStyles__StyledErrorText",
|
|
243
|
-
componentId: "wjnyif-
|
|
244
|
-
})(["", ";font-size:", ";[aria-invalid] > &{color:inherit;}", ""], themes_["mixins"].reset('block'), themes_["variables"].fontSizeSmall, function (
|
|
245
|
-
var $help =
|
|
253
|
+
componentId: "wjnyif-7"
|
|
254
|
+
})(["", ";font-size:", ";[aria-invalid] > &{color:inherit;}", ""], themes_["mixins"].reset('block'), themes_["variables"].fontSizeSmall, function (_ref5) {
|
|
255
|
+
var $help = _ref5.$help;
|
|
246
256
|
return !$help && Object(external_styled_components_["css"])(["margin-top:", ";"], Object(themes_["pick"])({
|
|
247
257
|
enterprise: '2px',
|
|
248
258
|
prisma: '4px'
|
|
@@ -250,7 +260,7 @@ var StyledErrorText = external_styled_components_default.a.div.withConfig({
|
|
|
250
260
|
});
|
|
251
261
|
var StyledAsterisk = external_styled_components_default.a.span.withConfig({
|
|
252
262
|
displayName: "ControlGroupStyles__StyledAsterisk",
|
|
253
|
-
componentId: "wjnyif-
|
|
263
|
+
componentId: "wjnyif-8"
|
|
254
264
|
})(["color:inherit;margin-right:2px;"]);
|
|
255
265
|
|
|
256
266
|
// CONCATENATED MODULE: ./src/ControlGroup/ControlGroupContext.tsx
|
|
@@ -320,7 +330,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
320
330
|
|
|
321
331
|
|
|
322
332
|
|
|
323
|
-
|
|
324
333
|
// props ControlGroup may access and/or override on children
|
|
325
334
|
|
|
326
335
|
var propTypes = {
|
|
@@ -637,7 +646,8 @@ var ControlGroup_ControlGroup = /*#__PURE__*/function (_Component) {
|
|
|
637
646
|
$tooltip: !!tooltip
|
|
638
647
|
}, required && /*#__PURE__*/external_react_default.a.createElement(StyledAsterisk, {
|
|
639
648
|
"aria-hidden": "true"
|
|
640
|
-
}, "*"), label, !isPrisma && !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement("span", null, "\xA0"), !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, tooltip)), !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement(
|
|
649
|
+
}, "*"), label, !isPrisma && !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement("span", null, "\xA0"), !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement(ScreenReaderContent_default.a, null, tooltip)), !hideLabel && tooltip && /*#__PURE__*/external_react_default.a.createElement(StyledTooltip, {
|
|
650
|
+
$labelPosition: labelPosition,
|
|
641
651
|
closeWhen: "notOnClick",
|
|
642
652
|
content: tooltip,
|
|
643
653
|
defaultPlacement: tooltipDefaultPlacement,
|
package/Dropdown.js
CHANGED
|
@@ -208,6 +208,9 @@ var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
|
208
208
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
209
209
|
var id_ = __webpack_require__(13);
|
|
210
210
|
|
|
211
|
+
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
212
|
+
var keyboard_ = __webpack_require__(9);
|
|
213
|
+
|
|
211
214
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
212
215
|
var Popover_ = __webpack_require__(23);
|
|
213
216
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
@@ -255,6 +258,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
255
258
|
|
|
256
259
|
|
|
257
260
|
|
|
261
|
+
|
|
258
262
|
/** @public */
|
|
259
263
|
|
|
260
264
|
var possibleCloseReasons = ['clickAway', 'contentClick', 'escapeKey', 'offScreen', 'tabKey', 'toggleClick'];
|
|
@@ -270,6 +274,7 @@ var propTypes = {
|
|
|
270
274
|
onRequestClose: external_prop_types_default.a.func,
|
|
271
275
|
onRequestOpen: external_prop_types_default.a.func,
|
|
272
276
|
open: external_prop_types_default.a.bool,
|
|
277
|
+
openWithArrowKeys: external_prop_types_default.a.bool,
|
|
273
278
|
repositionMode: external_prop_types_default.a.oneOf(['none', 'flip', 'any']),
|
|
274
279
|
retainFocus: external_prop_types_default.a.bool,
|
|
275
280
|
takeFocus: external_prop_types_default.a.bool,
|
|
@@ -283,6 +288,7 @@ var defaultProps = {
|
|
|
283
288
|
focusToggleReasons: ['contentClick', 'escapeKey', 'tabKey', 'toggleClick'],
|
|
284
289
|
repositionMode: 'flip',
|
|
285
290
|
retainFocus: false,
|
|
291
|
+
openWithArrowKeys: false,
|
|
286
292
|
takeFocus: true
|
|
287
293
|
};
|
|
288
294
|
var legacyRefMode = Symbol('Dropdown legacy ref mode marker');
|
|
@@ -355,13 +361,40 @@ var Dropdown_Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
355
361
|
}
|
|
356
362
|
});
|
|
357
363
|
|
|
364
|
+
_defineProperty(_assertThisInitialized(_this), "handleToggleKeyDownOpen", function (e) {
|
|
365
|
+
var _this$props$toggle$pr3, _this$props$toggle$pr4;
|
|
366
|
+
|
|
367
|
+
(_this$props$toggle$pr3 = (_this$props$toggle$pr4 = _this.props.toggle.props).onKeyDown) === null || _this$props$toggle$pr3 === void 0 ? void 0 : _this$props$toggle$pr3.call(_this$props$toggle$pr4, e);
|
|
368
|
+
|
|
369
|
+
if (!_this.props.openWithArrowKeys) {
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
var eventKeyCode = Object(keyboard_["keycode"])(e.nativeEvent);
|
|
374
|
+
|
|
375
|
+
if (eventKeyCode === 'up' || eventKeyCode === 'down') {
|
|
376
|
+
var _this$props$onRequest2, _this$props2;
|
|
377
|
+
|
|
378
|
+
e.preventDefault();
|
|
379
|
+
(_this$props$onRequest2 = (_this$props2 = _this.props).onRequestOpen) === null || _this$props$onRequest2 === void 0 ? void 0 : _this$props$onRequest2.call(_this$props2, e, {
|
|
380
|
+
reason: 'toggleKeydown'
|
|
381
|
+
});
|
|
382
|
+
|
|
383
|
+
if (!_this.isControlled()) {
|
|
384
|
+
_this.setState({
|
|
385
|
+
open: true
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
|
|
358
391
|
_defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (info) {
|
|
359
392
|
var event = info.event,
|
|
360
393
|
reason = info.reason;
|
|
361
|
-
var _this$
|
|
362
|
-
closeReasons = _this$
|
|
363
|
-
focusToggleReasons = _this$
|
|
364
|
-
onRequestClose = _this$
|
|
394
|
+
var _this$props3 = _this.props,
|
|
395
|
+
closeReasons = _this$props3.closeReasons,
|
|
396
|
+
focusToggleReasons = _this$props3.focusToggleReasons,
|
|
397
|
+
onRequestClose = _this$props3.onRequestClose;
|
|
365
398
|
|
|
366
399
|
if (event && reason === 'clickAway') {
|
|
367
400
|
var el = event.target;
|
|
@@ -445,22 +478,23 @@ var Dropdown_Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
445
478
|
var _cloneElement;
|
|
446
479
|
|
|
447
480
|
return /*#__PURE__*/Object(external_react_["cloneElement"])(this.props.toggle, (_cloneElement = {
|
|
448
|
-
onClick: this.handleToggleClick
|
|
481
|
+
onClick: this.handleToggleClick,
|
|
482
|
+
onKeyDown: this.handleToggleKeyDownOpen
|
|
449
483
|
}, _defineProperty(_cloneElement, this.props.toggle.type[legacyRefMode] ? 'elementRef' : 'ref', this.handleToggleMount), _defineProperty(_cloneElement, 'aria-controls', this.isOpen() ? this.popoverId : undefined), _defineProperty(_cloneElement, 'aria-haspopup', true), _defineProperty(_cloneElement, 'aria-expanded', this.isOpen()), _defineProperty(_cloneElement, 'data-test', this.props.toggle.props['data-test'] || 'dropdown'), _defineProperty(_cloneElement, 'data-test-popover-id', this.popoverId), _defineProperty(_cloneElement, "id", this.props.inputId || this.props.toggle.props.id || this.toggleId), _cloneElement));
|
|
450
484
|
}
|
|
451
485
|
}, {
|
|
452
486
|
key: "render",
|
|
453
487
|
value: function render() {
|
|
454
|
-
var _this$
|
|
455
|
-
align = _this$
|
|
456
|
-
canCoverAnchor = _this$
|
|
457
|
-
children = _this$
|
|
458
|
-
closeReasons = _this$
|
|
459
|
-
defaultPlacement = _this$
|
|
460
|
-
elementRef = _this$
|
|
461
|
-
repositionMode = _this$
|
|
462
|
-
retainFocus = _this$
|
|
463
|
-
takeFocus = _this$
|
|
488
|
+
var _this$props4 = this.props,
|
|
489
|
+
align = _this$props4.align,
|
|
490
|
+
canCoverAnchor = _this$props4.canCoverAnchor,
|
|
491
|
+
children = _this$props4.children,
|
|
492
|
+
closeReasons = _this$props4.closeReasons,
|
|
493
|
+
defaultPlacement = _this$props4.defaultPlacement,
|
|
494
|
+
elementRef = _this$props4.elementRef,
|
|
495
|
+
repositionMode = _this$props4.repositionMode,
|
|
496
|
+
retainFocus = _this$props4.retainFocus,
|
|
497
|
+
takeFocus = _this$props4.takeFocus;
|
|
464
498
|
var anchor = this.state.anchor;
|
|
465
499
|
var handleRequestClose = this.handleRequestClose,
|
|
466
500
|
handleContentClick = this.handleContentClick;
|
|
@@ -524,6 +558,13 @@ module.exports = require("lodash/isFunction");
|
|
|
524
558
|
|
|
525
559
|
/***/ }),
|
|
526
560
|
|
|
561
|
+
/***/ 9:
|
|
562
|
+
/***/ (function(module, exports) {
|
|
563
|
+
|
|
564
|
+
module.exports = require("@splunk/ui-utils/keyboard");
|
|
565
|
+
|
|
566
|
+
/***/ }),
|
|
567
|
+
|
|
527
568
|
/***/ 91:
|
|
528
569
|
/***/ (function(module, exports) {
|
|
529
570
|
|
package/Heading.js
CHANGED
|
@@ -140,54 +140,29 @@ var StyledH1 = external_styled_components_default.a.h1.withConfig({
|
|
|
140
140
|
displayName: "HeadingStyles__StyledH1",
|
|
141
141
|
componentId: "sc-15s3yx3-0"
|
|
142
142
|
})(["", ";", " margin:1.414em 0 0.4em;text-rendering:optimizelegibility;", " ", ""], themes_["mixins"].reset('block'), Object(themes_["pickVariant"])('as', {
|
|
143
|
-
h1: {
|
|
144
|
-
|
|
145
|
-
lineHeight: 20,
|
|
146
|
-
size: 24,
|
|
147
|
-
weight: 500
|
|
148
|
-
}),
|
|
149
|
-
prisma: Object(external_styled_components_["css"])(["", " line-height:48px;"], themes_["mixins"].typography('title1'))
|
|
143
|
+
h1: function h1() {
|
|
144
|
+
return themes_["mixins"].typography('title1');
|
|
150
145
|
},
|
|
151
|
-
h2: {
|
|
152
|
-
|
|
153
|
-
lineHeight: 20,
|
|
154
|
-
size: 18,
|
|
155
|
-
weight: 500
|
|
156
|
-
}),
|
|
157
|
-
prisma: themes_["mixins"].typography('title2', {
|
|
158
|
-
lineHeight: 24,
|
|
159
|
-
size: 24
|
|
160
|
-
})
|
|
146
|
+
h2: function h2() {
|
|
147
|
+
return themes_["mixins"].typography('title2');
|
|
161
148
|
},
|
|
162
|
-
h3: {
|
|
163
|
-
|
|
164
|
-
lineHeight: 20,
|
|
165
|
-
size: 16,
|
|
166
|
-
weight: 500
|
|
167
|
-
}),
|
|
168
|
-
prisma: themes_["mixins"].typography('title3')
|
|
149
|
+
h3: function h3() {
|
|
150
|
+
return themes_["mixins"].typography('title3');
|
|
169
151
|
},
|
|
170
152
|
h4: {
|
|
171
153
|
enterprise: {
|
|
172
154
|
compact: function compact(_ref) {
|
|
173
155
|
var $isSection = _ref.$isSection;
|
|
174
156
|
return $isSection ? themes_["mixins"].typography('title4', {
|
|
175
|
-
lineHeight: 20,
|
|
176
|
-
size: 12,
|
|
177
157
|
weight: 500
|
|
178
|
-
}) : themes_["mixins"].typography('title4'
|
|
179
|
-
lineHeight: 20,
|
|
180
|
-
size: 12
|
|
181
|
-
});
|
|
158
|
+
}) : themes_["mixins"].typography('title4');
|
|
182
159
|
},
|
|
183
160
|
comfortable: function comfortable(_ref2) {
|
|
184
161
|
var $isSection = _ref2.$isSection;
|
|
185
162
|
return $isSection ? themes_["mixins"].typography('title4', {
|
|
186
|
-
lineHeight: 20,
|
|
187
163
|
size: 14,
|
|
188
164
|
weight: 500
|
|
189
165
|
}) : themes_["mixins"].typography('title4', {
|
|
190
|
-
lineHeight: 20,
|
|
191
166
|
size: 14
|
|
192
167
|
});
|
|
193
168
|
}
|
|
@@ -196,23 +171,12 @@ var StyledH1 = external_styled_components_default.a.h1.withConfig({
|
|
|
196
171
|
var $isSection = _ref3.$isSection;
|
|
197
172
|
return $isSection ? themes_["mixins"].typography('title4', {
|
|
198
173
|
color: 'default',
|
|
199
|
-
lineHeight: 24,
|
|
200
174
|
size: 14
|
|
201
|
-
}) : themes_["mixins"].typography('title4'
|
|
202
|
-
lineHeight: 24,
|
|
203
|
-
size: 16
|
|
204
|
-
});
|
|
175
|
+
}) : themes_["mixins"].typography('title4');
|
|
205
176
|
}
|
|
206
177
|
},
|
|
207
|
-
h5: {
|
|
208
|
-
|
|
209
|
-
size: 12,
|
|
210
|
-
weight: 500
|
|
211
|
-
}),
|
|
212
|
-
prisma: Object(external_styled_components_["css"])(["", " font-size:13px;"], themes_["mixins"].typography('title5', {
|
|
213
|
-
color: 'default',
|
|
214
|
-
lineHeight: 16
|
|
215
|
-
}))
|
|
178
|
+
h5: function h5() {
|
|
179
|
+
return themes_["mixins"].typography('title5');
|
|
216
180
|
}
|
|
217
181
|
}), Object(themes_["pickVariant"])('$isSection', {
|
|
218
182
|
"true": {
|
package/Multiselect.js
CHANGED
|
@@ -2193,6 +2193,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
|
|
|
2193
2193
|
onRequestOpen: this.handleRequestOpen,
|
|
2194
2194
|
onRequestClose: this.handleRequestClose,
|
|
2195
2195
|
open: this.state.open,
|
|
2196
|
+
openWithArrowKeys: true,
|
|
2196
2197
|
repositionMode: repositionMode,
|
|
2197
2198
|
defaultPlacement: filterEnabled ? defaultPlacement : undefined,
|
|
2198
2199
|
canCoverAnchor: Object(ssrWindow["a" /* getWindow */])().innerHeight < 500,
|
package/Select.js
CHANGED
|
@@ -2352,6 +2352,7 @@ var SelectBase_SelectBase = /*#__PURE__*/function (_Component) {
|
|
|
2352
2352
|
onRequestOpen: this.handleRequestOpen,
|
|
2353
2353
|
onRequestClose: this.handleRequestClose,
|
|
2354
2354
|
open: this.state.open,
|
|
2355
|
+
openWithArrowKeys: true,
|
|
2355
2356
|
repositionMode: repositionMode,
|
|
2356
2357
|
defaultPlacement: filterEnabled ? defaultPlacement : undefined,
|
|
2357
2358
|
canCoverAnchor: Object(ssrWindow["a" /* getWindow */])().innerHeight < 500,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@splunk/react-ui",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.2",
|
|
4
4
|
"description": "Library of React components that implement the Splunk design language",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Splunk Inc.",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"styled-components": "5.1.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@splunk/react-icons": "
|
|
42
|
-
"@splunk/themes": "^0.
|
|
41
|
+
"@splunk/react-icons": "3.3.1",
|
|
42
|
+
"@splunk/themes": "^0.15.0",
|
|
43
43
|
"@splunk/ui-utils": "^1.5.2",
|
|
44
44
|
"@types/commonmark": "^0.27.0",
|
|
45
45
|
"@types/lodash": "^4.14.156",
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
"@types/react-resize-detector": "^3.1.1",
|
|
49
49
|
"@types/styled-components": "^5.1.0",
|
|
50
50
|
"@types/tinycolor2": "^1.4.2",
|
|
51
|
-
"axe-html-reporter": "^2.2.3",
|
|
52
51
|
"commonmark": "^0.27.0",
|
|
53
52
|
"commonmark-react-renderer": "^4.3.2",
|
|
54
53
|
"decimal.js-light": "^2.2.3",
|
|
@@ -97,6 +96,7 @@
|
|
|
97
96
|
"@types/webpack-env": "^1.15.2",
|
|
98
97
|
"@typescript-eslint/eslint-plugin": "^4.8.2",
|
|
99
98
|
"@typescript-eslint/parser": "^4.8.2",
|
|
99
|
+
"axe-html-reporter": "^2.2.3",
|
|
100
100
|
"axe-playwright": "^1.1.11",
|
|
101
101
|
"babel-loader": "^8.0.4",
|
|
102
102
|
"babel-plugin-istanbul": "^5.1.0",
|
|
@@ -21,8 +21,8 @@ declare type DropdownRequestCloseHandler = (data: {
|
|
|
21
21
|
reason: DropdownPossibleCloseReason;
|
|
22
22
|
}) => void;
|
|
23
23
|
/** @public */
|
|
24
|
-
declare type DropdownRequestOpenHandler = (event: React.MouseEvent<HTMLElement>, data: {
|
|
25
|
-
reason: 'toggleClick';
|
|
24
|
+
declare type DropdownRequestOpenHandler = (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, data: {
|
|
25
|
+
reason: 'toggleClick' | 'toggleKeydown';
|
|
26
26
|
}) => void;
|
|
27
27
|
/** @public */
|
|
28
28
|
declare type DropdownToggleElement = React.ReactElement<React.HTMLAttributes<HTMLElement> & {
|
|
@@ -80,8 +80,7 @@ interface DropdownPropsBase {
|
|
|
80
80
|
*/
|
|
81
81
|
onRequestClose?: DropdownRequestCloseHandler;
|
|
82
82
|
/**
|
|
83
|
-
* A callback function invoked with a data object containing the event.
|
|
84
|
-
* always toggleClick.
|
|
83
|
+
* A callback function invoked with a data object containing the event.
|
|
85
84
|
*/
|
|
86
85
|
onRequestOpen?: DropdownRequestOpenHandler;
|
|
87
86
|
/**
|
|
@@ -91,6 +90,11 @@ interface DropdownPropsBase {
|
|
|
91
90
|
* open prop is provided, the component handles the open/close state internally.
|
|
92
91
|
*/
|
|
93
92
|
open?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* A private prop to support up and down arrow key navigation for `Select` and `Multiselect`.
|
|
95
|
+
* @private
|
|
96
|
+
*/
|
|
97
|
+
openWithArrowKeys?: boolean;
|
|
94
98
|
/**
|
|
95
99
|
* See `repositionMode` on `Popover` for details.
|
|
96
100
|
*/
|
|
@@ -114,7 +118,7 @@ interface DropdownPropsBase {
|
|
|
114
118
|
*/
|
|
115
119
|
toggle: DropdownToggleElement;
|
|
116
120
|
}
|
|
117
|
-
declare const defaultProps: Required<Pick<DropdownPropsBase, 'align' | 'canCoverAnchor' | 'closeReasons' | 'defaultPlacement' | 'focusToggleReasons' | 'repositionMode' | 'retainFocus' | 'takeFocus'>>;
|
|
121
|
+
declare const defaultProps: Required<Pick<DropdownPropsBase, 'align' | 'canCoverAnchor' | 'closeReasons' | 'defaultPlacement' | 'focusToggleReasons' | 'repositionMode' | 'retainFocus' | 'openWithArrowKeys' | 'takeFocus'>>;
|
|
118
122
|
interface DropdownPropsBaseControlled extends DropdownPropsBase {
|
|
119
123
|
onRequestClose: DropdownRequestCloseHandler;
|
|
120
124
|
onRequestOpen: DropdownRequestOpenHandler;
|
|
@@ -140,12 +144,13 @@ declare class Dropdown extends Component<DropdownProps, DropdownState> {
|
|
|
140
144
|
* docs extraction.
|
|
141
145
|
*/
|
|
142
146
|
static possibleCloseReasons: DropdownPossibleCloseReason[];
|
|
143
|
-
static propTypes: React.WeakValidationMap<DropdownPropsBaseControlled & Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons">>> | React.WeakValidationMap<DropdownPropsBaseUncontrolled & Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons">>>;
|
|
144
|
-
static defaultProps: Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons">>;
|
|
147
|
+
static propTypes: React.WeakValidationMap<DropdownPropsBaseControlled & Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "openWithArrowKeys">>> | React.WeakValidationMap<DropdownPropsBaseUncontrolled & Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "openWithArrowKeys">>>;
|
|
148
|
+
static defaultProps: Required<Pick<DropdownPropsBase, "align" | "retainFocus" | "takeFocus" | "closeReasons" | "canCoverAnchor" | "defaultPlacement" | "repositionMode" | "focusToggleReasons" | "openWithArrowKeys">>;
|
|
145
149
|
constructor(props: Readonly<DropdownProps>);
|
|
146
150
|
componentDidUpdate(): void;
|
|
147
151
|
private handleToggleMount;
|
|
148
152
|
private handleToggleClick;
|
|
153
|
+
private handleToggleKeyDownOpen;
|
|
149
154
|
private handleRequestClose;
|
|
150
155
|
private handleContentClick;
|
|
151
156
|
private isOpen;
|
|
@@ -4,7 +4,7 @@ import { CompactPropsBase } from './Compact';
|
|
|
4
4
|
import Option from './Option';
|
|
5
5
|
import { ClassComponentProps } from '../utils/types';
|
|
6
6
|
/** @public */
|
|
7
|
-
declare type MultiselectFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLSpanElement
|
|
7
|
+
declare type MultiselectFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent, data: {
|
|
8
8
|
keyword: string;
|
|
9
9
|
}) => void;
|
|
10
10
|
/** @public */
|
|
@@ -8,7 +8,7 @@ declare type SelectChangeHandler = (event: React.MouseEvent<HTMLButtonElement> |
|
|
|
8
8
|
value: string | number | boolean;
|
|
9
9
|
}) => void;
|
|
10
10
|
/** @public */
|
|
11
|
-
declare type SelectFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.MouseEvent<HTMLSpanElement
|
|
11
|
+
declare type SelectFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent, data: {
|
|
12
12
|
keyword: string;
|
|
13
13
|
}) => void;
|
|
14
14
|
/** @public */
|
|
@@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import { Divider, Heading } from '@splunk/react-ui/Menu';
|
|
3
3
|
import Option from './OptionBase';
|
|
4
4
|
import { ClassComponentProps } from '../utils/types';
|
|
5
|
-
declare type SelectBaseFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLSpanElement
|
|
5
|
+
declare type SelectBaseFilterChangeHandler = (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement> | React.FocusEvent<HTMLInputElement> | React.MouseEvent<HTMLSpanElement> | React.KeyboardEvent, data: {
|
|
6
6
|
keyword: string;
|
|
7
7
|
}) => void;
|
|
8
8
|
declare type SelectBaseChangeHandler = (event: React.MouseEvent<HTMLButtonElement> | React.KeyboardEvent<HTMLInputElement>, data: {
|