@primer/react 0.0.0-20260330163933 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260330163933
3
+ ## 0.0.0-20260330165405
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../src/ActionList/List.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AA6GrC,QAAA,MAAM,IAAI,GAjGa,EAAE,SAAS,KAAK,CAAC,WAAW;;;;;;;;;;;;;;;;;;;;oDAiGR,CAAA;AAI3C,OAAO,EAAC,IAAI,EAAC,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"}
@@ -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 hasWithDescription = list.querySelector("[data-has-description=\"true\"]") !== null;
143
- const hasWithoutDescription = list.querySelector("[data-has-description=\"false\"]") !== null;
144
- list.setAttribute("data-mixed-descriptions", String(hasWithDescription && hasWithoutDescription));
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
- React.useLayoutEffect(t10);
158
+ useIsomorphicLayoutEffect(t10);
152
159
  const t11 = slots.heading;
153
160
  let t12;
154
161
  if ($[23] !== className) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260330163933",
4
+ "version": "0.0.0-20260330165405",
5
5
  "description": "An implementation of GitHub's Primer Design System using React",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",