@sproutsocial/seeds-react-menu 1.8.6 → 1.9.2

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.
@@ -3,27 +3,27 @@ $ tsup --dts
3
3
  CLI Building entry: {"index":"src/index.ts","v2/index":"src/v2/index.ts"}
4
4
  CLI Using tsconfig: tsconfig.json
5
5
  CLI tsup v8.5.0
6
- CLI Using tsup config: /home/runner/work/seeds/seeds/seeds-react/seeds-react-menu/tsup.config.ts
6
+ CLI Using tsup config: /home/runner/_work/seeds/seeds/seeds-react/seeds-react-menu/tsup.config.ts
7
7
  CLI Target: es2022
8
8
  CLI Cleaning output folder
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  CJS dist/index.js 90.52 KB
12
- CJS dist/v2/index.js 71.79 KB
12
+ CJS dist/v2/index.js 72.63 KB
13
13
  CJS dist/index.js.map 176.37 KB
14
- CJS dist/v2/index.js.map 149.19 KB
15
- CJS ⚡️ Build success in 403ms
14
+ CJS dist/v2/index.js.map 151.20 KB
15
+ CJS ⚡️ Build success in 65ms
16
16
  ESM dist/esm/index.js 71.41 KB
17
- ESM dist/esm/v2/index.js 61.25 KB
18
17
  ESM dist/esm/chunk-ROQATIB7.js 9.15 KB
18
+ ESM dist/esm/v2/index.js 62.08 KB
19
19
  ESM dist/esm/index.js.map 152.38 KB
20
- ESM dist/esm/v2/index.js.map 129.54 KB
21
20
  ESM dist/esm/chunk-ROQATIB7.js.map 22.93 KB
22
- ESM ⚡️ Build success in 406ms
21
+ ESM dist/esm/v2/index.js.map 131.58 KB
22
+ ESM ⚡️ Build success in 65ms
23
23
  DTS Build start
24
- DTS ⚡️ Build success in 16885ms
24
+ DTS ⚡️ Build success in 4976ms
25
25
  DTS dist/index.d.ts 39.04 KB
26
- DTS dist/v2/index.d.ts 5.22 KB
26
+ DTS dist/v2/index.d.ts 5.43 KB
27
27
  DTS dist/index.d.mts 39.04 KB
28
- DTS dist/v2/index.d.mts 5.22 KB
29
- Done in 18.50s.
28
+ DTS dist/v2/index.d.mts 5.43 KB
29
+ Done in 5.66s.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # @sproutsocial/seeds-react-menu
2
2
 
3
+ ## 1.9.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [7d54d67]
8
+ - @sproutsocial/seeds-react-button@1.4.0
9
+ - @sproutsocial/seeds-react-popout@2.4.28
10
+ - @sproutsocial/seeds-react-input@1.5.7
11
+ - @sproutsocial/seeds-react-token-input@1.4.28
12
+
13
+ ## 1.9.1
14
+
15
+ ### Patch Changes
16
+
17
+ - b3d31ac: Clear MultiAutocomplete input text when the popout closes
18
+ - c281089: Fix popoutPlacement="top" rendering the popout invisible
19
+ - Updated dependencies [17d4f12]
20
+ - @sproutsocial/seeds-react-theme@3.6.0
21
+ - @sproutsocial/seeds-react-box@1.1.14
22
+ - @sproutsocial/seeds-react-icon@2.2.5
23
+ - @sproutsocial/seeds-react-label@1.0.14
24
+ - @sproutsocial/seeds-react-token-input@1.4.27
25
+ - @sproutsocial/seeds-react-checkbox@1.3.24
26
+ - @sproutsocial/seeds-react-input@1.5.6
27
+ - @sproutsocial/seeds-react-popout@2.4.27
28
+ - @sproutsocial/seeds-react-button@1.3.20
29
+ - @sproutsocial/seeds-react-switch@1.2.23
30
+ - @sproutsocial/seeds-react-radio@1.3.14
31
+
32
+ ## 1.9.0
33
+
34
+ ### Minor Changes
35
+
36
+ - 2194620: Fixed scroll bar mouse handling bugs in AutoComplete V2
37
+
38
+ ## 1.8.7
39
+
40
+ ### Patch Changes
41
+
42
+ - fe24df3: Enable `Select` component consumers to control popoutProps
43
+ - @sproutsocial/seeds-react-button@1.3.19
44
+ - @sproutsocial/seeds-react-checkbox@1.3.23
45
+ - @sproutsocial/seeds-react-input@1.5.5
46
+ - @sproutsocial/seeds-react-radio@1.3.13
47
+ - @sproutsocial/seeds-react-switch@1.2.22
48
+ - @sproutsocial/seeds-react-token-input@1.4.26
49
+ - @sproutsocial/seeds-react-popout@2.4.26
50
+
3
51
  ## 1.8.6
