@primer/react 38.44.1-rc.f98981f35 → 38.45.0-rc.33f45c4d7
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 +19 -1
- package/dist/ActionMenu/ActionMenu.js +12 -8
- package/dist/Blankslate/{Blankslate-11d7a7fd.css → Blankslate-670cf090.css} +2 -2
- package/dist/Blankslate/Blankslate-670cf090.css.map +1 -0
- package/dist/Blankslate/Blankslate.js +46 -36
- package/dist/Blankslate/Blankslate.module.css.js +1 -1
- package/dist/DataTable/DataTable.d.ts +11 -2
- package/dist/DataTable/DataTable.js +153 -61
- package/dist/DataTable/Table-3916da1f.css +2 -0
- package/dist/DataTable/Table-3916da1f.css.map +1 -0
- package/dist/DataTable/Table.d.ts +1 -0
- package/dist/DataTable/Table.js +18 -13
- package/dist/DataTable/Table.module.css.js +3 -1
- package/dist/DataTable/TableBulkActions-aca5618a.css +2 -0
- package/dist/DataTable/TableBulkActions-aca5618a.css.map +1 -0
- package/dist/DataTable/TableBulkActions.d.ts +15 -0
- package/dist/DataTable/TableBulkActions.js +217 -0
- package/dist/DataTable/TableBulkActions.module.css.js +12 -0
- package/dist/DataTable/TableGroup.d.ts +7 -1
- package/dist/DataTable/TableGroup.js +153 -120
- package/dist/DataTable/index.d.ts +4 -2
- package/dist/DataTable/index.js +2 -0
- package/dist/DataTable/useTable.js +103 -65
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/FilteredActionList/FilteredActionList.js +7 -3
- package/dist/FilteredActionList/FilteredActionListInput.d.ts +2 -1
- package/dist/FilteredActionList/FilteredActionListInput.js +16 -14
- package/dist/SegmentedControl/SegmentedControl-3dc28307.css +2 -0
- package/dist/SegmentedControl/SegmentedControl-3dc28307.css.map +1 -0
- package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
- package/dist/SegmentedControl/SegmentedControlButton.js +119 -76
- package/dist/TooltipV2/Tooltip.d.ts +1 -1
- package/dist/TooltipV2/Tooltip.js +128 -101
- package/dist/experimental/index.d.ts +3 -2
- package/dist/utils/descendant-registry.d.ts +1 -1
- package/dist/utils/descendant-registry.js +94 -76
- package/generated/components.json +68 -2
- package/package.json +2 -2
- package/dist/Blankslate/Blankslate-11d7a7fd.css.map +0 -1
- package/dist/DataTable/Table-0327e248.css +0 -2
- package/dist/DataTable/Table-0327e248.css.map +0 -1
- package/dist/SegmentedControl/SegmentedControl-99b8e34e.css +0 -2
- package/dist/SegmentedControl/SegmentedControl-99b8e34e.css.map +0 -1
|
@@ -82,7 +82,7 @@ const isInteractive = (element) => {
|
|
|
82
82
|
};
|
|
83
83
|
const emptyKeybindingHints = [];
|
|
84
84
|
const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
85
|
-
const $ = c(
|
|
85
|
+
const $ = c(63);
|
|
86
86
|
let children;
|
|
87
87
|
let className;
|
|
88
88
|
let id;
|
|
@@ -139,6 +139,7 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
139
139
|
const [calculatedDirection, setCalculatedDirection] = useState(direction);
|
|
140
140
|
const [isPopoverOpen, setIsPopoverOpen] = useState(false);
|
|
141
141
|
const openTimeoutRef = React.useRef(null);
|
|
142
|
+
const shouldOpenOnFocusRef = useRef(false);
|
|
142
143
|
const { safeSetTimeout, safeClearTimeout } = useSafeTimeout();
|
|
143
144
|
let t6;
|
|
144
145
|
if ($[11] !== _privateDisableTooltip || $[12] !== direction || $[13] !== readTriggerRef) {
|
|
@@ -193,15 +194,37 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
193
194
|
} else t7 = $[17];
|
|
194
195
|
const closeTooltip = t7;
|
|
195
196
|
let t8;
|
|
196
|
-
if ($[18] !== tooltipId) {
|
|
197
|
-
t8 = { tooltipId };
|
|
198
|
-
$[18] = tooltipId;
|
|
199
|
-
$[19] = t8;
|
|
200
|
-
} else t8 = $[19];
|
|
201
|
-
const value = t8;
|
|
202
197
|
let t9;
|
|
203
|
-
if ($[
|
|
204
|
-
|
|
198
|
+
if ($[18] !== _privateDisableTooltip || $[19] !== closeTooltip || $[20] !== openTooltip) {
|
|
199
|
+
t8 = () => {
|
|
200
|
+
if (_privateDisableTooltip) closeTooltip();
|
|
201
|
+
else if (shouldOpenOnFocusRef.current) openTooltip();
|
|
202
|
+
};
|
|
203
|
+
t9 = [
|
|
204
|
+
_privateDisableTooltip,
|
|
205
|
+
closeTooltip,
|
|
206
|
+
openTooltip
|
|
207
|
+
];
|
|
208
|
+
$[18] = _privateDisableTooltip;
|
|
209
|
+
$[19] = closeTooltip;
|
|
210
|
+
$[20] = openTooltip;
|
|
211
|
+
$[21] = t8;
|
|
212
|
+
$[22] = t9;
|
|
213
|
+
} else {
|
|
214
|
+
t8 = $[21];
|
|
215
|
+
t9 = $[22];
|
|
216
|
+
}
|
|
217
|
+
useEffect(t8, t9);
|
|
218
|
+
let t10;
|
|
219
|
+
if ($[23] !== tooltipId) {
|
|
220
|
+
t10 = { tooltipId };
|
|
221
|
+
$[23] = tooltipId;
|
|
222
|
+
$[24] = t10;
|
|
223
|
+
} else t10 = $[24];
|
|
224
|
+
const value = t10;
|
|
225
|
+
let t11;
|
|
226
|
+
if ($[25] !== readTriggerRef || $[26] !== type) {
|
|
227
|
+
t11 = () => {
|
|
205
228
|
if (!tooltipElRef.current || !readTriggerRef.current) return;
|
|
206
229
|
const trigger_0 = readTriggerRef.current;
|
|
207
230
|
const isInvalidTrigger = !(trigger_0 instanceof HTMLElement);
|
|
@@ -221,56 +244,57 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
221
244
|
}
|
|
222
245
|
tooltipElRef.current.setAttribute("popover", "auto");
|
|
223
246
|
};
|
|
224
|
-
$[
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
} else
|
|
228
|
-
let
|
|
229
|
-
if ($[
|
|
230
|
-
|
|
247
|
+
$[25] = readTriggerRef;
|
|
248
|
+
$[26] = type;
|
|
249
|
+
$[27] = t11;
|
|
250
|
+
} else t11 = $[27];
|
|
251
|
+
let t12;
|
|
252
|
+
if ($[28] !== direction || $[29] !== readTriggerRef || $[30] !== type) {
|
|
253
|
+
t12 = [
|
|
231
254
|
tooltipElRef,
|
|
232
255
|
readTriggerRef,
|
|
233
256
|
direction,
|
|
234
257
|
type
|
|
235
258
|
];
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
} else
|
|
241
|
-
useEffect(
|
|
242
|
-
let
|
|
243
|
-
if ($[
|
|
244
|
-
|
|
259
|
+
$[28] = direction;
|
|
260
|
+
$[29] = readTriggerRef;
|
|
261
|
+
$[30] = type;
|
|
262
|
+
$[31] = t12;
|
|
263
|
+
} else t12 = $[31];
|
|
264
|
+
useEffect(t11, t12);
|
|
265
|
+
let t13;
|
|
266
|
+
if ($[32] !== closeTooltip || $[33] !== isPopoverOpen) {
|
|
267
|
+
t13 = (event) => {
|
|
245
268
|
if (isPopoverOpen) {
|
|
269
|
+
shouldOpenOnFocusRef.current = false;
|
|
246
270
|
event.stopImmediatePropagation();
|
|
247
271
|
event.preventDefault();
|
|
248
272
|
closeTooltip();
|
|
249
273
|
}
|
|
250
274
|
};
|
|
251
|
-
$[
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
} else
|
|
255
|
-
let
|
|
256
|
-
if ($[
|
|
257
|
-
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
} else
|
|
261
|
-
useOnEscapePress(
|
|
275
|
+
$[32] = closeTooltip;
|
|
276
|
+
$[33] = isPopoverOpen;
|
|
277
|
+
$[34] = t13;
|
|
278
|
+
} else t13 = $[34];
|
|
279
|
+
let t14;
|
|
280
|
+
if ($[35] !== isPopoverOpen) {
|
|
281
|
+
t14 = [isPopoverOpen];
|
|
282
|
+
$[35] = isPopoverOpen;
|
|
283
|
+
$[36] = t14;
|
|
284
|
+
} else t14 = $[36];
|
|
285
|
+
useOnEscapePress(t13, t14);
|
|
262
286
|
const platform = usePlatform();
|
|
263
287
|
const hasAriaLabel_0 = "aria-label" in rest;
|
|
264
|
-
let
|
|
265
|
-
if ($[
|
|
266
|
-
|
|
267
|
-
$[
|
|
268
|
-
$[
|
|
269
|
-
} else
|
|
270
|
-
const keybindingHints =
|
|
288
|
+
let t15;
|
|
289
|
+
if ($[37] !== keybindingHint) {
|
|
290
|
+
t15 = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
|
|
291
|
+
$[37] = keybindingHint;
|
|
292
|
+
$[38] = t15;
|
|
293
|
+
} else t15 = $[38];
|
|
294
|
+
const keybindingHints = t15;
|
|
271
295
|
if (isFragmentTrigger) return child;
|
|
272
|
-
const
|
|
273
|
-
const
|
|
296
|
+
const t16 = TooltipContext;
|
|
297
|
+
const t17 = /*#__PURE__*/ React.isValidElement(child) && /*#__PURE__*/ React.cloneElement(child, {
|
|
274
298
|
ref: appliedTriggerRef,
|
|
275
299
|
"aria-describedby": (() => {
|
|
276
300
|
if (type !== "description") return child.props["aria-describedby"];
|
|
@@ -281,6 +305,7 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
281
305
|
"aria-labelledby": type === "label" ? tooltipId : child.props["aria-labelledby"],
|
|
282
306
|
onBlur: (event_0) => {
|
|
283
307
|
var _child$props$onBlur, _child$props;
|
|
308
|
+
shouldOpenOnFocusRef.current = false;
|
|
284
309
|
closeTooltip();
|
|
285
310
|
(_child$props$onBlur = (_child$props = child.props).onBlur) === null || _child$props$onBlur === void 0 || _child$props$onBlur.call(_child$props, event_0);
|
|
286
311
|
},
|
|
@@ -291,19 +316,21 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
291
316
|
},
|
|
292
317
|
onFocus: (event_2) => {
|
|
293
318
|
var _child$props$onFocus, _child$props3;
|
|
319
|
+
shouldOpenOnFocusRef.current = false;
|
|
320
|
+
(_child$props$onFocus = (_child$props3 = child.props).onFocus) === null || _child$props$onFocus === void 0 || _child$props$onFocus.call(_child$props3, event_2);
|
|
294
321
|
try {
|
|
295
322
|
if (!event_2.target.matches(":focus-visible")) return;
|
|
296
|
-
} catch (
|
|
323
|
+
} catch (t18) {}
|
|
324
|
+
shouldOpenOnFocusRef.current = true;
|
|
297
325
|
openTooltip();
|
|
298
|
-
(_child$props$onFocus = (_child$props3 = child.props).onFocus) === null || _child$props$onFocus === void 0 || _child$props$onFocus.call(_child$props3, event_2);
|
|
299
326
|
},
|
|
300
327
|
onMouseOverCapture: (event_3) => {
|
|
328
|
+
var _child$props$onMouseO, _child$props4;
|
|
329
|
+
(_child$props$onMouseO = (_child$props4 = child.props).onMouseOverCapture) === null || _child$props$onMouseO === void 0 || _child$props$onMouseO.call(_child$props4, event_3);
|
|
301
330
|
const delayTime = delayTimeMap[delay] || 50;
|
|
302
331
|
openTimeoutRef.current = safeSetTimeout(() => {
|
|
303
|
-
var _child$props$onMouseE, _child$props4;
|
|
304
332
|
if (!openTimeoutRef.current) return;
|
|
305
333
|
openTooltip();
|
|
306
|
-
(_child$props$onMouseE = (_child$props4 = child.props).onMouseEnter) === null || _child$props$onMouseE === void 0 || _child$props$onMouseE.call(_child$props4, event_3);
|
|
307
334
|
}, delayTime);
|
|
308
335
|
},
|
|
309
336
|
onMouseLeave: (event_4) => {
|
|
@@ -312,17 +339,17 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
312
339
|
(_child$props$onMouseL = (_child$props5 = child.props).onMouseLeave) === null || _child$props$onMouseL === void 0 || _child$props$onMouseL.call(_child$props5, event_4);
|
|
313
340
|
}
|
|
314
341
|
});
|
|
315
|
-
let
|
|
316
|
-
if ($[
|
|
317
|
-
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
} else
|
|
321
|
-
const
|
|
322
|
-
const
|
|
323
|
-
let
|
|
324
|
-
if ($[
|
|
325
|
-
|
|
342
|
+
let t19;
|
|
343
|
+
if ($[39] !== className) {
|
|
344
|
+
t19 = clsx(className, Tooltip_module_css_default.Tooltip);
|
|
345
|
+
$[39] = className;
|
|
346
|
+
$[40] = t19;
|
|
347
|
+
} else t19 = $[40];
|
|
348
|
+
const t20 = type === "description" ? "tooltip" : void 0;
|
|
349
|
+
const t21 = hasAriaLabel_0 || keybindingHints.length === 0 ? tooltipId : void 0;
|
|
350
|
+
let t22;
|
|
351
|
+
if ($[41] !== hasAriaLabel_0 || $[42] !== keybindingHints || $[43] !== platform || $[44] !== text || $[45] !== tooltipId) {
|
|
352
|
+
t22 = keybindingHints.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
326
353
|
id: hasAriaLabel_0 ? void 0 : tooltipId,
|
|
327
354
|
children: [text, /* @__PURE__ */ jsxs(VisuallyHidden, { children: [
|
|
328
355
|
"(",
|
|
@@ -335,57 +362,57 @@ const Tooltip = /*#__PURE__*/ React.forwardRef((t0, forwardedRef) => {
|
|
|
335
362
|
"data-component": "Tooltip.KeybindingHintContainer",
|
|
336
363
|
children: keybindingHints.map(_temp4)
|
|
337
364
|
})] }) : text;
|
|
338
|
-
$[
|
|
339
|
-
$[
|
|
340
|
-
$[
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
} else
|
|
345
|
-
let
|
|
346
|
-
if ($[
|
|
347
|
-
|
|
348
|
-
className:
|
|
365
|
+
$[41] = hasAriaLabel_0;
|
|
366
|
+
$[42] = keybindingHints;
|
|
367
|
+
$[43] = platform;
|
|
368
|
+
$[44] = text;
|
|
369
|
+
$[45] = tooltipId;
|
|
370
|
+
$[46] = t22;
|
|
371
|
+
} else t22 = $[46];
|
|
372
|
+
let t23;
|
|
373
|
+
if ($[47] !== calculatedDirection || $[48] !== closeTooltip || $[49] !== openTooltip || $[50] !== rest || $[51] !== t19 || $[52] !== t20 || $[53] !== t21 || $[54] !== t22) {
|
|
374
|
+
t23 = /* @__PURE__ */ jsx("span", {
|
|
375
|
+
className: t19,
|
|
349
376
|
ref: tooltipElRef,
|
|
350
377
|
"data-direction": calculatedDirection,
|
|
351
378
|
"data-component": "Tooltip",
|
|
352
379
|
...rest,
|
|
353
|
-
role:
|
|
380
|
+
role: t20,
|
|
354
381
|
"aria-hidden": true,
|
|
355
382
|
onMouseEnter: openTooltip,
|
|
356
383
|
onMouseLeave: closeTooltip,
|
|
357
|
-
id:
|
|
358
|
-
children: t20
|
|
359
|
-
});
|
|
360
|
-
$[42] = calculatedDirection;
|
|
361
|
-
$[43] = closeTooltip;
|
|
362
|
-
$[44] = openTooltip;
|
|
363
|
-
$[45] = rest;
|
|
364
|
-
$[46] = t17;
|
|
365
|
-
$[47] = t18;
|
|
366
|
-
$[48] = t19;
|
|
367
|
-
$[49] = t20;
|
|
368
|
-
$[50] = t21;
|
|
369
|
-
} else t21 = $[50];
|
|
370
|
-
let t22;
|
|
371
|
-
if ($[51] !== t15 || $[52] !== t21) {
|
|
372
|
-
t22 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t15, t21] });
|
|
373
|
-
$[51] = t15;
|
|
374
|
-
$[52] = t21;
|
|
375
|
-
$[53] = t22;
|
|
376
|
-
} else t22 = $[53];
|
|
377
|
-
let t23;
|
|
378
|
-
if ($[54] !== t14.Provider || $[55] !== t22 || $[56] !== value) {
|
|
379
|
-
t23 = /* @__PURE__ */ jsx(t14.Provider, {
|
|
380
|
-
value,
|
|
384
|
+
id: t21,
|
|
381
385
|
children: t22
|
|
382
386
|
});
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
387
|
+
$[47] = calculatedDirection;
|
|
388
|
+
$[48] = closeTooltip;
|
|
389
|
+
$[49] = openTooltip;
|
|
390
|
+
$[50] = rest;
|
|
391
|
+
$[51] = t19;
|
|
392
|
+
$[52] = t20;
|
|
393
|
+
$[53] = t21;
|
|
394
|
+
$[54] = t22;
|
|
395
|
+
$[55] = t23;
|
|
396
|
+
} else t23 = $[55];
|
|
397
|
+
let t24;
|
|
398
|
+
if ($[56] !== t17 || $[57] !== t23) {
|
|
399
|
+
t24 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t17, t23] });
|
|
400
|
+
$[56] = t17;
|
|
386
401
|
$[57] = t23;
|
|
387
|
-
|
|
388
|
-
|
|
402
|
+
$[58] = t24;
|
|
403
|
+
} else t24 = $[58];
|
|
404
|
+
let t25;
|
|
405
|
+
if ($[59] !== t16.Provider || $[60] !== t24 || $[61] !== value) {
|
|
406
|
+
t25 = /* @__PURE__ */ jsx(t16.Provider, {
|
|
407
|
+
value,
|
|
408
|
+
children: t24
|
|
409
|
+
});
|
|
410
|
+
$[59] = t16.Provider;
|
|
411
|
+
$[60] = t24;
|
|
412
|
+
$[61] = value;
|
|
413
|
+
$[62] = t25;
|
|
414
|
+
} else t25 = $[62];
|
|
415
|
+
return t25;
|
|
389
416
|
});
|
|
390
417
|
Tooltip.__SLOT__ = Symbol("Tooltip");
|
|
391
418
|
function _temp(grandChild) {
|
|
@@ -27,7 +27,8 @@ import { BlankslateProps } from "../Blankslate/Blankslate.js";
|
|
|
27
27
|
import { Blankslate as BlankslateContainer } from "../Blankslate/index.js";
|
|
28
28
|
import { CardActionProps as ActionProps, CardDescriptionProps as DescriptionProps, CardHeadingProps as HeadingProps, CardIconProps as IconProps, CardImageProps as ImageProps, CardMetadataProps as MetadataProps, CardProps } from "../Card/Card.js";
|
|
29
29
|
import { Card } from "../Card/index.js";
|
|
30
|
-
import {
|
|
30
|
+
import { TableBulkActionsProps } from "../DataTable/TableBulkActions.js";
|
|
31
|
+
import { DataTable, DataTableBulkActionsContext, DataTableProps } from "../DataTable/DataTable.js";
|
|
31
32
|
import { TableActionsProps, TableBodyProps, TableCellProps, TableContainerProps, TableHeadProps, TableHeaderProps, TableProps, TableRowProps, TableRowSelectionProps, TableSelectionHeaderProps, TableSubtitleProps, TableTitleProps } from "../DataTable/Table.js";
|
|
32
33
|
import { TableGroupProps } from "../DataTable/TableGroup.js";
|
|
33
34
|
import { Table } from "../DataTable/index.js";
|
|
@@ -51,4 +52,4 @@ import { useTabPanel } from "./Tabs/useTabPanel.js";
|
|
|
51
52
|
import { TopicTagProps } from "../TopicTag/TopicTag.js";
|
|
52
53
|
import { TopicTagGroupProps } from "../TopicTag/TopicTagGroup.js";
|
|
53
54
|
import { TopicTag } from "../TopicTag/index.js";
|
|
54
|
-
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
55
|
+
export { ActionBar, type ActionBarButtonProps, type ActionBarMenuItemProps, type ActionBarMenuProps, type ActionBarProps, Announce, type AnnounceProps, AriaAlert, type AriaAlertProps, AriaStatus, type AriaStatusProps, BlankslateContainer as Blankslate, type BlankslateProps, ButtonBase, type ButtonBaseProps, Card, type ActionProps as CardActionProps, type DescriptionProps as CardDescriptionProps, type HeadingProps as CardHeadingProps, type IconProps as CardIconProps, type ImageProps as CardImageProps, type MetadataProps as CardMetadataProps, type CardProps, type CellAlignment, type Column, type ColumnWidth, DataTable, type DataTableBulkActionsContext, type DataTableData, type DataTableProps, type DataTableRowGroup, type DataTableRowId, DefaultFeatureFlags, Dialog, type DialogButtonProps, type DialogHeaderProps, type DialogHeight, type DialogProps, type DialogWidth, FeatureFlags, type FeatureFlagsProps, FilteredActionList, type FilteredActionListInputProps, FilteredActionListLoadingTypes, type FilteredActionListProps, Hidden, type HiddenProps, InlineMessage, type InlineMessageProps, IssueLabel, type IssueLabelProps, KeybindingHint, type KeybindingHintProps, NavList, type NavListDividerProps, type NavListGroupProps, type NavListItemProps, type NavListLeadingVisualProps, type NavListProps, type NavListSubNavProps, type NavListTrailingVisualProps, type ObjectPaths, PageHeader, type ActionsProps as PageHeaderActionsProps, type PageHeaderProps, type TitleProps as PageHeaderTitleProps, ScrollableRegion, type ScrollableRegionProps, SelectPanel, type SelectPanelMessageProps, type SelectPanelProps, type SelectPanelSecondaryActionProps, SkeletonAvatar, type SkeletonAvatarProps, SkeletonBox, type SkeletonBoxProps, SkeletonText, type SkeletonTextProps, SlotConfig, Stack, type StackItemProps, type StackProps, type TabListProps, type TabPanelProps, type TabProps, Table, type TableActionsProps, type TableBodyProps, type TableBulkActionsProps, type TableCellProps, type TableContainerProps, type TableGroupProps, type TableHeadProps, type TableHeaderProps, type TableProps, type TableRowProps, type TableRowSelectionProps, type TableSelectionHeaderProps, type TableSubtitleProps, type TableTitleProps, Tabs, type TabsProps, type TitleProps, Tooltip, type TooltipProps, TopicTag, type TopicTagGroupProps, type TopicTagProps, _default as UnderlinePanels, type PanelProps as UnderlinePanelsPanelProps, type UnderlinePanelsProps, type TabProps$1 as UnderlinePanelsTabProps, type UniqueRow, createColumnHelper, getAccessibleKeybindingHintString, useFeatureFlag, useOverflow, useSlots, useTab, useTabList, useTabPanel };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
@@ -19,9 +19,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
19
19
|
* the string key is a unique and stable identifier for each component which can be used as a `key` if necessary.
|
|
20
20
|
*
|
|
21
21
|
* @note Note that this pattern is not SSR compatible. It won't raise errors or hydration mismatches, but the
|
|
22
|
-
* registry will not be available during SSR.
|
|
23
|
-
* after hydration on the client. The initial `undefined` value
|
|
24
|
-
* render if necessary.
|
|
22
|
+
* registry will not be available during SSR. Registrations are collected and published during the effect phase,
|
|
23
|
+
* so the registry will be populated after hydration on the client. The initial `undefined` value
|
|
24
|
+
* can be used to safely show loading UI during SSR/initial render if necessary.
|
|
25
25
|
*/
|
|
26
26
|
function createDescendantRegistry() {
|
|
27
27
|
const Context = /*#__PURE__*/ createContext({
|
|
@@ -83,118 +83,136 @@ function createDescendantRegistry() {
|
|
|
83
83
|
}
|
|
84
84
|
const unsetValue = Symbol("unset");
|
|
85
85
|
function Provider(t0) {
|
|
86
|
-
const $ = c(
|
|
86
|
+
const $ = c(21);
|
|
87
87
|
const { children, setRegistry } = t0;
|
|
88
88
|
const workingRegistryRef = useRef("queued");
|
|
89
|
-
const [key, rebuildRegistry] = useReducer(_temp, 0);
|
|
90
|
-
const pendingRebuildRef = useRef(false);
|
|
91
|
-
const isMountedRef = useRef(true);
|
|
92
89
|
let t1;
|
|
93
90
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
94
|
-
t1 = ()
|
|
95
|
-
if (pendingRebuildRef.current) return;
|
|
96
|
-
pendingRebuildRef.current = true;
|
|
97
|
-
scheduleMicrotask(() => {
|
|
98
|
-
pendingRebuildRef.current = false;
|
|
99
|
-
if (isMountedRef.current) rebuildRegistry();
|
|
100
|
-
});
|
|
101
|
-
};
|
|
91
|
+
t1 = /* @__PURE__ */ new Map();
|
|
102
92
|
$[0] = t1;
|
|
103
93
|
} else t1 = $[0];
|
|
104
|
-
const
|
|
94
|
+
const registryRef = useRef(t1);
|
|
95
|
+
const [key, rebuildRegistry] = useReducer(_temp, 0);
|
|
96
|
+
const pendingRegistryUpdateRef = useRef(false);
|
|
97
|
+
const isMountedRef = useRef(true);
|
|
105
98
|
let t2;
|
|
106
|
-
|
|
107
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
99
|
+
if ($[1] !== setRegistry) {
|
|
108
100
|
t2 = () => {
|
|
101
|
+
if (pendingRegistryUpdateRef.current) return;
|
|
102
|
+
pendingRegistryUpdateRef.current = true;
|
|
103
|
+
scheduleMicrotask(() => {
|
|
104
|
+
pendingRegistryUpdateRef.current = false;
|
|
105
|
+
if (!isMountedRef.current) return;
|
|
106
|
+
if (workingRegistryRef.current === "queued") rebuildRegistry();
|
|
107
|
+
else if (workingRegistryRef.current === "idle") setRegistry(new Map(registryRef.current));
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
$[1] = setRegistry;
|
|
111
|
+
$[2] = t2;
|
|
112
|
+
} else t2 = $[2];
|
|
113
|
+
const scheduleRegistryUpdate = t2;
|
|
114
|
+
let t3;
|
|
115
|
+
let t4;
|
|
116
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
117
|
+
t3 = () => {
|
|
109
118
|
isMountedRef.current = true;
|
|
110
119
|
return () => {
|
|
111
120
|
isMountedRef.current = false;
|
|
112
121
|
};
|
|
113
122
|
};
|
|
114
|
-
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
123
|
+
t4 = [];
|
|
124
|
+
$[3] = t3;
|
|
125
|
+
$[4] = t4;
|
|
117
126
|
} else {
|
|
118
|
-
|
|
119
|
-
|
|
127
|
+
t3 = $[3];
|
|
128
|
+
t4 = $[4];
|
|
120
129
|
}
|
|
121
|
-
useEffect(
|
|
122
|
-
let
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
130
|
+
useEffect(t3, t4);
|
|
131
|
+
let t5;
|
|
132
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
133
|
+
t5 = function instantiateNewRegistry() {
|
|
125
134
|
if (workingRegistryRef.current === "queued") workingRegistryRef.current = /* @__PURE__ */ new Map();
|
|
126
135
|
};
|
|
127
|
-
$[
|
|
128
|
-
} else
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
136
|
+
$[5] = t5;
|
|
137
|
+
} else t5 = $[5];
|
|
138
|
+
let t6;
|
|
139
|
+
if ($[6] !== key) {
|
|
140
|
+
t6 = [key];
|
|
141
|
+
$[6] = key;
|
|
142
|
+
$[7] = t6;
|
|
143
|
+
} else t6 = $[7];
|
|
144
|
+
useIsomorphicLayoutEffect(t5, t6);
|
|
145
|
+
let t7;
|
|
146
|
+
if ($[8] !== scheduleRegistryUpdate) {
|
|
147
|
+
t7 = (id) => {
|
|
133
148
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.set(id, unsetValue);
|
|
134
149
|
else if (workingRegistryRef.current === "idle") {
|
|
135
150
|
workingRegistryRef.current = "queued";
|
|
136
|
-
|
|
151
|
+
scheduleRegistryUpdate();
|
|
137
152
|
}
|
|
138
153
|
return function unregister() {
|
|
139
154
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.delete(id);
|
|
140
|
-
else if (workingRegistryRef.current === "idle")
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
});
|
|
155
|
+
else if (workingRegistryRef.current === "idle") {
|
|
156
|
+
registryRef.current.delete(id);
|
|
157
|
+
scheduleRegistryUpdate();
|
|
158
|
+
}
|
|
145
159
|
};
|
|
146
160
|
};
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
-
} else
|
|
150
|
-
const register =
|
|
151
|
-
let
|
|
152
|
-
if ($[
|
|
153
|
-
|
|
161
|
+
$[8] = scheduleRegistryUpdate;
|
|
162
|
+
$[9] = t7;
|
|
163
|
+
} else t7 = $[9];
|
|
164
|
+
const register = t7;
|
|
165
|
+
let t8;
|
|
166
|
+
if ($[10] !== scheduleRegistryUpdate) {
|
|
167
|
+
t8 = (id_0, value) => {
|
|
154
168
|
if (workingRegistryRef.current instanceof Map) workingRegistryRef.current.set(id_0, value);
|
|
155
|
-
else if (workingRegistryRef.current === "idle")
|
|
169
|
+
else if (workingRegistryRef.current === "idle") {
|
|
170
|
+
registryRef.current.set(id_0, value);
|
|
171
|
+
scheduleRegistryUpdate();
|
|
172
|
+
}
|
|
156
173
|
};
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
160
|
-
const updateValue =
|
|
161
|
-
let
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
174
|
+
$[10] = scheduleRegistryUpdate;
|
|
175
|
+
$[11] = t8;
|
|
176
|
+
} else t8 = $[11];
|
|
177
|
+
const updateValue = t8;
|
|
178
|
+
let t9;
|
|
179
|
+
if ($[12] !== setRegistry) {
|
|
180
|
+
t9 = function commitWorkingRegistry() {
|
|
164
181
|
if (workingRegistryRef.current instanceof Map) {
|
|
165
182
|
const setEntries = Array.from(workingRegistryRef.current.entries()).filter(_temp2);
|
|
166
|
-
|
|
183
|
+
registryRef.current = new Map(setEntries);
|
|
167
184
|
workingRegistryRef.current = "idle";
|
|
185
|
+
setRegistry(new Map(setEntries));
|
|
168
186
|
}
|
|
169
187
|
};
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
} else
|
|
173
|
-
useEffect(
|
|
174
|
-
let
|
|
175
|
-
if ($[
|
|
176
|
-
|
|
188
|
+
$[12] = setRegistry;
|
|
189
|
+
$[13] = t9;
|
|
190
|
+
} else t9 = $[13];
|
|
191
|
+
useEffect(t9);
|
|
192
|
+
let t10;
|
|
193
|
+
if ($[14] !== key || $[15] !== register || $[16] !== updateValue) {
|
|
194
|
+
t10 = {
|
|
177
195
|
register,
|
|
178
196
|
updateValue,
|
|
179
197
|
key
|
|
180
198
|
};
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
} else
|
|
186
|
-
const contextValue =
|
|
187
|
-
let
|
|
188
|
-
if ($[
|
|
189
|
-
|
|
199
|
+
$[14] = key;
|
|
200
|
+
$[15] = register;
|
|
201
|
+
$[16] = updateValue;
|
|
202
|
+
$[17] = t10;
|
|
203
|
+
} else t10 = $[17];
|
|
204
|
+
const contextValue = t10;
|
|
205
|
+
let t11;
|
|
206
|
+
if ($[18] !== children || $[19] !== contextValue) {
|
|
207
|
+
t11 = /* @__PURE__ */ jsx(Context.Provider, {
|
|
190
208
|
value: contextValue,
|
|
191
209
|
children
|
|
192
210
|
});
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
$[
|
|
196
|
-
} else
|
|
197
|
-
return
|
|
211
|
+
$[18] = children;
|
|
212
|
+
$[19] = contextValue;
|
|
213
|
+
$[20] = t11;
|
|
214
|
+
} else t11 = $[20];
|
|
215
|
+
return t11;
|
|
198
216
|
}
|
|
199
217
|
function _temp2(entry) {
|
|
200
218
|
return entry[1] !== unsetValue;
|