@splunk/react-ui 4.28.1 → 4.29.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/Paginator.js CHANGED
@@ -61,47 +61,47 @@
61
61
  e.r(t);
62
62
  // EXPORTS
63
63
  e.d(t, {
64
- Compact: () => /* reexport */ re,
65
- PageControl: () => /* reexport */ Ce,
66
- default: () => /* reexport */ De
64
+ Compact: () => /* reexport */ W,
65
+ PageControl: () => /* reexport */ oe,
66
+ default: () => /* reexport */ Ce
67
67
  });
68
68
  // CONCATENATED MODULE: external "react"
69
69
  const n = require("react");
70
70
  var r = e.n(n);
71
71
  // CONCATENATED MODULE: external "prop-types"
72
72
  const a = require("prop-types");
73
- var o = e.n(a);
73
+ var l = e.n(a);
74
74
  // CONCATENATED MODULE: external "@splunk/react-ui/Box"
75
- const l = require("@splunk/react-ui/Box");
76
- var i = e.n(l);
75
+ const i = require("@splunk/react-ui/Box");
76
+ var o = e.n(i);
77
77
  // CONCATENATED MODULE: external "@splunk/ui-utils/format"
78
78
  const c = require("@splunk/ui-utils/format");
79
79
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
80
- const u = require("@splunk/ui-utils/i18n");
80
+ const s = require("@splunk/ui-utils/i18n");
81
81
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronLeft"
82
- const s = require("@splunk/react-icons/enterprise/ChevronLeft");
83
- var p = e.n(s);
82
+ const u = require("@splunk/react-icons/enterprise/ChevronLeft");
83
+ var p = e.n(u);
84
84
  // CONCATENATED MODULE: external "@splunk/react-icons/ChevronLeft"
85
85
  const f = require("@splunk/react-icons/ChevronLeft");
86
- var v = e.n(f);
86
+ var d = e.n(f);
87
87
  // CONCATENATED MODULE: external "@splunk/themes"
88
- const d = require("@splunk/themes");
88
+ const g = require("@splunk/themes");
89
89
  // CONCATENATED MODULE: ./src/Paginator/icons/ChevronLeft.tsx
