@splunk/react-ui 5.8.0 → 5.9.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/Anchor.js +2 -1
- package/CHANGELOG.md +22 -0
- package/Calendar.js +134 -134
- package/Clickable.js +131 -94
- package/CollapsiblePanel.js +173 -135
- package/ComboBox.js +1 -0
- package/Dropdown.js +27 -18
- package/File.js +35 -35
- package/Menu.js +259 -215
- package/Modal.js +174 -181
- package/Monogram.js +2 -2
- package/Multiselect.js +401 -321
- package/Number.js +2 -1
- package/Search.js +15 -14
- package/SelectBase.js +777 -719
- package/Table.js +116 -119
- package/Text.js +26 -26
- package/docs-llm/Avatar.md +2 -8
- package/docs-llm/Multiselect.md +5 -3
- package/docs-llm/Notifications.md +46 -0
- package/docs-llm/Tree.md +7 -2
- package/docs-llm/llms.txt +6 -2
- package/package.json +4 -4
- package/types/src/Multiselect/Compact.d.ts +8 -3
- package/types/src/Multiselect/Multiselect.d.ts +8 -3
- package/types/src/Multiselect/Normal.d.ts +8 -3
- package/types/src/Multiselect/Option.d.ts +6 -3
- package/types/src/Multiselect/docs/examples/Disabled.d.ts +1 -0
- package/types/src/SelectBase/SelectBase.d.ts +1 -1
package/Calendar.js
CHANGED
|
@@ -24,11 +24,11 @@
|
|
|
24
24
|
/******/ (() => {
|
|
25
25
|
/******/ // define getter functions for harmony exports
|
|
26
26
|
/******/ e.d = (a, r) => {
|
|
27
|
-
/******/ for (var
|
|
28
|
-
/******/ if (e.o(r,
|
|
29
|
-
/******/ Object.defineProperty(a,
|
|
27
|
+
/******/ for (var t in r) {
|
|
28
|
+
/******/ if (e.o(r, t) && !e.o(a, t)) {
|
|
29
|
+
/******/ Object.defineProperty(a, t, {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: r[
|
|
31
|
+
get: r[t]
|
|
32
32
|
});
|
|
33
33
|
/******/ }
|
|
34
34
|
/******/ }
|
|
@@ -67,10 +67,10 @@
|
|
|
67
67
|
});
|
|
68
68
|
// CONCATENATED MODULE: external "react"
|
|
69
69
|
const r = require("react");
|
|
70
|
-
var
|
|
70
|
+
var t = e.n(r);
|
|
71
71
|
// CONCATENATED MODULE: external "moment"
|
|
72
|
-
const
|
|
73
|
-
var l = e.n(
|
|
72
|
+
const n = require("moment");
|
|
73
|
+
var l = e.n(n);
|
|
74
74
|
// CONCATENATED MODULE: external "prop-types"
|
|
75
75
|
const o = require("prop-types");
|
|
76
76
|
var i = e.n(o);
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
const c = require("styled-components");
|
|
81
81
|
var d = e.n(c);
|
|
82
82
|
// CONCATENATED MODULE: external "@splunk/themes"
|
|
83
|
-
const
|
|
83
|
+
const v = require("@splunk/themes");
|
|
84
84
|
// CONCATENATED MODULE: ./src/Calendar/CalendarStyles.ts
|
|
85
|
-
var
|
|
85
|
+
var s = d().div.withConfig({
|
|
86
86
|
displayName: "CalendarStyles__Styled",
|
|
87
87
|
componentId: "sc-18925wt-0"
|
|
88
|
-
})([ "", ";grid-row-gap:", ";padding:", ";" ],
|
|
88
|
+
})([ "", ";grid-row-gap:", ";padding:", ";" ], v.mixins.reset("grid"), v.variables.spacingXSmall, v.variables.spacingLarge);
|
|
89
89
|
// CONCATENATED MODULE: external "lodash/times"
|
|
90
90
|
const f = require("lodash/times");
|
|
91
91
|
var y = e.n(f);
|
|
@@ -96,33 +96,33 @@
|
|
|
96
96
|
var g = d().div.withConfig({
|
|
97
97
|
displayName: "DateGridStyles__Styled",
|
|
98
98
|
componentId: "sc-7cb7ui-0"
|
|
99
|
-
})([ "", ";grid-template-columns:repeat(7,min-content);grid-row-gap:", ";" ],
|
|
99
|
+
})([ "", ";grid-template-columns:repeat(7,min-content);grid-row-gap:", ";" ], v.mixins.reset("grid"), v.variables.spacingXSmall);
|
|
100
100
|
var b = d().div.withConfig({
|
|
101
101
|
displayName: "DateGridStyles__StyledWeekday",
|
|
102
102
|
componentId: "sc-7cb7ui-1"
|
|
103
|
-
})([ "", ";text-align:center;" ],
|
|
103
|
+
})([ "", ";text-align:center;" ], v.mixins.typography("smallBody"));
|
|
104
104
|
// CONCATENATED MODULE: ./src/Calendar/DayStyles.ts
|
|
105
105
|
var h = d().div.withConfig({
|
|
106
106
|
displayName: "DayStyles__Styled",
|
|
107
107
|
componentId: "sc-1nryhyt-0"
|
|
108
|
-
})([ "", " width:", ";height:", ";align-items:center;justify-content:center;border:1px solid transparent;border-radius:", ";color:", ";cursor:pointer;", " ", " &:focus{box-shadow:", ";font-weight:", ";outline:none;z-index:0;}&:hover{background-color:", ";color:", ";}", "" ],
|
|
108
|
+
})([ "", " width:", ";height:", ";align-items:center;justify-content:center;border:1px solid transparent;border-radius:", ";color:", ";cursor:pointer;", " ", " &:focus{box-shadow:", ";font-weight:", ";outline:none;z-index:0;}&:hover{background-color:", ";color:", ";}", "" ], v.mixins.reset("flex"), v.variables.inputHeight, v.variables.inputHeight, v.variables.borderRadius, v.variables.contentColorActive, (function(e) {
|
|
109
109
|
var a = e.$dayOfWeek;
|
|
110
110
|
// We need the + 1 here since the dayOfWeek goes from 0-6 (Sun-Sat) but grid-column values go from 1-7.
|
|
111
111
|
return (0, c.css)([ "grid-column:calc(", " + 1);" ], a);
|
|
112
112
|
}), (function(e) {
|
|
113
113
|
var a = e.$today;
|
|
114
|
-
return a && (0, c.css)([ "border:1px solid ", ";" ],
|
|
115
|
-
}),
|
|
114
|
+
return a && (0, c.css)([ "border:1px solid ", ";" ], v.variables.interactiveColorBorder);
|
|
115
|
+
}), v.variables.focusShadow, v.variables.fontWeightBold, v.variables.interactiveColorOverlayHover, v.variables.contentColorAccent, (function(e) {
|
|
116
116
|
var a = e.$selected;
|
|
117
|
-
return a && (0, c.css)([ "border:1px solid ", ";font-weight:", ";background-color:", ";&:hover{background-color:", ";}" ],
|
|
117
|
+
return a && (0, c.css)([ "border:1px solid ", ";font-weight:", ";background-color:", ";&:hover{background-color:", ";}" ], v.variables.contentColorAccent, v.variables.fontWeightBold, v.variables.interactiveColorOverlaySelected, v.mixins.overlayColors(v.variables.interactiveColorOverlaySelected, v.variables.interactiveColorOverlayHover));
|
|
118
118
|
}));
|
|
119
119
|
// CONCATENATED MODULE: ./src/Calendar/Day.tsx
|
|
120
120
|
function m() {
|
|
121
121
|
return m = Object.assign ? Object.assign.bind() : function(e) {
|
|
122
122
|
for (var a = 1; a < arguments.length; a++) {
|
|
123
123
|
var r = arguments[a];
|
|
124
|
-
for (var
|
|
125
|
-
({}).hasOwnProperty.call(r,
|
|
124
|
+
for (var t in r) {
|
|
125
|
+
({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
return e;
|
|
@@ -130,22 +130,22 @@
|
|
|
130
130
|
}
|
|
131
131
|
function D(e, a) {
|
|
132
132
|
if (null == e) return {};
|
|
133
|
-
var r,
|
|
133
|
+
var r, t, n = M(e, a);
|
|
134
134
|
if (Object.getOwnPropertySymbols) {
|
|
135
135
|
var l = Object.getOwnPropertySymbols(e);
|
|
136
|
-
for (
|
|
137
|
-
r = l[
|
|
136
|
+
for (t = 0; t < l.length; t++) {
|
|
137
|
+
r = l[t], -1 === a.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
return
|
|
140
|
+
return n;
|
|
141
141
|
}
|
|
142
142
|
function M(e, a) {
|
|
143
143
|
if (null == e) return {};
|
|
144
144
|
var r = {};
|
|
145
|
-
for (var
|
|
146
|
-
if ({}.hasOwnProperty.call(e,
|
|
147
|
-
if (-1 !== a.indexOf(
|
|
148
|
-
r[
|
|
145
|
+
for (var t in e) {
|
|
146
|
+
if ({}.hasOwnProperty.call(e, t)) {
|
|
147
|
+
if (-1 !== a.indexOf(t)) continue;
|
|
148
|
+
r[t] = e[t];
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
return r;
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
value: i().string
|
|
163
163
|
};
|
|
164
164
|
function w(e) {
|
|
165
|
-
var a = e.active,
|
|
165
|
+
var a = e.active, n = a === void 0 ? false : a, o = e.dayOfWeek, i = e.locale, u = i === void 0 ? "en_US" : i, c = e.onClick, d = e.onKeyDown, v = e.selected, s = v === void 0 ? false : v, f = e.today, y = f === void 0 ? false : f, Y = e.value, p = D(e, [ "active", "dayOfWeek", "locale", "onClick", "onKeyDown", "selected", "today", "value" ]);
|
|
166
166
|
// @docs-props-type DayPropsBase
|
|
167
167
|
var g = (0, r.useCallback)((function(e) {
|
|
168
168
|
e.preventDefault();
|
|
@@ -178,18 +178,18 @@
|
|
|
178
178
|
}), [ d, Y ]);
|
|
179
179
|
var M = Y && l()(Y, "YYYY-MM-DD", u).format("D");
|
|
180
180
|
|
|
181
|
-
return
|
|
182
|
-
tabIndex:
|
|
183
|
-
"aria-selected":
|
|
181
|
+
return t().createElement(h, m({
|
|
182
|
+
tabIndex: n ? 0 : -1,
|
|
183
|
+
"aria-selected": s,
|
|
184
184
|
"data-test-day": M,
|
|
185
185
|
"data-test": "day-of-month",
|
|
186
|
-
"data-active-day":
|
|
186
|
+
"data-active-day": n,
|
|
187
187
|
"data-is-today": y,
|
|
188
188
|
onClick: g,
|
|
189
189
|
onKeyDown: b,
|
|
190
190
|
$dayOfWeek: o,
|
|
191
191
|
$today: y,
|
|
192
|
-
$selected:
|
|
192
|
+
$selected: s
|
|
193
193
|
}, p), M);
|
|
194
194
|
}
|
|
195
195
|
w.propTypes = O;
|
|
@@ -199,8 +199,8 @@
|
|
|
199
199
|
return k = Object.assign ? Object.assign.bind() : function(e) {
|
|
200
200
|
for (var a = 1; a < arguments.length; a++) {
|
|
201
201
|
var r = arguments[a];
|
|
202
|
-
for (var
|
|
203
|
-
({}).hasOwnProperty.call(r,
|
|
202
|
+
for (var t in r) {
|
|
203
|
+
({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
return e;
|
|
@@ -208,22 +208,22 @@
|
|
|
208
208
|
}
|
|
209
209
|
function S(e, a) {
|
|
210
210
|
if (null == e) return {};
|
|
211
|
-
var r,
|
|
211
|
+
var r, t, n = x(e, a);
|
|
212
212
|
if (Object.getOwnPropertySymbols) {
|
|
213
213
|
var l = Object.getOwnPropertySymbols(e);
|
|
214
|
-
for (
|
|
215
|
-
r = l[
|
|
214
|
+
for (t = 0; t < l.length; t++) {
|
|
215
|
+
r = l[t], -1 === a.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
return
|
|
218
|
+
return n;
|
|
219
219
|
}
|
|
220
220
|
function x(e, a) {
|
|
221
221
|
if (null == e) return {};
|
|
222
222
|
var r = {};
|
|
223
|
-
for (var
|
|
224
|
-
if ({}.hasOwnProperty.call(e,
|
|
225
|
-
if (-1 !== a.indexOf(
|
|
226
|
-
r[
|
|
223
|
+
for (var t in e) {
|
|
224
|
+
if ({}.hasOwnProperty.call(e, t)) {
|
|
225
|
+
if (-1 !== a.indexOf(t)) continue;
|
|
226
|
+
r[t] = e[t];
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
return r;
|
|
@@ -239,23 +239,23 @@
|
|
|
239
239
|
todayValue: i().string
|
|
240
240
|
};
|
|
241
241
|
function E(e) {
|
|
242
|
-
var a = e.displayValue, r = e.endDate,
|
|
242
|
+
var a = e.displayValue, r = e.endDate, n = e.highlightToday, o = e.locale, i = e.onChange, u = e.onKeyDown, c = e.selectedDate, d = e.selectedValue, v = e.startDate, s = e.todayValue;
|
|
243
243
|
// @docs-props-type DateGridPropsBase
|
|
244
|
-
var f = l()(
|
|
244
|
+
var f = l()(v).locale(o).startOf("month");
|
|
245
245
|
var y = [];
|
|
246
246
|
while (f.isSameOrBefore(r)) {
|
|
247
247
|
var Y = f.format("YYYY-MM-DD");
|
|
248
|
-
var p = Y ===
|
|
248
|
+
var p = Y === s;
|
|
249
249
|
var g = Y === d;
|
|
250
250
|
var b = Y === a;
|
|
251
251
|
var h = Number(f.format("e"));
|
|
252
|
-
y.push(
|
|
252
|
+
y.push( t().createElement(C, {
|
|
253
253
|
key: Y,
|
|
254
254
|
locale: o,
|
|
255
255
|
onClick: i,
|
|
256
256
|
onKeyDown: u,
|
|
257
257
|
active: c ? b : p,
|
|
258
|
-
today:
|
|
258
|
+
today: n && p,
|
|
259
259
|
value: Y,
|
|
260
260
|
selected: g,
|
|
261
261
|
dayOfWeek: h
|
|
@@ -266,21 +266,21 @@
|
|
|
266
266
|
}
|
|
267
267
|
function j(e, a) {
|
|
268
268
|
return y()(7, (function(r) {
|
|
269
|
-
var
|
|
269
|
+
var n = l()().locale(e).weekday(r).format(a);
|
|
270
270
|
var o = l()().locale(e).weekday(r).format("dddd");
|
|
271
271
|
|
|
272
|
-
return
|
|
273
|
-
key:
|
|
274
|
-
},
|
|
272
|
+
return t().createElement(b, {
|
|
273
|
+
key: n
|
|
274
|
+
}, t().createElement(p(), null, o), t().createElement("span", {
|
|
275
275
|
"aria-hidden": true
|
|
276
|
-
},
|
|
276
|
+
}, n));
|
|
277
277
|
}));
|
|
278
278
|
}
|
|
279
279
|
function _(e) {
|
|
280
|
-
var a = e.displayValue, r = e.highlightToday,
|
|
280
|
+
var a = e.displayValue, r = e.highlightToday, n = r === void 0 ? false : r, o = e.labelledBy, i = e.locale, u = i === void 0 ? "en_US" : i, c = e.onChange, d = e.onInternalChange, v = e.selectedValue, s = e.todayValue, f = S(e, [ "displayValue", "highlightToday", "labelledBy", "locale", "onChange", "onInternalChange", "selectedValue", "todayValue" ]);
|
|
281
281
|
var y = "dd";
|
|
282
282
|
var Y = l()(a, "YYYY-MM-DD", u);
|
|
283
|
-
var p = l()(
|
|
283
|
+
var p = l()(v, "YYYY-MM-DD", u);
|
|
284
284
|
var b = l()(Y).startOf("month");
|
|
285
285
|
var h = l()(Y).endOf("month").startOf("day");
|
|
286
286
|
var m = function e(a, r) {
|
|
@@ -288,73 +288,73 @@
|
|
|
288
288
|
c === null || c === void 0 ? void 0 : c(a, r);
|
|
289
289
|
};
|
|
290
290
|
var D = function e(a, r) {
|
|
291
|
-
var
|
|
291
|
+
var t = r.value;
|
|
292
292
|
a.preventDefault();
|
|
293
293
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
294
|
-
value: l()(
|
|
294
|
+
value: l()(t, "YYYY-MM-DD").add(-1, "d").format("YYYY-MM-DD")
|
|
295
295
|
});
|
|
296
296
|
};
|
|
297
297
|
var M = function e(a, r) {
|
|
298
|
-
var
|
|
298
|
+
var t = r.value;
|
|
299
299
|
a.preventDefault();
|
|
300
300
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
301
|
-
value: l()(
|
|
301
|
+
value: l()(t, "YYYY-MM-DD").add(1, "d").format("YYYY-MM-DD")
|
|
302
302
|
});
|
|
303
303
|
};
|
|
304
304
|
var O = function e(a, r) {
|
|
305
|
-
var
|
|
305
|
+
var t = r.value;
|
|
306
306
|
a.preventDefault();
|
|
307
307
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
308
|
-
value: l()(
|
|
308
|
+
value: l()(t, "YYYY-MM-DD").add(-1, "w").format("YYYY-MM-DD")
|
|
309
309
|
});
|
|
310
310
|
};
|
|
311
311
|
var w = function e(a, r) {
|
|
312
|
-
var
|
|
312
|
+
var t = r.value;
|
|
313
313
|
a.preventDefault();
|
|
314
314
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
315
|
-
value: l()(
|
|
315
|
+
value: l()(t, "YYYY-MM-DD").add(1, "w").format("YYYY-MM-DD")
|
|
316
316
|
});
|
|
317
317
|
};
|
|
318
318
|
var C = function e(a, r) {
|
|
319
|
-
var
|
|
319
|
+
var t = r.value;
|
|
320
320
|
a.preventDefault();
|
|
321
321
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
322
|
-
value: l()(
|
|
322
|
+
value: l()(t, "YYYY-MM-DD").add(-1, "M").format("YYYY-MM-DD")
|
|
323
323
|
});
|
|
324
324
|
};
|
|
325
325
|
var x = function e(a, r) {
|
|
326
|
-
var
|
|
326
|
+
var t = r.value;
|
|
327
327
|
a.preventDefault();
|
|
328
328
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
329
|
-
value: l()(
|
|
329
|
+
value: l()(t, "YYYY-MM-DD").add(1, "M").format("YYYY-MM-DD")
|
|
330
330
|
});
|
|
331
331
|
};
|
|
332
332
|
var I = function e(a, r) {
|
|
333
|
-
var
|
|
333
|
+
var t = r.value;
|
|
334
334
|
a.preventDefault();
|
|
335
335
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
336
|
-
value: l()(
|
|
336
|
+
value: l()(t, "YYYY-MM-DD").add(-1, "y").format("YYYY-MM-DD")
|
|
337
337
|
});
|
|
338
338
|
};
|
|
339
339
|
var _ = function e(a, r) {
|
|
340
|
-
var
|
|
340
|
+
var t = r.value;
|
|
341
341
|
a.preventDefault();
|
|
342
342
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
343
|
-
value: l()(
|
|
343
|
+
value: l()(t, "YYYY-MM-DD").add(1, "y").format("YYYY-MM-DD")
|
|
344
344
|
});
|
|
345
345
|
};
|
|
346
346
|
var P = function e(a, r) {
|
|
347
|
-
var
|
|
347
|
+
var t = r.value;
|
|
348
348
|
a.preventDefault();
|
|
349
349
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
350
|
-
value: l()(
|
|
350
|
+
value: l()(t, "YYYY-MM-DD").startOf("week").format("YYYY-MM-DD")
|
|
351
351
|
});
|
|
352
352
|
};
|
|
353
353
|
var q = function e(a, r) {
|
|
354
|
-
var
|
|
354
|
+
var t = r.value;
|
|
355
355
|
a.preventDefault();
|
|
356
356
|
d === null || d === void 0 ? void 0 : d(a, {
|
|
357
|
-
value: l()(
|
|
357
|
+
value: l()(t, "YYYY-MM-DD").endOf("week").format("YYYY-MM-DD")
|
|
358
358
|
});
|
|
359
359
|
};
|
|
360
360
|
var V = function e(a, r) {
|
|
@@ -409,20 +409,20 @@
|
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
|
|
412
|
-
return
|
|
412
|
+
return t().createElement(g, k({
|
|
413
413
|
role: "grid",
|
|
414
414
|
"aria-labelledby": o
|
|
415
415
|
}, f), j(u, y), E({
|
|
416
416
|
displayValue: a,
|
|
417
417
|
endDate: h,
|
|
418
|
-
highlightToday:
|
|
418
|
+
highlightToday: n,
|
|
419
419
|
locale: u,
|
|
420
420
|
onChange: c,
|
|
421
421
|
onKeyDown: V,
|
|
422
422
|
selectedDate: p,
|
|
423
|
-
selectedValue:
|
|
423
|
+
selectedValue: v,
|
|
424
424
|
startDate: b,
|
|
425
|
-
todayValue:
|
|
425
|
+
todayValue: s
|
|
426
426
|
}));
|
|
427
427
|
}
|
|
428
428
|
_.propTypes = I;
|
|
@@ -431,8 +431,8 @@
|
|
|
431
431
|
const q = require("lodash/omit");
|
|
432
432
|
var V = e.n(q);
|
|
433
433
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronLeft"
|
|
434
|
-
const
|
|
435
|
-
var
|
|
434
|
+
const B = require("@splunk/react-icons/ChevronLeft");
|
|
435
|
+
var T = e.n(B);
|
|
436
436
|
// CONCATENATED MODULE: external "@splunk/react-icons/ChevronRight"
|
|
437
437
|
const A = require("@splunk/react-icons/ChevronRight");
|
|
438
438
|
var R = e.n(A);
|
|
@@ -445,11 +445,11 @@
|
|
|
445
445
|
var W = d().div.withConfig({
|
|
446
446
|
displayName: "MonthHeaderStyles__Styled",
|
|
447
447
|
componentId: "sc-18bmbh7-0"
|
|
448
|
-
})([ "", ";grid-template-columns:min-content 1fr min-content;align-items:center;" ],
|
|
448
|
+
})([ "", ";grid-template-columns:min-content 1fr min-content;align-items:center;" ], v.mixins.reset("grid"));
|
|
449
449
|
var U = d().span.withConfig({
|
|
450
450
|
displayName: "MonthHeaderStyles__StyledHeading",
|
|
451
451
|
componentId: "sc-18bmbh7-1"
|
|
452
|
-
})([ "", " text-align:center;" ],
|
|
452
|
+
})([ "", " text-align:center;" ], v.mixins.typography("title4"));
|
|
453
453
|
var $ = d()(N()).withConfig({
|
|
454
454
|
displayName: "MonthHeaderStyles__StyledButton",
|
|
455
455
|
componentId: "sc-18bmbh7-2"
|
|
@@ -457,22 +457,22 @@
|
|
|
457
457
|
// CONCATENATED MODULE: ./src/Calendar/MonthHeader.tsx
|
|
458
458
|
function L(e, a) {
|
|
459
459
|
if (null == e) return {};
|
|
460
|
-
var r,
|
|
460
|
+
var r, t, n = z(e, a);
|
|
461
461
|
if (Object.getOwnPropertySymbols) {
|
|
462
462
|
var l = Object.getOwnPropertySymbols(e);
|
|
463
|
-
for (
|
|
464
|
-
r = l[
|
|
463
|
+
for (t = 0; t < l.length; t++) {
|
|
464
|
+
r = l[t], -1 === a.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
return
|
|
467
|
+
return n;
|
|
468
468
|
}
|
|
469
469
|
function z(e, a) {
|
|
470
470
|
if (null == e) return {};
|
|
471
471
|
var r = {};
|
|
472
|
-
for (var
|
|
473
|
-
if ({}.hasOwnProperty.call(e,
|
|
474
|
-
if (-1 !== a.indexOf(
|
|
475
|
-
r[
|
|
472
|
+
for (var t in e) {
|
|
473
|
+
if ({}.hasOwnProperty.call(e, t)) {
|
|
474
|
+
if (-1 !== a.indexOf(t)) continue;
|
|
475
|
+
r[t] = e[t];
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
return r;
|
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
X["default"];
|
|
500
500
|
}
|
|
501
501
|
function J(e) {
|
|
502
|
-
var a = e.headingId,
|
|
502
|
+
var a = e.headingId, n = e.locale, o = n === void 0 ? "en_US" : n, i = e.onChange, u = e.value, c = L(e, [ "headingId", "locale", "onChange", "value" ]);
|
|
503
503
|
// @docs-props-type MonthHeaderPropsBase
|
|
504
504
|
var d = (0, r.useCallback)((function(e, a) {
|
|
505
505
|
e.stopPropagation();
|
|
@@ -508,10 +508,10 @@
|
|
|
508
508
|
value: r
|
|
509
509
|
});
|
|
510
510
|
}), [ i, u ]);
|
|
511
|
-
var
|
|
511
|
+
var v = (0, r.useCallback)((function(e) {
|
|
512
512
|
d(e, -1);
|
|
513
513
|
}), [ d ]);
|
|
514
|
-
var
|
|
514
|
+
var s = (0, r.useCallback)((function(e) {
|
|
515
515
|
d(e, 1);
|
|
516
516
|
}), [ d ]);
|
|
517
517
|
var f = l()(u, "YYYY-MM-DD", o);
|
|
@@ -519,23 +519,23 @@
|
|
|
519
519
|
var Y = (0, H._)("Previous month");
|
|
520
520
|
var p = (0, H._)("Next month");
|
|
521
521
|
|
|
522
|
-
return
|
|
522
|
+
return t().createElement(W, V()(c, "onChange"), t().createElement($, {
|
|
523
523
|
appearance: "secondary",
|
|
524
|
-
icon:
|
|
524
|
+
icon: t().createElement(T(), {
|
|
525
525
|
"aria-label": Y
|
|
526
526
|
}),
|
|
527
527
|
"data-test": "previous-month",
|
|
528
|
-
onClick:
|
|
529
|
-
}),
|
|
528
|
+
onClick: v
|
|
529
|
+
}), t().createElement(U, {
|
|
530
530
|
id: a,
|
|
531
531
|
"data-test": "header-label"
|
|
532
|
-
}, y),
|
|
532
|
+
}, y), t().createElement($, {
|
|
533
533
|
appearance: "secondary",
|
|
534
|
-
icon:
|
|
534
|
+
icon: t().createElement(R(), {
|
|
535
535
|
"aria-label": p
|
|
536
536
|
}),
|
|
537
537
|
"data-test": "next-month",
|
|
538
|
-
onClick:
|
|
538
|
+
onClick: s
|
|
539
539
|
}));
|
|
540
540
|
}
|
|
541
541
|
J.propTypes = G;
|
|
@@ -564,50 +564,50 @@
|
|
|
564
564
|
return ee = Object.assign ? Object.assign.bind() : function(e) {
|
|
565
565
|
for (var a = 1; a < arguments.length; a++) {
|
|
566
566
|
var r = arguments[a];
|
|
567
|
-
for (var
|
|
568
|
-
({}).hasOwnProperty.call(r,
|
|
567
|
+
for (var t in r) {
|
|
568
|
+
({}).hasOwnProperty.call(r, t) && (e[t] = r[t]);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
571
|
return e;
|
|
572
572
|
}, ee.apply(null, arguments);
|
|
573
573
|
}
|
|
574
574
|
function ae(e, a) {
|
|
575
|
-
return oe(e) || le(e, a) ||
|
|
575
|
+
return oe(e) || le(e, a) || te(e, a) || re();
|
|
576
576
|
}
|
|
577
577
|
function re() {
|
|
578
578
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function te(e, a) {
|
|
581
581
|
if (e) {
|
|
582
|
-
if ("string" == typeof e) return
|
|
582
|
+
if ("string" == typeof e) return ne(e, a);
|
|
583
583
|
var r = {}.toString.call(e).slice(8, -1);
|
|
584
|
-
return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
584
|
+
return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? ne(e, a) : void 0;
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
function
|
|
587
|
+
function ne(e, a) {
|
|
588
588
|
(null == a || a > e.length) && (a = e.length);
|
|
589
|
-
for (var r = 0,
|
|
590
|
-
|
|
589
|
+
for (var r = 0, t = Array(a); r < a; r++) {
|
|
590
|
+
t[r] = e[r];
|
|
591
591
|
}
|
|
592
|
-
return
|
|
592
|
+
return t;
|
|
593
593
|
}
|
|
594
594
|
function le(e, a) {
|
|
595
595
|
var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
|
|
596
596
|
if (null != r) {
|
|
597
|
-
var
|
|
597
|
+
var t, n, l, o, i = [], u = !0, c = !1;
|
|
598
598
|
try {
|
|
599
599
|
if (l = (r = r.call(e)).next, 0 === a) {
|
|
600
600
|
if (Object(r) !== r) return;
|
|
601
601
|
u = !1;
|
|
602
|
-
} else for (;!(u = (
|
|
602
|
+
} else for (;!(u = (t = l.call(r)).done) && (i.push(t.value), i.length !== a); u = !0) {
|
|
603
603
|
}
|
|
604
604
|
} catch (e) {
|
|
605
|
-
c = !0,
|
|
605
|
+
c = !0, n = e;
|
|
606
606
|
} finally {
|
|
607
607
|
try {
|
|
608
608
|
if (!u && null != r["return"] && (o = r["return"](), Object(o) !== o)) return;
|
|
609
609
|
} finally {
|
|
610
|
-
if (c) throw
|
|
610
|
+
if (c) throw n;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
613
|
return i;
|
|
@@ -618,22 +618,22 @@
|
|
|
618
618
|
}
|
|
619
619
|
function ie(e, a) {
|
|
620
620
|
if (null == e) return {};
|
|
621
|
-
var r,
|
|
621
|
+
var r, t, n = ue(e, a);
|
|
622
622
|
if (Object.getOwnPropertySymbols) {
|
|
623
623
|
var l = Object.getOwnPropertySymbols(e);
|
|
624
|
-
for (
|
|
625
|
-
r = l[
|
|
624
|
+
for (t = 0; t < l.length; t++) {
|
|
625
|
+
r = l[t], -1 === a.indexOf(r) && {}.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
return
|
|
628
|
+
return n;
|
|
629
629
|
}
|
|
630
630
|
function ue(e, a) {
|
|
631
631
|
if (null == e) return {};
|
|
632
632
|
var r = {};
|
|
633
|
-
for (var
|
|
634
|
-
if ({}.hasOwnProperty.call(e,
|
|
635
|
-
if (-1 !== a.indexOf(
|
|
636
|
-
r[
|
|
633
|
+
for (var t in e) {
|
|
634
|
+
if ({}.hasOwnProperty.call(e, t)) {
|
|
635
|
+
if (-1 !== a.indexOf(t)) continue;
|
|
636
|
+
r[t] = e[t];
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
return r;
|
|
@@ -651,10 +651,10 @@
|
|
|
651
651
|
value: i().string,
|
|
652
652
|
elementRef: i().oneOfType([ i().func, i().object ])
|
|
653
653
|
};
|
|
654
|
-
var
|
|
654
|
+
var ve = function e(a) {
|
|
655
655
|
return l()().locale(a).format("YYYY-MM-DD");
|
|
656
656
|
};
|
|
657
|
-
var
|
|
657
|
+
var se = function e(a) {
|
|
658
658
|
if (!moment(a, "YYYY-MM-DD").isValid()) {
|
|
659
659
|
return new Error("Invalid value prop ".concat(a, " passed to Calendar. value must be a string date formatted 'YYYY-MM-DD'."));
|
|
660
660
|
}
|
|
@@ -667,10 +667,10 @@
|
|
|
667
667
|
r === null || r === void 0 ? void 0 : r.focus();
|
|
668
668
|
};
|
|
669
669
|
function ye(e) {
|
|
670
|
-
var a = e.describedBy,
|
|
670
|
+
var a = e.describedBy, n = e.elementRef, o = e.highlightToday, i = e.labelledBy, c = e.locale, d = c === void 0 ? "en_US" : c, v = e.mockDate, f = e.onChange, y = e.required, Y = e.value, p = Y === void 0 ? l()().format("YYYY-MM-DD") : Y, g = ie(e, [ "describedBy", "elementRef", "highlightToday", "labelledBy", "locale", "mockDate", "onChange", "required", "value" ]);
|
|
671
671
|
// @docs-props-type CalendarPropsBase
|
|
672
672
|
var b = (0, r.useState)(p), h = ae(b, 2), m = h[0], D = h[1];
|
|
673
|
-
var M = (0, r.useState)(
|
|
673
|
+
var M = (0, r.useState)(v || ve(d)), O = ae(M, 2), w = O[0], C = O[1];
|
|
674
674
|
var k = (0, r.useState)(null), S = ae(k, 2), x = S[0], I = S[1];
|
|
675
675
|
var E = (0, r.useRef)((0, u.createDOMID)("header"));
|
|
676
676
|
var j = (0, r.useRef)();
|
|
@@ -678,9 +678,9 @@
|
|
|
678
678
|
if (false) {}
|
|
679
679
|
}), [ p ]);
|
|
680
680
|
(0, r.useEffect)((function() {
|
|
681
|
-
if (!
|
|
681
|
+
if (!v) {
|
|
682
682
|
var e = setInterval((function() {
|
|
683
|
-
var e =
|
|
683
|
+
var e = ve(d);
|
|
684
684
|
if (e !== w) {
|
|
685
685
|
C(e);
|
|
686
686
|
}
|
|
@@ -692,7 +692,7 @@
|
|
|
692
692
|
};
|
|
693
693
|
}
|
|
694
694
|
return undefined;
|
|
695
|
-
}), [ d,
|
|
695
|
+
}), [ d, v, w ]);
|
|
696
696
|
(0, r.useEffect)((function() {
|
|
697
697
|
if (x === "day") {
|
|
698
698
|
fe(j.current);
|
|
@@ -710,21 +710,21 @@
|
|
|
710
710
|
}), []);
|
|
711
711
|
var V = (0, r.useCallback)((function(e) {
|
|
712
712
|
Z(j, e);
|
|
713
|
-
Z(
|
|
714
|
-
}), [
|
|
713
|
+
Z(n, e);
|
|
714
|
+
}), [ n ]);
|
|
715
715
|
|
|
716
|
-
return
|
|
716
|
+
return t().createElement(s, ee({
|
|
717
717
|
"aria-labelledby": i,
|
|
718
718
|
"aria-describedby": a,
|
|
719
719
|
"aria-required": y,
|
|
720
720
|
"data-test": "calendar",
|
|
721
721
|
ref: V
|
|
722
|
-
}, g),
|
|
722
|
+
}, g), t().createElement(Q, {
|
|
723
723
|
headingId: E.current,
|
|
724
724
|
locale: d,
|
|
725
725
|
onChange: _,
|
|
726
726
|
value: m
|
|
727
|
-
}),
|
|
727
|
+
}), t().createElement(P, {
|
|
728
728
|
displayValue: m,
|
|
729
729
|
highlightToday: o,
|
|
730
730
|
labelledBy: E.current,
|