@12-apps/ui 6.41.0 → 6.41.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.
Files changed (73) hide show
  1. package/dist/_internal/components/data-display/DataViews/DataViewsGrid.js +8 -8
  2. package/dist/_internal/components/data-display/DataViews/DataViewsTableBase.js +9 -9
  3. package/dist/_internal/components/data-display/DataViews/data-views-category-pill.js +1 -1
  4. package/dist/_internal/components/data-display/DataViews/data-views-filter-panel.js +2 -2
  5. package/dist/_internal/components/data-display/DataViews/data-views-grid-parts.js +7 -7
  6. package/dist/_internal/components/data-display/DataViews/data-views-inline-bar.js +4 -4
  7. package/dist/_internal/components/data-display/DataViews/data-views-more-fields.js +24 -1
  8. package/dist/_internal/components/data-display/DataViews/data-views-more-filters.js +23 -2
  9. package/dist/_internal/components/data-display/DataViews/data-views-overflow.js +1 -1
  10. package/dist/_internal/components/form/Autocomplete/Autocomplete.js +2 -2
  11. package/dist/_internal/components/form/Autocomplete/useAutocomplete.js +1 -1
  12. package/dist/_internal/components/form/index.js +2 -2
  13. package/dist/_internal/components/index.js +2 -2
  14. package/dist/_internal/components/layout/SettingsLayout/SettingsLayout.js +4 -4
  15. package/dist/_internal/components/layout/SettingsLayout/SettingsPanel.js +3 -3
  16. package/dist/_internal/components/layout/SettingsLayout/SettingsSectionChips.js +2 -2
  17. package/dist/_internal/components/layout/SettingsLayout/SettingsSectionChips.scroll.js +7 -1
  18. package/dist/{chunk-ODW2D5PN.js → chunk-6QYKZMEE.js} +5 -2
  19. package/dist/{chunk-ODW2D5PN.js.map → chunk-6QYKZMEE.js.map} +1 -1
  20. package/dist/{chunk-Y2UXX5IQ.js → chunk-BKZERHNC.js} +2 -2
  21. package/dist/{chunk-M4P7NS2L.js → chunk-BR2T72JI.js} +23 -15
  22. package/dist/chunk-BR2T72JI.js.map +1 -0
  23. package/dist/{chunk-UGPRBJWB.js → chunk-DH77PLFF.js} +5 -5
  24. package/dist/chunk-GT2RCOHM.js +184 -0
  25. package/dist/chunk-GT2RCOHM.js.map +1 -0
  26. package/dist/{chunk-EIII4QU4.js → chunk-HFVYWHJT.js} +4 -4
  27. package/dist/{chunk-VEEG4UXZ.js → chunk-IUD6N52Q.js} +2 -2
  28. package/dist/{chunk-RZ2VZ7SL.js → chunk-JMEPGXJG.js} +2 -2
  29. package/dist/{chunk-J6KLT7HP.js → chunk-MEBQKYH4.js} +2 -2
  30. package/dist/{chunk-XVZG52CM.js → chunk-NOLSQK4J.js} +23 -25
  31. package/dist/chunk-NOLSQK4J.js.map +1 -0
  32. package/dist/{chunk-VWJEM2ER.js → chunk-NPPJ3IJP.js} +2 -2
  33. package/dist/chunk-NPPJ3IJP.js.map +1 -0
  34. package/dist/{chunk-CKHFYTIX.js → chunk-TBMGYQJF.js} +15 -5
  35. package/dist/chunk-TBMGYQJF.js.map +1 -0
  36. package/dist/{chunk-TCNTIGMY.js → chunk-TDXEO2UI.js} +2 -2
  37. package/dist/{chunk-FTQBVZ7V.js → chunk-TJ3334AJ.js} +2 -2
  38. package/dist/{chunk-VOJBLBXE.js → chunk-UT73NGRS.js} +2 -2
  39. package/dist/data-display/DataViews.js +9 -9
  40. package/dist/form/Autocomplete.js +2 -2
  41. package/dist/layout/SettingsLayout.js +4 -4
  42. package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts +6 -1
  43. package/dist/types/components/data-display/DataViews/data-views-category-pill.d.ts.map +1 -1
  44. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts +0 -11
  45. package/dist/types/components/data-display/DataViews/data-views-more-fields.d.ts.map +1 -1
  46. package/dist/types/components/data-display/DataViews/data-views-overflow.d.ts.map +1 -1
  47. package/dist/types/components/form/Autocomplete/useAutocomplete.d.ts +9 -0
  48. package/dist/types/components/form/Autocomplete/useAutocomplete.d.ts.map +1 -1
  49. package/dist/types/components/layout/SettingsLayout/SettingsSectionChips.d.ts.map +1 -1
  50. package/dist/types/components/layout/SettingsLayout/SettingsSectionChips.scroll.d.ts +20 -2
  51. package/dist/types/components/layout/SettingsLayout/SettingsSectionChips.scroll.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/src/components/data-display/DataViews/data-views-category-pill.tsx +6 -1
  54. package/src/components/data-display/DataViews/data-views-more-fields.tsx +43 -37
  55. package/src/components/data-display/DataViews/data-views-overflow.ts +12 -1
  56. package/src/components/form/Autocomplete/useAutocomplete.ts +46 -16
  57. package/src/components/layout/SettingsLayout/SettingsSectionChips.scroll.ts +212 -28
  58. package/src/components/layout/SettingsLayout/SettingsSectionChips.tsx +24 -4
  59. package/dist/chunk-CKHFYTIX.js.map +0 -1
  60. package/dist/chunk-M4P7NS2L.js.map +0 -1
  61. package/dist/chunk-SLJAQA2X.js +0 -82
  62. package/dist/chunk-SLJAQA2X.js.map +0 -1
  63. package/dist/chunk-VWJEM2ER.js.map +0 -1
  64. package/dist/chunk-XVZG52CM.js.map +0 -1
  65. /package/dist/{chunk-Y2UXX5IQ.js.map → chunk-BKZERHNC.js.map} +0 -0
  66. /package/dist/{chunk-UGPRBJWB.js.map → chunk-DH77PLFF.js.map} +0 -0
  67. /package/dist/{chunk-EIII4QU4.js.map → chunk-HFVYWHJT.js.map} +0 -0
  68. /package/dist/{chunk-VEEG4UXZ.js.map → chunk-IUD6N52Q.js.map} +0 -0
  69. /package/dist/{chunk-RZ2VZ7SL.js.map → chunk-JMEPGXJG.js.map} +0 -0
  70. /package/dist/{chunk-J6KLT7HP.js.map → chunk-MEBQKYH4.js.map} +0 -0
  71. /package/dist/{chunk-TCNTIGMY.js.map → chunk-TDXEO2UI.js.map} +0 -0
  72. /package/dist/{chunk-FTQBVZ7V.js.map → chunk-TJ3334AJ.js.map} +0 -0
  73. /package/dist/{chunk-VOJBLBXE.js.map → chunk-UT73NGRS.js.map} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-6KEXHOIF.js";
