@eqtylab/equality 5.4.4 → 5.5.0

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,44 @@
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.5.0 - 2026-11-17
6
+
7
+ ### Added
8
+
9
+ - `Timeline`, a record of what happened to one thing, in order: entries down a rail, in sections
10
+ marked by the state they happened under. It is three parts: `Timeline`, `TimelineSection` and
11
+ `TimelineItem`. A section draws a marker for its state, joined to the next by a connector, and
12
+ the marker stays pinned beside its entries as they scroll. A section takes an `icon`, a Lucide
13
+ element such as `<Clock />`, an optional `label` that says its state to a screen reader, and one
14
+ of the five status variants, defaulting to `neutral`. `success`, `warning` and `danger` sections
15
+ default to `Badge`'s icons for those variants; `neutral` and `primary` sections need an `icon`. `size` is `sm` (a 20px marker, an
16
+ icon-only `Badge`) or `md` (40px, an `md` `Button`'s height, the default).
17
+ - `--eq-timeline-offset`, a length, pins a `Timeline`'s markers that far below the top of the
18
+ scrolling area, such as under a sticky header. It defaults to `0px`.
19
+ - `--eq-timeline-marker-background` and `--eq-timeline-marker-color` colour a `TimelineSection`'s
20
+ marker and connector for a state no variant covers, such as a control status.
21
+
22
+ ## 5.4.5 - 2026-11-17
23
+
24
+ ### Changed
25
+
26
+ - On a touch screen, a searchable `Select`, `DropdownMenu`, `FilterDropdown` or `RadioDropdown`
27
+ leaves its search unfocused when it opens, and `FilterDropdown`'s "Clear all" returns focus to
28
+ the menu, so the phone's keyboard doesn't cover the list. A tap on the search box, or a typed
29
+ key, focuses it.
30
+
31
+ ### Fixed
32
+
33
+ - A table row with an `sm` `IconButton`, the default size, such as an actions menu or a
34
+ `CopyButton`, is as tall as a row of text. The button overhangs the row's padding instead of
35
+ setting the row's height.
36
+ - `SortButton` draws Equality's focus ring. Chromium drew its own rounded ring, and Firefox a
37
+ square one.
38
+ - `Input`, `SearchBar`, `CommandInput`, `SelectSearch` and `DropdownMenuSearch` set 16px text
39
+ below `md`, as `Textarea` does. Under 16px, iOS Safari zooms into a focused field and stays zoomed.
40
+ - The same fields end a placeholder, or an unfocused value, that doesn't fit in "…". It was cut off
41
+ mid-word.
42
+
5
43
  ## 5.4.4 - 2026-11-16
6
44
 
7
45
  ### 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
@@ -86,11 +86,12 @@ var TabsPrimitive = require('@radix-ui/react-tabs');
86
86
  var styles60 = require('./tabs-components.module.module.css.module.css');
87
87
  var styles61 = require('./tabs.module.module.css.module.css');
88
88
  var styles62 = require('./textarea.module.module.css.module.css');
89
+ var styles63 = require('./timeline.module.module.css.module.css');
89
90
  var ToastPrimitives = require('@radix-ui/react-toast');
90
- var styles63 = require('./toast-components.module.module.css.module.css');
91
- var styles64 = require('./toast.module.module.css.module.css');
92
- var styles65 = require('./truncated-description.module.module.css.module.css');
93
- var styles66 = require('./theme.module.module.css.module.css');
91
+ var styles64 = require('./toast-components.module.module.css.module.css');
92
+ var styles65 = require('./toast.module.module.css.module.css');
93
+ var styles66 = require('./truncated-description.module.module.css.module.css');
94
+ var styles67 = require('./theme.module.module.css.module.css');
94
95
 
95
96
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
96
97
 
@@ -189,11 +190,12 @@ var TabsPrimitive__namespace = /*#__PURE__*/_interopNamespace(TabsPrimitive);
189
190
  var styles60__default = /*#__PURE__*/_interopDefault(styles60);
190
191
  var styles61__default = /*#__PURE__*/_interopDefault(styles61);
191
192
  var styles62__default = /*#__PURE__*/_interopDefault(styles62);
192
- var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives);
193
193
  var styles63__default = /*#__PURE__*/_interopDefault(styles63);
194
+ var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives);
194
195
  var styles64__default = /*#__PURE__*/_interopDefault(styles64);
195
196
  var styles65__default = /*#__PURE__*/_interopDefault(styles65);
