@splunk/react-ui 4.36.0 → 4.38.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.
Files changed (39) hide show
  1. package/Button.js +139 -132
  2. package/CHANGELOG.md +32 -0
  3. package/Color.js +1145 -977
  4. package/ComboBox.js +1 -2
  5. package/Date.js +21 -24
  6. package/Menu.js +161 -153
  7. package/Multiselect.js +17 -27
  8. package/Progress.js +202 -149
  9. package/RadioBar.js +18 -14
  10. package/ScreenReaderContent.js +138 -94
  11. package/Search.js +45 -42
  12. package/Select.js +89 -99
  13. package/Slider.js +128 -145
  14. package/Switch.js +123 -119
  15. package/Text.js +202 -199
  16. package/TextArea.js +21 -19
  17. package/package.json +4 -4
  18. package/types/src/Button/Button.d.ts +15 -5
  19. package/types/src/Color/Color.d.ts +3 -0
  20. package/types/src/Color/Palette.d.ts +4 -2
  21. package/types/src/ControlGroup/docs/examples/Error.d.ts +2 -2
  22. package/types/src/Date/Date.d.ts +0 -1
  23. package/types/src/Date/docs/examples/Error.d.ts +2 -0
  24. package/types/src/Link/Link.d.ts +3 -4
  25. package/types/src/Menu/Item.d.ts +6 -3
  26. package/types/src/Progress/Progress.d.ts +1 -1
  27. package/types/src/Search/Option.d.ts +7 -0
  28. package/types/src/Select/Select.d.ts +1 -1
  29. package/types/src/Select/SelectBase.d.ts +0 -1
  30. package/types/src/Slider/Slider.d.ts +0 -1
  31. package/types/src/Slider/docs/examples/Error.d.ts +2 -0
  32. package/types/src/Switch/Switch.d.ts +1 -0
  33. package/types/src/Text/Text.d.ts +6 -4
  34. package/types/src/Text/docs/examples/Dimmed.d.ts +2 -0
  35. package/types/src/TextArea/TextArea.d.ts +2 -2
  36. package/types/src/Button/docs/examples/Selected.d.ts +0 -2
  37. package/types/src/Slider/docs/examples/prisma/Error.d.ts +0 -2
  38. /package/types/src/Date/docs/examples/{prisma/WithoutCalendar.d.ts → WithoutCalendar.d.ts} +0 -0
  39. /package/types/src/Progress/docs/examples/{prisma/Type.d.ts → Type.d.ts} +0 -0
package/Select.js CHANGED
@@ -76,10 +76,10 @@
76
76
  const a = require("lodash/has");
77
77
  var l = e.n(a);
78
78
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
79
- const s = require("@splunk/ui-utils/i18n");
79
+ const c = require("@splunk/ui-utils/i18n");
80
80
  // CONCATENATED MODULE: external "lodash/castArray"
81
- const c = require("lodash/castArray");
82
- var u = e.n(c);
81
+ const s = require("lodash/castArray");
82
+ var u = e.n(s);
83
83
  // CONCATENATED MODULE: external "lodash/find"
84
84
  const p = require("lodash/find");
85
85
  var f = e.n(p);
@@ -158,7 +158,7 @@
158
158
  // CONCATENATED MODULE: ./src/Select/icons/Search.tsx
