@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.
- package/.turbo/turbo-build.log +16 -16
- package/CHANGELOG.md +6 -0
- package/dist/esm/v3/index.js +62 -35
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/v3/index.d.mts +2 -0
- package/dist/v3/index.d.ts +2 -0
- package/dist/v3/index.js +61 -34
- package/dist/v3/index.js.map +1 -1
- package/package.json +1 -1
- package/src/v3/Common/ComboboxItem.tsx +3 -0
- package/src/v3/Common/SelectItem.tsx +3 -0
- package/src/v3/Common/types.ts +1 -0
- package/src/v3/MultiCombobox.stories.tsx +25 -1
- package/src/v3/MultiCombobox.tsx +3 -0
- package/src/v3/MultiSearchableSelect.stories.tsx +26 -1
- package/src/v3/MultiSearchableSelect.tsx +3 -0
- package/src/v3/MultiSelect.stories.tsx +24 -1
- package/src/v3/MultiSelect.tsx +2 -0
- package/src/v3/SingleCombobox.stories.tsx +25 -1
- package/src/v3/SingleCombobox.tsx +2 -0
- package/src/v3/SingleSearchableSelect.stories.tsx +46 -1
- package/src/v3/SingleSearchableSelect.tsx +28 -12
- package/src/v3/SingleSelect.stories.tsx +24 -1
- package/src/v3/SingleSelect.tsx +2 -1
- package/src/v3/storyData.tsx +5 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -8,28 +8,28 @@ $ tsup --dts
|
|
|
8
8
|
[34mCLI[39m Cleaning output folder
|
|
9
9
|
[34mCJS[39m Build start
|
|
10
10
|
[34mESM[39m Build start
|
|
11
|
-
[32mESM[39m [1mdist/esm/v2/index.js [22m[32m62.63 KB[39m
|
|
12
|
-
[32mESM[39m [1mdist/esm/index.js [22m[32m73.57 KB[39m
|
|
13
|
-
[32mESM[39m [1mdist/esm/v3/index.js [22m[32m79.98 KB[39m
|
|
14
|
-
[32mESM[39m [1mdist/esm/chunk-ROQATIB7.js [22m[32m9.15 KB[39m
|
|
15
|
-
[32mESM[39m [1mdist/esm/v2/index.js.map [22m[32m132.57 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/esm/index.js.map [22m[32m156.22 KB[39m
|
|
17
|
-
[32mESM[39m [1mdist/esm/v3/index.js.map [22m[32m156.55 KB[39m
|
|
18
|
-
[32mESM[39m [1mdist/esm/chunk-ROQATIB7.js.map [22m[32m22.93 KB[39m
|
|
19
|
-
[32mESM[39m ⚡️ Build success in 86ms
|
|
20
11
|
[32mCJS[39m [1mdist/index.js [22m[32m92.62 KB[39m
|
|
21
|
-
[32mCJS[39m [1mdist/v3/index.js [22m[
|
|
12
|
+
[32mCJS[39m [1mdist/v3/index.js [22m[32m92.22 KB[39m
|
|
22
13
|
[32mCJS[39m [1mdist/v2/index.js [22m[32m73.18 KB[39m
|
|
23
14
|
[32mCJS[39m [1mdist/index.js.map [22m[32m180.20 KB[39m
|
|
24
|
-
[32mCJS[39m [1mdist/v3/index.js.map [22m[
|
|
15
|
+
[32mCJS[39m [1mdist/v3/index.js.map [22m[32m158.32 KB[39m
|
|
25
16
|
[32mCJS[39m [1mdist/v2/index.js.map [22m[32m152.19 KB[39m
|
|
26
|
-
[32mCJS[39m ⚡️ Build success in
|
|
17
|
+
[32mCJS[39m ⚡️ Build success in 94ms
|
|
18
|
+
[32mESM[39m [1mdist/esm/index.js [22m[32m73.57 KB[39m
|
|
19
|
+
[32mESM[39m [1mdist/esm/chunk-ROQATIB7.js [22m[32m9.15 KB[39m
|
|
20
|
+
[32mESM[39m [1mdist/esm/v2/index.js [22m[32m62.63 KB[39m
|
|
21
|
+
[32mESM[39m [1mdist/esm/v3/index.js [22m[32m81.09 KB[39m
|
|
22
|
+
[32mESM[39m [1mdist/esm/index.js.map [22m[32m156.22 KB[39m
|
|
23
|
+
[32mESM[39m [1mdist/esm/chunk-ROQATIB7.js.map [22m[32m22.93 KB[39m
|
|
24
|
+
[32mESM[39m [1mdist/esm/v2/index.js.map [22m[32m132.57 KB[39m
|
|
25
|
+
[32mESM[39m [1mdist/esm/v3/index.js.map [22m[32m158.35 KB[39m
|
|
26
|
+
[32mESM[39m ⚡️ Build success in 94ms
|
|
27
27
|
[34mDTS[39m Build start
|
|
28
|
-
[32mDTS[39m ⚡️ Build success in
|
|
28
|
+
[32mDTS[39m ⚡️ Build success in 6872ms
|
|
29
29
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m39.08 KB[39m
|
|
30
30
|
[32mDTS[39m [1mdist/v2/index.d.ts [22m[32m5.55 KB[39m
|
|
31
|
-
[32mDTS[39m [1mdist/v3/index.d.ts [22m[32m17.
|
|
31
|
+
[32mDTS[39m [1mdist/v3/index.d.ts [22m[32m17.65 KB[39m
|
|
32
32
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m39.08 KB[39m
|
|
33
33
|
[32mDTS[39m [1mdist/v2/index.d.mts [22m[32m5.55 KB[39m
|
|
34
|
-
[32mDTS[39m [1mdist/v3/index.d.mts [22m[32m17.
|
|
35
|
-
Done in 7.
|
|
34
|
+
[32mDTS[39m [1mdist/v3/index.d.mts [22m[32m17.65 KB[39m
|
|
35
|
+
Done in 7.67s.
|
package/CHANGELOG.md
CHANGED
package/dist/esm/v3/index.js
CHANGED
|
@@ -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
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
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) :
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
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
|
},
|