4
4
  import {
5
5
  SettingsSectionChips
6
- } from "./chunk-CKHFYTIX.js";
6
+ } from "./chunk-TBMGYQJF.js";
7
7
  import {
8
8
  TOUCH_TARGET,
9
9
  atLeastRail,
@@ -167,4 +167,4 @@ function SettingsPanel({
167
167
  export {
168
168
  SettingsPanel
169
169
  };
170
- //# sourceMappingURL=chunk-TCNTIGMY.js.map
170
+ //# sourceMappingURL=chunk-TDXEO2UI.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MoreGroup,
3
3
  fieldClearing
4
- } from "./chunk-XVZG52CM.js";
4
+ } from "./chunk-NOLSQK4J.js";
5
5
  import {
6
6
  useDataViewsCopy
7
7
  } from "./chunk-KHG57NAE.js";
@@ -184,4 +184,4 @@ function MoreFilters({
184
184
  export {
185
185
  MoreFilters
186
186
  };
187
- //# sourceMappingURL=chunk-FTQBVZ7V.js.map
187
+ //# sourceMappingURL=chunk-TJ3334AJ.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GridShell
3
- } from "./chunk-EIII4QU4.js";
3
+ } from "./chunk-HFVYWHJT.js";
4
4
  import {
5
5
  useDataViewsState
6
6
  } from "./chunk-HKBJZX3C.js";
@@ -27,4 +27,4 @@ function DataViewsGrid(props) {
27
27
  export {
28
28
  DataViewsGrid
29
29
  };
30
- //# sourceMappingURL=chunk-VOJBLBXE.js.map
30
+ //# sourceMappingURL=chunk-UT73NGRS.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  DataViewsTableBase
3
- } from "../chunk-J6KLT7HP.js";
3
+ } from "../chunk-MEBQKYH4.js";
4
4
  import {
5
5
  DataViewsGrid
6
- } from "../chunk-VOJBLBXE.js";
6
+ } from "../chunk-UT73NGRS.js";
7
7
  import {
8
8
  BaseCard
9
9
  } from "../chunk-4S2LWZ7L.js";
@@ -22,22 +22,22 @@ import {
22
22
  useDragItem
23
23
  } from "../chunk-K4EKTMTC.js";
24
24
  import "../chunk-ZOLAYP2D.js";
25
- import "../chunk-EIII4QU4.js";
26
- import "../chunk-Y2UXX5IQ.js";
25
+ import "../chunk-HFVYWHJT.js";
26
+ import "../chunk-BKZERHNC.js";
27
27
  import "../chunk-3UEZ6NUI.js";
28
- import "../chunk-UGPRBJWB.js";
28
+ import "../chunk-DH77PLFF.js";
29
29
  import "../chunk-BM4KKGL7.js";
30
- import "../chunk-VWJEM2ER.js";
31
30
  import "../chunk-KW3H5FUS.js";
32
31
  import "../chunk-LODMNSLR.js";
33
32
  import {
34
33
  DataViewsBoard
35
34
  } from "../chunk-4XHVGUOM.js";
36
35
  import "../chunk-BA6Z52QN.js";
37
- import "../chunk-ODW2D5PN.js";
36
+ import "../chunk-6QYKZMEE.js";
38
37
  import "../chunk-DNT5PZLF.js";
39
- import "../chunk-FTQBVZ7V.js";
40
- import "../chunk-XVZG52CM.js";
38
+ import "../chunk-TJ3334AJ.js";
39
+ import "../chunk-NOLSQK4J.js";
40
+ import "../chunk-NPPJ3IJP.js";
41
41
  import "../chunk-4UVFPORR.js";
