@splunk/react-ui 4.20.0 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion.js +114 -230
- package/Anchor.js +74 -150
- package/Animation.js +52 -124
- package/AnimationToggle.js +86 -146
- package/Box.js +77 -153
- package/Breadcrumbs.js +105 -197
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +21 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +128 -246
- package/CloseButton.js +92 -200
- package/Code.js +162 -250
- package/CollapsiblePanel.js +214 -370
- package/Color.js +267 -495
- package/ColumnLayout.js +152 -254
- package/ComboBox.js +197 -371
- package/Concertina.js +214 -374
- package/ControlGroup.js +164 -288
- package/Date.js +154 -304
- package/DefinitionList.js +104 -180
- package/Divider.js +80 -156
- package/Dropdown.js +121 -263
- package/DualListbox.js +408 -601
- package/EventListener.js +70 -138
- package/File.js +343 -547
- package/FormRows.js +232 -414
- package/Heading.js +94 -164
- package/Image.js +167 -323
- package/JSONTree.js +166 -314
- package/Layer.js +221 -388
- package/Link.js +133 -239
- package/List.js +85 -161
- package/Markdown.js +230 -354
- package/Menu.js +489 -760
- package/Message.js +248 -437
- package/MessageBar.js +220 -408
- package/Modal.js +201 -365
- package/ModalLayer.js +96 -196
- package/Monogram.js +112 -204
- package/Multiselect.js +1135 -1761
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +370 -620
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +161 -303
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1028 -1430
- package/SidePanel.js +106 -214
- package/Slider.js +198 -348
- package/SlidingPanels.js +138 -280
- package/SplitButton.js +141 -273
- package/StaticContent.js +84 -168
- package/StepBar.js +138 -246
- package/Switch.js +261 -385
- package/TabBar.js +261 -398
- package/TabLayout.js +122 -238
- package/Table.js +943 -1448
- package/Text.js +335 -549
- package/TextArea.js +315 -537
- package/Tooltip.js +152 -292
- package/TransitionOpen.js +118 -242
- package/Typography.js +81 -157
- package/WaitSpinner.js +117 -209
- package/package.json +14 -15
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/ComboBox/Option.d.ts +1 -1
- package/types/src/Concertina/Concertina.d.ts +4 -0
- package/types/src/Link/Link.d.ts +7 -3
- package/types/src/Link/docs/examples/NewWindow.d.ts +2 -0
- package/types/src/Markdown/Markdown.d.ts +1 -1
- package/types/src/Markdown/renderers/MarkdownHeading.d.ts +1 -1
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -0
- package/types/src/MessageBar/docs/examples/WithActions.d.ts +2 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +1 -1
- package/types/src/Select/OptionBase.d.ts +1 -1
- package/types/src/fixtures/FetchOptions.d.ts +2 -8
- package/useForceUpdate.js +46 -110
- package/useKeyPress.js +50 -107
- package/usePrevious.js +47 -111
- package/useRovingFocus.js +53 -133
- package/types/src/Link/docs/examples/NewTab.d.ts +0 -2
- /package/types/src/Table/docs/examples/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
- /package/types/src/Table/docs/examples/prisma/{DockedHeader.d.ts → DockedHeaderScrollbar.d.ts} +0 -0
package/Date.js
CHANGED
|
@@ -1,272 +1,165 @@
|
|
|
1
|
-
|
|
2
|
-
/******/
|
|
3
|
-
/******/ // The
|
|
4
|
-
/******/ var
|
|
5
|
-
/******/
|
|
6
|
-
|
|
7
|
-
/******/
|
|
8
|
-
/******/
|
|
9
|
-
/******/ //
|
|
10
|
-
/******/
|
|
11
|
-
/******/
|
|
12
|
-
/******/
|
|
13
|
-
/******/
|
|
14
|
-
/******/
|
|
15
|
-
/******/
|
|
16
|
-
/******/
|
|
17
|
-
/******/
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ // The require scope
|
|
4
|
+
/******/ var __webpack_require__ = {};
|
|
5
|
+
/******/
|
|
6
|
+
/************************************************************************/
|
|
7
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
8
|
+
/******/ (() => {
|
|
9
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
10
|
+
/******/ __webpack_require__.n = (module) => {
|
|
11
|
+
/******/ var getter = module && module.__esModule ?
|
|
12
|
+
/******/ () => (module['default']) :
|
|
13
|
+
/******/ () => (module);
|
|
14
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
15
|
+
/******/ return getter;
|
|
16
|
+
/******/ };
|
|
17
|
+
/******/ })();
|
|
18
|
+
/******/
|
|
19
|
+
/******/ /* webpack/runtime/define property getters */
|
|
20
|
+
/******/ (() => {
|
|
21
|
+
/******/ // define getter functions for harmony exports
|
|
22
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
23
|
+
/******/ for(var key in definition) {
|
|
24
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
25
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
26
|
+
/******/ }
|
|
27
|
+
/******/ }
|
|
18
28
|
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/
|
|
21
|
-
/******/
|
|
22
|
-
/******/
|
|
23
|
-
/******/
|
|
24
|
-
/******/
|
|
25
|
-
/******/
|
|
26
|
-
/******/
|
|
27
|
-
/******/
|
|
28
|
-
/******/
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/
|
|
32
|
-
/******/
|
|
33
|
-
/******/
|
|
34
|
-
/******/
|
|
35
|
-
/******/
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 201);
|
|
86
|
-
/******/ })
|
|
29
|
+
/******/ })();
|
|
30
|
+
/******/
|
|
31
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
32
|
+
/******/ (() => {
|
|
33
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
34
|
+
/******/ })();
|
|
35
|
+
/******/
|
|
36
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
37
|
+
/******/ (() => {
|
|
38
|
+
/******/ // define __esModule on exports
|
|
39
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
40
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
41
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
42
|
+
/******/ }
|
|
43
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
44
|
+
/******/ };
|
|
45
|
+
/******/ })();
|
|
46
|
+
/******/
|
|
87
47
|
/************************************************************************/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
/***/ 0:
|
|
91
|
-
/***/ (function(module, exports) {
|
|
92
|
-
|
|
93
|
-
module.exports = require("@splunk/themes");
|
|
94
|
-
|
|
95
|
-
/***/ }),
|
|
96
|
-
|
|
97
|
-
/***/ 1:
|
|
98
|
-
/***/ (function(module, exports) {
|
|
99
|
-
|
|
100
|
-
module.exports = require("prop-types");
|
|
101
|
-
|
|
102
|
-
/***/ }),
|
|
103
|
-
|
|
104
|
-
/***/ 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
|
-
/**
|
|
110
|
-
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
111
|
-
*
|
|
112
|
-
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
113
|
-
* @param current - The new value of the ref.
|
|
114
|
-
*/
|
|
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
|
|
123
|
-
}
|
|
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";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
163
49
|
// ESM COMPAT FLAG
|
|
164
50
|
__webpack_require__.r(__webpack_exports__);
|
|
165
51
|
|
|
166
52
|
// EXPORTS
|
|
167
|
-
__webpack_require__.d(__webpack_exports__,
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
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
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
DateWithoutTheme: () => (/* reexport */ _Date),
|
|
55
|
+
"default": () => (/* reexport */ Date_Date)
|
|
56
|
+
});
|
|
218
57
|
|
|
219
|
-
|
|
58
|
+
;// CONCATENATED MODULE: external "react"
|
|
59
|
+
const external_react_namespaceObject = require("react");
|
|
60
|
+
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_namespaceObject);
|
|
61
|
+
;// CONCATENATED MODULE: external "prop-types"
|
|
62
|
+
const external_prop_types_namespaceObject = require("prop-types");
|
|
63
|
+
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_namespaceObject);
|
|
64
|
+
;// CONCATENATED MODULE: external "lodash/has"
|
|
65
|
+
const has_namespaceObject = require("lodash/has");
|
|
66
|
+
var has_default = /*#__PURE__*/__webpack_require__.n(has_namespaceObject);
|
|
67
|
+
;// CONCATENATED MODULE: external "lodash/omit"
|
|
68
|
+
const omit_namespaceObject = require("lodash/omit");
|
|
69
|
+
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_namespaceObject);
|
|
70
|
+
;// CONCATENATED MODULE: external "moment"
|
|
71
|
+
const external_moment_namespaceObject = require("moment");
|
|
72
|
+
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_namespaceObject);
|
|
73
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/id"
|
|
74
|
+
const id_namespaceObject = require("@splunk/ui-utils/id");
|
|
75
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
76
|
+
const keyboard_namespaceObject = require("@splunk/ui-utils/keyboard");
|
|
77
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Calendar"
|
|
78
|
+
const Calendar_namespaceObject = require("@splunk/react-ui/Calendar");
|
|
79
|
+
var Calendar_default = /*#__PURE__*/__webpack_require__.n(Calendar_namespaceObject);
|
|
80
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Popover"
|
|
81
|
+
const Popover_namespaceObject = require("@splunk/react-ui/Popover");
|
|
82
|
+
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_namespaceObject);
|
|
83
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
84
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
85
|
+
;// CONCATENATED MODULE: external "styled-components"
|
|
86
|
+
const external_styled_components_namespaceObject = require("styled-components");
|
|
87
|
+
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_namespaceObject);
|
|
88
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Text"
|
|
89
|
+
const Text_namespaceObject = require("@splunk/react-ui/Text");
|
|
90
|
+
var Text_default = /*#__PURE__*/__webpack_require__.n(Text_namespaceObject);
|
|
91
|
+
;// CONCATENATED MODULE: ./src/Date/DateStyles.ts
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
var StyledText = external_styled_components_default()((Text_default())).withConfig({
|
|
220
96
|
displayName: "DateStyles__StyledText",
|
|
221
97
|
componentId: "kacgdc-0"
|
|
222
|
-
})(["cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}"],
|
|
98
|
+
})(["cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}"], (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
223
99
|
"false": 'text',
|
|
224
100
|
"true": 'not-allowed'
|
|
225
|
-
}),
|
|
101
|
+
}), (0,themes_namespaceObject.pick)({
|
|
226
102
|
enterprise: '105px',
|
|
227
103
|
prisma: '150px'
|
|
228
|
-
}),
|
|
104
|
+
}), (0,themes_namespaceObject.pick)({
|
|
229
105
|
enterprise: {
|
|
230
106
|
comfortable: '105px',
|
|
231
107
|
compact: '80px'
|
|
232
108
|
},
|
|
233
109
|
prisma: '150px'
|
|
234
110
|
}));
|
|
235
|
-
var IconContainer = external_styled_components_default.
|
|
111
|
+
var IconContainer = external_styled_components_default().div.withConfig({
|
|
236
112
|
displayName: "DateStyles__IconContainer",
|
|
237
113
|
componentId: "kacgdc-1"
|
|
238
|
-
})(["align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;"],
|
|
239
|
-
"false":
|
|
240
|
-
"true":
|
|
241
|
-
}),
|
|
114
|
+
})(["align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;"], (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
115
|
+
"false": themes_namespaceObject.variables.contentColorMuted,
|
|
116
|
+
"true": themes_namespaceObject.variables.contentColorDisabled
|
|
117
|
+
}), (0,themes_namespaceObject.pick)({
|
|
242
118
|
comfortable: '0 8px',
|
|
243
119
|
compact: '0 6px'
|
|
244
120
|
}));
|
|
245
121
|
|
|
246
|
-
|
|
122
|
+
;// CONCATENATED MODULE: ./src/Date/Icon.tsx
|
|
247
123
|
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
124
|
|
|
249
125
|
|
|
250
126
|
|
|
251
127
|
function CalendarIcon(props) {
|
|
252
|
-
var _useSplunkTheme =
|
|
128
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
253
129
|
density = _useSplunkTheme.density;
|
|
254
130
|
|
|
255
131
|
var size = density === 'compact' ? '20px' : '24px';
|
|
256
|
-
return /*#__PURE__*/external_react_default.
|
|
132
|
+
return /*#__PURE__*/external_react_default().createElement("svg", _extends({
|
|
257
133
|
viewBox: "0 0 24 24",
|
|
258
134
|
width: size,
|
|
259
135
|
height: size
|
|
260
|
-
}, props), /*#__PURE__*/external_react_default.
|
|
136
|
+
}, props), /*#__PURE__*/external_react_default().createElement("path", {
|
|
261
137
|
fill: "currentColor",
|
|
262
138
|
fillRule: "evenodd",
|
|
263
139
|
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
140
|
}));
|
|
265
141
|
}
|
|
266
|
-
|
|
267
|
-
|
|
142
|
+
;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
143
|
+
/**
|
|
144
|
+
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
145
|
+
*
|
|
146
|
+
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
147
|
+
* @param current - The new value of the ref.
|
|
148
|
+
*/
|
|
149
|
+
function updateReactRef(ref, current) {
|
|
150
|
+
if (ref) {
|
|
151
|
+
if (typeof ref === 'function') {
|
|
152
|
+
ref(current);
|
|
153
|
+
} else {
|
|
154
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
155
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
156
|
+
ref.current = current; // eslint-disable-line no-param-reassign
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
268
160
|
|
|
269
|
-
|
|
161
|
+
|
|
162
|
+
;// CONCATENATED MODULE: ./src/Date/Date.tsx
|
|
270
163
|
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
164
|
|
|
272
165
|
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); }
|
|
@@ -307,27 +200,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
307
200
|
|
|
308
201
|
|
|
309
202
|
var propTypes = {
|
|
310
|
-
defaultValue: external_prop_types_default.
|
|
311
|
-
describedBy: external_prop_types_default.
|
|
312
|
-
disabled: external_prop_types_default.
|
|
313
|
-
elementRef: external_prop_types_default.
|
|
314
|
-
error: external_prop_types_default.
|
|
315
|
-
highlightToday: external_prop_types_default.
|
|
316
|
-
inline: external_prop_types_default.
|
|
317
|
-
inputId: external_prop_types_default.
|
|
318
|
-
inputOnly: external_prop_types_default.
|
|
319
|
-
labelledBy: external_prop_types_default.
|
|
320
|
-
locale: external_prop_types_default.
|
|
321
|
-
name: external_prop_types_default.
|
|
322
|
-
onBlur: external_prop_types_default.
|
|
323
|
-
onChange: external_prop_types_default.
|
|
324
|
-
onClick: external_prop_types_default.
|
|
325
|
-
onFocus: external_prop_types_default.
|
|
326
|
-
onKeyDown: external_prop_types_default.
|
|
203
|
+
defaultValue: (external_prop_types_default()).string,
|
|
204
|
+
describedBy: (external_prop_types_default()).string,
|
|
205
|
+
disabled: (external_prop_types_default()).bool,
|
|
206
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object]),
|
|
207
|
+
error: (external_prop_types_default()).bool,
|
|
208
|
+
highlightToday: (external_prop_types_default()).bool,
|
|
209
|
+
inline: (external_prop_types_default()).bool,
|
|
210
|
+
inputId: (external_prop_types_default()).string,
|
|
211
|
+
inputOnly: (external_prop_types_default()).bool,
|
|
212
|
+
labelledBy: (external_prop_types_default()).string,
|
|
213
|
+
locale: (external_prop_types_default()).string,
|
|
214
|
+
name: (external_prop_types_default()).string,
|
|
215
|
+
onBlur: (external_prop_types_default()).func,
|
|
216
|
+
onChange: (external_prop_types_default()).func,
|
|
217
|
+
onClick: (external_prop_types_default()).func,
|
|
218
|
+
onFocus: (external_prop_types_default()).func,
|
|
219
|
+
onKeyDown: (external_prop_types_default()).func,
|
|
327
220
|
|
|
328
221
|
/** @private */
|
|
329
|
-
splunkTheme: external_prop_types_default.
|
|
330
|
-
value: external_prop_types_default.
|
|
222
|
+
splunkTheme: (external_prop_types_default()).object,
|
|
223
|
+
value: (external_prop_types_default()).string
|
|
331
224
|
};
|
|
332
225
|
var defaultProps = {
|
|
333
226
|
disabled: false,
|
|
@@ -460,7 +353,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
460
353
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
|
|
461
354
|
var _this$props$onKeyDown, _this$props4;
|
|
462
355
|
|
|
463
|
-
var eventKeyCode =
|
|
356
|
+
var eventKeyCode = (0,keyboard_namespaceObject.keycode)(e.nativeEvent);
|
|
464
357
|
|
|
465
358
|
if (eventKeyCode === 'enter' || eventKeyCode === 'tab') {
|
|
466
359
|
_this.applyTextChange(e);
|
|
@@ -493,7 +386,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
493
386
|
anchor: el
|
|
494
387
|
});
|
|
495
388
|
|
|
496
|
-
|
|
389
|
+
updateReactRef(_this.props.elementRef, el);
|
|
497
390
|
});
|
|
498
391
|
|
|
499
392
|
_defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
|
|
@@ -529,7 +422,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
529
422
|
input: null,
|
|
530
423
|
value: _this.isControlled() ? undefined : dateString
|
|
531
424
|
};
|
|
532
|
-
_this.popoverId =
|
|
425
|
+
_this.popoverId = (0,id_namespaceObject.createDOMID)('calendar');
|
|
533
426
|
|
|
534
427
|
if (false) {}
|
|
535
428
|
|
|
@@ -596,10 +489,10 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
596
489
|
splunkTheme = _this$props5.splunkTheme;
|
|
597
490
|
var isPrisma = splunkTheme.isPrisma;
|
|
598
491
|
var currentValue = this.getValue();
|
|
599
|
-
var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default.
|
|
492
|
+
var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default().createElement(IconContainer, {
|
|
600
493
|
"aria-hidden": true,
|
|
601
494
|
$disabled: disabled
|
|
602
|
-
}, /*#__PURE__*/external_react_default.
|
|
495
|
+
}, /*#__PURE__*/external_react_default().createElement(CalendarIcon, null));
|
|
603
496
|
var children;
|
|
604
497
|
var ariaProps = {};
|
|
605
498
|
|
|
@@ -608,12 +501,12 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
608
501
|
ariaProps['aria-controls'] = this.state.calendarOpen ? this.popoverId : undefined;
|
|
609
502
|
ariaProps['aria-expanded'] = disabled ? false : this.state.calendarOpen;
|
|
610
503
|
ariaProps['aria-haspopup'] = true;
|
|
611
|
-
children = /*#__PURE__*/external_react_default.
|
|
504
|
+
children = /*#__PURE__*/external_react_default().createElement((Popover_default()), {
|
|
612
505
|
anchor: this.state.anchor,
|
|
613
506
|
id: this.popoverId,
|
|
614
507
|
open: disabled ? false : this.state.calendarOpen,
|
|
615
508
|
onRequestClose: this.handleRequestClose
|
|
616
|
-
}, /*#__PURE__*/external_react_default.
|
|
509
|
+
}, /*#__PURE__*/external_react_default().createElement((Calendar_default()), {
|
|
617
510
|
ref: this.handleCalendarMount,
|
|
618
511
|
highlightToday: highlightToday,
|
|
619
512
|
locale: locale,
|
|
@@ -622,7 +515,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
622
515
|
}));
|
|
623
516
|
}
|
|
624
517
|
|
|
625
|
-
return /*#__PURE__*/external_react_default.
|
|
518
|
+
return /*#__PURE__*/external_react_default().createElement(StyledText, Date_extends({
|
|
626
519
|
autoCapitalize: "off",
|
|
627
520
|
autoComplete: "off",
|
|
628
521
|
autoCorrect: "off",
|
|
@@ -644,7 +537,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
644
537
|
}]);
|
|
645
538
|
|
|
646
539
|
return Date;
|
|
647
|
-
}(
|
|
540
|
+
}(external_react_namespaceObject.Component);
|
|
648
541
|
|
|
649
542
|
_defineProperty(_Date, "propTypes", propTypes);
|
|
650
543
|
|
|
@@ -659,58 +552,15 @@ _defineProperty(_Date, "validateValue", function (value) {
|
|
|
659
552
|
}
|
|
660
553
|
});
|
|
661
554
|
|
|
662
|
-
var DateWithThemeBase =
|
|
555
|
+
var DateWithThemeBase = (0,themes_namespaceObject.withSplunkTheme)(_Date);
|
|
663
556
|
var DateWithTheme = DateWithThemeBase;
|
|
664
557
|
DateWithTheme.propTypes = _Date.propTypes;
|
|
665
558
|
DateWithTheme.momentFormat = _Date.momentFormat;
|
|
666
|
-
/* harmony default export */
|
|
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) {
|
|
559
|
+
/* harmony default export */ const Date_Date = (DateWithTheme);
|
|
711
560
|
|
|
712
|
-
|
|
561
|
+
;// CONCATENATED MODULE: ./src/Date/index.ts
|
|
713
562
|
|
|
714
|
-
/***/ })
|
|
715
563
|
|
|
716
|
-
|
|
564
|
+
module.exports = __webpack_exports__;
|
|
565
|
+
/******/ })()
|
|
566
|
+
;
|