@splunk/react-ui 5.0.0-rc.1 → 5.0.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/Date.js CHANGED
@@ -61,8 +61,8 @@
61
61
  e.r(n);
62
62
  // EXPORTS
63
63
  e.d(n, {
64
- default: () => /* reexport */ Y,
65
- validateValue: () => /* reexport */ K
64
+ default: () => /* reexport */ V,
65
+ validateValue: () => /* reexport */ F
66
66
  });
67
67
  // CONCATENATED MODULE: external "react"
68
68
  const t = require("react");
@@ -87,23 +87,21 @@
87
87
  var y = e.n(p);
88
88
  // CONCATENATED MODULE: external "@splunk/ui-utils/id"
89
89
  const m = require("@splunk/ui-utils/id");
90
- // CONCATENATED MODULE: external "@splunk/ui-utils/keyboard"
91
- const b = require("@splunk/ui-utils/keyboard");
92
90
  // CONCATENATED MODULE: external "styled-components"
93
- const g = require("styled-components");
94
- var h = e.n(g);
91
+ const b = require("styled-components");
92
+ var g = e.n(b);
95
93
  // CONCATENATED MODULE: external "@splunk/react-icons/Calendar"
96
- const C = require("@splunk/react-icons/Calendar");
97
- var k = e.n(C);
94
+ const h = require("@splunk/react-icons/Calendar");
95
+ var C = e.n(h);
98
96
  // CONCATENATED MODULE: external "@splunk/react-ui/Text"
99
- const S = require("@splunk/react-ui/Text");
100
- var O = e.n(S);
97
+ const k = require("@splunk/react-ui/Text");
98
+ var S = e.n(k);
101
99
  // CONCATENATED MODULE: ./src/Date/DateStyles.ts
