@sproutsocial/seeds-react-menu 1.11.2 → 1.11.3

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/v2/index.js 62.63 KB
12
- ESM dist/esm/index.js 73.57 KB
13
- ESM dist/esm/v3/index.js 79.98 KB
14
- ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
15
- ESM dist/esm/v2/index.js.map 132.57 KB
16
- ESM dist/esm/index.js.map 156.22 KB
17
- ESM dist/esm/v3/index.js.map 156.55 KB
18
- ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
19
- ESM ⚡️ Build success in 86ms
20
11
  CJS dist/index.js 92.62 KB
21
- CJS dist/v3/index.js 91.02 KB
12
+ CJS dist/v3/index.js 92.22 KB
22
13
  CJS dist/v2/index.js 73.18 KB
23
14
  CJS dist/index.js.map 180.20 KB
24
- CJS dist/v3/index.js.map 156.57 KB
15
+ CJS dist/v3/index.js.map 158.32 KB
25
16
  CJS dist/v2/index.js.map 152.19 KB
26
- CJS ⚡️ Build success in 86ms
17
+ CJS ⚡️ Build success in 94ms
18
+ ESM dist/esm/index.js 73.57 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 81.09 KB
22
+ ESM dist/esm/index.js.map 156.22 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 158.35 KB
26
+ ESM ⚡️ Build success in 94ms
27
27
  DTS Build start
28
- DTS ⚡️ Build success in 6472ms
28
+ DTS ⚡️ Build success in 6872ms
29
29
  DTS dist/index.d.ts 39.08 KB
30
30
  DTS dist/v2/index.d.ts 5.55 KB
31
- DTS dist/v3/index.d.ts 17.59 KB
31
+ DTS dist/v3/index.d.ts 17.65 KB
32
32
  DTS dist/index.d.mts 39.08 KB
33
33
  DTS dist/v2/index.d.mts 5.55 KB
34
- DTS dist/v3/index.d.mts 17.59 KB
35
- Done in 7.21s.
34
+ DTS dist/v3/index.d.mts 17.65 KB
35
+ Done in 7.67s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.11.3
4
+
5
+ ### Patch Changes
6
+
7
+ - fe0d0f9: Include disabled items and placeholder items for all components
8
+
3
9
  ## 1.11.2
4
10
 
5
11
  ### Patch Changes
@@ -69,6 +69,7 @@ function CheckIcon() {
69
69
  function SelectItem({
70
70
  value,
71
71
  label,
72
+ disabled,
72
73
  inputType = "icon",
73
74
  renderItem,
74
75
  hidden
@@ -77,6 +78,7 @@ function SelectItem({
77
78
  StyledItem,
78
79
  {
79
80
  value,
81
+ disabled,
80
82
  style: hidden ? { display: "none" } : void 0,
81
83
  "data-qa-menu-item": label,
82
84
  children: [
@@ -359,6 +361,7 @@ function SingleSelect(props) {
359
361
  {
360
362
  value: String(item.id),
361
363
  label: itemToString(item),
364
+ disabled: item.disabled,
362
365
  inputType,
363
366
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
364
367
  },
@@ -366,29 +369,27 @@ function SingleSelect(props) {
366
369
  ))
367
370
  ] }),
368
371
  index < arr.length - 1 && /* @__PURE__ */ jsx3(SelectSeparator, {})
369
- ] }, group.value)) : (
370
- // TODO: need to add a placeholder item when includePlaceholderItem is true
371
- /* @__PURE__ */ jsxs2(Fragment2, { children: [
372
- includePlaceholderItem && /* @__PURE__ */ jsx3(
373
- SelectItem,
374
- {
375
- value: null,
376
- label: placeholder ?? ""
377
- },
378
- "placeholder"
379
- ),
380
- data.map((item) => /* @__PURE__ */ jsx3(
381
- SelectItem,
382
- {
383
- value: String(item.id),
384
- label: itemToString(item),
385
- inputType,
386
- renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
387
- },
388
- item.id
389
- ))
390
- ] })
391
- ) }),
372
+ ] }, group.value)) : /* @__PURE__ */ jsxs2(Fragment2, { children: [
373
+ includePlaceholderItem && /* @__PURE__ */ jsx3(
374
+ SelectItem,
375
+ {
376
+ value: null,
377
+ label: placeholder ?? ""
378
+ },
379
+ "placeholder"
380
+ ),
381
+ data.map((item) => /* @__PURE__ */ jsx3(
382
+ SelectItem,
383
+ {
384
+ value: String(item.id),
385
+ label: itemToString(item),
386
+ disabled: item.disabled,
387
+ inputType,
388
+ renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
389
+ },
390
+ item.id
391
+ ))
392
+ ] }) }),
392
393
  /* @__PURE__ */ jsx3(Select3.ScrollDownArrow, {})
393
394
  ] }) }) })
394
395
  ]
