@splunk/react-ui 4.20.0 → 4.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/Accordion.js +425 -441
  2. package/Anchor.js +147 -193
  3. package/Animation.js +142 -166
  4. package/AnimationToggle.js +197 -253
  5. package/Box.js +145 -194
  6. package/Breadcrumbs.js +288 -298
  7. package/Button.js +488 -613
  8. package/ButtonGroup.js +160 -212
  9. package/ButtonSimple.js +543 -562
  10. package/CHANGELOG.md +26 -0
  11. package/Calendar.js +1107 -1195
  12. package/Card.js +771 -746
  13. package/CardLayout.js +205 -223
  14. package/Chip.js +509 -612
  15. package/Clickable.js +416 -472
  16. package/CloseButton.js +165 -250
  17. package/Code.js +1808 -2172
  18. package/Code.js.LICENSE.txt +8 -0
  19. package/CollapsiblePanel.js +586 -675
  20. package/Color.js +1066 -1297
  21. package/ColumnLayout.js +402 -465
  22. package/ComboBox.js +892 -969
  23. package/Concertina.js +998 -963
  24. package/ControlGroup.js +687 -718
  25. package/Date.js +567 -697
  26. package/DefinitionList.js +308 -310
  27. package/Divider.js +149 -194
  28. package/Dropdown.js +459 -558
  29. package/DualListbox.js +1480 -1735
  30. package/EventListener.js +94 -165
  31. package/File.js +1051 -1173
  32. package/FormRows.js +885 -880
  33. package/Heading.js +216 -263
  34. package/Image.js +446 -558
  35. package/JSONTree.js +690 -699
  36. package/Layer.js +442 -582
  37. package/Link.js +336 -361
  38. package/List.js +213 -237
  39. package/Markdown.js +510 -612
  40. package/Menu.js +1109 -1331
  41. package/Message.js +474 -629
  42. package/MessageBar.js +387 -561
  43. package/Modal.js +810 -798
  44. package/ModalLayer.js +326 -343
  45. package/Monogram.js +308 -368
  46. package/Multiselect.js +3558 -3998
  47. package/Number.js +729 -843
  48. package/Paginator.js +510 -615
  49. package/Paragraph.js +145 -188
  50. package/Popover.js +1470 -1693
  51. package/Progress.js +301 -362
  52. package/RadioBar.js +610 -651
  53. package/RadioList.js +483 -544
  54. package/Resize.js +530 -623
  55. package/ResultsMenu.js +494 -597
  56. package/ScreenReaderContent.js +142 -187
  57. package/Scroll.js +595 -598
  58. package/ScrollContainerContext.js +197 -278
  59. package/Search.js +745 -817
  60. package/Select.js +2441 -2746
  61. package/SidePanel.js +390 -392
  62. package/Slider.js +668 -825
  63. package/SlidingPanels.js +639 -645
  64. package/SplitButton.js +464 -499
  65. package/StaticContent.js +161 -217
  66. package/StepBar.js +386 -466
  67. package/Switch.js +710 -764
  68. package/TabBar.js +724 -815
  69. package/TabLayout.js +406 -438
  70. package/Table.js +4842 -5121
  71. package/Text.js +1169 -1351
  72. package/TextArea.js +1097 -1307
  73. package/Tooltip.js +624 -721
  74. package/TransitionOpen.js +489 -546
  75. package/Typography.js +176 -229
  76. package/WaitSpinner.js +230 -298
  77. package/package.json +14 -15
  78. package/stubs-splunkui.d.ts +4 -1
  79. package/types/src/ComboBox/Option.d.ts +1 -1
  80. package/types/src/Concertina/Concertina.d.ts +4 -0
  81. package/types/src/JSONTree/JSONTreeContext.d.ts +7 -0
  82. package/types/src/JSONTree/TreeNode.d.ts +5 -0
  83. package/types/src/Link/Link.d.ts +7 -3
  84. package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
  85. package/types/src/Markdown/Markdown.d.ts +1 -1
  86. package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
  87. package/types/src/Menu/Item.d.ts +1 -1
  88. package/types/src/Menu/Menu.d.ts +1 -0
  89. package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
  90. package/types/src/Multiselect/Option.d.ts +1 -1
  91. package/types/src/Search/Option.d.ts +1 -1
  92. package/types/src/Select/Option.d.ts +1 -1
  93. package/types/src/Select/OptionBase.d.ts +1 -1
  94. package/types/src/fixtures/FetchOptions.d.ts +2 -8
  95. package/useForceUpdate.js +112 -146
  96. package/useKeyPress.js +74 -128
  97. package/usePrevious.js +65 -129
  98. package/useRovingFocus.js +122 -218
  99. package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
  100. /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
  101. /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Date.js CHANGED
