@primer/react 0.0.0-20260303135611 → 0.0.0-20260303140529

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,17 +1,19 @@
1
1
  # @primer/react
2
2
 
3
- ## 0.0.0-20260303135611
3
+ ## 0.0.0-20260303140529
4
+
5
+ ### Patch Changes
6
+
7
+ - Fake entry to force publishing
8
+
9
+ ## 38.14.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
13
  - [#7531](https://github.com/primer/react/pull/7531) [`0cfb938`](https://github.com/primer/react/commit/0cfb938704ec7589b6453a23ba8a9f2c8ab7d824) Thanks [@hectahertz](https://github.com/hectahertz)! - SelectPanel: Add built-in client-side list virtualization via a new `virtualized` prop. When enabled, only the visible items plus a small overscan buffer are rendered in the DOM, dramatically improving performance for large lists.
8
14
 
9
- - [#7613](https://github.com/primer/react/pull/7613) [`557f558`](https://github.com/primer/react/commit/557f558fab54d6ed25a07a1a9a5acc3c29629c8f) Thanks [@kelsey-myers](https://github.com/kelsey-myers)! - Add `counterProps` prop to `UnderlineNav.Item`, allowing consumers to pass additional HTML attributes to the counter wrapper element.
10
-
11
15
  ### Patch Changes
12
16
 
13
- - Fake entry to force publishing
14
-
15
17
  - [#7497](https://github.com/primer/react/pull/7497) [`931740b`](https://github.com/primer/react/commit/931740bc6d96dd3bb6f335ea98eedd4b64eb1859) Thanks [@hectahertz](https://github.com/hectahertz)! - Remove render phase setStates on SelectPanel
16
18
 
17
19
  - [#7532](https://github.com/primer/react/pull/7532) [`39a2151`](https://github.com/primer/react/commit/39a21512f71083649bdb00b1d3a6c05e40ec5bfb) Thanks [@hectahertz](https://github.com/hectahertz)! - **PageLayout**: Eliminate forced reflow (~614ms) on mount by replacing `getComputedStyle` call with a pure JS viewport width check for the `--pane-max-width-diff` CSS variable.
@@ -42,10 +42,6 @@ export type UnderlineNavItemProps = {
42
42
  * Counter
43
43
  */
44
44
  counter?: number | string;
45
- /**
46
- * Additional HTML attributes for the counter wrapper element
47
- */
48
- counterProps?: React.HTMLAttributes<HTMLSpanElement>;
49
45
  } & LinkProps;
50
46
  export declare const UnderlineNavItem: PolymorphicForwardRefComponent<"a", UnderlineNavItemProps>;
51
47
  //# sourceMappingURL=UnderlineNavItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlineNavItem.d.ts","sourceRoot":"","sources":["../../src/UnderlineNav/UnderlineNavItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAA;AAC3D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AACrD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAO/F,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;CACjF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAExG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,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jF,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAE1B;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IAExG;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;IAE5F;;;OAGG;IAEH,IAAI,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAEnE;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;IAElC;;QAEI;IACJ,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,GAAG,CAAA;IAE5B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC1B,GAAG,SAAS,CAAA;AAEb,eAAO,MAAM,gBAAgB,EAgFxB,8BAA8B,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAA"}
@@ -10,7 +10,6 @@ const UnderlineNavItem = /*#__PURE__*/forwardRef(({
10
10
  href = '#',
11
11
  children,
12
12
  counter,
13
- counterProps,
14
13
  onSelect,
15
14
  'aria-current': ariaCurrent,
16
15
  icon: Icon,
@@ -62,7 +61,6 @@ const UnderlineNavItem = /*#__PURE__*/forwardRef(({
62
61
  onKeyDown: keyDownHandler,
63
62
  onClick: clickHandler,
64
63
  counter: counter,
65
- counterProps: counterProps,
66
64
  icon: leadingVisual !== null && leadingVisual !== void 0 ? leadingVisual : Icon,
67
65
  loadingCounters: loadingCounters,
68
66
  iconsVisible: iconsVisible,
@@ -18,7 +18,6 @@ export type UnderlineItemProps<As extends React.ElementType> = {
18
18
  iconsVisible?: boolean;
19
19
  loadingCounters?: boolean;
20
20
  counter?: number | string;
21
- counterProps?: React.HTMLAttributes<HTMLSpanElement>;
22
21
  icon?: FC<IconProps> | React.ReactElement<any>;
23
22
  id?: string;
24
23
  ref?: React.Ref<unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"UnderlineTabbedInterface.d.ts","sourceRoot":"","sources":["../../../src/internal/components/UnderlineTabbedInterface.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAgC,KAAK,EAAE,EAA0B,KAAK,WAAW,EAAC,MAAM,OAAO,CAAA;AAEtG,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAA;AAErD,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,yBAAyB,CAAA;AAMlG,eAAO,MAAM,GAAG,IAAI,CAAA;AAgBpB,KAAK,qBAAqB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IACzD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAWvB,8BAA8B,CAAC,WAAW,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,EAMxB,8BAA8B,CAAC,IAAI,CAAC,CAAA;AAE1C,eAAO,MAAM,cAAc,yBAE1B,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC7D,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,GAAG,QAAQ,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAA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eAAO,MAAM,gBAAgB,EAWvB,8BAA8B,CAAC,WAAW,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAA;AAErF,eAAO,MAAM,iBAAiB,EAMxB,8BAA8B,CAAC,IAAI,CAAC,CAAA;AAE1C,eAAO,MAAM,cAAc,yBAE1B,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,IAAI;IAC7D,EAAE,CAAC,EAAE,EAAE,GAAG,GAAG,GAAG,QAAQ,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEzB,IAAI,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;IAC9C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CACzB,GAAG,KAAK,CAAC,wBAAwB,CAAC,EAAE,SAAS,GAAG,GAAG,GAAG,GAAG,EAAE,SAAS,QAAQ,GAAG,QAAQ,GAAG,EAAE,CAAC,CAAA;AAE9F,eAAO,MAAM,aAAa,EAwBpB,8BAA8B,CAAC,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC,CAAA"}
@@ -121,12 +121,11 @@ const LoadingCounter = () => {
121
121
  return t0;
122
122
  };
123
123
  const UnderlineItem = /*#__PURE__*/React.forwardRef((props, ref) => {
124
- const $ = c(32);
124
+ const $ = c(30);
125
125
  let Icon;
126
126
  let children;
127
127
  let className;
128
128
  let counter;
129
- let counterProps;
130
129
  let iconsVisible;
131
130
  let loadingCounters;
132
131
  let rest;
@@ -136,7 +135,6 @@ const UnderlineItem = /*#__PURE__*/React.forwardRef((props, ref) => {
136
135
  as: t0,
137
136
  children,
138
137
  counter,
139
- counterProps,
140
138
  icon: Icon,
141
139
  iconsVisible,
142
140
  loadingCounters,
@@ -148,103 +146,98 @@ const UnderlineItem = /*#__PURE__*/React.forwardRef((props, ref) => {
148
146
  $[2] = children;
149
147
  $[3] = className;
150
148
  $[4] = counter;
151
- $[5] = counterProps;
152
- $[6] = iconsVisible;
153
- $[7] = loadingCounters;
154
- $[8] = rest;
155
- $[9] = t0;
149
+ $[5] = iconsVisible;
150
+ $[6] = loadingCounters;
151
+ $[7] = rest;
152
+ $[8] = t0;
156
153
  } else {
157
154
  Icon = $[1];
158
155
  children = $[2];
159
156
  className = $[3];
160
157
  counter = $[4];
161
- counterProps = $[5];
162
- iconsVisible = $[6];
163
- loadingCounters = $[7];
164
- rest = $[8];
165
- t0 = $[9];
158
+ iconsVisible = $[5];
159
+ loadingCounters = $[6];
160
+ rest = $[7];
161
+ t0 = $[8];
166
162
  }
167
163
  const Component = t0 === undefined ? "a" : t0;
168
164
  let t1;
169
- if ($[10] !== children) {
165
+ if ($[9] !== children) {
170
166
  t1 = getTextContent(children);
171
- $[10] = children;
172
- $[11] = t1;
167
+ $[9] = children;
168
+ $[10] = t1;
173
169
  } else {
174
- t1 = $[11];
170
+ t1 = $[10];
175
171
  }
176
172
  const textContent = t1;
177
173
  let t2;
178
- if ($[12] !== className) {
174
+ if ($[11] !== className) {
179
175
  t2 = clsx(classes.UnderlineItem, className);
180
- $[12] = className;
181
- $[13] = t2;
176
+ $[11] = className;
177
+ $[12] = t2;
182
178
  } else {
183
- t2 = $[13];
179
+ t2 = $[12];
184
180
  }
185
181
  let t3;
186
- if ($[14] !== Icon || $[15] !== iconsVisible) {
182
+ if ($[13] !== Icon || $[14] !== iconsVisible) {
187
183
  t3 = iconsVisible && Icon && /*#__PURE__*/jsx("span", {
188
184
  "data-component": "icon",
189
185
  children: isElement(Icon) ? Icon : /*#__PURE__*/jsx(Icon, {})
190
186
  });
191
- $[14] = Icon;
192
- $[15] = iconsVisible;
193
- $[16] = t3;
187
+ $[13] = Icon;
188
+ $[14] = iconsVisible;
189
+ $[15] = t3;
194
190
  } else {
195
- t3 = $[16];
191
+ t3 = $[15];
196
192
  }
197
193
  let t4;
198
- if ($[17] !== children || $[18] !== textContent) {
194
+ if ($[16] !== children || $[17] !== textContent) {
199
195
  t4 = children && /*#__PURE__*/jsx("span", {
200
196
  "data-component": "text",
201
197
  "data-content": textContent || undefined,
202
198
  children: children
203
199
  });
204
- $[17] = children;
205
- $[18] = textContent;
206
- $[19] = t4;
200
+ $[16] = children;
201
+ $[17] = textContent;
202
+ $[18] = t4;
207
203
  } else {
208
- t4 = $[19];
204
+ t4 = $[18];
209
205
  }
210
206
  let t5;
211
- if ($[20] !== counter || $[21] !== counterProps || $[22] !== loadingCounters) {
207
+ if ($[19] !== counter || $[20] !== loadingCounters) {
212
208
  t5 = counter !== undefined ? loadingCounters ? /*#__PURE__*/jsx("span", {
213
209
  "data-component": "counter",
214
- ...counterProps,
215
210
  children: /*#__PURE__*/jsx(LoadingCounter, {})
216
211
  }) : /*#__PURE__*/jsx("span", {
217
212
  "data-component": "counter",
218
- ...counterProps,
219
213
  children: /*#__PURE__*/jsx(CounterLabel, {
220
214
  children: counter
221
215
  })
222
216
  }) : null;
223
- $[20] = counter;
224
- $[21] = counterProps;
225
- $[22] = loadingCounters;
226
- $[23] = t5;
217
+ $[19] = counter;
218
+ $[20] = loadingCounters;
219
+ $[21] = t5;
227
220
  } else {
228
- t5 = $[23];
221
+ t5 = $[21];
229
222
  }
230
223
  let t6;
231
- if ($[24] !== Component || $[25] !== ref || $[26] !== rest || $[27] !== t2 || $[28] !== t3 || $[29] !== t4 || $[30] !== t5) {
224
+ if ($[22] !== Component || $[23] !== ref || $[24] !== rest || $[25] !== t2 || $[26] !== t3 || $[27] !== t4 || $[28] !== t5) {
232
225
  t6 = /*#__PURE__*/jsxs(Component, {
233
226
  ...rest,
234
227
  ref: ref,
235
228
  className: t2,
236
229
  children: [t3, t4, t5]
237
230
  });
238
- $[24] = Component;
239
- $[25] = ref;
240
- $[26] = rest;
241
- $[27] = t2;
242
- $[28] = t3;
243
- $[29] = t4;
244
- $[30] = t5;
245
- $[31] = t6;
231
+ $[22] = Component;
232
+ $[23] = ref;
233
+ $[24] = rest;
234
+ $[25] = t2;
235
+ $[26] = t3;
236
+ $[27] = t4;
237
+ $[28] = t5;
238
+ $[29] = t6;
246
239
  } else {
247
- t6 = $[31];
240
+ t6 = $[29];
248
241
  }
249
242
  return t6;
250
243
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@primer/react",
3
3
  "type": "module",
4
- "version": "0.0.0-20260303135611",
4
+ "version": "0.0.0-20260303140529",
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",