@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/Calendar.js
CHANGED
|
@@ -1,275 +1,166 @@
|
|
|
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 = 176);
|
|
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
|
-
/***/ 14:
|
|
132
|
-
/***/ (function(module, exports) {
|
|
133
|
-
|
|
134
|
-
module.exports = require("@splunk/react-ui/ScreenReaderContent");
|
|
135
|
-
|
|
136
|
-
/***/ }),
|
|
137
|
-
|
|
138
|
-
/***/ 17:
|
|
139
|
-
/***/ (function(module, exports) {
|
|
140
|
-
|
|
141
|
-
module.exports = require("@splunk/react-ui/Button");
|
|
142
|
-
|
|
143
|
-
/***/ }),
|
|
144
|
-
|
|
145
|
-
/***/ 176:
|
|
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/keys"
|
|
165
|
-
var keys_ = __webpack_require__(9);
|
|
166
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_);
|
|
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 "lodash/times"
|
|
180
|
-
var times_ = __webpack_require__(81);
|
|
181
|
-
var times_default = /*#__PURE__*/__webpack_require__.n(times_);
|
|
182
|
-
|
|
183
|
-
// EXTERNAL MODULE: external "@splunk/themes"
|
|
184
|
-
var themes_ = __webpack_require__(0);
|
|
185
|
-
|
|
186
|
-
// EXTERNAL MODULE: external "@splunk/ui-utils/keyboard"
|
|
187
|
-
var keyboard_ = __webpack_require__(7);
|
|
188
|
-
|
|
189
|
-
// EXTERNAL MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
190
|
-
var ScreenReaderContent_ = __webpack_require__(14);
|
|
191
|
-
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_);
|
|
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_);
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
calendarActiveSelector: () => (/* reexport */ calendarActiveSelector),
|
|
55
|
+
"default": () => (/* reexport */ Calendar_Calendar)
|
|
56
|
+
});
|
|
196
57
|
|
|
197
|
-
|
|
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/keys"
|
|
65
|
+
const keys_namespaceObject = require("lodash/keys");
|
|
66
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(keys_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 "lodash/times"
|
|
76
|
+
const times_namespaceObject = require("lodash/times");
|
|
77
|
+
var times_default = /*#__PURE__*/__webpack_require__.n(times_namespaceObject);
|
|
78
|
+
;// CONCATENATED MODULE: external "@splunk/themes"
|
|
79
|
+
const themes_namespaceObject = require("@splunk/themes");
|
|
80
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
81
|
+
const keyboard_namespaceObject = require("@splunk/ui-utils/keyboard");
|
|
82
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
|
|
83
|
+
const ScreenReaderContent_namespaceObject = require("@splunk/react-ui/ScreenReaderContent");
|
|
84
|
+
var ScreenReaderContent_default = /*#__PURE__*/__webpack_require__.n(ScreenReaderContent_namespaceObject);
|
|
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: ./src/Calendar/DayStyles.ts
|
|
198
89
|
|
|
199
90
|
|
|
200
91
|
/* Element used to prevent vertical shift on firefox when the font-weight is increased with $selected */
|
|
201
92
|
|
|
202
|
-
var StyledValue = external_styled_components_default.
|
|
93
|
+
var StyledValue = external_styled_components_default().div.withConfig({
|
|
203
94
|
displayName: "DayStyles__StyledValue",
|
|
204
95
|
componentId: "sc-1nryhyt-0"
|
|
205
|
-
})(["left:0;line-height:", ";position:absolute;top:0;width:100%;"],
|
|
96
|
+
})(["left:0;line-height:", ";position:absolute;top:0;width:100%;"], (0,themes_namespaceObject.pick)({
|
|
206
97
|
enterprise: '2em',
|
|
207
98
|
prisma: '36px '
|
|
208
99
|
}));
|
|
209
|
-
var StyledInner = external_styled_components_default.
|
|
100
|
+
var StyledInner = external_styled_components_default().div.withConfig({
|
|
210
101
|
displayName: "DayStyles__StyledInner",
|
|
211
102
|
componentId: "sc-1nryhyt-1"
|
|
212
|
-
})(["border:", ";border-radius:", ";color:", ";height:", ";position:relative;text-align:center;width:", ";"],
|
|
103
|
+
})(["border:", ";border-radius:", ";color:", ";height:", ";position:relative;text-align:center;width:", ";"], (0,themes_namespaceObject.pick)({
|
|
213
104
|
enterprise: '1px solid transparent',
|
|
214
105
|
prisma: 'none'
|
|
215
|
-
}),
|
|
216
|
-
enterprise:
|
|
106
|
+
}), (0,themes_namespaceObject.pick)({
|
|
107
|
+
enterprise: themes_namespaceObject.variables.borderRadius,
|
|
217
108
|
prisma: '50%'
|
|
218
|
-
}),
|
|
109
|
+
}), (0,themes_namespaceObject.pick)({
|
|
219
110
|
enterprise: {
|
|
220
|
-
light:
|
|
221
|
-
dark:
|
|
111
|
+
light: themes_namespaceObject.variables.gray45,
|
|
112
|
+
dark: themes_namespaceObject.variables.gray98
|
|
222
113
|
},
|
|
223
|
-
prisma:
|
|
224
|
-
}),
|
|
114
|
+
prisma: themes_namespaceObject.variables.contentColorActive
|
|
115
|
+
}), (0,themes_namespaceObject.pick)({
|
|
225
116
|
enterprise: '2em',
|
|
226
117
|
prisma: '36px '
|
|
227
|
-
}),
|
|
118
|
+
}), (0,themes_namespaceObject.pick)({
|
|
228
119
|
enterprise: 'calc(2em - 2px)',
|
|
229
120
|
prisma: '36px'
|
|
230
121
|
}));
|
|
231
|
-
var StyledCell = external_styled_components_default.
|
|
122
|
+
var StyledCell = external_styled_components_default().td.withConfig({
|
|
232
123
|
displayName: "DayStyles__StyledCell",
|
|
233
124
|
componentId: "sc-1nryhyt-2"
|
|
234
|
-
})(["", ";cursor:pointer;", ";", ";"],
|
|
125
|
+
})(["", ";cursor:pointer;", ";", ";"], themes_namespaceObject.mixins.reset('table-cell'), (0,themes_namespaceObject.pickVariant)('$today', {
|
|
235
126
|
"true": {
|
|
236
|
-
enterprise:
|
|
127
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["& > ", "{background-color:", ";}&:focus{& > ", "{box-shadow:", ";}}"],
|
|
237
128
|
/* sc-sel */
|
|
238
|
-
StyledInner,
|
|
239
|
-
light:
|
|
240
|
-
dark:
|
|
129
|
+
StyledInner, (0,themes_namespaceObject.pick)({
|
|
130
|
+
light: themes_namespaceObject.variables.gray92,
|
|
131
|
+
dark: themes_namespaceObject.variables.gray45
|
|
241
132
|
}),
|
|
242
133
|
/* sc-sel */
|
|
243
|
-
StyledInner,
|
|
244
|
-
prisma:
|
|
134
|
+
StyledInner, themes_namespaceObject.variables.focusShadow),
|
|
135
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["& > ", "{box-shadow:inset 0 0 0 1px ", ";}&:focus{& > ", "{box-shadow:inset 0 0 0 1px ", ",", ";}}"],
|
|
245
136
|
/* sc-sel */
|
|
246
|
-
StyledInner,
|
|
137
|
+
StyledInner, themes_namespaceObject.variables.interactiveColorBorder,
|
|
247
138
|
/* sc-sel */
|
|
248
|
-
StyledInner,
|
|
139
|
+
StyledInner, themes_namespaceObject.variables.interactiveColorBorder, themes_namespaceObject.variables.focusShadow)
|
|
249
140
|
},
|
|
250
|
-
"false":
|
|
141
|
+
"false": (0,external_styled_components_namespaceObject.css)(["&:focus{& > ", "{box-shadow:", ";}}"],
|
|
251
142
|
/* sc-sel */
|
|
252
|
-
StyledInner,
|
|
253
|
-
}),
|
|
254
|
-
"true":
|
|
255
|
-
enterprise:
|
|
143
|
+
StyledInner, themes_namespaceObject.variables.focusShadow)
|
|
144
|
+
}), (0,themes_namespaceObject.pickVariant)('$selected', {
|
|
145
|
+
"true": (0,themes_namespaceObject.pick)({
|
|
146
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["& > ", "{border-color:", ";}"],
|
|
256
147
|
/* sc-sel */
|
|
257
|
-
StyledInner,
|
|
258
|
-
prisma:
|
|
148
|
+
StyledInner, themes_namespaceObject.variables.linkColor),
|
|
149
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["& > ", "{background-color:", ";font-weight:", ";}"],
|
|
259
150
|
/* sc-sel */
|
|
260
|
-
StyledInner,
|
|
151
|
+
StyledInner, themes_namespaceObject.variables.interactiveColorOverlaySelected, themes_namespaceObject.variables.fontWeightBold)
|
|
261
152
|
}),
|
|
262
|
-
"false":
|
|
263
|
-
enterprise:
|
|
153
|
+
"false": (0,themes_namespaceObject.pick)({
|
|
154
|
+
enterprise: (0,external_styled_components_namespaceObject.css)(["&:hover{& > ", "{background-color:", ";color:", ";}}"],
|
|
264
155
|
/* sc-sel */
|
|
265
|
-
StyledInner,
|
|
266
|
-
prisma:
|
|
156
|
+
StyledInner, themes_namespaceObject.variables.backgroundColorHover, themes_namespaceObject.variables.linkColor),
|
|
157
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["&:hover{& > ", "{background-color:", ";}}"],
|
|
267
158
|
/* sc-sel */
|
|
268
|
-
StyledInner,
|
|
159
|
+
StyledInner, themes_namespaceObject.variables.interactiveColorOverlayHover)
|
|
269
160
|
})
|
|
270
161
|
}));
|
|
271
162
|
|
|
272
|
-
|
|
163
|
+
;// CONCATENATED MODULE: ./src/Calendar/Day.tsx
|
|
273
164
|
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); }
|
|
274
165
|
|
|
275
166
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -281,13 +172,13 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
281
172
|
|
|
282
173
|
|
|
283
174
|
var propTypes = {
|
|
284
|
-
active: external_prop_types_default.
|
|
285
|
-
locale: external_prop_types_default.
|
|
286
|
-
onClick: external_prop_types_default.
|
|
287
|
-
onKeydown: external_prop_types_default.
|
|
288
|
-
selected: external_prop_types_default.
|
|
289
|
-
today: external_prop_types_default.
|
|
290
|
-
value: external_prop_types_default.
|
|
175
|
+
active: (external_prop_types_default()).bool,
|
|
176
|
+
locale: (external_prop_types_default()).string,
|
|
177
|
+
onClick: (external_prop_types_default()).func,
|
|
178
|
+
onKeydown: (external_prop_types_default()).func,
|
|
179
|
+
selected: (external_prop_types_default()).bool,
|
|
180
|
+
today: (external_prop_types_default()).bool,
|
|
181
|
+
value: (external_prop_types_default()).string
|
|
291
182
|
};
|
|
292
183
|
|
|
293
184
|
function Day(_ref) {
|
|
@@ -304,20 +195,20 @@ function Day(_ref) {
|
|
|
304
195
|
value = _ref.value,
|
|
305
196
|
otherProps = _objectWithoutProperties(_ref, ["active", "locale", "onClick", "onKeyDown", "selected", "today", "value"]);
|
|
306
197
|
|
|
307
|
-
var handleClick =
|
|
198
|
+
var handleClick = (0,external_react_namespaceObject.useCallback)(function (e) {
|
|
308
199
|
e.preventDefault();
|
|
309
200
|
onClick === null || onClick === void 0 ? void 0 : onClick(e, {
|
|
310
201
|
value: value
|
|
311
202
|
});
|
|
312
203
|
}, [onClick, value]);
|
|
313
|
-
var handleKeyDown =
|
|
204
|
+
var handleKeyDown = (0,external_react_namespaceObject.useCallback)(function (e) {
|
|
314
205
|
e.preventDefault();
|
|
315
206
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e, {
|
|
316
207
|
value: value
|
|
317
208
|
});
|
|
318
209
|
}, [onKeyDown, value]);
|
|
319
210
|
var day = value && external_moment_default()(value, 'YYYY-MM-DD', locale).format('D');
|
|
320
|
-
return /*#__PURE__*/external_react_default.
|
|
211
|
+
return /*#__PURE__*/external_react_default().createElement(StyledCell, _extends({
|
|
321
212
|
tabIndex: active ? 0 : -1,
|
|
322
213
|
"aria-selected": selected,
|
|
323
214
|
"data-test-day": day,
|
|
@@ -328,39 +219,39 @@ function Day(_ref) {
|
|
|
328
219
|
onKeyDown: handleKeyDown,
|
|
329
220
|
$today: today,
|
|
330
221
|
$selected: selected
|
|
331
|
-
}, otherProps), /*#__PURE__*/external_react_default.
|
|
222
|
+
}, otherProps), /*#__PURE__*/external_react_default().createElement(StyledInner, null, /*#__PURE__*/external_react_default().createElement(StyledValue, null, day)));
|
|
332
223
|
}
|
|
333
224
|
|
|
334
225
|
Day.propTypes = propTypes;
|
|
335
|
-
/* harmony default export */
|
|
336
|
-
|
|
226
|
+
/* harmony default export */ const Calendar_Day = (Day);
|
|
227
|
+
;// CONCATENATED MODULE: ./src/Calendar/DateTableStyles.ts
|
|
337
228
|
|
|
338
229
|
|
|
339
|
-
var Styled = external_styled_components_default.
|
|
230
|
+
var Styled = external_styled_components_default().table.withConfig({
|
|
340
231
|
displayName: "DateTableStyles__Styled",
|
|
341
232
|
componentId: "sc-1lbrjq0-0"
|
|
342
|
-
})(["", ";table-layout:fixed;border-spacing:", ";width:", ";margin:", ";"],
|
|
233
|
+
})(["", ";table-layout:fixed;border-spacing:", ";width:", ";margin:", ";"], themes_namespaceObject.mixins.reset('table'), (0,themes_namespaceObject.pick)({
|
|
343
234
|
enterprise: '3px',
|
|
344
|
-
prisma:
|
|
345
|
-
}),
|
|
235
|
+
prisma: themes_namespaceObject.variables.spacingSmall
|
|
236
|
+
}), (0,themes_namespaceObject.pick)({
|
|
346
237
|
enterprise: '100%',
|
|
347
238
|
prisma: 'calc(100% + 16px)'
|
|
348
|
-
}),
|
|
239
|
+
}), (0,themes_namespaceObject.pick)({
|
|
349
240
|
enterprise: '0',
|
|
350
241
|
prisma: '-8px'
|
|
351
242
|
}));
|
|
352
|
-
var StyledTableHeader = external_styled_components_default.
|
|
243
|
+
var StyledTableHeader = external_styled_components_default().th.withConfig({
|
|
353
244
|
displayName: "DateTableStyles__StyledTableHeader",
|
|
354
245
|
componentId: "sc-1lbrjq0-1"
|
|
355
|
-
})(["", ";text-align:center;padding-bottom:", ";color:", ";font-size:", ";"],
|
|
246
|
+
})(["", ";text-align:center;padding-bottom:", ";color:", ";font-size:", ";"], themes_namespaceObject.mixins.reset('table-cell'), (0,themes_namespaceObject.pick)({
|
|
356
247
|
enterprise: '2px',
|
|
357
|
-
prisma:
|
|
358
|
-
}),
|
|
359
|
-
enterprise:
|
|
360
|
-
prisma:
|
|
248
|
+
prisma: themes_namespaceObject.variables.spacingXSmall
|
|
249
|
+
}), themes_namespaceObject.variables.contentColorMuted, (0,themes_namespaceObject.pick)({
|
|
250
|
+
enterprise: themes_namespaceObject.variables.fontSizeSmall,
|
|
251
|
+
prisma: themes_namespaceObject.variables.fontSize
|
|
361
252
|
}));
|
|
362
253
|
|
|
363
|
-
|
|
254
|
+
;// CONCATENATED MODULE: ./src/Calendar/DateTable.tsx
|
|
364
255
|
function DateTable_extends() { DateTable_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 DateTable_extends.apply(this, arguments); }
|
|
365
256
|
|
|
366
257
|
function DateTable_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = DateTable_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -377,19 +268,19 @@ function DateTable_objectWithoutPropertiesLoose(source, excluded) { if (source =
|
|
|
377
268
|
|
|
378
269
|
|
|
379
270
|
var DateTable_propTypes = {
|
|
380
|
-
displayValue: external_prop_types_default.
|
|
381
|
-
highlightToday: external_prop_types_default.
|
|
382
|
-
labelledBy: external_prop_types_default.
|
|
383
|
-
locale: external_prop_types_default.
|
|
384
|
-
onChange: external_prop_types_default.
|
|
385
|
-
onInternalChange: external_prop_types_default.
|
|
386
|
-
selectedValue: external_prop_types_default.
|
|
387
|
-
todayValue: external_prop_types_default.
|
|
271
|
+
displayValue: (external_prop_types_default()).string.isRequired,
|
|
272
|
+
highlightToday: (external_prop_types_default()).bool,
|
|
273
|
+
labelledBy: (external_prop_types_default()).string,
|
|
274
|
+
locale: (external_prop_types_default()).string,
|
|
275
|
+
onChange: (external_prop_types_default()).func,
|
|
276
|
+
onInternalChange: (external_prop_types_default()).func,
|
|
277
|
+
selectedValue: (external_prop_types_default()).string.isRequired,
|
|
278
|
+
todayValue: (external_prop_types_default()).string
|
|
388
279
|
};
|
|
389
280
|
|
|
390
281
|
function renderPaddingCells(count) {
|
|
391
282
|
return times_default()(count, function (i) {
|
|
392
|
-
return /*#__PURE__*/external_react_default.
|
|
283
|
+
return /*#__PURE__*/external_react_default().createElement("td", {
|
|
393
284
|
key: "".concat(i)
|
|
394
285
|
});
|
|
395
286
|
});
|
|
@@ -414,7 +305,7 @@ function renderDays(_ref) {
|
|
|
414
305
|
var isToday = cursorString === todayValue;
|
|
415
306
|
var isSelected = cursorString === selectedValue;
|
|
416
307
|
var isActive = cursorString === displayValue;
|
|
417
|
-
days.push( /*#__PURE__*/external_react_default.
|
|
308
|
+
days.push( /*#__PURE__*/external_react_default().createElement(Calendar_Day, {
|
|
418
309
|
key: cursorString,
|
|
419
310
|
locale: locale,
|
|
420
311
|
onClick: onChange,
|
|
@@ -441,7 +332,7 @@ function renderRows(cells) {
|
|
|
441
332
|
return (
|
|
442
333
|
/*#__PURE__*/
|
|
443
334
|
// eslint-disable-next-line react/no-array-index-key
|
|
444
|
-
external_react_default.
|
|
335
|
+
external_react_default().createElement("tr", {
|
|
445
336
|
key: "$week-".concat(i)
|
|
446
337
|
}, row)
|
|
447
338
|
);
|
|
@@ -449,12 +340,12 @@ function renderRows(cells) {
|
|
|
449
340
|
}
|
|
450
341
|
|
|
451
342
|
function renderHeader(locale, dayFormat) {
|
|
452
|
-
return /*#__PURE__*/external_react_default.
|
|
343
|
+
return /*#__PURE__*/external_react_default().createElement("thead", null, /*#__PURE__*/external_react_default().createElement("tr", null, times_default()(7, function (i) {
|
|
453
344
|
var text = external_moment_default()().locale(locale).weekday(i).format(dayFormat);
|
|
454
345
|
var label = external_moment_default()().locale(locale).weekday(i).format('dddd');
|
|
455
|
-
return /*#__PURE__*/external_react_default.
|
|
346
|
+
return /*#__PURE__*/external_react_default().createElement(StyledTableHeader, {
|
|
456
347
|
key: text
|
|
457
|
-
}, /*#__PURE__*/external_react_default.
|
|
348
|
+
}, /*#__PURE__*/external_react_default().createElement((ScreenReaderContent_default()), null, label), /*#__PURE__*/external_react_default().createElement("span", {
|
|
458
349
|
"aria-hidden": true
|
|
459
350
|
}, text));
|
|
460
351
|
})));
|
|
@@ -473,7 +364,7 @@ function DateTable(_ref2) {
|
|
|
473
364
|
todayValue = _ref2.todayValue,
|
|
474
365
|
otherProps = DateTable_objectWithoutProperties(_ref2, ["displayValue", "highlightToday", "labelledBy", "locale", "onChange", "onInternalChange", "selectedValue", "todayValue"]);
|
|
475
366
|
|
|
476
|
-
var _useSplunkTheme =
|
|
367
|
+
var _useSplunkTheme = (0,themes_namespaceObject.useSplunkTheme)(),
|
|
477
368
|
family = _useSplunkTheme.family;
|
|
478
369
|
|
|
479
370
|
var dayFormat = family === 'prisma' ? 'dd' : 'ddd';
|
|
@@ -568,7 +459,7 @@ function DateTable(_ref2) {
|
|
|
568
459
|
};
|
|
569
460
|
|
|
570
461
|
var handleKeyDown = function handleKeyDown(event, data) {
|
|
571
|
-
var eventKeyCode =
|
|
462
|
+
var eventKeyCode = (0,keyboard_namespaceObject.keycode)(event.nativeEvent);
|
|
572
463
|
|
|
573
464
|
switch (eventKeyCode) {
|
|
574
465
|
case 'enter':
|
|
@@ -635,55 +526,49 @@ function DateTable(_ref2) {
|
|
|
635
526
|
startDate: startDate,
|
|
636
527
|
todayValue: todayValue
|
|
637
528
|
})).concat(renderPaddingCells(6 - endDate.format('e')));
|
|
638
|
-
return /*#__PURE__*/external_react_default.
|
|
529
|
+
return /*#__PURE__*/external_react_default().createElement(Styled, DateTable_extends({
|
|
639
530
|
role: "grid",
|
|
640
531
|
"aria-labelledby": labelledBy
|
|
641
|
-
}, otherProps), renderHeader(locale, dayFormat), /*#__PURE__*/external_react_default.
|
|
532
|
+
}, otherProps), renderHeader(locale, dayFormat), /*#__PURE__*/external_react_default().createElement("tbody", null, renderRows(cells)));
|
|
642
533
|
}
|
|
643
534
|
|
|
644
535
|
DateTable.propTypes = DateTable_propTypes;
|
|
645
|
-
/* harmony default export */
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
var ChevronLeft_default = /*#__PURE__*/__webpack_require__.n(
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
var
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
var
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
var i18n_ = __webpack_require__(4);
|
|
668
|
-
|
|
669
|
-
// CONCATENATED MODULE: ./src/Calendar/MonthHeaderStyles.ts
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
var StyledBox = external_styled_components_default.a.div.withConfig({
|
|
536
|
+
/* harmony default export */ const Calendar_DateTable = (DateTable);
|
|
537
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/ChevronLeft"
|
|
538
|
+
const ChevronLeft_namespaceObject = require("@splunk/react-icons/ChevronLeft");
|
|
539
|
+
var ChevronLeft_default = /*#__PURE__*/__webpack_require__.n(ChevronLeft_namespaceObject);
|
|
540
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
|
|
541
|
+
const ChevronRight_namespaceObject = require("@splunk/react-icons/ChevronRight");
|
|
542
|
+
var ChevronRight_default = /*#__PURE__*/__webpack_require__.n(ChevronRight_namespaceObject);
|
|
543
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronLeft"
|
|
544
|
+
const enterprise_ChevronLeft_namespaceObject = require("@splunk/react-icons/enterprise/ChevronLeft");
|
|
545
|
+
var enterprise_ChevronLeft_default = /*#__PURE__*/__webpack_require__.n(enterprise_ChevronLeft_namespaceObject);
|
|
546
|
+
;// CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
|
|
547
|
+
const enterprise_ChevronRight_namespaceObject = require("@splunk/react-icons/enterprise/ChevronRight");
|
|
548
|
+
var enterprise_ChevronRight_default = /*#__PURE__*/__webpack_require__.n(enterprise_ChevronRight_namespaceObject);
|
|
549
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Button"
|
|
550
|
+
const Button_namespaceObject = require("@splunk/react-ui/Button");
|
|
551
|
+
var Button_default = /*#__PURE__*/__webpack_require__.n(Button_namespaceObject);
|
|
552
|
+
;// CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
|
|
553
|
+
const i18n_namespaceObject = require("@splunk/ui-utils/i18n");
|
|
554
|
+
;// CONCATENATED MODULE: ./src/Calendar/MonthHeaderStyles.ts
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
var StyledBox = external_styled_components_default().div.withConfig({
|
|
673
558
|
displayName: "MonthHeaderStyles__StyledBox",
|
|
674
559
|
componentId: "sc-18bmbh7-0"
|
|
675
|
-
})(["display:flex;position:relative;line-height:", ";padding:0 2px;margin-bottom:10px;"],
|
|
676
|
-
var StyledHeading = external_styled_components_default.
|
|
560
|
+
})(["display:flex;position:relative;line-height:", ";padding:0 2px;margin-bottom:10px;"], themes_namespaceObject.variables.inputHeight);
|
|
561
|
+
var StyledHeading = external_styled_components_default().span.withConfig({
|
|
677
562
|
displayName: "MonthHeaderStyles__StyledHeading",
|
|
678
563
|
componentId: "sc-18bmbh7-1"
|
|
679
|
-
})(["display:block;text-align:center;text-transform:", ";flex:1 0 1px;", ";"],
|
|
564
|
+
})(["display:block;text-align:center;text-transform:", ";flex:1 0 1px;", ";"], (0,themes_namespaceObject.pick)({
|
|
680
565
|
enterprise: 'capitalize',
|
|
681
566
|
prisma: 'uppercase'
|
|
682
|
-
}),
|
|
683
|
-
prisma:
|
|
567
|
+
}), (0,themes_namespaceObject.pick)({
|
|
568
|
+
prisma: (0,external_styled_components_namespaceObject.css)(["font-size:20px;font-weight:bold;color:", ";"], themes_namespaceObject.variables.contentColorActive)
|
|
684
569
|
}));
|
|
685
570
|
|
|
686
|
-
|
|
571
|
+
;// CONCATENATED MODULE: ./src/Calendar/MonthHeader.tsx
|
|
687
572
|
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); }
|
|
688
573
|
|
|
689
574
|
function MonthHeader_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = MonthHeader_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -725,19 +610,19 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
725
610
|
|
|
726
611
|
|
|
727
612
|
var MonthHeader_propTypes = {
|
|
728
|
-
headingId: external_prop_types_default.
|
|
729
|
-
locale: external_prop_types_default.
|
|
730
|
-
onChange: external_prop_types_default.
|
|
613
|
+
headingId: (external_prop_types_default()).string,
|
|
614
|
+
locale: (external_prop_types_default()).string,
|
|
615
|
+
onChange: (external_prop_types_default()).func,
|
|
731
616
|
|
|
732
617
|
/** @private */
|
|
733
|
-
splunkTheme: external_prop_types_default.
|
|
734
|
-
value: external_prop_types_default.
|
|
618
|
+
splunkTheme: (external_prop_types_default()).object,
|
|
619
|
+
value: (external_prop_types_default()).string.isRequired
|
|
735
620
|
};
|
|
736
621
|
var defaultProps = {
|
|
737
622
|
locale: 'en_US'
|
|
738
623
|
};
|
|
739
624
|
|
|
740
|
-
var
|
|
625
|
+
var MonthHeader = /*#__PURE__*/function (_Component) {
|
|
741
626
|
_inherits(MonthHeader, _Component);
|
|
742
627
|
|
|
743
628
|
var _super = _createSuper(MonthHeader);
|
|
@@ -793,19 +678,19 @@ var MonthHeader_MonthHeader = /*#__PURE__*/function (_Component) {
|
|
|
793
678
|
flex: '0 0 auto'
|
|
794
679
|
};
|
|
795
680
|
|
|
796
|
-
var previousScreenReaderText =
|
|
681
|
+
var previousScreenReaderText = (0,i18n_namespaceObject._)('Previous month');
|
|
797
682
|
|
|
798
|
-
var nextScreenReaderText =
|
|
683
|
+
var nextScreenReaderText = (0,i18n_namespaceObject._)('Next month');
|
|
799
684
|
|
|
800
|
-
return /*#__PURE__*/external_react_default.
|
|
685
|
+
return /*#__PURE__*/external_react_default().createElement(themes_namespaceObject.SplunkThemeProvider, {
|
|
801
686
|
density: isPrisma ? 'comfortable' : splunkTheme.density
|
|
802
|
-
}, /*#__PURE__*/external_react_default.
|
|
687
|
+
}, /*#__PURE__*/external_react_default().createElement(StyledBox, omit_default()(otherProps, 'onChange'), /*#__PURE__*/external_react_default().createElement((Button_default()), {
|
|
803
688
|
appearance: "pill",
|
|
804
|
-
icon: isEnterprise ? /*#__PURE__*/external_react_default.
|
|
689
|
+
icon: isEnterprise ? /*#__PURE__*/external_react_default().createElement((enterprise_ChevronLeft_default()), {
|
|
805
690
|
hideDefaultTooltip: true,
|
|
806
691
|
screenReaderText: previousScreenReaderText,
|
|
807
692
|
size: 1
|
|
808
|
-
}) : /*#__PURE__*/external_react_default.
|
|
693
|
+
}) : /*#__PURE__*/external_react_default().createElement((ChevronLeft_default()), {
|
|
809
694
|
"aria-label": previousScreenReaderText,
|
|
810
695
|
height: "24",
|
|
811
696
|
width: "24"
|
|
@@ -813,16 +698,16 @@ var MonthHeader_MonthHeader = /*#__PURE__*/function (_Component) {
|
|
|
813
698
|
"data-test": "previous-month",
|
|
814
699
|
onClick: this.handlePrevMonthClick,
|
|
815
700
|
style: buttonStyles
|
|
816
|
-
}), /*#__PURE__*/external_react_default.
|
|
701
|
+
}), /*#__PURE__*/external_react_default().createElement(StyledHeading, {
|
|
817
702
|
id: headingId,
|
|
818
703
|
"data-test": "header-label"
|
|
819
|
-
}, monthYear), /*#__PURE__*/external_react_default.
|
|
704
|
+
}, monthYear), /*#__PURE__*/external_react_default().createElement((Button_default()), {
|
|
820
705
|
appearance: "pill",
|
|
821
|
-
icon: isEnterprise ? /*#__PURE__*/external_react_default.
|
|
706
|
+
icon: isEnterprise ? /*#__PURE__*/external_react_default().createElement((enterprise_ChevronRight_default()), {
|
|
822
707
|
hideDefaultTooltip: true,
|
|
823
708
|
screenReaderText: nextScreenReaderText,
|
|
824
709
|
size: 1
|
|
825
|
-
}) : /*#__PURE__*/external_react_default.
|
|
710
|
+
}) : /*#__PURE__*/external_react_default().createElement((ChevronRight_default()), {
|
|
826
711
|
"aria-label": nextScreenReaderText,
|
|
827
712
|
height: "24",
|
|
828
713
|
width: "24"
|
|
@@ -846,13 +731,13 @@ var MonthHeader_MonthHeader = /*#__PURE__*/function (_Component) {
|
|
|
846
731
|
}]);
|
|
847
732
|
|
|
848
733
|
return MonthHeader;
|
|
849
|
-
}(
|
|
734
|
+
}(external_react_namespaceObject.Component);
|
|
850
735
|
|
|
851
|
-
_defineProperty(
|
|
736
|
+
_defineProperty(MonthHeader, "propTypes", MonthHeader_propTypes);
|
|
852
737
|
|
|
853
|
-
_defineProperty(
|
|
738
|
+
_defineProperty(MonthHeader, "defaultProps", defaultProps);
|
|
854
739
|
|
|
855
|
-
_defineProperty(
|
|
740
|
+
_defineProperty(MonthHeader, "monthYearFormats", {
|
|
856
741
|
"default": 'MMMM YYYY',
|
|
857
742
|
ja: 'YYYY年MMM',
|
|
858
743
|
ko: 'YYYY년 MMMM',
|
|
@@ -860,7 +745,7 @@ _defineProperty(MonthHeader_MonthHeader, "monthYearFormats", {
|
|
|
860
745
|
'zh-tw': 'YYYY年MMM'
|
|
861
746
|
});
|
|
862
747
|
|
|
863
|
-
_defineProperty(
|
|
748
|
+
_defineProperty(MonthHeader, "monthYearFormatsShortForm", {
|
|
864
749
|
"default": 'MMM YYYY',
|
|
865
750
|
ja: 'YYYY年 MMM',
|
|
866
751
|
ko: 'YYYY년 MMMM',
|
|
@@ -868,32 +753,48 @@ _defineProperty(MonthHeader_MonthHeader, "monthYearFormatsShortForm", {
|
|
|
868
753
|
'zh-tw': 'YYYY年 MMM'
|
|
869
754
|
});
|
|
870
755
|
|
|
871
|
-
var MonthHeaderWithTheme =
|
|
872
|
-
MonthHeaderWithTheme.propTypes =
|
|
873
|
-
/* harmony default export */
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
var Box_default = /*#__PURE__*/__webpack_require__.n(
|
|
877
|
-
|
|
878
|
-
// CONCATENATED MODULE: ./src/Calendar/CalendarStyles.ts
|
|
756
|
+
var MonthHeaderWithTheme = (0,themes_namespaceObject.withSplunkTheme)(MonthHeader);
|
|
757
|
+
MonthHeaderWithTheme.propTypes = MonthHeader.propTypes;
|
|
758
|
+
/* harmony default export */ const Calendar_MonthHeader = (MonthHeaderWithTheme);
|
|
759
|
+
;// CONCATENATED MODULE: external "@splunk/react-ui/Box"
|
|
760
|
+
const Box_namespaceObject = require("@splunk/react-ui/Box");
|
|
761
|
+
var Box_default = /*#__PURE__*/__webpack_require__.n(Box_namespaceObject);
|
|
762
|
+
;// CONCATENATED MODULE: ./src/Calendar/CalendarStyles.ts
|
|
879
763
|
|
|
880
764
|
|
|
881
765
|
|
|
882
|
-
var CalendarStyles_StyledBox = external_styled_components_default()(Box_default
|
|
766
|
+
var CalendarStyles_StyledBox = external_styled_components_default()((Box_default())).withConfig({
|
|
883
767
|
displayName: "CalendarStyles__StyledBox",
|
|
884
768
|
componentId: "sc-18925wt-0"
|
|
885
|
-
})(["width:", ";padding:", ";"],
|
|
769
|
+
})(["width:", ";padding:", ";"], (0,themes_namespaceObject.pick)({
|
|
886
770
|
enterprise: '220px',
|
|
887
771
|
prisma: '332px'
|
|
888
|
-
}),
|
|
772
|
+
}), (0,themes_namespaceObject.pick)({
|
|
889
773
|
enterprise: '8px',
|
|
890
|
-
prisma:
|
|
774
|
+
prisma: themes_namespaceObject.variables.spacingLarge
|
|
891
775
|
}));
|
|
892
776
|
|
|
893
|
-
|
|
894
|
-
|
|
777
|
+
;// CONCATENATED MODULE: ./src/utils/updateReactRef.ts
|
|
778
|
+
/**
|
|
779
|
+
* Updates a React ref. Callback refs and object refs (from `createRef` and `useRef`) are supported.
|
|
780
|
+
*
|
|
781
|
+
* @param ref - The React callback or object ref. Can be `null` or `undefined`.
|
|
782
|
+
* @param current - The new value of the ref.
|
|
783
|
+
*/
|
|
784
|
+
function updateReactRef(ref, current) {
|
|
785
|
+
if (ref) {
|
|
786
|
+
if (typeof ref === 'function') {
|
|
787
|
+
ref(current);
|
|
788
|
+
} else {
|
|
789
|
+
// the public signature of this util uses React.Ref<T> to mirror the way React types refs.
|
|
790
|
+
// the intention here is to signal "we will take care of setting 'current', not you".
|
|
791
|
+
ref.current = current; // eslint-disable-line no-param-reassign
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
895
796
|
|
|
896
|
-
|
|
797
|
+
;// CONCATENATED MODULE: ./src/Calendar/Calendar.tsx
|
|
897
798
|
function Calendar_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Calendar_typeof = function _typeof(obj) { return typeof obj; }; } else { Calendar_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Calendar_typeof(obj); }
|
|
898
799
|
|
|
899
800
|
function Calendar_extends() { Calendar_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 Calendar_extends.apply(this, arguments); }
|
|
@@ -932,23 +833,23 @@ function Calendar_defineProperty(obj, key, value) { if (key in obj) { Object.def
|
|
|
932
833
|
|
|
933
834
|
var calendarActiveSelector = '[data-active-day="true"]';
|
|
934
835
|
var Calendar_propTypes = {
|
|
935
|
-
describedBy: external_prop_types_default.
|
|
936
|
-
highlightToday: external_prop_types_default.
|
|
937
|
-
labelledBy: external_prop_types_default.
|
|
938
|
-
locale: external_prop_types_default.
|
|
939
|
-
onChange: external_prop_types_default.
|
|
836
|
+
describedBy: (external_prop_types_default()).string,
|
|
837
|
+
highlightToday: (external_prop_types_default()).bool,
|
|
838
|
+
labelledBy: (external_prop_types_default()).string,
|
|
839
|
+
locale: (external_prop_types_default()).string,
|
|
840
|
+
onChange: (external_prop_types_default()).func,
|
|
940
841
|
|
|
941
842
|
/** @private. */
|
|
942
|
-
required: external_prop_types_default.
|
|
943
|
-
value: external_prop_types_default.
|
|
944
|
-
elementRef: external_prop_types_default.
|
|
843
|
+
required: (external_prop_types_default()).bool,
|
|
844
|
+
value: (external_prop_types_default()).string,
|
|
845
|
+
elementRef: external_prop_types_default().oneOfType([(external_prop_types_default()).func, (external_prop_types_default()).object])
|
|
945
846
|
};
|
|
946
847
|
var Calendar_defaultProps = {
|
|
947
848
|
locale: 'en_US',
|
|
948
849
|
value: external_moment_default()().format('YYYY-MM-DD')
|
|
949
850
|
};
|
|
950
851
|
|
|
951
|
-
var
|
|
852
|
+
var Calendar = /*#__PURE__*/function (_Component) {
|
|
952
853
|
Calendar_inherits(Calendar, _Component);
|
|
953
854
|
|
|
954
855
|
var _super = Calendar_createSuper(Calendar);
|
|
@@ -985,8 +886,8 @@ var Calendar_Calendar = /*#__PURE__*/function (_Component) {
|
|
|
985
886
|
});
|
|
986
887
|
|
|
987
888
|
Calendar_defineProperty(Calendar_assertThisInitialized(_this), "handleCalendarMount", function (el) {
|
|
988
|
-
|
|
989
|
-
|
|
889
|
+
updateReactRef(_this.calendarRef, el);
|
|
890
|
+
updateReactRef(_this.props.elementRef, el);
|
|
990
891
|
});
|
|
991
892
|
|
|
992
893
|
_this.state = {
|
|
@@ -994,8 +895,8 @@ var Calendar_Calendar = /*#__PURE__*/function (_Component) {
|
|
|
994
895
|
todayValue: _this.getToday(),
|
|
995
896
|
source: null
|
|
996
897
|
};
|
|
997
|
-
_this.monthHeaderId =
|
|
998
|
-
_this.calendarRef = /*#__PURE__*/external_react_default.
|
|
898
|
+
_this.monthHeaderId = (0,id_namespaceObject.createDOMID)('header');
|
|
899
|
+
_this.calendarRef = /*#__PURE__*/external_react_default().createRef();
|
|
999
900
|
|
|
1000
901
|
if (false) {}
|
|
1001
902
|
|
|
@@ -1065,7 +966,7 @@ var Calendar_Calendar = /*#__PURE__*/function (_Component) {
|
|
|
1065
966
|
var _this$state = this.state,
|
|
1066
967
|
internalValue = _this$state.internalValue,
|
|
1067
968
|
todayValue = _this$state.todayValue;
|
|
1068
|
-
return /*#__PURE__*/external_react_default.
|
|
969
|
+
return /*#__PURE__*/external_react_default().createElement(CalendarStyles_StyledBox, Calendar_extends({
|
|
1069
970
|
inline: true,
|
|
1070
971
|
"aria-labelledby": labelledBy,
|
|
1071
972
|
"aria-describedby": describedBy,
|
|
@@ -1073,12 +974,12 @@ var Calendar_Calendar = /*#__PURE__*/function (_Component) {
|
|
|
1073
974
|
"data-test": "calendar"
|
|
1074
975
|
}, omit_default()(this.props, keys_default()(Calendar.propTypes)), {
|
|
1075
976
|
elementRef: this.handleCalendarMount
|
|
1076
|
-
}), /*#__PURE__*/external_react_default.
|
|
977
|
+
}), /*#__PURE__*/external_react_default().createElement(Calendar_MonthHeader, {
|
|
1077
978
|
headingId: this.monthHeaderId,
|
|
1078
979
|
locale: locale,
|
|
1079
980
|
onChange: this.handleMonthChange,
|
|
1080
981
|
value: internalValue
|
|
1081
|
-
}), /*#__PURE__*/external_react_default.
|
|
982
|
+
}), /*#__PURE__*/external_react_default().createElement(Calendar_DateTable, {
|
|
1082
983
|
displayValue: internalValue,
|
|
1083
984
|
highlightToday: highlightToday,
|
|
1084
985
|
labelledBy: this.monthHeaderId,
|
|
@@ -1101,116 +1002,17 @@ var Calendar_Calendar = /*#__PURE__*/function (_Component) {
|
|
|
1101
1002
|
}]);
|
|
1102
1003
|
|
|
1103
1004
|
return Calendar;
|
|
1104
|
-
}(
|
|
1105
|
-
|
|
1106
|
-
Calendar_defineProperty(Calendar_Calendar, "propTypes", Calendar_propTypes);
|
|
1107
|
-
|
|
1108
|
-
Calendar_defineProperty(Calendar_Calendar, "defaultProps", Calendar_defaultProps);
|
|
1109
|
-
|
|
1110
|
-
/* harmony default export */ var src_Calendar_Calendar = (Calendar_Calendar);
|
|
1111
|
-
|
|
1112
|
-
// CONCATENATED MODULE: ./src/Calendar/index.ts
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
/***/ }),
|
|
1117
|
-
|
|
1118
|
-
/***/ 2:
|
|
1119
|
-
/***/ (function(module, exports) {
|
|
1120
|
-
|
|
1121
|
-
module.exports = require("react");
|
|
1122
|
-
|
|
1123
|
-
/***/ }),
|
|
1124
|
-
|
|
1125
|
-
/***/ 20:
|
|
1126
|
-
/***/ (function(module, exports) {
|
|
1127
|
-
|
|
1128
|
-
module.exports = require("moment");
|
|
1129
|
-
|
|
1130
|
-
/***/ }),
|
|
1131
|
-
|
|
1132
|
-
/***/ 3:
|
|
1133
|
-
/***/ (function(module, exports) {
|
|
1134
|
-
|
|
1135
|
-
module.exports = require("styled-components");
|
|
1136
|
-
|
|
1137
|
-
/***/ }),
|
|
1138
|
-
|
|
1139
|
-
/***/ 38:
|
|
1140
|
-
/***/ (function(module, exports) {
|
|
1141
|
-
|
|
1142
|
-
module.exports = require("@splunk/react-icons/enterprise/ChevronRight");
|
|
1143
|
-
|
|
1144
|
-
/***/ }),
|
|
1145
|
-
|
|
1146
|
-
/***/ 4:
|
|
1147
|
-
/***/ (function(module, exports) {
|
|
1148
|
-
|
|
1149
|
-
module.exports = require("@splunk/ui-utils/i18n");
|
|
1150
|
-
|
|
1151
|
-
/***/ }),
|
|
1152
|
-
|
|
1153
|
-
/***/ 46:
|
|
1154
|
-
/***/ (function(module, exports) {
|
|
1155
|
-
|
|
1156
|
-
module.exports = require("@splunk/react-icons/ChevronRight");
|
|
1157
|
-
|
|
1158
|
-
/***/ }),
|
|
1159
|
-
|
|
1160
|
-
/***/ 5:
|
|
1161
|
-
/***/ (function(module, exports) {
|
|
1162
|
-
|
|
1163
|
-
module.exports = require("lodash/omit");
|
|
1164
|
-
|
|
1165
|
-
/***/ }),
|
|
1166
|
-
|
|
1167
|
-
/***/ 6:
|
|
1168
|
-
/***/ (function(module, exports) {
|
|
1169
|
-
|
|
1170
|
-
module.exports = require("@splunk/react-ui/Box");
|
|
1171
|
-
|
|
1172
|
-
/***/ }),
|
|
1173
|
-
|
|
1174
|
-
/***/ 66:
|
|
1175
|
-
/***/ (function(module, exports) {
|
|
1176
|
-
|
|
1177
|
-
module.exports = require("@splunk/react-icons/enterprise/ChevronLeft");
|
|
1178
|
-
|
|
1179
|
-
/***/ }),
|
|
1180
|
-
|
|
1181
|
-
/***/ 7:
|
|
1182
|
-
/***/ (function(module, exports) {
|
|
1183
|
-
|
|
1184
|
-
module.exports = require("@splunk/ui-utils/keyboard");
|
|
1185
|
-
|
|
1186
|
-
/***/ }),
|
|
1187
|
-
|
|
1188
|
-
/***/ 8:
|
|
1189
|
-
/***/ (function(module, exports) {
|
|
1190
|
-
|
|
1191
|
-
module.exports = require("@splunk/ui-utils/id");
|
|
1192
|
-
|
|
1193
|
-
/***/ }),
|
|
1194
|
-
|
|
1195
|
-
/***/ 81:
|
|
1196
|
-
/***/ (function(module, exports) {
|
|
1197
|
-
|
|
1198
|
-
module.exports = require("lodash/times");
|
|
1199
|
-
|
|
1200
|
-
/***/ }),
|
|
1201
|
-
|
|
1202
|
-
/***/ 86:
|
|
1203
|
-
/***/ (function(module, exports) {
|
|
1005
|
+
}(external_react_namespaceObject.Component);
|
|
1204
1006
|
|
|
1205
|
-
|
|
1007
|
+
Calendar_defineProperty(Calendar, "propTypes", Calendar_propTypes);
|
|
1206
1008
|
|
|
1207
|
-
|
|
1009
|
+
Calendar_defineProperty(Calendar, "defaultProps", Calendar_defaultProps);
|
|
1208
1010
|
|
|
1209
|
-
|
|
1210
|
-
/***/ (function(module, exports) {
|
|
1011
|
+
/* harmony default export */ const Calendar_Calendar = (Calendar);
|
|
1211
1012
|
|
|
1212
|
-
|
|
1013
|
+
;// CONCATENATED MODULE: ./src/Calendar/index.ts
|
|
1213
1014
|
|
|
1214
|
-
/***/ })
|
|
1215
1015
|
|
|
1216
|
-
|
|
1016
|
+
module.exports = __webpack_exports__;
|
|
1017
|
+
/******/ })()
|
|
1018
|
+
;
|