90
- function g(e) {
90
+ function v(e) {
91
91
  var t = e.className;
92
- var n = (0, d.useSplunkTheme)(), a = n.isCompact, o = n.isEnterprise;
93
- var l = a ? "20px" : "24px";
94
- return o ? r().createElement(p(), {
92
+ var n = (0, g.useSplunkTheme)(), a = n.isCompact, l = n.isEnterprise;
93
+ var i = a ? "20px" : "24px";
94
+ return l ? r().createElement(p(), {
95
95
  className: t,
96
96
  hideDefaultTooltip: true,
97
97
  screenReaderText: null
98
- }) : r().createElement(v(), {
98
+ }) : r().createElement(d(), {
99
99
  className: t,
100
- height: l,
101
- width: l
100
+ height: i,
101
+ width: i
102
102
  });
103
103
  }
104
- /* harmony default export */ const m = g;
104
+ /* harmony default export */ const m = v;
105
105
  // CONCATENATED MODULE: external "@splunk/react-icons/enterprise/ChevronRight"
106
106
  const y = require("@splunk/react-icons/enterprise/ChevronRight");
107
107
  var b = e.n(y);
@@ -111,65 +111,46 @@
111
111
  // CONCATENATED MODULE: ./src/Paginator/icons/ChevronRight.tsx
112
112
  function k(e) {
113
113
  var t = e.className;
114
- var n = (0, d.useSplunkTheme)(), a = n.isCompact, o = n.isEnterprise;
115
- var l = a ? "20px" : "24px";
116
- return o ? r().createElement(b(), {
114
+ var n = (0, g.useSplunkTheme)(), a = n.isCompact, l = n.isEnterprise;
115
+ var i = a ? "20px" : "24px";
116
+ return l ? r().createElement(b(), {
117
117
  className: t,
118
118
  hideDefaultTooltip: true,
119
119
  screenReaderText: null
120
120
  }) : r().createElement(O(), {
121
121
  className: t,
122
- height: l,
123
- width: l
122
+ height: i,
123
+ width: i
124
124
  });
125
125
  }
126
126
  /* harmony default export */ const C = k;
127
- // CONCATENATED MODULE: external "lodash/keys"
128
- const P = require("lodash/keys");
129
- var S = e.n(P);
130
- // CONCATENATED MODULE: external "lodash/omit"
131
- const x = require("lodash/omit");
132
- var w = e.n(x);
133
127
  // CONCATENATED MODULE: external "styled-components"
134
- const _ = require("styled-components");
135
- var E = e.n(_);
128
+ const x = require("styled-components");
129
+ var P = e.n(x);
136
130
  // CONCATENATED MODULE: external "@splunk/react-ui/ButtonSimple"
137
- const j = require("@splunk/react-ui/ButtonSimple");
138
- var N = e.n(j);
131
+ const S = require("@splunk/react-ui/ButtonSimple");
132
+ var w = e.n(S);
139
133
  // CONCATENATED MODULE: ./src/Paginator/ButtonStyles.ts
140
- var T = E()(N()).withConfig({
134
+ var E = P()(w()).withConfig({
141
135
  displayName: "ButtonStyles__StyledButtonSimple",
142
136
  componentId: "sc-1neztq7-0"
143
- })([ "min-width:", ";min-height:", ";text-align:center;flex-shrink:0;", "" ], d.variables.inputHeight, d.variables.inputHeight, (0,
144
- d.pick)({
137
+ })([ "min-width:", ";min-height:", ";text-align:center;flex-shrink:0;", "" ], g.variables.inputHeight, g.variables.inputHeight, (0,
138
+ g.pick)({
145
139
  enterprise: {
146
- comfortable: (0, _.css)([ "padding:", ";" ], d.variables.spacingQuarter),
147
- compact: (0, _.css)([ "padding:3px;" ])
140
+ comfortable: (0, x.css)([ "padding:", ";" ], g.variables.spacingQuarter),
141
+ compact: (0, x.css)([ "padding:3px;" ])
148
142
  },
149
- prisma: (0, _.css)([ "padding:", ";", " & + &{margin-left:8px;}" ], (0, d.pick)({
143
+ prisma: (0, x.css)([ "padding:", ";", " & + &{margin-left:8px;}" ], (0, g.pick)({
150
144
  comfortable: "5px 8px",
151
145
  compact: "4px"
152
146
  }), (function(e) {
153
147
  var t = e.selected;
154
- return t && (0, _.css)([ "font-weight:", ";" ], d.variables.fontWeightBold);
148
+ return t && (0, x.css)([ "font-weight:", ";" ], g.variables.fontWeightBold);
155
149
  }))
156
150
  }));
157
151
  // CONCATENATED MODULE: ./src/Paginator/Button.tsx
158
- function q(e) {
159
- "@babel/helpers - typeof";
160
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
161
- q = function e(t) {
162
- return typeof t;
163
- };
164
- } else {
165
- q = function e(t) {
166
- return t && typeof Symbol === "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
167
- };
168
- }
169
- return q(e);
170
- }
171
- function I() {
172
- I = Object.assign || function(e) {
152
+ function _() {
153
+ _ = Object.assign || function(e) {
173
154
  for (var t = 1; t < arguments.length; t++) {
174
155
  var n = arguments[t];
175
156
  for (var r in n) {
@@ -180,171 +161,79 @@
180
161
  }
181
162
  return e;
182
163
  };
183
- return I.apply(this, arguments);
184
- }
185
- function L(e, t) {
186
- if (!(e instanceof t)) {
187
- throw new TypeError("Cannot call a class as a function");
188
- }
189
- }
190
- function R(e, t) {
191
- for (var n = 0; n < t.length; n++) {
192
- var r = t[n];
193
- r.enumerable = r.enumerable || false;
194
- r.configurable = true;
195
- if ("value" in r) r.writable = true;
196
- Object.defineProperty(e, r.key, r);
197
- }
198
- }
199
- function M(e, t, n) {
200
- if (t) R(e.prototype, t);
201
- if (n) R(e, n);
202
- return e;
203
- }
204
- function D(e, t) {
205
- if (typeof t !== "function" && t !== null) {
206
- throw new TypeError("Super expression must either be null or a function");
207
- }
208
- e.prototype = Object.create(t && t.prototype, {
209
- constructor: {
210
- value: e,
211
- writable: true,
212
- configurable: true
213
- }
214
- });
215
- if (t) z(e, t);
216
- }
217
- function z(e, t) {
218
- z = Object.setPrototypeOf || function e(t, n) {
219
- t.__proto__ = n;
220
- return t;
221
- };
222
- return z(e, t);
164
+ return _.apply(this, arguments);
223
165
  }
224
- function B(e) {
225
- var t = W();
226
- return function n() {
227
- var r = A(e), a;
228
- if (t) {
229
- var o = A(this).constructor;
230
- a = Reflect.construct(r, arguments, o);
231
- } else {
232
- a = r.apply(this, arguments);
166
+ function j(e, t) {
167
+ if (e == null) return {};
168
+ var n = N(e, t);
169
+ var r, a;
170
+ if (Object.getOwnPropertySymbols) {
171
+ var l = Object.getOwnPropertySymbols(e);
172
+ for (a = 0; a < l.length; a++) {
173
+ r = l[a];
174
+ if (t.indexOf(r) >= 0) continue;
175
+ if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
176
+ n[r] = e[r];
233
177
  }
234
- return G(this, a);
235
- };
236
- }
237
- function G(e, t) {
238
- if (t && (q(t) === "object" || typeof t === "function")) {
239
- return t;
240
- }
241
- return H(e);
242
- }
243
- function H(e) {
244
- if (e === void 0) {
245
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
246
- }
247
- return e;
248
- }
249
- function W() {
250
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
251
- if (Reflect.construct.sham) return false;
252
- if (typeof Proxy === "function") return true;
253
- try {
254
- Date.prototype.toString.call(Reflect.construct(Date, [], (function() {})));
255
- return true;
256
- } catch (e) {
257
- return false;
258
178
  }
179
+ return n;
259
180
  }
260
- function A(e) {
261
- A = Object.setPrototypeOf ? Object.getPrototypeOf : function e(t) {
262
- return t.__proto__ || Object.getPrototypeOf(t);
263
- };
264
- return A(e);
265
- }
266
- function Q(e, t, n) {
267
- if (t in e) {
268
- Object.defineProperty(e, t, {
269
- value: n,
270
- enumerable: true,
271
- configurable: true,
272
- writable: true
273
- });
274
- } else {
275
- e[t] = n;
181
+ function N(e, t) {
182
+ if (e == null) return {};
183
+ var n = {};
184
+ var r = Object.keys(e);
185
+ var a, l;
186
+ for (l = 0; l < r.length; l++) {
187
+ a = r[l];
188
+ if (t.indexOf(a) >= 0) continue;
189
+ n[a] = e[a];
276
190
  }
277
- return e;
191
+ return n;
278
192
  }
279
- var V = {
280
- children: o().node,
281
- disabled: o().oneOfType([ o().bool, o().oneOf([ "dimmed" ]) ]),
282
- onClick: o().func,
283
- page: o().number,
193
+ var I = {
194
+ children: l().node,
195
+ disabled: l().oneOfType([ l().bool, l().oneOf([ "dimmed" ]) ]),
196
+ onClick: l().func,
197
+ page: l().number,
284
198
  /** @private */
285
- selected: o().bool
286
- };
287
- var F = {
288
- selected: false
199
+ selected: l().bool
289
200
  };
290
- var J = function(e) {
291
- D(n, e);
292
- var t = B(n);
293
- function n() {
294
- var e;
295
- L(this, n);
296
- for (var r = arguments.length, a = new Array(r), o = 0; o < r; o++) {
297
- a[o] = arguments[o];
298
- }
299
- e = t.call.apply(t, [ this ].concat(a));
300
- Q(H(e), "handleClick", (function(t) {
301
- // destructuring this.props would make TS unable to follow
302
- // the discriminated union types for this.props.onClick
303
- if (e.props.page != null) {
304
- var n, r;
305
- (n = (r = e.props).onClick) === null || n === void 0 ? void 0 : n.call(r, t, {
306
- page: e.props.page
307
- });
308
- } else {
309
- var a, o;
310
- (a = (o = e.props).onClick) === null || a === void 0 ? void 0 : a.call(o, t, {});
311
- }
312
- }));
313
- return e;
314
- }
315
- M(n, [ {
316
- key: "render",
317
- value: function e() {
318
- var t = this.props, a = t.children, o = t.disabled, l = t.page, i = t.selected;
319
-
320
- return r().createElement(T, I({
321
- "data-test": "page",
322
- "data-test-page": l,
323
- appearance: "pill",
324
- disabled: o,
325
- inline: false,
326
- onClick: this.handleClick,
327
- selected: i
328
- }, w()(this.props, S()(n.propTypes))), a);
201
+ function T(e) {
202
+ var t = e.children, a = e.disabled, l = e.onClick, i = e.page, o = e.selected, c = j(e, [ "children", "disabled", "onClick", "page", "selected" ]);
203
+ var s = (0, n.useCallback)((function(e) {
204
+ if (i != null) {
205
+ l === null || l === void 0 ? void 0 : l(e, {
206
+ page: i
207
+ });
208
+ } else {
209
+ l === null || l === void 0 ? void 0 : l(e, {});
329
210
  }
330
- } ]);
331
- return n;
332
- }(n.Component);
333
- Q(J, "propTypes", V);
334
- Q(J, "defaultProps", F);
335
- /* harmony default export */ const K = J;
211
+ }), [ l, i ]);
212
+
213
+ return r().createElement(E, _({
214
+ "data-test": "page",
215
+ "data-test-page": i,
216
+ appearance: "pill",
217
+ disabled: a,
218
+ inline: false,
219
+ onClick: s,
220
+ selected: o || false
221
+ }, c), t);
222
+ }
223
+ T.propTypes = I;
224
+ /* harmony default export */ const q = T;
336
225
  // CONCATENATED MODULE: ./src/Paginator/CompactStyles.ts
337
- var U = E()(i()).withConfig({
226
+ var L = P()(o()).withConfig({
338
227
  displayName: "CompactStyles__StyledBox",
339
228
  componentId: "dwgzkj-0"
340
229
  })([ "flex:0 1 auto;flex-wrap:nowrap;margin-left:auto;" ]);
341
- var X = E().span.withConfig({
230
+ var M = P().span.withConfig({
342
231
  displayName: "CompactStyles__StyledLabel",
343
232
  componentId: "dwgzkj-1"
344
- })([ "align-items:center;display:flex;flex-wrap:wrap;margin-right:", ";" ], d.variables.spacingSmall);
233
+ })([ "align-items:center;display:flex;flex-wrap:wrap;margin-right:", ";" ], g.variables.spacingSmall);
345
234
  // CONCATENATED MODULE: ./src/Paginator/Compact.tsx
346
- function Y() {
347
- Y = Object.assign || function(e) {
235
+ function R() {
236
+ R = Object.assign || function(e) {
348
237
  for (var t = 1; t < arguments.length; t++) {
349
238
  var n = arguments[t];
350
239
  for (var r in n) {
@@ -355,16 +244,16 @@
355
244
  }
356
245
  return e;
357
246
  };
358
- return Y.apply(this, arguments);
247
+ return R.apply(this, arguments);
359
248
  }
360
- function Z(e, t) {
249
+ function D(e, t) {
361
250
  if (e == null) return {};
362
- var n = $(e, t);
251
+ var n = z(e, t);
363
252
  var r, a;
364
253
  if (Object.getOwnPropertySymbols) {
365
- var o = Object.getOwnPropertySymbols(e);
366
- for (a = 0; a < o.length; a++) {
367
- r = o[a];
254
+ var l = Object.getOwnPropertySymbols(e);
255
+ for (a = 0; a < l.length; a++) {
256
+ r = l[a];
368
257
  if (t.indexOf(r) >= 0) continue;
369
258
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
370
259
  n[r] = e[r];
@@ -372,37 +261,37 @@
372
261
  }
373
262
  return n;
374
263
  }
375
- function $(e, t) {
264
+ function z(e, t) {
376
265
  if (e == null) return {};
377
266
  var n = {};
378
267
  var r = Object.keys(e);
379
- var a, o;
380
- for (o = 0; o < r.length; o++) {
381
- a = r[o];
268
+ var a, l;
269
+ for (l = 0; l < r.length; l++) {
270
+ a = r[l];
382
271
  if (t.indexOf(a) >= 0) continue;
383
272
  n[a] = e[a];
384
273
  }
385
274
  return n;
386
275
  }
387
- /** @public */ var ee = {
388
- current: o().number,
389
- elementRef: o().oneOfType([ o().func, o().object ]),
390
- onChange: o().func,
391
- renderLabel: o().oneOfType([ o().bool, o().func ]),
392
- totalPages: o().number
276
+ /** @public */ var B = {
277
+ current: l().number,
278
+ elementRef: l().oneOfType([ l().func, l().object ]),
279
+ onChange: l().func,
280
+ renderLabel: l().oneOfType([ l().bool, l().func ]),
281
+ totalPages: l().number
393
282
  };
394
- var te = function e(t) {
283
+ var G = function e(t) {
395
284
  var n = t.current, r = t.totalPages;
396
285
  var a = null;
397
286
  if (n != null && r != null) {
398
- a = (0, c.sprintf)((0, u._)("%d of %d pages"), n, r);
287
+ a = (0, c.sprintf)((0, s._)("%d of %d pages"), n, r);
399
288
  } else if (n != null) {
400
- a = (0, c.sprintf)((0, u._)("Page %d"), n);
289
+ a = (0, c.sprintf)((0, s._)("Page %d"), n);
401
290
  }
402
291
  return a;
403
292
  };
404
- function ne(e) {
405
- var t = e.onChange, a = e.current, o = e.renderLabel, l = e.totalPages, i = Z(e, [ "onChange", "current", "renderLabel", "totalPages" ]);
293
+ function H(e) {
294
+ var t = e.onChange, a = e.current, l = e.renderLabel, i = e.totalPages, o = D(e, [ "onChange", "current", "renderLabel", "totalPages" ]);
406
295
  // @docs-props-type PaginatorCompactPropsBase
407
296
  var c = (0, n.useCallback)((function(e, n) {
408
297
  var r = n.page;
@@ -411,7 +300,7 @@
411
300
  page: r
412
301
  });
413
302
  }), [ t ]);
414
- var s = (0, n.useCallback)((function(e, n) {
303
+ var u = (0, n.useCallback)((function(e, n) {
415
304
  var r = n.page;
416
305
  t === null || t === void 0 ? void 0 : t(e, {
417
306
  direction: "next",
@@ -419,69 +308,69 @@
419
308
  });
420
309
  }), [ t ]);
421
310
  var p = null;
422
- if (o) {
423
- var f = typeof o === "function" ? o : te;
311
+ if (l) {
312
+ var f = typeof l === "function" ? l : G;
424
313
  p = f({
425
314
  current: a,
426
- totalPages: l
315
+ totalPages: i
427
316
  });
428
317
  }
429
318
 
430
- return r().createElement(U, Y({
431
- "aria-label": (0, u._)("Pagination"),
319
+ return r().createElement(L, R({
320
+ "aria-label": (0, s._)("Pagination"),
432
321
  "data-test": "paginator",
433
322
  "data-test-current": a,
434
323
  flex: true,
435
324
  inline: true,
436
325
  tag: "nav"
437
- }, i), p && r().createElement(X, {
326
+ }, o), p && r().createElement(M, {
438
327
  "data-test": "label"
439
- }, p), r().createElement(K, {
440
- "aria-label": (0, u._)("Go to previous page"),
328
+ }, p), r().createElement(q, {
329
+ "aria-label": (0, s._)("Go to previous page"),
441
330
  "data-test": "prev",
442
331
  disabled: a != null && a <= 1 ? "dimmed" : false,
443
332
  onClick: c,
444
333
  page: a != null ? a - 1 : undefined
445
- }, r().createElement(m, null)), r().createElement(K, {
446
- "aria-label": (0, u._)("Go to next page"),
334
+ }, r().createElement(m, null)), r().createElement(q, {
335
+ "aria-label": (0, s._)("Go to next page"),
447
336
  "data-test": "next",
448
- disabled: a != null && l != null && a >= l ? "dimmed" : false,
449
- onClick: s,
337
+ disabled: a != null && i != null && a >= i ? "dimmed" : false,
338
+ onClick: u,
450
339
  page: a != null ? a + 1 : undefined
451
340
  }, r().createElement(C, null)));
452
341
  }
453
- ne.propTypes = ee;
454
- /* harmony default export */ const re = ne;
342
+ H.propTypes = B;
343
+ /* harmony default export */ const W = H;
455
344
  // CONCATENATED MODULE: external "@splunk/react-ui/Select"
456
- const ae = require("@splunk/react-ui/Select");
457
- var oe = e.n(ae);
345
+ const A = require("@splunk/react-ui/Select");
346
+ var Q = e.n(A);
458
347
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
459
- const le = require("@splunk/react-ui/ScreenReaderContent");
460
- var ie = e.n(le);
348
+ const V = require("@splunk/react-ui/ScreenReaderContent");
349
+ var F = e.n(V);
461
350
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
462
- const ce = require("@splunk/ui-utils/id");
351
+ const J = require("@splunk/ui-utils/id");
463
352
  // CONCATENATED MODULE: ./src/Paginator/PageSelectStyles.ts
464
- var ue = E().span.withConfig({
353
+ var K = P().span.withConfig({
465
354
  displayName: "PageSelectStyles__StyledWrapper",
466
355
  componentId: "haycz4-0"
467
356
  })([ "display:flex;" ]);
468
- var se = E().span.withConfig({
357
+ var U = P().span.withConfig({
469
358
  displayName: "PageSelectStyles__StyledCount",
470
359
  componentId: "haycz4-1"
471
- })([ "align-items:center;display:flex;flex-wrap:wrap;margin:0 ", ";" ], d.variables.spacingSmall);
472
- var pe = E()(oe()).withConfig({
360
+ })([ "align-items:center;display:flex;flex-wrap:wrap;margin:0 ", ";" ], g.variables.spacingSmall);
361
+ var X = P()(Q()).withConfig({
473
362
  displayName: "PageSelectStyles__StyledSelect",
474
363
  componentId: "haycz4-2"
475
364
  })([ "flex:0 0 auto;" ]);
476
365
  // CONCATENATED MODULE: ./src/Paginator/PageSelect.tsx
477
- function fe(e, t) {
366
+ function Y(e, t) {
478
367
  if (e == null) return {};
479
- var n = ve(e, t);
368
+ var n = Z(e, t);
480
369
  var r, a;
481
370
  if (Object.getOwnPropertySymbols) {
482
- var o = Object.getOwnPropertySymbols(e);
483
- for (a = 0; a < o.length; a++) {
484
- r = o[a];
371
+ var l = Object.getOwnPropertySymbols(e);
372
+ for (a = 0; a < l.length; a++) {
373
+ r = l[a];
485
374
  if (t.indexOf(r) >= 0) continue;
486
375
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
487
376
  n[r] = e[r];
@@ -489,61 +378,61 @@
489
378
  }
490
379
  return n;
491
380
  }
492
- function ve(e, t) {
381
+ function Z(e, t) {
493
382
  if (e == null) return {};
494
383
  var n = {};
495
384
  var r = Object.keys(e);
496
- var a, o;
497
- for (o = 0; o < r.length; o++) {
498
- a = r[o];
385
+ var a, l;
386
+ for (l = 0; l < r.length; l++) {
387
+ a = r[l];
499
388
  if (t.indexOf(a) >= 0) continue;
500
389
  n[a] = e[a];
501
390
  }
502
391
  return n;
503
392
  }
504
- /** @public */ var de = {
505
- onChange: o().func,
506
- current: o().number,
507
- totalPages: o().number
393
+ /** @public */ var $ = {
394
+ onChange: l().func,
395
+ current: l().number,
396
+ totalPages: l().number
508
397
  };
509
- function ge(e) {
510
- var t = e.onChange, a = e.current, o = a === void 0 ? 1 : a, l = e.totalPages, i = fe(e, [ "onChange", "current", "totalPages" ]);
398
+ function ee(e) {
399
+ var t = e.onChange, a = e.current, l = a === void 0 ? 1 : a, i = e.totalPages, o = Y(e, [ "onChange", "current", "totalPages" ]);
511
400
  // @docs-props-type PaginatorPageSelectPropsBase
512
- var s = (0, n.useRef)((0, ce.createDOMID)("pages"));
513
- var p = (0, n.useRef)((0, ce.createDOMID)("totalPages"));
401
+ var u = (0, n.useRef)((0, J.createDOMID)("pages"));
402
+ var p = (0, n.useRef)((0, J.createDOMID)("totalPages"));
514
403
  var f = function e(n, r) {
515
404
  var a = r.value;
516
405
  t === null || t === void 0 ? void 0 : t(n, {
517
406
  page: a
518
407
  });
519
408
  };
520
- var v = [];
521
- for (var d = 1; d <= l; d += 1) {
522
- v.push( r().createElement(oe().Option, {
523
- label: "".concat(d),
524
- key: "".concat(d),
525
- value: d
409
+ var d = [];
410
+ for (var g = 1; g <= i; g += 1) {
411
+ d.push( r().createElement(Q().Option, {
412
+ label: "".concat(g),
413
+ key: "".concat(g),
414
+ value: g
526
415
  }));
527
416
  }
528
- var g = (0, c.sprintf)((0, u._)("of %d pages"), l);
417
+ var v = (0, c.sprintf)((0, s._)("of %d pages"), i);
529
418
 
530
- return r().createElement(ue, i, r().createElement(pe, {
531
- value: o,
419
+ return r().createElement(K, o, r().createElement(X, {
420
+ value: l,
532
421
  onChange: f,
533
- "aria-labelledby": "".concat(s.current, " ").concat(p.current)
534
- }, v), r().createElement(ie(), {
535
- id: s.current,
422
+ "aria-labelledby": "".concat(u.current, " ").concat(p.current)
423
+ }, d), r().createElement(F(), {
424
+ id: u.current,
536
425
  "aria-hidden": true
537
- }, o), r().createElement(se, {
426
+ }, l), r().createElement(U, {
538
427
  id: p.current,
539
428
  "aria-hidden": true
540
- }, " ", g));
429
+ }, " ", v));
541
430
  }
542
- ge.propTypes = de;
543
- /* harmony default export */ const me = ge;
431
+ ee.propTypes = $;
432
+ /* harmony default export */ const te = ee;
544
433
  // CONCATENATED MODULE: ./src/Paginator/PageControl.tsx
545
- function ye() {
546
- ye = Object.assign || function(e) {
434
+ function ne() {
435
+ ne = Object.assign || function(e) {
547
436
  for (var t = 1; t < arguments.length; t++) {
548
437
  var n = arguments[t];
549
438
  for (var r in n) {
@@ -554,16 +443,16 @@
554
443
  }
555
444
  return e;
556
445
  };
557
- return ye.apply(this, arguments);
446
+ return ne.apply(this, arguments);
558
447
  }
559
- function be(e, t) {
448
+ function re(e, t) {
560
449
  if (e == null) return {};
561
- var n = he(e, t);
450
+ var n = ae(e, t);
562
451
  var r, a;
563
452
  if (Object.getOwnPropertySymbols) {
564
- var o = Object.getOwnPropertySymbols(e);
565
- for (a = 0; a < o.length; a++) {
566
- r = o[a];
453
+ var l = Object.getOwnPropertySymbols(e);
454
+ for (a = 0; a < l.length; a++) {
455
+ r = l[a];
567
456
  if (t.indexOf(r) >= 0) continue;
568
457
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
569
458
  n[r] = e[r];
@@ -571,26 +460,26 @@
571
460
  }
572
461
  return n;
573
462
  }
574
- function he(e, t) {
463
+ function ae(e, t) {
575
464
  if (e == null) return {};
576
465
  var n = {};
577
466
  var r = Object.keys(e);
578
- var a, o;
579
- for (o = 0; o < r.length; o++) {
580
- a = r[o];
467
+ var a, l;
468
+ for (l = 0; l < r.length; l++) {
469
+ a = r[l];
581
470
  if (t.indexOf(a) >= 0) continue;
582
471
  n[a] = e[a];
583
472
  }
584
473
  return n;
585
474
  }
586
- /** @public */ var Oe = {
587
- elementRef: o().oneOfType([ o().func, o().object ]),
588
- onChange: o().func,
589
- current: o().number,
590
- totalPages: o().number
475
+ /** @public */ var le = {
476
+ elementRef: l().oneOfType([ l().func, l().object ]),
477
+ onChange: l().func,
478
+ current: l().number,
479
+ totalPages: l().number
591
480
  };
592
- function ke(e) {
593
- var t = e.onChange, a = e.current, o = a === void 0 ? 1 : a, l = e.totalPages, i = be(e, [ "onChange", "current", "totalPages" ]);
481
+ function ie(e) {
482
+ var t = e.onChange, a = e.current, l = a === void 0 ? 1 : a, i = e.totalPages, o = re(e, [ "onChange", "current", "totalPages" ]);
594
483
  // @docs-props-type PaginatorPageControlPropsBase
595
484
  var c = (0, n.useCallback)((function(e, n) {
596
485
  var r = n.page;
@@ -601,11 +490,11 @@
601
490
  page: r
602
491
  });
603
492
  }), [ t ]);
604
- var u = (0, n.useCallback)((function(e) {
493
+ var s = (0, n.useCallback)((function(e) {
605
494
  var n = e.current, a = e.totalPages;
606
495
  if (n != null && a != null) {
607
496
 
608
- return r().createElement(me, {
497
+ return r().createElement(te, {
609
498
  current: n,
610
499
  onChange: t,
611
500
  totalPages: a
@@ -614,73 +503,73 @@
614
503
  return null;
615
504
  }), [ t ]);
616
505
 
617
- return r().createElement(re, ye({
618
- current: o,
619
- renderLabel: u,
506
+ return r().createElement(W, ne({
507
+ current: l,
508
+ renderLabel: s,
620
509
  onChange: c,
621
- totalPages: l
622
- }, i));
510
+ totalPages: i
511
+ }, o));
623
512
  }
624
- ke.propTypes = Oe;
625
- /* harmony default export */ const Ce = ke;
513
+ ie.propTypes = le;
514
+ /* harmony default export */ const oe = ie;
626
515
  // CONCATENATED MODULE: external "@splunk/react-icons/DotsThreeHorizontal"
627
- const Pe = require("@splunk/react-icons/DotsThreeHorizontal");
628
- var Se = e.n(Pe);
516
+ const ce = require("@splunk/react-icons/DotsThreeHorizontal");
517
+ var se = e.n(ce);
629
518
  // CONCATENATED MODULE: ./src/Paginator/PageSeparatorStyles.ts
630
- var xe = E().span.withConfig({
519
+ var ue = P().span.withConfig({
631
520
  displayName: "PageSeparatorStyles__StyledEllipsisWrapper",
632
521
  componentId: "j50fqf-0"
633
- })([ "display:flex;align-items:center;margin:", ";color:", ";" ], (0, d.pick)({
522
+ })([ "display:flex;align-items:center;margin:", ";color:", ";" ], (0, g.pick)({
634
523
  enterprise: "0px 11px",
635
524
  prisma: "0px 20px"
636
- }), d.variables.contentColorActive);
525
+ }), g.variables.contentColorActive);
637
526
  // CONCATENATED MODULE: ./src/Paginator/PageSeparator.tsx
638
- function we() {
639
- var e = (0, d.useSplunkTheme)(), t = e.family;
527
+ function pe() {
528
+ var e = (0, g.useSplunkTheme)(), t = e.family;
640
529
  var n = t === "enterprise" ? r().createElement("span", {
641
530
  role: "separator"
642
- }, "…") : r().createElement(Se(), null);
531
+ }, "…") : r().createElement(se(), null);
643
532
 
644
- return r().createElement(xe, {
533
+ return r().createElement(ue, {
645
534
  role: "separator"
646
535
  }, n);
647
536
  }
648
- /* harmony default export */ const _e = we;
537
+ /* harmony default export */ const fe = pe;
649
538
  // CONCATENATED MODULE: ./src/Paginator/PaginatorStyles.ts
650
- var Ee = E()(m).withConfig({
539
+ var de = P()(m).withConfig({
651
540
  displayName: "PaginatorStyles__StyledChevronLeftIcon",
652
541
  componentId: "pmabsp-0"
653
- })([ "margin:", ";" ], (0, d.pick)({
542
+ })([ "margin:", ";" ], (0, g.pick)({
654
543
  enterprise: "-1px 3px 0 0",
655
544
  prisma: "-2px 6px 0 0"
656
545
  }));
657
- var je = E()(C).withConfig({
546
+ var ge = P()(C).withConfig({
658
547
  displayName: "PaginatorStyles__StyledChevronRightIcon",
659
548
  componentId: "pmabsp-1"
660
- })([ "margin:", ";" ], (0, d.pick)({
549
+ })([ "margin:", ";" ], (0, g.pick)({
661
550
  enterprise: "-1px 0 0 3px",
662
551
  prisma: "-2px 0 0 6px"
663
552
  }));
664
- var Ne = E().div.withConfig({
553
+ var ve = P().div.withConfig({
665
554
  displayName: "PaginatorStyles__StyledPrevNext",
666
555
  componentId: "pmabsp-2"
667
- })([ "padding:", ";white-space:nowrap;" ], (0, d.pick)({
556
+ })([ "padding:", ";white-space:nowrap;" ], (0, g.pick)({
668
557
  enterprise: "0 3px",
669
558
  prisma: "0 8px"
670
559
  }));
671
- var Te = E()(K).withConfig({
560
+ var me = P()(q).withConfig({
672
561
  displayName: "PaginatorStyles__StyledPaginatorButton",
673
562
  componentId: "pmabsp-3"
674
563
  })([ "&:not([disabled]){", ",", "{", "}}" ],
675
564
  /* sc-sel */
676
- Ee,
565
+ de,
677
566
  /* sc-sel */
678
- je, (0, d.pick)({
679
- prisma: (0, _.css)([ "color:", ";" ], d.variables.contentColorMuted)
567
+ ge, (0, g.pick)({
568
+ prisma: (0, x.css)([ "color:", ";" ], g.variables.contentColorMuted)
680
569
  }));
681
570
  // CONCATENATED MODULE: ./src/Paginator/Paginator.tsx
682
- function qe() {
683
- qe = Object.assign || function(e) {
571
+ function ye() {
572
+ ye = Object.assign || function(e) {
684
573
  for (var t = 1; t < arguments.length; t++) {
685
574
  var n = arguments[t];
686
575
  for (var r in n) {
@@ -691,16 +580,16 @@
691
580
  }
692
581
  return e;
693
582
  };
694
- return qe.apply(this, arguments);
583
+ return ye.apply(this, arguments);
695
584
  }
696
- function Ie(e, t) {
585
+ function be(e, t) {
697
586
  if (e == null) return {};
698
- var n = Le(e, t);
587
+ var n = he(e, t);
699
588
  var r, a;
700
589
  if (Object.getOwnPropertySymbols) {
701
- var o = Object.getOwnPropertySymbols(e);
702
- for (a = 0; a < o.length; a++) {
703
- r = o[a];
590
+ var l = Object.getOwnPropertySymbols(e);
591
+ for (a = 0; a < l.length; a++) {
592
+ r = l[a];
704
593
  if (t.indexOf(r) >= 0) continue;
705
594
  if (!Object.prototype.propertyIsEnumerable.call(e, r)) continue;
706
595
  n[r] = e[r];
@@ -708,30 +597,30 @@
708
597
  }
709
598
  return n;
710
599
  }
711
- function Le(e, t) {
600
+ function he(e, t) {
712
601
  if (e == null) return {};
713
602
  var n = {};
714
603
  var r = Object.keys(e);
715
- var a, o;
716
- for (o = 0; o < r.length; o++) {
717
- a = r[o];
604
+ var a, l;
605
+ for (l = 0; l < r.length; l++) {
606
+ a = r[l];
718
607
  if (t.indexOf(a) >= 0) continue;
719
608
  n[a] = e[a];
720
609
  }
721
610
  return n;
722
611
  }
723
- var Re = {
724
- alwaysShowLastPageLink: o().bool,
725
- current: o().number,
726
- elementRef: o().oneOfType([ o().func, o().object ]),
727
- numPageLinks: o().number,
728
- onChange: o().func,
729
- totalPages: o().number
612
+ var Oe = {
613
+ alwaysShowLastPageLink: l().bool,
614
+ current: l().number,
615
+ elementRef: l().oneOfType([ l().func, l().object ]),
616
+ numPageLinks: l().number,
617
+ onChange: l().func,
618
+ totalPages: l().number
730
619
  };
731
- function Me(e) {
732
- var t = e.onChange, a = e.current, o = a === void 0 ? 1 : a, l = e.alwaysShowLastPageLink, s = l === void 0 ? false : l, p = e.numPageLinks, f = p === void 0 ? 5 : p, v = e.totalPages, d = Ie(e, [ "onChange", "current", "alwaysShowLastPageLink", "numPageLinks", "totalPages" ]);
620
+ function ke(e) {
621
+ var t = e.onChange, a = e.current, l = a === void 0 ? 1 : a, i = e.alwaysShowLastPageLink, u = i === void 0 ? false : i, p = e.numPageLinks, f = p === void 0 ? 5 : p, d = e.totalPages, g = be(e, [ "onChange", "current", "alwaysShowLastPageLink", "numPageLinks", "totalPages" ]);
733
622
  // @docs-props-type PaginatorPropsBase
734
- var g = (0, n.useCallback)((function(e, n) {
623
+ var v = (0, n.useCallback)((function(e, n) {
735
624
  var r = n.page;
736
625
  // page will always be defined because we're passing "page" to PaginatorButton
737
626
  // getting TypeScript to understand this seems more trouble than it's worth
@@ -741,99 +630,99 @@
741
630
  });
742
631
  }), [ t ]);
743
632
  // Can't show more links than total number of pages.
744
- var m = Math.min(f, v);
633
+ var m = Math.min(f, d);
745
634
  var y = Math.ceil(m / 2);
746
- var b = Math.ceil(v - m / 2);
635
+ var b = Math.ceil(d - m / 2);
747
636
  var h = [];
748
- if (v <= 1) {
637
+ if (d <= 1) {
749
638
  return null;
750
639
  }
751
- if ((o > v || o < 1) && process.env.NODE_ENV !== "production") {}
640
+ if ((l > d || l < 1) && process.env.NODE_ENV !== "production") {}
752
641
  var O;
753
642
  var k;
754
- if (o <= y + 1) {
643
+ if (l <= y + 1) {
755
644
  // + 1 to avoid ellipsis between 1 and 2
756
645
  O = 1;
757
- k = O + Math.min(v, m) - 1;
758
- } else if (o > y && o < b) {
759
- k = Math.ceil(o + (m - 2) / 2);
646
+ k = O + Math.min(d, m) - 1;
647
+ } else if (l > y && l < b) {
648
+ k = Math.ceil(l + (m - 2) / 2);
760
649
  O = k - m + 2;
761
650
  } else {
762
651
  // include page #1 to avoid ellipsis between 1 and 2
763
- O = v - m === 1 ? 1 : v - m + 1;
764
- k = v;
652
+ O = d - m === 1 ? 1 : d - m + 1;
653
+ k = d;
765
654
  }
766
655
  // bump up the last page to avoid ellipsis
767
- k = s && k + 1 === v ? v : k;
768
- h.push( r().createElement(Te, {
656
+ k = u && k + 1 === d ? d : k;
657
+ h.push( r().createElement(me, {
769
658
  "data-test": "prev",
770
- disabled: o === 1,
771
- onClick: g,
772
- page: o - 1,
659
+ disabled: l === 1,
660
+ onClick: v,
661
+ page: l - 1,
773
662
  key: "prev",
774
- "aria-label": (0, u._)("Go to previous page")
775
- }, r().createElement(Ne, null, r().createElement(Ee, null), (0, u._)("Prev"))));
776
- if (o > y && v > m && O !== 1) {
777
- h.push( r().createElement(Te, {
663
+ "aria-label": (0, s._)("Go to previous page")
664
+ }, r().createElement(ve, null, r().createElement(de, null), (0, s._)("Prev"))));
665
+ if (l > y && d > m && O !== 1) {
666
+ h.push( r().createElement(me, {
778
667
  key: "first",
779
- onClick: g,
668
+ onClick: v,
780
669
  page: 1,
781
- "aria-label": (0, u._)("Go to first page")
670
+ "aria-label": (0, s._)("Go to first page")
782
671
  }, "1"));
783
- h.push( r().createElement(_e, {
672
+ h.push( r().createElement(fe, {
784
673
  "data-test": "page",
785
674
  key: "prevEllipsis"
786
675
  }));
787
676
  }
788
677
  for (var C = O; C <= k; C += 1) {
789
- var P = C === o;
790
- h.push( r().createElement(Te, {
791
- selected: P,
792
- onClick: g,
678
+ var x = C === l;
679
+ h.push( r().createElement(me, {
680
+ selected: x,
681
+ onClick: v,
793
682
  page: C,
794
683
  key: C,
795
- "aria-label": P ? (0, u._)("Current page") : (0, c.sprintf)((0, u._)("Go to page %(pageNumber)d"), {
684
+ "aria-label": x ? (0, s._)("Current page") : (0, c.sprintf)((0, s._)("Go to page %(pageNumber)d"), {
796
685
  pageNumber: C
797
686
  })
798
687
  }, String(C)));
799
688
  }
800
- if (o <= b && v > m && k !== v) {
801
- h.push( r().createElement(_e, {
689
+ if (l <= b && d > m && k !== d) {
690
+ h.push( r().createElement(fe, {
802
691
  "data-test": "page",
803
692
  key: "nextEllipsis"
804
693
  }));
805
- if (s) {
806
- h.push( r().createElement(Te, {
694
+ if (u) {
695
+ h.push( r().createElement(me, {
807
696
  "data-test": "last",
808
697
  key: "last",
809
- onClick: g,
810
- page: v,
811
- "aria-label": (0, u._)("Go to last page")
812
- }, String(v)));
698
+ onClick: v,
699
+ page: d,
700
+ "aria-label": (0, s._)("Go to last page")
701
+ }, String(d)));
813
702
  }
814
703
  }
815
- h.push( r().createElement(Te, {
704
+ h.push( r().createElement(me, {
816
705
  "data-test": "next",
817
- disabled: o === v,
818
- onClick: g,
819
- page: o + 1,
706
+ disabled: l === d,
707
+ onClick: v,
708
+ page: l + 1,
820
709
  key: "next",
821
- "aria-label": (0, u._)("Go to next page")
822
- }, r().createElement(Ne, null, (0, u._)("Next"), r().createElement(je, null))));
710
+ "aria-label": (0, s._)("Go to next page")
711
+ }, r().createElement(ve, null, (0, s._)("Next"), r().createElement(ge, null))));
823
712
 
824
- return r().createElement(i(), qe({
825
- "aria-label": (0, u._)("Pagination"),
713
+ return r().createElement(o(), ye({
714
+ "aria-label": (0, s._)("Pagination"),
826
715
  "data-test": "paginator",
827
- "data-test-current": o,
716
+ "data-test-current": l,
828
717
  flex: true,
829
718
  inline: true,
830
719
  tag: "nav"
831
- }, d), h);
720
+ }, g), h);
832
721
  }
833
- Me.Compact = re;
834
- Me.PageControl = Ce;
835
- Me.propTypes = Re;
836
- /* harmony default export */ const De = Me;
722
+ ke.Compact = W;
723
+ ke.PageControl = oe;
724
+ ke.propTypes = Oe;
725
+ /* harmony default export */ const Ce = ke;
837
726
  // CONCATENATED MODULE: ./src/Paginator/index.ts
838
727
  module.exports = t;
839
728
  /******/})();