@primer/react 0.0.0-20260330164724 → 0.0.0-20260330165405
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 +1 -1
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAoHrC,QAAA,MAAM,IAAI,GAvGa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;oDAuGR,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,CAAA"}
|
package/dist/ActionList/List.js
CHANGED
|
@@ -9,6 +9,7 @@ import { ListContext } from './shared.js';
|
|
|
9
9
|
import { useFocusZone } from '../hooks/useFocusZone.js';
|
|
10
10
|
import { clsx } from 'clsx';
|
|
11
11
|
import classes from './ActionList.module.css.js';
|
|
12
|
+
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
12
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
14
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
14
15
|
import { FocusKeys } from '@primer/behaviors';
|
|
@@ -139,16 +140,22 @@ const UnwrappedList = (props, forwardedRef) => {
|
|
|
139
140
|
if (!list) {
|
|
140
141
|
return;
|
|
141
142
|
}
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
|
|
143
|
+
const hasMixed = list.querySelector("[data-has-description=\"true\"]") !== null && list.querySelector("[data-has-description=\"false\"]") !== null;
|
|
144
|
+
const current = list.getAttribute("data-mixed-descriptions");
|
|
145
|
+
if (hasMixed && current !== "true") {
|
|
146
|
+
list.setAttribute("data-mixed-descriptions", "true");
|
|
147
|
+
} else {
|
|
148
|
+
if (!hasMixed && current !== null) {
|
|
149
|
+
list.removeAttribute("data-mixed-descriptions");
|
|
150
|
+
}
|
|
151
|
+
}
|
|
145
152
|
};
|
|
146
153
|
$[21] = listRef;
|
|
147
154
|
$[22] = t10;
|
|
148
155
|
} else {
|
|
149
156
|
t10 = $[22];
|
|
150
157
|
}
|
|
151
|
-
|
|
158
|
+
useIsomorphicLayoutEffect(t10);
|
|
152
159
|
const t11 = slots.heading;
|
|
153
160
|
let t12;
|
|
154
161
|
if ($[23] !== className) {
|
package/package.json
CHANGED