@eqtylab/equality 5.4.4 → 5.4.5

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,27 @@
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
+ ## 5.4.5 - 2026-11-17
6
+
7
+ ### Changed
8
+
9
+ - On a touch screen, a searchable `Select`, `DropdownMenu`, `FilterDropdown` or `RadioDropdown`
10
+ leaves its search unfocused when it opens, and `FilterDropdown`'s "Clear all" returns focus to
11
+ the menu, so the phone's keyboard doesn't cover the list. A tap on the search box, or a typed
12
+ key, focuses it.
13
+
14
+ ### Fixed
15
+
16
+ - A table row with an `sm` `IconButton`, the default size, such as an actions menu or a
17
+ `CopyButton`, is as tall as a row of text. The button overhangs the row's padding instead of
18
+ setting the row's height.
19
+ - `SortButton` draws Equality's focus ring. Chromium drew its own rounded ring, and Firefox a
20
+ square one.
21
+ - `Input`, `SearchBar`, `CommandInput`, `SelectSearch` and `DropdownMenuSearch` set 16px text
22
+ below `md`, as `Textarea` does. Under 16px, iOS Safari zooms into a focused field and stays zoomed.
23
+ - The same fields end a placeholder, or an unfocused value, that doesn't fit in "…". It was cut off
24
+ mid-word.
25
+
5
26
  ## 5.4.4 - 2026-11-16
6
27
 
7
28
  ### Fixed
@@ -84,11 +84,16 @@
84
84
  flex-shrink: 0;
85
85
  }
86
86
  .command-input-input {
87
- font-size: 0.875rem;
88
- line-height: var(--tw-leading, calc(1.25 / 0.875));
87
+ font-size: 1rem;
88
+ line-height: var(--tw-leading, calc(1.5 / 1));
89
+ text-overflow: ellipsis;
89
90
  &::placeholder {
90
91
  color: var(--color-text-secondary, color(display-p3 0.1792 0.1792 0.1792));
91
92
  }
93
+ @media (width >= 48rem) {
94
+ font-size: 0.875rem;
95
+ line-height: var(--tw-leading, calc(1.25 / 0.875));
96
+ }
92
97
  border-radius: var(--radius-md, 0.375rem);
93
98
  background-color: transparent;
94
99
  --tw-outline-style: none;
@@ -346,9 +346,14 @@
346
346
  background-color: transparent;
347
347
  --tw-outline-style: none;
348
348
  outline-style: none;
349
- font-size: 0.875rem;
350
- line-height: var(--tw-leading, calc(1.25 / 0.875));
349
+ font-size: 1rem;
350
+ line-height: var(--tw-leading, calc(1.5 / 1));
351
+ text-overflow: ellipsis;
351
352
  color: var(--color-text-primary, color(display-p3 0 0 0));
353
+ @media (width >= 48rem) {
354
+ font-size: 0.875rem;
355
+ line-height: var(--tw-leading, calc(1.25 / 0.875));
356
+ }
352
357
  &::placeholder {
353
358
  color: var(--color-text-secondary, color(display-p3 0.1792 0.1792 0.1792));
354
359
  }
package/dist/index.cjs CHANGED
@@ -1050,6 +1050,7 @@ var IconButton = React16__namespace.forwardRef(
1050
1050
  target,
1051
1051
  download,
1052
1052
  "aria-label": label,
1053
+ "data-icon-button": size || "sm",
1053
1054
  rel: target === "_blank" ? "noopener noreferrer" : void 0,
1054
1055
  className: cn(iconButtonVariants({ size, variant }), className),
1055
1056
  ...props,
@@ -1063,6 +1064,7 @@ var IconButton = React16__namespace.forwardRef(
1063
1064
  ref,
1064
1065
  type: "button",
1065
1066
  "aria-label": label,
1067
+ "data-icon-button": size || "sm",
1066
1068
  disabled,
1067
1069
  className: cn(iconButtonVariants({ size, variant }), className),
1068
1070
  ...props,
@@ -1936,7 +1938,7 @@ function useFilterableItem(state, textValue, children, { group, persistent = fal
1936
1938
  return matches;
1937
1939
  }
1938
1940
  function useSearchInput(state, alwaysVisible, forwardedRef) {
1939
- const { setEnabled, reveal, visible, focusSignal } = state;
1941
+ const { setEnabled, reveal, visible, focusSignal, interactedSinceOpen } = state;
1940
1942
  const inputRef = React16__namespace.useRef(null);
1941
1943
  const ref = React16__namespace.useCallback(
1942
1944
  (node) => assignRefs(node, inputRef, forwardedRef),
@@ -1950,9 +1952,10 @@ function useSearchInput(state, alwaysVisible, forwardedRef) {
1950
1952
  if (!visible) return;
1951
1953
  const input = inputRef.current;
1952
1954
  if (!input) return;
1955
+ if (!interactedSinceOpen() && hasCoarsePointer()) return;
1953
1956
  input.focus();
1954
1957
  input.setSelectionRange(input.value.length, input.value.length);
1955
- }, [visible, focusSignal]);
1958
+ }, [visible, focusSignal, interactedSinceOpen]);
1956
1959
  React16__namespace.useEffect(() => {
1957
1960
  if (alwaysVisible && !visible) reveal("");
1958
1961
  }, [alwaysVisible, visible, reveal]);
@@ -2005,6 +2008,7 @@ function handleListKeyDown(state, event, { searchSelector, itemSelector }) {
2005
2008
  state.requestFocus();
2006
2009
  }
2007
2010
  }
2011
+ var hasCoarsePointer = () => window.matchMedia?.("(pointer: coarse)").matches ?? false;
2008
2012
  var isPrintableKey = (event) => event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey && /\S/.test(event.key);
2009
2013
  function assignRefs(node, ...refs) {
2010
2014
  refs.forEach((ref) => {
@@ -2414,7 +2418,8 @@ var FilterDropdown = ({
2414
2418
  const handleClearAll = (event) => {
2415
2419
  event.preventDefault();
2416
2420
  const menu = event.currentTarget.closest('[role="menu"]');
2417
- (menu?.querySelector("[data-dropdown-search]") ?? menu)?.focus();
2421
+ const search = hasCoarsePointer() ? null : menu?.querySelector("[data-dropdown-search]");
2422
+ (search ?? menu)?.focus();
2418
2423
  onClearAll();
2419
2424
  };
2420
2425
  const clearAll = (className) => (