@eqtylab/equality 5.4.3 → 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 +28 -0
- package/dist/command.module.module.css.module.css +7 -2
- package/dist/dropdown-menu.module.module.css.module.css +7 -2
- package/dist/index.cjs +8 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/input.module.module.css.module.css +14 -4
- package/dist/nav.module.module.css.module.css +14 -4
- package/dist/select.module.module.css.module.css +7 -2
- package/dist/sort-button.module.module.css.module.css +82 -0
- package/dist/table-components.module.module.css.module.css +3 -0
- package/dist/theme-utilities.css +1 -1
- package/dist/theme.module.module.css.module.css +7 -2
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1688,13 +1688,13 @@ declare const NavListExpandableContent: React$1.ForwardRefExoticComponent<React$
|
|
|
1688
1688
|
interface NavPanelProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title'> {
|
|
1689
1689
|
/** Names the panel's landmark */
|
|
1690
1690
|
'aria-label': string;
|
|
1691
|
-
/** Above the rows, such as a `NavSwitcher` or a heading */
|
|
1691
|
+
/** Above the rows, pinned as they scroll, such as a `NavSwitcher` or a heading */
|
|
1692
1692
|
header?: React$1.ReactNode;
|
|
1693
1693
|
}
|
|
1694
1694
|
/**
|
|
1695
1695
|
* **Props**
|
|
1696
1696
|
* - `"aria-label": string` — Names the panel's landmark
|
|
1697
|
-
* - `header?: React.ReactNode` — Above the rows, such as a `NavSwitcher` or a heading
|
|
1697
|
+
* - `header?: React.ReactNode` — Above the rows, pinned as they scroll, such as a `NavSwitcher` or a heading
|
|
1698
1698
|
*
|
|
1699
1699
|
* Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
|
|
1700
1700
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1688,13 +1688,13 @@ declare const NavListExpandableContent: React$1.ForwardRefExoticComponent<React$
|
|
|
1688
1688
|
interface NavPanelProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'title'> {
|
|
1689
1689
|
/** Names the panel's landmark */
|
|
1690
1690
|
'aria-label': string;
|
|
1691
|
-
/** Above the rows, such as a `NavSwitcher` or a heading */
|
|
1691
|
+
/** Above the rows, pinned as they scroll, such as a `NavSwitcher` or a heading */
|
|
1692
1692
|
header?: React$1.ReactNode;
|
|
1693
1693
|
}
|
|
1694
1694
|
/**
|
|
1695
1695
|
* **Props**
|
|
1696
1696
|
* - `"aria-label": string` — Names the panel's landmark
|
|
1697
|
-
* - `header?: React.ReactNode` — Above the rows, such as a `NavSwitcher` or a heading
|
|
1697
|
+
* - `header?: React.ReactNode` — Above the rows, pinned as they scroll, such as a `NavSwitcher` or a heading
|
|
1698
1698
|
*
|
|
1699
1699
|
* Also accepts the standard `HTMLElement` attributes, such as `className`, `id`, `aria-*` and event handlers.
|
|
1700
1700
|
*
|
package/dist/index.js
CHANGED
|
@@ -947,6 +947,7 @@ var IconButton = React16.forwardRef(
|
|
|
947
947
|
target,
|
|
948
948
|
download,
|
|
949
949
|
"aria-label": label,
|
|
950
|
+
"data-icon-button": size || "sm",
|
|
950
951
|
rel: target === "_blank" ? "noopener noreferrer" : void 0,
|
|
951
952
|
className: cn(iconButtonVariants({ size, variant }), className),
|
|
952
953
|
...props,
|
|
@@ -960,6 +961,7 @@ var IconButton = React16.forwardRef(
|
|
|
960
961
|
ref,
|
|
961
962
|
type: "button",
|
|
962
963
|
"aria-label": label,
|
|
964
|
+
"data-icon-button": size || "sm",
|
|
963
965
|
disabled,
|
|
964
966
|
className: cn(iconButtonVariants({ size, variant }), className),
|
|
965
967
|
...props,
|
|
@@ -1833,7 +1835,7 @@ function useFilterableItem(state, textValue, children, { group, persistent = fal
|
|
|
1833
1835
|
return matches;
|
|
1834
1836
|
}
|
|
1835
1837
|
function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
1836
|
-
const { setEnabled, reveal, visible, focusSignal } = state;
|
|
1838
|
+
const { setEnabled, reveal, visible, focusSignal, interactedSinceOpen } = state;
|
|
1837
1839
|
const inputRef = React16.useRef(null);
|
|
1838
1840
|
const ref = React16.useCallback(
|
|
1839
1841
|
(node) => assignRefs(node, inputRef, forwardedRef),
|
|
@@ -1847,9 +1849,10 @@ function useSearchInput(state, alwaysVisible, forwardedRef) {
|
|
|
1847
1849
|
if (!visible) return;
|
|
1848
1850
|
const input = inputRef.current;
|
|
1849
1851
|
if (!input) return;
|
|
1852
|
+
if (!interactedSinceOpen() && hasCoarsePointer()) return;
|
|
1850
1853
|
input.focus();
|
|
1851
1854
|
input.setSelectionRange(input.value.length, input.value.length);
|
|
1852
|
-
}, [visible, focusSignal]);
|
|
1855
|
+
}, [visible, focusSignal, interactedSinceOpen]);
|
|
1853
1856
|
React16.useEffect(() => {
|
|
1854
1857
|
if (alwaysVisible && !visible) reveal("");
|
|
1855
1858
|
}, [alwaysVisible, visible, reveal]);
|
|
@@ -1902,6 +1905,7 @@ function handleListKeyDown(state, event, { searchSelector, itemSelector }) {
|
|
|
1902
1905
|
state.requestFocus();
|
|
1903
1906
|
}
|
|
1904
1907
|
}
|
|
1908
|
+
var hasCoarsePointer = () => window.matchMedia?.("(pointer: coarse)").matches ?? false;
|
|
1905
1909
|
var isPrintableKey = (event) => event.key.length === 1 && !event.metaKey && !event.ctrlKey && !event.altKey && /\S/.test(event.key);
|
|
1906
1910
|
function assignRefs(node, ...refs) {
|
|
1907
1911
|
refs.forEach((ref) => {
|
|
@@ -2311,7 +2315,8 @@ var FilterDropdown = ({
|
|
|
2311
2315
|
const handleClearAll = (event) => {
|
|
2312
2316
|
event.preventDefault();
|
|
2313
2317
|
const menu = event.currentTarget.closest('[role="menu"]');
|
|
2314
|
-
(menu?.querySelector("[data-dropdown-search]")
|
|
2318
|
+
const search = hasCoarsePointer() ? null : menu?.querySelector("[data-dropdown-search]");
|
|
2319
|
+
(search ?? menu)?.focus();
|
|
2315
2320
|
onClearAll();
|
|
2316
2321
|
};
|
|
2317
2322
|
const clearAll = (className) => (
|