@eqtylab/equality 4.4.0 → 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 +31 -0
- package/dist/filter-dropdown.module.module.css.module.css +8 -1
- package/dist/index.cjs +28 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.js +30 -37
- package/dist/index.js.map +1 -1
- package/dist/select.module.module.css.module.css +5 -8
- package/dist/theme.module.module.css.module.css +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,37 @@
|
|
|
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
|
+
|
|
27
|
+
## 4.4.1 - 2026-09-25
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Toasts dismiss on their own again after a toast is closed while hovered. The hover pause
|
|
32
|
+
stuck on, so every later toast stayed until closed by hand.
|
|
33
|
+
- A toast shown before a `Sheet` or `Dialog` opened can now be closed while it is open.
|
|
34
|
+
- The toast close button has an accessible name.
|
|
35
|
+
|
|
5
36
|
## 4.4.0 - 2026-09-25
|
|
6
37
|
|
|
7
38
|
### Added
|
|
@@ -31,6 +31,13 @@
|
|
|
31
31
|
}
|
|
32
32
|
.dropdown-menu-content {
|
|
33
33
|
max-height: calc(0.25rem * 80);
|
|
34
|
-
width: calc(0.25rem *
|
|
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 ?
|
|
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
|
|
1956
|
-
|
|
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
|
) });
|
|
@@ -4399,12 +4377,13 @@ var toastVariants = classVarianceAuthority.cva(styles60__default.default["toast"
|
|
|
4399
4377
|
variant: "default"
|
|
4400
4378
|
}
|
|
4401
4379
|
});
|
|
4402
|
-
var ToastContainer = React15__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
4380
|
+
var ToastContainer = React15__namespace.forwardRef(({ className, variant, style, ...props }, ref) => {
|
|
4403
4381
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4404
4382
|
ToastPrimitives__namespace.Root,
|
|
4405
4383
|
{
|
|
4406
4384
|
ref,
|
|
4407
4385
|
className: cn(toastVariants({ variant }), className),
|
|
4386
|
+
style: { pointerEvents: "auto", ...style },
|
|
4408
4387
|
...props
|
|
4409
4388
|
}
|
|
4410
4389
|
);
|
|
@@ -4412,7 +4391,16 @@ var ToastContainer = React15__namespace.forwardRef(({ className, variant, ...pro
|
|
|
4412
4391
|
ToastContainer.displayName = ToastPrimitives__namespace.Root.displayName;
|
|
4413
4392
|
var ToastAction = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToastPrimitives__namespace.Action, { ref, className: cn(styles60__default.default["toast-action"], className), ...props }));
|
|
4414
4393
|
ToastAction.displayName = ToastPrimitives__namespace.Action.displayName;
|
|
4415
|
-
var ToastClose = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4394
|
+
var ToastClose = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4395
|
+
ToastPrimitives__namespace.Close,
|
|
4396
|
+
{
|
|
4397
|
+
ref,
|
|
4398
|
+
"aria-label": "Close",
|
|
4399
|
+
className: cn(styles60__default.default["toast-close"], className),
|
|
4400
|
+
...props,
|
|
4401
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(XIcon2, { className: styles60__default.default["toast-close-icon"] })
|
|
4402
|
+
}
|
|
4403
|
+
));
|
|
4416
4404
|
ToastClose.displayName = ToastPrimitives__namespace.Close.displayName;
|
|
4417
4405
|
var ToastTitle = React15__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(ToastPrimitives__namespace.Title, { ref, className: cn(styles60__default.default["toast-title"], className), ...props }));
|
|
4418
4406
|
ToastTitle.displayName = ToastPrimitives__namespace.Title.displayName;
|
|
@@ -4573,10 +4561,15 @@ var Toaster = () => {
|
|
|
4573
4561
|
});
|
|
4574
4562
|
};
|
|
4575
4563
|
var ToastRoot = () => {
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4564
|
+
const { toasts } = useToast();
|
|
4565
|
+
const newestToastId = toasts[0]?.id;
|
|
4566
|
+
return (
|
|
4567
|
+
// Radix's shared pause flag can stick on, freezing every later toast's timer.
|
|
4568
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ToastProvider, { children: [
|
|
4569
|
+
/* @__PURE__ */ jsxRuntime.jsx(Toaster, {}),
|
|
4570
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToastViewport, {})
|
|
4571
|
+
] }, newestToastId)
|
|
4572
|
+
);
|
|
4580
4573
|
};
|
|
4581
4574
|
var TruncatedDescription = ({
|
|
4582
4575
|
className,
|
|
@@ -4871,8 +4864,6 @@ exports.SelectEmpty = SelectEmpty;
|
|
|
4871
4864
|
exports.SelectGroup = SelectGroup;
|
|
4872
4865
|
exports.SelectItem = SelectItem;
|
|
4873
4866
|
exports.SelectLabel = SelectLabel;
|
|
4874
|
-
exports.SelectScrollDownButton = SelectScrollDownButton;
|
|
4875
|
-
exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
4876
4867
|
exports.SelectSearch = SelectSearch;
|
|
4877
4868
|
exports.SelectSeparator = SelectSeparator;
|
|
4878
4869
|
exports.SelectTrigger = SelectTrigger;
|