@splunk/react-ui 4.40.0 → 4.41.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/CHANGELOG.md +21 -0
- package/Calendar.js +548 -744
- package/Date.js +158 -161
- package/FormRows.js +93 -97
- package/Link.js +21 -19
- package/MIGRATION.mdx +24 -3
- package/Menu.js +1 -1
- package/MessageBar.js +59 -57
- package/Multiselect.js +1161 -1278
- package/RadioBar.js +19 -15
- package/ResultsMenu.js +1208 -1028
- package/Select.js +857 -957
- package/Slider.js +346 -300
- package/SlidingPanels.js +166 -148
- package/TabBar.js +187 -172
- package/TabLayout.js +8 -8
- package/Table.js +7 -3
- package/TransitionOpen.js +44 -65
- package/package.json +2 -2
- package/types/src/ButtonSimple/ButtonSimple.d.ts +1 -1
- package/types/src/Calendar/Calendar.d.ts +28 -30
- package/types/src/Calendar/MonthHeader.d.ts +12 -22
- package/types/src/Color/Color.d.ts +2 -2
- package/types/src/Date/Date.d.ts +18 -19
- package/types/src/File/File.d.ts +1 -1
- package/types/src/FormRows/FormRows.d.ts +5 -60
- package/types/src/FormRows/Row.d.ts +1 -1
- package/types/src/Link/Link.d.ts +7 -0
- package/types/src/Link/index.d.ts +1 -0
- package/types/src/Menu/Item.d.ts +1 -1
- package/types/src/Menu/Menu.d.ts +1 -1
- package/types/src/Multiselect/Option.d.ts +1 -1
- package/types/src/Number/Number.d.ts +2 -2
- package/types/src/RadioBar/RadioBar.d.ts +2 -2
- package/types/src/ResultsMenu/VirtualizedResultsMenu/VirtualizedResultsMenu.d.ts +1 -1
- package/types/src/ResultsMenu/VirtualizedResultsMenu/injectVirtualizedItem.d.ts +2 -0
- package/types/src/Search/Option.d.ts +1 -1
- package/types/src/Select/Option.d.ts +5 -1
- package/types/src/Select/OptionBase.d.ts +41 -23
- package/types/src/Select/SelectAllOption.d.ts +6 -2
- package/types/src/Select/SelectBase.d.ts +2 -30
- package/types/src/Slider/Slider.d.ts +7 -16
- package/types/src/SlidingPanels/SlidingPanels.d.ts +4 -3
- package/types/src/TabBar/TabBar.d.ts +10 -2
- package/types/src/TabBar/TabBarContext.d.ts +1 -0
- package/types/src/TabBar/docs/examples/IconsAbove.d.ts +2 -0
- package/types/src/TabBar/docs/examples/IconsLeft.d.ts +2 -0
- package/types/src/TabBar/docs/examples/VerticalIconsAbove.d.ts +2 -0
- package/types/src/TabBar/docs/examples/VerticalIconsLeft.d.ts +2 -0
- package/types/src/TabLayout/TabLayout.d.ts +4 -2
- package/types/src/Table/Row.d.ts +0 -2
- package/types/src/Table/Table.d.ts +0 -2
- package/types/src/Table/docs/examples/Complex.d.ts +14 -3
- package/types/src/Text/Text.d.ts +2 -2
- package/types/src/TextArea/TextArea.d.ts +2 -2
- package/types/src/Typography/Typography.d.ts +4 -2
- package/types/src/TabBar/docs/examples/IconsInline.d.ts +0 -2
- package/types/src/TabBar/docs/examples/IconsSmall.d.ts +0 -2
- package/types/src/TabBar/docs/examples/VerticalSmallIcons.d.ts +0 -2
- package/types/src/Table/docs/examples/prisma/Complex.d.ts +0 -48
- /package/types/src/Table/docs/examples/{prisma/RowActions.d.ts → RowActions.d.ts} +0 -0
package/Date.js
CHANGED
|
@@ -61,15 +61,16 @@
|
|
|
61
61
|
e.r(t);
|
|
62
62
|
// EXPORTS
|
|
63
63
|
e.d(t, {
|
|
64
|
-
DateWithoutTheme: () => /* reexport */
|
|
65
|
-
default: () => /* reexport */
|
|
64
|
+
DateWithoutTheme: () => /* reexport */ U,
|
|
65
|
+
default: () => /* reexport */ G,
|
|
66
|
+
validateValue: () => /* reexport */ Z
|
|
66
67
|
});
|
|
67
68
|
// CONCATENATED MODULE: external "react"
|
|
68
69
|
const n = require("react");
|
|
69
70
|
var a = e.n(n);
|
|
70
71
|
// CONCATENATED MODULE: external "prop-types"
|
|
71
|
-
const
|
|
72
|
-
var
|
|
72
|
+
const r = require("prop-types");
|
|
73
|
+
var o = e.n(r);
|
|
73
74
|
// CONCATENATED MODULE: external "lodash/has"
|
|
74
75
|
const l = require("lodash/has");
|
|
75
76
|
var i = e.n(l);
|
|
@@ -84,13 +85,13 @@
|
|
|
84
85
|
// CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
|
|
85
86
|
const d = require("@splunk/ui-utils/keyboard");
|
|
86
87
|
// CONCATENATED MODULE: external "@splunk/react-ui/Calendar"
|
|
87
|
-
const
|
|
88
|
-
var
|
|
88
|
+
const v = require("@splunk/react-ui/Calendar");
|
|
89
|
+
var h = e.n(v);
|
|
89
90
|
// CONCATENATED MODULE: external "@splunk/react-ui/Popover"
|
|
90
91
|
const y = require("@splunk/react-ui/Popover");
|
|
91
|
-
var
|
|
92
|
+
var b = e.n(y);
|
|
92
93
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
93
|
-
const
|
|
94
|
+
const m = require("@splunk/themes");
|
|
94
95
|
// CONCATENATED MODULE: external "styled-components"
|
|
95
96
|
const g = require("styled-components");
|
|
96
97
|
var C = e.n(g);
|
|
@@ -101,13 +102,13 @@
|
|
|
101
102
|
var k = C()(x()).withConfig({
|
|
102
103
|
displayName: "DateStyles__StyledText",
|
|
103
104
|
componentId: "kacgdc-0"
|
|
104
|
-
})([ "cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}" ], (0,
|
|
105
|
+
})([ "cursor:", ";&[data-inline]{flex-basis:", ";width:", ";}" ], (0, m.pickVariant)("$disabled", {
|
|
105
106
|
false: "text",
|
|
106
107
|
true: "not-allowed"
|
|
107
|
-
}), (0,
|
|
108
|
+
}), (0, m.pick)({
|
|
108
109
|
enterprise: "105px",
|
|
109
110
|
prisma: "150px"
|
|
110
|
-
}), (0,
|
|
111
|
+
}), (0, m.pick)({
|
|
111
112
|
enterprise: {
|
|
112
113
|
comfortable: "105px",
|
|
113
114
|
compact: "80px"
|
|
@@ -118,10 +119,10 @@
|
|
|
118
119
|
displayName: "DateStyles__IconContainer",
|
|
119
120
|
componentId: "kacgdc-1"
|
|
120
121
|
})([ "align-items:center;color:", ";display:flex;padding:", ";pointer-events:none;" ], (0,
|
|
121
|
-
|
|
122
|
-
false:
|
|
123
|
-
true:
|
|
124
|
-
}), (0,
|
|
122
|
+
m.pickVariant)("$disabled", {
|
|
123
|
+
false: m.variables.contentColorMuted,
|
|
124
|
+
true: m.variables.contentColorDisabled
|
|
125
|
+
}), (0, m.pick)({
|
|
125
126
|
comfortable: "0 8px",
|
|
126
127
|
compact: "0 6px"
|
|
127
128
|
}));
|
|
@@ -138,13 +139,13 @@
|
|
|
138
139
|
}, T.apply(null, arguments);
|
|
139
140
|
}
|
|
140
141
|
function I(e) {
|
|
141
|
-
var t = (0,
|
|
142
|
-
var
|
|
142
|
+
var t = (0, m.useSplunkTheme)(), n = t.density;
|
|
143
|
+
var r = n === "compact" ? "20px" : "24px";
|
|
143
144
|
|
|
144
145
|
return a().createElement("svg", T({
|
|
145
146
|
viewBox: "0 0 24 24",
|
|
146
|
-
width:
|
|
147
|
-
height:
|
|
147
|
+
width: r,
|
|
148
|
+
height: r
|
|
148
149
|
}, e), a().createElement("path", {
|
|
149
150
|
fill: "currentColor",
|
|
150
151
|
fillRule: "evenodd",
|
|
@@ -200,12 +201,12 @@
|
|
|
200
201
|
Object.defineProperty(e, W(a.key), a);
|
|
201
202
|
}
|
|
202
203
|
}
|
|
203
|
-
function
|
|
204
|
+
function R(e, t, n) {
|
|
204
205
|
return t && P(e.prototype, t), n && P(e, n), Object.defineProperty(e, "prototype", {
|
|
205
206
|
writable: !1
|
|
206
207
|
}), e;
|
|
207
208
|
}
|
|
208
|
-
function
|
|
209
|
+
function _(e, t) {
|
|
209
210
|
if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function");
|
|
210
211
|
e.prototype = Object.create(t && t.prototype, {
|
|
211
212
|
constructor: {
|
|
@@ -215,30 +216,30 @@
|
|
|
215
216
|
}
|
|
216
217
|
}), Object.defineProperty(e, "prototype", {
|
|
217
218
|
writable: !1
|
|
218
|
-
}), t &&
|
|
219
|
+
}), t && E(e, t);
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
return
|
|
221
|
+
function E(e, t) {
|
|
222
|
+
return E = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
222
223
|
return e.__proto__ = t, e;
|
|
223
|
-
},
|
|
224
|
+
}, E(e, t);
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
+
function q(e) {
|
|
226
227
|
var t = H();
|
|
227
228
|
return function() {
|
|
228
229
|
var n, a = K(e);
|
|
229
230
|
if (t) {
|
|
230
|
-
var
|
|
231
|
-
n = Reflect.construct(a, arguments,
|
|
231
|
+
var r = K(this).constructor;
|
|
232
|
+
n = Reflect.construct(a, arguments, r);
|
|
232
233
|
} else n = a.apply(this, arguments);
|
|
233
|
-
return
|
|
234
|
+
return M(this, n);
|
|
234
235
|
};
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
+
function M(e, t) {
|
|
237
238
|
if (t && ("object" == D(t) || "function" == typeof t)) return t;
|
|
238
239
|
if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined");
|
|
239
|
-
return
|
|
240
|
+
return F(e);
|
|
240
241
|
}
|
|
241
|
-
function
|
|
242
|
+
function F(e) {
|
|
242
243
|
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
243
244
|
return e;
|
|
244
245
|
}
|
|
@@ -280,26 +281,26 @@
|
|
|
280
281
|
/** @public */
|
|
281
282
|
/** @public */
|
|
282
283
|
/** @public */ var Y = {
|
|
283
|
-
defaultValue:
|
|
284
|
-
describedBy:
|
|
285
|
-
disabled:
|
|
286
|
-
elementRef:
|
|
287
|
-
error:
|
|
288
|
-
highlightToday:
|
|
289
|
-
inline:
|
|
290
|
-
inputId:
|
|
291
|
-
inputOnly:
|
|
292
|
-
labelledBy:
|
|
293
|
-
locale:
|
|
294
|
-
name:
|
|
295
|
-
onBlur:
|
|
296
|
-
onChange:
|
|
297
|
-
onClick:
|
|
298
|
-
onFocus:
|
|
299
|
-
onKeyDown:
|
|
284
|
+
defaultValue: o().string,
|
|
285
|
+
describedBy: o().string,
|
|
286
|
+
disabled: o().bool,
|
|
287
|
+
elementRef: o().oneOfType([ o().func, o().object ]),
|
|
288
|
+
error: o().bool,
|
|
289
|
+
highlightToday: o().bool,
|
|
290
|
+
inline: o().bool,
|
|
291
|
+
inputId: o().string,
|
|
292
|
+
inputOnly: o().bool,
|
|
293
|
+
labelledBy: o().string,
|
|
294
|
+
locale: o().string,
|
|
295
|
+
name: o().string,
|
|
296
|
+
onBlur: o().func,
|
|
297
|
+
onChange: o().func,
|
|
298
|
+
onClick: o().func,
|
|
299
|
+
onFocus: o().func,
|
|
300
|
+
onKeyDown: o().func,
|
|
300
301
|
/** @private */
|
|
301
|
-
splunkTheme:
|
|
302
|
-
value:
|
|
302
|
+
splunkTheme: o().object,
|
|
303
|
+
value: o().string
|
|
303
304
|
};
|
|
304
305
|
var $ = {
|
|
305
306
|
disabled: false,
|
|
@@ -309,155 +310,159 @@
|
|
|
309
310
|
inputOnly: false,
|
|
310
311
|
locale: "en_US"
|
|
311
312
|
};
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
/**
|
|
314
|
+
* This static value can be used to convert a moment date to a compatible string
|
|
315
|
+
* to set the `value` prop.
|
|
316
|
+
* ```
|
|
317
|
+
* moment().format(Date.momentFormat);
|
|
318
|
+
* ```
|
|
319
|
+
* @public
|
|
320
|
+
* @name momentFormat
|
|
321
|
+
* @memberOf Date
|
|
322
|
+
* @type string
|
|
323
|
+
*/ var N = "YYYY-MM-DD";
|
|
324
|
+
var Z = function e(t) {
|
|
325
|
+
if (!p()(t, N).isValid()) {
|
|
326
|
+
// eslint-disable-next-line no-console
|
|
327
|
+
console.error('Invalid date string value "'.concat(t, '" provided to Moment.'));
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
var U = function(e) {
|
|
331
|
+
_(n, e);
|
|
332
|
+
var t = q(n);
|
|
315
333
|
// @docs-props-type DatePropsBase
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
* to set the `value` prop.
|
|
319
|
-
* ```
|
|
320
|
-
* moment().format(Date.momentFormat);
|
|
321
|
-
* ```
|
|
322
|
-
* @public
|
|
323
|
-
* @name momentFormat
|
|
324
|
-
* @memberOf Date
|
|
325
|
-
* @type string
|
|
326
|
-
*/ function n(e) {
|
|
327
|
-
var a;
|
|
334
|
+
function n(e) {
|
|
335
|
+
var r;
|
|
328
336
|
j(this, n);
|
|
329
|
-
|
|
330
|
-
B(
|
|
331
|
-
B(
|
|
332
|
-
B(
|
|
333
|
-
B(
|
|
334
|
-
B(
|
|
335
|
-
B(
|
|
336
|
-
var t = p()(
|
|
337
|
+
r = t.call(this, e);
|
|
338
|
+
B(F(r), "controlledExternally", void 0);
|
|
339
|
+
B(F(r), "focusCalledInternally", false);
|
|
340
|
+
B(F(r), "popoverId", void 0);
|
|
341
|
+
B(F(r), "calendarRef", a().createRef());
|
|
342
|
+
B(F(r), "openWithFocus", false);
|
|
343
|
+
B(F(r), "applyTextChange", (function(e) {
|
|
344
|
+
var t = p()(r.state.tempTextInputDate, "l", r.props.locale);
|
|
337
345
|
if (t.isValid()) {
|
|
338
|
-
|
|
339
|
-
value: t.format(
|
|
346
|
+
r.handleDateChange(e, {
|
|
347
|
+
value: t.format(N)
|
|
340
348
|
}, "textInput");
|
|
341
349
|
} else {
|
|
342
|
-
|
|
350
|
+
r.setState({
|
|
343
351
|
calendarOpen: false,
|
|
344
352
|
tempTextInputDate: undefined
|
|
345
353
|
});
|
|
346
354
|
}
|
|
347
355
|
}));
|
|
348
|
-
B(
|
|
349
|
-
var
|
|
356
|
+
B(F(r), "handleDateChange", (function(e, t, n) {
|
|
357
|
+
var a = t.value;
|
|
350
358
|
if (n !== "textInput") {
|
|
351
|
-
|
|
352
|
-
|
|
359
|
+
r.focusCalledInternally = true;
|
|
360
|
+
r.focus();
|
|
353
361
|
}
|
|
354
|
-
if (
|
|
355
|
-
var
|
|
356
|
-
|
|
362
|
+
if (r.getValue() !== a) {
|
|
363
|
+
var o, l;
|
|
364
|
+
r.setState({
|
|
357
365
|
calendarOpen: false,
|
|
358
366
|
tempTextInputDate: undefined,
|
|
359
|
-
value:
|
|
367
|
+
value: r.isControlled() ? undefined : a
|
|
360
368
|
});
|
|
361
|
-
var i =
|
|
362
|
-
(
|
|
363
|
-
value:
|
|
369
|
+
var i = r.props.name;
|
|
370
|
+
(o = (l = r.props).onChange) === null || o === void 0 ? void 0 : o.call(l, e, {
|
|
371
|
+
value: a,
|
|
364
372
|
name: i
|
|
365
373
|
});
|
|
366
374
|
} else {
|
|
367
|
-
|
|
375
|
+
r.setState({
|
|
368
376
|
calendarOpen: false
|
|
369
377
|
});
|
|
370
378
|
}
|
|
371
379
|
}));
|
|
372
|
-
B(
|
|
373
|
-
var n,
|
|
374
|
-
if (
|
|
375
|
-
|
|
376
|
-
} else if (!
|
|
377
|
-
|
|
380
|
+
B(F(r), "handleFocus", (function(e, t) {
|
|
381
|
+
var n, a;
|
|
382
|
+
if (r.focusCalledInternally) {
|
|
383
|
+
r.focusCalledInternally = false;
|
|
384
|
+
} else if (!r.props.inputOnly) {
|
|
385
|
+
r.setState({
|
|
378
386
|
calendarOpen: true
|
|
379
387
|
});
|
|
380
388
|
}
|
|
381
|
-
(n = (
|
|
389
|
+
(n = (a = r.props).onFocus) === null || n === void 0 ? void 0 : n.call(a, e, t);
|
|
382
390
|
}));
|
|
383
|
-
B(
|
|
391
|
+
B(F(r), "handleClick", (function(e) {
|
|
384
392
|
var t, n;
|
|
385
|
-
if (!
|
|
386
|
-
|
|
393
|
+
if (!r.props.inputOnly && !r.state.calendarOpen) {
|
|
394
|
+
r.setState({
|
|
387
395
|
calendarOpen: true
|
|
388
396
|
});
|
|
389
397
|
}
|
|
390
|
-
(t = (n =
|
|
398
|
+
(t = (n = r.props).onClick) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
391
399
|
}));
|
|
392
|
-
B(
|
|
400
|
+
B(F(r), "handleInputChange", (function(e, t) {
|
|
393
401
|
var n = t.value;
|
|
394
|
-
|
|
402
|
+
r.setState({
|
|
395
403
|
tempTextInputDate: n,
|
|
396
|
-
calendarOpen: !
|
|
404
|
+
calendarOpen: !r.props.inputOnly
|
|
397
405
|
});
|
|
398
406
|
}));
|
|
399
|
-
B(
|
|
407
|
+
B(F(r), "handleKeyDown", (function(e) {
|
|
400
408
|
var t, n;
|
|
401
|
-
var
|
|
402
|
-
if (
|
|
403
|
-
|
|
404
|
-
} else if (!
|
|
409
|
+
var a = (0, d.keycode)(e.nativeEvent);
|
|
410
|
+
if (a === "enter" || a === "tab") {
|
|
411
|
+
r.applyTextChange(e);
|
|
412
|
+
} else if (!r.props.inputOnly && a === "down") {
|
|
405
413
|
e.preventDefault();
|
|
406
|
-
if (!
|
|
407
|
-
|
|
408
|
-
|
|
414
|
+
if (!r.state.calendarOpen) {
|
|
415
|
+
r.openWithFocus = true;
|
|
416
|
+
r.setState({
|
|
409
417
|
calendarOpen: true
|
|
410
418
|
});
|
|
411
|
-
} else if (
|
|
412
|
-
|
|
419
|
+
} else if (r.calendarRef) {
|
|
420
|
+
(0, v.focusActiveDay)(r.calendarRef);
|
|
413
421
|
}
|
|
414
|
-
} else if (
|
|
415
|
-
|
|
422
|
+
} else if (a === "esc") {
|
|
423
|
+
r.setState({
|
|
416
424
|
calendarOpen: false,
|
|
417
425
|
tempTextInputDate: undefined
|
|
418
426
|
});
|
|
419
|
-
|
|
427
|
+
r.focus();
|
|
420
428
|
}
|
|
421
|
-
(t = (n =
|
|
429
|
+
(t = (n = r.props).onKeyDown) === null || t === void 0 ? void 0 : t.call(n, e);
|
|
422
430
|
}));
|
|
423
|
-
B(
|
|
424
|
-
|
|
431
|
+
B(F(r), "handleMount", (function(e) {
|
|
432
|
+
r.setState({
|
|
425
433
|
anchor: e
|
|
426
434
|
});
|
|
427
|
-
S(
|
|
435
|
+
S(r.props.elementRef, e);
|
|
428
436
|
}));
|
|
429
|
-
B(
|
|
430
|
-
|
|
437
|
+
B(F(r), "handleInputMount", (function(e) {
|
|
438
|
+
r.setState({
|
|
431
439
|
input: e
|
|
432
440
|
});
|
|
433
441
|
}));
|
|
434
|
-
B(
|
|
435
|
-
a.calendar = e;
|
|
436
|
-
}));
|
|
437
|
-
B(R(a), "handleRequestClose", (function(e) {
|
|
442
|
+
B(F(r), "handleRequestClose", (function(e) {
|
|
438
443
|
var t = e.event, n = e.reason;
|
|
439
|
-
if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !==
|
|
440
|
-
|
|
444
|
+
if ((n === "clickAway" || n === "escapeKey") && t !== undefined && t.target !== r.state.anchor) {
|
|
445
|
+
r.applyTextChange(t);
|
|
441
446
|
if (n === "escapeKey") {
|
|
442
|
-
|
|
443
|
-
|
|
447
|
+
r.focusCalledInternally = true;
|
|
448
|
+
r.focus();
|
|
444
449
|
}
|
|
445
450
|
}
|
|
446
451
|
}));
|
|
447
|
-
|
|
448
|
-
var o =
|
|
449
|
-
|
|
452
|
+
r.controlledExternally = i()(e, "value");
|
|
453
|
+
var o = r.isControlled() ? e.value : e.defaultValue || p()().locale(e.locale).format(N);
|
|
454
|
+
r.state = {
|
|
450
455
|
anchor: null,
|
|
451
456
|
calendarOpen: false,
|
|
452
457
|
input: null,
|
|
453
|
-
value:
|
|
458
|
+
value: r.isControlled() ? undefined : o
|
|
454
459
|
};
|
|
455
|
-
|
|
460
|
+
r.popoverId = (0, f.createDOMID)("calendar");
|
|
456
461
|
if (false) {}
|
|
457
462
|
if (false) {}
|
|
458
|
-
return
|
|
463
|
+
return r;
|
|
459
464
|
}
|
|
460
|
-
|
|
465
|
+
R(n, [ {
|
|
461
466
|
key: "componentDidUpdate",
|
|
462
467
|
value: function e(t, n) {
|
|
463
468
|
if (false) {}
|
|
@@ -467,9 +472,8 @@
|
|
|
467
472
|
* If `openWithFocus` and `calendarOpen` are set the user is attempting to navigate to the dropdown, but it's closed.
|
|
468
473
|
* On the first update following the state change set focus to the active day within the calendar.
|
|
469
474
|
*/ if (this.openWithFocus && this.state.calendarOpen && n.calendarOpen !== this.state.calendarOpen) {
|
|
470
|
-
var a;
|
|
471
475
|
this.openWithFocus = false;
|
|
472
|
-
(
|
|
476
|
+
(0, v.focusActiveDay)(this.calendarRef);
|
|
473
477
|
}
|
|
474
478
|
}
|
|
475
479
|
}, {
|
|
@@ -480,7 +484,7 @@
|
|
|
480
484
|
}, {
|
|
481
485
|
key: "getTextInputValue",
|
|
482
486
|
value: function e() {
|
|
483
|
-
return this.state.tempTextInputDate === undefined ? p()(this.getValue(),
|
|
487
|
+
return this.state.tempTextInputDate === undefined ? p()(this.getValue(), N, this.props.locale).format("l") : this.state.tempTextInputDate;
|
|
484
488
|
}
|
|
485
489
|
}, {
|
|
486
490
|
key: "isControlled",
|
|
@@ -498,28 +502,28 @@
|
|
|
498
502
|
}, {
|
|
499
503
|
key: "render",
|
|
500
504
|
value: function e() {
|
|
501
|
-
var t = this.props, n = t.disabled,
|
|
505
|
+
var t = this.props, n = t.disabled, r = t.highlightToday, o = t.inputOnly, l = t.locale, i = t.splunkTheme;
|
|
502
506
|
var u = i.isPrisma;
|
|
503
507
|
var c = this.getValue();
|
|
504
|
-
var p = u && !
|
|
508
|
+
var p = u && !o && a().createElement(w, {
|
|
505
509
|
"aria-hidden": true,
|
|
506
510
|
$disabled: n
|
|
507
511
|
}, a().createElement(I, null));
|
|
508
512
|
var f;
|
|
509
513
|
var d = {};
|
|
510
|
-
if (!
|
|
514
|
+
if (!o) {
|
|
511
515
|
d.role = "combobox";
|
|
512
516
|
d["aria-controls"] = this.state.calendarOpen ? this.popoverId : undefined;
|
|
513
517
|
d["aria-expanded"] = n ? false : this.state.calendarOpen;
|
|
514
518
|
d["aria-haspopup"] = true;
|
|
515
|
-
f = a().createElement(
|
|
519
|
+
f = a().createElement(b(), {
|
|
516
520
|
anchor: this.state.anchor,
|
|
517
521
|
id: this.popoverId,
|
|
518
522
|
open: n ? false : this.state.calendarOpen,
|
|
519
523
|
onRequestClose: this.handleRequestClose
|
|
520
|
-
}, a().createElement(
|
|
521
|
-
|
|
522
|
-
highlightToday:
|
|
524
|
+
}, a().createElement(h(), {
|
|
525
|
+
elementRef: this.calendarRef,
|
|
526
|
+
highlightToday: r,
|
|
523
527
|
locale: l,
|
|
524
528
|
onChange: this.handleDateChange,
|
|
525
529
|
value: c
|
|
@@ -548,20 +552,13 @@
|
|
|
548
552
|
} ]);
|
|
549
553
|
return n;
|
|
550
554
|
}(n.Component);
|
|
551
|
-
B(
|
|
552
|
-
B(
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
}));
|
|
560
|
-
var Z = (0, b.withSplunkTheme)(N);
|
|
561
|
-
var U = Z;
|
|
562
|
-
U.propTypes = N.propTypes;
|
|
563
|
-
U.momentFormat = N.momentFormat;
|
|
564
|
-
/* harmony default export */ const z = U;
|
|
555
|
+
B(U, "propTypes", Y);
|
|
556
|
+
B(U, "defaultProps", $);
|
|
557
|
+
var z = (0, m.withSplunkTheme)(U);
|
|
558
|
+
var L = z;
|
|
559
|
+
L.propTypes = U.propTypes;
|
|
560
|
+
L.momentFormat = N;
|
|
561
|
+
/* harmony default export */ const G = L;
|
|
565
562
|
// only for styled components using Date
|
|
566
563
|
// CONCATENATED MODULE: ./src/Date/index.ts
|
|
567
564
|
module.exports = t;
|