@splunk/react-ui 4.12.1 → 4.14.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/.storybook-visual/config/snapshotResolver.js +29 -0
- package/.storybook-visual/main.js +22 -0
- package/.storybook-visual/preview.jsx +31 -0
- package/.storybook-visual/scripts/test.sh +108 -0
- package/.storybook-visual/test-runner.js +108 -0
- package/Accordion.js +4 -4
- package/Anchor.js +2 -2
- package/Animation.js +6 -6
- package/AnimationToggle.js +2 -2
- package/Box.js +2 -2
- package/Button.js +23 -23
- package/ButtonGroup.js +2 -2
- package/ButtonSimple.js +7 -7
- package/CHANGELOG.md +33 -0
- package/Calendar.js +390 -95
- package/Card.js +25 -23
- package/CardLayout.js +2 -2
- package/Chip.js +17 -17
- package/Clickable.js +4 -4
- package/CloseButton.js +15 -15
- package/Code.js +4 -4
- package/CollapsiblePanel.js +15 -11
- package/Color.js +26 -26
- package/ColumnLayout.js +6 -6
- package/ComboBox.js +19 -19
- package/Concertina.js +6 -6
- package/ControlGroup.js +14 -13
- package/Date.js +118 -55
- package/DefinitionList.js +2 -2
- package/Divider.js +194 -0
- package/Dropdown.js +17 -13
- package/EventListener.js +4 -4
- package/File.js +23 -23
- package/FormRows.js +14 -14
- package/Heading.js +2 -2
- package/Image.js +19 -19
- package/JSONTree.js +2 -2
- package/Layer.js +85 -8
- package/Link.js +4 -4
- package/List.js +2 -2
- package/Markdown.js +18 -18
- package/Menu.js +51 -52
- package/Message.js +39 -39
- package/MessageBar.js +29 -29
- package/Modal.js +63 -37
- package/ModalLayer.js +11 -11
- package/Monogram.js +2 -2
- package/Multiselect.js +134 -125
- package/Number.js +8 -6
- package/Paginator.js +48 -48
- package/Paragraph.js +2 -2
- package/Popover.js +186 -19
- package/Progress.js +8 -8
- package/RadioBar.js +2 -2
- package/RadioList.js +4 -4
- package/Resize.js +4 -4
- package/ResultsMenu.js +20 -20
- package/ScreenReaderContent.js +2 -2
- package/Scroll.js +13 -13
- package/ScrollContainerContext.js +154 -3
- package/Search.js +25 -25
- package/Select.js +114 -105
- package/SidePanel.js +6 -6
- package/Slider.js +14 -14
- package/SlidingPanels.js +11 -11
- package/SplitButton.js +511 -0
- package/StaticContent.js +2 -2
- package/StepBar.js +10 -10
- package/Switch.js +8 -8
- package/TabBar.js +15 -15
- package/TabLayout.js +6 -6
- package/Table.js +275 -76
- package/Text.js +51 -42
- package/TextArea.js +41 -33
- package/Tooltip.js +17 -11
- package/TransitionOpen.js +39 -15
- package/Typography.js +4 -4
- package/WaitSpinner.js +4 -4
- package/package.json +12 -14
- package/test-runner-jest.config.js +18 -5
- package/types/src/Button/Button.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +15 -2
- package/types/src/Calendar/DateTable.d.ts +7 -3
- package/types/src/Calendar/Day.d.ts +14 -5
- package/types/src/CollapsiblePanel/CollapsiblePanel.d.ts +7 -3
- package/types/src/Date/Date.d.ts +17 -8
- package/types/src/Date/docs/examples/CustomDate.d.ts +2 -2
- package/types/src/Date/docs/examples/Disabled.d.ts +2 -2
- package/types/src/Date/docs/examples/prisma/WithoutCalendar.d.ts +2 -0
- package/types/src/Divider/Divider.d.ts +20 -0
- package/types/src/Divider/docs/examples/AriaHidden.d.ts +2 -0
- package/types/src/Divider/docs/examples/Basic.d.ts +2 -0
- package/types/src/Divider/docs/examples/CustomStyle.d.ts +2 -0
- package/types/src/Divider/docs/examples/Vertical.d.ts +2 -0
- package/types/src/Divider/index.d.ts +1 -0
- package/types/src/Dropdown/Dropdown.d.ts +11 -3
- package/types/src/Modal/Modal.d.ts +7 -3
- package/types/src/Modal/ModalContext.d.ts +1 -0
- package/types/src/Number/Number.d.ts +5 -1
- package/types/src/Popover/Popover.d.ts +5 -1
- package/types/src/Popover/getPlacement.d.ts +1 -1
- package/types/src/SplitButton/Item.d.ts +45 -0
- package/types/src/SplitButton/SplitButton.d.ts +41 -0
- package/types/src/SplitButton/docs/examples/Basic.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/ChangeLabel.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/Disabled.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/prisma/Basic.d.ts +1 -0
- package/types/src/SplitButton/docs/examples/prisma/Disabled.d.ts +1 -0
- package/types/src/SplitButton/index.d.ts +2 -0
- package/types/src/Table/HeadCell.d.ts +4 -1
- package/types/src/Table/HeadDropdownCell.d.ts +10 -3
- package/types/src/Table/docs/examples/FilterColumnValues.d.ts +14 -0
- package/types/src/Text/Text.d.ts +5 -1
- package/types/src/TextArea/TextArea.d.ts +5 -1
- package/types/src/Tooltip/Tooltip.d.ts +10 -5
- package/types/src/TransitionOpen/TransitionOpen.d.ts +7 -3
- package/types/src/useForceUpdate/index.d.ts +2 -0
- package/types/src/useForceUpdate/useForceUpdate.d.ts +9 -0
- package/types/src/useKeyPress/index.d.ts +37 -0
- package/useForceUpdate.js +151 -0
- package/useKeyPress.js +160 -0
- package/usePrevious.js +2 -2
package/Date.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 143);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -102,13 +102,6 @@ module.exports = require("prop-types");
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
104
|
/***/ 10:
|
|
105
|
-
/***/ (function(module, exports) {
|
|
106
|
-
|
|
107
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
108
|
-
|
|
109
|
-
/***/ }),
|
|
110
|
-
|
|
111
|
-
/***/ 11:
|
|
112
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
113
106
|
|
|
114
107
|
"use strict";
|
|
@@ -135,7 +128,14 @@ function updateReactRef(ref, current) {
|
|
|
135
128
|
|
|
136
129
|
/***/ }),
|
|
137
130
|
|
|
138
|
-
/***/
|
|
131
|
+
/***/ 11:
|
|
132
|
+
/***/ (function(module, exports) {
|
|
133
|
+
|
|
134
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
135
|
+
|
|
136
|
+
/***/ }),
|
|
137
|
+
|
|
138
|
+
/***/ 143:
|
|
139
139
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
140
140
|
|
|
141
141
|
"use strict";
|
|
@@ -158,21 +158,21 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
158
158
|
var external_lodash_ = __webpack_require__(4);
|
|
159
159
|
|
|
160
160
|
// EXTERNAL MODULE: external "moment"
|
|
161
|
-
var external_moment_ = __webpack_require__(
|
|
161
|
+
var external_moment_ = __webpack_require__(17);
|
|
162
162
|
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_);
|
|
163
163
|
|
|
164
164
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
165
|
-
var id_ = __webpack_require__(
|
|
165
|
+
var id_ = __webpack_require__(11);
|
|
166
166
|
|
|
167
167
|
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
168
168
|
var keyboard_ = __webpack_require__(9);
|
|
169
169
|
|
|
170
170
|
// EXTERNAL MODULE: external "@splunk/react-ui/Calendar"
|
|
171
|
-
var Calendar_ = __webpack_require__(
|
|
171
|
+
var Calendar_ = __webpack_require__(88);
|
|
172
172
|
var Calendar_default = /*#__PURE__*/__webpack_require__.n(Calendar_);
|
|
173
173
|
|
|
174
174
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
175
|
-
var Popover_ = __webpack_require__(
|
|
175
|
+
var Popover_ = __webpack_require__(18);
|
|
176
176
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
177
177
|
|
|
178
178
|
// EXTERNAL MODULE: external "@splunk/themes"
|
|
@@ -183,7 +183,7 @@ var external_styled_components_ = __webpack_require__(3);
|
|
|
183
183
|
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
184
184
|
|
|
185
185
|
// EXTERNAL MODULE: external "@splunk/react-ui/Text"
|
|
186
|
-
var Text_ = __webpack_require__(
|
|
186
|
+
var Text_ = __webpack_require__(24);
|
|
187
187
|
var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
|
|
188
188
|
|
|
189
189
|
// CONCATENATED MODULE: ./src/Date/DateStyles.ts
|
|
@@ -193,25 +193,25 @@ var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
|
|
|
193
193
|
var StyledText = external_styled_components_default()(Text_default.a).withConfig({
|
|
194
194
|
displayName: "DateStyles__StyledText",
|
|
195
195
|
componentId: "kacgdc-0"
|
|
196
|
-
})(["
|
|
196
|
+
})(["cursor:text;&[data-inline]{flex-basis:", ";width:", ";}"], Object(themes_["pick"])({
|
|
197
|
+
enterprise: '105px',
|
|
198
|
+
prisma: '150px'
|
|
199
|
+
}), Object(themes_["pick"])({
|
|
197
200
|
enterprise: {
|
|
198
201
|
comfortable: '105px',
|
|
199
202
|
compact: '80px'
|
|
200
203
|
},
|
|
201
204
|
prisma: '150px'
|
|
202
|
-
}), Object(themes_["pick"])({
|
|
203
|
-
enterprise: '105px',
|
|
204
|
-
prisma: '150px'
|
|
205
205
|
}));
|
|
206
206
|
var IconContainer = external_styled_components_default.a.div.withConfig({
|
|
207
207
|
displayName: "DateStyles__IconContainer",
|
|
208
208
|
componentId: "kacgdc-1"
|
|
209
|
-
})(["
|
|
210
|
-
comfortable: '0 8px',
|
|
211
|
-
compact: '0 6px'
|
|
212
|
-
}), Object(themes_["pickVariant"])('$disabled', {
|
|
209
|
+
})(["align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;"], Object(themes_["pickVariant"])('$disabled', {
|
|
213
210
|
"false": themes_["variables"].contentColorMuted,
|
|
214
211
|
"true": themes_["variables"].contentColorDisabled
|
|
212
|
+
}), Object(themes_["pick"])({
|
|
213
|
+
comfortable: '0 8px',
|
|
214
|
+
compact: '0 6px'
|
|
215
215
|
}));
|
|
216
216
|
|
|
217
217
|
// CONCATENATED MODULE: ./src/Date/Icon.tsx
|
|
@@ -235,7 +235,7 @@ function CalendarIcon(props) {
|
|
|
235
235
|
}));
|
|
236
236
|
}
|
|
237
237
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
238
|
-
var updateReactRef = __webpack_require__(
|
|
238
|
+
var updateReactRef = __webpack_require__(10);
|
|
239
239
|
|
|
240
240
|
// CONCATENATED MODULE: ./src/Date/Date.tsx
|
|
241
241
|
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); }
|
|
@@ -285,6 +285,7 @@ var propTypes = {
|
|
|
285
285
|
highlightToday: external_prop_types_default.a.bool,
|
|
286
286
|
inline: external_prop_types_default.a.bool,
|
|
287
287
|
inputId: external_prop_types_default.a.string,
|
|
288
|
+
inputOnly: external_prop_types_default.a.bool,
|
|
288
289
|
labelledBy: external_prop_types_default.a.string,
|
|
289
290
|
locale: external_prop_types_default.a.string,
|
|
290
291
|
name: external_prop_types_default.a.string,
|
|
@@ -303,6 +304,7 @@ var defaultProps = {
|
|
|
303
304
|
error: false,
|
|
304
305
|
highlightToday: false,
|
|
305
306
|
inline: true,
|
|
307
|
+
inputOnly: false,
|
|
306
308
|
locale: 'en_US'
|
|
307
309
|
};
|
|
308
310
|
|
|
@@ -337,6 +339,10 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
337
339
|
|
|
338
340
|
_defineProperty(_assertThisInitialized(_this), "popoverId", void 0);
|
|
339
341
|
|
|
342
|
+
_defineProperty(_assertThisInitialized(_this), "calendar", null);
|
|
343
|
+
|
|
344
|
+
_defineProperty(_assertThisInitialized(_this), "openWithFocus", false);
|
|
345
|
+
|
|
340
346
|
_defineProperty(_assertThisInitialized(_this), "applyTextChange", function (e) {
|
|
341
347
|
var date = external_moment_default()(_this.state.tempTextInputDate, 'l', _this.props.locale);
|
|
342
348
|
|
|
@@ -385,12 +391,9 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
385
391
|
_defineProperty(_assertThisInitialized(_this), "handleFocus", function (e) {
|
|
386
392
|
var _this$props$onFocus, _this$props2;
|
|
387
393
|
|
|
388
|
-
/* SUI-930 On IE 11 this handler is essentially deferred after calling
|
|
389
|
-
* this.textInput.focus(). this.focusCalledInternally enables the focus event to be ignored
|
|
390
|
-
* when the menu closes. */
|
|
391
394
|
if (_this.focusCalledInternally) {
|
|
392
395
|
_this.focusCalledInternally = false;
|
|
393
|
-
} else {
|
|
396
|
+
} else if (!_this.props.inputOnly) {
|
|
394
397
|
_this.setState({
|
|
395
398
|
calendarOpen: true
|
|
396
399
|
});
|
|
@@ -400,9 +403,13 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
400
403
|
});
|
|
401
404
|
|
|
402
405
|
_defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
|
|
403
|
-
var _this$props$onClick, _this$props3;
|
|
406
|
+
var _this$state$anchor, _this$props$onClick, _this$props3;
|
|
407
|
+
|
|
408
|
+
if (document.activeElement !== _this.state.input && ((_this$state$anchor = _this.state.anchor) === null || _this$state$anchor === void 0 ? void 0 : _this$state$anchor.contains(e.target))) {
|
|
409
|
+
_this.focus();
|
|
410
|
+
}
|
|
404
411
|
|
|
405
|
-
if (!_this.state.calendarOpen) {
|
|
412
|
+
if (!_this.props.inputOnly && !_this.state.calendarOpen) {
|
|
406
413
|
_this.setState({
|
|
407
414
|
calendarOpen: true
|
|
408
415
|
});
|
|
@@ -416,7 +423,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
416
423
|
|
|
417
424
|
_this.setState({
|
|
418
425
|
tempTextInputDate: value,
|
|
419
|
-
calendarOpen:
|
|
426
|
+
calendarOpen: !_this.props.inputOnly
|
|
420
427
|
});
|
|
421
428
|
});
|
|
422
429
|
|
|
@@ -427,10 +434,18 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
427
434
|
|
|
428
435
|
if (eventKeyCode === 'enter' || eventKeyCode === 'tab') {
|
|
429
436
|
_this.applyTextChange(e);
|
|
430
|
-
} else if (
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
437
|
+
} else if (!_this.props.inputOnly && eventKeyCode === 'down') {
|
|
438
|
+
e.preventDefault();
|
|
439
|
+
|
|
440
|
+
if (!_this.state.calendarOpen) {
|
|
441
|
+
_this.openWithFocus = true;
|
|
442
|
+
|
|
443
|
+
_this.setState({
|
|
444
|
+
calendarOpen: true
|
|
445
|
+
});
|
|
446
|
+
} else if (_this.calendar) {
|
|
447
|
+
_this.calendar.focusActiveDay();
|
|
448
|
+
}
|
|
434
449
|
} else if (eventKeyCode === 'esc') {
|
|
435
450
|
_this.setState({
|
|
436
451
|
calendarOpen: false,
|
|
@@ -457,12 +472,22 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
457
472
|
});
|
|
458
473
|
});
|
|
459
474
|
|
|
475
|
+
_defineProperty(_assertThisInitialized(_this), "handleCalendarMount", function (el) {
|
|
476
|
+
_this.calendar = el;
|
|
477
|
+
});
|
|
478
|
+
|
|
460
479
|
_defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (_ref3) {
|
|
461
480
|
var event = _ref3.event,
|
|
462
481
|
reason = _ref3.reason;
|
|
463
482
|
|
|
464
483
|
if ((reason === 'clickAway' || reason === 'escapeKey') && event !== undefined && event.target !== _this.state.anchor) {
|
|
465
484
|
_this.applyTextChange(event);
|
|
485
|
+
|
|
486
|
+
if (reason === 'escapeKey') {
|
|
487
|
+
_this.focusCalledInternally = true;
|
|
488
|
+
|
|
489
|
+
_this.focus();
|
|
490
|
+
}
|
|
466
491
|
}
|
|
467
492
|
});
|
|
468
493
|
|
|
@@ -474,7 +499,9 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
474
499
|
input: null,
|
|
475
500
|
value: _this.isControlled() ? undefined : dateString
|
|
476
501
|
};
|
|
477
|
-
_this.popoverId = Object(id_["createDOMID"])('
|
|
502
|
+
_this.popoverId = Object(id_["createDOMID"])('calendar');
|
|
503
|
+
|
|
504
|
+
if (false) {}
|
|
478
505
|
|
|
479
506
|
if (false) {}
|
|
480
507
|
|
|
@@ -483,10 +510,24 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
483
510
|
|
|
484
511
|
_createClass(Date, [{
|
|
485
512
|
key: "componentDidUpdate",
|
|
486
|
-
value: function componentDidUpdate(prevProps) {
|
|
513
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
487
514
|
if (false) {}
|
|
488
515
|
|
|
489
516
|
if (false) {}
|
|
517
|
+
|
|
518
|
+
if (false) {}
|
|
519
|
+
/**
|
|
520
|
+
* If `openWithFocus` and `calendarOpen` are set the user is attempting to navigate to the dropdown, but it's closed.
|
|
521
|
+
* On the first update following the state change set focus to the active day within the calendar.
|
|
522
|
+
*/
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
if (this.openWithFocus && this.state.calendarOpen && prevState.calendarOpen !== this.state.calendarOpen) {
|
|
526
|
+
var _this$calendar;
|
|
527
|
+
|
|
528
|
+
this.openWithFocus = false;
|
|
529
|
+
(_this$calendar = this.calendar) === null || _this$calendar === void 0 ? void 0 : _this$calendar.focusActiveDay();
|
|
530
|
+
}
|
|
490
531
|
}
|
|
491
532
|
}, {
|
|
492
533
|
key: "getValue",
|
|
@@ -519,12 +560,37 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
519
560
|
value: function render() {
|
|
520
561
|
var _this$props5 = this.props,
|
|
521
562
|
highlightToday = _this$props5.highlightToday,
|
|
563
|
+
inputOnly = _this$props5.inputOnly,
|
|
564
|
+
locale = _this$props5.locale,
|
|
522
565
|
splunkTheme = _this$props5.splunkTheme;
|
|
523
566
|
var isPrisma = splunkTheme.isPrisma;
|
|
524
567
|
var currentValue = this.getValue();
|
|
525
|
-
var startAdornment = isPrisma && /*#__PURE__*/external_react_default.a.createElement(IconContainer, {
|
|
568
|
+
var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default.a.createElement(IconContainer, {
|
|
569
|
+
"aria-hidden": true,
|
|
526
570
|
$disabled: this.props.disabled
|
|
527
571
|
}, /*#__PURE__*/external_react_default.a.createElement(CalendarIcon, null));
|
|
572
|
+
var children;
|
|
573
|
+
var ariaProps = {};
|
|
574
|
+
|
|
575
|
+
if (!inputOnly) {
|
|
576
|
+
ariaProps.role = 'combobox';
|
|
577
|
+
ariaProps['aria-controls'] = this.state.calendarOpen ? this.popoverId : undefined;
|
|
578
|
+
ariaProps['aria-expanded'] = this.props.disabled ? false : this.state.calendarOpen;
|
|
579
|
+
ariaProps['aria-haspopup'] = true;
|
|
580
|
+
children = /*#__PURE__*/external_react_default.a.createElement(Popover_default.a, {
|
|
581
|
+
anchor: this.state.anchor,
|
|
582
|
+
id: this.popoverId,
|
|
583
|
+
open: this.props.disabled ? false : this.state.calendarOpen,
|
|
584
|
+
onRequestClose: this.handleRequestClose
|
|
585
|
+
}, /*#__PURE__*/external_react_default.a.createElement(Calendar_default.a, {
|
|
586
|
+
ref: this.handleCalendarMount,
|
|
587
|
+
highlightToday: highlightToday,
|
|
588
|
+
locale: locale,
|
|
589
|
+
onChange: this.handleDateChange,
|
|
590
|
+
value: currentValue
|
|
591
|
+
}));
|
|
592
|
+
}
|
|
593
|
+
|
|
528
594
|
return /*#__PURE__*/external_react_default.a.createElement(StyledText, Date_extends({
|
|
529
595
|
autoCapitalize: "off",
|
|
530
596
|
autoComplete: "off",
|
|
@@ -541,17 +607,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
541
607
|
onKeyDown: this.handleKeyDown,
|
|
542
608
|
value: this.getTextInputValue(),
|
|
543
609
|
startAdornment: startAdornment
|
|
544
|
-
}, Object(external_lodash_["omit"])(this.props, 'className', 'defaultValue', 'elementRef', 'multiline', 'locale', 'onChange', 'onClick', 'onFocus', 'onKeyDown', 'onSelect', 'spellCheck', 'value')),
|
|
545
|
-
anchor: this.state.anchor,
|
|
546
|
-
id: this.popoverId,
|
|
547
|
-
open: this.props.disabled ? false : this.state.calendarOpen,
|
|
548
|
-
onRequestClose: this.handleRequestClose
|
|
549
|
-
}, /*#__PURE__*/external_react_default.a.createElement(Calendar_default.a, {
|
|
550
|
-
highlightToday: highlightToday,
|
|
551
|
-
locale: this.props.locale,
|
|
552
|
-
onChange: this.handleDateChange,
|
|
553
|
-
value: currentValue
|
|
554
|
-
})));
|
|
610
|
+
}, ariaProps, Object(external_lodash_["omit"])(this.props, 'className', 'defaultValue', 'elementRef', 'inputOnly', 'multiline', 'locale', 'onChange', 'onClick', 'onFocus', 'onKeyDown', 'onSelect', 'spellCheck', 'value')), children);
|
|
555
611
|
}
|
|
556
612
|
}]);
|
|
557
613
|
|
|
@@ -564,6 +620,13 @@ _defineProperty(_Date, "defaultProps", defaultProps);
|
|
|
564
620
|
|
|
565
621
|
_defineProperty(_Date, "momentFormat", 'YYYY-MM-DD');
|
|
566
622
|
|
|
623
|
+
_defineProperty(_Date, "validateValue", function (value) {
|
|
624
|
+
if (!external_moment_default()(value, _Date.momentFormat).isValid()) {
|
|
625
|
+
// eslint-disable-next-line no-console
|
|
626
|
+
console.error("Invalid date string value \"".concat(value, "\" provided to Moment."));
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
|
|
567
630
|
var DateWithThemeBase = Object(themes_["withSplunkTheme"])(_Date);
|
|
568
631
|
var DateWithTheme = DateWithThemeBase;
|
|
569
632
|
DateWithTheme.propTypes = _Date.propTypes;
|
|
@@ -579,25 +642,25 @@ DateWithTheme.momentFormat = _Date.momentFormat;
|
|
|
579
642
|
/***/ 17:
|
|
580
643
|
/***/ (function(module, exports) {
|
|
581
644
|
|
|
582
|
-
module.exports = require("
|
|
645
|
+
module.exports = require("moment");
|
|
583
646
|
|
|
584
647
|
/***/ }),
|
|
585
648
|
|
|
586
|
-
/***/
|
|
649
|
+
/***/ 18:
|
|
587
650
|
/***/ (function(module, exports) {
|
|
588
651
|
|
|
589
|
-
module.exports = require("react");
|
|
652
|
+
module.exports = require("@splunk/react-ui/Popover");
|
|
590
653
|
|
|
591
654
|
/***/ }),
|
|
592
655
|
|
|
593
|
-
/***/
|
|
656
|
+
/***/ 2:
|
|
594
657
|
/***/ (function(module, exports) {
|
|
595
658
|
|
|
596
|
-
module.exports = require("
|
|
659
|
+
module.exports = require("react");
|
|
597
660
|
|
|
598
661
|
/***/ }),
|
|
599
662
|
|
|
600
|
-
/***/
|
|
663
|
+
/***/ 24:
|
|
601
664
|
/***/ (function(module, exports) {
|
|
602
665
|
|
|
603
666
|
module.exports = require("@splunk/react-ui/Text");
|
|
@@ -618,7 +681,7 @@ module.exports = require("lodash");
|
|
|
618
681
|
|
|
619
682
|
/***/ }),
|
|
620
683
|
|
|
621
|
-
/***/
|
|
684
|
+
/***/ 88:
|
|
622
685
|
/***/ (function(module, exports) {
|
|
623
686
|
|
|
624
687
|
module.exports = require("@splunk/react-ui/Calendar");
|
package/DefinitionList.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 126);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -101,7 +101,7 @@ module.exports = require("prop-types");
|
|
|
101
101
|
|
|
102
102
|
/***/ }),
|
|
103
103
|
|
|
104
|
-
/***/
|
|
104
|
+
/***/ 126:
|
|
105
105
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
106
|
|
|
107
107
|
"use strict";
|
package/Divider.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 162);
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
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
|
+
/***/ 162:
|
|
105
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
|
+
|
|
107
|
+
"use strict";
|
|
108
|
+
// ESM COMPAT FLAG
|
|
109
|
+
__webpack_require__.r(__webpack_exports__);
|
|
110
|
+
|
|
111
|
+
// EXPORTS
|
|
112
|
+
__webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ Divider_Divider; });
|
|
113
|
+
|
|
114
|
+
// EXTERNAL MODULE: external "react"
|
|
115
|
+
var external_react_ = __webpack_require__(2);
|
|
116
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
117
|
+
|
|
118
|
+
// EXTERNAL MODULE: external "prop-types"
|
|
119
|
+
var external_prop_types_ = __webpack_require__(1);
|
|
120
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
121
|
+
|
|
122
|
+
// EXTERNAL MODULE: external "styled-components"
|
|
123
|
+
var external_styled_components_ = __webpack_require__(3);
|
|
124
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
125
|
+
|
|
126
|
+
// EXTERNAL MODULE: external "@splunk/themes"
|
|
127
|
+
var themes_ = __webpack_require__(0);
|
|
128
|
+
|
|
129
|
+
// CONCATENATED MODULE: ./src/Divider/DividerStyles.ts
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
var StyledRule = external_styled_components_default.a.hr.withConfig({
|
|
133
|
+
displayName: "DividerStyles__StyledRule",
|
|
134
|
+
componentId: "gl6kyz-0"
|
|
135
|
+
})(["", ";", ";border-color:", ";"], themes_["mixins"].reset('block'), Object(themes_["pickVariant"])('$orientation', {
|
|
136
|
+
horizontal: Object(external_styled_components_["css"])(["border-top-style:solid;border-width:1px;"]),
|
|
137
|
+
vertical: Object(external_styled_components_["css"])(["display:inline;border-left-style:solid;border-width:1px;"])
|
|
138
|
+
}), Object(themes_["pick"])({
|
|
139
|
+
enterprise: themes_["variables"].borderColor,
|
|
140
|
+
prisma: themes_["variables"].neutral200
|
|
141
|
+
}));
|
|
142
|
+
|
|
143
|
+
// CONCATENATED MODULE: ./src/Divider/Divider.tsx
|
|
144
|
+
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); }
|
|
145
|
+
|
|
146
|
+
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; }
|
|
147
|
+
|
|
148
|
+
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; }
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
var propTypes = {
|
|
154
|
+
elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
|
|
155
|
+
orientation: external_prop_types_default.a.oneOf(['horizontal', 'vertical'])
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
function Divider(_ref) {
|
|
159
|
+
var elementRef = _ref.elementRef,
|
|
160
|
+
_ref$orientation = _ref.orientation,
|
|
161
|
+
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation,
|
|
162
|
+
otherProps = _objectWithoutProperties(_ref, ["elementRef", "orientation"]);
|
|
163
|
+
|
|
164
|
+
// @docs-props-type DividerPropsBase
|
|
165
|
+
return /*#__PURE__*/external_react_default.a.createElement(StyledRule, _extends({
|
|
166
|
+
"data-test": "divider",
|
|
167
|
+
ref: elementRef,
|
|
168
|
+
"aria-orientation": orientation,
|
|
169
|
+
$orientation: orientation
|
|
170
|
+
}, otherProps));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
Divider.propTypes = propTypes;
|
|
174
|
+
/* harmony default export */ var Divider_Divider = (Divider);
|
|
175
|
+
// CONCATENATED MODULE: ./src/Divider/index.ts
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
/***/ }),
|
|
179
|
+
|
|
180
|
+
/***/ 2:
|
|
181
|
+
/***/ (function(module, exports) {
|
|
182
|
+
|
|
183
|
+
module.exports = require("react");
|
|
184
|
+
|
|
185
|
+
/***/ }),
|
|
186
|
+
|
|
187
|
+
/***/ 3:
|
|
188
|
+
/***/ (function(module, exports) {
|
|
189
|
+
|
|
190
|
+
module.exports = require("styled-components");
|
|
191
|
+
|
|
192
|
+
/***/ })
|
|
193
|
+
|
|
194
|
+
/******/ });
|
package/Dropdown.js
CHANGED
|
@@ -82,7 +82,7 @@ module.exports =
|
|
|
82
82
|
/******/
|
|
83
83
|
/******/
|
|
84
84
|
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s =
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = 183);
|
|
86
86
|
/******/ })
|
|
87
87
|
/************************************************************************/
|
|
88
88
|
/******/ ({
|
|
@@ -95,13 +95,6 @@ module.exports = require("prop-types");
|
|
|
95
95
|
/***/ }),
|
|
96
96
|
|
|
97
97
|
/***/ 10:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 11:
|
|
105
98
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
106
99
|
|
|
107
100
|
"use strict";
|
|
@@ -128,14 +121,21 @@ function updateReactRef(ref, current) {
|
|
|
128
121
|
|
|
129
122
|
/***/ }),
|
|
130
123
|
|
|
131
|
-
/***/
|
|
124
|
+
/***/ 11:
|
|
125
|
+
/***/ (function(module, exports) {
|
|
126
|
+
|
|
127
|
+
module.exports = require("@splunk/ui-utils/id");
|
|
128
|
+
|
|
129
|
+
/***/ }),
|
|
130
|
+
|
|
131
|
+
/***/ 18:
|
|
132
132
|
/***/ (function(module, exports) {
|
|
133
133
|
|
|
134
134
|
module.exports = require("@splunk/react-ui/Popover");
|
|
135
135
|
|
|
136
136
|
/***/ }),
|
|
137
137
|
|
|
138
|
-
/***/
|
|
138
|
+
/***/ 183:
|
|
139
139
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
140
140
|
|
|
141
141
|
"use strict";
|
|
@@ -158,14 +158,14 @@ var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_pr
|
|
|
158
158
|
var external_lodash_ = __webpack_require__(4);
|
|
159
159
|
|
|
160
160
|
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
161
|
-
var id_ = __webpack_require__(
|
|
161
|
+
var id_ = __webpack_require__(11);
|
|
162
162
|
|
|
163
163
|
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
164
|
-
var Popover_ = __webpack_require__(
|
|
164
|
+
var Popover_ = __webpack_require__(18);
|
|
165
165
|
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
166
166
|
|
|
167
167
|
// EXTERNAL MODULE: ./src/utils/updateReactRef.ts
|
|
168
|
-
var updateReactRef = __webpack_require__(
|
|
168
|
+
var updateReactRef = __webpack_require__(10);
|
|
169
169
|
|
|
170
170
|
// CONCATENATED MODULE: ./src/Dropdown/Dropdown.tsx
|
|
171
171
|
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); }
|
|
@@ -206,6 +206,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
206
206
|
|
|
207
207
|
var possibleCloseReasons = ['clickAway', 'contentClick', 'escapeKey', 'offScreen', 'tabKey', 'toggleClick'];
|
|
208
208
|
var propTypes = {
|
|
209
|
+
align: external_prop_types_default.a.oneOf(['center', 'edge', 'theme', 'end']),
|
|
209
210
|
canCoverAnchor: external_prop_types_default.a.bool,
|
|
210
211
|
children: external_prop_types_default.a.oneOfType([external_prop_types_default.a.node, external_prop_types_default.a.func]),
|
|
211
212
|
closeReasons: external_prop_types_default.a.arrayOf(external_prop_types_default.a.oneOf(possibleCloseReasons)),
|
|
@@ -222,6 +223,7 @@ var propTypes = {
|
|
|
222
223
|
toggle: external_prop_types_default.a.element.isRequired
|
|
223
224
|
};
|
|
224
225
|
var defaultProps = {
|
|
226
|
+
align: 'theme',
|
|
225
227
|
canCoverAnchor: true,
|
|
226
228
|
closeReasons: possibleCloseReasons,
|
|
227
229
|
defaultPlacement: 'below',
|
|
@@ -397,6 +399,7 @@ var Dropdown_Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
397
399
|
key: "render",
|
|
398
400
|
value: function render() {
|
|
399
401
|
var _this$props3 = this.props,
|
|
402
|
+
align = _this$props3.align,
|
|
400
403
|
canCoverAnchor = _this$props3.canCoverAnchor,
|
|
401
404
|
children = _this$props3.children,
|
|
402
405
|
closeReasons = _this$props3.closeReasons,
|
|
@@ -410,6 +413,7 @@ var Dropdown_Dropdown = /*#__PURE__*/function (_Component) {
|
|
|
410
413
|
handleContentClick = this.handleContentClick;
|
|
411
414
|
var toggle = this.renderToggle();
|
|
412
415
|
return /*#__PURE__*/external_react_default.a.createElement(external_react_default.a.Fragment, null, toggle, /*#__PURE__*/external_react_default.a.createElement(Popover_default.a, {
|
|
416
|
+
align: align,
|
|
413
417
|
open: !!anchor && this.isOpen(),
|
|
414
418
|
autoCloseWhenOffScreen: Object(external_lodash_["includes"])(closeReasons, 'offScreen'),
|
|
415
419
|
anchor: anchor,
|