102
- var w = h()(O()).withConfig({
100
+ var O = g()(S()).withConfig({
103
101
  displayName: "DateStyles__StyledText",
104
102
  componentId: "kacgdc-0"
105
103
  })([ "&[data-inline]{width:160px;}" ]);
106
- var D = h()(k()).withConfig({
104
+ var w = g()(C()).withConfig({
107
105
  displayName: "DateStyles__StyledCalendarIcon",
108
106
  componentId: "kacgdc-1"
109
107
  })([ "transform:translateY(1px);" ]);
@@ -114,7 +112,7 @@
114
112
  * @param ref - The React callback or object ref. Can be `null` or `undefined`.
115
113
  * @param current - The new value of the ref.
116
114
  */
117
- function j(e, n) {
115
+ function D(e, n) {
118
116
  if (e) {
119
117
  if (typeof e === "function") {
120
118
  e(n);
@@ -127,8 +125,8 @@
127
125
  }
128
126
  }
129
127
  // CONCATENATED MODULE: ./src/Date/Date.tsx
130
- function q() {
131
- return q = Object.assign ? Object.assign.bind() : function(e) {
128
+ function j() {
129
+ return j = Object.assign ? Object.assign.bind() : function(e) {
132
130
  for (var n = 1; n < arguments.length; n++) {
133
131
  var t = arguments[n];
134
132
  for (var r in t) {
@@ -136,29 +134,29 @@
136
134
  }
137
135
  }
138
136
  return e;
139
- }, q.apply(null, arguments);
137
+ }, j.apply(null, arguments);
140
138
  }
141
139
  function I(e, n) {
142
- return P(e) || M(e, n) || T(e, n) || x();
140
+ return E(e) || A(e, n) || T(e, n) || q();
143
141
  }
144
- function x() {
142
+ function q() {
145
143
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
146
144
  }
147
145
  function T(e, n) {
148
146
  if (e) {
149
- if ("string" == typeof e) return A(e, n);
147
+ if ("string" == typeof e) return x(e, n);
150
148
  var t = {}.toString.call(e).slice(8, -1);
151
- return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? A(e, n) : void 0;
149
+ return "Object" === t && e.constructor && (t = e.constructor.name), "Map" === t || "Set" === t ? Array.from(e) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? x(e, n) : void 0;
152
150
  }
153
151
  }
154
- function A(e, n) {
152
+ function x(e, n) {
155
153
  (null == n || n > e.length) && (n = e.length);
156
154
  for (var t = 0, r = Array(n); t < n; t++) {
157
155
  r[t] = e[t];
158
156
  }
159
157
  return r;
160
158
  }
161
- function M(e, n) {
159
+ function A(e, n) {
162
160
  var t = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
163
161
  if (null != t) {
164
162
  var r, a, o, l, u = [], i = !0, c = !1;
@@ -180,12 +178,12 @@
180
178
  return u;
181
179
  }
182
180
  }
183
- function P(e) {
181
+ function E(e) {
184
182
  if (Array.isArray(e)) return e;
185
183
  }
186
- function E(e, n) {
184
+ function M(e, n) {
187
185
  if (null == e) return {};
188
- var t, r, a = _(e, n);
186
+ var t, r, a = P(e, n);
189
187
  if (Object.getOwnPropertySymbols) {
190
188
  var o = Object.getOwnPropertySymbols(e);
191
189
  for (r = 0; r < o.length; r++) {
@@ -194,7 +192,7 @@
194
192
  }
195
193
  return a;
196
194
  }
197
- function _(e, n) {
195
+ function P(e, n) {
198
196
  if (null == e) return {};
199
197
  var t = {};
200
198
  for (var r in e) {
@@ -207,7 +205,7 @@
207
205
  }
208
206
  /** @public */
209
207
  /** @public */
210
- /** @public */ var R = {
208
+ /** @public */ var _ = {
211
209
  defaultValue: o().string,
212
210
  describedBy: o().string,
213
211
  disabled: o().bool,
@@ -237,195 +235,195 @@
237
235
  * @name momentFormat
238
236
  * @memberOf Date
239
237
  * @type string
240
- */ var F = "YYYY-MM-DD";
241
- var K = function e(n) {
238
+ */ var R = "YYYY-MM-DD";
239
+ var F = function e(n) {
242
240
  if (n === "") {
243
241
  return;
244
242
  }
245
- if (!c()(n, F).isValid()) {
243
+ if (!c()(n, R).isValid()) {
246
244
  // eslint-disable-next-line no-console
247
245
  console.error('Invalid date string value "'.concat(n, '" provided to Moment.'));
248
246
  }
249
247
  };
250
- function V(e) {
251
- var n = e.defaultValue, a = e.disabled, o = e.elementRef, l = e.highlightToday, i = e.inline, d = i === void 0 ? true : i, p = e.inputOnly, g = e.locale, h = g === void 0 ? "en_US" : g, C = e.name, k = e.onChange, S = e.onClick, O = e.onFocus, x = e.onKeyDown, T = e.value, A = E(e, [ "defaultValue", "disabled", "elementRef", "highlightToday", "inline", "inputOnly", "locale", "name", "onChange", "onClick", "onFocus", "onKeyDown", "value" ]);
248
+ function K(e) {
249
+ var n = e.defaultValue, a = e.disabled, o = e.elementRef, l = e.highlightToday, i = e.inline, d = i === void 0 ? true : i, p = e.inputOnly, b = e.locale, g = b === void 0 ? "en_US" : b, h = e.name, C = e.onChange, k = e.onClick, S = e.onFocus, q = e.onKeyDown, T = e.value, x = M(e, [ "defaultValue", "disabled", "elementRef", "highlightToday", "inline", "inputOnly", "locale", "name", "onChange", "onClick", "onFocus", "onKeyDown", "value" ]);
252
250
  // @docs-props-type DatePropsBase
253
- var M = y()({
251
+ var A = y()({
254
252
  componentName: "Date",
255
253
  /* eslint-disable-next-line prefer-rest-params */
256
254
  componentProps: arguments[0]
257
255
  });
258
- var P = (0, t.useState)(null), _ = I(P, 2), R = _[0], K = _[1];
259
- var Y = (0, t.useState)(false), B = I(Y, 2), N = B[0], U = B[1];
260
- var z = (0, t.useState)(), $ = I(z, 2), G = $[0], H = $[1];
261
- var J = (0, t.useState)((function() {
256
+ var E = (0, t.useState)(null), P = I(E, 2), _ = P[0], F = P[1];
257
+ var V = (0, t.useState)(false), Y = I(V, 2), B = Y[0], N = Y[1];
258
+ var U = (0, t.useState)(), z = I(U, 2), $ = z[0], G = z[1];
259
+ var H = (0, t.useState)((function() {
262
260
  if (typeof n === "string") {
263
261
  return n;
264
262
  }
265
- return c()().locale(h).format(F);
266
- })), L = I(J, 2), Q = L[0], W = L[1];
267
- var X = (0, t.useState)(null), Z = I(X, 2), ee = Z[0], ne = Z[1];
268
- var te = (0, t.useState)(null), re = I(te, 2), ae = re[0], oe = re[1];
269
- var le = (0, t.useRef)(false);
270
- var ue = (0, m.createDOMID)("calendar");
271
- var ie = (0, t.useMemo)((function() {
272
- return M ? T : Q;
273
- }), [ M, T, Q ]);
263
+ return c()().locale(g).format(R);
264
+ })), J = I(H, 2), L = J[0], Q = J[1];
265
+ var W = (0, t.useState)(null), X = I(W, 2), Z = X[0], ee = X[1];
266
+ var ne = (0, t.useState)(null), te = I(ne, 2), re = te[0], ae = te[1];
267
+ var oe = (0, t.useRef)(false);
268
+ var le = (0, m.createDOMID)("calendar");
269
+ var ue = (0, t.useMemo)((function() {
270
+ return A ? T : L;
271
+ }), [ A, T, L ]);
274
272
  (0, t.useEffect)((function() {
275
273
  if (false) {}
276
- }), [ ie ]);
274
+ }), [ ue ]);
277
275
  (0, t.useEffect)((function() {
278
276
  /**
279
277
  * If `openWithFocus` and `calendarOpen` are set the user is attempting to navigate to the dropdown, but it's closed.
280
278
  * On the first update following the state change set focus to the active day within the calendar.
281
279
  */
282
- if (le.current && N) {
283
- le.current = false;
284
- (0, f.focusActiveDay)(ee);
280
+ if (oe.current && B) {
281
+ oe.current = false;
282
+ (0, f.focusActiveDay)(Z);
285
283
  }
286
- }), [ ee, N ]);
287
- var ce = (0, t.useMemo)((function() {
288
- if (G === undefined) {
289
- if (ie === undefined || ie === "") {
284
+ }), [ Z, B ]);
285
+ var ie = (0, t.useMemo)((function() {
286
+ if ($ === undefined) {
287
+ if (ue === undefined || ue === "") {
290
288
  return "";
291
289
  }
292
- return c()(ie, F, h).format("l");
290
+ return c()(ue, R, g).format("l");
293
291
  }
294
- return G;
295
- }), [ ie, h, G ]);
296
- var fe = (0, t.useCallback)((function(e, n, t) {
292
+ return $;
293
+ }), [ ue, g, $ ]);
294
+ var ce = (0, t.useCallback)((function(e, n, t) {
297
295
  var r = n.value;
298
296
  if (t !== "textInput") {
299
- ae === null || ae === void 0 ? void 0 : ae.focus();
297
+ re === null || re === void 0 ? void 0 : re.focus();
300
298
  }
301
- if (ie !== r) {
302
- U(false);
303
- H(undefined);
304
- W(M ? undefined : r);
305
- k === null || k === void 0 ? void 0 : k(e, {
299
+ if (ue !== r) {
300
+ N(false);
301
+ G(undefined);
302
+ Q(A ? undefined : r);
303
+ C === null || C === void 0 ? void 0 : C(e, {
306
304
  value: r,
307
- name: C
305
+ name: h
308
306
  });
309
307
  } else {
310
- U(false);
308
+ N(false);
311
309
  }
312
- }), [ ie, ae, M, C, k ]);
313
- var se = (0, t.useCallback)((function(e) {
314
- var n = c()(G, "l", h);
315
- if (G === "") {
316
- fe(e, {
310
+ }), [ ue, re, A, h, C ]);
311
+ var fe = (0, t.useCallback)((function(e) {
312
+ var n = c()($, "l", g);
313
+ if ($ === "") {
314
+ ce(e, {
317
315
  value: ""
318
316
  }, "textInput");
319
317
  } else if (n.isValid()) {
320
- fe(e, {
321
- value: n.format(V.momentFormat)
318
+ ce(e, {
319
+ value: n.format(K.momentFormat)
322
320
  }, "textInput");
323
321
  } else {
324
- U(false);
325
- H(undefined);
322
+ N(false);
323
+ G(undefined);
326
324
  }
327
- }), [ fe, h, G ]);
328
- var de = (0, t.useCallback)((function(e, n) {
325
+ }), [ ce, g, $ ]);
326
+ var se = (0, t.useCallback)((function(e, n) {
329
327
  if (!p) {
330
- U(true);
328
+ N(true);
331
329
  }
332
- O === null || O === void 0 ? void 0 : O(e, n);
333
- }), [ p, O ]);
334
- var ve = (0, t.useCallback)((function(e) {
335
- if (!p && !N) {
336
- U(true);
330
+ S === null || S === void 0 ? void 0 : S(e, n);
331
+ }), [ p, S ]);
332
+ var de = (0, t.useCallback)((function(e) {
333
+ if (!p && !B) {
334
+ N(true);
337
335
  }
338
- S === null || S === void 0 ? void 0 : S(e);
339
- }), [ N, p, S ]);
340
- var pe = (0, t.useCallback)((function(e, n) {
336
+ k === null || k === void 0 ? void 0 : k(e);
337
+ }), [ B, p, k ]);
338
+ var ve = (0, t.useCallback)((function(e, n) {
341
339
  var t = n.value;
342
- H(t);
343
- U(!p);
340
+ G(t);
341
+ N(!p);
344
342
  }), [ p ]);
345
- var ye = (0, t.useCallback)((function(e) {
346
- var n = (0, b.keycode)(e.nativeEvent);
347
- if (n === "enter" || n === "tab") {
348
- se(e);
349
- } else if (!p && n === "down") {
343
+ var pe = (0, t.useCallback)((function(e) {
344
+ var n = e.key;
345
+ if (n === "Enter" || n === "Tab") {
346
+ fe(e);
347
+ } else if (!p && n === "ArrowDown") {
350
348
  e.preventDefault();
351
- if (!N) {
352
- le.current = true;
353
- U(true);
354
- } else if (ee) {
355
- (0, f.focusActiveDay)(ee);
349
+ if (!B) {
350
+ oe.current = true;
351
+ N(true);
352
+ } else if (Z) {
353
+ (0, f.focusActiveDay)(Z);
356
354
  }
357
- } else if (n === "esc") {
358
- U(false);
359
- H(undefined);
360
- ae === null || ae === void 0 ? void 0 : ae.focus();
355
+ } else if (n === "Escape") {
356
+ N(false);
357
+ G(undefined);
358
+ re === null || re === void 0 ? void 0 : re.focus();
361
359
  }
362
- x === null || x === void 0 ? void 0 : x(e);
363
- }), [ se, ee, N, ae, p, x ]);
364
- var me = (0, t.useCallback)((function(e) {
365
- K(e);
366
- j(o, e);
360
+ q === null || q === void 0 ? void 0 : q(e);
361
+ }), [ fe, Z, B, re, p, q ]);
362
+ var ye = (0, t.useCallback)((function(e) {
363
+ F(e);
364
+ D(o, e);
367
365
  }), [ o ]);
366
+ var me = (0, t.useCallback)((function(e) {
367
+ ae(e);
368
+ }), []);
368
369
  var be = (0, t.useCallback)((function(e) {
369
- oe(e);
370
+ ee(e);
370
371
  }), []);
371
372
  var ge = (0, t.useCallback)((function(e) {
372
- ne(e);
373
- }), []);
374
- var he = (0, t.useCallback)((function(e) {
375
373
  var n = e.event, t = e.reason;
376
- if ((t === "clickAway" || t === "escapeKey") && n !== undefined && n.target !== R) {
377
- se(n);
374
+ if ((t === "clickAway" || t === "escapeKey") && n !== undefined && n.target !== _) {
375
+ fe(n);
378
376
  if (t === "escapeKey") {
379
- ae === null || ae === void 0 ? void 0 : ae.focus();
377
+ re === null || re === void 0 ? void 0 : re.focus();
380
378
  }
381
379
  }
382
- }), [ R, ae, se ]);
383
- var Ce = !p && r().createElement(D, null);
384
- var ke;
385
- var Se = {};
380
+ }), [ _, re, fe ]);
381
+ var he = !p && r().createElement(w, null);
382
+ var Ce;
383
+ var ke = {};
386
384
  if (!p) {
387
- Se.role = "combobox";
388
- Se["aria-controls"] = N ? ue : undefined;
389
- Se["aria-expanded"] = a ? false : N;
390
- Se["aria-haspopup"] = true;
391
- ke = r().createElement(v(), {
392
- anchor: R,
393
- id: ue,
394
- open: a ? false : N,
395
- onRequestClose: he
385
+ ke.role = "combobox";
386
+ ke["aria-controls"] = B ? le : undefined;
387
+ ke["aria-expanded"] = a ? false : B;
388
+ ke["aria-haspopup"] = true;
389
+ Ce = r().createElement(v(), {
390
+ anchor: _,
391
+ id: le,
392
+ open: a ? false : B,
393
+ onRequestClose: ge
396
394
  }, r().createElement(s(), {
397
- elementRef: ge,
395
+ elementRef: be,
398
396
  highlightToday: l,
399
- locale: h,
400
- onChange: fe,
401
- value: ie === "" ? undefined : ie
397
+ locale: g,
398
+ onChange: ce,
399
+ value: ue === "" ? undefined : ue
402
400
  }));
403
401
  }
404
402
 
405
- return r().createElement(w, q({
403
+ return r().createElement(O, j({
406
404
  autoCapitalize: "off",
407
405
  autoComplete: "off",
408
406
  autoCorrect: "off",
409
407
  spellCheck: false,
410
408
  "data-test": "date",
411
- "data-test-value": ie,
412
- "data-test-popover-id": ue,
409
+ "data-test-value": ue,
410
+ "data-test-popover-id": le,
413
411
  disabled: a,
414
- elementRef: me,
412
+ elementRef: ye,
415
413
  inline: d,
416
- inputRef: be,
417
- name: C,
418
- onChange: pe,
419
- onClick: ve,
420
- onFocus: de,
421
- onKeyDown: ye,
422
- value: ce,
423
- startAdornment: Ce
424
- }, Se, u()(A, "multiline", "onSelect", "spellCheck")), ke);
414
+ inputRef: me,
415
+ name: h,
416
+ onChange: ve,
417
+ onClick: de,
418
+ onFocus: se,
419
+ onKeyDown: pe,
420
+ value: ie,
421
+ startAdornment: he
422
+ }, ke, u()(x, "multiline", "onSelect", "spellCheck")), Ce);
425
423
  }
426
- V.propTypes = R;
427
- V.momentFormat = F;
428
- /* harmony default export */ const Y = V;
424
+ K.propTypes = _;
425
+ K.momentFormat = R;
426
+ /* harmony default export */ const V = K;
429
427
  // only for styled components using Date
430
428
  // CONCATENATED MODULE: ./src/Date/index.ts
431
429
  module.exports = n;
package/Dropdown.js CHANGED
@@ -61,7 +61,7 @@
61
61
  e.r(o);
62
62
  // EXPORTS
63
63
  e.d(o, {
64
- default: () => /* reexport */ O
64
+ default: () => /* reexport */ w
65
65
  });
66
66
  // CONCATENATED MODULE: external "react"
67
67
  const n = require("react");
@@ -148,16 +148,18 @@
148
148
  /** @public */
149
149
  /** @public */
150
150
  /** @public */
151
- /** @public */ var m = [ "clickAway", "contentClick", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
152
- var C = [ "contentClick", "escapeKey", "tabKey", "toggleClick" ];
153
- var k = {
151
+ /** @public */
152
+ /** @public */ var m = [ "toggleClick", "toggleKeydown" ];
153
+ var C = [ "clickAway", "contentClick", "escapeKey", "offScreen", "tabKey", "toggleClick" ];
154
+ var k = [ "contentClick", "escapeKey", "tabKey", "toggleClick" ];
155
+ var h = {
154
156
  align: a().oneOf([ "center", "edge", "end" ]),
155
157
  canCoverAnchor: a().bool,
156
158
  children: a().oneOfType([ a().node, a().func ]),
157
- closeReasons: a().arrayOf(a().oneOf(m)),
159
+ closeReasons: a().arrayOf(a().oneOf(C)),
158
160
  defaultPlacement: a().oneOf([ "above", "below", "left", "right", "vertical", "horizontal" ]),
159
161
  elementRef: a().oneOfType([ a().func, a().object ]),
160
- focusToggleReasons: a().arrayOf(a().oneOf(m)),
162
+ focusToggleReasons: a().arrayOf(a().oneOf(C)),
161
163
  inputId: a().string,
162
164
  onRequestClose: a().func,
163
165
  onRequestOpen: a().func,
@@ -168,8 +170,8 @@
168
170
  takeFocus: a().bool,
169
171
  toggle: a().element.isRequired
170
172
  };
171
- function h(e) {
172
- var o = e["aria-labelledby"], t = e.align, a = t === void 0 ? "center" : t, l = e.canCoverAnchor, u = l === void 0 ? true : l, p = e.children, v = e.closeReasons, y = v === void 0 ? m : v, g = e.defaultPlacement, b = g === void 0 ? "below" : g, k = e.elementRef, h = e.focusToggleReasons, O = h === void 0 ? C : h, w = e.inputId, S = e.open, A = e.openWithArrowKeys, R = e.onRequestClose, q = e.onRequestOpen, I = e.repositionMode, P = I === void 0 ? "flip" : I, j = e.retainFocus, D = j === void 0 ? false : j, K = e.takeFocus, M = K === void 0 ? true : K, T = e.toggle;
173
+ function O(e) {
174
+ var o = e["aria-labelledby"], t = e.align, a = t === void 0 ? "center" : t, l = e.canCoverAnchor, u = l === void 0 ? true : l, p = e.children, v = e.closeReasons, y = v === void 0 ? C : v, g = e.defaultPlacement, b = g === void 0 ? "below" : g, m = e.elementRef, h = e.focusToggleReasons, O = h === void 0 ? k : h, w = e.inputId, R = e.open, S = e.openWithArrowKeys, A = e.onRequestClose, I = e.onRequestOpen, q = e.repositionMode, P = q === void 0 ? "flip" : q, K = e.retainFocus, j = K === void 0 ? false : K, D = e.takeFocus, M = D === void 0 ? true : D, T = e.toggle;
173
175
  // @docs-props-type DropdownPropsBase
174
176
  var F = (0, n.useState)(null), E = d(F, 2), N = E[0], _ = E[1];
175
177
  var x = (0, n.useState)(false), W = d(x, 2), U = W[0], z = W[1];
@@ -182,7 +184,7 @@
182
184
  defaultValuePropName: "defaultOpen",
183
185
  valuePropName: "open"
184
186
  });
185
- var B = $ ? S : U;
187
+ var B = $ ? R : U;
186
188
  var G = (0, n.useState)((function() {
187
189
  return {
188
190
  popoverId: (0, s.createDOMID)("popover"),
@@ -199,20 +201,20 @@
199
201
  var Z = (0, n.useCallback)((function(e) {
200
202
  var o, n;
201
203
  (o = (n = T.props).onKeyDown) === null || o === void 0 ? void 0 : o.call(n, e);
202
- if (!A) {
204
+ if (!S) {
203
205
  return;
204
206
  }
205
207
  var r = e.key;
206
208
  if (r === "ArrowUp" || r === "ArrowDown") {
207
209
  e.preventDefault();
208
- q === null || q === void 0 ? void 0 : q(e, {
210
+ I === null || I === void 0 ? void 0 : I(e, {
209
211
  reason: "toggleKeydown"
210
212
  });
211
213
  if (!$) {
212
214
  z(true);
213
215
  }
214
216
  }
215
- }), [ $, A, q, T ]);
217
+ }), [ $, S, I, T ]);
216
218
  var ee = (0, n.useCallback)((function(e) {
217
219
  var o = e.event, n = e.reason;
218
220
  if (o && n === "clickAway") {
@@ -233,9 +235,9 @@
233
235
  if (!$) {
234
236
  z(false);
235
237
  }
236
- R === null || R === void 0 ? void 0 : R(e);
238
+ A === null || A === void 0 ? void 0 : A(e);
237
239
  }
238
- }), [ y, O, $, B, R, X ]);
240
+ }), [ y, O, $, B, A, X ]);
239
241
  var oe = (0, n.useCallback)((function(e) {
240
242
  ee({
241
243
  reason: "contentClick",
@@ -251,14 +253,14 @@
251
253
  event: e
252
254
  });
253
255
  } else {
254
- q === null || q === void 0 ? void 0 : q(e, {
256
+ I === null || I === void 0 ? void 0 : I(e, {
255
257
  reason: "toggleClick"
256
258
  });
257
259
  if (!$) {
258
260
  z(true);
259
261
  }
260
262
  }
261
- }), [ ee, $, B, q, T ]);
263
+ }), [ ee, $, B, I, T ]);
262
264
  var re = (0, n.cloneElement)(T, {
263
265
  onClick: ne,
264
266
  onKeyDown: Z,
@@ -277,18 +279,18 @@
277
279
  autoCloseWhenOffScreen: y.includes("offScreen"),
278
280
  anchor: N,
279
281
  canCoverAnchor: u,
280
- elementRef: k,
281
- retainFocus: D,
282
+ elementRef: m,
283
+ retainFocus: j,
282
284
  defaultPlacement: b,
283
285
  onRequestClose: ee,
284
286
  repositionMode: P,
285
287
  id: L,
286
288
  "aria-labelledby": "".concat(o !== null && o !== void 0 ? o : "", " ").concat(X).trim(),
287
- takeFocus: M
288
- }, typeof p === "function" ?
289
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
290
- function() {
289
+ takeFocus: M,
290
+ toggleId: X
291
+ }, typeof p === "function" ? function() {
291
292
 
293
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
292
294
  return r().createElement("div", {
293
295
  onClick: oe
294
296
  }, p.apply(void 0, arguments));
@@ -299,9 +301,10 @@
299
301
  onClick: oe
300
302
  }, p)));
301
303
  }
302
- h.propTypes = k;
303
- h.possibleCloseReasons = m;
304
- /* harmony default export */ const O = h;
304
+ O.propTypes = h;
305
+ O.possibleOpenReasons = m;
306
+ O.possibleCloseReasons = C;
307
+ /* harmony default export */ const w = O;
305
308
  // CONCATENATED MODULE: ./src/Dropdown/index.ts
306
309
  module.exports = o;
307
310
  /******/})();