@@ -501,6 +502,7 @@ function MultiSelect(props) {
501
502
  {
502
503
  value: String(item.id),
503
504
  label: itemToString(item),
505
+ disabled: item.disabled,
504
506
  inputType,
505
507
  hidden: removeSelectedItems && value.includes(String(item.id)),
506
508
  renderItem: renderItem ? () => renderItem(item) : void 0
@@ -514,6 +516,7 @@ function MultiSelect(props) {
514
516
  {
515
517
  value: String(item.id),
516
518
  label: itemToString(item),
519
+ disabled: item.disabled,
517
520
  inputType,
518
521
  hidden: removeSelectedItems && value.includes(String(item.id)),
519
522
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
@@ -1012,6 +1015,7 @@ function ComboboxItemInner({
1012
1015
  value,
1013
1016
  itemId,
1014
1017
  label,
1018
+ disabled,
1015
1019
  inputType = "icon",
1016
1020
  renderItem,
1017
1021
  index,
@@ -1026,6 +1030,7 @@ function ComboboxItemInner({
1026
1030
  "data-index": dataIndex,
1027
1031
  style,
1028
1032
  ref,
1033
+ disabled,
1029
1034
  "data-qa-menu-item": label,
1030
1035
  children: [
1031
1036
  inputType === "radio" ? /* @__PURE__ */ jsx6(
@@ -1336,6 +1341,7 @@ function SingleCombobox(props) {
1336
1341
  value: item,
1337
1342
  itemId: String(item.id),
1338
1343
  label: itemToString(item),
1344
+ disabled: item.disabled,
1339
1345
  inputType,
1340
1346
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1341
1347
  },
@@ -1349,6 +1355,7 @@ function SingleCombobox(props) {
1349
1355
  value: item,
1350
1356
  itemId: String(item.id),
1351
1357
  label: itemToString(item),
1358
+ disabled: item.disabled,
1352
1359
  inputType,
1353
1360
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1354
1361
  },
@@ -1522,6 +1529,7 @@ function MultiCombobox(props) {
1522
1529
  value: item,
1523
1530
  itemId: String(item.id),
1524
1531
  label: itemToString(item),
1532
+ disabled: item.disabled,
1525
1533
  inputType,
1526
1534
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1527
1535
  },
@@ -1650,6 +1658,7 @@ function MultiCombobox(props) {
1650
1658
  value: item,
1651
1659
  itemId: String(item.id),
1652
1660
  label: itemToString(item),
1661
+ disabled: item.disabled,
1653
1662
  inputType,
1654
1663
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1655
1664
  },
@@ -1663,6 +1672,7 @@ function MultiCombobox(props) {
1663
1672
  value: item,
1664
1673
  itemId: String(item.id),
1665
1674
  label: itemToString(item),
1675
+ disabled: item.disabled,
1666
1676
  inputType,
1667
1677
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1668
1678
  },
@@ -1683,11 +1693,12 @@ function MultiCombobox(props) {
1683
1693
  import * as React10 from "react";
1684
1694
  import { Combobox as Combobox5 } from "@base-ui/react/combobox";
1685
1695
  import "@tanstack/react-virtual";
1686
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1696
+ import { Fragment as Fragment8, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1687
1697
  function SingleSearchableSelect(props) {
1688
1698
  const {
1689
1699
  id,
1690
1700
  placeholder = "Select...",
1701
+ includePlaceholderItem,
1691
1702
  searchPlaceholder = "Search...",
1692
1703
  emptyText = "No results found.",
1693
1704
  isLoading = false,
@@ -1810,6 +1821,7 @@ function SingleSearchableSelect(props) {
1810
1821
  value: item,
1811
1822
  itemId: String(item.id),
1812
1823
  label: itemToString(item),
1824
+ disabled: item.disabled,
1813
1825
  inputType,
1814
1826
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
1815
1827
  },
@@ -1817,17 +1829,29 @@ function SingleSearchableSelect(props) {
1817
1829
  ) })
1818
1830
  ] }),
1819
1831
  index < groups.length - 1 && /* @__PURE__ */ jsx10(ComboboxSeparator, {})
1820
- ] }, group.value) : (item) => /* @__PURE__ */ jsx10(
1821
- ComboboxItem_default,
1822
- {
1823
- value: item,
1824
- itemId: String(item.id),
1825
- label: itemToString(item),
1826
- inputType,
1827
- renderItem: renderItem ? () => renderItem(item) : void 0
1828
- },
1829
- item.id
1830
- )
1832
+ ] }, group.value) : /* @__PURE__ */ jsxs8(Fragment8, { children: [
1833
+ includePlaceholderItem && /* @__PURE__ */ jsx10(
1834
+ ComboboxItem_default,
1835
+ {
1836
+ value: null,
1837
+ itemId: "placeholder",
1838
+ label: placeholder
1839
+ },
1840
+ "placeholder"
1841
+ ),
1842
+ /* @__PURE__ */ jsx10(Combobox5.Collection, { children: (item) => /* @__PURE__ */ jsx10(
1843
+ ComboboxItem_default,
1844
+ {
1845
+ value: item,
1846
+ itemId: String(item.id),
1847
+ label: itemToString(item),
1848
+ disabled: item.disabled,
1849
+ inputType,
1850
+ renderItem: renderItem ? () => renderItem(item) : void 0
1851
+ },
1852
+ item.id
1853
+ ) })
1854
+ ] })
1831
1855
  }
1832
1856
  )
1833
1857
  ]
@@ -1998,6 +2022,7 @@ function MultiSearchableSelect(props) {
1998
2022
  value: item,
1999
2023
  itemId: String(item.id),
2000
2024
  label: itemToString(item),
2025
+ disabled: item.disabled,
2001
2026
  inputType,
2002
2027
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
2003
2028
  },
@@ -2112,6 +2137,7 @@ function MultiSearchableSelect(props) {
2112
2137
  value: item,
2113
2138
  itemId: String(item.id),
2114
2139
  label: itemToString(item),
2140
+ disabled: item.disabled,
2115
2141
  inputType,
2116
2142
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
2117
2143
  },
@@ -2125,6 +2151,7 @@ function MultiSearchableSelect(props) {
2125
2151
  value: item,
2126
2152
  itemId: String(item.id),
2127
2153
  label: itemToString(item),
2154
+ disabled: item.disabled,
2128
2155
  inputType,
2129
2156
  renderItem: renderItem ? () => renderItem(item) : () => itemToString(item)
2130
2157
  },