196
197
  var styles66__default = /*#__PURE__*/_interopDefault(styles66);
198
+ var styles67__default = /*#__PURE__*/_interopDefault(styles67);
197
199
 
198
200
  // src/components/alert-dialog/alert-dialog.tsx
199
201
  var PORTAL_ROOT_ID = "equality-theme-provider-root-portal";
@@ -353,12 +355,12 @@ var ELEVATION = {
353
355
  RAISED: "raised",
354
356
  OVERLAY: "overlay"
355
357
  };
356
- var generateElevationVariants = (styles67, baseClassName, defaultElevation) => {
358
+ var generateElevationVariants = (styles68, baseClassName, defaultElevation) => {
357
359
  const classNames = {};
358
360
  Object.values(ELEVATION).forEach((elevation) => {
359
- classNames[elevation] = styles67[`${baseClassName}--${elevation}`];
361
+ classNames[elevation] = styles68[`${baseClassName}--${elevation}`];
360
362
  });
361
- const variants = classVarianceAuthority.cva(styles67[baseClassName], {
363
+ const variants = classVarianceAuthority.cva(styles68[baseClassName], {
362
364
  variants: {
363
365
  elevation: classNames
364
366
  },
@@ -1050,6 +1052,7 @@ var IconButton = React16__namespace.forwardRef(
1050
1052
  target,
1051
1053
  download,
1052
1054
  "aria-label": label,
1055
+ "data-icon-button": size || "sm",
1053
1056
  rel: target === "_blank" ? "noopener noreferrer" : void 0,
1054
1057
  className: cn(iconButtonVariants({ size, variant }), className),
1055
1058
  ...props,
@@ -1063,6 +1066,7 @@ var IconButton = React16__namespace.forwardRef(
1063
1066
  ref,
1064
1067
  type: "button",
1065
1068
  "aria-label": label,
1069
+ "data-icon-button": size || "sm",
1066
1070
  disabled,
1067
1071
  className: cn(iconButtonVariants({ size, variant }), className),
1068
1072
  ...props,
@@ -1936,7 +1940,7 @@ function useFilterableItem(state, textValue, children, { group, persistent = fal
1936
1940
  return matches;
1937
1941
  }
1938
1942
  function useSearchInput(state, alwaysVisible, forwardedRef) {
1939
- const { setEnabled, reveal, visible, focusSignal } = state;
1943
+ const { setEnabled, reveal, visible, focusSignal, interactedSinceOpen } = state;
1940
1944
  const inputRef = React16__namespace.useRef(null);
1941
1945
  const ref = React16__namespace.useCallback(
1942
1946
  (node) => assignRefs(node, inputRef, forwardedRef),
@@ -1950,9 +1954,10 @@ function useSearchInput(state, alwaysVisible, forwardedRef) {
1950
1954
  if (!visible) return;
1951
1955
  const input = inputRef.current;
1952
1956
  if (!input) return;
1957
+ if (!interactedSinceOpen() && hasCoarsePointer()) return;
1953
1958
  input.focus();
1954
1959
  input.setSelectionRange(input.value.length, input.value.length);
1955
- }, [visible, focusSignal]);
1960
+ }, [visible, focusSignal, interactedSinceOpen]);
1956
1961
  React16__namespace.useEffect(() => {
1957
1962
  if (alwaysVisible && !visible) reveal("");
1958
1963
  }, [alwaysVisible, visible, reveal]);
@@ -2005,6 +2010,7 @@ function handleListKeyDown(state, event, { searchSelector, itemSelector }) {
2005
2010
  state.requestFocus();
2006
2011
  }
2007
2012
  }
2013
+ var hasCoarsePointer = () => window.matchMedia?.("(pointer: coarse)").matches ?? false;
2008
2014
  var isPrintableKey = (event) => event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey && /\S/.test(event.key);
2009
2015
  function assignRefs(node, ...refs) {
2010
2016
  refs.forEach((ref) => {
@@ -2414,7 +2420,8 @@ var FilterDropdown = ({
2414
2420
  const handleClearAll = (event) => {
2415
2421
  event.preventDefault();
2416
2422
  const menu = event.currentTarget.closest('[role="menu"]');
2417
- (menu?.querySelector("[data-dropdown-search]") ?? menu)?.focus();
2423
+ const search = hasCoarsePointer() ? null : menu?.querySelector("[data-dropdown-search]");
2424
+ (search ?? menu)?.focus();
2418
2425
  onClearAll();
2419
2426
  };
2420
2427
  const clearAll = (className) => (
@@ -5164,24 +5171,74 @@ var Textarea = React16__namespace.forwardRef(
5164
5171
  }
5165
5172
  );
5166
5173
  Textarea.displayName = "Textarea";
5174
+ var timelineVariants = classVarianceAuthority.cva(styles63__default.default["timeline"], {
5175
+ variants: {
5176
+ /** The markers' size: `sm` an icon-only Badge, `md` as tall as a Button */
5177
+ size: {
5178
+ sm: styles63__default.default["timeline--sm"],
5179
+ md: styles63__default.default["timeline--md"]
5180
+ }
5181
+ },
5182
+ defaultVariants: {
5183
+ size: "md"
5184
+ }
5185
+ });
5186
+ var timelineSectionVariants = classVarianceAuthority.cva(styles63__default.default["timeline-section"], {
5187
+ variants: {
5188
+ /** The status the section's marker and connector report */
5189
+ variant: {
5190
+ neutral: "",
5191
+ primary: styles63__default.default["timeline-section--primary"],
5192
+ success: styles63__default.default["timeline-section--success"],
5193
+ warning: styles63__default.default["timeline-section--warning"],
5194
+ danger: styles63__default.default["timeline-section--danger"]
5195
+ }
5196
+ },
5197
+ defaultVariants: {
5198
+ variant: "neutral"
5199
+ }
5200
+ });
5201
+ var Timeline = React16__namespace.forwardRef(
5202
+ ({ className, size, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("ol", { ref, className: cn(timelineVariants({ size }), className), ...props, children })
5203
+ );
5204
+ Timeline.displayName = "Timeline";
5205
+ var defaultVariantIcons3 = {
5206
+ success: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Check, {}),
5207
+ warning: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.OctagonAlert, {}),
5208
+ danger: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.TriangleAlert, {})
5209
+ };
5210
+ var TimelineSection = React16__namespace.forwardRef(
5211
+ ({ className, variant, label, icon, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("li", { ref, className: cn(timelineSectionVariants({ variant }), className), ...props, children: [
5212
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles63__default.default["timeline-rail"], "aria-hidden": "true", children: [
5213
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles63__default.default["timeline-connector"] }),
5214
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles63__default.default["timeline-marker"], children: icon ?? (variant ? defaultVariantIcons3[variant] : void 0) })
5215
+ ] }),
5216
+ /* @__PURE__ */ jsxRuntime.jsx("ol", { className: styles63__default.default["timeline-items"], "aria-label": label, children })
5217
+ ] })
5218
+ );
5219
+ TimelineSection.displayName = "TimelineSection";
5220
+ var TimelineItem = React16__namespace.forwardRef(
5221
+ ({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn(styles63__default.default["timeline-item"], className), ...props })
5222
+ );
5223
+ TimelineItem.displayName = "TimelineItem";
5167
5224
  var XIcon2 = LucideIcons.X;
5168
5225
  var ToastProvider = ToastPrimitives__namespace.Provider;
5169
5226
  var ToastViewport = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5170
5227
  ToastPrimitives__namespace.Viewport,
5171
5228
  {
5172
5229
  ref,
5173
- className: cn(styles63__default.default["toast-viewport"], className),
5230
+ className: cn(styles64__default.default["toast-viewport"], className),
5174
5231
  ...props
5175
5232
  }
5176
5233
  ));
5177
5234
  ToastViewport.displayName = ToastPrimitives__namespace.Viewport.displayName;
5178
- var toastVariants = classVarianceAuthority.cva(styles63__default.default["toast"], {
5235
+ var toastVariants = classVarianceAuthority.cva(styles64__default.default["toast"], {
5179
5236
  variants: {
5180
5237
  variant: {
5181
- default: styles63__default.default["toast--default"],
5182
- danger: styles63__default.default["toast--danger"],
5183
- warning: styles63__default.default["toast--warning"],
5184
- success: styles63__default.default["toast--success"]
5238
+ default: styles64__default.default["toast--default"],
5239
+ danger: styles64__default.default["toast--danger"],
5240
+ warning: styles64__default.default["toast--warning"],
5241
+ success: styles64__default.default["toast--success"]
5185
5242
  }
5186
5243
  },
5187
5244
  defaultVariants: {
@@ -5206,7 +5263,7 @@ var ToastAction = React16__namespace.forwardRef(({ className, ...props }, ref) =
5206
5263
  ref,
5207
5264
  className: cn(
5208
5265
  buttonVariants({ variant: "secondary", size: "sm" }),
5209
- styles63__default.default["toast-action"],
5266
+ styles64__default.default["toast-action"],
5210
5267
  className
5211
5268
  ),
5212
5269
  ...props
@@ -5218,19 +5275,19 @@ var ToastClose = React16__namespace.forwardRef(({ className, ...props }, ref) =>
5218
5275
  {
5219
5276
  ref,
5220
5277
  "aria-label": "Close",
5221
- className: cn(styles63__default.default["toast-close"], className),
5278
+ className: cn(styles64__default.default["toast-close"], className),
5222
5279
  ...props,
5223
- children: /* @__PURE__ */ jsxRuntime.jsx(XIcon2, { className: styles63__default.default["toast-close-icon"] })
5280
+ children: /* @__PURE__ */ jsxRuntime.jsx(XIcon2, { className: styles64__default.default["toast-close-icon"] })
5224
5281
  }
5225
5282
  ));
5226
5283
  ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
5227
- var ToastTitle = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToastPrimitives__namespace.Title, { ref, className: cn(styles63__default.default["toast-title"], className), ...props }));
5284
+ var ToastTitle = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToastPrimitives__namespace.Title, { ref, className: cn(styles64__default.default["toast-title"], className), ...props }));
5228
5285
  ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
5229
5286
  var ToastDescription = React16__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
5230
5287
  ToastPrimitives__namespace.Description,
5231
5288
  {
5232
5289
  ref,
5233
- className: cn(styles63__default.default["toast-description"], className),
5290
+ className: cn(styles64__default.default["toast-description"], className),
5234
5291
  ...props
5235
5292
  }
5236
5293
  ));
@@ -5365,14 +5422,14 @@ var Toast = ({ toast: toast2 }) => {
5365
5422
  };
5366
5423
  const displayIcon = icon !== void 0 ? icon : getDefaultIcon();
5367
5424
  return /* @__PURE__ */ jsxRuntime.jsxs(ToastContainer, { ...props, variant, children: [
5368
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles64__default.default["toast-copy"], children: [
5369
- title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles64__default.default["toast-title-container"], children: [
5425
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles65__default.default["toast-copy"], children: [
5426
+ title && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles65__default.default["toast-title-container"], children: [
5370
5427
  displayIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { icon: displayIcon, size: "sm", background: "transparent" }),
5371
5428
  /* @__PURE__ */ jsxRuntime.jsx(ToastTitle, { children: title })
5372
5429
  ] }),
5373
5430
  description && /* @__PURE__ */ jsxRuntime.jsx(ToastDescription, { children: description })
5374
5431
  ] }),
5375
- action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles64__default.default["toast-action"], children: action }),
5432
+ action && /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles65__default.default["toast-action"], children: action }),
5376
5433
  /* @__PURE__ */ jsxRuntime.jsx(ToastClose, {})
