@sproutsocial/seeds-react-menu 1.15.10 → 1.16.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.
@@ -9,27 +9,27 @@ $ tsup --dts
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  CJS dist/index.js 92.65 KB
12
- CJS dist/v3/index.js 120.75 KB
12
+ CJS dist/v3/index.js 121.28 KB
13
13
  CJS dist/v2/index.js 73.18 KB
14
14
  CJS dist/index.js.map 180.28 KB
15
- CJS dist/v3/index.js.map 211.25 KB
15
+ CJS dist/v3/index.js.map 212.15 KB
16
16
  CJS dist/v2/index.js.map 152.19 KB
17
- CJS ⚡️ Build success in 126ms
17
+ CJS ⚡️ Build success in 112ms
18
18
  ESM dist/esm/index.js 73.60 KB
19
- ESM dist/esm/v3/index.js 107.25 KB
20
- ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
21
19
  ESM dist/esm/v2/index.js 62.63 KB
20
+ ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
21
+ ESM dist/esm/v3/index.js 107.78 KB
22
22
  ESM dist/esm/index.js.map 156.29 KB
23
- ESM dist/esm/v3/index.js.map 211.30 KB
24
- ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
25
23
  ESM dist/esm/v2/index.js.map 132.57 KB
26
- ESM ⚡️ Build success in 127ms
24
+ ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
25
+ ESM dist/esm/v3/index.js.map 212.20 KB
26
+ ESM ⚡️ Build success in 111ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 7046ms
28
+ DTS ⚡️ Build success in 7496ms
29
29
  DTS dist/index.d.ts 39.12 KB
30
30
  DTS dist/v2/index.d.ts 5.55 KB
31
- DTS dist/v3/index.d.ts 23.83 KB
31
+ DTS dist/v3/index.d.ts 23.92 KB
32
32
  DTS dist/index.d.mts 39.12 KB
33
33
  DTS dist/v2/index.d.mts 5.55 KB
34
- DTS dist/v3/index.d.mts 23.83 KB
35
- Done in 7.82s.
34
+ DTS dist/v3/index.d.mts 23.92 KB
35
+ Done in 8.30s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [a13a571]
8
+ - @sproutsocial/seeds-react-theme@4.1.1
9
+ - @sproutsocial/seeds-react-box@1.1.22
10
+ - @sproutsocial/seeds-react-icon@2.4.1
11
+ - @sproutsocial/seeds-react-label@1.0.23
12
+ - @sproutsocial/seeds-react-token-input@1.4.49
13
+ - @sproutsocial/seeds-react-checkbox@1.3.42
14
+ - @sproutsocial/seeds-react-input@1.5.27
15
+ - @sproutsocial/seeds-react-popout@2.5.10
16
+ - @sproutsocial/seeds-react-button@2.2.2
17
+ - @sproutsocial/seeds-react-switch@1.2.40
18
+ - @sproutsocial/seeds-react-radio@1.3.23
19
+
20
+ ## 1.16.0
21
+
22
+ ### Minor Changes
23
+
24
+ - a6c9ca5: Add isGroupHeaderDisabled optional prop
25
+
3
26
  ## 1.15.10
4
27
 
5
28
  ### Patch Changes
@@ -857,6 +857,12 @@ var ComboboxGroupHeaderItem = styled6(Combobox.Item)`
857
857
  background: ${({ theme }) => theme.colors.listItem.background.hover};
858
858
  color: ${({ theme }) => theme.colors.text.body};
859
859
  }
860
+
861
+ &[data-disabled] {
862
+ opacity: 0.4;
863
+ cursor: not-allowed;
864
+ pointer-events: none;
865
+ }
860
866
  `;
