@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.
Files changed (43) hide show
  1. package/CHANGELOG.md +19 -1
  2. package/dist/ActionMenu/ActionMenu.js +12 -8
  3. package/dist/Blankslate/{Blankslate-11d7a7fd.css → Blankslate-670cf090.css} +2 -2
  4. package/dist/Blankslate/Blankslate-670cf090.css.map +1 -0
  5. package/dist/Blankslate/Blankslate.js +46 -36
  6. package/dist/Blankslate/Blankslate.module.css.js +1 -1
  7. package/dist/DataTable/DataTable.d.ts +11 -2
  8. package/dist/DataTable/DataTable.js +153 -61
  9. package/dist/DataTable/Table-3916da1f.css +2 -0
  10. package/dist/DataTable/Table-3916da1f.css.map +1 -0
  11. package/dist/DataTable/Table.d.ts +1 -0
  12. package/dist/DataTable/Table.js +18 -13
  13. package/dist/DataTable/Table.module.css.js +3 -1
  14. package/dist/DataTable/TableBulkActions-aca5618a.css +2 -0
  15. package/dist/DataTable/TableBulkActions-aca5618a.css.map +1 -0
  16. package/dist/DataTable/TableBulkActions.d.ts +15 -0
  17. package/dist/DataTable/TableBulkActions.js +217 -0
  18. package/dist/DataTable/TableBulkActions.module.css.js +12 -0
  19. package/dist/DataTable/TableGroup.d.ts +7 -1
  20. package/dist/DataTable/TableGroup.js +153 -120
  21. package/dist/DataTable/index.d.ts +4 -2
  22. package/dist/DataTable/index.js +2 -0
  23. package/dist/DataTable/useTable.js +103 -65
  24. package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
  25. package/dist/FilteredActionList/FilteredActionList.js +7 -3
  26. package/dist/FilteredActionList/FilteredActionListInput.d.ts +2 -1
  27. package/dist/FilteredActionList/FilteredActionListInput.js +16 -14
  28. package/dist/SegmentedControl/SegmentedControl-3dc28307.css +2 -0
  29. package/dist/SegmentedControl/SegmentedControl-3dc28307.css.map +1 -0
  30. package/dist/SegmentedControl/SegmentedControl.module.css.js +1 -1
  31. package/dist/SegmentedControl/SegmentedControlButton.js +119 -76
  32. package/dist/TooltipV2/Tooltip.d.ts +1 -1
  33. package/dist/TooltipV2/Tooltip.js +128 -101
  34. package/dist/experimental/index.d.ts +3 -2
  35. package/dist/utils/descendant-registry.d.ts +1 -1
  36. package/dist/utils/descendant-registry.js +94 -76
  37. package/generated/components.json +68 -2
  38. package/package.json +2 -2
  39. package/dist/Blankslate/Blankslate-11d7a7fd.css.map +0 -1
  40. package/dist/DataTable/Table-0327e248.css +0 -2
  41. package/dist/DataTable/Table-0327e248.css.map +0 -1
  42. package/dist/SegmentedControl/SegmentedControl-99b8e34e.css +0 -2
  43. 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(58);
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 ($[20] !== readTriggerRef || $[21] !== type) {
204
- t9 = () => {
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
- $[20] = readTriggerRef;
225
- $[21] = type;
226
- $[22] = t9;
227
- } else t9 = $[22];
228
- let t10;
229
- if ($[23] !== direction || $[24] !== readTriggerRef || $[25] !== type) {
230
- t10 = [
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
- $[23] = direction;
237
- $[24] = readTriggerRef;
238
- $[25] = type;
239
- $[26] = t10;
240
- } else t10 = $[26];
241
- useEffect(t9, t10);
242
- let t11;
243
- if ($[27] !== closeTooltip || $[28] !== isPopoverOpen) {
244
- t11 = (event) => {
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
- $[27] = closeTooltip;
252
- $[28] = isPopoverOpen;
253
- $[29] = t11;
254
- } else t11 = $[29];
255
- let t12;
256
- if ($[30] !== isPopoverOpen) {
257
- t12 = [isPopoverOpen];
258
- $[30] = isPopoverOpen;
259
- $[31] = t12;
260
- } else t12 = $[31];
261
- useOnEscapePress(t11, t12);
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 t13;
265
- if ($[32] !== keybindingHint) {
266
- t13 = Array.isArray(keybindingHint) ? keybindingHint : [keybindingHint];
267
- $[32] = keybindingHint;
268
- $[33] = t13;
269
- } else t13 = $[33];
270
- const keybindingHints = t13;
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 t14 = TooltipContext;
273
- const t15 = /*#__PURE__*/ React.isValidElement(child) && /*#__PURE__*/ React.cloneElement(child, {
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 (t16) {}
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 t17;
316
- if ($[34] !== className) {
317
- t17 = clsx(className, Tooltip_module_css_default.Tooltip);
318
- $[34] = className;
319
- $[35] = t17;
320
- } else t17 = $[35];
321
- const t18 = type === "description" ? "tooltip" : void 0;
322
- const t19 = hasAriaLabel_0 || keybindingHints.length === 0 ? tooltipId : void 0;
323
- let t20;
324
- if ($[36] !== hasAriaLabel_0 || $[37] !== keybindingHints || $[38] !== platform || $[39] !== text || $[40] !== tooltipId) {
325
- t20 = keybindingHints.length > 0 ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
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
- $[36] = hasAriaLabel_0;
339
- $[37] = keybindingHints;
340
- $[38] = platform;
341
- $[39] = text;
342
- $[40] = tooltipId;
343
- $[41] = t20;
344
- } else t20 = $[41];
345
- let t21;
346
- if ($[42] !== calculatedDirection || $[43] !== closeTooltip || $[44] !== openTooltip || $[45] !== rest || $[46] !== t17 || $[47] !== t18 || $[48] !== t19 || $[49] !== t20) {
347
- t21 = /* @__PURE__ */ jsx("span", {
348
- className: t17,
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: t18,
380
+ role: t20,
354
381
  "aria-hidden": true,
355
382
  onMouseEnter: openTooltip,
356
383
  onMouseLeave: closeTooltip,
357
- id: t19,
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
- $[54] = t14.Provider;
384
- $[55] = t22;
385
- $[56] = value;
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
- } else t23 = $[57];
388
- return t23;
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 { DataTable, DataTableProps } from "../DataTable/DataTable.js";
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
- export { };
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. The registry is built during the effect phase, so it will be populated
23
- * after hydration on the client. The initial `undefined` value can be used to safely show loading UI during SSR/initial
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(17);
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 scheduleRebuild = t1;
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
- let t3;
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
- t3 = [];
115
- $[1] = t2;
116
- $[2] = t3;
123
+ t4 = [];
124
+ $[3] = t3;
125
+ $[4] = t4;
117
126
  } else {
118
- t2 = $[1];
119
- t3 = $[2];
127
+ t3 = $[3];
128
+ t4 = $[4];
120
129
  }
121
- useEffect(t2, t3);
122
- let t4;
123
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
124
- t4 = function instantiateNewRegistry() {
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
- $[3] = t4;
128
- } else t4 = $[3];
129
- useIsomorphicLayoutEffect(t4);
130
- let t5;
131
- if ($[4] !== setRegistry) {
132
- t5 = (id) => {
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
- scheduleRebuild();
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") setRegistry((prev_0) => {
141
- const copy = new Map(prev_0);
142
- copy.delete(id);
143
- return copy;
144
- });
155
+ else if (workingRegistryRef.current === "idle") {
156
+ registryRef.current.delete(id);
157
+ scheduleRegistryUpdate();
158
+ }
145
159
  };
146
160
  };
147
- $[4] = setRegistry;
148
- $[5] = t5;
149
- } else t5 = $[5];
150
- const register = t5;
151
- let t6;
152
- if ($[6] !== setRegistry) {
153
- t6 = (id_0, value) => {
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") setRegistry((prev_1) => new Map(prev_1).set(id_0, value));
169
+ else if (workingRegistryRef.current === "idle") {
170
+ registryRef.current.set(id_0, value);
171
+ scheduleRegistryUpdate();
172
+ }
156
173
  };
157
- $[6] = setRegistry;
158
- $[7] = t6;
159
- } else t6 = $[7];
160
- const updateValue = t6;
161
- let t7;
162
- if ($[8] !== setRegistry) {
163
- t7 = function commitWorkingRegistry() {
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
- setRegistry(new Map(setEntries));
183
+ registryRef.current = new Map(setEntries);
167
184
  workingRegistryRef.current = "idle";
185
+ setRegistry(new Map(setEntries));
168
186
  }
169
187
  };
170
- $[8] = setRegistry;
171
- $[9] = t7;
172
- } else t7 = $[9];
173
- useEffect(t7);
174
- let t8;
175
- if ($[10] !== key || $[11] !== register || $[12] !== updateValue) {
176
- t8 = {
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
- $[10] = key;
182
- $[11] = register;
183
- $[12] = updateValue;
184
- $[13] = t8;
185
- } else t8 = $[13];
186
- const contextValue = t8;
187
- let t9;
188
- if ($[14] !== children || $[15] !== contextValue) {
189
- t9 = /* @__PURE__ */ jsx(Context.Provider, {
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
- $[14] = children;
194
- $[15] = contextValue;
195
- $[16] = t9;
196
- } else t9 = $[16];
197
- return t9;
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;