5377
5434
  ] });
5378
5435
  };
@@ -5407,7 +5464,7 @@ var TruncatedDescription = ({
5407
5464
  e.stopPropagation();
5408
5465
  setExpanded(!expanded);
5409
5466
  };
5410
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(styles65__default.default["truncated-description"], className), children: [
5467
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(styles66__default.default["truncated-description"], className), children: [
5411
5468
  /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: displayDescription } }),
5412
5469
  isLongDescription && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "link", size: "sm", onClick: handleToggle, children: expanded ? "Show less" : "Show more" })
5413
5470
  ] });
@@ -5428,7 +5485,7 @@ var ThemeProvider = ({ customVars, portalContainer, children }) => {
5428
5485
  {
5429
5486
  id: "equality-theme-provider-root",
5430
5487
  "data-equality-root": true,
5431
- className: styles66__default.default.root,
5488
+ className: styles67__default.default.root,
5432
5489
  style: customVars,
5433
5490
  children: [
5434
5491
  children,
@@ -5722,6 +5779,9 @@ exports.TabsList = TabsList;
5722
5779
  exports.TabsTrigger = TabsTrigger;
5723
5780
  exports.Textarea = Textarea;
5724
5781
  exports.ThemeProvider = ThemeProvider;
5782
+ exports.Timeline = Timeline;
5783
+ exports.TimelineItem = TimelineItem;
5784
+ exports.TimelineSection = TimelineSection;
5725
5785
  exports.Toast = Toast;
5726
5786
  exports.ToastAction = ToastAction;
5727
5787
  exports.ToastClose = ToastClose;