42
42
  import "../chunk-6N2EDWMG.js";
43
43
  import "../chunk-O5UGAL2V.js";
@@ -2,8 +2,8 @@ import "../chunk-2LXHUGYB.js";
2
2
  import {
3
3
  Autocomplete,
4
4
  Autocomplete_default
5
- } from "../chunk-VEEG4UXZ.js";
6
- import "../chunk-M4P7NS2L.js";
5
+ } from "../chunk-IUD6N52Q.js";
6
+ import "../chunk-BR2T72JI.js";
7
7
  import "../chunk-PELRSZFU.js";
8
8
  import "../chunk-XBLFK2FL.js";
9
9
  import "../chunk-JXS56EW5.js";
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  SettingsLayout
3
- } from "../chunk-RZ2VZ7SL.js";
3
+ } from "../chunk-JMEPGXJG.js";
4
4
  import "../chunk-TNYKM4UU.js";
5
5
  import "../chunk-V5EWCJBT.js";
6
6
  import "../chunk-BXC6GRLE.js";
7
- import "../chunk-TCNTIGMY.js";
7
+ import "../chunk-TDXEO2UI.js";
8
8
  import "../chunk-6KEXHOIF.js";
9
9
  import {
10
10
  SettingsSectionChips
11
- } from "../chunk-CKHFYTIX.js";
11
+ } from "../chunk-TBMGYQJF.js";
12
12
  import {
13
13
  SettingsStatusMarker
14
14
  } from "../chunk-DBFRCTI5.js";
15
15
  import "../chunk-NYFNF7I5.js";
16
- import "../chunk-SLJAQA2X.js";
16
+ import "../chunk-GT2RCOHM.js";
17
17
  import "../chunk-HPK33ACY.js";
18
18
  import "../chunk-YKCAJ2TN.js";
19
19
  import "../chunk-PZ5AY32C.js";
@@ -16,6 +16,11 @@ interface PillControlProps<T extends Record<string, unknown>> {
16
16
  onClearField: (fieldId: string) => void;
17
17
  onOpenChange?: (open: boolean) => void;
18
18
  testIdPrefix: string;
19
+ /**
20
+ * Overrides the `<prefix>-filter-<id>` test id — the "Mais" panel keys its
21
+ * fields `<prefix>-more-<id>` so a spec can tell which surface it drove.
22
+ */
23
+ testId?: string;
19
24
  /** `stacked` in the filter panel, `pill` on the inline bar. */
20
25
  layout?: "stacked" | "pill";
21
26
  }
@@ -32,6 +37,6 @@ interface PillControlProps<T extends Record<string, unknown>> {
32
37
  * wants "the whole category" as one click, while one whose parents are pure
33
38
  * grouping would only offer a tick that means nothing.
34
39
  */
35
- export declare function PillControl<T extends Record<string, unknown>>({ fieldId, pill, selected, onTogglePill, onClearField, onOpenChange, testIdPrefix, layout, }: PillControlProps<T>): React.JSX.Element;
40
+ export declare function PillControl<T extends Record<string, unknown>>({ fieldId, pill, selected, onTogglePill, onClearField, onOpenChange, testIdPrefix, testId, layout, }: PillControlProps<T>): React.JSX.Element;
36
41
  export {};
37
42
  //# sourceMappingURL=data-views-category-pill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-views-category-pill.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-category-pill.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAE1E;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,GACvE,IAAI,CASN;AASD,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC7D,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,MAAe,GAChB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqCzC"}
1
+ {"version":3,"file":"data-views-category-pill.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-category-pill.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AAE1E;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,GACvE,IAAI,CASN;AASD,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC7D,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,MAA4C,EAC5C,MAAe,GAChB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoCzC"}
@@ -8,17 +8,6 @@ export interface MoreFieldProps {
8
8
  onChangeRange: (fieldId: string, range: RangeValue) => void;
9
9
  testIdPrefix: string;
10
10
  }
11
- /**
12
- * The trigger, badged with how many fields had no room on the bar — and told
13
- * apart when some of them are APPLIED.
14
- *
15
- * An applied filter can land in here now (it is ranked first, not exempt), so
16
- * this button is the only thing on screen still saying it exists. A neutral
17
- * badge reading "3" would make "three filters you have not used" and "three
18
- * filters narrowing this list" look identical, which is the whole failure the
19
- * old exemption was written to avoid. So an overflow holding applied filters
20
- * takes the applied tone and counts them in its own badge.
21
-
22
11
  /**
23
12
  * Whether a field has anything applied, and how to unapply it — the two shapes
24
13
  * (a pill's selected values, a range's bounds) answered in one place so the
@@ -1 +1 @@
1
- {"version":3,"file":"data-views-more-fields.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-more-fields.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOrD,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,MAAM,CAAC;CACtB;AAqID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC/D,KAAK,EACL,KAAK,EACL,MAAM,EACN,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAC,GAAG;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAYA;AAGD,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC3D,KAAK,EACL,KAAK,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,YAAY,GACb,EAAE;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB,GAAG,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwDrC"}
1
+ {"version":3,"file":"data-views-more-fields.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-more-fields.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAOrD,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACnC,YAAY,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC5D,YAAY,EAAE,MAAM,CAAC;CACtB;AAsJD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC/D,KAAK,EACL,KAAK,EACL,MAAM,EACN,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,QAAQ,GAAG,cAAc,GAAG,eAAe,CAAC,GAAG;IAChF,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAYA;AAGD,2EAA2E;AAC3E,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAC3D,KAAK,EACL,KAAK,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,YAAY,GACb,EAAE;IACD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;CACzB,GAAG,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAwDrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"data-views-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAC7B;AAED,mEAAmE;AACnE,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7B;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;;OAOG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB;;;;;;OAMG;IACH,cAAc,EAAE,OAAO,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;CAChD;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAC9B,WAAW,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,GACjC,aAAa,CAAC,CAAC,CAAC,EAAE,CAKpB;AA4MD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjE,GAAG,EAAE,aAAa,CAAC,CAAC,CAAC,EAAE,EACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAC/B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC;AAClC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAQ;AACd,iEAAiE;AACjE,SAAS,UAAO,GACf,aAAa,CAAC,CAAC,CAAC,CAsBlB"}
1
+ {"version":3,"file":"data-views-overflow.d.ts","sourceRoot":"","sources":["../../../../../src/components/data-display/DataViews/data-views-overflow.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1F;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9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,iEAAiE;AACjE,SAAS,UAAO,GACf,aAAa,CAAC,CAAC,CAAC,CAiClB"}
@@ -20,6 +20,15 @@ interface AutocompleteState<T> {
20
20
  setJustCompletedGhost: Setter<boolean>;
21
21
  userClosedDropdown: boolean;
22
22
  setUserClosedDropdown: Setter<boolean>;
23
+ /**
24
+ * Mirrors `userClosedDropdown`, set synchronously wherever the state is
25
+ * (see {@link setDeliberateClose}). An effect scheduled by one render and
26
+ * flushed after a LATER render has already changed this flag reads a
27
+ * stale, closed-over `userClosedDropdown` — but `.current` on a ref is
28
+ * dereferenced live, so it always reflects the latest write regardless of
29
+ * which render's closure is doing the reading (FUT-2780).
30
+ */
31
+ userClosedDropdownRef: React.RefObject<boolean>;
23
32
  inputRef: React.RefObject<HTMLInputElement | null>;
24
33
  listRef: React.RefObject<HTMLUListElement | null>;
25
34
  debounceRef: React.RefObject<number | undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"useAutocomplete.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/Autocomplete/useAutocomplete.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,KAAK,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzD,8DAA8D;AAC9D,UAAU,iBAAiB,CAAC,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,WAAW,EAAE,OAAO,CAAC;IACrB,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","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsSectionChips.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAejE,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEnF,MAAM,WAAW,yBAAyB;IACxC,yEAAyE;IACzE,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB;AA+LD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,YAAY,GACb,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAoC/C;yBA3Ce,oBAAoB"}
