@splunk/react-ui 4.19.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.d.ts +2 -0
- package/Breadcrumbs.js +207 -0
- package/Button.js +168 -316
- package/ButtonGroup.js +84 -168
- package/ButtonSimple.js +224 -324
- package/CHANGELOG.md +35 -0
- package/Calendar.js +264 -462
- package/Card.js +223 -371
- package/CardLayout.js +87 -163
- package/Chip.js +199 -323
- package/Clickable.js +132 -248
- package/CloseButton.js +92 -200
- package/Code.js +188 -251
- 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 -355
- package/Menu.js +396 -647
- 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 +2675 -2807
- package/Number.js +178 -334
- package/Paginator.js +170 -336
- package/Paragraph.js +77 -153
- package/Popover.js +436 -623
- package/Progress.js +139 -255
- package/RadioBar.js +156 -280
- package/RadioList.js +182 -282
- package/Resize.js +173 -307
- package/ResultsMenu.js +183 -304
- package/ScreenReaderContent.js +75 -151
- package/Scroll.js +125 -267
- package/ScrollContainerContext.js +129 -201
- package/Search.js +188 -354
- package/Select.js +1243 -1248
- 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 +975 -1447
- 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 +20 -21
- package/stubs-splunkui.d.ts +4 -1
- package/types/src/Breadcrumbs/Breadcrumbs.d.ts +25 -0
- package/types/src/Breadcrumbs/Item.d.ts +42 -0
- package/types/src/Breadcrumbs/docs/examples/Adornments.d.ts +2 -0
- package/types/src/Breadcrumbs/docs/examples/Basic.d.ts +2 -0
- package/types/src/Breadcrumbs/index.d.ts +2 -0
- package/types/src/Code/Code.d.ts +1 -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 +12 -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/Compact.d.ts +4 -0
- package/types/src/Multiselect/Multiselect.d.ts +5 -0
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Multiselect/docs/examples/CompactSelectAll.d.ts +2 -0
- 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/Select/SelectAllOption.d.ts +14 -0
- package/types/src/Select/SelectBase.d.ts +11 -3
- package/types/src/Table/Table.d.ts +4 -0
- package/types/src/Text/Text.d.ts +3 -3
- package/types/src/TextArea/TextArea.d.ts +3 -3
- 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/Typography/docs/examples/Variants.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,258 +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 = 199);
|
|
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
|
-
/***/ 129:
|
|
139
|
-
/***/ (function(module, exports) {
|
|
140
|
-
|
|
141
|
-
module.exports = require("@splunk/react-ui/Calendar");
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 199:
|
|
146
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
147
|
-
|
|
148
|
-
"use strict";
|
|
48
|
+
var __webpack_exports__ = {};
|
|
149
49
|
// ESM COMPAT FLAG
|
|
150
50
|
__webpack_require__.r(__webpack_exports__);
|
|
151
51
|
|
|
152
52
|
// EXPORTS
|
|
153
|
-
__webpack_require__.d(__webpack_exports__,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var external_react_ = __webpack_require__(2);
|
|
158
|
-
var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
|
|
159
|
-
|
|
160
|
-
// EXTERNAL MODULE: external "prop-types"
|
|
161
|
-
var external_prop_types_ = __webpack_require__(1);
|
|
162
|
-
var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_);
|
|
163
|
-
|
|
164
|
-
// EXTERNAL MODULE: external "lodash/has"
|
|
165
|
-
var has_ = __webpack_require__(11);
|
|
166
|
-
var has_default = /*#__PURE__*/__webpack_require__.n(has_);
|
|
167
|
-
|
|
168
|
-
// EXTERNAL MODULE: external "lodash/omit"
|
|
169
|
-
var omit_ = __webpack_require__(5);
|
|
170
|
-
var omit_default = /*#__PURE__*/__webpack_require__.n(omit_);
|
|
171
|
-
|
|
172
|
-
// EXTERNAL MODULE: external "moment"
|
|
173
|
-
var external_moment_ = __webpack_require__(20);
|
|
174
|
-
var external_moment_default = /*#__PURE__*/__webpack_require__.n(external_moment_);
|
|
175
|
-
|
|
176
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/id"
|
|
177
|
-
var id_ = __webpack_require__(8);
|
|
178
|
-
|
|
179
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
180
|
-
var keyboard_ = __webpack_require__(7);
|
|
181
|
-
|
|
182
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Calendar"
|
|
183
|
-
var Calendar_ = __webpack_require__(129);
|
|
184
|
-
var Calendar_default = /*#__PURE__*/__webpack_require__.n(Calendar_);
|
|
185
|
-
|
|
186
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Popover"
|
|
187
|
-
var Popover_ = __webpack_require__(21);
|
|
188
|
-
var Popover_default = /*#__PURE__*/__webpack_require__.n(Popover_);
|
|
189
|
-
|
|
190
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
191
|
-
var themes_ = __webpack_require__(0);
|
|
192
|
-
|
|
193
|
-
// EXTERNAL MODULE: external "styled-components"
|
|
194
|
-
var external_styled_components_ = __webpack_require__(3);
|
|
195
|
-
var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
|
|
196
|
-
|
|
197
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/Text"
|
|
198
|
-
var Text_ = __webpack_require__(30);
|
|
199
|
-
var Text_default = /*#__PURE__*/__webpack_require__.n(Text_);
|
|
200
|
-
|
|
201
|
-
// CONCATENATED MODULE: ./src/Date/DateStyles.ts
|
|
202
|
-
|
|
203
|
-
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
DateWithoutTheme: () => (/* reexport */ _Date),
|
|
55
|
+
"default": () => (/* reexport */ Date_Date)
|
|
56
|
+
});
|
|
204
57
|
|
|
205
|
-
|
|
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({
|
|
206
96
|
displayName: "DateStyles__StyledText",
|
|
207
97
|
componentId: "kacgdc-0"
|
|
208
|
-
})(["cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}"],
|
|
98
|
+
})(["cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}"], (0,themes_namespaceObject.pickVariant)('$disabled', {
|
|
209
99
|
"false": 'text',
|
|
210
100
|
"true": 'not-allowed'
|
|
211
|
-
}),
|
|
101
|
+
}), (0,themes_namespaceObject.pick)({
|
|
212
102
|
enterprise: '105px',
|
|
213
103
|
prisma: '150px'
|
|
214
|
-
}),
|
|
104
|
+
}), (0,themes_namespaceObject.pick)({
|
|
215
105
|
enterprise: {
|
|
216
106
|
comfortable: '105px',
|
|
217
107
|
compact: '80px'
|
|
218
108
|
},
|
|
219
109
|
prisma: '150px'
|
|
220
110
|
}));
|
|
221
|
-
var IconContainer = external_styled_components_default.
|
|
111
|
+
var IconContainer = external_styled_components_default().div.withConfig({
|
|
222
112
|
displayName: "DateStyles__IconContainer",
|
|
223
113
|
componentId: "kacgdc-1"
|
|
224
|
-
})(["align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;"],
|
|
225
|
-
"false":
|
|
226
|
-
"true":
|
|
227
|
-
}),
|
|
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)({
|
|
228
118
|
comfortable: '0 8px',
|
|
229
119
|
compact: '0 6px'
|
|
230
120
|
}));
|
|
231
121
|
|
|
232
|
-
|
|
122
|
+
;// CONCATENATED MODULE: ./src/Date/Icon.tsx
|
|
233
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); }
|
|
234
124
|
|
|
235
125
|
|
|
236
126
|
|
|
237
127
|
function CalendarIcon(props) {
|
|
238
|
-
var _useSplunkTheme =
|
|
128
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
239
129
|
density = _useSplunkTheme.density;
|
|
240
130
|
|
|
241
131
|
var size = density === 'compact' ? '20px' : '24px';
|
|
242
|
-
return /*#__PURE__*/external_react_default.
|
|
132
|
+
return /*#__PURE__*/external_react_default().createElement("svg", _extends({
|
|
243
133
|
viewBox: "0 0 24 24",
|
|
244
134
|
width: size,
|
|
245
135
|
height: size
|
|
246
|
-
}, props), /*#__PURE__*/external_react_default.
|
|
136
|
+
}, props), /*#__PURE__*/external_react_default().createElement("path", {
|
|
247
137
|
fill: "currentColor",
|
|
248
138
|
fillRule: "evenodd",
|
|
249
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"
|
|
250
140
|
}));
|
|
251
141
|
}
|
|
252
|
-
|
|
253
|
-
|
|
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
|
+
}
|
|
254
160
|
|
|
255
|
-
|
|
161
|
+
|
|
162
|
+
;// CONCATENATED MODULE: ./src/Date/Date.tsx
|
|
256
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); }
|
|
257
164
|
|
|
258
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); }
|
|
@@ -293,27 +200,27 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
293
200
|
|
|
294
201
|
|
|
295
202
|
var propTypes = {
|
|
296
|
-
defaultValue: external_prop_types_default.
|
|
297
|
-
describedBy: external_prop_types_default.
|
|
298
|
-
disabled: external_prop_types_default.
|
|
299
|
-
elementRef: external_prop_types_default.
|
|
300
|
-
error: external_prop_types_default.
|
|
301
|
-
highlightToday: external_prop_types_default.
|
|
302
|
-
inline: external_prop_types_default.
|
|
303
|
-
inputId: external_prop_types_default.
|
|
304
|
-
inputOnly: external_prop_types_default.
|
|
305
|
-
labelledBy: external_prop_types_default.
|
|
306
|
-
locale: external_prop_types_default.
|
|
307
|
-
name: external_prop_types_default.
|
|
308
|
-
onBlur: external_prop_types_default.
|
|
309
|
-
onChange: external_prop_types_default.
|
|
310
|
-
onClick: external_prop_types_default.
|
|
311
|
-
onFocus: external_prop_types_default.
|
|
312
|
-
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,
|
|
313
220
|
|
|
314
221
|
/** @private */
|
|
315
|
-
splunkTheme: external_prop_types_default.
|
|
316
|
-
value: external_prop_types_default.
|
|
222
|
+
splunkTheme: (external_prop_types_default()).object,
|
|
223
|
+
value: (external_prop_types_default()).string
|
|
317
224
|
};
|
|
318
225
|
var defaultProps = {
|
|
319
226
|
disabled: false,
|
|
@@ -446,7 +353,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
446
353
|
_defineProperty(_assertThisInitialized(_this), "handleKeyDown", function (e) {
|
|
447
354
|
var _this$props$onKeyDown, _this$props4;
|
|
448
355
|
|
|
449
|
-
var eventKeyCode =
|
|
356
|
+
var eventKeyCode = (0,keyboard_namespaceObject.keycode)(e.nativeEvent);
|
|
450
357
|
|
|
451
358
|
if (eventKeyCode === 'enter' || eventKeyCode === 'tab') {
|
|
452
359
|
_this.applyTextChange(e);
|
|
@@ -479,7 +386,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
479
386
|
anchor: el
|
|
480
387
|
});
|
|
481
388
|
|
|
482
|
-
|
|
389
|
+
updateReactRef(_this.props.elementRef, el);
|
|
483
390
|
});
|
|
484
391
|
|
|
485
392
|
_defineProperty(_assertThisInitialized(_this), "handleInputMount", function (el) {
|
|
@@ -515,7 +422,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
515
422
|
input: null,
|
|
516
423
|
value: _this.isControlled() ? undefined : dateString
|
|
517
424
|
};
|
|
518
|
-
_this.popoverId =
|
|
425
|
+
_this.popoverId = (0,id_namespaceObject.createDOMID)('calendar');
|
|
519
426
|
|
|
520
427
|
if (false) {}
|
|
521
428
|
|
|
@@ -582,10 +489,10 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
582
489
|
splunkTheme = _this$props5.splunkTheme;
|
|
583
490
|
var isPrisma = splunkTheme.isPrisma;
|
|
584
491
|
var currentValue = this.getValue();
|
|
585
|
-
var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default.
|
|
492
|
+
var startAdornment = isPrisma && !inputOnly && /*#__PURE__*/external_react_default().createElement(IconContainer, {
|
|
586
493
|
"aria-hidden": true,
|
|
587
494
|
$disabled: disabled
|
|
588
|
-
}, /*#__PURE__*/external_react_default.
|
|
495
|
+
}, /*#__PURE__*/external_react_default().createElement(CalendarIcon, null));
|
|
589
496
|
var children;
|
|
590
497
|
var ariaProps = {};
|
|
591
498
|
|
|
@@ -594,12 +501,12 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
594
501
|
ariaProps['aria-controls'] = this.state.calendarOpen ? this.popoverId : undefined;
|
|
595
502
|
ariaProps['aria-expanded'] = disabled ? false : this.state.calendarOpen;
|
|
596
503
|
ariaProps['aria-haspopup'] = true;
|
|
597
|
-
children = /*#__PURE__*/external_react_default.
|
|
504
|
+
children = /*#__PURE__*/external_react_default().createElement((Popover_default()), {
|
|
598
505
|
anchor: this.state.anchor,
|
|
599
506
|
id: this.popoverId,
|
|
600
507
|
open: disabled ? false : this.state.calendarOpen,
|
|
601
508
|
onRequestClose: this.handleRequestClose
|
|
602
|
-
}, /*#__PURE__*/external_react_default.
|
|
509
|
+
}, /*#__PURE__*/external_react_default().createElement((Calendar_default()), {
|
|
603
510
|
ref: this.handleCalendarMount,
|
|
604
511
|
highlightToday: highlightToday,
|
|
605
512
|
locale: locale,
|
|
@@ -608,7 +515,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
608
515
|
}));
|
|
609
516
|
}
|
|
610
517
|
|
|
611
|
-
return /*#__PURE__*/external_react_default.
|
|
518
|
+
return /*#__PURE__*/external_react_default().createElement(StyledText, Date_extends({
|
|
612
519
|
autoCapitalize: "off",
|
|
613
520
|
autoComplete: "off",
|
|
614
521
|
autoCorrect: "off",
|
|
@@ -630,7 +537,7 @@ var _Date = /*#__PURE__*/function (_Component) {
|
|
|
630
537
|
}]);
|
|
631
538
|
|
|
632
539
|
return Date;
|
|
633
|
-
}(
|
|
540
|
+
}(external_react_namespaceObject.Component);
|
|
634
541
|
|
|
635
542
|
_defineProperty(_Date, "propTypes", propTypes);
|
|
636
543
|
|
|
@@ -645,72 +552,15 @@ _defineProperty(_Date, "validateValue", function (value) {
|
|
|
645
552
|
}
|
|
646
553
|
});
|
|
647
554
|
|
|
648
|
-
var DateWithThemeBase =
|
|
555
|
+
var DateWithThemeBase = (0,themes_namespaceObject.withSplunkTheme)(_Date);
|
|
649
556
|
var DateWithTheme = DateWithThemeBase;
|
|
650
557
|
DateWithTheme.propTypes = _Date.propTypes;
|
|
651
558
|
DateWithTheme.momentFormat = _Date.momentFormat;
|
|
652
|
-
/* harmony default export */
|
|
653
|
-
|
|
654
|
-
// CONCATENATED MODULE: ./src/Date/index.ts
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
/***/ }),
|
|
659
|
-
|
|
660
|
-
/***/ 2:
|
|
661
|
-
/***/ (function(module, exports) {
|
|
662
|
-
|
|
663
|
-
module.exports = require("react");
|
|
664
|
-
|
|
665
|
-
/***/ }),
|
|
666
|
-
|
|
667
|
-
/***/ 20:
|
|
668
|
-
/***/ (function(module, exports) {
|
|
669
|
-
|
|
670
|
-
module.exports = require("moment");
|
|
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
|
-
/***/ 30:
|
|
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
|
+
;
|