@eqtylab/equality 4.4.1 → 4.4.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  Notable changes to Equality are recorded here, following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
4
 
5
+ ## 4.4.2 - 2026-09-25
6
+
7
+ ### Fixed
8
+
9
+ - A `Select` list is now exactly as wide as its trigger, not 10px wider. Options wider than the
10
+ trigger still widen it.
11
+ - A `Select` list scrolls with a native scrollbar. The scroll arrows are gone: the down arrow
12
+ stayed up after a search emptied the list, and the up arrow sat above the search box.
13
+ - In a searchable `Select` or `DropdownMenu`, <kbd>↓</kbd> on the last option returns to the
14
+ search box, as <kbd>↑</kbd> on the first already did.
15
+ - A searchable `Select` or `DropdownMenu` near the edge of the screen stays on screen while
16
+ searching. Locking its side also turned off collision handling, so the list shifted back to
17
+ its unadjusted position, partly off screen, until it reopened.
18
+ - `FilterDropdown` options no longer wrap onto a second line. The menu widens from `w-56` up to
19
+ `max-w-80` to fit them, and a longer label ends in an ellipsis, with the full label in its
20
+ tooltip.
21
+
22
+ ### Removed
23
+
24
+ - `SelectScrollUpButton` and `SelectScrollDownButton`. `SelectContent` owns the element they
25
+ must sit in, so they could only ever be rendered by `SelectContent` itself.
26
+
5
27
  ## 4.4.1 - 2026-09-25
6
28
 
7
29
  ### Fixed
@@ -31,6 +31,13 @@
31
31
  }
32
32
  .dropdown-menu-content {
33
33
  max-height: calc(0.25rem * 80);
34
- width: calc(0.25rem * 56);
34
+ max-width: calc(0.25rem * 80);
35
+ min-width: calc(0.25rem * 56);
35
36
  overflow: auto;
36
37
  }
38
+ .option-label {
39
+ min-width: calc(0.25rem * 0);
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
43
+ }
package/dist/index.cjs CHANGED
@@ -1877,7 +1877,7 @@ function useSearchSideLock(state, contentRef, {
1877
1877
  const placed = contentRef.current?.dataset.side;
1878
1878
  if (placed) lockSide?.(placed);
1879
1879
  }, [enabled, searching, lockedSide, lockSide, contentRef]);
1880
- return lockedSide && enabled ? { side: lockedSide, avoidCollisions: false } : { side, avoidCollisions };
1880
+ return { side: lockedSide && enabled ? lockedSide : side, avoidCollisions };
1881
1881
  }
1882
1882
  var isSearchActive = (state) => !!state && state.query.trim().length > 0;
1883
1883
  var isSearchEmpty = (state) => isSearchActive(state) && state.matchCount === 0;
@@ -1951,9 +1951,10 @@ function handleListKeyDown(state, event, { searchSelector, itemSelector }) {
1951
1951
  if (!state?.enabled) return;
1952
1952
  const target = event.target;
1953
1953
  if (target?.closest(searchSelector)) return;
1954
- if (event.key === "ArrowUp" && state.visible) {
1955
- const firstItem = event.currentTarget.querySelector(itemSelector);
1956
- if (firstItem && firstItem === target?.closest(itemSelector)) {
1954
+ if ((event.key === "ArrowUp" || event.key === "ArrowDown") && state.visible) {
1955
+ const items = event.currentTarget.querySelectorAll(itemSelector);
1956
+ const edgeItem = event.key === "ArrowUp" ? items[0] : items[items.length - 1];
1957
+ if (edgeItem && edgeItem === target?.closest(itemSelector)) {
1957
1958
  event.preventDefault();
1958
1959
  state.requestFocus();
1959
1960
  return;
@@ -2433,7 +2434,7 @@ var FilterDropdown = ({
2433
2434
  checked: isSelected,
2434
2435
  onCheckedChange: () => onToggleFilter(option.value),
2435
2436
  onSelect: (e) => e.preventDefault(),
2436
- children: option.label
2437
+ children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles24__default.default["option-label"], title: option.label, children: option.label })
2437
2438
  },
2438
2439
  option.value
2439
2440
  );
@@ -2951,7 +2952,6 @@ var NotFound = ({
2951
2952
  };
2952
2953
  var CheckIcon3 = LucideIcons.Check;
2953
2954
  var ChevronDownIcon2 = LucideIcons.ChevronDown;
2954
- var ChevronUpIcon = LucideIcons.ChevronUp;
2955
2955
  var SearchIcon3 = LucideIcons.Search;
2956
2956
  var SEARCH_INPUT_SELECTOR2 = "[data-select-search]";
2957
2957
  var NAVIGABLE_OPTION_SELECTOR = '[role="option"]:not([data-disabled]):not([hidden])';
@@ -3004,26 +3004,6 @@ var SelectTrigger = React15__namespace.forwardRef(({ className, children, ...pro
3004
3004
  /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Icon, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon2, { className: cn(styles37__default.default["select-icon"], styles37__default.default["select-icon--low-opacity"]) }) })
3005
3005
  ] }));
3006
3006
  SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
3007
- var SelectScrollUpButton = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3008
- SelectPrimitive__namespace.ScrollUpButton,
3009
- {
3010
- ref,
3011
- className: cn(styles37__default.default["select-scroll-button"], className),
3012
- ...props,
3013
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronUpIcon, { className: styles37__default.default["select-icon"] })
3014
- }
3015
- ));
3016
- SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
3017
- var SelectScrollDownButton = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
3018
- SelectPrimitive__namespace.ScrollDownButton,
3019
- {
3020
- ref,
3021
- className: cn(styles37__default.default["select-scroll-button"], className),
3022
- ...props,
3023
- children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon2, { className: styles37__default.default["select-icon"] })
3024
- }
3025
- ));
3026
- SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
3027
3007
  var SelectPortal = ({ children }) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { container: usePortalContainer(), children });
3028
3008
  var selectContentElevationVariants = generateElevationVariants(
3029
3009
  styles37__default.default,
@@ -3099,7 +3079,6 @@ var SelectContent = React15__namespace.forwardRef(
3099
3079
  ...props,
3100
3080
  children: [
3101
3081
  ctx?.enabled ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles37__default.default["select-sr-status"], role: "status", "aria-live": "polite", children: searching && resultCount > 0 ? formatResultCount(resultCount) : null }) : null,
3102
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
3103
3082
  /* @__PURE__ */ jsxRuntime.jsx(
3104
3083
  SelectPrimitive__namespace.Viewport,
3105
3084
  {
@@ -3109,8 +3088,7 @@ var SelectContent = React15__namespace.forwardRef(
3109
3088
  ),
3110
3089
  children
3111
3090
  }
3112
- ),
3113
- /* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
3091
+ )
3114
3092
  ]
3115
3093
  }
3116
3094
  ) });
@@ -4886,8 +4864,6 @@ exports.SelectEmpty = SelectEmpty;
4886
4864
  exports.SelectGroup = SelectGroup;
4887
4865
  exports.SelectItem = SelectItem;
4888
4866
  exports.SelectLabel = SelectLabel;
4889
- exports.SelectScrollDownButton = SelectScrollDownButton;
4890
- exports.SelectScrollUpButton = SelectScrollUpButton;
4891
4867
  exports.SelectSearch = SelectSearch;
4892
4868
  exports.SelectSeparator = SelectSeparator;
4893
4869
  exports.SelectTrigger = SelectTrigger;