@primer/react 38.47.0-rc.207872287 → 38.47.0-rc.2f87f01e5
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 +4 -0
- package/dist/ActionList/List.js +43 -50
- package/dist/AnchoredOverlay/AnchoredOverlay.js +1 -10
- package/dist/ButtonGroup/ButtonGroup.js +20 -27
- package/dist/Checkbox/Checkbox.js +47 -61
- package/dist/Dialog/Dialog.js +4 -10
- package/dist/FeatureFlags/DefaultFeatureFlags.js +0 -1
- package/dist/FilteredActionList/FilteredActionList.js +17 -36
- package/dist/PageHeader/PageHeader.js +31 -41
- package/dist/TextInput/TextInput.js +107 -114
- package/dist/TooltipV2/Tooltip.js +76 -87
- package/dist/experimental/Tabs/useTabList.js +14 -21
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +40 -52
- package/package.json +3 -4
|
@@ -2,8 +2,6 @@ import { c } from "../utils/react-compiler-runtime.js";
|
|
|
2
2
|
import { useId as useId$1 } from "../hooks/useId.js";
|
|
3
3
|
import { useOnEscapePress } from "../hooks/useOnEscapePress.js";
|
|
4
4
|
import { useMergedRefs } from "../hooks/useMergedRefs.js";
|
|
5
|
-
import { useProvidedRefOrCreate } from "../hooks/useProvidedRefOrCreate.js";
|
|
6
|
-
import { useFeatureFlag } from "../FeatureFlags/useFeatureFlag.js";
|
|
7
5
|
import { invariant } from "../utils/invariant.js";
|
|
8
6
|
import { warning } from "../utils/warning.js";
|
|
9
7
|
import Tooltip_module_css_default from "./Tooltip.module.css.js";
|
|
@@ -82,7 +80,7 @@ const isInteractive = (element) => {
|
|
|
82
80
|
};
|
|
83
81
|
const emptyKeybindingHints = [];
|
|
84
82
|
const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
85
|
-
const $ = c(
|
|
83
|
+
const $ = c(56);
|
|
86
84
|
let children;
|
|
87
85
|
let className;
|
|
88
86
|
let id;
|
|
@@ -129,24 +127,20 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
129
127
|
warning(isFragmentTrigger, "The `Tooltip` component does not support a React Fragment as its trigger. Pass a single interactive element instead.");
|
|
130
128
|
const elementChild = /*#__PURE__*/ React.isValidElement(child) ? child : void 0;
|
|
131
129
|
const childRef = reactMajorVersion > 18 ? elementChild === null || elementChild === void 0 ? void 0 : elementChild.props.ref : elementChild === null || elementChild === void 0 ? void 0 : elementChild.ref;
|
|
132
|
-
const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
|
|
133
130
|
const triggerRef = useRef(null);
|
|
134
131
|
const mergedTriggerRef = useMergedRefs(triggerRef, useMergedRefs(forwardedRef, childRef));
|
|
135
|
-
const providedOrCreatedRef = useProvidedRefOrCreate(forwardedRef !== null && forwardedRef !== void 0 ? forwardedRef : childRef);
|
|
136
|
-
const readTriggerRef = mergedRefEnabled ? triggerRef : providedOrCreatedRef;
|
|
137
|
-
const appliedTriggerRef = mergedRefEnabled ? mergedTriggerRef : providedOrCreatedRef;
|
|
138
132
|
const tooltipElRef = useRef(null);
|
|
139
133
|
const [calculatedDirection, setCalculatedDirection] = useState(direction);
|
|
140
134
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
141
135
|
const openTimeoutRef = React.useRef(null);
|
|
142
136
|
const { safeSetTimeout, safeClearTimeout } = useSafeTimeout();
|
|
143
137
|
let t6;
|
|
144
|
-
if ($[11] !== _privateDisableTooltip || $[12] !== direction
|
|
138
|
+
if ($[11] !== _privateDisableTooltip || $[12] !== direction) {
|
|
145
139
|
t6 = () => {
|
|
146
140
|
try {
|
|
147
|
-
if (tooltipElRef.current &&
|
|
141
|
+
if (tooltipElRef.current && triggerRef.current instanceof HTMLElement && tooltipElRef.current.hasAttribute("popover") && !tooltipElRef.current.matches(":popover-open") && !_privateDisableTooltip) {
|
|
148
142
|
const tooltip = tooltipElRef.current;
|
|
149
|
-
const trigger =
|
|
143
|
+
const trigger = triggerRef.current;
|
|
150
144
|
tooltip.showPopover();
|
|
151
145
|
setIsPopoverOpen(true);
|
|
152
146
|
const settings = {
|
|
@@ -166,19 +160,18 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
166
160
|
};
|
|
167
161
|
$[11] = _privateDisableTooltip;
|
|
168
162
|
$[12] = direction;
|
|
169
|
-
$[13] =
|
|
170
|
-
|
|
171
|
-
} else t6 = $[14];
|
|
163
|
+
$[13] = t6;
|
|
164
|
+
} else t6 = $[13];
|
|
172
165
|
const openTooltip = t6;
|
|
173
166
|
let t7;
|
|
174
|
-
if ($[
|
|
167
|
+
if ($[14] !== safeClearTimeout) {
|
|
175
168
|
t7 = () => {
|
|
176
169
|
if (openTimeoutRef.current) {
|
|
177
170
|
safeClearTimeout(openTimeoutRef.current);
|
|
178
171
|
openTimeoutRef.current = null;
|
|
179
172
|
}
|
|
180
173
|
try {
|
|
181
|
-
if (tooltipElRef.current &&
|
|
174
|
+
if (tooltipElRef.current && triggerRef.current && tooltipElRef.current.hasAttribute("popover") && tooltipElRef.current.matches(":popover-open")) {
|
|
182
175
|
tooltipElRef.current.hidePopover();
|
|
183
176
|
setIsPopoverOpen(false);
|
|
184
177
|
} else setIsPopoverOpen(false);
|
|
@@ -187,23 +180,22 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
187
180
|
if (error_0 && typeof error_0 === "object" && "message" in error_0 && typeof error_0.message === "string" && error_0.message.includes("not a valid selector")) {} else throw error_0;
|
|
188
181
|
}
|
|
189
182
|
};
|
|
190
|
-
$[
|
|
191
|
-
$[
|
|
192
|
-
|
|
193
|
-
} else t7 = $[17];
|
|
183
|
+
$[14] = safeClearTimeout;
|
|
184
|
+
$[15] = t7;
|
|
185
|
+
} else t7 = $[15];
|
|
194
186
|
const closeTooltip = t7;
|
|
195
187
|
let t8;
|
|
196
|
-
if ($[
|
|
188
|
+
if ($[16] !== tooltipId) {
|
|
197
189
|
t8 = { tooltipId };
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
} else t8 = $[
|
|
190
|
+
$[16] = tooltipId;
|
|
191
|
+
$[17] = t8;
|
|
192
|
+
} else t8 = $[17];
|
|
201
193
|
const value = t8;
|
|
202
194
|
let t9;
|
|
203
|
-
if ($[
|
|
195
|
+
if ($[18] !== type) {
|
|
204
196
|
t9 = () => {
|
|
205
|
-
if (!tooltipElRef.current || !
|
|
206
|
-
const trigger_0 =
|
|
197
|
+
if (!tooltipElRef.current || !triggerRef.current) return;
|
|
198
|
+
const trigger_0 = triggerRef.current;
|
|
207
199
|
const isInvalidTrigger = !(trigger_0 instanceof HTMLElement);
|
|
208
200
|
warning(isInvalidTrigger, "The `Tooltip` component expects its trigger ref to resolve to an HTML element. Ensure the trigger forwards its ref to a single interactive element instead of a React Fragment.");
|
|
209
201
|
if (isInvalidTrigger) return;
|
|
@@ -221,26 +213,23 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
221
213
|
}
|
|
222
214
|
tooltipElRef.current.setAttribute("popover", "auto");
|
|
223
215
|
};
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
|
|
227
|
-
} else t9 = $[22];
|
|
216
|
+
$[18] = type;
|
|
217
|
+
$[19] = t9;
|
|
218
|
+
} else t9 = $[19];
|
|
228
219
|
let t10;
|
|
229
|
-
if ($[
|
|
220
|
+
if ($[20] !== direction || $[21] !== type) {
|
|
230
221
|
t10 = [
|
|
231
222
|
tooltipElRef,
|
|
232
|
-
readTriggerRef,
|
|
233
223
|
direction,
|
|
234
224
|
type
|
|
235
225
|
];
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
|
|
240
|
-
} else t10 = $[26];
|
|
226
|
+
$[20] = direction;
|
|
227
|
+
$[21] = type;
|
|
228
|
+
$[22] = t10;
|
|
229
|
+
} else t10 = $[22];
|
|
241
230
|
useEffect(t9, t10);
|
|
242
231
|
let t11;
|
|
243
|
-
if ($[
|
|
232
|
+
if ($[23] !== _privateDisableTooltip || $[24] !== closeTooltip || $[25] !== isPopoverOpen) {
|
|
244
233
|
t11 = (event) => {
|
|
245
234
|
if (isPopoverOpen) {
|
|
246
235
|
if (!_privateDisableTooltip) {
|
|
@@ -250,32 +239,32 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
250
239
|
closeTooltip();
|
|
251
240
|
}
|
|
252
241
|
};
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
} else t11 = $[
|
|
242
|
+
$[23] = _privateDisableTooltip;
|
|
243
|
+
$[24] = closeTooltip;
|
|
244
|
+
$[25] = isPopoverOpen;
|
|
245
|
+
$[26] = t11;
|
|
246
|
+
} else t11 = $[26];
|
|
258
247
|
let t12;
|
|
259
|
-
if ($[
|
|
248
|
+
if ($[27] !== _privateDisableTooltip || $[28] !== isPopoverOpen) {
|
|
260
249
|
t12 = [isPopoverOpen, _privateDisableTooltip];
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
} else t12 = $[
|
|
250
|
+
$[27] = _privateDisableTooltip;
|
|
251
|
+
$[28] = isPopoverOpen;
|
|
252
|
+
$[29] = t12;
|
|
253
|
+
} else t12 = $[29];
|
|
265
254
|
useOnEscapePress(t11, t12);
|
|
266
255
|
const platform = usePlatform();
|
|
267
256
|
const hasAriaLabel_0 = "aria-label" in rest;
|
|
268
257
|
let t13;
|
|
269
|
-
if ($[
|
|
258
|
+
if ($[30] !== keybindingHint) {
|
|
270
259
|
t13 = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
|
|
271
|
-
$[
|
|
272
|
-
$[
|
|
273
|
-
} else t13 = $[
|
|
260
|
+
$[30] = keybindingHint;
|
|
261
|
+
$[31] = t13;
|
|
262
|
+
} else t13 = $[31];
|
|
274
263
|
const keybindingHints = t13;
|
|
275
264
|
if (isFragmentTrigger) return child;
|
|
276
265
|
const t14 = TooltipContext;
|
|
277
266
|
const t15 = /*#__PURE__*/ React.isValidElement(child) && /*#__PURE__*/ React.cloneElement(child, {
|
|
278
|
-
ref:
|
|
267
|
+
ref: mergedTriggerRef,
|
|
279
268
|
"aria-describedby": (() => {
|
|
280
269
|
if (type !== "description") return child.props["aria-describedby"];
|
|
281
270
|
const existingDescribedBy = child.props["aria-describedby"];
|
|
@@ -317,15 +306,15 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
317
306
|
}
|
|
318
307
|
});
|
|
319
308
|
let t17;
|
|
320
|
-
if ($[
|
|
309
|
+
if ($[32] !== className) {
|
|
321
310
|
t17 = clsx(className, Tooltip_module_css_default.Tooltip);
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
} else t17 = $[
|
|
311
|
+
$[32] = className;
|
|
312
|
+
$[33] = t17;
|
|
313
|
+
} else t17 = $[33];
|
|
325
314
|
const t18 = type === "description" ? "tooltip" : void 0;
|
|
326
315
|
const t19 = hasAriaLabel_0 || keybindingHints.length === 0 ? tooltipId : void 0;
|
|
327
316
|
let t20;
|
|
328
|
-
if ($[
|
|
317
|
+
if ($[34] !== hasAriaLabel_0 || $[35] !== keybindingHints || $[36] !== platform || $[37] !== text || $[38] !== tooltipId) {
|
|
329
318
|
t20 = keybindingHints.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
330
319
|
id: hasAriaLabel_0 ? void 0 : tooltipId,
|
|
331
320
|
children: [text, /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
@@ -339,15 +328,15 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
339
328
|
"data-component": "Tooltip.KeybindingHintContainer",
|
|
340
329
|
children: keybindingHints.map(_temp4)
|
|
341
330
|
})] }) : text;
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
} else t20 = $[
|
|
331
|
+
$[34] = hasAriaLabel_0;
|
|
332
|
+
$[35] = keybindingHints;
|
|
333
|
+
$[36] = platform;
|
|
334
|
+
$[37] = text;
|
|
335
|
+
$[38] = tooltipId;
|
|
336
|
+
$[39] = t20;
|
|
337
|
+
} else t20 = $[39];
|
|
349
338
|
let t21;
|
|
350
|
-
if ($[
|
|
339
|
+
if ($[40] !== calculatedDirection || $[41] !== closeTooltip || $[42] !== openTooltip || $[43] !== rest || $[44] !== t17 || $[45] !== t18 || $[46] !== t19 || $[47] !== t20) {
|
|
351
340
|
t21 = /* @__PURE__ */ jsx("span", {
|
|
352
341
|
className: t17,
|
|
353
342
|
ref: tooltipElRef,
|
|
@@ -361,34 +350,34 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
361
350
|
id: t19,
|
|
362
351
|
children: t20
|
|
363
352
|
});
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
} else t21 = $[
|
|
353
|
+
$[40] = calculatedDirection;
|
|
354
|
+
$[41] = closeTooltip;
|
|
355
|
+
$[42] = openTooltip;
|
|
356
|
+
$[43] = rest;
|
|
357
|
+
$[44] = t17;
|
|
358
|
+
$[45] = t18;
|
|
359
|
+
$[46] = t19;
|
|
360
|
+
$[47] = t20;
|
|
361
|
+
$[48] = t21;
|
|
362
|
+
} else t21 = $[48];
|
|
374
363
|
let t22;
|
|
375
|
-
if ($[
|
|
364
|
+
if ($[49] !== t15 || $[50] !== t21) {
|
|
376
365
|
t22 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t15, t21] });
|
|
377
|
-
$[
|
|
378
|
-
$[
|
|
379
|
-
$[
|
|
380
|
-
} else t22 = $[
|
|
366
|
+
$[49] = t15;
|
|
367
|
+
$[50] = t21;
|
|
368
|
+
$[51] = t22;
|
|
369
|
+
} else t22 = $[51];
|
|
381
370
|
let t23;
|
|
382
|
-
if ($[
|
|
371
|
+
if ($[52] !== t14.Provider || $[53] !== t22 || $[54] !== value) {
|
|
383
372
|
t23 = /* @__PURE__ */ jsx(t14.Provider, {
|
|
384
373
|
value,
|
|
385
374
|
children: t22
|
|
386
375
|
});
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
$[
|
|
391
|
-
} else t23 = $[
|
|
376
|
+
$[52] = t14.Provider;
|
|
377
|
+
$[53] = t22;
|
|
378
|
+
$[54] = value;
|
|
379
|
+
$[55] = t23;
|
|
380
|
+
} else t23 = $[55];
|
|
392
381
|
return t23;
|
|
393
382
|
});
|
|
394
383
|
Tooltip.__SLOT__ = Symbol("Tooltip");
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import { c } from "../../utils/react-compiler-runtime.js";
|
|
2
2
|
import { useMergedRefs } from "../../hooks/useMergedRefs.js";
|
|
3
|
-
import { useProvidedRefOrCreate } from "../../hooks/useProvidedRefOrCreate.js";
|
|
4
|
-
import { useFeatureFlag } from "../../FeatureFlags/useFeatureFlag.js";
|
|
5
3
|
import { useRef } from "react";
|
|
6
4
|
// src/experimental/Tabs/useTabList.ts
|
|
7
5
|
function useTabList(props) {
|
|
8
|
-
const $ = c(
|
|
6
|
+
const $ = c(8);
|
|
9
7
|
const { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-orientation": ariaOrientation } = props;
|
|
10
|
-
const mergedRefEnabled = useFeatureFlag("primer_react_merged_forwarded_refs");
|
|
11
8
|
const tabListRef = useRef(null);
|
|
12
9
|
const mergedRef = useMergedRefs(tabListRef, props.ref);
|
|
13
|
-
const providedOrCreatedRef = useProvidedRefOrCreate(props.ref);
|
|
14
|
-
const readRef = mergedRefEnabled ? tabListRef : providedOrCreatedRef;
|
|
15
|
-
const appliedRef = mergedRefEnabled ? mergedRef : providedOrCreatedRef;
|
|
16
10
|
let t0;
|
|
17
|
-
if ($[0] !== ariaOrientation
|
|
11
|
+
if ($[0] !== ariaOrientation) {
|
|
18
12
|
t0 = (event) => {
|
|
19
|
-
const { current: tablist } =
|
|
13
|
+
const { current: tablist } = tabListRef;
|
|
20
14
|
if (tablist === null) return;
|
|
21
15
|
const tabs = getFocusableTabs(tablist);
|
|
22
16
|
const getCurrentIndex = () => {
|
|
@@ -47,28 +41,27 @@ function useTabList(props) {
|
|
|
47
41
|
}
|
|
48
42
|
};
|
|
49
43
|
$[0] = ariaOrientation;
|
|
50
|
-
$[1] =
|
|
51
|
-
|
|
52
|
-
} else t0 = $[2];
|
|
44
|
+
$[1] = t0;
|
|
45
|
+
} else t0 = $[1];
|
|
53
46
|
const onKeyDown = t0;
|
|
54
47
|
const t1 = ariaOrientation !== null && ariaOrientation !== void 0 ? ariaOrientation : "horizontal";
|
|
55
48
|
let t2;
|
|
56
|
-
if ($[
|
|
49
|
+
if ($[2] !== ariaLabel || $[3] !== ariaLabelledby || $[4] !== mergedRef || $[5] !== onKeyDown || $[6] !== t1) {
|
|
57
50
|
t2 = { tabListProps: {
|
|
58
|
-
ref:
|
|
51
|
+
ref: mergedRef,
|
|
59
52
|
"aria-label": ariaLabel,
|
|
60
53
|
"aria-labelledby": ariaLabelledby,
|
|
61
54
|
"aria-orientation": t1,
|
|
62
55
|
role: "tablist",
|
|
63
56
|
onKeyDown
|
|
64
57
|
} };
|
|
65
|
-
$[
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
$[
|
|
71
|
-
} else t2 = $[
|
|
58
|
+
$[2] = ariaLabel;
|
|
59
|
+
$[3] = ariaLabelledby;
|
|
60
|
+
$[4] = mergedRef;
|
|
61
|
+
$[5] = onKeyDown;
|
|
62
|
+
$[6] = t1;
|
|
63
|
+
$[7] = t2;
|
|
64
|
+
} else t2 = $[7];
|
|
72
65
|
return t2;
|
|
73
66
|
}
|
|
74
67
|
function _temp(tab) {
|
|
@@ -20,7 +20,7 @@ const UnderlinePanelsContext = /*#__PURE__*/ createContext({
|
|
|
20
20
|
loadingCounters: void 0
|
|
21
21
|
});
|
|
22
22
|
const UnderlinePanels = (t0) => {
|
|
23
|
-
const $ = c(
|
|
23
|
+
const $ = c(71);
|
|
24
24
|
let ariaLabel;
|
|
25
25
|
let ariaLabelledBy;
|
|
26
26
|
let children;
|
|
@@ -286,71 +286,59 @@ const UnderlinePanels = (t0) => {
|
|
|
286
286
|
$[51] = className;
|
|
287
287
|
$[52] = t16;
|
|
288
288
|
} else t16 = $[52];
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
if ($[53] !== t17 || $[54] !== t18 || $[55] !== t19 || $[56] !== tabListProps.onKeyDown || $[57] !== tabListProps.role || $[58] !== tabs_0) {
|
|
294
|
-
t20 = /* @__PURE__ */ jsx(UnderlineItemList, {
|
|
295
|
-
ref: listRef,
|
|
296
|
-
role: tabListProps.role,
|
|
297
|
-
"aria-label": t17,
|
|
298
|
-
"aria-labelledby": t18,
|
|
299
|
-
"aria-orientation": t19,
|
|
300
|
-
onKeyDown: tabListProps.onKeyDown,
|
|
289
|
+
let t17;
|
|
290
|
+
if ($[53] !== tabListProps || $[54] !== tabs_0) {
|
|
291
|
+
t17 = /* @__PURE__ */ jsx(UnderlineItemList, {
|
|
292
|
+
...tabListProps,
|
|
301
293
|
children: tabs_0
|
|
302
294
|
});
|
|
303
|
-
$[53] =
|
|
304
|
-
$[54] =
|
|
305
|
-
$[55] =
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
} else t20 = $[59];
|
|
311
|
-
let t21;
|
|
312
|
-
if ($[60] !== iconsVisible || $[61] !== props || $[62] !== t16 || $[63] !== t20) {
|
|
313
|
-
t21 = /* @__PURE__ */ jsx(UnderlineWrapper, {
|
|
295
|
+
$[53] = tabListProps;
|
|
296
|
+
$[54] = tabs_0;
|
|
297
|
+
$[55] = t17;
|
|
298
|
+
} else t17 = $[55];
|
|
299
|
+
let t18;
|
|
300
|
+
if ($[56] !== iconsVisible || $[57] !== props || $[58] !== t16 || $[59] !== t17) {
|
|
301
|
+
t18 = /* @__PURE__ */ jsx(UnderlineWrapper, {
|
|
314
302
|
ref: wrapperRef,
|
|
315
303
|
"data-icons-visible": iconsVisible,
|
|
316
304
|
className: t16,
|
|
317
305
|
...props,
|
|
318
|
-
children:
|
|
306
|
+
children: t17
|
|
319
307
|
});
|
|
320
|
-
$[
|
|
321
|
-
$[
|
|
322
|
-
$[
|
|
323
|
-
$[
|
|
324
|
-
$[
|
|
325
|
-
} else
|
|
326
|
-
let
|
|
327
|
-
if ($[
|
|
328
|
-
|
|
308
|
+
$[56] = iconsVisible;
|
|
309
|
+
$[57] = props;
|
|
310
|
+
$[58] = t16;
|
|
311
|
+
$[59] = t17;
|
|
312
|
+
$[60] = t18;
|
|
313
|
+
} else t18 = $[60];
|
|
314
|
+
let t19;
|
|
315
|
+
if ($[61] !== activationMode || $[62] !== effectiveValue || $[63] !== parentId || $[64] !== t15 || $[65] !== t18 || $[66] !== tabPanels_0) {
|
|
316
|
+
t19 = /* @__PURE__ */ jsxs(Tabs, {
|
|
329
317
|
id: parentId,
|
|
330
318
|
value: effectiveValue,
|
|
331
319
|
activationMode,
|
|
332
320
|
onValueChange: t15,
|
|
333
|
-
children: [
|
|
321
|
+
children: [t18, tabPanels_0]
|
|
334
322
|
});
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
$[
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
} else
|
|
343
|
-
let
|
|
344
|
-
if ($[
|
|
345
|
-
|
|
323
|
+
$[61] = activationMode;
|
|
324
|
+
$[62] = effectiveValue;
|
|
325
|
+
$[63] = parentId;
|
|
326
|
+
$[64] = t15;
|
|
327
|
+
$[65] = t18;
|
|
328
|
+
$[66] = tabPanels_0;
|
|
329
|
+
$[67] = t19;
|
|
330
|
+
} else t19 = $[67];
|
|
331
|
+
let t20;
|
|
332
|
+
if ($[68] !== contextValue || $[69] !== t19) {
|
|
333
|
+
t20 = /* @__PURE__ */ jsx(UnderlinePanelsContext.Provider, {
|
|
346
334
|
value: contextValue,
|
|
347
|
-
children:
|
|
335
|
+
children: t19
|
|
348
336
|
});
|
|
349
|
-
$[
|
|
350
|
-
$[
|
|
351
|
-
$[
|
|
352
|
-
} else
|
|
353
|
-
return
|
|
337
|
+
$[68] = contextValue;
|
|
338
|
+
$[69] = t19;
|
|
339
|
+
$[70] = t20;
|
|
340
|
+
} else t20 = $[70];
|
|
341
|
+
return t20;
|
|
354
342
|
};
|
|
355
343
|
const TabImpl = (t0) => {
|
|
356
344
|
const $ = c(24);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.47.0-rc.
|
|
4
|
+
"version": "38.47.0-rc.2f87f01e5",
|
|
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",
|
|
@@ -87,10 +87,8 @@
|
|
|
87
87
|
"deepmerge": "^4.3.1",
|
|
88
88
|
"focus-visible": "^5.2.1",
|
|
89
89
|
"history": "^5.0.0",
|
|
90
|
-
"hsluv": "1.0.1",
|
|
91
90
|
"lodash.isempty": "^4.4.0",
|
|
92
|
-
"lodash.isobject": "^3.0.2"
|
|
93
|
-
"react-intersection-observer": "^10.0.3"
|
|
91
|
+
"lodash.isobject": "^3.0.2"
|
|
94
92
|
},
|
|
95
93
|
"devDependencies": {
|
|
96
94
|
"@actions/core": "1.11.1",
|
|
@@ -162,6 +160,7 @@
|
|
|
162
160
|
"react": "18.3.1",
|
|
163
161
|
"react-compiler-runtime": "^1.0.0",
|
|
164
162
|
"react-dom": "18.3.1",
|
|
163
|
+
"react-intersection-observer": "^10.0.3",
|
|
165
164
|
"react-is": "18.3.1",
|
|
166
165
|
"recast": "0.23.7",
|
|
167
166
|
"rimraf": "5.0.5",
|