@@ -1,351 +1,335 @@
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 = 201);
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
- /***/ 10:
105
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
106
-
107
- "use strict";
108
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return updateReactRef; });
109
- /**
1
+ /******/ (() => {
2
+ // webpackBootstrap
3
+ /******/ "use strict";
4
+ /******/ // The require scope
5
+ /******/ var e = {};
6
+ /******/
7
+ /************************************************************************/
8
+ /******/ /* webpack/runtime/compat get default export */
9
+ /******/ (() => {
10
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
11
+ /******/ e.n = t => {
12
+ /******/ var n = t && t.__esModule ?
13
+ /******/ () => t["default"]
14
+ /******/ : () => t
15
+ /******/;
16
+ e.d(n, {
17
+ a: n
18
+ });
19
+ /******/ return n;
20
+ /******/ };
21
+ /******/ })();
22
+ /******/
23
+ /******/ /* webpack/runtime/define property getters */
24
+ /******/ (() => {
25
+ /******/ // define getter functions for harmony exports
26
+ /******/ e.d = (t, n) => {
27
+ /******/ for (var a in n) {
28
+ /******/ if (e.o(n, a) && !e.o(t, a)) {
29
+ /******/ Object.defineProperty(t, a, {
30
+ enumerable: true,
31
+ get: n[a]
32
+ });
33
+ /******/ }
34
+ /******/ }
35
+ /******/ };
36
+ /******/ })();
37
+ /******/
38
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
39
+ /******/ (() => {
40
+ /******/ e.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t)
41
+ /******/;
42
+ })();
43
+ /******/
44
+ /******/ /* webpack/runtime/make namespace object */
45
+ /******/ (() => {
46
+ /******/ // define __esModule on exports
47
+ /******/ e.r = e => {
48
+ /******/ if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
49
+ /******/ Object.defineProperty(e, Symbol.toStringTag, {
50
+ value: "Module"
51
+ });
52
+ /******/ }
53
+ /******/ Object.defineProperty(e, "__esModule", {
54
+ value: true
55
+ });
56
+ /******/ };
57
+ /******/ })();
58
+ /******/
59
+ /************************************************************************/ var t = {};
60
+ // ESM COMPAT FLAG
61
+ e.r(t);
62
+ // EXPORTS
63
+ e.d(t, {
64
+ DateWithoutTheme: () => /* reexport */ Y,
65
+ default: () => /* reexport */ Z
66
+ });
67
+ // CONCATENATED MODULE: external "react"
68
+ const n = require("react");
69
+ var a = e.n(n);
70
+ // CONCATENATED MODULE: external "prop-types"
71
+ const o = require("prop-types");
72
+ var r = e.n(o);
73
+ // CONCATENATED MODULE: external "lodash/has"
74
+ const l = require("lodash/has");
75
+ var i = e.n(l);
76
+ // CONCATENATED MODULE: external "lodash/omit"
77
+ const u = require("lodash/omit");
78
+ var s = e.n(u);
79
+ // CONCATENATED MODULE: external "moment"
80
+ const c = require("moment");
81
+ var p = e.n(c);
82
+ // CONCATENATED MODULE: external "@splunk/ui-utils/id"
83
+ const f = require("@splunk/ui-utils/id");
84
+ // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
85
+ const d = require("@splunk/ui-utils/keyboard");
86
+ // CONCATENATED MODULE: external "@splunk/react-ui/Calendar"
87
+ const h = require("@splunk/react-ui/Calendar");
88
+ var v = e.n(h);
89
+ // CONCATENATED MODULE: external "@splunk/react-ui/Popover"
90
+ const y = require("@splunk/react-ui/Popover");
91
+ var m = e.n(y);
92
+ // CONCATENATED MODULE: external "@splunk/themes"
93
+ const b = require("@splunk/themes");
94
+ // CONCATENATED MODULE: external "styled-components"
95
+ const g = require("styled-components");
96
+ var C = e.n(g);
97
+ // CONCATENATED MODULE: external "@splunk/react-ui/Text"
98
+ const O = require("@splunk/react-ui/Text");
99
+ var x = e.n(O);
100
+ // CONCATENATED MODULE: ./src/Date/DateStyles.ts
101
+ var k = C()(x()).withConfig({
102
+ displayName: "DateStyles__StyledText",
103
+ componentId: "kacgdc-0"
104
+ })([ "cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}" ], (0, b.pickVariant)("$disabled", {
105
+ false: "text",
106
+ true: "not-allowed"
107
+ }), (0, b.pick)({
108
+ enterprise: "105px",
109
+ prisma: "150px"
110
+ }), (0, b.pick)({
111
+ enterprise: {
112
+ comfortable: "105px",
113
+ compact: "80px"
114
+ },
115
+ prisma: "150px"
116
+ }));
117
+ var I = C().div.withConfig({
118
+ displayName: "DateStyles__IconContainer",
119
+ componentId: "kacgdc-1"
120
+ })([ "align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;" ], (0,
121
+ b.pickVariant)("$disabled", {
122
+ false: b.variables.contentColorMuted,
123
+ true: b.variables.contentColorDisabled
124
+ }), (0, b.pick)({
125
+ comfortable: "0 8px",
126
+ compact: "0 6px"
127
+ }));
128
+ // CONCATENATED MODULE: ./src/Date/Icon.tsx
129
+ function T() {
130
+ T = Object.assign || function(e) {
131
+ for (var t = 1; t < arguments.length; t++) {
132
+ var n = arguments[t];
133
+ for (var a in n) {
134
+ if (Object.prototype.hasOwnProperty.call(n, a)) {
135
+ e[a] = n[a];
136
+ }
137
+ }
138
+ }
139
+ return e;
140
+ };
141
+ return T.apply(this, arguments);
142
+ }
143
+ function D(e) {
144
+ var t = (0, b.useSplunkTheme)(), n = t.density;
145
+ var o = n === "compact" ? "20px" : "24px";
146
+
147
+ return a().createElement("svg", T({
148
+ viewBox: "0 0 24 24",
149
+ width: o,
150
+ height: o
151
+ }, e), a().createElement("path", {
152
+ fill: "currentColor",
153
+ fillRule: "evenodd",
154
+ d: "M16.6001 2C17.1524 2 17.6001 2.44772 17.6001 3V4H19C20.1046 4 21 4.89543 21 6V8.5V9.5V19.5C21 19.7761 20.7761 20 20.5 20H3.5C3.22386 20 3 19.7761 3 19.5V9.5V8.5V6C3 4.89543 3.89543 4 5 4H6.6001V3C6.6001 2.44772 7.04781 2 7.6001 2C8.15238 2 8.6001 2.44772 8.6001 3V4H15.6001V3C15.6001 2.44772 16.0478 2 16.6001 2ZM6.6001 6C6.6001 6.55228 7.04781 7 7.6001 7C8.15238 7 8.6001 6.55228 8.6001 6H15.6001C15.6001 6.55228 16.0478 7 16.6001 7C17.1524 7 17.6001 6.55228 17.6001 6H19V8H5L5 6H6.6001ZM19 10H5V18H19V10Z"
155
+ }));
156
+ }
157
+ // CONCATENATED MODULE: ./src/utils/updateReactRef.ts
158
+ /**
110
159
  * Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
111
160
  *
112
161
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
113
162
  * @param current - The new value of the ref.
114
163
  */
