@primer/react 38.19.0-rc.9add2ea76 → 38.19.0-rc.befbd4853
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 +6 -0
- package/dist/ActionList/Item.js +169 -171
- package/dist/AnchoredOverlay/AnchoredOverlay.js +1 -1
- package/dist/Dialog/{Dialog-b577691f.css → Dialog-f9bb927a.css} +2 -2
- package/dist/Dialog/Dialog-f9bb927a.css.map +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +6 -18
- package/dist/Dialog/Dialog.module.css.js +2 -2
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +0 -1
- package/dist/FeatureFlags/FeatureFlags.d.ts +0 -6
- package/dist/FeatureFlags/FeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/FeatureFlags.js +32 -41
- package/package.json +1 -1
- package/dist/Dialog/Dialog-b577691f.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
|
|
13
13
|
- [#7652](https://github.com/primer/react/pull/7652) [`5d19e2b`](https://github.com/primer/react/commit/5d19e2bb5bbd444f2e82d98eef300c221863941c) Thanks [@owenniblock](https://github.com/owenniblock)! - useAnchoredPosition: recalculate overlay position when any scrollable ancestor (or the window) is scrolled.
|
|
14
14
|
|
|
15
|
+
- [#7707](https://github.com/primer/react/pull/7707) [`6431bfe`](https://github.com/primer/react/commit/6431bfecd72e24db1dfa90b02f8a42834e63843b) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Fix anchor-name not being set on the anchor element when SelectPanel is opened in Copilot code agent.
|
|
16
|
+
|
|
15
17
|
- [#7638](https://github.com/primer/react/pull/7638) [`f04e85d`](https://github.com/primer/react/commit/f04e85df536cd6e8047f70b070bd3cf7c0961f92) Thanks [@iansan5653](https://github.com/iansan5653)! - Update internal implementations of combined refs to improve performance and add support for React 19 callback refs
|
|
16
18
|
|
|
19
|
+
- [#7633](https://github.com/primer/react/pull/7633) [`a107d39`](https://github.com/primer/react/commit/a107d398e0574b5f8085485c96b27a168061eb50) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Graduate `primer_react_css_has_selector_perf` feature flag: the CSS `:has()` performance optimization (`body[data-dialog-scroll-disabled]`) is now the default behavior for Dialog scroll disabling
|
|
20
|
+
|
|
17
21
|
- [#7695](https://github.com/primer/react/pull/7695) [`780fc3d`](https://github.com/primer/react/commit/780fc3d7b52fd0f9b63f313af6355398180a0118) Thanks [@mattcosta7](https://github.com/mattcosta7)! - perf(ThemeProvider): Reduce unnecessary renders and effect cascades
|
|
18
22
|
|
|
19
23
|
- Replace `useState` + `useEffect` SSR hydration handoff with `useSyncExternalStore` — eliminates post-hydration re-render
|
|
@@ -21,6 +25,8 @@
|
|
|
21
25
|
- Cache `getServerHandoff` DOM read + JSON.parse per ID (runs once, not on every call)
|
|
22
26
|
- Memoize context value object to prevent unnecessary re-renders of all consumers
|
|
23
27
|
|
|
28
|
+
- [#7706](https://github.com/primer/react/pull/7706) [`fd8910a`](https://github.com/primer/react/commit/fd8910abff851f43d19805ceaa439a9a18c4f226) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - ActionList.Item: fix inline descriptions being referenced via `aria-labelledby` instead of `aria-describedby`
|
|
29
|
+
|
|
24
30
|
## 38.18.0
|
|
25
31
|
|
|
26
32
|
### Minor Changes
|
package/dist/ActionList/Item.js
CHANGED
|
@@ -158,7 +158,7 @@ const selectableRoles = ['menuitemradio', 'menuitemcheckbox', 'option'];
|
|
|
158
158
|
const listRoleTypes = ['listbox', 'menu', 'list'];
|
|
159
159
|
const UnwrappedItem = (t0, forwardedRef) => {
|
|
160
160
|
var _slots$trailingVisual, _slots$description$pr, _slots$description;
|
|
161
|
-
const $ = c(
|
|
161
|
+
const $ = c(159);
|
|
162
162
|
let _PrivateItemWrapper;
|
|
163
163
|
let className;
|
|
164
164
|
let id;
|
|
@@ -422,41 +422,39 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
422
422
|
const hasTrailingVisualSlot = Boolean(slots.trailingVisual);
|
|
423
423
|
const hasDescriptionSlot = Boolean(slots.description);
|
|
424
424
|
let parts;
|
|
425
|
-
if ($[42] !==
|
|
425
|
+
if ($[42] !== hasTrailingVisualSlot || $[43] !== labelId || $[44] !== trailingVisualId) {
|
|
426
426
|
parts = [labelId];
|
|
427
427
|
if (hasTrailingVisualSlot) {
|
|
428
428
|
parts.push(trailingVisualId);
|
|
429
429
|
}
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
$[
|
|
434
|
-
$[43] = hasDescriptionSlot;
|
|
435
|
-
$[44] = hasTrailingVisualSlot;
|
|
436
|
-
$[45] = inlineDescriptionId;
|
|
437
|
-
$[46] = labelId;
|
|
438
|
-
$[47] = trailingVisualId;
|
|
439
|
-
$[48] = parts;
|
|
430
|
+
$[42] = hasTrailingVisualSlot;
|
|
431
|
+
$[43] = labelId;
|
|
432
|
+
$[44] = trailingVisualId;
|
|
433
|
+
$[45] = parts;
|
|
440
434
|
} else {
|
|
441
|
-
parts = $[
|
|
435
|
+
parts = $[45];
|
|
442
436
|
}
|
|
443
437
|
const ariaLabelledBy = parts.join(" ");
|
|
444
438
|
let parts_0;
|
|
445
|
-
if ($[
|
|
439
|
+
if ($[46] !== blockDescriptionId || $[47] !== descriptionVariant || $[48] !== hasDescriptionSlot || $[49] !== inactiveWarningId || $[50] !== inlineDescriptionId) {
|
|
446
440
|
parts_0 = [];
|
|
447
441
|
if (hasDescriptionSlot && descriptionVariant === "block") {
|
|
448
442
|
parts_0.push(blockDescriptionId);
|
|
449
443
|
}
|
|
444
|
+
if (hasDescriptionSlot && descriptionVariant === "inline") {
|
|
445
|
+
parts_0.push(inlineDescriptionId);
|
|
446
|
+
}
|
|
450
447
|
if (inactiveWarningId) {
|
|
451
448
|
parts_0.push(inactiveWarningId);
|
|
452
449
|
}
|
|
453
|
-
$[
|
|
454
|
-
$[
|
|
455
|
-
$[
|
|
456
|
-
$[
|
|
457
|
-
$[
|
|
450
|
+
$[46] = blockDescriptionId;
|
|
451
|
+
$[47] = descriptionVariant;
|
|
452
|
+
$[48] = hasDescriptionSlot;
|
|
453
|
+
$[49] = inactiveWarningId;
|
|
454
|
+
$[50] = inlineDescriptionId;
|
|
455
|
+
$[51] = parts_0;
|
|
458
456
|
} else {
|
|
459
|
-
parts_0 = $[
|
|
457
|
+
parts_0 = $[51];
|
|
460
458
|
}
|
|
461
459
|
const ariaDescribedBy = parts_0.length > 0 ? parts_0.join(" ") : undefined;
|
|
462
460
|
const t14 = !buttonSemantics ? keyPressHandler : undefined;
|
|
@@ -465,19 +463,19 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
465
463
|
const t17 = loading && !inactive ? true : undefined;
|
|
466
464
|
const t18 = focusable ? undefined : 0;
|
|
467
465
|
let t19;
|
|
468
|
-
if ($[
|
|
466
|
+
if ($[52] !== includeSelectionAttribute || $[53] !== itemSelectionAttribute || $[54] !== selected) {
|
|
469
467
|
t19 = includeSelectionAttribute && {
|
|
470
468
|
[itemSelectionAttribute]: selected
|
|
471
469
|
};
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
470
|
+
$[52] = includeSelectionAttribute;
|
|
471
|
+
$[53] = itemSelectionAttribute;
|
|
472
|
+
$[54] = selected;
|
|
473
|
+
$[55] = t19;
|
|
476
474
|
} else {
|
|
477
|
-
t19 = $[
|
|
475
|
+
t19 = $[55];
|
|
478
476
|
}
|
|
479
477
|
let t20;
|
|
480
|
-
if ($[
|
|
478
|
+
if ($[56] !== ariaDescribedBy || $[57] !== ariaLabelledBy || $[58] !== clickHandler || $[59] !== itemId || $[60] !== itemRole || $[61] !== t14 || $[62] !== t15 || $[63] !== t16 || $[64] !== t17 || $[65] !== t18 || $[66] !== t19) {
|
|
481
479
|
t20 = {
|
|
482
480
|
onClick: clickHandler,
|
|
483
481
|
onKeyPress: t14,
|
|
@@ -491,24 +489,24 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
491
489
|
role: itemRole,
|
|
492
490
|
id: itemId
|
|
493
491
|
};
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
$[
|
|
497
|
-
$[
|
|
498
|
-
$[
|
|
499
|
-
$[
|
|
500
|
-
$[
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
} else {
|
|
507
|
-
t20 = $[
|
|
492
|
+
$[56] = ariaDescribedBy;
|
|
493
|
+
$[57] = ariaLabelledBy;
|
|
494
|
+
$[58] = clickHandler;
|
|
495
|
+
$[59] = itemId;
|
|
496
|
+
$[60] = itemRole;
|
|
497
|
+
$[61] = t14;
|
|
498
|
+
$[62] = t15;
|
|
499
|
+
$[63] = t16;
|
|
500
|
+
$[64] = t17;
|
|
501
|
+
$[65] = t18;
|
|
502
|
+
$[66] = t19;
|
|
503
|
+
$[67] = t20;
|
|
504
|
+
} else {
|
|
505
|
+
t20 = $[67];
|
|
508
506
|
}
|
|
509
507
|
const menuItemProps = t20;
|
|
510
508
|
let t21;
|
|
511
|
-
if ($[
|
|
509
|
+
if ($[68] !== _PrivateItemWrapper || $[69] !== forwardedRef || $[70] !== itemRole || $[71] !== listSemantics || $[72] !== menuItemProps || $[73] !== props) {
|
|
512
510
|
t21 = _PrivateItemWrapper ? {
|
|
513
511
|
role: itemRole ? "none" : undefined,
|
|
514
512
|
...props
|
|
@@ -517,38 +515,38 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
517
515
|
...props,
|
|
518
516
|
ref: forwardedRef
|
|
519
517
|
} || {};
|
|
520
|
-
$[
|
|
521
|
-
$[
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
518
|
+
$[68] = _PrivateItemWrapper;
|
|
519
|
+
$[69] = forwardedRef;
|
|
520
|
+
$[70] = itemRole;
|
|
521
|
+
$[71] = listSemantics;
|
|
522
|
+
$[72] = menuItemProps;
|
|
523
|
+
$[73] = props;
|
|
524
|
+
$[74] = t21;
|
|
527
525
|
} else {
|
|
528
|
-
t21 = $[
|
|
526
|
+
t21 = $[74];
|
|
529
527
|
}
|
|
530
528
|
const containerProps = t21;
|
|
531
529
|
let t22;
|
|
532
|
-
if ($[
|
|
530
|
+
if ($[75] !== _PrivateItemWrapper || $[76] !== forwardedRef || $[77] !== listSemantics || $[78] !== menuItemProps || $[79] !== props) {
|
|
533
531
|
t22 = _PrivateItemWrapper ? menuItemProps : !listSemantics && {
|
|
534
532
|
...menuItemProps,
|
|
535
533
|
...props,
|
|
536
534
|
ref: forwardedRef
|
|
537
535
|
};
|
|
538
|
-
$[
|
|
539
|
-
$[
|
|
540
|
-
$[
|
|
541
|
-
$[
|
|
542
|
-
$[
|
|
543
|
-
$[
|
|
536
|
+
$[75] = _PrivateItemWrapper;
|
|
537
|
+
$[76] = forwardedRef;
|
|
538
|
+
$[77] = listSemantics;
|
|
539
|
+
$[78] = menuItemProps;
|
|
540
|
+
$[79] = props;
|
|
541
|
+
$[80] = t22;
|
|
544
542
|
} else {
|
|
545
|
-
t22 = $[
|
|
543
|
+
t22 = $[80];
|
|
546
544
|
}
|
|
547
545
|
const wrapperProps = t22;
|
|
548
546
|
const t23 = Boolean(inactiveText);
|
|
549
547
|
const t24 = buttonSemantics ? setTruncatedText : undefined;
|
|
550
548
|
let t25;
|
|
551
|
-
if ($[
|
|
549
|
+
if ($[81] !== blockDescriptionId || $[82] !== disabled || $[83] !== inlineDescriptionId || $[84] !== size || $[85] !== t23 || $[86] !== t24 || $[87] !== trailingVisualId || $[88] !== variant) {
|
|
552
550
|
t25 = {
|
|
553
551
|
variant,
|
|
554
552
|
size,
|
|
@@ -559,17 +557,17 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
559
557
|
trailingVisualId,
|
|
560
558
|
setTruncatedText: t24
|
|
561
559
|
};
|
|
562
|
-
$[
|
|
563
|
-
$[
|
|
564
|
-
$[
|
|
565
|
-
$[
|
|
566
|
-
$[
|
|
567
|
-
$[
|
|
568
|
-
$[
|
|
569
|
-
$[
|
|
570
|
-
$[
|
|
571
|
-
} else {
|
|
572
|
-
t25 = $[
|
|
560
|
+
$[81] = blockDescriptionId;
|
|
561
|
+
$[82] = disabled;
|
|
562
|
+
$[83] = inlineDescriptionId;
|
|
563
|
+
$[84] = size;
|
|
564
|
+
$[85] = t23;
|
|
565
|
+
$[86] = t24;
|
|
566
|
+
$[87] = trailingVisualId;
|
|
567
|
+
$[88] = variant;
|
|
568
|
+
$[89] = t25;
|
|
569
|
+
} else {
|
|
570
|
+
t25 = $[89];
|
|
573
571
|
}
|
|
574
572
|
const itemContextValue = t25;
|
|
575
573
|
const t26 = listSemantics ? forwardedRef : null;
|
|
@@ -580,41 +578,41 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
580
578
|
const t31 = slots.subItem ? true : undefined;
|
|
581
579
|
const t32 = slots.description ? true : false;
|
|
582
580
|
let t33;
|
|
583
|
-
if ($[
|
|
581
|
+
if ($[90] !== className) {
|
|
584
582
|
t33 = clsx(classes.ActionListItem, className);
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
583
|
+
$[90] = className;
|
|
584
|
+
$[91] = t33;
|
|
587
585
|
} else {
|
|
588
|
-
t33 = $[
|
|
586
|
+
t33 = $[91];
|
|
589
587
|
}
|
|
590
588
|
let t34;
|
|
591
589
|
let t35;
|
|
592
|
-
if ($[
|
|
590
|
+
if ($[92] === Symbol.for("react.memo_cache_sentinel")) {
|
|
593
591
|
t34 = {};
|
|
594
592
|
t35 = /*#__PURE__*/jsx("span", {
|
|
595
593
|
className: classes.Spacer
|
|
596
594
|
});
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
595
|
+
$[92] = t34;
|
|
596
|
+
$[93] = t35;
|
|
599
597
|
} else {
|
|
600
|
-
t34 = $[
|
|
601
|
-
t35 = $[
|
|
598
|
+
t34 = $[92];
|
|
599
|
+
t35 = $[93];
|
|
602
600
|
}
|
|
603
601
|
let t36;
|
|
604
|
-
if ($[
|
|
602
|
+
if ($[94] !== selected) {
|
|
605
603
|
t36 = /*#__PURE__*/jsx(Selection, {
|
|
606
604
|
selected: selected,
|
|
607
605
|
className: classes.LeadingAction
|
|
608
606
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
607
|
+
$[94] = selected;
|
|
608
|
+
$[95] = t36;
|
|
611
609
|
} else {
|
|
612
|
-
t36 = $[
|
|
610
|
+
t36 = $[95];
|
|
613
611
|
}
|
|
614
612
|
const t37 = showInactiveIndicator ? inactiveText : undefined;
|
|
615
613
|
const t38 = Boolean(slots.leadingVisual);
|
|
616
614
|
let t39;
|
|
617
|
-
if ($[
|
|
615
|
+
if ($[96] !== labelId || $[97] !== loading || $[98] !== slots.leadingVisual || $[99] !== t37 || $[100] !== t38) {
|
|
618
616
|
t39 = /*#__PURE__*/jsx(VisualOrIndicator, {
|
|
619
617
|
inactiveText: t37,
|
|
620
618
|
itemHasLeadingVisual: t38,
|
|
@@ -623,61 +621,61 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
623
621
|
position: "leading",
|
|
624
622
|
children: slots.leadingVisual
|
|
625
623
|
});
|
|
626
|
-
$[
|
|
627
|
-
$[
|
|
628
|
-
$[
|
|
629
|
-
$[
|
|
630
|
-
$[
|
|
631
|
-
$[
|
|
624
|
+
$[96] = labelId;
|
|
625
|
+
$[97] = loading;
|
|
626
|
+
$[98] = slots.leadingVisual;
|
|
627
|
+
$[99] = t37;
|
|
628
|
+
$[100] = t38;
|
|
629
|
+
$[101] = t39;
|
|
632
630
|
} else {
|
|
633
|
-
t39 = $[
|
|
631
|
+
t39 = $[101];
|
|
634
632
|
}
|
|
635
633
|
const t40 = !!slots.description;
|
|
636
634
|
let t41;
|
|
637
|
-
if ($[
|
|
635
|
+
if ($[102] !== inactive || $[103] !== loading) {
|
|
638
636
|
t41 = loading === true && !inactive && /*#__PURE__*/jsx(VisuallyHidden, {
|
|
639
637
|
children: "Loading"
|
|
640
638
|
});
|
|
641
|
-
$[
|
|
642
|
-
$[
|
|
643
|
-
$[
|
|
639
|
+
$[102] = inactive;
|
|
640
|
+
$[103] = loading;
|
|
641
|
+
$[104] = t41;
|
|
644
642
|
} else {
|
|
645
|
-
t41 = $[
|
|
643
|
+
t41 = $[104];
|
|
646
644
|
}
|
|
647
645
|
let t42;
|
|
648
|
-
if ($[
|
|
646
|
+
if ($[105] !== childrenWithoutSlots || $[106] !== labelId || $[107] !== t41) {
|
|
649
647
|
t42 = /*#__PURE__*/jsxs("span", {
|
|
650
648
|
id: labelId,
|
|
651
649
|
className: classes.ItemLabel,
|
|
652
650
|
children: [childrenWithoutSlots, t41]
|
|
653
651
|
});
|
|
654
|
-
$[
|
|
655
|
-
$[
|
|
656
|
-
$[
|
|
657
|
-
$[
|
|
652
|
+
$[105] = childrenWithoutSlots;
|
|
653
|
+
$[106] = labelId;
|
|
654
|
+
$[107] = t41;
|
|
655
|
+
$[108] = t42;
|
|
658
656
|
} else {
|
|
659
|
-
t42 = $[
|
|
657
|
+
t42 = $[108];
|
|
660
658
|
}
|
|
661
659
|
let t43;
|
|
662
|
-
if ($[
|
|
660
|
+
if ($[109] !== descriptionVariant || $[110] !== slots.description || $[111] !== t40 || $[112] !== t42) {
|
|
663
661
|
t43 = /*#__PURE__*/jsxs(ConditionalWrapper, {
|
|
664
662
|
if: t40,
|
|
665
663
|
className: classes.ItemDescriptionWrap,
|
|
666
664
|
"data-description-variant": descriptionVariant,
|
|
667
665
|
children: [t42, slots.description]
|
|
668
666
|
});
|
|
669
|
-
$[
|
|
670
|
-
$[
|
|
671
|
-
$[
|
|
672
|
-
$[
|
|
673
|
-
$[
|
|
667
|
+
$[109] = descriptionVariant;
|
|
668
|
+
$[110] = slots.description;
|
|
669
|
+
$[111] = t40;
|
|
670
|
+
$[112] = t42;
|
|
671
|
+
$[113] = t43;
|
|
674
672
|
} else {
|
|
675
|
-
t43 = $[
|
|
673
|
+
t43 = $[113];
|
|
676
674
|
}
|
|
677
675
|
const t44 = showInactiveIndicator ? inactiveText : undefined;
|
|
678
676
|
const t45 = Boolean(slots.leadingVisual);
|
|
679
677
|
let t46;
|
|
680
|
-
if ($[
|
|
678
|
+
if ($[114] !== labelId || $[115] !== loading || $[116] !== t44 || $[117] !== t45 || $[118] !== trailingVisual) {
|
|
681
679
|
t46 = /*#__PURE__*/jsx(VisualOrIndicator, {
|
|
682
680
|
inactiveText: t44,
|
|
683
681
|
itemHasLeadingVisual: t45,
|
|
@@ -686,58 +684,58 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
686
684
|
position: "trailing",
|
|
687
685
|
children: trailingVisual
|
|
688
686
|
});
|
|
689
|
-
$[
|
|
690
|
-
$[
|
|
691
|
-
$[
|
|
692
|
-
$[
|
|
693
|
-
$[
|
|
694
|
-
$[
|
|
687
|
+
$[114] = labelId;
|
|
688
|
+
$[115] = loading;
|
|
689
|
+
$[116] = t44;
|
|
690
|
+
$[117] = t45;
|
|
691
|
+
$[118] = trailingVisual;
|
|
692
|
+
$[119] = t46;
|
|
695
693
|
} else {
|
|
696
|
-
t46 = $[
|
|
694
|
+
t46 = $[119];
|
|
697
695
|
}
|
|
698
696
|
let t47;
|
|
699
|
-
if ($[
|
|
697
|
+
if ($[120] !== inactiveText || $[121] !== inactiveWarningId || $[122] !== showInactiveIndicator) {
|
|
700
698
|
t47 = !showInactiveIndicator && inactiveText ? /*#__PURE__*/jsx("span", {
|
|
701
699
|
className: classes.InactiveWarning,
|
|
702
700
|
id: inactiveWarningId,
|
|
703
701
|
children: inactiveText
|
|
704
702
|
}) : null;
|
|
705
|
-
$[
|
|
706
|
-
$[
|
|
707
|
-
$[
|
|
708
|
-
$[
|
|
703
|
+
$[120] = inactiveText;
|
|
704
|
+
$[121] = inactiveWarningId;
|
|
705
|
+
$[122] = showInactiveIndicator;
|
|
706
|
+
$[123] = t47;
|
|
709
707
|
} else {
|
|
710
|
-
t47 = $[
|
|
708
|
+
t47 = $[123];
|
|
711
709
|
}
|
|
712
710
|
let t48;
|
|
713
|
-
if ($[
|
|
711
|
+
if ($[124] !== t43 || $[125] !== t46 || $[126] !== t47) {
|
|
714
712
|
t48 = /*#__PURE__*/jsxs("span", {
|
|
715
713
|
className: classes.ActionListSubContent,
|
|
716
714
|
"data-component": "ActionList.Item--DividerContainer",
|
|
717
715
|
children: [t43, t46, t47]
|
|
718
716
|
});
|
|
719
|
-
$[
|
|
720
|
-
$[
|
|
721
|
-
$[
|
|
722
|
-
$[
|
|
717
|
+
$[124] = t43;
|
|
718
|
+
$[125] = t46;
|
|
719
|
+
$[126] = t47;
|
|
720
|
+
$[127] = t48;
|
|
723
721
|
} else {
|
|
724
|
-
t48 = $[
|
|
722
|
+
t48 = $[127];
|
|
725
723
|
}
|
|
726
724
|
let t49;
|
|
727
|
-
if ($[
|
|
725
|
+
if ($[128] !== t36 || $[129] !== t39 || $[130] !== t48) {
|
|
728
726
|
t49 = /*#__PURE__*/jsxs(TooltipContext.Provider, {
|
|
729
727
|
value: t34,
|
|
730
728
|
children: [t35, t36, t39, t48]
|
|
731
729
|
});
|
|
732
|
-
$[
|
|
733
|
-
$[
|
|
734
|
-
$[
|
|
735
|
-
$[
|
|
730
|
+
$[128] = t36;
|
|
731
|
+
$[129] = t39;
|
|
732
|
+
$[130] = t48;
|
|
733
|
+
$[131] = t49;
|
|
736
734
|
} else {
|
|
737
|
-
t49 = $[
|
|
735
|
+
t49 = $[131];
|
|
738
736
|
}
|
|
739
737
|
let t50;
|
|
740
|
-
if ($[
|
|
738
|
+
if ($[132] !== ItemWrapper || $[133] !== forwardedRef || $[134] !== size || $[135] !== t49 || $[136] !== wrapperProps) {
|
|
741
739
|
t50 = /*#__PURE__*/jsx(ItemWrapper, {
|
|
742
740
|
...wrapperProps,
|
|
743
741
|
className: classes.ActionListContent,
|
|
@@ -745,34 +743,34 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
745
743
|
ref: forwardedRef,
|
|
746
744
|
children: t49
|
|
747
745
|
});
|
|
748
|
-
$[
|
|
749
|
-
$[
|
|
750
|
-
$[
|
|
751
|
-
$[
|
|
752
|
-
$[
|
|
753
|
-
$[
|
|
746
|
+
$[132] = ItemWrapper;
|
|
747
|
+
$[133] = forwardedRef;
|
|
748
|
+
$[134] = size;
|
|
749
|
+
$[135] = t49;
|
|
750
|
+
$[136] = wrapperProps;
|
|
751
|
+
$[137] = t50;
|
|
754
752
|
} else {
|
|
755
|
-
t50 = $[
|
|
753
|
+
t50 = $[137];
|
|
756
754
|
}
|
|
757
755
|
let t51;
|
|
758
|
-
if ($[
|
|
756
|
+
if ($[138] !== buttonSemantics || $[139] !== forwardedRef || $[140] !== t50 || $[141] !== truncatedText) {
|
|
759
757
|
t51 = /*#__PURE__*/jsx(ConditionalTooltip, {
|
|
760
758
|
ref: forwardedRef,
|
|
761
759
|
text: truncatedText,
|
|
762
760
|
enabled: buttonSemantics,
|
|
763
761
|
children: t50
|
|
764
762
|
});
|
|
765
|
-
$[
|
|
766
|
-
$[
|
|
767
|
-
$[
|
|
768
|
-
$[
|
|
769
|
-
$[
|
|
763
|
+
$[138] = buttonSemantics;
|
|
764
|
+
$[139] = forwardedRef;
|
|
765
|
+
$[140] = t50;
|
|
766
|
+
$[141] = truncatedText;
|
|
767
|
+
$[142] = t51;
|
|
770
768
|
} else {
|
|
771
|
-
t51 = $[
|
|
769
|
+
t51 = $[142];
|
|
772
770
|
}
|
|
773
771
|
const t52 = !inactive && !loading && !menuContext && Boolean(slots.trailingAction) && slots.trailingAction;
|
|
774
772
|
let t53;
|
|
775
|
-
if ($[
|
|
773
|
+
if ($[143] !== containerProps || $[144] !== slots.subItem || $[145] !== t26 || $[146] !== t27 || $[147] !== t28 || $[148] !== t29 || $[149] !== t30 || $[150] !== t31 || $[151] !== t32 || $[152] !== t33 || $[153] !== t51 || $[154] !== t52) {
|
|
776
774
|
t53 = /*#__PURE__*/jsxs("li", {
|
|
777
775
|
...containerProps,
|
|
778
776
|
ref: t26,
|
|
@@ -785,33 +783,33 @@ const UnwrappedItem = (t0, forwardedRef) => {
|
|
|
785
783
|
className: t33,
|
|
786
784
|
children: [t51, t52, slots.subItem]
|
|
787
785
|
});
|
|
788
|
-
$[
|
|
789
|
-
$[
|
|
790
|
-
$[
|
|
791
|
-
$[
|
|
792
|
-
$[
|
|
793
|
-
$[
|
|
794
|
-
$[
|
|
795
|
-
$[
|
|
796
|
-
$[
|
|
797
|
-
$[
|
|
798
|
-
$[
|
|
799
|
-
$[
|
|
800
|
-
$[
|
|
801
|
-
} else {
|
|
802
|
-
t53 = $[
|
|
786
|
+
$[143] = containerProps;
|
|
787
|
+
$[144] = slots.subItem;
|
|
788
|
+
$[145] = t26;
|
|
789
|
+
$[146] = t27;
|
|
790
|
+
$[147] = t28;
|
|
791
|
+
$[148] = t29;
|
|
792
|
+
$[149] = t30;
|
|
793
|
+
$[150] = t31;
|
|
794
|
+
$[151] = t32;
|
|
795
|
+
$[152] = t33;
|
|
796
|
+
$[153] = t51;
|
|
797
|
+
$[154] = t52;
|
|
798
|
+
$[155] = t53;
|
|
799
|
+
} else {
|
|
800
|
+
t53 = $[155];
|
|
803
801
|
}
|
|
804
802
|
let t54;
|
|
805
|
-
if ($[
|
|
803
|
+
if ($[156] !== itemContextValue || $[157] !== t53) {
|
|
806
804
|
t54 = /*#__PURE__*/jsx(ItemContext.Provider, {
|
|
807
805
|
value: itemContextValue,
|
|
808
806
|
children: t53
|
|
809
807
|
});
|
|
810
|
-
$[
|
|
811
|
-
$[
|
|
812
|
-
$[
|
|
808
|
+
$[156] = itemContextValue;
|
|
809
|
+
$[157] = t53;
|
|
810
|
+
$[158] = t54;
|
|
813
811
|
} else {
|
|
814
|
-
t54 = $[
|
|
812
|
+
t54 = $[158];
|
|
815
813
|
}
|
|
816
814
|
return t54;
|
|
817
815
|
};
|
|
@@ -144,7 +144,7 @@ const AnchoredOverlay = ({
|
|
|
144
144
|
overlay.style.removeProperty('position-anchor');
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
-
}, [cssAnchorPositioning, anchorRef, overlayRef, id]);
|
|
147
|
+
}, [cssAnchorPositioning, anchorRef, overlayRef, id, open]);
|
|
148
148
|
|
|
149
149
|
// Track the overlay element so we can re-run the effect when it changes.
|
|
150
150
|
// The overlay unmounts when closed, so each open creates a new DOM node -
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@property --prc-dialog-scrollgutter{initial-value:0;inherits:false;syntax:"<length>"}@keyframes prc-Dialog-dialog-backdrop-appear-tCG2K{0%{opacity:0}to{opacity:1}}@keyframes prc-Dialog-Overlay--motion-scaleFade-mE6-C{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}@keyframes prc-Dialog-Overlay--motion-slideUp-tPElO{0%{transform:translateY(100%)}}@keyframes prc-Dialog-Overlay--motion-slideInRight-BR-CZ{0%{transform:translateX(-100%)}}@keyframes prc-Dialog-Overlay--motion-slideInLeft-ISmQZ{0%{transform:translateX(100%)}}@keyframes prc-Dialog-detect-scroll-b3i8Q{0%,to{--can-scroll:1}}.prc-Dialog-Backdrop-5Nt2U{animation:prc-Dialog-dialog-backdrop-appear-tCG2K .2s cubic-bezier(.33,1,.68,1);background-color:var(--overlay-backdrop-bgColor,var(--color-overlay-backdrop));bottom:0;display:flex;left:0;position:fixed;right:0;top:0}.prc-Dialog-Backdrop-5Nt2U,.prc-Dialog-Backdrop-5Nt2U[data-position-regular=center]{align-items:center;justify-content:center}.prc-Dialog-Backdrop-5Nt2U[data-position-regular=left]{align-items:center;justify-content:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-position-regular=right]{align-items:center;justify-content:flex-end}.prc-Dialog-Backdrop-5Nt2U[data-align=top]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-align=center]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:center}.prc-Dialog-Backdrop-5Nt2U[data-align=bottom]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:flex-end}@media (max-width:767px){.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center]{align-items:center;justify-content:center}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=top]{align-items:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=center]{align-items:center}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=bottom]{align-items:flex-end}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=bottom]{align-items:end;justify-content:center}}.prc-Dialog-Dialog-G8cDF{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));display:flex;flex-direction:column;height:auto;max-height:calc(100dvh - 64px);max-width:calc(100dvw - 64px);min-width:296px;opacity:1;width:640px}.prc-Dialog-Dialog-G8cDF:where([data-width=small]){width:296px}.prc-Dialog-Dialog-G8cDF:where([data-width=medium]){width:320px}.prc-Dialog-Dialog-G8cDF:where([data-width=large]){width:480px}.prc-Dialog-Dialog-G8cDF:where([data-height=small]){height:480px}.prc-Dialog-Dialog-G8cDF:where([data-height=large]){height:640px}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=center]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem))}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=center]{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=center][data-align=top]{margin-top:var(--base-size-64,4rem)}.prc-Dialog-Dialog-G8cDF[data-position-regular=center][data-align=bottom]{margin-bottom:var(--base-size-64,4rem)}.prc-Dialog-Dialog-G8cDF[data-position-regular=left]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-left-radius:0;border-top-left-radius:0;height:100dvh;max-height:unset}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=left]{animation:prc-Dialog-Overlay--motion-slideInRight-BR-CZ .25s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=right]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-right-radius:0;border-top-right-radius:0;height:100dvh;max-height:unset}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=right]{animation:prc-Dialog-Overlay--motion-slideInLeft-ISmQZ .25s cubic-bezier(.33,1,.68,1) 0s 1 normal none running}}@media (max-width:767px){.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));height:auto;width:640px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=small]){width:296px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=medium]){width:320px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=large]){width:480px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-height=small]){height:480px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-height=large]){height:640px}@media (max-height:280px){.prc-Dialog-Dialog-G8cDF{max-height:calc(100dvh - 12px);max-width:calc(100dvw - 12px)}}.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-left-radius:0;border-bottom-right-radius:0;height:auto;max-height:calc(100dvh - 64px);max-width:100dvw;width:100dvw}.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom][data-align]{margin-bottom:0;margin-top:0}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom]{animation:prc-Dialog-Overlay--motion-slideUp-tPElO .25s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen]{border-radius:unset!important;flex-grow:1;height:100%;max-height:100dvh;max-width:100dvw;width:100%}.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen][data-align]{margin-bottom:0;margin-top:0}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen]{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}}body
|
|
2
|
-
/*# sourceMappingURL=Dialog-
|
|
1
|
+
@property --prc-dialog-scrollgutter{initial-value:0;inherits:false;syntax:"<length>"}@keyframes prc-Dialog-dialog-backdrop-appear-tCG2K{0%{opacity:0}to{opacity:1}}@keyframes prc-Dialog-Overlay--motion-scaleFade-mE6-C{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}@keyframes prc-Dialog-Overlay--motion-slideUp-tPElO{0%{transform:translateY(100%)}}@keyframes prc-Dialog-Overlay--motion-slideInRight-BR-CZ{0%{transform:translateX(-100%)}}@keyframes prc-Dialog-Overlay--motion-slideInLeft-ISmQZ{0%{transform:translateX(100%)}}@keyframes prc-Dialog-detect-scroll-b3i8Q{0%,to{--can-scroll:1}}.prc-Dialog-Backdrop-5Nt2U{animation:prc-Dialog-dialog-backdrop-appear-tCG2K .2s cubic-bezier(.33,1,.68,1);background-color:var(--overlay-backdrop-bgColor,var(--color-overlay-backdrop));bottom:0;display:flex;left:0;position:fixed;right:0;top:0}.prc-Dialog-Backdrop-5Nt2U,.prc-Dialog-Backdrop-5Nt2U[data-position-regular=center]{align-items:center;justify-content:center}.prc-Dialog-Backdrop-5Nt2U[data-position-regular=left]{align-items:center;justify-content:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-position-regular=right]{align-items:center;justify-content:flex-end}.prc-Dialog-Backdrop-5Nt2U[data-align=top]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-align=center]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:center}.prc-Dialog-Backdrop-5Nt2U[data-align=bottom]:where(:not([data-position-regular=left]):not([data-position-regular=right])){align-items:flex-end}@media (max-width:767px){.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center]{align-items:center;justify-content:center}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=top]{align-items:flex-start}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=center]{align-items:center}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=center][data-align=bottom]{align-items:flex-end}.prc-Dialog-Backdrop-5Nt2U[data-position-narrow=bottom]{align-items:end;justify-content:center}}.prc-Dialog-Dialog-G8cDF{background-color:var(--overlay-bgColor,var(--color-canvas-overlay));border-radius:var(--borderRadius-large,.75rem);border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));box-shadow:var(--shadow-floating-small,var(--color-overlay-shadow));display:flex;flex-direction:column;height:auto;max-height:calc(100dvh - 64px);max-width:calc(100dvw - 64px);min-width:296px;opacity:1;width:640px}.prc-Dialog-Dialog-G8cDF:where([data-width=small]){width:296px}.prc-Dialog-Dialog-G8cDF:where([data-width=medium]){width:320px}.prc-Dialog-Dialog-G8cDF:where([data-width=large]){width:480px}.prc-Dialog-Dialog-G8cDF:where([data-height=small]){height:480px}.prc-Dialog-Dialog-G8cDF:where([data-height=large]){height:640px}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=center]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem))}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=center]{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=center][data-align=top]{margin-top:var(--base-size-64,4rem)}.prc-Dialog-Dialog-G8cDF[data-position-regular=center][data-align=bottom]{margin-bottom:var(--base-size-64,4rem)}.prc-Dialog-Dialog-G8cDF[data-position-regular=left]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-left-radius:0;border-top-left-radius:0;height:100dvh;max-height:unset}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=left]{animation:prc-Dialog-Overlay--motion-slideInRight-BR-CZ .25s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-regular=right]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-right-radius:0;border-top-right-radius:0;height:100dvh;max-height:unset}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-regular=right]{animation:prc-Dialog-Overlay--motion-slideInLeft-ISmQZ .25s cubic-bezier(.33,1,.68,1) 0s 1 normal none running}}@media (max-width:767px){.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));height:auto;width:640px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=small]){width:296px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=medium]){width:320px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-width=large]){width:480px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-height=small]){height:480px}.prc-Dialog-Dialog-G8cDF[data-position-narrow=center]:where([data-height=large]){height:640px}@media (max-height:280px){.prc-Dialog-Dialog-G8cDF{max-height:calc(100dvh - 12px);max-width:calc(100dvw - 12px)}}.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom]{border-radius:var(--borderRadius-large,var(--borderRadius-large,.75rem));border-bottom-left-radius:0;border-bottom-right-radius:0;height:auto;max-height:calc(100dvh - 64px);max-width:100dvw;width:100dvw}.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom][data-align]{margin-bottom:0;margin-top:0}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-narrow=bottom]{animation:prc-Dialog-Overlay--motion-slideUp-tPElO .25s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen]{border-radius:unset!important;flex-grow:1;height:100%;max-height:100dvh;max-width:100dvw;width:100%}.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen][data-align]{margin-bottom:0;margin-top:0}@media screen and (prefers-reduced-motion:no-preference){.prc-Dialog-Dialog-G8cDF[data-position-narrow=fullscreen]{animation:prc-Dialog-Overlay--motion-scaleFade-mE6-C .2s cubic-bezier(.33,1,.68,1) 1ms 1 normal none running}}}body[data-dialog-scroll-disabled]{overflow:hidden!important;padding-right:var(--prc-dialog-scrollgutter)!important}.prc-Dialog-DialogOverflowWrapper-JvHzz{flex-grow:1}.prc-Dialog-Dialog-G8cDF[data-has-footer]{--can-scroll:0}.prc-Dialog-Dialog-G8cDF[data-has-footer] .prc-Dialog-DialogOverflowWrapper-JvHzz{animation:prc-Dialog-detect-scroll-b3i8Q;border-bottom:var(--borderWidth-default,.0625rem) solid var(--borderColor-default,var(--color-border-default));animation-timeline:scroll(self)}@supports (animation-timeline:scroll(self)){.prc-Dialog-Dialog-G8cDF[data-has-footer] .prc-Dialog-DialogOverflowWrapper-JvHzz{border-bottom:calc(var(--borderWidth-thin,.0625rem)*var(--can-scroll)) solid var(--borderColor-default,var(--color-border-default))}}.prc-Dialog-Header-f7Me-{box-shadow:0 1px 0 var(--borderColor-default,var(--color-border-default));flex-shrink:0;max-height:35vh;overflow-y:auto;padding:var(--base-size-8,.5rem);z-index:1}.prc-Dialog-HeaderInner-H-fFY{display:flex}.prc-Dialog-HeaderContent-mjAsn{display:flex;flex-direction:column;flex-grow:1;padding-block:var(--base-size-6,.375rem);padding-inline:var(--base-size-8,.5rem)}.prc-Dialog-Title-M-iPn{font-size:var(--text-body-size-medium,.875rem);font-weight:var(--text-title-weight-large,600);margin:0}.prc-Dialog-Subtitle-aBFSq{color:var(--fgColor-muted,var(--color-fg-muted));font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-normal,400);margin:0;margin-top:var(--base-size-4,.25rem)}.prc-Dialog-Body-bB903{flex-grow:1;overflow:auto}.prc-Dialog-Body-bB903,.prc-Dialog-Footer-PMeQk{padding:var(--base-size-16,1rem)}.prc-Dialog-Footer-PMeQk{display:flex;flex-flow:wrap;flex-shrink:0;gap:var(--base-size-8,.5rem);justify-content:flex-end;z-index:1}.prc-Dialog-Dialog-G8cDF[data-footer-button-layout=scroll] .prc-Dialog-Footer-PMeQk{flex-direction:row;flex-wrap:nowrap;justify-content:unset;overflow-x:scroll}
|
|
2
|
+
/*# sourceMappingURL=Dialog-f9bb927a.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Dialog/Dialog.module.css.js"],"names":[],"mappings":"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","file":"Dialog-f9bb927a.css","sourcesContent":["/* The --prc-dialog-scrollgutter property is used only on the body element to\n * simulate scrollbar-gutter:stable. This property is not and should not\n * be used elsewhere in the DOM. There is a performance penalty to\n * setting inherited properties which can cause a large style recalc to\n * occur, so it benefits us to prevent inheritance for this property.\n * See https://web.dev/blog/at-property-performance\n */\n@property --prc-dialog-scrollgutter {\n initial-value: 0;\n inherits: false;\n syntax: '<length>';\n}\n\n@keyframes dialog-backdrop-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes Overlay--motion-scaleFade {\n 0% {\n opacity: 0;\n transform: scale(0.5);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes Overlay--motion-slideUp {\n from {\n transform: translateY(100%);\n }\n}\n\n@keyframes Overlay--motion-slideInRight {\n from {\n transform: translateX(-100%);\n }\n}\n\n@keyframes Overlay--motion-slideInLeft {\n from {\n transform: translateX(100%);\n }\n}\n\n/* Used to determine whether there should be a border between the body and footer */\n@keyframes detect-scroll {\n from,\n to {\n --can-scroll: 1;\n }\n}\n\n.Backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n background-color: var(--overlay-backdrop-bgColor);\n animation: dialog-backdrop-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n align-items: center;\n justify-content: center;\n\n &[data-position-regular='center'] {\n align-items: center;\n justify-content: center;\n }\n\n &[data-position-regular='left'] {\n align-items: center;\n justify-content: flex-start;\n }\n\n &[data-position-regular='right'] {\n align-items: center;\n justify-content: flex-end;\n }\n\n /* align only applies when regular position is center (or absent).\n * :where() zeroes out the :not() specificity so narrow-position rules (coming later)\n * always win when data-position-narrow is bottom or fullscreen. */\n &:where(:not([data-position-regular='left']):not([data-position-regular='right'])) {\n &[data-align='top'] {\n align-items: flex-start;\n }\n\n &[data-align='center'] {\n align-items: center;\n }\n\n &[data-align='bottom'] {\n align-items: flex-end;\n }\n }\n\n @media (max-width: 767px) {\n &[data-position-narrow='center'] {\n align-items: center;\n justify-content: center;\n\n /* align still applies when narrow position is center */\n &[data-align='top'] {\n align-items: flex-start;\n }\n\n &[data-align='center'] {\n align-items: center;\n }\n\n &[data-align='bottom'] {\n align-items: flex-end;\n }\n }\n\n &[data-position-narrow='bottom'] {\n align-items: end;\n justify-content: center;\n }\n }\n}\n\n.Dialog {\n display: flex;\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n min-width: 296px;\n max-width: calc(100dvw - 64px);\n height: auto;\n max-height: calc(100dvh - 64px);\n flex-direction: column;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n box-shadow: var(--shadow-floating-small);\n opacity: 1;\n\n &:where([data-width='small']) {\n width: 296px;\n }\n\n &:where([data-width='medium']) {\n width: 320px;\n }\n\n &:where([data-width='large']) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-height='small']) {\n height: 480px;\n }\n\n &:where([data-height='large']) {\n height: 640px;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n\n &[data-position-regular='center'] {\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n\n /* align margins only apply when regular position is center */\n &[data-align='top'] {\n margin-top: var(--base-size-64);\n }\n\n &[data-align='bottom'] {\n margin-bottom: var(--base-size-64);\n }\n }\n\n &[data-position-regular='left'] {\n height: 100dvh;\n max-height: unset;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideInRight 0.25s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n\n &[data-position-regular='right'] {\n height: 100dvh;\n max-height: unset;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideInLeft 0.25s cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running;\n }\n }\n\n @media (max-width: 767px) {\n &[data-position-narrow='center'] {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n height: auto;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n\n &:where([data-width='small']) {\n width: 296px;\n }\n\n &:where([data-width='medium']) {\n width: 320px;\n }\n\n &:where([data-width='large']) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-height='small']) {\n height: 480px;\n }\n\n &:where([data-height='large']) {\n height: 640px;\n }\n }\n\n @media (max-height: 280px) {\n max-height: calc(100dvh - 12px);\n max-width: calc(100dvw - 12px);\n }\n\n &[data-position-narrow='bottom'] {\n width: 100dvw;\n max-width: 100dvw;\n height: auto;\n max-height: calc(100dvh - 64px);\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n\n /* reset align margins since position wins at narrow */\n &[data-align] {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideUp 0.25s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n\n &[data-position-narrow='fullscreen'] {\n width: 100%;\n max-width: 100dvw;\n height: 100%;\n max-height: 100dvh;\n border-radius: unset !important;\n flex-grow: 1;\n\n /* reset align margins since fullscreen wins at narrow */\n &[data-align] {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n }\n}\n\n/*\n * PERFORMANCE OPTIMIZATION: Direct attribute on body - O(1) lookup\n */\n/* stylelint-disable-next-line selector-no-qualifying-type */\nbody[data-dialog-scroll-disabled] {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--prc-dialog-scrollgutter) !important;\n overflow: hidden !important;\n}\n\n.DialogOverflowWrapper {\n flex-grow: 1;\n}\n\n/*\nAdd a border between the body and footer if:\n- the dialog has a footer\n- the dialog has a body that can scroll\n- the browser supports the `animation-timeline` property and its `scroll()` function\n*/\n.Dialog[data-has-footer] {\n --can-scroll: 0;\n\n .DialogOverflowWrapper {\n /* If the browser does not support the `animation-timeline` property, always show a border */\n border-bottom: var(--borderWidth-default) solid var(--borderColor-default);\n animation: detect-scroll;\n animation-timeline: scroll(self);\n\n @supports (animation-timeline: scroll(self)) {\n border-bottom: calc(var(--borderWidth-thin) * var(--can-scroll)) solid var(--borderColor-default);\n }\n }\n}\n\n.Header {\n z-index: 1;\n max-height: 35vh;\n padding: var(--base-size-8);\n overflow-y: auto;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: 0 1px 0 var(--borderColor-default);\n flex-shrink: 0;\n}\n\n.HeaderInner {\n display: flex;\n}\n\n.HeaderContent {\n display: flex;\n padding-inline: var(--base-size-8);\n padding-block: var(--base-size-6);\n flex-direction: column;\n flex-grow: 1;\n}\n\n.Title {\n margin: 0; /* override default margin */\n font-size: var(--text-body-size-medium);\n font-weight: var(--text-title-weight-large);\n}\n\n.Subtitle {\n margin: 0; /* override default margin */\n margin-top: var(--base-size-4);\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n color: var(--fgColor-muted);\n}\n\n.Body {\n padding: var(--base-size-16);\n overflow: auto;\n flex-grow: 1;\n}\n\n.Footer {\n z-index: 1;\n display: flex;\n flex-flow: wrap;\n justify-content: flex-end;\n padding: var(--base-size-16);\n gap: var(--base-size-8);\n flex-shrink: 0;\n}\n\n.Dialog[data-footer-button-layout='scroll'] .Footer {\n flex-wrap: nowrap;\n overflow-x: scroll;\n flex-direction: row;\n justify-content: unset;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAA;AAC1F,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,WAAW,CAAA;AAW1C,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../src/Dialog/Dialog.tsx"],"names":[],"mappings":"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"}
|
package/dist/Dialog/Dialog.js
CHANGED
|
@@ -17,6 +17,7 @@ import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
|
17
17
|
import { ScrollableRegion } from '../ScrollableRegion/ScrollableRegion.js';
|
|
18
18
|
import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
|
|
19
19
|
|
|
20
|
+
let dialogScrollDisabledCount = 0;
|
|
20
21
|
const DefaultHeader = ({
|
|
21
22
|
dialogLabelId,
|
|
22
23
|
title,
|
|
@@ -106,7 +107,6 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
106
107
|
const autoFocusedFooterButtonRef = useRef(null);
|
|
107
108
|
for (const footerButton of footerButtons) {
|
|
108
109
|
if (footerButton.autoFocus) {
|
|
109
|
-
// eslint-disable-next-line react-hooks/immutability
|
|
110
110
|
footerButton.ref = autoFocusedFooterButtonRef;
|
|
111
111
|
}
|
|
112
112
|
}
|
|
@@ -145,26 +145,14 @@ const _Dialog = /*#__PURE__*/React.forwardRef((props, forwardedRef) => {
|
|
|
145
145
|
}, [onClose]);
|
|
146
146
|
React.useEffect(() => {
|
|
147
147
|
const scrollbarWidth = window.innerWidth - document.body.clientWidth;
|
|
148
|
-
|
|
149
|
-
const usePerfOptimization = document.body.hasAttribute('data-dialog-scroll-optimized');
|
|
150
|
-
|
|
151
|
-
// Add DisableScroll class to this dialog (for legacy :has() selector path)
|
|
152
|
-
dialog === null || dialog === void 0 ? void 0 : dialog.classList.add(classes.DisableScroll);
|
|
148
|
+
dialogScrollDisabledCount++;
|
|
153
149
|
document.body.style.setProperty('--prc-dialog-scrollgutter', `${scrollbarWidth}px`);
|
|
154
|
-
|
|
155
|
-
// Optimized path: set attribute on body for direct CSS targeting
|
|
156
|
-
document.body.setAttribute('data-dialog-scroll-disabled', '');
|
|
157
|
-
}
|
|
158
|
-
// Legacy path: no action needed - CSS :has(.Dialog.DisableScroll) handles it
|
|
159
|
-
|
|
150
|
+
document.body.setAttribute('data-dialog-scroll-disabled', '');
|
|
160
151
|
return () => {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
if (remainingDialogs.length === 0) {
|
|
152
|
+
dialogScrollDisabledCount--;
|
|
153
|
+
if (dialogScrollDisabledCount === 0) {
|
|
164
154
|
document.body.style.removeProperty('--prc-dialog-scrollgutter');
|
|
165
|
-
|
|
166
|
-
document.body.removeAttribute('data-dialog-scroll-disabled');
|
|
167
|
-
}
|
|
155
|
+
document.body.removeAttribute('data-dialog-scroll-disabled');
|
|
168
156
|
}
|
|
169
157
|
};
|
|
170
158
|
}, []);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './Dialog-
|
|
1
|
+
import './Dialog-f9bb927a.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"Backdrop":"prc-Dialog-Backdrop-5Nt2U","dialog-backdrop-appear":"prc-Dialog-dialog-backdrop-appear-tCG2K","Dialog":"prc-Dialog-Dialog-G8cDF","Overlay--motion-scaleFade":"prc-Dialog-Overlay--motion-scaleFade-mE6-C","Overlay--motion-slideInRight":"prc-Dialog-Overlay--motion-slideInRight-BR-CZ","Overlay--motion-slideInLeft":"prc-Dialog-Overlay--motion-slideInLeft-ISmQZ","Overlay--motion-slideUp":"prc-Dialog-Overlay--motion-slideUp-tPElO","
|
|
3
|
+
var classes = {"Backdrop":"prc-Dialog-Backdrop-5Nt2U","dialog-backdrop-appear":"prc-Dialog-dialog-backdrop-appear-tCG2K","Dialog":"prc-Dialog-Dialog-G8cDF","Overlay--motion-scaleFade":"prc-Dialog-Overlay--motion-scaleFade-mE6-C","Overlay--motion-slideInRight":"prc-Dialog-Overlay--motion-slideInRight-BR-CZ","Overlay--motion-slideInLeft":"prc-Dialog-Overlay--motion-slideInLeft-ISmQZ","Overlay--motion-slideUp":"prc-Dialog-Overlay--motion-slideUp-tPElO","DialogOverflowWrapper":"prc-Dialog-DialogOverflowWrapper-JvHzz","detect-scroll":"prc-Dialog-detect-scroll-b3i8Q","Header":"prc-Dialog-Header-f7Me-","HeaderInner":"prc-Dialog-HeaderInner-H-fFY","HeaderContent":"prc-Dialog-HeaderContent-mjAsn","Title":"prc-Dialog-Title-M-iPn","Subtitle":"prc-Dialog-Subtitle-aBFSq","Body":"prc-Dialog-Body-bB903","Footer":"prc-Dialog-Footer-PMeQk"};
|
|
4
4
|
|
|
5
5
|
export { classes as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DefaultFeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/DefaultFeatureFlags.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAA;AAEnD,eAAO,MAAM,mBAAmB,kBAQ9B,CAAA"}
|
|
@@ -3,7 +3,6 @@ import { FeatureFlagScope } from './FeatureFlagScope.js';
|
|
|
3
3
|
const DefaultFeatureFlags = FeatureFlagScope.create({
|
|
4
4
|
primer_react_breadcrumbs_overflow_menu: false,
|
|
5
5
|
primer_react_css_anchor_positioning: false,
|
|
6
|
-
primer_react_css_has_selector_perf: false,
|
|
7
6
|
primer_react_select_panel_fullscreen_on_narrow: false,
|
|
8
7
|
primer_react_select_panel_order_selected_at_top: false,
|
|
9
8
|
primer_react_select_panel_remove_active_descendant: false,
|
|
@@ -3,11 +3,5 @@ import { type FeatureFlags } from './FeatureFlagScope';
|
|
|
3
3
|
export type FeatureFlagsProps = React.PropsWithChildren<{
|
|
4
4
|
flags: FeatureFlags;
|
|
5
5
|
}>;
|
|
6
|
-
/**
|
|
7
|
-
* Reset the ref count for testing purposes only.
|
|
8
|
-
*
|
|
9
|
-
* @internal - Not part of the public API. Only exported for test isolation.
|
|
10
|
-
*/
|
|
11
|
-
export declare function __resetDialogScrollOptimizedCount(): void;
|
|
12
6
|
export declare function FeatureFlags({ children, flags }: FeatureFlagsProps): React.JSX.Element;
|
|
13
7
|
//# sourceMappingURL=FeatureFlags.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/FeatureFlags.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAmB,KAAK,YAAY,EAAC,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"FeatureFlags.d.ts","sourceRoot":"","sources":["../../src/FeatureFlags/FeatureFlags.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAmB,KAAK,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAEtE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACtD,KAAK,EAAE,YAAY,CAAA;CACpB,CAAC,CAAA;AAEF,wBAAgB,YAAY,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,EAAE,iBAAiB,qBAQhE"}
|
|
@@ -1,49 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c } from 'react-compiler-runtime';
|
|
2
|
+
import { useContext } from 'react';
|
|
2
3
|
import { FeatureFlagContext } from './FeatureFlagContext.js';
|
|
3
4
|
import { FeatureFlagScope } from './FeatureFlagScope.js';
|
|
4
|
-
import useIsomorphicLayoutEffect from '../utils/useIsomorphicLayoutEffect.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* can be removed - the attribute can simply always be present.
|
|
14
|
-
*
|
|
15
|
-
* @internal - Not part of the public API
|
|
16
|
-
*/
|
|
17
|
-
let dialogScrollOptimizedCount = 0;
|
|
18
|
-
function FeatureFlags({
|
|
19
|
-
children,
|
|
20
|
-
flags
|
|
21
|
-
}) {
|
|
7
|
+
function FeatureFlags(t0) {
|
|
8
|
+
const $ = c(6);
|
|
9
|
+
const {
|
|
10
|
+
children,
|
|
11
|
+
flags
|
|
12
|
+
} = t0;
|
|
22
13
|
const parentFeatureFlags = useContext(FeatureFlagContext);
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}
|
|
14
|
+
let t1;
|
|
15
|
+
if ($[0] !== flags || $[1] !== parentFeatureFlags) {
|
|
16
|
+
t1 = FeatureFlagScope.merge(parentFeatureFlags, FeatureFlagScope.create(flags));
|
|
17
|
+
$[0] = flags;
|
|
18
|
+
$[1] = parentFeatureFlags;
|
|
19
|
+
$[2] = t1;
|
|
20
|
+
} else {
|
|
21
|
+
t1 = $[2];
|
|
22
|
+
}
|
|
23
|
+
const scope = t1;
|
|
24
|
+
const value = scope;
|
|
25
|
+
let t2;
|
|
26
|
+
if ($[3] !== children || $[4] !== value) {
|
|
27
|
+
t2 = /*#__PURE__*/jsx(FeatureFlagContext.Provider, {
|
|
28
|
+
value: value,
|
|
29
|
+
children: children
|
|
30
|
+
});
|
|
31
|
+
$[3] = children;
|
|
32
|
+
$[4] = value;
|
|
33
|
+
$[5] = t2;
|
|
34
|
+
} else {
|
|
35
|
+
t2 = $[5];
|
|
36
|
+
}
|
|
37
|
+
return t2;
|
|
46
38
|
}
|
|
47
|
-
FeatureFlags.displayName = "FeatureFlags";
|
|
48
39
|
|
|
49
40
|
export { FeatureFlags };
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Dialog/Dialog.module.css.js"],"names":[],"mappings":"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","file":"Dialog-b577691f.css","sourcesContent":["/* The --prc-dialog-scrollgutter property is used only on the body element to\n * simulate scrollbar-gutter:stable. This property is not and should not\n * be used elsewhere in the DOM. There is a performance penalty to\n * setting inherited properties which can cause a large style recalc to\n * occur, so it benefits us to prevent inheritance for this property.\n * See https://web.dev/blog/at-property-performance\n */\n@property --prc-dialog-scrollgutter {\n initial-value: 0;\n inherits: false;\n syntax: '<length>';\n}\n\n@keyframes dialog-backdrop-appear {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@keyframes Overlay--motion-scaleFade {\n 0% {\n opacity: 0;\n transform: scale(0.5);\n }\n\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}\n\n@keyframes Overlay--motion-slideUp {\n from {\n transform: translateY(100%);\n }\n}\n\n@keyframes Overlay--motion-slideInRight {\n from {\n transform: translateX(-100%);\n }\n}\n\n@keyframes Overlay--motion-slideInLeft {\n from {\n transform: translateX(100%);\n }\n}\n\n/* Used to determine whether there should be a border between the body and footer */\n@keyframes detect-scroll {\n from,\n to {\n --can-scroll: 1;\n }\n}\n\n.Backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: flex;\n background-color: var(--overlay-backdrop-bgColor);\n animation: dialog-backdrop-appear 200ms cubic-bezier(0.33, 1, 0.68, 1);\n align-items: center;\n justify-content: center;\n\n &[data-position-regular='center'] {\n align-items: center;\n justify-content: center;\n }\n\n &[data-position-regular='left'] {\n align-items: center;\n justify-content: flex-start;\n }\n\n &[data-position-regular='right'] {\n align-items: center;\n justify-content: flex-end;\n }\n\n /* align only applies when regular position is center (or absent).\n * :where() zeroes out the :not() specificity so narrow-position rules (coming later)\n * always win when data-position-narrow is bottom or fullscreen. */\n &:where(:not([data-position-regular='left']):not([data-position-regular='right'])) {\n &[data-align='top'] {\n align-items: flex-start;\n }\n\n &[data-align='center'] {\n align-items: center;\n }\n\n &[data-align='bottom'] {\n align-items: flex-end;\n }\n }\n\n @media (max-width: 767px) {\n &[data-position-narrow='center'] {\n align-items: center;\n justify-content: center;\n\n /* align still applies when narrow position is center */\n &[data-align='top'] {\n align-items: flex-start;\n }\n\n &[data-align='center'] {\n align-items: center;\n }\n\n &[data-align='bottom'] {\n align-items: flex-end;\n }\n }\n\n &[data-position-narrow='bottom'] {\n align-items: end;\n justify-content: center;\n }\n }\n}\n\n.Dialog {\n display: flex;\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n min-width: 296px;\n max-width: calc(100dvw - 64px);\n height: auto;\n max-height: calc(100dvh - 64px);\n flex-direction: column;\n background-color: var(--overlay-bgColor);\n border-radius: var(--borderRadius-large);\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n box-shadow: var(--shadow-floating-small);\n opacity: 1;\n\n &:where([data-width='small']) {\n width: 296px;\n }\n\n &:where([data-width='medium']) {\n width: 320px;\n }\n\n &:where([data-width='large']) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-height='small']) {\n height: 480px;\n }\n\n &:where([data-height='large']) {\n height: 640px;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n\n &[data-position-regular='center'] {\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n\n /* align margins only apply when regular position is center */\n &[data-align='top'] {\n margin-top: var(--base-size-64);\n }\n\n &[data-align='bottom'] {\n margin-bottom: var(--base-size-64);\n }\n }\n\n &[data-position-regular='left'] {\n height: 100dvh;\n max-height: unset;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideInRight 0.25s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n\n &[data-position-regular='right'] {\n height: 100dvh;\n max-height: unset;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideInLeft 0.25s cubic-bezier(0.33, 1, 0.68, 1) 0s 1 normal none running;\n }\n }\n\n @media (max-width: 767px) {\n &[data-position-narrow='center'] {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 640px;\n height: auto;\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n\n &:where([data-width='small']) {\n width: 296px;\n }\n\n &:where([data-width='medium']) {\n width: 320px;\n }\n\n &:where([data-width='large']) {\n /* stylelint-disable-next-line primer/responsive-widths */\n width: 480px;\n }\n\n &:where([data-height='small']) {\n height: 480px;\n }\n\n &:where([data-height='large']) {\n height: 640px;\n }\n }\n\n @media (max-height: 280px) {\n max-height: calc(100dvh - 12px);\n max-width: calc(100dvw - 12px);\n }\n\n &[data-position-narrow='bottom'] {\n width: 100dvw;\n max-width: 100dvw;\n height: auto;\n max-height: calc(100dvh - 64px);\n border-radius: var(--borderRadius-large, var(--borderRadius-large));\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n\n /* reset align margins since position wins at narrow */\n &[data-align] {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-slideUp 0.25s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n\n &[data-position-narrow='fullscreen'] {\n width: 100%;\n max-width: 100dvw;\n height: 100%;\n max-height: 100dvh;\n border-radius: unset !important;\n flex-grow: 1;\n\n /* reset align margins since fullscreen wins at narrow */\n &[data-align] {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n @media screen and (prefers-reduced-motion: no-preference) {\n animation: Overlay--motion-scaleFade 0.2s cubic-bezier(0.33, 1, 0.68, 1) 1ms 1 normal none running;\n }\n }\n }\n}\n\n/* DisableScroll class is added to Dialog when scroll should be disabled on body */\n.DisableScroll {\n /* This class is used as a selector target for the legacy :has() CSS selector */\n}\n\n/*\n * LEGACY: Scoped :has() selector with negation guard\n * Only evaluates when data-dialog-scroll-optimized is NOT present on body.\n * When the attribute IS present (flag ON), browser skips :has() evaluation\n * because the :not() check fails first (O(1) attribute lookup).\n */\n/* stylelint-disable-next-line selector-no-qualifying-type */\nbody:not([data-dialog-scroll-optimized]):has(.Dialog.DisableScroll) {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--prc-dialog-scrollgutter) !important;\n overflow: hidden !important;\n}\n\n/*\n * PERFORMANCE OPTIMIZATION: Direct attribute on body - O(1) lookup\n * Active when primer_react_css_has_selector_perf flag is ON\n */\n/* stylelint-disable-next-line selector-no-qualifying-type */\nbody[data-dialog-scroll-disabled] {\n /* stylelint-disable-next-line primer/spacing */\n padding-right: var(--prc-dialog-scrollgutter) !important;\n overflow: hidden !important;\n}\n\n.DialogOverflowWrapper {\n flex-grow: 1;\n}\n\n/*\nAdd a border between the body and footer if:\n- the dialog has a footer\n- the dialog has a body that can scroll\n- the browser supports the `animation-timeline` property and its `scroll()` function\n*/\n.Dialog[data-has-footer] {\n --can-scroll: 0;\n\n .DialogOverflowWrapper {\n /* If the browser does not support the `animation-timeline` property, always show a border */\n border-bottom: var(--borderWidth-default) solid var(--borderColor-default);\n animation: detect-scroll;\n animation-timeline: scroll(self);\n\n @supports (animation-timeline: scroll(self)) {\n border-bottom: calc(var(--borderWidth-thin) * var(--can-scroll)) solid var(--borderColor-default);\n }\n }\n}\n\n.Header {\n z-index: 1;\n max-height: 35vh;\n padding: var(--base-size-8);\n overflow-y: auto;\n /* stylelint-disable-next-line primer/box-shadow */\n box-shadow: 0 1px 0 var(--borderColor-default);\n flex-shrink: 0;\n}\n\n.HeaderInner {\n display: flex;\n}\n\n.HeaderContent {\n display: flex;\n padding-inline: var(--base-size-8);\n padding-block: var(--base-size-6);\n flex-direction: column;\n flex-grow: 1;\n}\n\n.Title {\n margin: 0; /* override default margin */\n font-size: var(--text-body-size-medium);\n font-weight: var(--text-title-weight-large);\n}\n\n.Subtitle {\n margin: 0; /* override default margin */\n margin-top: var(--base-size-4);\n font-size: var(--text-body-size-small);\n font-weight: var(--base-text-weight-normal);\n color: var(--fgColor-muted);\n}\n\n.Body {\n padding: var(--base-size-16);\n overflow: auto;\n flex-grow: 1;\n}\n\n.Footer {\n z-index: 1;\n display: flex;\n flex-flow: wrap;\n justify-content: flex-end;\n padding: var(--base-size-16);\n gap: var(--base-size-8);\n flex-shrink: 0;\n}\n\n.Dialog[data-footer-button-layout='scroll'] .Footer {\n flex-wrap: nowrap;\n overflow-x: scroll;\n flex-direction: row;\n justify-content: unset;\n}\n"]}
|