4
52
 
5
53
  ### Patch Changes
@@ -217,8 +217,21 @@ function Popout({
217
217
  const popoverOnOpenChange = isControlled ? onOpenChange : handleOpenChange;
218
218
  const radixRef = React2.useRef(null);
219
219
  return /* @__PURE__ */ jsxs(Popover.Root, { open: popoverOpen, onOpenChange: popoverOnOpenChange, children: [
220
- /* @__PURE__ */ jsx(Popover.Trigger, { ref: radixRef, asChild: true, children }),
221
- /* @__PURE__ */ jsx(Popover.Anchor, { children: /* @__PURE__ */ jsx("div", { style: { height: "1px" }, children: "\xA0" }) }),
220
+ /* @__PURE__ */ jsxs("div", { style: { position: "relative" }, children: [
221
+ /* @__PURE__ */ jsx(Popover.Trigger, { ref: radixRef, asChild: true, children }),
222
+ /* @__PURE__ */ jsx(
223
+ Popover.Anchor,
224
+ {
225
+ style: {
226
+ position: "absolute",
227
+ top: side === "top" ? 0 : "100%",
228
+ left: 0,
229
+ right: 0,
230
+ height: "1px"
231
+ }
232
+ }
233
+ )
234
+ ] }),
222
235
  /* @__PURE__ */ jsx(Popover.Portal, { children: /* @__PURE__ */ jsx(
223
236
  StyledContent,
224
237
  {
@@ -608,7 +621,8 @@ var VirtualizedComboboxContent = ({
608
621
  {
609
622
  style: {
610
623
  height: `${rowVirtualizer.getTotalSize()}px`,
611
- position: "relative"
624
+ position: "relative",
625
+ overflow: "hidden"
612
626
  },
613
627
  children: /* @__PURE__ */ jsx6(
614
628
  "div",
@@ -938,7 +952,8 @@ function SingleSelect({
938
952
  inputType = "icon",
939
953
  removePlaceholderItem = false,
940
954
  onPointerDownOutside,
941
- onInteractOutside
955
+ onInteractOutside,
956
+ popoutPlacement
942
957
  }) {
943
958
  const [uncontrolledSelectedItemId, setUncontrolledSelectedItemId] = useState2(null);
944
959
  const [uncontrolledIsOpen, setUncontrolledIsOpen] = useState2(false);
@@ -1037,6 +1052,7 @@ function SingleSelect({
1037
1052
  {
1038
1053
  open: selectIsOpen,
1039
1054
  onOpenChange: updateIsOpen,
1055
+ side: popoutPlacement,
1040
1056
  animationConfig: menuAnimationConfig,
1041
1057
  onOpenAutoFocus: (e) => {
1042
1058
  e.preventDefault();
@@ -1153,7 +1169,8 @@ function MultiSelect({
1153
1169
  inputType = "checkbox",
1154
1170
  shouldOverflow,
1155
1171
  onPointerDownOutside,
1156
- onInteractOutside
1172
+ onInteractOutside,
1173
+ popoutPlacement
1157
1174
  }) {
1158
1175
  const [uncontrolledSelectedItemIds, setUncontrolledSelectedItemIds] = useState3([]);
1159
1176
  const [uncontrolledIsOpen, setUncontrolledIsOpen] = useState3(false);
@@ -1328,6 +1345,7 @@ function MultiSelect({
1328
1345
  {
1329
1346
  open: selectIsOpen,
1330
1347
  onOpenChange: updateIsOpen,
1348
+ side: popoutPlacement,
1331
1349
  onOpenAutoFocus: (e) => {
1332
1350
  e.preventDefault();
1333
1351
  },
@@ -1443,7 +1461,8 @@ function SingleAutocomplete({
1443
1461
  inputType = "icon",
1444
1462
  includePlaceholderItem = false,
1445
1463
  onPointerDownOutside,
1446
- onInteractOutside
1464
+ onInteractOutside,
1465
+ popoutPlacement
1447
1466
  }) {
1448
1467
  const [uncontrolledInputValue, setUncontrolledInputValue] = useState4("");
1449
1468
  const [uncontrolledSelectedItemId, setUncontrolledSelectedItemId] = useState4(null);
@@ -1613,6 +1632,7 @@ function SingleAutocomplete({
1613
1632
  {
1614
1633
  open: comboboxIsOpen,
1615
1634
  onOpenChange: updateIsOpen,
1635
+ side: popoutPlacement,
1616
1636
  animationConfig: menuAnimationConfig,
1617
1637
  onOpenAutoFocus: (e) => {
1618
1638
  e.preventDefault();
@@ -1679,7 +1699,7 @@ function SingleAutocomplete({
1679
1699
  }
1680
1700
 
1681
1701
  // src/v2/Autocomplete/MultiAutocomplete.tsx
1682
- import { useState as useState5, useMemo as useMemo6 } from "react";
1702
+ import { useState as useState5, useMemo as useMemo6, useRef as useRef3 } from "react";
1683
1703
  import { useCombobox as useCombobox2, useMultipleSelection as useMultipleSelection2 } from "downshift";
1684
1704
  import { TokenInput } from "@sproutsocial/seeds-react-token-input";
1685
1705
  import { jsx as jsx10 } from "react/jsx-runtime";
@@ -1729,8 +1749,10 @@ function MultiAutocomplete({
1729
1749
  menuProps,
1730
1750
  inputType = "checkbox",
1731
1751
  onPointerDownOutside,
1732
- onInteractOutside
1752
+ onInteractOutside,
1753
+ popoutPlacement
1733
1754
  }) {
1755
+ const mousedownInPopoverRef = useRef3(false);
1734
1756
  const [uncontrolledInputValue, setUncontrolledInputValue] = useState5("");
1735
1757
  const [uncontrolledSelectedItemIds, setUncontrolledSelectedItemIds] = useState5([]);
1736
1758
  const [uncontrolledIsOpen, setUncontrolledIsOpen] = useState5(false);
@@ -1757,6 +1779,9 @@ function MultiAutocomplete({
1757
1779
  onInputValueChange?.(newInputValue);
1758
1780
  };
1759
1781
  const updateIsOpen = (newIsOpen) => {
1782
+ if (!newIsOpen) {
1783
+ updateInputValue("");
1784
+ }
1760
1785
  if (!isIsOpenControlled) {
1761
1786
  setUncontrolledIsOpen(newIsOpen);
1762
1787
  }
@@ -1933,6 +1958,11 @@ function MultiAutocomplete({
1933
1958
  if (inputProps.onBlur) {
1934
1959
  inputProps.onBlur(e);
1935
1960
  }
1961
+ if (mousedownInPopoverRef.current) {
1962
+ mousedownInPopoverRef.current = false;
1963
+ e.target.focus();
1964
+ return;
1965
+ }
1936
1966
  updateIsOpen(false);
1937
1967
  };
1938
1968
  const inputPropsToSpread = { ...inputProps };
@@ -1942,6 +1972,7 @@ function MultiAutocomplete({
1942
1972
  {
1943
1973
  open: comboboxIsOpen,
1944
1974
  onOpenChange: updateIsOpen,
1975
+ side: popoutPlacement,
1945
1976
  onOpenAutoFocus: (e) => {
1946
1977
  e.preventDefault();
1947
1978
  },
@@ -1951,6 +1982,12 @@ function MultiAutocomplete({
1951
1982
  onPointerDownOutside,
1952
1983
  onInteractOutside,
1953
1984
  animationConfig: menuAnimationConfig,
1985
+ onMouseDown: () => {
1986
+ mousedownInPopoverRef.current = true;
1987
+ },
1988
+ onMouseUp: () => {
1989
+ mousedownInPopoverRef.current = false;
1990
+ },
1954
1991
  content: /* @__PURE__ */ jsx10(
1955
1992
  ComboboxContent,
1956
1993
  {