1
+ {"version":3,"file":"SettingsSectionChips.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsSectionChips.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAejE,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEnF,MAAM,WAAW,yBAAyB;IACxC,yEAAyE;IACzE,KAAK,EAAE,eAAe,EAAE,CAAC;IACzB,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;CACtB;AA2MD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,YAAY,EACZ,YAAY,GACb,EAAE,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA4C/C;yBAnDe,oBAAoB"}
@@ -12,10 +12,14 @@ interface VisitorScrollWatch {
12
12
  * strip must not scroll itself under it: that would yank a drag in progress.
13
13
  */
14
14
  isUndecided: () => boolean;
15
- /** Where the strip last aimed itself, in its own pixels; `NaN` before it has. */
15
+ /**
16
+ * Where the strip last aimed itself, PHYSICAL pixels (see {@link physicalScrollLeft}) —
17
+ * direction-blind, like every other geometry read in this file. `NaN` before it has.
18
+ */
16
19
  aimedAt: () => number;
17
20
  /**
18
- * The strip is about to scroll itself to `left`. Records the aim and NOTHING
21
+ * The strip is about to scroll itself to `left` (physical pixels). Records the
22
+ * aim and NOTHING
19
23
  * else: it used to disarm too, and a re-centre landing between a visitor's key
20
24
  * press (or wheel, or pan) and the first tick of the scroll it causes wiped
21
25
  * the arming — their scroll went unclaimed, read as the strip's own. Left
@@ -27,6 +31,20 @@ interface VisitorScrollWatch {
27
31
  onSettled: (listener: () => void) => void;
28
32
  detach: () => void;
29
33
  }
34
+ /** True when the strip's own computed direction is right-to-left. */
35
+ export declare function isRtlStrip(strip: HTMLElement): boolean;
36
+ /**
37
+ * `strip.scrollLeft`, renumbered so `0` is always the strip's physical LEFT
38
+ * edge and larger is always further physically right — whatever `direction`
39
+ * and whatever convention this engine uses to report it raw (FUT-2775).
40
+ *
41
+ * Every geometry read in this file (`getBoundingClientRect`) is already in
42
+ * that same physical, direction-blind coordinate space, so this is what makes
43
+ * `scrollLeft` combinable with it at all.
44
+ */
45
+ export declare function physicalScrollLeft(strip: HTMLElement): number;
46
+ /** The inverse of {@link physicalScrollLeft}: a physical offset back to this engine's raw `scrollLeft`. */
47
+ export declare function toRawScrollLeft(strip: HTMLElement, physical: number): number;
30
48
  /**
31
49
  * Tell a scroll the VISITOR made from every other one.
32
50
  *
@@ -1 +1 @@
1
- {"version":3,"file":"SettingsSectionChips.scroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsSectionChips.scroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAkBH,UAAU,kBAAkB;IAC1B,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,iFAAiF;IACjF,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB;;;;;;;OAOG;IACH,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,wEAAwE;IACxE,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC1C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AA4BD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,kBAAkB,CA0EzE"}
1
+ {"version":3,"file":"SettingsSectionChips.scroll.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/SettingsLayout/SettingsSectionChips.scroll.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoCH,UAAU,kBAAkB;IAC1B,4DAA4D;IAC5D,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B;;;OAGG;IACH,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B;;;OAGG;IACH,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB;;;;;;;;OAQG;IACH,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,wEAAwE;IACxE,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;IAC1C,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AA4ED,qEAAqE;AACrE,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAItD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAQ7D;AAED,2GAA2G;AAC3G,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAO5E;AA6ED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,kBAAkB,CA6EzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@12-apps/ui",
3
- "version": "6.41.0",
3
+ "version": "6.41.2",
4
4
  "license": "MIT",
5
5
  "packageManager": "pnpm@10.34.5",
6
6
  "type": "module",
@@ -45,6 +45,11 @@ interface PillControlProps<T extends Record<string, unknown>> {
45
45
  onClearField: (fieldId: string) => void;
46
46
  onOpenChange?: (open: boolean) => void;
47
47
  testIdPrefix: string;
48
+ /**
49
+ * Overrides the `<prefix>-filter-<id>` test id — the "Mais" panel keys its
50
+ * fields `<prefix>-more-<id>` so a spec can tell which surface it drove.
51
+ */
52
+ testId?: string;
48
53
  /** `stacked` in the filter panel, `pill` on the inline bar. */
49
54
  layout?: "stacked" | "pill";
50
55
  }