159
159
  var ee = function e() {
160
160
  var t = (0, U.useSplunkTheme)(), n = t.isEnterprise, o = t.isCompact;
161
- var i = (0, s._)("Search");
161
+ var i = (0, c._)("Search");
162
162
  var a = o ? "20px" : "24px";
163
163
  var l = n ? r().createElement(Y(), {
164
164
  role: "presentation",
@@ -243,12 +243,12 @@
243
243
  Object.defineProperty(e, r.key, r);
244
244
  }
245
245
  }
246
- function se(e, t, n) {
246
+ function ce(e, t, n) {
247
247
  if (t) le(e.prototype, t);
248
248
  if (n) le(e, n);
249
249
  return e;
250
250
  }
251
- function ce(e, t) {
251
+ function se(e, t) {
252
252
  if (typeof t !== "function" && t !== null) {
253
253
  throw new TypeError("Super expression must either be null or a function");
254
254
  }
@@ -360,7 +360,7 @@
360
360
  * [PureComponent](https://reactjs.org/docs/react-api.html#reactpurecomponent)
361
361
  * so any elements passed to it must also be pure.
362
362
  */ var ge = function(e) {
363
- ce(n, e);
363
+ se(n, e);
364
364
  var t = pe(n);
365
365
  function n() {
366
366
  var e;
@@ -383,7 +383,7 @@
383
383
  }));
384
384
  return e;
385
385
  }
386
- se(n, [ {
386
+ ce(n, [ {
387
387
  key: "scrollIntoViewIfNeeded",
388
388
  value: function e() {
389
389
  var t;
@@ -403,13 +403,12 @@
403
403
  var t = this.props, n = t.value, o = t.children, i = t.label, a = t.multiple, l = oe(t, [ "value", "children", "label", "multiple" ]);
404
404
 
405
405
  return r().createElement(T.Item, re({
406
- "aria-selected": this.props.selected,
407
406
  "data-test-value": n,
408
407
  "data-test": "option",
409
408
  ref: this.handleMount
410
409
  }, l, {
411
410
  selectable: true,
412
- selectableAppearance: a ? "checkbox" : undefined,
411
+ selectableAppearance: a ? "checkbox" : "checkmark",
413
412
  onClick: this.handleClick,
414
413
  role: "option",
415
414
  value: n.toString()
@@ -631,9 +630,9 @@
631
630
  selected: i().oneOf([ false, true, "some" ])
632
631
  };
633
632
  var Fe = r().forwardRef((function(e, t) {
634
- var n = e.active, o = e.id, i = e.onClick, a = e.selectAllLabel, l = e.totalCount, c = e.changedToggle, u = e.selected;
633
+ var n = e.active, o = e.id, i = e.onClick, a = e.selectAllLabel, l = e.totalCount, s = e.changedToggle, u = e.selected;
635
634
  // When toggle is changed the total count is not displayed anymore so the count is now shown in the Select all menu item
636
- var p = c ? " (".concat(l === null || l === void 0 ? void 0 : l.toString(), ")") : "";
635
+ var p = s ? " (".concat(l === null || l === void 0 ? void 0 : l.toString(), ")") : "";
637
636
 
638
637
  return r().createElement(Be, {
639
638
  label: a,
@@ -652,12 +651,12 @@
652
651
  key: "main-checkbox",
653
652
  value: "main-checkbox",
654
653
  appearance: "checkbox",
655
- "aria-label": !u && (0, s._)("No options selected") || u === "some" && (0, s._)("Some options selected") || (0,
656
- s._)("All options selected"),
654
+ "aria-label": !u && (0, c._)("No options selected") || u === "some" && (0, c._)("Some options selected") || (0,
655
+ c._)("All options selected"),
657
656
  "data-test": "select-all-switch",
658
- selectedLabel: u === true ? (0, s._)("All options selected") : (0, s._)("Option selected"),
659
- unselectedLabel: u === true ? (0, s._)("No options selected") : (0, s._)("Option unselected"),
660
- someSelectedLabel: (0, s._)("Some options selected")
657
+ selectedLabel: u === true ? (0, c._)("All options selected") : (0, c._)("Option selected"),
658
+ unselectedLabel: u === true ? (0, c._)("No options selected") : (0, c._)("Option unselected"),
659
+ someSelectedLabel: (0, c._)("Some options selected")
661
660
  }), r().createElement(je, {
662
661
  "data-test": "description"
663
662
  }, "".concat(p, " Ctrl-a")), r().createElement(Ve, null, r().createElement(Re, {
@@ -911,12 +910,12 @@
911
910
  return at.apply(this, arguments);
912
911
  }
913
912
  function lt(e, t) {
914
- return ut(e) || ct(e, t) || dt(e, t) || st();
913
+ return ut(e) || st(e, t) || dt(e, t) || ct();
915
914
  }
916
- function st() {
915
+ function ct() {
917
916
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
918
917
  }
919
- function ct(e, t) {
918
+ function st(e, t) {
920
919
  if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(e))) return;
921
920
  var n = [];
922
921
  var r = true;
@@ -1164,8 +1163,8 @@
1164
1163
  isLoadingOptions: false,
1165
1164
  menuStyle: {},
1166
1165
  multiple: false,
1167
- noOptionsMessage: (0, s._)("No matches"),
1168
- placeholder: (0, s._)("Select..."),
1166
+ noOptionsMessage: (0, c._)("No matches"),
1167
+ placeholder: (0, c._)("Select..."),
1169
1168
  prepend: false,
1170
1169
  repositionMode: "flip",
1171
1170
  selectAllAppearance: "buttongroup",
@@ -1216,7 +1215,6 @@
1216
1215
  Et(Ct(i), "dropdown", null);
1217
1216
  Et(Ct(i), "firstSelectedEnabledOption", null);
1218
1217
  Et(Ct(i), "firstSelectedOptionIndex", void 0);
1219
- Et(Ct(i), "menuId", void 0);
1220
1218
  Et(Ct(i), "menuListboxId", void 0);
1221
1219
  Et(Ct(i), "previousActiveIndex", null);
1222
1220
  Et(Ct(i), "selectedOptionCount", void 0);
@@ -1235,14 +1233,14 @@
1235
1233
  }));
1236
1234
  Et(Ct(i), "handleSelectAll", (function(e) {
1237
1235
  var t, n, o;
1238
- var a = i.props, l = a.name, s = a.children, c = a.multiple;
1236
+ var a = i.props, l = a.name, c = a.children, s = a.multiple;
1239
1237
  // this doesn't make sense if we can't select multiple values
1240
- if (!c) {
1238
+ if (!s) {
1241
1239
  return;
1242
1240
  }
1243
1241
  var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1244
1242
  var p = A()(u.concat(i.displayedValues));
1245
- p = r().Children.toArray(s).filter((function(e) {
1243
+ p = r().Children.toArray(c).filter((function(e) {
1246
1244
  return Dt(e) && b()(p, e.props.value) && (!e.props.disabled || b()(u, e.props.value));
1247
1245
  })).map((function(e) {
1248
1246
  return e.props.value;
@@ -1260,15 +1258,15 @@
1260
1258
  }));
1261
1259
  Et(Ct(i), "handleClearAll", (function(e) {
1262
1260
  var t, n, o;
1263
- var a = i.props, l = a.name, s = a.children, c = a.multiple;
1261
+ var a = i.props, l = a.name, c = a.children, s = a.multiple;
1264
1262
  // this doesn't make sense if we can't select multiple values
1265
- if (!c) {
1263
+ if (!s) {
1266
1264
  return;
1267
1265
  }
1268
1266
  var u = (t = i.getCurrentValues()) !== null && t !== void 0 ? t : [];
1269
1267
  var p = E().apply(void 0, [ u ].concat(pt(i.displayedValues)));
1270
1268
  // this will unselect all selected values unless those values are disabled or hidden by the filter
1271
- var f = r().Children.toArray(s).filter((function(e) {
1269
+ var f = r().Children.toArray(c).filter((function(e) {
1272
1270
  return Dt(e) && (b()(u, e.props.value) && e.props.disabled || b()(p, e.props.value));
1273
1271
  })).map((function(e) {
1274
1272
  return e.props.value;
@@ -1312,9 +1310,9 @@
1312
1310
  };
1313
1311
  }));
1314
1312
  if (r && o) {
1315
- var s;
1316
- var c = n.Children.toArray(r).length - (2 + ((s = i.getCurrentValues()) !== null && s !== void 0 ? s : []).length);
1317
- if (i.state.activeIndex === c) {
1313
+ var c;
1314
+ var s = n.Children.toArray(r).length - (2 + ((c = i.getCurrentValues()) !== null && c !== void 0 ? c : []).length);
1315
+ if (i.state.activeIndex === s) {
1318
1316
  i.handleScrollBottom(e);
1319
1317
  }
1320
1318
  }
@@ -1376,11 +1374,11 @@
1376
1374
  a = l === r.length - 1 ? 0 : l + 1;
1377
1375
  }
1378
1376
  }
1379
- var s = r[a];
1380
- var c = i.optionRefsByKey[Lt(s.value, s.label)];
1381
- if (c != null) {
1377
+ var c = r[a];
1378
+ var s = i.optionRefsByKey[Lt(c.value, c.label)];
1379
+ if (s != null) {
1382
1380
  var u;
1383
- (u = c.focus) === null || u === void 0 ? void 0 : u.call(c);
1381
+ (u = s.focus) === null || u === void 0 ? void 0 : u.call(s);
1384
1382
  }
1385
1383
  }
1386
1384
  i.currentMatchOptions = r;
@@ -1477,13 +1475,13 @@
1477
1475
  }));
1478
1476
  Et(Ct(i), "createToggle", (function() {
1479
1477
  var e;
1480
- var t = i.props, a = t.toggle, l = t.appearance, c = t.children, u = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, m = t.labelText, y = t.multiple, g = t.placeholder, S = t.prefixLabel, w = t.required, x = t.suffixLabel, k = t.toggleContent;
1478
+ var t = i.props, a = t.toggle, l = t.appearance, s = t.children, u = t.describedBy, p = t.disabled, d = t.elementRef, v = t.error, h = t.inline, b = t.labelledBy, m = t.labelText, y = t.multiple, g = t.placeholder, S = t.prefixLabel, w = t.required, x = t.suffixLabel, k = t.toggleContent;
1481
1479
  var _;
1482
1480
  var A;
1483
1481
  var j = [];
1484
1482
  // Generate buttonLabels
1485
1483
  var E = (e = i.getCurrentValues()) !== null && e !== void 0 ? e : [];
1486
- var M = n.Children.toArray(c);
1484
+ var M = n.Children.toArray(s);
1487
1485
  var T = E.reduce((function(e, t, n, r) {
1488
1486
  var o = f()(M, (function(e) {
1489
1487
  return Dt(e) && e.props.value === t;
@@ -1502,43 +1500,34 @@
1502
1500
  j.push(t.toString());
1503
1501
  }
1504
1502
  if (n < r.length - 1) {
1505
- e.push((0, s._)(", "));
1506
- j.push((0, s._)(", "));
1503
+ e.push((0, c._)(", "));
1504
+ j.push((0, c._)(", "));
1507
1505
  }
1508
1506
  return e;
1509
1507
  }), []);
1510
1508
  A = T;
1511
1509
  // only apply prefix / suffix if the label is not empty
1512
1510
  if (A.length > 0) {
1511
+ // If there's more than one item selected, read out the selected total
1512
+ // rather than reading out each selected item
1513
+ j = i.wrapLabel({
1514
+ prefixLabel: S,
1515
+ label: A.length > 1 ? [ "".concat(E.length, " items selected") ] : j,
1516
+ suffixLabel: x
1517
+ });
1513
1518
  A = i.wrapLabel({
1514
1519
  prefixLabel: S,
1515
1520
  label: A,
1516
1521
  suffixLabel: x
1517
1522
  });
1518
1523
  }
1519
- // single <Select> behaviour is to show the placeholder if all parts of the the label
1524
+ // single <Select> behaviour is to show the placeholder if all parts of the label
1520
1525
  // are empty strings so we replicate this behaviour here
1521
1526
  if (A.length === 0 || !y && A.every((function(e) {
1522
1527
  return e === "";
1523
1528
  }))) {
1524
1529
  A = Pt(g);
1525
- // placeholder has a default value so will not be undefined
1526
- j = Pt(g);
1527
- }
1528
- // If there's more than one item selected, read out the selected total
1529
- // rather than reading out each selected item
1530
- if (A.length > 1) {
1531
- j = i.wrapLabel({
1532
- prefixLabel: S,
1533
- label: [ "".concat(E.length, " items selected") ],
1534
- suffixLabel: x
1535
- });
1536
- } else {
1537
- j = i.wrapLabel({
1538
- prefixLabel: S,
1539
- label: j,
1540
- suffixLabel: x
1541
- });
1530
+ j = A;
1542
1531
  }
1543
1532
  var P = jt({
1544
1533
  "aria-describedby": u,
@@ -1547,6 +1536,7 @@
1547
1536
  "aria-required": w,
1548
1537
  "data-select-appearance": l,
1549
1538
  "data-test": y ? "multiselect" : "select",
1539
+ role: "combobox",
1550
1540
  disabled: p,
1551
1541
  elementRef: d,
1552
1542
  error: v
@@ -1576,8 +1566,6 @@
1576
1566
  icon: _,
1577
1567
  inline: h,
1578
1568
  isMenu: true,
1579
- "aria-haspopup": "listbox",
1580
- "aria-owns": i.menuId,
1581
1569
  onClick: i.props.onClick
1582
1570
  }, I()(i.props, o.invalidLinkAppearanceProps)), !!E.length && y && r().createElement(Ye, {
1583
1571
  "data-role": "count"
@@ -1585,7 +1573,7 @@
1585
1573
  }));
1586
1574
  Et(Ct(i), "createChildren", (function() {
1587
1575
  var e = i.state, t = e.filterKeyword, o = e.textHasFocus, a = e.topValues;
1588
- var l = i.props, c = l.allowKeyMatching, u = l.allowNewValues, p = l.filter, d = l.multiple, h = l.selectAllAppearance, b = l.showSelectedValuesFirst, m = l.isLoadingOptions, y = l.onScrollBottom;
1576
+ var l = i.props, s = l.allowKeyMatching, u = l.allowNewValues, p = l.filter, d = l.multiple, h = l.selectAllAppearance, b = l.showSelectedValuesFirst, m = l.isLoadingOptions, y = l.onScrollBottom;
1589
1577
  var g = i.getCurrentValues();
1590
1578
  i.availableOptionCount = 0;
1591
1579
  i.firstSelectedOptionIndex = undefined;
@@ -1610,10 +1598,10 @@
1610
1598
  }
1611
1599
  var a = g && g.indexOf(t.props.value) >= 0;
1612
1600
  var l = !!a && !t.props.disabled && !x;
1613
- var s = c && !d && !p && !m && !y;
1601
+ var c = s && !d && !p && !m && !y;
1614
1602
  var u = Lt(t.props.value, t.props.label);
1615
1603
  var f = -1;
1616
- if (s && !t.props.disabled && !t.props.hidden) {
1604
+ if (c && !t.props.disabled && !t.props.hidden) {
1617
1605
  i.availableMatchOptions.push({
1618
1606
  label: t.props.label,
1619
1607
  value: t.props.value
@@ -1624,7 +1612,7 @@
1624
1612
  var v = (0, n.cloneElement)(t, {
1625
1613
  key: t.key || o,
1626
1614
  onClick: i.handleMenuOptionClick,
1627
- onKeyDown: s ? function(e) {
1615
+ onKeyDown: c ? function(e) {
1628
1616
  return i.handleMenuOptionKeyDown(e, f);
1629
1617
  } : undefined,
1630
1618
  selected: a,
@@ -1761,14 +1749,14 @@
1761
1749
  var P;
1762
1750
  if (i.optionSelection === "all") {
1763
1751
  if (t === "") {
1764
- P = (0, s._)("Clear all");
1752
+ P = (0, c._)("Clear all");
1765
1753
  } else {
1766
- P = (0, s._)("Clear all matches");
1754
+ P = (0, c._)("Clear all matches");
1767
1755
  }
1768
1756
  } else if (t === "") {
1769
- P = (0, s._)("Select all");
1757
+ P = (0, c._)("Select all");
1770
1758
  } else {
1771
- P = (0, s._)("Select all matches");
1759
+ P = (0, c._)("Select all matches");
1772
1760
  }
1773
1761
  if (i.state.activeIndex === 0 && o) {
1774
1762
  i.activeValue = "selectAll";
@@ -1832,7 +1820,6 @@
1832
1820
  if (false) {}
1833
1821
  if (false) {}
1834
1822
  o.validateAppearance(e);
1835
- i.menuId = (0, M.createDOMID)("menu");
1836
1823
  i.menuListboxId = (0, M.createDOMID)("menu-listbox");
1837
1824
  i.activeItemId = (0, M.createDOMID)("active-item");
1838
1825
  return i;
@@ -1874,7 +1861,7 @@
1874
1861
  var r, o, i;
1875
1862
  var a = (r = this.getCurrentValues()) !== null && r !== void 0 ? r : [];
1876
1863
  var l = a.indexOf(n);
1877
- var s = this.props, c = s.name, u = s.multiple;
1864
+ var c = this.props, s = c.name, u = c.multiple;
1878
1865
  var p;
1879
1866
  if (u) {
1880
1867
  if (l >= 0) {
@@ -1909,7 +1896,7 @@
1909
1896
  }
1910
1897
  (o = (i = this.props).onChange) === null || o === void 0 ? void 0 : o.call(i, t, {
1911
1898
  values: p,
1912
- name: c,
1899
+ name: s,
1913
1900
  reason: "valueToggle"
1914
1901
  });
1915
1902
  }
@@ -1926,9 +1913,9 @@
1926
1913
  value: function e(t) {
1927
1914
  var n = t.hasChildren, o = t.placement;
1928
1915
  var i = this.state.filterKeyword;
1929
- var a = this.props, l = a.inputId, c = a.inputRef, u = a.multiple, p = a.selectAllAppearance;
1930
- var f = (0, s._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
1931
- var d = (0, s._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
1916
+ var a = this.props, l = a.inputId, s = a.inputRef, u = a.multiple, p = a.selectAllAppearance;
1917
+ var f = (0, c._)("Select all options".concat(this.optionSelection === "all" ? " disabled" : ""));
1918
+ var d = (0, c._)("Clear all options".concat(this.optionSelection === "none" ? " disabled" : ""));
1932
1919
  // only visually disable these as opposed to fully disabling to avoid losing keyboard focus - see SUI-2731
1933
1920
  var v = r().createElement(Ze, {
1934
1921
  $placement: o,
@@ -1938,12 +1925,12 @@
1938
1925
  "aria-label": f,
1939
1926
  onClick: this.handleSelectAll,
1940
1927
  "data-test": "select-all"
1941
- }, i ? (0, s._)("Select all Matches") : (0, s._)("Select all")), r().createElement(Qe, {
1928
+ }, i ? (0, c._)("Select all Matches") : (0, c._)("Select all")), r().createElement(Qe, {
1942
1929
  $disabled: this.optionSelection === "none",
1943
1930
  "aria-label": d,
1944
1931
  onClick: this.handleClearAll,
1945
1932
  "data-test": "clear-all"
1946
- }, i ? (0, s._)("Clear all Matches") : (0, s._)("Clear all")));
1933
+ }, i ? (0, c._)("Clear all Matches") : (0, c._)("Clear all")));
1947
1934
  return this.hasFilter() && r().createElement("div", {
1948
1935
  key: "controls"
1949
1936
  }, r().createElement(Je, {
@@ -1959,13 +1946,15 @@
1959
1946
  onKeyDown: this.handleTextKeyDown,
1960
1947
  onFocus: this.handleTextFocus,
1961
1948
  onBlur: this.handleTextBlur,
1962
- placeholder: (0, s._)("filter"),
1949
+ placeholder: (0, c._)("filter"),
1963
1950
  role: "combobox",
1964
1951
  "aria-expanded": "true",
1965
1952
  "aria-controls": this.menuListboxId,
1966
- "aria-label": (0, s._)("Filter"),
1953
+ "aria-owns": n ? this.activeItemId : undefined,
1954
+ "aria-label": (0, c._)("Filter"),
1955
+ "aria-autocomplete": "list",
1967
1956
  "aria-activedescendant": this.state.textHasFocus && n ? this.activeItemId : undefined,
1968
- inputRef: c,
1957
+ inputRef: s,
1969
1958
  inputId: l,
1970
1959
  canClear: true,
1971
1960
  startAdornment: r().createElement(Xe, null, r().createElement(te, null))
@@ -1975,7 +1964,7 @@
1975
1964
  key: "render",
1976
1965
  value: function e() {
1977
1966
  var t, o = this;
1978
- var i = this.props, a = i.children, l = i.defaultPlacement, s = i.inputId, c = i.multiple, u = i.repositionMode, p = i.virtualization;
1967
+ var i = this.props, a = i.children, l = i.defaultPlacement, c = i.inputId, s = i.multiple, u = i.repositionMode, p = i.virtualization;
1979
1968
  var d = this.hasFilter();
1980
1969
  var v = (t = this.getCurrentValues()) !== null && t !== void 0 ? t : [];
1981
1970
  var h = n.Children.toArray(a);
@@ -1995,22 +1984,23 @@
1995
1984
  maxHeight: i,
1996
1985
  menuStyle: o.props.menuStyle
1997
1986
  });
1998
- var s = v.length > 0 && !b && !o.hasFilter() ? 0 : undefined;
1987
+ var c = v.length > 0 && !b && !o.hasFilter() ? 0 : undefined;
1999
1988
  var u = jt(jt({
2000
- "aria-multiselectable": c || undefined,
1989
+ "aria-multiselectable": s || undefined,
2001
1990
  childrenStart: o.renderControls({
2002
1991
  placement: a,
2003
- hasChildren: !!m.length
1992
+ hasChildren: m.some((function(e) {
1993
+ return Dt(e);
1994
+ }))
2004
1995
  }),
2005
1996
  focusMode: o.hasFilter() ? "never" : undefined,
2006
- id: o.menuId,
2007
1997
  isLoading: o.props.isLoadingOptions,
2008
1998
  menuId: o.menuListboxId,
2009
1999
  onScrollBottom: o.props.onScrollBottom ? o.handleScrollBottom : undefined,
2010
2000
  placement: a !== null && a !== void 0 ? a : undefined
2011
2001
  }, I()(o.props, "noOptionsMessage", "footerMessage", "animateLoading", "loadingMessage", "onScroll")), {}, {
2012
2002
  style: l,
2013
- tabIndex: s
2003
+ tabIndex: c
2014
2004
  });
2015
2005
  if (p) {
2016
2006
 
@@ -2024,7 +2014,7 @@
2024
2014
 
2025
2015
  return r().createElement(V(), {
2026
2016
  closeReasons: Rt,
2027
- inputId: s,
2017
+ inputId: c,
2028
2018
  toggle: y,
2029
2019
  onRequestOpen: this.handleRequestOpen,
2030
2020
  onRequestClose: this.handleRequestClose,
@@ -2035,7 +2025,7 @@
2035
2025
  canCoverAnchor: it().innerHeight < 500,
2036
2026
  ref: this.handleDropdownMount,
2037
2027
  retainFocus: false,
2038
- takeFocus: v.length === 0 || v.length > 0 && !b || !!d
2028
+ takeFocus: v.length === 0 || v.length > 0 && !b || d
2039
2029
  }, g);
2040
2030
  }
2041
2031
  } ]);
@@ -2303,12 +2293,12 @@
2303
2293
  }
2304
2294
  return n;
2305
2295
  }
2306
- function sn(e, t) {
2296
+ function cn(e, t) {
2307
2297
  if (!(e instanceof t)) {
2308
2298
  throw new TypeError("Cannot call a class as a function");
2309
2299
  }
2310
2300
  }
2311
- function cn(e, t) {
2301
+ function sn(e, t) {
2312
2302
  for (var n = 0; n < t.length; n++) {
2313
2303
  var r = t[n];
2314
2304
  r.enumerable = r.enumerable || false;
@@ -2318,8 +2308,8 @@
2318
2308
  }
2319
2309
  }
2320
2310
  function un(e, t, n) {
2321
- if (t) cn(e.prototype, t);
2322
- if (n) cn(e, n);
2311
+ if (t) sn(e.prototype, t);
2312
+ if (n) sn(e, n);
2323
2313
  return e;
2324
2314
  }
2325
2315
  function pn(e, t) {
@@ -2452,8 +2442,8 @@
2452
2442
  inline: true,
2453
2443
  isLoadingOptions: false,
2454
2444
  menuStyle: {},
2455
- noOptionsMessage: (0, s._)("No matches"),
2456
- placeholder: (0, s._)("Select..."),
2445
+ noOptionsMessage: (0, c._)("No matches"),
2446
+ placeholder: (0, c._)("Select..."),
2457
2447
  prepend: false,
2458
2448
  toggleContent: "optionChildren"
2459
2449
  };
@@ -2463,7 +2453,7 @@
2463
2453
  // @docs-props-type SelectPropsBase
2464
2454
  function n(e) {
2465
2455
  var r;
2466
- sn(this, n);
2456
+ cn(this, n);
2467
2457
  r = t.call(this, e);
2468
2458
  var o = {};
2469
2459
  // wrap defaultValue in an array once to avoid failing <SelectBase>'s defaultValues comparison check
@@ -2490,7 +2480,7 @@
2490
2480
  key: "render",
2491
2481
  value: function e() {
2492
2482
  var t = this.props, n = t.defaultValue, o = t.onChange, i = t.value, a = an(t, [ "defaultValue", "onChange", "value" ]);
2493
- var s = {
2483
+ var c = {
2494
2484
  onChange: function e(t, n) {
2495
2485
  var r = n.name, i = n.values;
2496
2486
  o === null || o === void 0 ? void 0 : o(t, {
@@ -2502,16 +2492,16 @@
2502
2492
  // using "has" as opposed to a null check to match SelectBase
2503
2493
  if (l()(this.props, "value")) {
2504
2494
  if (i != null) {
2505
- s.values = [ i ];
2495
+ c.values = [ i ];
2506
2496
  } else {
2507
- s.values = [];
2497
+ c.values = [];
2508
2498
  }
2509
2499
  } else if (this.state.defaultValues != null) {
2510
2500
  // using defaultValues from state in order to avoid wrapping defaultValue here
2511
- s.defaultValues = this.state.defaultValues;
2501
+ c.defaultValues = this.state.defaultValues;
2512
2502
  }
2513
2503
 
2514
- return r().createElement(Nt, on({}, a, s, {
2504
+ return r().createElement(Nt, on({}, a, c, {
2515
2505
  multiple: false
2516
2506
  }));
2517
2507
  }