115
- function updateReactRef(ref, current) {
116
- if (ref) {
117
- if (typeof ref === 'function') {
118
- ref(current);
119
- } else {
120
- // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
121
- // the intention here is to signal "we will take care of setting 'current', not you".
122
- ref.current = current; // eslint-disable-line no-param-reassign
164
+ function S(e, t) {
165
+ if (e) {
166
+ if (typeof e === "function") {
167
+ e(t);
168
+ } else {
169
+ // the public signature of this util uses React.Ref<T> to mirror the way React types refs.
170
+ // the intention here is to signal "we will take care of setting 'current', not you".
171
+ e.current = t;
172
+ // eslint-disable-line no-param-reassign
173
+ }
174
+ }
175
+ }
176
+ // CONCATENATED MODULE: ./src/Date/Date.tsx
177
+ function w(e) {
178
+ "@babel/helpers - typeof";
179
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
180
+ w = function e(t) {
181
+ return typeof t;
182
+ };
183
+ } else {
184
+ w = function e(t) {
185
+ return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
186
+ };
187
+ }
188
+ return w(e);
123
189
  }
124
- }
125
- }
126
-
127
-
128
-
129
- /***/ }),
130
-
131
- /***/ 11:
132
- /***/ (function(module, exports) {
133
-
134
- module.exports = require("lodash/has");
135
-
136
- /***/ }),
137
-
138
- /***/ 131:
139
- /***/ (function(module, exports) {
140
-
141
- module.exports = require("@splunk/react-ui/Calendar");
142
-
143
- /***/ }),
144
-
145
- /***/ 2:
146
- /***/ (function(module, exports) {
147
-
148
- module.exports = require("react");
149
-
150
- /***/ }),
151
-
152
- /***/ 20:
153
- /***/ (function(module, exports) {
154
-
155
- module.exports = require("moment");
156
-
157
- /***/ }),
158
-
159
- /***/ 201:
160
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
161
-
162
- "use strict";
163
- // ESM COMPAT FLAG
164
- __webpack_require__.r(__webpack_exports__);
165
-
166
- // EXPORTS
167
- __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ Date_Date; });
168
- __webpack_require__.d(__webpack_exports__, "DateWithoutTheme", function() { return /* reexport */ _Date; });
169
-
170
- // EXTERNAL MODULE: external "react"
171
- var external_react_ = __webpack_require__(2);
172
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
173
-
174
- // EXTERNAL MODULE: external "prop-types"
175
- var external_prop_types_ = __webpack_require__(1);
176
- var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
177
-
178
- // EXTERNAL MODULE: external "lodash/has"
179
- var has_ = __webpack_require__(11);
180
- var has_default = /*#__PURE__*/__webpack_require__.n(has_);
181
-
182
- // EXTERNAL MODULE: external "lodash/omit"
183
- var omit_ = __webpack_require__(5);
184
- var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
185
-
186
- // EXTERNAL MODULE: external "moment"
187
- var external_moment_ = __webpack_require__(20);
188
- var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_);
189
-
190
- // EXTERNAL MODULE: external "@splunk/ui-utils/id"
191
- var id_ = __webpack_require__(8);
192
-
193
- // EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
194
- var keyboard_ = __webpack_require__(7);
195
-
196
- // EXTERNAL MODULE: external "@splunk/react-ui/Calendar"
197
- var Calendar_ = __webpack_require__(131);
198
- var Calendar_default = /*#__PURE__*/__webpack_require__.n(Calendar_);
199
-
200
- // EXTERNAL MODULE: external "@splunk/react-ui/Popover"
201
- var Popover_ = __webpack_require__(21);
202
- var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
203
-
204
- // EXTERNAL MODULE: external "@splunk/themes"
205
- var themes_ = __webpack_require__(0);
206
-
207
- // EXTERNAL MODULE: external "styled-components"
208
- var external_styled_components_ = __webpack_require__(3);
209
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
210
-
211
- // EXTERNAL MODULE: external "@splunk/react-ui/Text"
212
- var Text_ = __webpack_require__(32);
213
- var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
214
-
215
- // CONCATENATED MODULE: ./src/Date/DateStyles.ts
216
-
217
-
218
-
219
- var StyledText = external_styled_components_default()(Text_default.a).withConfig({
220
- displayName: "DateStyles__StyledText",
221
- componentId: "kacgdc-0"
222
- })(["cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}"], Object(themes_["pickVariant"])('$disabled', {
223
- "false": 'text',
224
- "true": 'not-allowed'
225
- }), Object(themes_["pick"])({
226
- enterprise: '105px',
227
- prisma: '150px'
228
- }), Object(themes_["pick"])({
229
- enterprise: {
230
- comfortable: '105px',
231
- compact: '80px'
232
- },
233
- prisma: '150px'
234
- }));
235
- var IconContainer = external_styled_components_default.a.div.withConfig({
236
- displayName: "DateStyles__IconContainer",
237
- componentId: "kacgdc-1"
238
- })(["align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;"], Object(themes_["pickVariant"])('$disabled', {
239
- "false": themes_["variables"].contentColorMuted,
240
- "true": themes_["variables"].contentColorDisabled
241
- }), Object(themes_["pick"])({
242
- comfortable: '0 8px',
243
- compact: '0 6px'
244
- }));
245
-
246
- // CONCATENATED MODULE: ./src/Date/Icon.tsx
247
- 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); }
248
-
249
-
250
-
251
- function CalendarIcon(props) {
252
- var _useSplunkTheme = Object(themes_["useSplunkTheme"])(),
253
- density = _useSplunkTheme.density;
254
-
255
- var size = density === 'compact' ? '20px' : '24px';
256
- return /*#__PURE__*/external_react_default.a.createElement("svg", _extends({
257
- viewBox: "0 0 24 24",
258
- width: size,
259
- height: size
260
- }, props), /*#__PURE__*/external_react_default.a.createElement("path", {
261
- fill: "currentColor",
262
- fillRule: "evenodd",
263
- d: "M16.6001 2C17.1524 2 17.6001 2.44772 17.6001 3V4H19C20.1046 4 21 4.89543 21 6V8.5V9.5V19.5C21 19.7761 20.7761 20 20.5 20H3.5C3.22386 20 3 19.7761 3 19.5V9.5V8.5V6C3 4.89543 3.89543 4 5 4H6.6001V3C6.6001 2.44772 7.04781 2 7.6001 2C8.15238 2 8.6001 2.44772 8.6001 3V4H15.6001V3C15.6001 2.44772 16.0478 2 16.6001 2ZM6.6001 6C6.6001 6.55228 7.04781 7 7.6001 7C8.15238 7 8.6001 6.55228 8.6001 6H15.6001C15.6001 6.55228 16.0478 7 16.6001 7C17.1524 7 17.6001 6.55228 17.6001 6H19V8H5L5 6H6.6001ZM19 10H5V18H19V10Z"
264
- }));
265
- }
266
- // EXTERNAL MODULE: ./src/utils/updateReactRef.ts
267
- var updateReactRef = __webpack_require__(10);
268
-
269
- // CONCATENATED MODULE: ./src/Date/Date.tsx
270
- 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); }
271
-
272
- function Date_extends() { Date_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 Date_extends.apply(this, arguments); }
273
-
274
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
275
-
276
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
277
-
278
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
279
-
280
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
281
-
282
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
283
-
284
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
285
-
286
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
287
-
288
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
289
-
290
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
291
-
292
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
293
-
294
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
- var propTypes = {
310
- defaultValue: external_prop_types_default.a.string,
311
- describedBy: external_prop_types_default.a.string,
312
- disabled: external_prop_types_default.a.bool,
313
- elementRef: external_prop_types_default.a.oneOfType([external_prop_types_default.a.func, external_prop_types_default.a.object]),
314
- error: external_prop_types_default.a.bool,
315
- highlightToday: external_prop_types_default.a.bool,
316
- inline: external_prop_types_default.a.bool,
317
- inputId: external_prop_types_default.a.string,
318
- inputOnly: external_prop_types_default.a.bool,
319
- labelledBy: external_prop_types_default.a.string,
320
- locale: external_prop_types_default.a.string,
321
- name: external_prop_types_default.a.string,
322
- onBlur: external_prop_types_default.a.func,
323
- onChange: external_prop_types_default.a.func,
324
- onClick: external_prop_types_default.a.func,
325
- onFocus: external_prop_types_default.a.func,
326
- onKeyDown: external_prop_types_default.a.func,
327
-
328
- /** @private */
329
- splunkTheme: external_prop_types_default.a.object,
330
- value: external_prop_types_default.a.string
331
- };
332
- var defaultProps = {
333
- disabled: false,
334
- error: false,
335
- highlightToday: false,
336
- inline: true,
337
- inputOnly: false,
338
- locale: 'en_US'
339
- };
340
-
341
- var _Date = /*#__PURE__*/function (_Component) {
342
- _inherits(Date, _Component);
343
-
344
- var _super = _createSuper(Date);
345
-
346
- // @docs-props-type DatePropsBase
347
-
348
- /**
190
+ function V() {
191
+ V = Object.assign || function(e) {
192
+ for (var t = 1; t < arguments.length; t++) {
193
+ var n = arguments[t];
194
+ for (var a in n) {
195
+ if (Object.prototype.hasOwnProperty.call(n, a)) {
196
+ e[a] = n[a];
197
+ }
198
+ }
199
+ }
200
+ return e;
201
+ };
202
+ return V.apply(this, arguments);
203
+ }
204
+ function j(e, t) {
205
+ if (!(e instanceof t)) {
206
+ throw new TypeError("Cannot call a class as a function");
207
+ }
208
+ }
209
+ function F(e, t) {
210
+ for (var n = 0; n < t.length; n++) {
211
+ var a = t[n];
212
+ a.enumerable = a.enumerable || false;
213
+ a.configurable = true;
214
+ if ("value" in a) a.writable = true;
215
+ Object.defineProperty(e, a.key, a);
216
+ }
217
+ }
218
+ function M(e, t, n) {
219
+ if (t) F(e.prototype, t);
220
+ if (n) F(e, n);
221
+ return e;
222
+ }
223
+ function _(e, t) {
224
+ if (typeof t !== "function" && t !== null) {
225
+ throw new TypeError("Super expression must either be null or a function");
226
+ }
227
+ e.prototype = Object.create(t && t.prototype, {
228
+ constructor: {
229
+ value: e,
230
+ writable: true,
231
+ configurable: true
232
+ }
233
+ });
234
+ if (t) P(e, t);
235
+ }
236
+ function P(e, t) {
237
+ P = Object.setPrototypeOf || function e(t, n) {
238
+ t.__proto__ = n;
239
+ return t;
240
+ };
241
+ return P(e, t);
242
+ }
243
+ function q(e) {
244
+ var t = H();
245
+ return function n() {
246
+ var a = K(e), o;
247
+ if (t) {
248
+ var r = K(this).constructor;
249
+ o = Reflect.construct(a, arguments, r);
250
+ } else {
251
+ o = a.apply(this, arguments);
252
+ }
253
+ return E(this, o);
254
+ };
255
+ }
256
+ function E(e, t) {
257
+ if (t && (w(t) === "object" || typeof t === "function")) {
258
+ return t;
259
+ }
260
+ return R(e);
261
+ }
262
+ function R(e) {
263
+ if (e === void 0) {
264
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
265
+ }
266
+ return e;
267
+ }
268
+ function H() {
269
+ if (typeof Reflect === "undefined" || !Reflect.construct) return false;
270
+ if (Reflect.construct.sham) return false;
271
+ if (typeof Proxy === "function") return true;
272
+ try {
273
+ Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
274
+ return true;
275
+ } catch (e) {
276
+ return false;
277
+ }
278
+ }
279
+ function K(e) {
280
+ K = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
281
+ return t.__proto__ || Object.getPrototypeOf(t);
282
+ };
283
+ return K(e);
284
+ }
285
+ function W(e, t, n) {
286
+ if (t in e) {
287
+ Object.defineProperty(e, t, {
288
+ value: n,
289
+ enumerable: true,
290
+ configurable: true,
291
+ writable: true
292
+ });
293
+ } else {
294
+ e[t] = n;
295
+ }
296
+ return e;
297
+ }
298
+ var A = {
299
+ defaultValue: r().string,
300
+ describedBy: r().string,
301
+ disabled: r().bool,
302
+ elementRef: r().oneOfType([ r().func, r().object ]),
303
+ error: r().bool,
304
+ highlightToday: r().bool,
305
+ inline: r().bool,
306
+ inputId: r().string,
307
+ inputOnly: r().bool,
308
+ labelledBy: r().string,
309
+ locale: r().string,
310
+ name: r().string,
311
+ onBlur: r().func,
312
+ onChange: r().func,
313
+ onClick: r().func,
314
+ onFocus: r().func,
315
+ onKeyDown: r().func,
316
+ /** @private */
317
+ splunkTheme: r().object,
318
+ value: r().string
319
+ };
320
+ var B = {
321
+ disabled: false,
322
+ error: false,
323
+ highlightToday: false,
324
+ inline: true,
325
+ inputOnly: false,
326
+ locale: "en_US"
327
+ };
328
+ var Y = function(e) {
329
+ _(n, e);
330
+ var t = q(n);
331
+ // @docs-props-type DatePropsBase
332
+ /**
349
333
  * This static value can be used to convert a moment date to a compatible string
350
334
  * to set the `value` prop.
351
335
  * ```
@@ -355,362 +339,248 @@ var _Date = /*#__PURE__*/function (_Component) {
355
339
  * @name momentFormat
356
340
  * @memberOf Date
357
341
  * @type string
358
- */
359
- function Date(props) {
360
- var _this;
361
-
362
- _classCallCheck(this, Date);
363
-
364
- _this = _super.call(this, props);
365
-
366
- _defineProperty(_assertThisInitialized(_this), "controlledExternally", void 0);
367
-
368
- _defineProperty(_assertThisInitialized(_this), "focusCalledInternally", false);
369
-
370
- _defineProperty(_assertThisInitialized(_this), "popoverId", void 0);
371
-
372
- _defineProperty(_assertThisInitialized(_this), "calendar", null);
373
-
374
- _defineProperty(_assertThisInitialized(_this), "openWithFocus", false);
375
-
376
- _defineProperty(_assertThisInitialized(_this), "applyTextChange", function (e) {
377
- var date = external_moment_default()(_this.state.tempTextInputDate, 'l', _this.props.locale);
378
-
379
- if (date.isValid()) {
380
- _this.handleDateChange(e, {
381
- value: date.format(_Date.momentFormat)
382
- }, 'textInput');
383
- } else {
384
- _this.setState({
385
- calendarOpen: false,
386
- tempTextInputDate: undefined
387
- });
388
- }
389
- });
390
-
391
- _defineProperty(_assertThisInitialized(_this), "handleDateChange", function (e, _ref, origin) {
392
- var value = _ref.value;
393
-
394
- if (origin !== 'textInput') {
395
- _this.focusCalledInternally = true;
396
-
397
- _this.focus();
398
- }
399
-
400
- if (_this.getValue() !== value) {
401
- var _this$props$onChange, _this$props;
402
-
403
- _this.setState({
404
- calendarOpen: false,
405
- tempTextInputDate: undefined,
406
- value: _this.isControlled() ? undefined : value
407
- });
408
-
409
- var name = _this.props.name;
410
- (_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 ? void 0 : _this$props$onChange.call(_this$props, e, {
411
- value: value,
412
- name: name
413
- });
414
- } else {
415
- _this.setState({
416
- calendarOpen: false
417
- });
418
- }
419
- });
420
-
421
- _defineProperty(_assertThisInitialized(_this), "handleFocus", function (e) {
422
- var _this$props$onFocus, _this$props2;
423
-
424
- if (_this.focusCalledInternally) {
425
- _this.focusCalledInternally = false;
426
- } else if (!_this.props.inputOnly) {
427
- _this.setState({
428
- calendarOpen: true
429
- });
430
- }
431
-
432
- (_this$props$onFocus = (_this$props2 = _this.props).onFocus) === null || _this$props$onFocus === void 0 ? void 0 : _this$props$onFocus.call(_this$props2, e);
433
- });
434
-
435
- _defineProperty(_assertThisInitialized(_this), "handleClick", function (e) {
436
- var _this$state$anchor, _this$props$onClick, _this$props3;
437
-
438
- 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))) {
439
- _this.focus();
440
- }
441
-
442
- if (!_this.props.inputOnly && !_this.state.calendarOpen) {
443
- _this.setState({
444
- calendarOpen: true
445
- });
446
- }
447
-
448
- (_this$props$onClick = (_this$props3 = _this.props).onClick) === null || _this$props$onClick === void 0 ? void 0 : _this$props$onClick.call(_this$props3, e);
449
- });
450
-
451
- _defineProperty(_assertThisInitialized(_this), "handleInputChange", function (e, _ref2) {
452
- var value = _ref2.value;
453
-
454
- _this.setState({
455
- tempTextInputDate: value,
456
- calendarOpen: !_this.props.inputOnly
457
- });
458
- });
459
-
460
- _defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
461
- var _this$props$onKeyDown, _this$props4;
462
-
463
- var eventKeyCode = Object(keyboard_["keycode"])(e.nativeEvent);
464
-
465
- if (eventKeyCode === 'enter' || eventKeyCode === 'tab') {
466
- _this.applyTextChange(e);
467
- } else if (!_this.props.inputOnly && eventKeyCode === 'down') {
468
- e.preventDefault();
469
-
470
- if (!_this.state.calendarOpen) {
471
- _this.openWithFocus = true;
472
-
473
- _this.setState({
474
- calendarOpen: true
475
- });
476
- } else if (_this.calendar) {
477
- _this.calendar.focusActiveDay();
342
+ */ function n(e) {
343
+ var a;
344
+ j(this, n);
345
+ a = t.call(this, e);
346
+ W(R(a), "controlledExternally", void 0);
347
+ W(R(a), "focusCalledInternally", false);
348
+ W(R(a), "popoverId", void 0);
349
+ W(R(a), "calendar", null);
350
+ W(R(a), "openWithFocus", false);
351
+ W(R(a), "applyTextChange", (function(e) {
352
+ var t = p()(a.state.tempTextInputDate, "l", a.props.locale);
353
+ if (t.isValid()) {
354
+ a.handleDateChange(e, {
355
+ value: t.format(Y.momentFormat)
356
+ }, "textInput");
357
+ } else {
358
+ a.setState({
359
+ calendarOpen: false,
360
+ tempTextInputDate: undefined
361
+ });
362
+ }
363
+ }));
364
+ W(R(a), "handleDateChange", (function(e, t, n) {
365
+ var o = t.value;
366
+ if (n !== "textInput") {
367
+ a.focusCalledInternally = true;
368
+ a.focus();
369
+ }
370
+ if (a.getValue() !== o) {
371
+ var r, l;
372
+ a.setState({
373
+ calendarOpen: false,
374
+ tempTextInputDate: undefined,
375
+ value: a.isControlled() ? undefined : o
376
+ });
377
+ var i = a.props.name;
378
+ (r = (l = a.props).onChange) === null || r === void 0 ? void 0 : r.call(l, e, {
379
+ value: o,
380
+ name: i
381
+ });
382
+ } else {
383
+ a.setState({
384
+ calendarOpen: false
385
+ });
386
+ }
387
+ }));
388
+ W(R(a), "handleFocus", (function(e) {
389
+ var t, n;
390
+ if (a.focusCalledInternally) {
391
+ a.focusCalledInternally = false;
392
+ } else if (!a.props.inputOnly) {
393
+ a.setState({
394
+ calendarOpen: true
395
+ });
396
+ }
397
+ (t = (n = a.props).onFocus) === null || t === void 0 ? void 0 : t.call(n, e);
398
+ }));
399
+ W(R(a), "handleClick", (function(e) {
400
+ var t, n, o;
401
+ if (document.activeElement !== a.state.input && ((t = a.state.anchor) === null || t === void 0 ? void 0 : t.contains(e.target))) {
402
+ a.focus();
403
+ }
404
+ if (!a.props.inputOnly && !a.state.calendarOpen) {
405
+ a.setState({
406
+ calendarOpen: true
407
+ });
408
+ }
409
+ (n = (o = a.props).onClick) === null || n === void 0 ? void 0 : n.call(o, e);
410
+ }));
411
+ W(R(a), "handleInputChange", (function(e, t) {
412
+ var n = t.value;
413
+ a.setState({
414
+ tempTextInputDate: n,
415
+ calendarOpen: !a.props.inputOnly
416
+ });
417
+ }));
418
+ W(R(a), "handleKeyDown", (function(e) {
419
+ var t, n;
420
+ var o = (0, d.keycode)(e.nativeEvent);
421
+ if (o === "enter" || o === "tab") {
422
+ a.applyTextChange(e);
423
+ } else if (!a.props.inputOnly && o === "down") {
424
+ e.preventDefault();
425
+ if (!a.state.calendarOpen) {
426
+ a.openWithFocus = true;
427
+ a.setState({
428
+ calendarOpen: true
429
+ });
430
+ } else if (a.calendar) {
431
+ a.calendar.focusActiveDay();
432
+ }
433
+ } else if (o === "esc") {
434
+ a.setState({
435
+ calendarOpen: false,
436
+ tempTextInputDate: undefined
437
+ });
438
+ a.focus();
439
+ }
440
+ (t = (n = a.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
441
+ }));
442
+ W(R(a), "handleMount", (function(e) {
443
+ a.setState({
444
+ anchor: e
445
+ });
446
+ S(a.props.elementRef, e);
447
+ }));
448
+ W(R(a), "handleInputMount", (function(e) {
449
+ a.setState({
450
+ input: e
451
+ });
452
+ }));
453
+ W(R(a), "handleCalendarMount", (function(e) {
454
+ a.calendar = e;
455
+ }));
456
+ W(R(a), "handleRequestClose", (function(e) {
457
+ var t = e.event, n = e.reason;
458
+ if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== a.state.anchor) {
459
+ a.applyTextChange(t);
460
+ if (n === "escapeKey") {
461
+ a.focusCalledInternally = true;
462
+ a.focus();
463
+ }
464
+ }
465
+ }));
466
+ a.controlledExternally = i()(e, "value");
467
+ var o = a.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(Y.momentFormat);
468
+ a.state = {
469
+ anchor: null,
470
+ calendarOpen: false,
471
+ input: null,
472
+ value: a.isControlled() ? undefined : o
473
+ };
474
+ a.popoverId = (0, f.createDOMID)("calendar");
475
+ if (false) {}
476
+ if (false) {}
477
+ return a;
478
478
  }
479
- } else if (eventKeyCode === 'esc') {
480
- _this.setState({
481
- calendarOpen: false,
482
- tempTextInputDate: undefined
483
- });
484
-
485
- _this.focus();
486
- }
487
-
488
- (_this$props$onKeyDown = (_this$props4 = _this.props).onKeyDown) === null || _this$props$onKeyDown === void 0 ? void 0 : _this$props$onKeyDown.call(_this$props4, e);
489
- });
490
-
491
- _defineProperty(_assertThisInitialized(_this), "handleMount", function (el) {
492
- _this.setState({
493
- anchor: el
494
- });
495
-
496
- Object(updateReactRef["a" /* updateReactRef */])(_this.props.elementRef, el);
497
- });
498
-
499
- _defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
500
- _this.setState({
501
- input: el
502
- });
503
- });
504
-
505
- _defineProperty(_assertThisInitialized(_this), "handleCalendarMount", function (el) {
506
- _this.calendar = el;
507
- });
508
-
509
- _defineProperty(_assertThisInitialized(_this), "handleRequestClose", function (_ref3) {
510
- var event = _ref3.event,
511
- reason = _ref3.reason;
512
-
513
- if ((reason === 'clickAway' || reason === 'escapeKey') && event !== undefined && event.target !== _this.state.anchor) {
514
- _this.applyTextChange(event);
515
-
516
- if (reason === 'escapeKey') {
517
- _this.focusCalledInternally = true;
518
-
519
- _this.focus();
520
- }
521
- }
522
- });
523
-
524
- _this.controlledExternally = has_default()(props, 'value');
525
- var dateString = _this.isControlled() ? props.value : props.defaultValue || external_moment_default()().locale(props.locale).format(_Date.momentFormat);
526
- _this.state = {
527
- anchor: null,
528
- calendarOpen: false,
529
- input: null,
530
- value: _this.isControlled() ? undefined : dateString
531
- };
532
- _this.popoverId = Object(id_["createDOMID"])('calendar');
533
-
534
- if (false) {}
535
-
536
- if (false) {}
537
-
538
- return _this;
539
- }
540
-
541
- _createClass(Date, [{
542
- key: "componentDidUpdate",
543
- value: function componentDidUpdate(prevProps, prevState) {
544
- if (false) {}
545
-
546
- if (false) {}
547
-
548
- if (false) {}
549
- /**
479
+ M(n, [ {
480
+ key: "componentDidUpdate",
481
+ value: function e(t, n) {
482
+ if (false) {}
483
+ if (false) {}
484
+ if (false) {}
485
+ /**
550
486
  * If `openWithFocus` and `calendarOpen` are set the user is attempting to navigate to the dropdown, but it's closed.
551
487
  * On the first update following the state change set focus to the active day within the calendar.
552
- */
553
-
554
-
555
- if (this.openWithFocus && this.state.calendarOpen && prevState.calendarOpen !== this.state.calendarOpen) {
556
- var _this$calendar;
557
-
558
- this.openWithFocus = false;
559
- (_this$calendar = this.calendar) === null || _this$calendar === void 0 ? void 0 : _this$calendar.focusActiveDay();
560
- }
561
- }
562
- }, {
563
- key: "getValue",
564
- value: function getValue() {
565
- return this.isControlled() ? this.props.value : this.state.value;
566
- }
567
- }, {
568
- key: "getTextInputValue",
569
- value: function getTextInputValue() {
570
- return this.state.tempTextInputDate === undefined ? external_moment_default()(this.getValue(), _Date.momentFormat, this.props.locale).format('l') : this.state.tempTextInputDate;
571
- }
572
- }, {
573
- key: "isControlled",
574
- value: function isControlled() {
575
- return this.controlledExternally;
576
- }
577
- /**
488
+ */ if (this.openWithFocus && this.state.calendarOpen && n.calendarOpen !== this.state.calendarOpen) {
489
+ var a;
490
+ this.openWithFocus = false;
491
+ (a = this.calendar) === null || a === void 0 ? void 0 : a.focusActiveDay();
492
+ }
493
+ }
494
+ }, {
495
+ key: "getValue",
496
+ value: function e() {
497
+ return this.isControlled() ? this.props.value : this.state.value;
498
+ }
499
+ }, {
500
+ key: "getTextInputValue",
501
+ value: function e() {
502
+ return this.state.tempTextInputDate === undefined ? p()(this.getValue(), Y.momentFormat, this.props.locale).format("l") : this.state.tempTextInputDate;
503
+ }
504
+ }, {
505
+ key: "isControlled",
506
+ value: function e() {
507
+ return this.controlledExternally;
508
+ }
509
+ /**
578
510
  * Place focus on the input.
579
- */
580
-
581
- }, {
582
- key: "focus",
583
- value: function focus() {
584
- var _this$state$input;
585
-
586
- (_this$state$input = this.state.input) === null || _this$state$input === void 0 ? void 0 : _this$state$input.focus();
587
- }
588
- }, {
589
- key: "render",
590
- value: function render() {
591
- var _this$props5 = this.props,
592
- disabled = _this$props5.disabled,
593
- highlightToday = _this$props5.highlightToday,
594
- inputOnly = _this$props5.inputOnly,
595
- locale = _this$props5.locale,
596
- splunkTheme = _this$props5.splunkTheme;
597
- var isPrisma = splunkTheme.isPrisma;
598
- var currentValue = this.getValue();
599
- var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default.a.createElement(IconContainer, {
600
- "aria-hidden": true,
601
- $disabled: disabled
602
- }, /*#__PURE__*/external_react_default.a.createElement(CalendarIcon, null));
603
- var children;
604
- var ariaProps = {};
605
-
606
- if (!inputOnly) {
607
- ariaProps.role = 'combobox';
608
- ariaProps['aria-controls'] = this.state.calendarOpen ? this.popoverId : undefined;
609
- ariaProps['aria-expanded'] = disabled ? false : this.state.calendarOpen;
610
- ariaProps['aria-haspopup'] = true;
611
- children = /*#__PURE__*/external_react_default.a.createElement(Popover_default.a, {
612
- anchor: this.state.anchor,
613
- id: this.popoverId,
614
- open: disabled ? false : this.state.calendarOpen,
615
- onRequestClose: this.handleRequestClose
616
- }, /*#__PURE__*/external_react_default.a.createElement(Calendar_default.a, {
617
- ref: this.handleCalendarMount,
618
- highlightToday: highlightToday,
619
- locale: locale,
620
- onChange: this.handleDateChange,
621
- value: currentValue
622
- }));
623
- }
624
-
625
- return /*#__PURE__*/external_react_default.a.createElement(StyledText, Date_extends({
626
- autoCapitalize: "off",
627
- autoComplete: "off",
628
- autoCorrect: "off",
629
- spellCheck: false,
630
- "data-test": "date",
631
- "data-test-value": currentValue,
632
- "data-test-popover-id": this.popoverId,
633
- elementRef: this.handleMount,
634
- inputRef: this.handleInputMount,
635
- onChange: this.handleInputChange,
636
- onClick: this.handleClick,
637
- onFocus: this.handleFocus,
638
- onKeyDown: this.handleKeyDown,
639
- value: this.getTextInputValue(),
640
- startAdornment: startAdornment,
641
- $disabled: disabled
642
- }, ariaProps, omit_default()(this.props, 'className', 'defaultValue', 'elementRef', 'inputOnly', 'multiline', 'locale', 'onChange', 'onClick', 'onFocus', 'onKeyDown', 'onSelect', 'spellCheck', 'value')), children);
643
- }
644
- }]);
645
-
646
- return Date;
647
- }(external_react_["Component"]);
648
-
649
- _defineProperty(_Date, "propTypes", propTypes);
650
-
651
- _defineProperty(_Date, "defaultProps", defaultProps);
652
-
653
- _defineProperty(_Date, "momentFormat", 'YYYY-MM-DD');
654
-
655
- _defineProperty(_Date, "validateValue", function (value) {
656
- if (!external_moment_default()(value, _Date.momentFormat).isValid()) {
657
- // eslint-disable-next-line no-console
658
- console.error("Invalid date string value \"".concat(value, "\" provided to Moment."));
659
- }
660
- });
661
-
662
- var DateWithThemeBase = Object(themes_["withSplunkTheme"])(_Date);
663
- var DateWithTheme = DateWithThemeBase;
664
- DateWithTheme.propTypes = _Date.propTypes;
665
- DateWithTheme.momentFormat = _Date.momentFormat;
666
- /* harmony default export */ var Date_Date = (DateWithTheme);
667
-
668
- // CONCATENATED MODULE: ./src/Date/index.ts
669
-
670
-
671
-
672
- /***/ }),
673
-
674
- /***/ 21:
675
- /***/ (function(module, exports) {
676
-
677
- module.exports = require("@splunk/react-ui/Popover");
678
-
679
- /***/ }),
680
-
681
- /***/ 3:
682
- /***/ (function(module, exports) {
683
-
684
- module.exports = require("styled-components");
685
-
686
- /***/ }),
687
-
688
- /***/ 32:
689
- /***/ (function(module, exports) {
690
-
691
- module.exports = require("@splunk/react-ui/Text");
692
-
693
- /***/ }),
694
-
695
- /***/ 5:
696
- /***/ (function(module, exports) {
697
-
698
- module.exports = require("lodash/omit");
699
-
700
- /***/ }),
701
-
702
- /***/ 7:
703
- /***/ (function(module, exports) {
704
-
705
- module.exports = require("@splunk/ui-utils/keyboard");
706
-
707
- /***/ }),
708
-
709
- /***/ 8:
710
- /***/ (function(module, exports) {
711
-
712
- module.exports = require("@splunk/ui-utils/id");
713
-
714
- /***/ })
715
-
716
- /******/ });
511
+ */ }, {
512
+ key: "focus",
513
+ value: function e() {
514
+ var t;
515
+ (t = this.state.input) === null || t === void 0 ? void 0 : t.focus();
516
+ }
517
+ }, {
518
+ key: "render",
519
+ value: function e() {
520
+ var t = this.props, n = t.disabled, o = t.highlightToday, r = t.inputOnly, l = t.locale, i = t.splunkTheme;
521
+ var u = i.isPrisma;
522
+ var c = this.getValue();
523
+ var p = u && !r && a().createElement(I, {
524
+ "aria-hidden": true,
525
+ $disabled: n
526
+ }, a().createElement(D, null));
527
+ var f;
528
+ var d = {};
529
+ if (!r) {
530
+ d.role = "combobox";
531
+ d["aria-controls"] = this.state.calendarOpen ? this.popoverId : undefined;
532
+ d["aria-expanded"] = n ? false : this.state.calendarOpen;
533
+ d["aria-haspopup"] = true;
534
+ f = a().createElement(m(), {
535
+ anchor: this.state.anchor,
536
+ id: this.popoverId,
537
+ open: n ? false : this.state.calendarOpen,
538
+ onRequestClose: this.handleRequestClose
539
+ }, a().createElement(v(), {
540
+ ref: this.handleCalendarMount,
541
+ highlightToday: o,
542
+ locale: l,
543
+ onChange: this.handleDateChange,
544
+ value: c
545
+ }));
546
+ }
547
+
548
+ return a().createElement(k, V({
549
+ autoCapitalize: "off",
550
+ autoComplete: "off",
551
+ autoCorrect: "off",
552
+ spellCheck: false,
553
+ "data-test": "date",
554
+ "data-test-value": c,
555
+ "data-test-popover-id": this.popoverId,
556
+ elementRef: this.handleMount,
557
+ inputRef: this.handleInputMount,
558
+ onChange: this.handleInputChange,
559
+ onClick: this.handleClick,
560
+ onFocus: this.handleFocus,
561
+ onKeyDown: this.handleKeyDown,
562
+ value: this.getTextInputValue(),
563
+ startAdornment: p,
564
+ $disabled: n
565
+ }, d, s()(this.props, "className", "defaultValue", "elementRef", "inputOnly", "multiline", "locale", "onChange", "onClick", "onFocus", "onKeyDown", "onSelect", "spellCheck", "value")), f);
566
+ }
567
+ } ]);
568
+ return n;
569
+ }(n.Component);
570
+ W(Y, "propTypes", A);
571
+ W(Y, "defaultProps", B);
572
+ W(Y, "momentFormat", "YYYY-MM-DD");
573
+ W(Y, "validateValue", (function(e) {
574
+ if (!p()(e, Y.momentFormat).isValid()) {
575
+ // eslint-disable-next-line no-console
576
+ console.error('Invalid date string value "'.concat(e, '" provided to Moment.'));
577
+ }
578
+ }));
579
+ var $ = (0, b.withSplunkTheme)(Y);
580
+ var N = $;
581
+ N.propTypes = Y.propTypes;
582
+ N.momentFormat = Y.momentFormat;
583
+ /* harmony default export */ const Z = N;
584
+ // CONCATENATED MODULE: ./src/Date/index.ts
585
+ module.exports = t;
586
+ /******/})();