@@ -70,10 +75,10 @@ export function PillControl<T extends Record<string, unknown>>({
70
75
  onClearField,
71
76
  onOpenChange,
72
77
  testIdPrefix,
78
+ testId = `${testIdPrefix}-filter-${fieldId}`,
73
79
  layout = "pill",
74
80
  }: PillControlProps<T>): React.JSX.Element {
75
81
  const copy = useDataViewsCopy();
76
- const testId = `${testIdPrefix}-filter-${fieldId}`;
77
82
  if (pill.control === "category") {
78
83
  return (
79
84
  <CategorySelect
@@ -9,15 +9,15 @@
9
9
  *
10
10
  * A field with one or two options renders FLAT: inside a panel there is no
11
11
  * space to win back, and two labelled checkboxes are faster than a dropdown
12
- * needing a second click. Past that it becomes a {@link MultiSelectDropdown} —
13
- * see `INLINE_OPTION_LIMIT`.
12
+ * needing a second click. Past that — or whenever the field asks for a tree or
13
+ * a search — it is the bar's own {@link PillControl}; see `sharesBarControl`.
14
14
  */
15
15
  import Checkbox from "@mui/material/Checkbox/index.js";
16
16
 
17
- import { MultiSelectDropdown } from "../../layout/ContentToolbar";
18
17
  import { Box } from "../../../mui/Box";
19
18
  import { Text } from "../../typography/Text";
20
19
 
20
+ import { PillControl } from "./data-views-category-pill";
21
21
  import type { OverflowField } from "./data-views-overflow";
22
22
  import { RangeBounds } from "./data-views-range-pill";
23
23
  import { isRangeSet } from "./data-views-range-values";
@@ -45,42 +45,59 @@ export interface MoreFieldProps {
45
45
  */
46
46
  const INLINE_OPTION_LIMIT = 2;
47
47
 
48
- /** One overflowed pill: its options as checkboxes, all visible at once. */
48
+ /**
49
+ * Whether an overflowed pill keeps the SAME control it has on the bar.
50
+ *
51
+ * The panel used to build its own flat dropdown for every field past two
52
+ * options, so a field's config only held while it fitted: `control:
53
+ * "category"` lost its tree (subcategories flattened into one list, no
54
+ * "Marcar tudo", no count footer) and `searchEnabled` lost its search, on
55
+ * exactly the phone widths where most filters live in here. Anything the bar
56
+ * would render as a dropdown now renders as the bar's own {@link PillControl};
57
+ * only a plain two-option field — one that did not ask for a dropdown, a tree
58
+ * or a search — stays a flat checkbox row, which is a panel layout rather than
59
+ * a different control (the filter panel draws the same line).
60
+ */
61
+ function sharesBarControl<T extends Record<string, unknown>>(field: OverflowField<T>): boolean {
62
+ const pill = field.pill;
63
+ if (!pill) return false;
64
+ return (
65
+ pill.control === "category" ||
66
+ pill.control === "multiselect" ||
67
+ pill.searchEnabled === true ||
68
+ pill.options.length > INLINE_OPTION_LIMIT
69
+ );
70
+ }
71
+
72
+ /** One overflowed pill: the bar's control, or its options as checkboxes. */
49
73
  function OverflowPill<T extends Record<string, unknown>>({
50
74
  field,
51
75
  values,
52
- onToggle,
76
+ onTogglePill,
53
77
  onClear,
54
78
  testIdPrefix,
55
79
  }: {
56
80
  field: OverflowField<T>;
57
81
  values: string[];
58
- onToggle: (value: string, checked: boolean) => void;
82
+ onTogglePill: (fieldId: string, value: string, checked: boolean) => void;
59
83
  onClear: () => void;
60
84
  testIdPrefix: string;
61
85
  }): React.JSX.Element {
62
- const copy = useDataViewsCopy();
63
- const options = field.pill?.options ?? [];
64
- if (options.length > INLINE_OPTION_LIMIT) {
86
+ const testId = `${testIdPrefix}-more-${field.id}`;
87
+ if (field.pill && sharesBarControl(field)) {
65
88
  return (
66
- <MultiSelectDropdown
67
- extraOptionsHeading={copy.filters.optionsHeading}
68
- clearText={copy.filters.clear}
69
- clearLabel={copy.filters.clearRange(field.label)}
70
- label={field.pill?.label ?? field.label}
71
- options={options}
72
- selected={new Set(values)}
73
- onToggle={onToggle}
74
- onClear={onClear}
75
- allLabel={copy.filters.allOption}
76
- searchable={options.length > 6 ? true : undefined}
77
- searchPlaceholder={copy.filters.optionSearchPlaceholder}
78
- noResultsLabel={copy.filters.optionsEmpty}
79
- layout="pill"
80
- data-testid={`${testIdPrefix}-more-${field.id}`}
89
+ <PillControl
90
+ fieldId={field.id}
91
+ pill={field.pill}
92
+ selected={values}
93
+ onTogglePill={onTogglePill}
94
+ onClearField={onClear}
95
+ testIdPrefix={testIdPrefix}
96
+ testId={testId}
81
97
  />
82
98
  );
83
99
  }
100
+ const onToggle = (value: string, checked: boolean) => onTogglePill(field.id, value, checked);
84
101
  return (
85
102
  <Box sx={{ display: "flex", flexWrap: "wrap", gap: 0.75 }}>
86
103
  {(field.pill?.options ?? []).map((option) => {
@@ -89,7 +106,7 @@ function OverflowPill<T extends Record<string, unknown>>({
89
106
  <Box
90
107
  key={option.value}
91
108
  component="label"
92
- data-testid={`${testIdPrefix}-more-${field.id}-${option.value}`}
109
+ data-testid={`${testId}-${option.value}`}
93
110
  sx={{
94
111
  display: "inline-flex",
95
112
  alignItems: "center",
@@ -168,17 +185,6 @@ function OverflowRange<T extends Record<string, unknown>>({
168
185
  );
169
186
  }
170
187
 
171
- /**
172
- * The trigger, badged with how many fields had no room on the bar — and told
173
- * apart when some of them are APPLIED.
174
- *
175
- * An applied filter can land in here now (it is ranked first, not exempt), so
176
- * this button is the only thing on screen still saying it exists. A neutral
177
- * badge reading "3" would make "three filters you have not used" and "three
178
- * filters narrowing this list" look identical, which is the whole failure the
179
- * old exemption was written to avoid. So an overflow holding applied filters
180
- * takes the applied tone and counts them in its own badge.
181
-
182
188
  /**
183
189
  * Whether a field has anything applied, and how to unapply it — the two shapes
184
190
  * (a pill's selected values, a range's bounds) answered in one place so the
@@ -262,7 +268,7 @@ export function MoreGroup<T extends Record<string, unknown>>({
262
268
  <OverflowPill
263
269
  field={field}
264
270
  values={pills[field.id] ?? []}
265
- onToggle={(value, checked) => onTogglePill(field.id, value, checked)}
271
+ onTogglePill={onTogglePill}
266
272
  onClear={() => (pills[field.id] ?? []).forEach((v) => onTogglePill(field.id, v, false))}
267
273
  testIdPrefix={testIdPrefix}
268
274
  />
@@ -361,5 +361,16 @@ export function useFilterOverflow<T extends Record<string, unknown>>(
361
361
  if (cache.current === null || (!frozen && cache.current.signature !== signature)) {
362
362
  cache.current = { signature, split: computeSplit(all, pills, ranges, width, hasExport, theme) };
363
363
  }
364
- return { ...cache.current.split, barRef };
364
+ // The cache holds the ARRANGEMENT — which ids sit on the bar, which in "Mais"
365
+ // — never the fields themselves. The signature keys on ids, so a field whose
366
+ // options arrive after the first measurement (a category list still loading)
367
+ // does not re-split, and handing back the cached objects served the empty
368
+ // list for good: "Categoria" in "Mais" rendered a label with no control under
369
+ // it (FUT-2828). Re-reading each field from `all` keeps the slots and the
370
+ // current config.
371
+ const { split } = cache.current;
372
+ const current = new Map(all.map((field) => [field.id, field]));
373
+ const fresh = (fields: OverflowField<T>[]): OverflowField<T>[] =>
374
+ fields.map((field) => current.get(field.id) ?? field);
375
+ return { ...split, inline: fresh(split.inline), overflow: fresh(split.overflow), barRef };
365
376
  }
@@ -35,6 +35,15 @@ interface AutocompleteState<T> {
35
35
  setJustCompletedGhost: Setter<boolean>;
36
36
  userClosedDropdown: boolean;
37
37
  setUserClosedDropdown: Setter<boolean>;
38
+ /**
39
+ * Mirrors `userClosedDropdown`, set synchronously wherever the state is
40
+ * (see {@link setDeliberateClose}). An effect scheduled by one render and
41
+ * flushed after a LATER render has already changed this flag reads a
42
+ * stale, closed-over `userClosedDropdown` — but `.current` on a ref is
43
+ * dereferenced live, so it always reflects the latest write regardless of
44
+ * which render's closure is doing the reading (FUT-2780).
45
+ */
46
+ userClosedDropdownRef: React.RefObject<boolean>;
38
47
  inputRef: React.RefObject<HTMLInputElement | null>;
39
48
  listRef: React.RefObject<HTMLUListElement | null>;
40
49
  debounceRef: React.RefObject<number | undefined>;
@@ -50,6 +59,7 @@ function useAutocompleteState<T>(value: string, suggestions: T[]): AutocompleteS
50
59
  const [isInputFocused, setIsInputFocused] = useState(false);
51
60
  const [justCompletedGhost, setJustCompletedGhost] = useState(false);
52
61
  const [userClosedDropdown, setUserClosedDropdown] = useState(false);
62
+ const userClosedDropdownRef = useRef(false);
53
63
  const inputRef = useRef<HTMLInputElement>(null);
54
64
  const listRef = useRef<HTMLUListElement | null>(null);
55
65
  const debounceRef = useRef<number | undefined>(undefined);
@@ -57,10 +67,21 @@ function useAutocompleteState<T>(value: string, suggestions: T[]): AutocompleteS
57
67
  open, setOpen, activeIndex, setActiveIndex, ghost, setGhost, inputValue, setInputValue,
58
68
  composition, setComposition, filteredSuggestions, setFilteredSuggestions, isInputFocused,
59
69
  setIsInputFocused, justCompletedGhost, setJustCompletedGhost, userClosedDropdown,
60
- setUserClosedDropdown, inputRef, listRef, debounceRef,
70
+ setUserClosedDropdown, userClosedDropdownRef, inputRef, listRef, debounceRef,
61
71
  };
62
72
  }
63
73
 
74
+ /**
75
+ * Set the "this close was deliberate" flag in both the ref effects read
76
+ * synchronously (live, even from a stale closure) and the state the rest of
77
+ * the component reads for render — every call site that touches
78
+ * `userClosedDropdown` goes through this so the two never drift (FUT-2780).
79
+ */
80
+ function setDeliberateClose<T>(s: AutocompleteState<T>, closed: boolean): void {
81
+ s.userClosedDropdownRef.current = closed;
82
+ s.setUserClosedDropdown(closed);
83
+ }
84
+
64
85
  // ---- effects (one tiny hook each; explicit params keep deps complete) --------
65
86
 
66
87
  function useValueSync(value: string, setInputValue: Setter<string>): void {
@@ -101,17 +122,17 @@ function useLoadingOpen(
101
122
  isLoading: boolean,
102
123
  inputValue: string,
103
124
  disabled: boolean,
104
- userClosedDropdown: boolean,
125
+ userClosedDropdownRef: React.RefObject<boolean>,
105
126
  setOpen: Setter<boolean>,
106
127
  setActiveIndex: Setter<number>,
107
128
  ): void {
108
129
  useEffect(() => {
109
- if (isLoading && inputValue.trim().length > 0 && !disabled && !userClosedDropdown) setOpen(true);
130
+ if (isLoading && inputValue.trim().length > 0 && !disabled && !userClosedDropdownRef.current) setOpen(true);
110
131
  if (disabled) {
111
132
  setOpen(false);
112
133
  setActiveIndex(-1);
113
134
  }
114
- }, [isLoading, inputValue, disabled, userClosedDropdown, setOpen, setActiveIndex]);
135
+ }, [isLoading, inputValue, disabled, userClosedDropdownRef, setOpen, setActiveIndex]);
115
136
  }
116
137
 
117
138
  /** Inputs to the auto-open check, all primitive/stable so effect deps stay complete. */
@@ -120,7 +141,7 @@ interface AutoOpenArgs {
120
141
  isInputFocused: boolean;
121
142
  composition: boolean;
122
143
  justCompletedGhost: boolean;
123
- userClosedDropdown: boolean;
144
+ userClosedDropdownRef: React.RefObject<boolean>;
124
145
  activeIndex: number;
125
146
  setOpen: Setter<boolean>;
126
147
  setActiveIndex: Setter<number>;
@@ -133,7 +154,7 @@ function maybeAutoOpen(a: AutoOpenArgs, hasResults: boolean): void {
133
154
  a.isInputFocused &&
134
155
  !a.composition &&
135
156
  !a.justCompletedGhost &&
136
- !a.userClosedDropdown;
157
+ !a.userClosedDropdownRef.current;
137
158
  if (!canAutoOpen) return;
138
159
  a.setOpen(true);
139
160
  if (hasResults && a.activeIndex === -1) a.setActiveIndex(0);
@@ -146,7 +167,7 @@ function useLocalFilter<T>(p: AutocompleteProps<T>, s: AutocompleteState<T>): vo
146
167
  const async = Boolean(p.async);
147
168
  const {
148
169
  inputValue, isInputFocused, composition, justCompletedGhost, userClosedDropdown, activeIndex,
149
- setFilteredSuggestions, setOpen, setActiveIndex,
170
+ setFilteredSuggestions, setOpen, setActiveIndex, userClosedDropdownRef,
150
171
  } = s;
151
172
  useEffect(() => {
152
173
  const suggestions = propSuggestions ?? [];
@@ -157,12 +178,17 @@ function useLocalFilter<T>(p: AutocompleteProps<T>, s: AutocompleteState<T>): vo
157
178
  const filtered = filterSuggestions(suggestions, inputValue, matchMode, getLabel);
158
179
  setFilteredSuggestions(filtered);
159
180
  maybeAutoOpen(
160
- { inputValue, isInputFocused, composition, justCompletedGhost, userClosedDropdown, activeIndex, setOpen, setActiveIndex },
181
+ { inputValue, isInputFocused, composition, justCompletedGhost, userClosedDropdownRef, activeIndex, setOpen, setActiveIndex },
161
182
  filtered.length > 0,
162
183
  );
184
+ // `userClosedDropdown` (state) stays a dependency so this effect still
185
+ // reruns on every change of it, same as before — only the VALUE read
186
+ // inside `maybeAutoOpen` moved to the ref (see `userClosedDropdownRef`'s
187
+ // doc comment).
163
188
  }, [
164
189
  propSuggestions, inputValue, async, getLabel, matchMode, isInputFocused, composition,
165
190
  justCompletedGhost, userClosedDropdown, activeIndex, setFilteredSuggestions, setOpen, setActiveIndex,
191
+ userClosedDropdownRef,
166
192
  ]);
167
193
  }
168
194
 
@@ -189,7 +215,7 @@ function commitMultiSelect<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteS
189
215
  if (!current.some((sel) => getKey(sel) === getKey(item))) p.onSelectedItemsChange?.([...current, item]);
190
216
  s.setInputValue('');
191
217
  onChange('');
192
- s.setUserClosedDropdown(false);
218
+ setDeliberateClose(s, false);
193
219
  }
194
220
 
195
221
  function commitSingleSelect<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteState<T>, onChange: (v: string) => void): void {
@@ -227,8 +253,11 @@ function runSelectItem<T>(item: T, p: AutocompleteProps<T>, s: AutocompleteState
227
253
  // Set LAST so a re-fired `onFocus` cannot clear the flag. The close itself
228
254
  // relies on the input never blurring during a pick (the option's
229
255
  // `onMouseDown` preventDefault, and Enter keeps focus): `onFocus` reopens a
230
- // non-empty input directly, without reading this flag.
231
- if (isSingleSelectPick) s.setUserClosedDropdown(true);
256
+ // non-empty input directly, without reading this flag. The REF half is set
257
+ // in the same synchronous tick as the pick, so an effect scheduled by an
258
+ // earlier keystroke — and still pending when this runs — reads the
259
+ // up-to-date value instead of the one it closed over (FUT-2780).
260
+ if (isSingleSelectPick) setDeliberateClose(s, true);
232
261
  }
233
262
 
234
263
  function buildKeyContext<T>(
@@ -244,7 +273,8 @@ function buildKeyContext<T>(
244
273
  multiple: Boolean(p.multiple), selectedItems: p.selectedItems ?? [],
245
274
  getLabel: p.getLabel ?? defaultGetLabel,
246
275
  getSuggestionType: p.getSuggestionType ?? defaultGetSuggestionType,
247
- setOpen: s.setOpen, setActiveIndex: s.setActiveIndex, setUserClosedDropdown: s.setUserClosedDropdown,
276
+ setOpen: s.setOpen, setActiveIndex: s.setActiveIndex,
277
+ setUserClosedDropdown: (closed: boolean) => setDeliberateClose(s, closed),
248
278
  setInputValue: s.setInputValue, setGhost: s.setGhost, setJustCompletedGhost: s.setJustCompletedGhost,
249
279
  debouncedOnChange: onChange, selectItem, onSelectedItemsChange: p.onSelectedItemsChange,
250
280
  };
@@ -287,7 +317,7 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
287
317
  Boolean(p.isLoading),
288
318
  s.inputValue,
289
319
  Boolean(p.disabled),
290
- s.userClosedDropdown,
320
+ s.userClosedDropdownRef,
291
321
  s.setOpen,
292
322
  s.setActiveIndex,
293
323
  );
@@ -315,11 +345,11 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
315
345
  s.setInputValue(e.target.value);
316
346
  debouncedOnChange(e.target.value);
317
347
  if (!s.open || s.filteredSuggestions.length === 0) s.setActiveIndex(-1);
318
- s.setUserClosedDropdown(false);
348
+ setDeliberateClose(s, false);
319
349
  },
320
350
  onFocus: (): void => {
321
351
  s.setIsInputFocused(true);
322
- s.setUserClosedDropdown(false);
352
+ setDeliberateClose(s, false);
323
353
  if (!s.inputValue.trim()) return;
324
354
  s.setOpen(true);
325
355
  if (s.filteredSuggestions.length > 0 && s.activeIndex === -1) s.setActiveIndex(0);
@@ -330,7 +360,7 @@ export function useAutocomplete<T>(p: AutocompleteProps<T>): AutocompleteView<T>
330
360
  onClickAway: (): void => {
331
361
  s.setOpen(false);
332
362
  s.setActiveIndex(-1);
333
- s.setUserClosedDropdown(true);
363
+ setDeliberateClose(s, true);
334
364
  },
335
365
  };
336
366
  }