861
867
  var ComboboxSelectAllItem = styled6(Combobox.Item)`
862
868
  display: flex;
@@ -1183,6 +1189,7 @@ function VirtualizedComboboxList({
1183
1189
  inputType,
1184
1190
  renderItem,
1185
1191
  renderGroupHeading,
1192
+ isGroupHeaderDisabled,
1186
1193
  renderCreatableItem
1187
1194
  }) {
1188
1195
  const filteredItems = Combobox2.useFilteredItems();
@@ -1285,6 +1292,7 @@ function VirtualizedComboboxList({
1285
1292
  index: virtualItem.index,
1286
1293
  "data-index": virtualItem.index,
1287
1294
  value: row,
1295
+ disabled: isGroupHeaderDisabled?.(row.groupName),
1288
1296
  style: baseStyle,
1289
1297
  ref: virtualizer.measureElement,
1290
1298
  children: [
@@ -1551,6 +1559,7 @@ function MultiCombobox(props) {
1551
1559
  const inputType = isChildrenMode ? "checkbox" : removeSelectedItems ? "none" : props.inputType ?? "checkbox";
1552
1560
  const groupBy = isChildrenMode ? void 0 : props.groupBy;
1553
1561
  const renderGroupHeading = isChildrenMode ? void 0 : props.renderGroupHeading;
1562
+ const isGroupHeaderDisabled = isChildrenMode ? void 0 : props.isGroupHeaderDisabled;
1554
1563
  const selectHeadings = isChildrenMode ? false : props.selectHeadings ?? false;
1555
1564
  const selectAllProp = isChildrenMode ? false : props.selectAll ?? false;
1556
1565
  const selectAll = Boolean(selectAllProp);
@@ -1649,6 +1658,7 @@ function MultiCombobox(props) {
1649
1658
  }
1650
1659
  let updated = [...realItems];
1651
1660
  for (const sentinel of groupSentinels) {
1661
+ if (isGroupHeaderDisabled?.(sentinel.groupName)) continue;
1652
1662
  const group = groups?.find((g) => g.value === sentinel.groupName);
1653
1663
  if (!group) continue;
1654
1664
  const allSelected = group.items.every(
@@ -1703,16 +1713,24 @@ function MultiCombobox(props) {
1703
1713
  (item2) => value.some((s) => s.id === item2.id)
1704
1714
  ).length;
1705
1715
  const state = selectedCount === 0 ? "none" : selectedCount === groupItemsList.length ? "all" : "partial";
1706
- return /* @__PURE__ */ jsxs7(ComboboxGroupHeaderItem, { value: row, children: [
1707
- /* @__PURE__ */ jsx9(
1708
- ComboboxGroupHeaderCheckbox,
1709
- {
1710
- $state: state,
1711
- id: `__header-${row.groupName}`
1712
- }
1713
- ),
1714
- renderGroupHeading ? renderGroupHeading(row.groupName) : row.groupName
1715
- ] }, `__header-${row.groupName}`);
1716
+ return /* @__PURE__ */ jsxs7(
1717
+ ComboboxGroupHeaderItem,
1718
+ {
1719
+ value: row,
1720
+ disabled: isGroupHeaderDisabled?.(row.groupName),
1721
+ children: [
1722
+ /* @__PURE__ */ jsx9(
1723
+ ComboboxGroupHeaderCheckbox,
1724
+ {
1725
+ $state: state,
1726
+ id: `__header-${row.groupName}`
1727
+ }
1728
+ ),
1729
+ renderGroupHeading ? renderGroupHeading(row.groupName) : row.groupName
1730
+ ]
1731
+ },
1732
+ `__header-${row.groupName}`
1733
+ );
1716
1734
  }
1717
1735
  if (isCreatableSentinel(row)) {
1718
1736
  return renderCreatableItem(row);
@@ -1908,6 +1926,7 @@ function MultiCombobox(props) {
1908
1926
  inputType,
1909
1927
  renderItem,
1910
1928
  renderGroupHeading,
1929
+ isGroupHeaderDisabled,
1911
1930
  renderCreatableItem: creatableProp ? (sentinel, style, index, measureRef) => renderCreatableItem(
1912
1931
  sentinel,
1913
1932
  style,