@sproutsocial/seeds-react-menu 1.12.0 → 1.12.1

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.
@@ -8,28 +8,28 @@ $ tsup --dts
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/esm/index.js 73.60 KB
12
- ESM dist/esm/v2/index.js 62.63 KB
13
- ESM dist/esm/v3/index.js 82.62 KB
14
- ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
15
- ESM dist/esm/index.js.map 156.29 KB
16
- ESM dist/esm/v2/index.js.map 132.57 KB
17
- ESM dist/esm/v3/index.js.map 162.12 KB
18
- ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
19
- ESM ⚡️ Build success in 414ms
20
11
  CJS dist/index.js 92.65 KB
12
+ CJS dist/v3/index.js 94.25 KB
21
13
  CJS dist/v2/index.js 73.18 KB
22
- CJS dist/v3/index.js 93.77 KB
23
14
  CJS dist/index.js.map 180.28 KB
15
+ CJS dist/v3/index.js.map 162.97 KB
24
16
  CJS dist/v2/index.js.map 152.19 KB
25
- CJS dist/v3/index.js.map 162.08 KB
26
- CJS ⚡️ Build success in 414ms
17
+ CJS ⚡️ Build success in 68ms
18
+ ESM dist/esm/index.js 73.60 KB
19
+ ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
20
+ ESM dist/esm/v2/index.js 62.63 KB
21
+ ESM dist/esm/v3/index.js 83.10 KB
22
+ ESM dist/esm/index.js.map 156.29 KB
23
+ ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
24
+ ESM dist/esm/v2/index.js.map 132.57 KB
25
+ ESM dist/esm/v3/index.js.map 163.02 KB
26
+ ESM ⚡️ Build success in 68ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 8180ms
28
+ DTS ⚡️ Build success in 6332ms
29
29
  DTS dist/index.d.ts 39.11 KB
30
30
  DTS dist/v2/index.d.ts 5.55 KB
31
- DTS dist/v3/index.d.ts 17.90 KB
31
+ DTS dist/v3/index.d.ts 17.99 KB
32
32
  DTS dist/index.d.mts 39.11 KB
33
33
  DTS dist/v2/index.d.mts 5.55 KB
34
- DTS dist/v3/index.d.mts 17.90 KB
35
- Done in 9.63s.
34
+ DTS dist/v3/index.d.mts 17.99 KB
35
+ Done in 7.04s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bea3d69: 3 bugfixes for base-ui combobox items
8
+
3
9
  ## 1.12.0
4
10
 
5
11
  ### Minor Changes
@@ -1425,7 +1425,9 @@ function MultiCombobox(props) {
1425
1425
  emptyText = "No results found.",
1426
1426
  isLoading = false,
1427
1427
  loadingText = "Loading...",
1428
- filter
1428
+ filter,
1429
+ inputValue,
1430
+ onInputValueChange
1429
1431
  } = props;
1430
1432
  const isChildrenMode = "children" in props && props.children != null;
1431
1433
  const data = isChildrenMode ? [] : props.data;
@@ -1439,7 +1441,9 @@ function MultiCombobox(props) {
1439
1441
  const groupBy = isChildrenMode ? void 0 : props.groupBy;
1440
1442
  const renderGroupHeading = isChildrenMode ? void 0 : props.renderGroupHeading;
1441
1443
  const selectHeadings = isChildrenMode ? false : props.selectHeadings ?? false;
1442
- const selectAll = isChildrenMode ? false : props.selectAll ?? false;
1444
+ const selectAllProp = isChildrenMode ? false : props.selectAll ?? false;
1445
+ const selectAll = Boolean(selectAllProp);
1446
+ const selectAllLabel = typeof selectAllProp === "string" ? selectAllProp : "Select all";
1443
1447
  const isVirtualized = isChildrenMode ? false : props.isVirtualized ?? false;
1444
1448
  const children = isChildrenMode ? props.children : void 0;
1445
1449
  const selectedItemIds = props.selectedItemIds;
@@ -1466,15 +1470,20 @@ function MultiCombobox(props) {
1466
1470
  [visibleData, groupBy]
1467
1471
  );
1468
1472
  const flatItems = React9.useMemo(() => {
1469
- if (!groups || !selectHeadings && !selectAll) return null;
1473
+ if (!selectHeadings && !selectAll) return null;
1474
+ if (!groups && !selectAll) return null;
1470
1475
  const rows = [];
1471
1476
  if (selectAll) rows.push(SELECT_ALL_SENTINEL);
1472
- for (const group of groups) {
1473
- rows.push(makeGroupHeaderSentinel(group.value));
1474
- rows.push(...group.items);
1477
+ if (groups) {
1478
+ for (const group of groups) {
1479
+ rows.push(makeGroupHeaderSentinel(group.value));
1480
+ rows.push(...group.items);
1481
+ }
1482
+ } else {
1483
+ rows.push(...visibleData);
1475
1484
  }
1476
1485
  return rows;
1477
- }, [groups, selectHeadings, selectAll]);
1486
+ }, [groups, visibleData, selectHeadings, selectAll]);
1478
1487
  function setSelectedItems(items) {
1479
1488
  if (!isControlled) setInternalValue(items);
1480
1489
  if (onSelectedItemIdsChange)
@@ -1532,7 +1541,7 @@ function MultiCombobox(props) {
1532
1541
  const state = selectedCount === 0 ? "none" : selectedCount === totalCount ? "all" : "partial";
1533
1542
  return /* @__PURE__ */ jsxs7(ComboboxSelectAllItem, { value: row, children: [
1534
1543
  /* @__PURE__ */ jsx9(ComboboxGroupHeaderCheckbox, { $state: state, id: "__selectAll" }),
1535
- "Select all"
1544
+ selectAllLabel
1536
1545
  ] }, "__selectAll");
1537
1546
  }
1538
1547
  if (isGroupHeaderSentinel2(row)) {
@@ -1580,8 +1589,13 @@ function MultiCombobox(props) {
1580
1589
  virtualized: isVirtualized,
1581
1590
  open,
1582
1591
  disabled: props.disabled,
1583
- onOpenChange: setOpen,
1592
+ onOpenChange: (nextOpen, eventDetails) => {
1593
+ if (!nextOpen && eventDetails.reason === "item-press") return;
1594
+ setOpen(nextOpen);
1595
+ },
1584
1596
  filter,
1597
+ inputValue,
1598
+ onInputValueChange,
1585
1599
  onItemHighlighted: isVirtualized ? (item, { reason, index }) => {
1586
1600
  const virt = virtualizerRef.current;
1587
1601
  if (!item || !virt) return;