@primer/react 0.0.0-20260605174255 → 0.0.0-20260608154601

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 (84) hide show
  1. package/CHANGELOG.md +4 -50
  2. package/dist/ActionList/ActionList-2a35a40c.css +2 -0
  3. package/dist/ActionList/ActionList-2a35a40c.css.map +1 -0
  4. package/dist/ActionList/ActionList.module.css.js +2 -2
  5. package/dist/ActionList/Item.d.ts.map +1 -1
  6. package/dist/ActionList/Item.js +118 -125
  7. package/dist/ActionList/TrailingAction.d.ts.map +1 -1
  8. package/dist/ActionList/TrailingAction.js +0 -1
  9. package/dist/ActionList/Visuals.js +4 -6
  10. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  11. package/dist/AnchoredOverlay/AnchoredOverlay.js +1 -3
  12. package/dist/Card/Card-d8a02dd9.css +2 -0
  13. package/dist/Card/Card-d8a02dd9.css.map +1 -0
  14. package/dist/Card/Card.d.ts +0 -18
  15. package/dist/Card/Card.d.ts.map +1 -1
  16. package/dist/Card/Card.js +154 -165
  17. package/dist/Card/Card.module.css.js +1 -1
  18. package/dist/Card/index.d.ts +0 -2
  19. package/dist/Card/index.d.ts.map +1 -1
  20. package/dist/Dialog/Dialog.d.ts +0 -1
  21. package/dist/Dialog/Dialog.d.ts.map +1 -1
  22. package/dist/Dialog/Dialog.js +2 -16
  23. package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
  24. package/dist/FeatureFlags/DefaultFeatureFlags.js +1 -3
  25. package/dist/InlineMessage/InlineMessage-80d97643.css +2 -0
  26. package/dist/InlineMessage/InlineMessage-80d97643.css.map +1 -0
  27. package/dist/InlineMessage/InlineMessage.d.ts +1 -1
  28. package/dist/InlineMessage/InlineMessage.d.ts.map +1 -1
  29. package/dist/InlineMessage/InlineMessage.js +19 -34
  30. package/dist/InlineMessage/InlineMessage.module.css.js +1 -1
  31. package/dist/KeybindingHint/KeybindingHint.d.ts +1 -6
  32. package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
  33. package/dist/KeybindingHint/KeybindingHint.js +2 -6
  34. package/dist/KeybindingHint/components/Chord.d.ts +1 -2
  35. package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
  36. package/dist/KeybindingHint/components/Chord.js +1 -1
  37. package/dist/KeybindingHint/components/Key.js +10 -10
  38. package/dist/KeybindingHint/components/Sequence.d.ts +1 -2
  39. package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
  40. package/dist/KeybindingHint/components/Sequence.js +2 -2
  41. package/dist/KeybindingHint/key-names.d.ts +3 -4
  42. package/dist/KeybindingHint/key-names.d.ts.map +1 -1
  43. package/dist/KeybindingHint/key-names.js +14 -15
  44. package/dist/Overlay/Overlay.d.ts.map +1 -1
  45. package/dist/Overlay/Overlay.js +1 -3
  46. package/dist/PageLayout/PageLayout.d.ts +6 -24
  47. package/dist/PageLayout/PageLayout.d.ts.map +1 -1
  48. package/dist/PageLayout/PageLayout.js +2 -7
  49. package/dist/Text/{Text-d649cda5.css → Text-ca7603b7.css} +2 -2
  50. package/dist/Text/Text-ca7603b7.css.map +1 -0
  51. package/dist/Text/Text.d.ts +0 -3
  52. package/dist/Text/Text.d.ts.map +1 -1
  53. package/dist/Text/Text.js +14 -20
  54. package/dist/Text/Text.module.css.js +1 -1
  55. package/dist/Timeline/Timeline-0c88f21b.css +2 -0
  56. package/dist/Timeline/Timeline-0c88f21b.css.map +1 -0
  57. package/dist/Timeline/Timeline.d.ts +8 -9
  58. package/dist/Timeline/Timeline.d.ts.map +1 -1
  59. package/dist/Timeline/Timeline.js +61 -156
  60. package/dist/Timeline/Timeline.module.css.js +1 -1
  61. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  62. package/dist/TooltipV2/Tooltip.js +3 -3
  63. package/dist/TreeView/TreeView-0fe09f34.css +2 -0
  64. package/dist/TreeView/TreeView-0fe09f34.css.map +1 -0
  65. package/dist/TreeView/TreeView.d.ts.map +1 -1
  66. package/dist/TreeView/TreeView.js +12 -25
  67. package/dist/TreeView/TreeView.module.css.js +2 -2
  68. package/dist/hooks/useIsMacOS.js +32 -0
  69. package/generated/components.json +10 -57
  70. package/package.json +1 -1
  71. package/dist/ActionList/ActionList-1940009e.css +0 -2
  72. package/dist/ActionList/ActionList-1940009e.css.map +0 -1
  73. package/dist/Card/Card-59b77d05.css +0 -2
  74. package/dist/Card/Card-59b77d05.css.map +0 -1
  75. package/dist/InlineMessage/InlineMessage-cd1e4c93.css +0 -2
  76. package/dist/InlineMessage/InlineMessage-cd1e4c93.css.map +0 -1
  77. package/dist/KeybindingHint/platform.d.ts +0 -22
  78. package/dist/KeybindingHint/platform.d.ts.map +0 -1
  79. package/dist/KeybindingHint/platform.js +0 -61
  80. package/dist/Text/Text-d649cda5.css.map +0 -1
  81. package/dist/Timeline/Timeline-ff81db92.css +0 -2
  82. package/dist/Timeline/Timeline-ff81db92.css.map +0 -1
  83. package/dist/TreeView/TreeView-1bf45a33.css +0 -2
  84. package/dist/TreeView/TreeView-1bf45a33.css.map +0 -1
package/dist/Text/Text.js CHANGED
@@ -6,20 +6,18 @@ import { jsx } from 'react/jsx-runtime';
6
6
 
7
7
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
8
8
  function Text(props, ref) {
9
- const $ = c(17);
9
+ const $ = c(15);
10
10
  let className;
11
11
  let rest;
12
12
  let size;
13
13
  let t0;
14
14
  let weight;
15
- let whiteSpace;
16
15
  if ($[0] !== props) {
17
16
  ({
18
17
  as: t0,
19
18
  className,
20
19
  size,
21
20
  weight,
22
- whiteSpace,
23
21
  ...rest
24
22
  } = props);
25
23
  $[0] = props;
@@ -28,44 +26,40 @@ function Text(props, ref) {
28
26
  $[3] = size;
29
27
  $[4] = t0;
30
28
  $[5] = weight;
31
- $[6] = whiteSpace;
32
29
  } else {
33
30
  className = $[1];
34
31
  rest = $[2];
35
32
  size = $[3];
36
33
  t0 = $[4];
37
34
  weight = $[5];
38
- whiteSpace = $[6];
39
35
  }
40
36
  const Component = t0 === undefined ? "span" : t0;
41
37
  let t1;
42
- if ($[7] !== className) {
38
+ if ($[6] !== className) {
43
39
  t1 = clsx(className, classes.Text);
44
- $[7] = className;
45
- $[8] = t1;
40
+ $[6] = className;
41
+ $[7] = t1;
46
42
  } else {
47
- t1 = $[8];
43
+ t1 = $[7];
48
44
  }
49
45
  let t2;
50
- if ($[9] !== Component || $[10] !== ref || $[11] !== rest || $[12] !== size || $[13] !== t1 || $[14] !== weight || $[15] !== whiteSpace) {
46
+ if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== size || $[12] !== t1 || $[13] !== weight) {
51
47
  t2 = /*#__PURE__*/jsx(Component, {
52
48
  className: t1,
53
49
  "data-size": size,
54
50
  "data-weight": weight,
55
- "data-white-space": whiteSpace,
56
51
  ...rest,
57
52
  ref: ref
58
53
  });
59
- $[9] = Component;
60
- $[10] = ref;
61
- $[11] = rest;
62
- $[12] = size;
63
- $[13] = t1;
64
- $[14] = weight;
65
- $[15] = whiteSpace;
66
- $[16] = t2;
54
+ $[8] = Component;
55
+ $[9] = ref;
56
+ $[10] = rest;
57
+ $[11] = size;
58
+ $[12] = t1;
59
+ $[13] = weight;
60
+ $[14] = t2;
67
61
  } else {
68
- t2 = $[16];
62
+ t2 = $[14];
69
63
  }
70
64
  return t2;
71
65
  }
@@ -1,4 +1,4 @@
1
- import './Text-d649cda5.css';
1
+ import './Text-ca7603b7.css';
2
2
 
3
3
  var classes = {"Text":"prc-Text-Text-9mHv3"};
4
4
 
@@ -0,0 +1,2 @@
1
+ .prc-Timeline-Timeline-awSoC{display:flex;flex-direction:column}:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=start]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:first-child{padding-top:0}:is(:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=start]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:first-child) .prc-Timeline-TimelineItemAvatar-4zO8f{top:var(--base-size-16,1rem)}:is(:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=start]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:first-child):where([data-condensed]):before{top:var(--base-size-12,.75rem)}:is(:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=start]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:first-child):where([data-condensed]) .prc-Timeline-TimelineItemAvatar-4zO8f{top:calc(var(--base-size-8,.5rem) + var(--base-size-8,.5rem))}:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=end]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:last-child{padding-bottom:0}:is(:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=end]),.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar=both])) .prc-Timeline-TimelineItem-QwDVH:last-child):where([data-condensed]):before{height:var(--base-size-12,.75rem)}.prc-Timeline-TimelineItem-QwDVH{display:flex;margin-left:var(--base-size-16,1rem);padding:var(--base-size-16,1rem) 0;position:relative}.prc-Timeline-TimelineItem-QwDVH:before{background-color:var(--borderColor-muted,#d1d9e0b3);bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:2px}.prc-Timeline-TimelineItem-QwDVH:where([data-condensed]){padding-bottom:0;padding-top:var(--base-size-4,.25rem)}.prc-Timeline-TimelineItem-QwDVH:where([data-condensed]):last-child{padding-bottom:var(--base-size-16,1rem)}.prc-Timeline-TimelineItem-QwDVH:where([data-condensed]) .prc-Timeline-TimelineBadge-u0qSm{background-color:var(--bgColor-default,#fff);border:0;color:var(--fgColor-muted,#59636e);height:16px;margin-bottom:var(--base-size-8,.5rem);margin-top:var(--base-size-8,.5rem)}.prc-Timeline-TimelineItem-QwDVH:where([data-condensed]) .prc-Timeline-TimelineItemAvatar-4zO8f{top:calc(var(--base-size-4,.25rem) + var(--base-size-8,.5rem) + var(--base-size-8,.5rem))}.prc-Timeline-TimelineItemAvatar-4zO8f{left:calc((var(--base-size-40,2.5rem) + var(--base-size-32,2rem))*-1);position:absolute;top:calc(var(--base-size-16,1rem) + var(--base-size-16,1rem));transform:translateY(-50%);z-index:1}.prc-Timeline-TimelineBadgeWrapper-SZw4k{position:relative;z-index:1}.prc-Timeline-TimelineBadge-u0qSm{align-items:center;background-color:var(--timelineBadge-bgColor,#f6f8fa);border-color:var(--bgColor-default,#fff);border-radius:50%;border-style:solid;border-width:var(--borderWidth-thick,.125rem);color:var(--fgColor-muted,#59636e);display:flex;flex-shrink:0;height:32px;justify-content:center;margin-left:-15px;margin-right:var(--base-size-8,.5rem);overflow:hidden;width:32px}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant]){color:var(--fgColor-onEmphasis,#fff)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=accent]){background-color:var(--bgColor-accent-emphasis,#0969da)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=success]){background-color:var(--bgColor-success-emphasis,#1f883d)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=attention]){background-color:var(--bgColor-attention-emphasis,#9a6700)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=severe]){background-color:var(--bgColor-severe-emphasis,#bc4c00)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=danger]){background-color:var(--bgColor-danger-emphasis,#cf222e)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=done]){background-color:var(--bgColor-done-emphasis,#8250df)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=open]){background-color:var(--bgColor-open-emphasis,#1f883d)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=closed]){background-color:var(--bgColor-closed-emphasis,#cf222e)}.prc-Timeline-TimelineBadge-u0qSm:where([data-variant=sponsors]){background-color:var(--bgColor-sponsors-emphasis,#bf3989)}.prc-Timeline-TimelineBody-tjOtb{color:var(--fgColor-muted,#59636e);flex:auto;font-size:var(--text-body-size-medium,.875rem);margin-top:calc(var(--base-size-4,.25rem) + 1px);max-width:100%;min-width:0}.prc-Timeline-TimelineBreak-X8eti{background-color:var(--bgColor-default,#fff);border:0;border-top:var(--borderWidth-thicker,.25rem) solid var(--borderColor-default,#d1d9e0);height:var(--base-size-24,1.5rem);margin:0;margin-bottom:calc(var(--base-size-16,1rem)*-1);margin-left:0;position:relative;z-index:1}.prc-Timeline-TimelineBreak-X8eti:has(+[data-condensed]){margin-bottom:calc(var(--base-size-12,.75rem)*-1)}.prc-Timeline-TimelineItemActions-56Y7h{align-items:center;align-self:flex-start;display:flex;flex-shrink:0;gap:var(--base-size-8,.5rem);margin-left:auto;min-height:var(--base-size-32,2rem)}
2
+ /*# sourceMappingURL=Timeline-0c88f21b.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Timeline/Timeline.module.css.js"],"names":[],"mappings":"AAAA,6BACE,YAAa,CACb,qBAiCF,CA7BI,6KACE,aAeF,CAbE,yNAEE,4BACF,CAEA,iNACE,8BACF,CAEA,iPAEE,6DACF,CAMF,0KACE,gBAKF,CAHE,8MACE,iCACF,CAKN,iCAEE,YAAa,CAEb,oCAAgC,CADhC,kCAA8B,CAF9B,iBAuCF,CAlCE,wCASE,mDAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAoBF,CAjBE,oEACE,uCACF,CAEA,2FAKE,4CAAwC,CACxC,QAAS,CAFT,kCAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAEA,gGAEE,yFACF,CAIJ,uCAGE,qEAA4D,CAF5D,iBAAkB,CAIlB,6DAAoD,CAEpD,0BAA2B,CAD3B,SAEF,CAEA,yCACE,iBAAkB,CAClB,SACF,CAEA,kCAkBE,kBAAmB,CANnB,qDAA8C,CAE9C,wCAAoC,CAGpC,iBAAkB,CAFlB,kBAAmB,CACnB,6CAAsC,CAPtC,kCAA2B,CAR3B,YAAa,CAMb,aAAc,CAJd,WAAY,CAgBZ,sBAAuB,CAbvB,iBAAkB,CAFlB,qCAAgC,CAIhC,eAAgB,CANhB,UA0DF,CAvCE,wDACE,oCACF,CAEA,+DACE,uDACF,CAEA,gEACE,wDACF,CAEA,kEACE,0DACF,CAEA,+DACE,uDACF,CAEA,+DACE,uDACF,CAEA,6DACE,qDACF,CAEA,6DACE,qDACF,CAEA,+DACE,uDACF,CAEA,iEACE,yDACF,CAGF,iCAME,kCAA2B,CAC3B,SAAU,CAFV,8CAAuC,CADvC,gDAA0C,CAF1C,cAAe,CADf,WAOF,CAEA,kCAOE,4CAAwC,CACxC,QAAS,CACT,qFAAuE,CANvE,iCAA2B,CAC3B,QAAS,CACT,+CAA6C,CAC7C,aAAc,CALd,iBAAkB,CAClB,SAaF,CAHE,yDACE,iDACF,CAGF,wCAEE,kBAAmB,CACnB,qBAAsB,CAFtB,YAAa,CAOb,aAAc,CADd,4BAAuB,CADvB,gBAAiB,CADjB,mCAIF","file":"Timeline-0c88f21b.css","sourcesContent":[".Timeline {\n display: flex;\n flex-direction: column;\n\n &:where([data-clip-sidebar='start']),\n &:where([data-clip-sidebar='both']) {\n .TimelineItem:first-child {\n padding-top: 0;\n\n .TimelineItemAvatar {\n /* No padding-top on first item: badge center is at 0 + 16px (half-badge) */\n top: var(--base-size-16);\n }\n\n &:where([data-condensed])::before {\n top: var(--base-size-12);\n }\n\n &:where([data-condensed]) .TimelineItemAvatar {\n /* No padding-top + condensed: badge center is at 0 + 8px margin + 8px half-badge */\n top: calc(var(--base-size-8) + var(--base-size-8));\n }\n }\n }\n\n &:where([data-clip-sidebar='end']),\n &:where([data-clip-sidebar='both']) {\n .TimelineItem:last-child {\n padding-bottom: 0;\n\n &:where([data-condensed])::before {\n height: var(--base-size-12);\n }\n }\n }\n}\n\n.TimelineItem {\n position: relative;\n display: flex;\n padding: var(--base-size-16) 0;\n margin-left: var(--base-size-16);\n\n &::before {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 2px;\n content: '';\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--borderColor-muted);\n }\n\n &:where([data-condensed]) {\n padding-top: var(--base-size-4);\n padding-bottom: 0;\n\n &:last-child {\n padding-bottom: var(--base-size-16);\n }\n\n .TimelineBadge {\n height: 16px;\n margin-top: var(--base-size-8);\n margin-bottom: var(--base-size-8);\n color: var(--fgColor-muted);\n background-color: var(--bgColor-default);\n border: 0;\n }\n\n .TimelineItemAvatar {\n /* Vertically center against the condensed badge (4px padding-top + 8px badge top margin + 8px half-badge) */\n top: calc(var(--base-size-4) + var(--base-size-8) + var(--base-size-8));\n }\n }\n}\n\n.TimelineItemAvatar {\n position: absolute;\n /* Place avatar in the left gutter, aligned with surrounding actor avatars (~72px from item content) */\n left: calc(-1 * (var(--base-size-40) + var(--base-size-32)));\n /* Vertically center against the default badge (16px padding-top + 16px half-badge) */\n top: calc(var(--base-size-16) + var(--base-size-16));\n z-index: 1;\n transform: translateY(-50%);\n}\n\n.TimelineBadgeWrapper {\n position: relative;\n z-index: 1;\n}\n\n.TimelineBadge {\n display: flex;\n width: 32px;\n height: 32px;\n margin-right: var(--base-size-8);\n /* stylelint-disable-next-line primer/spacing */\n margin-left: -15px;\n flex-shrink: 0;\n overflow: hidden;\n color: var(--fgColor-muted);\n\n /* TODOl not quite sure if this is the correct migration for this line */\n background-color: var(--timelineBadge-bgColor);\n /* stylelint-disable-next-line primer/colors */\n border-color: var(--bgColor-default);\n border-style: solid;\n border-width: var(--borderWidth-thick);\n border-radius: 50%;\n align-items: center;\n justify-content: center;\n\n &:where([data-variant]) {\n color: var(--fgColor-onEmphasis);\n }\n\n &:where([data-variant='accent']) {\n background-color: var(--bgColor-accent-emphasis);\n }\n\n &:where([data-variant='success']) {\n background-color: var(--bgColor-success-emphasis);\n }\n\n &:where([data-variant='attention']) {\n background-color: var(--bgColor-attention-emphasis);\n }\n\n &:where([data-variant='severe']) {\n background-color: var(--bgColor-severe-emphasis);\n }\n\n &:where([data-variant='danger']) {\n background-color: var(--bgColor-danger-emphasis);\n }\n\n &:where([data-variant='done']) {\n background-color: var(--bgColor-done-emphasis);\n }\n\n &:where([data-variant='open']) {\n background-color: var(--bgColor-open-emphasis);\n }\n\n &:where([data-variant='closed']) {\n background-color: var(--bgColor-closed-emphasis);\n }\n\n &:where([data-variant='sponsors']) {\n background-color: var(--bgColor-sponsors-emphasis);\n }\n}\n\n.TimelineBody {\n min-width: 0;\n max-width: 100%;\n /* stylelint-disable-next-line primer/spacing */\n margin-top: calc(var(--base-size-4) + 1px);\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-muted);\n flex: auto;\n}\n\n.TimelineBreak {\n position: relative;\n z-index: 1;\n height: var(--base-size-24);\n margin: 0;\n margin-bottom: calc(-1 * var(--base-size-16));\n margin-left: 0;\n background-color: var(--bgColor-default);\n border: 0;\n border-top: var(--borderWidth-thicker) solid var(--borderColor-default);\n\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(+ [data-condensed]) {\n margin-bottom: calc(-1 * var(--base-size-12));\n }\n}\n\n.TimelineItemActions {\n display: flex;\n align-items: center;\n align-self: flex-start;\n /* Match the badge wrapper height (32px in both default and condensed) so contents vertically center against the badge */\n min-height: var(--base-size-32);\n margin-left: auto;\n gap: var(--base-size-8);\n flex-shrink: 0;\n}\n"]}
@@ -3,7 +3,7 @@ type StyledTimelineProps = {
3
3
  clipSidebar?: boolean | 'start' | 'end' | 'both';
4
4
  className?: string;
5
5
  };
6
- export type TimelineProps = StyledTimelineProps & Omit<React.ComponentPropsWithoutRef<'ol'>, 'role'>;
6
+ export type TimelineProps = StyledTimelineProps & React.ComponentPropsWithoutRef<'div'>;
7
7
  type StyledTimelineItemProps = {
8
8
  condensed?: boolean;
9
9
  className?: string;
@@ -11,10 +11,9 @@ type StyledTimelineItemProps = {
11
11
  /**
12
12
  * @deprecated Use the `TimelineItemProps` type instead
13
13
  */
14
- export type TimelineItemsProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'li'>;
15
- export type TimelineItemProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'li'>;
16
- export declare const TimelineBadgeVariants: readonly ["accent", "success", "attention", "severe", "danger", "done", "open", "closed", "sponsors"];
17
- export type TimelineBadgeVariant = (typeof TimelineBadgeVariants)[number];
14
+ export type TimelineItemsProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'div'>;
15
+ export type TimelineItemProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'div'>;
16
+ export type TimelineBadgeVariant = 'accent' | 'success' | 'attention' | 'severe' | 'danger' | 'done' | 'open' | 'closed' | 'sponsors';
18
17
  export type TimelineBadgeProps = {
19
18
  children?: React.ReactNode;
20
19
  className?: string;
@@ -28,7 +27,7 @@ export type TimelineBodyProps = {
28
27
  export type TimelineBreakProps = {
29
28
  /** Class name for custom styling */
30
29
  className?: string;
31
- } & Omit<React.ComponentPropsWithoutRef<'li'>, 'role'>;
30
+ } & React.ComponentPropsWithoutRef<'div'>;
32
31
  export type TimelineActionsProps = {
33
32
  /** Class name for custom styling */
34
33
  className?: string;
@@ -37,8 +36,8 @@ export type TimelineAvatarProps = {
37
36
  /** Class name for custom styling */
38
37
  className?: string;
39
38
  } & React.ComponentPropsWithoutRef<'div'>;
40
- declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<Omit<React.DetailedHTMLProps<React.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLOListElement>> & {
41
- Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
39
+ declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
40
+ Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
42
41
  Avatar: React.ForwardRefExoticComponent<{
43
42
  /** Class name for custom styling */
44
43
  className?: string;
@@ -54,7 +53,7 @@ declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Om
54
53
  Break: React.ForwardRefExoticComponent<{
55
54
  /** Class name for custom styling */
56
55
  className?: string;
57
- } & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref">, "role"> & React.RefAttributes<HTMLDivElement | HTMLLIElement>>;
56
+ } & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
58
57
  Actions: React.ForwardRefExoticComponent<{
59
58
  /** Class name for custom styling */
60
59
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,KAAK,mBAAmB,GAAG;IAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAEjG,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAA;AAyCpG,KAAK,uBAAuB,GAAG;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EA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AA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAQzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAQzC,MAAM,MAAM,oBAAoB,GAAG;IACjC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAQzC,MAAM,MAAM,mBAAmB,GAAG;IAChC,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;;;;QAFvC,oCAAoC;oBACxB,MAAM;;;2CA7CmC,kBAAkB;;;;QAWvE,oCAAoC;oBACxB,MAAM;;;QAUlB,oCAAoC;oBACxB,MAAM;;;QAUlB,oCAAoC;oBACxB,MAAM;;;AAoBpB,wBAOE"}
@@ -3,7 +3,6 @@ import { clsx } from 'clsx';
3
3
  import React from 'react';
4
4
  import classes from './Timeline.module.css.js';
5
5
  import { jsx } from 'react/jsx-runtime';
6
- import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
7
6
 
8
7
  function resolveClipSidebar(clipSidebar) {
9
8
  if (clipSidebar === true || clipSidebar === 'both') return 'both';
@@ -11,7 +10,7 @@ function resolveClipSidebar(clipSidebar) {
11
10
  return undefined;
12
11
  }
13
12
  const Timeline = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
14
- const $ = c(20);
13
+ const $ = c(13);
15
14
  let className;
16
15
  let clipSidebar;
17
16
  let props;
@@ -30,7 +29,6 @@ const Timeline = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
30
29
  clipSidebar = $[2];
31
30
  props = $[3];
32
31
  }
33
- const useListSemantics = useFeatureFlag("primer_react_timeline_list_semantics");
34
32
  let t1;
35
33
  if ($[4] !== clipSidebar) {
36
34
  t1 = resolveClipSidebar(clipSidebar);
@@ -40,62 +38,31 @@ const Timeline = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
40
38
  t1 = $[5];
41
39
  }
42
40
  const resolvedClipSidebar = t1;
43
- if (useListSemantics) {
44
- let t2;
45
- if ($[6] !== className) {
46
- t2 = clsx(className, classes.Timeline);
47
- $[6] = className;
48
- $[7] = t2;
49
- } else {
50
- t2 = $[7];
51
- }
52
- const t3 = forwardRef;
53
- let t4;
54
- if ($[8] !== props || $[9] !== resolvedClipSidebar || $[10] !== t2 || $[11] !== t3) {
55
- t4 = /*#__PURE__*/jsx("ol", {
56
- ...props,
57
- role: "list",
58
- className: t2,
59
- ref: t3,
60
- "data-clip-sidebar": resolvedClipSidebar
61
- });
62
- $[8] = props;
63
- $[9] = resolvedClipSidebar;
64
- $[10] = t2;
65
- $[11] = t3;
66
- $[12] = t4;
67
- } else {
68
- t4 = $[12];
69
- }
70
- return t4;
71
- }
72
- const t2 = props;
73
- let t3;
74
- if ($[13] !== className) {
75
- t3 = clsx(className, classes.Timeline);
76
- $[13] = className;
77
- $[14] = t3;
41
+ let t2;
42
+ if ($[6] !== className) {
43
+ t2 = clsx(className, classes.Timeline);
44
+ $[6] = className;
45
+ $[7] = t2;
78
46
  } else {
79
- t3 = $[14];
47
+ t2 = $[7];
80
48
  }
81
- const t4 = forwardRef;
82
- let t5;
83
- if ($[15] !== resolvedClipSidebar || $[16] !== t2 || $[17] !== t3 || $[18] !== t4) {
84
- t5 = /*#__PURE__*/jsx("div", {
85
- ...t2,
86
- className: t3,
87
- ref: t4,
49
+ let t3;
50
+ if ($[8] !== forwardRef || $[9] !== props || $[10] !== resolvedClipSidebar || $[11] !== t2) {
51
+ t3 = /*#__PURE__*/jsx("div", {
52
+ ...props,
53
+ className: t2,
54
+ ref: forwardRef,
88
55
  "data-clip-sidebar": resolvedClipSidebar
89
56
  });
90
- $[15] = resolvedClipSidebar;
91
- $[16] = t2;
92
- $[17] = t3;
93
- $[18] = t4;
94
- $[19] = t5;
57
+ $[8] = forwardRef;
58
+ $[9] = props;
59
+ $[10] = resolvedClipSidebar;
60
+ $[11] = t2;
61
+ $[12] = t3;
95
62
  } else {
96
- t5 = $[19];
63
+ t3 = $[12];
97
64
  }
98
- return t5;
65
+ return t3;
99
66
  });
100
67
  Timeline.displayName = 'Timeline';
101
68
 
@@ -104,7 +71,7 @@ Timeline.displayName = 'Timeline';
104
71
  */
105
72
 
106
73
  const TimelineItem = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
107
- const $ = c(18);
74
+ const $ = c(11);
108
75
  let className;
109
76
  let condensed;
110
77
  let props;
@@ -123,64 +90,32 @@ const TimelineItem = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
123
90
  condensed = $[2];
124
91
  props = $[3];
125
92
  }
126
- const useListSemantics = useFeatureFlag("primer_react_timeline_list_semantics");
127
- if (useListSemantics) {
128
- let t1;
129
- if ($[4] !== className) {
130
- t1 = clsx(className, "Timeline-Item", classes.TimelineItem);
131
- $[4] = className;
132
- $[5] = t1;
133
- } else {
134
- t1 = $[5];
135
- }
136
- const t2 = forwardRef;
137
- const t3 = condensed ? "" : undefined;
138
- let t4;
139
- if ($[6] !== props || $[7] !== t1 || $[8] !== t2 || $[9] !== t3) {
140
- t4 = /*#__PURE__*/jsx("li", {
141
- ...props,
142
- className: t1,
143
- ref: t2,
144
- "data-condensed": t3
145
- });
146
- $[6] = props;
147
- $[7] = t1;
148
- $[8] = t2;
149
- $[9] = t3;
150
- $[10] = t4;
151
- } else {
152
- t4 = $[10];
153
- }
154
- return t4;
155
- }
156
- const t1 = props;
157
- let t2;
158
- if ($[11] !== className) {
159
- t2 = clsx(className, "Timeline-Item", classes.TimelineItem);
160
- $[11] = className;
161
- $[12] = t2;
93
+ let t1;
94
+ if ($[4] !== className) {
95
+ t1 = clsx(className, "Timeline-Item", classes.TimelineItem);
96
+ $[4] = className;
97
+ $[5] = t1;
162
98
  } else {
163
- t2 = $[12];
99
+ t1 = $[5];
164
100
  }
165
- const t3 = forwardRef;
166
- const t4 = condensed ? "" : undefined;
167
- let t5;
168
- if ($[13] !== t1 || $[14] !== t2 || $[15] !== t3 || $[16] !== t4) {
169
- t5 = /*#__PURE__*/jsx("div", {
170
- ...t1,
171
- className: t2,
172
- ref: t3,
173
- "data-condensed": t4
101
+ const t2 = condensed ? "" : undefined;
102
+ let t3;
103
+ if ($[6] !== forwardRef || $[7] !== props || $[8] !== t1 || $[9] !== t2) {
104
+ t3 = /*#__PURE__*/jsx("div", {
105
+ ...props,
106
+ className: t1,
107
+ ref: forwardRef,
108
+ "data-condensed": t2
174
109
  });
175
- $[13] = t1;
176
- $[14] = t2;
177
- $[15] = t3;
178
- $[16] = t4;
179
- $[17] = t5;
110
+ $[6] = forwardRef;
111
+ $[7] = props;
112
+ $[8] = t1;
113
+ $[9] = t2;
114
+ $[10] = t3;
180
115
  } else {
181
- t5 = $[17];
116
+ t3 = $[10];
182
117
  }
183
- return t5;
118
+ return t3;
184
119
  });
185
120
  TimelineItem.displayName = 'TimelineItem';
186
121
  const TimelineBadge = t0 => {
@@ -273,7 +208,7 @@ const TimelineBody = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
273
208
  });
274
209
  TimelineBody.displayName = 'TimelineBody';
275
210
  const TimelineBreak = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
276
- const $ = c(15);
211
+ const $ = c(9);
277
212
  let className;
278
213
  let props;
279
214
  if ($[0] !== t0) {
@@ -288,59 +223,29 @@ const TimelineBreak = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
288
223
  className = $[1];
289
224
  props = $[2];
290
225
  }
291
- const useListSemantics = useFeatureFlag("primer_react_timeline_list_semantics");
292
- if (useListSemantics) {
293
- let t1;
294
- if ($[3] !== className) {
295
- t1 = clsx(className, classes.TimelineBreak);
296
- $[3] = className;
297
- $[4] = t1;
298
- } else {
299
- t1 = $[4];
300
- }
301
- const t2 = forwardRef;
302
- let t3;
303
- if ($[5] !== props || $[6] !== t1 || $[7] !== t2) {
304
- t3 = /*#__PURE__*/jsx("li", {
305
- ...props,
306
- className: t1,
307
- ref: t2,
308
- role: "presentation"
309
- });
310
- $[5] = props;
311
- $[6] = t1;
312
- $[7] = t2;
313
- $[8] = t3;
314
- } else {
315
- t3 = $[8];
316
- }
317
- return t3;
318
- }
319
- const t1 = props;
320
- let t2;
321
- if ($[9] !== className) {
322
- t2 = clsx(className, classes.TimelineBreak);
323
- $[9] = className;
324
- $[10] = t2;
226
+ let t1;
227
+ if ($[3] !== className) {
228
+ t1 = clsx(className, classes.TimelineBreak);
229
+ $[3] = className;
230
+ $[4] = t1;
325
231
  } else {
326
- t2 = $[10];
232
+ t1 = $[4];
327
233
  }
328
- const t3 = forwardRef;
329
- let t4;
330
- if ($[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
331
- t4 = /*#__PURE__*/jsx("div", {
332
- ...t1,
333
- className: t2,
334
- ref: t3
234
+ let t2;
235
+ if ($[5] !== forwardRef || $[6] !== props || $[7] !== t1) {
236
+ t2 = /*#__PURE__*/jsx("div", {
237
+ ...props,
238
+ className: t1,
239
+ ref: forwardRef
335
240
  });
336
- $[11] = t1;
337
- $[12] = t2;
338
- $[13] = t3;
339
- $[14] = t4;
241
+ $[5] = forwardRef;
242
+ $[6] = props;
243
+ $[7] = t1;
244
+ $[8] = t2;
340
245
  } else {
341
- t4 = $[14];
246
+ t2 = $[8];
342
247
  }
343
- return t4;
248
+ return t2;
344
249
  });
345
250
  TimelineBreak.displayName = 'TimelineBreak';
346
251
  const TimelineActions = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
@@ -1,4 +1,4 @@
1
- import './Timeline-ff81db92.css';
1
+ import './Timeline-0c88f21b.css';
2
2
 
3
3
  var classes = {"Timeline":"prc-Timeline-Timeline-awSoC","TimelineItem":"prc-Timeline-TimelineItem-QwDVH","TimelineItemAvatar":"prc-Timeline-TimelineItemAvatar-4zO8f","TimelineBadge":"prc-Timeline-TimelineBadge-u0qSm","TimelineBadgeWrapper":"prc-Timeline-TimelineBadgeWrapper-SZw4k","TimelineBody":"prc-Timeline-TimelineBody-tjOtb","TimelineBreak":"prc-Timeline-TimelineBreak-X8eti","TimelineItemActions":"prc-Timeline-TimelineItemActions-56Y7h"};
4
4
 
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiD,KAAK,yBAAyB,EAAC,MAAM,OAAO,CAAA;AAS3G,OAAO,EAAoD,KAAK,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAI7G,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAA;IACjF;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACnC;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAC,GACA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAiEnC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAI3E,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAC7C,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CACvE,GACC,UAkSD,CAAA"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/TooltipV2/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAiD,KAAK,yBAAyB,EAAC,MAAM,OAAO,CAAA;AAS3G,OAAO,EAAoD,KAAK,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAG7G,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAA;AAE9C,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAA;IAC9B,cAAc,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAA;IACjF;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IACnC;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACjC,CAAC,GACA,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAA;AAiEnC,eAAO,MAAM,cAAc;gBAAoC,MAAM;EAAM,CAAA;AAI3E,eAAO,MAAM,OAAO,EAAE,yBAAyB,CAC7C,KAAK,CAAC,eAAe,CAAC,YAAY,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CACvE,GACC,UAkSD,CAAA"}
@@ -5,13 +5,13 @@ import { getAnchoredPosition } from '@primer/behaviors';
5
5
  import { isSupported, apply } from '@oddbird/popover-polyfill/fn';
6
6
  import { clsx } from 'clsx';
7
7
  import classes from './Tooltip.module.css.js';
8
- import { usePlatform } from '../KeybindingHint/platform.js';
9
8
  import VisuallyHidden from '../_VisuallyHidden.js';
10
9
  import useSafeTimeout from '../hooks/useSafeTimeout.js';
11
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
11
  import { useId } from '../hooks/useId.js';
13
12
  import { useProvidedRefOrCreate } from '../hooks/useProvidedRefOrCreate.js';
14
13
  import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
14
+ import { useIsMacOS } from '../hooks/useIsMacOS.js';
15
15
  import { getAccessibleKeybindingHintString, KeybindingHint } from '../KeybindingHint/KeybindingHint.js';
16
16
 
17
17
  // map tooltip direction to anchoredPosition props
@@ -195,7 +195,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
195
195
  closeTooltip();
196
196
  }
197
197
  }, [isPopoverOpen]);
198
- const platform = usePlatform();
198
+ const isMacOS = useIsMacOS();
199
199
  const hasAriaLabel = 'aria-label' in rest;
200
200
 
201
201
  // Normalize keybindingHint to an array for uniform rendering
@@ -290,7 +290,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
290
290
  children: [/*#__PURE__*/jsxs("span", {
291
291
  id: hasAriaLabel ? undefined : tooltipId,
292
292
  children: [text, /*#__PURE__*/jsxs(VisuallyHidden, {
293
- children: ["(", keybindingHints.map(hint => getAccessibleKeybindingHintString(hint, platform)).join(' or '), ")"]
293
+ children: ["(", keybindingHints.map(hint => getAccessibleKeybindingHintString(hint, isMacOS)).join(' or '), ")"]
294
294
  })]
295
295
  }), /*#__PURE__*/jsx("span", {
296
296
  className: clsx(classes.KeybindingHintContainer, text && classes.HasTextBefore, keybindingHints.length > 1 && classes.HasMultipleHints),
@@ -0,0 +1,2 @@
1
+ .prc-TreeView-TreeViewRootUlStyles-Mzrmj{list-style:none;margin:0;padding:0}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f{outline:none}:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f):focus-visible>div,:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f).focus-visible>div{box-shadow:var(--boxShadow-thick,inset 0 0 0 .125rem) var(--fgColor-accent,#0969da)}@media (forced-colors:active){:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f):focus-visible>div,:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f).focus-visible>div{outline:2px solid HighlightText;outline-offset:-2}}[data-has-leading-action]:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f){--has-leading-action:1}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ{--level:1;--toggle-width:1rem;--min-item-height:2rem;border-radius:var(--borderRadius-medium,.375rem);color:var(--fgColor-default,#1f2328);cursor:pointer;display:grid;font-size:var(--text-body-size-medium,.875rem);grid-template-areas:"spacer leadingAction toggle content trailingAction";grid-template-columns:var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr;position:relative;width:100%;--leading-action-width:calc(var(--has-leading-action, 0)*1.5rem);--spacer-width:calc((var(--level) - 1)*(var(--toggle-width)/2))}:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ):hover{background-color:var(--control-transparent-bgColor-hover,#818b981a)}@media (forced-colors:active){:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ):hover{outline:2px solid transparent;outline-offset:-2px}}@media (pointer:coarse){.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ{--toggle-width:1.5rem;--min-item-height:2.75rem}}:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ):has(.prc-TreeView-TreeViewItemSkeleton-FGlnx):hover{background-color:transparent;cursor:default}@media (forced-colors:active){:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContainer-z6qqQ):has(.prc-TreeView-TreeViewItemSkeleton-FGlnx):hover{outline:none}}.prc-TreeView-TreeViewRootUlStyles-Mzrmj:where([data-omit-spacer=true]) .prc-TreeView-TreeViewItemContainer-z6qqQ{grid-template-columns:0 0 0 1fr}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f[aria-current=true]>.prc-TreeView-TreeViewItemContainer-z6qqQ{background-color:var(--control-transparent-bgColor-selected,#818b9826)}:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f[aria-current=true]>.prc-TreeView-TreeViewItemContainer-z6qqQ):after{background-color:var(--fgColor-accent,#0969da);border-radius:var(--borderRadius-medium,.375rem);content:"";height:1.5rem;left:calc(var(--base-size-8,.5rem)*-1);position:absolute;top:calc(50% - var(--base-size-12,.75rem));width:.25rem}@media (forced-colors:active){:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItem-Ter5f[aria-current=true]>.prc-TreeView-TreeViewItemContainer-z6qqQ):after{background-color:HighlightText}}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemToggle-hq3Xq{align-items:flex-start;color:var(--fgColor-muted,#59636e);display:flex;grid-area:toggle;height:100%;justify-content:center;padding-top:calc(var(--min-item-height)/2 - var(--base-size-12,.75rem)/2)}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemToggleHover-H9tbt:hover{background-color:var(--control-transparent-bgColor-hover,#818b981a)}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemToggleEnd-nWt9I{border-bottom-left-radius:var(--borderRadius-medium,.375rem);border-top-left-radius:var(--borderRadius-medium,.375rem)}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContent-RKsCI{display:flex;gap:var(--stack-gap-condensed,.5rem);grid-area:content;height:100%;line-height:var(--custom-line-height,var(--text-body-lineHeight-medium,1.4285));padding:0 var(--base-size-8,.5rem);padding-bottom:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2);padding-top:calc((var(--min-item-height) - var(--custom-line-height, 1.3rem))/2)}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemContentText-FFaKp{flex:1 1 auto;width:0}.prc-TreeView-TreeViewRootUlStyles-Mzrmj:where([data-truncate-text=true]) .prc-TreeView-TreeViewItemContentText-FFaKp{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.prc-TreeView-TreeViewRootUlStyles-Mzrmj:where([data-truncate-text=false]) .prc-TreeView-TreeViewItemContentText-FFaKp{word-break:break-word}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemVisual-naWzj{align-items:center;color:var(--fgColor-muted,#59636e);display:flex;height:var(--custom-line-height,1.3rem)}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemLeadingAction-vmOIV{color:var(--fgColor-muted,#59636e);display:flex;grid-area:leadingAction}:is(.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemLeadingAction-vmOIV)>button{flex-shrink:1}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemTrailingAction-h9M5g{color:var(--fgColor-muted,#59636e);display:flex;grid-area:trailingAction}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemTrailingActionButton-pCTdP{flex-shrink:1}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemLevelLine-F-0-2{border-color:var(--borderColor-muted,#d1d9e0b3);border-right:var(--borderWidth-thin,.0625rem) solid;height:100%;width:100%}@media (hover:hover){.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewItemLevelLine-F-0-2{border-color:transparent}.prc-TreeView-TreeViewRootUlStyles-Mzrmj:focus-within .prc-TreeView-TreeViewItemLevelLine-F-0-2,.prc-TreeView-TreeViewRootUlStyles-Mzrmj:hover .prc-TreeView-TreeViewItemLevelLine-F-0-2{border-color:var(--borderColor-muted,#d1d9e0b3)}}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewDirectoryIcon-yP1oY{color:var(--treeViewItem-leadingVisual-iconColor-rest,#54aeff);display:grid}.prc-TreeView-TreeViewRootUlStyles-Mzrmj .prc-TreeView-TreeViewVisuallyHidden-1N8xK{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd{align-items:center;column-gap:.5rem;display:flex;height:2rem}@media (pointer:coarse){.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd{height:2.75rem}}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd:nth-of-type(5n+1){--tree-item-loading-width:67%}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd:nth-of-type(5n+2){--tree-item-loading-width:47%}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd:nth-of-type(5n+3){--tree-item-loading-width:73%}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd:nth-of-type(5n+4){--tree-item-loading-width:64%}.prc-TreeView-TreeViewSkeletonItemContainerStyle-lKqwd:nth-of-type(5n+5){--tree-item-loading-width:50%}.prc-TreeView-TreeItemSkeletonTextStyles-8VJ-g{width:var(--tree-item-loading-width,67%)}
2
+ /*# sourceMappingURL=TreeView-0fe09f34.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/TreeView/TreeView.module.css.js"],"names":[],"mappings":"AAAA,yCAGE,eAAgB,CADhB,QAAS,CADT,SAsPF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CAEb,wBACF,CAEA,8FACE,aACF,CAEA,mFAQE,+CAAsC,CACtC,mDAA2C,CAP3C,WAAY,CADZ,UASF,CAQA,qBACE,mFACE,wBACF,CAEA,yLAEE,+CACF,CACF,CAEA,mFAEE,8DAAuD,CADvD,YAEF,CAEA,oFAGE,UAAW,CAGX,WAAY,CACZ,eAAgB,CAHhB,SAAU,CAHV,iBAAkB,CAClB,SAAU,CAOV,kBAAsB,CAEtB,cAAe,CADf,kBAEF,CAGF,uDAEE,kBAAmB,CACnB,gBAAkB,CAFlB,YAAa,CAGb,WAyBF,CAvBE,wBANF,uDAOI,cAsBJ,CArBE,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAEA,yEACE,6BACF,CAGF,+CACE,wCACF","file":"TreeView-0fe09f34.css","sourcesContent":[".TreeViewRootUlStyles {\n padding: 0;\n margin: 0;\n list-style: none;\n\n /*\n * WARNING: This is a performance optimization.\n *\n * We define styles for the tree items at the root level of the tree\n * to avoid recomputing the styles for each item when the tree updates.\n * We're sacrificing maintainability for performance because TreeView\n * needs to be performant enough to handle large trees (thousands of items).\n *\n * This is intended to be a temporary solution until we can improve the\n * performance of our styling patterns.\n *\n * Do NOT copy this pattern without understanding the tradeoffs.\n */\n .TreeViewItem {\n outline: none;\n\n &:focus-visible > div,\n &:global(.focus-visible) > div {\n box-shadow: var(--boxShadow-thick) var(--fgColor-accent);\n\n @media (forced-colors: active) {\n outline: 2px solid HighlightText;\n /* stylelint-disable-next-line declaration-property-value-no-unknown */\n outline-offset: -2;\n }\n }\n\n &[data-has-leading-action] {\n --has-leading-action: 1;\n }\n }\n\n .TreeViewItemContainer {\n --level: 1;\n --toggle-width: 1rem;\n --min-item-height: 2rem;\n\n position: relative;\n display: grid;\n width: 100%;\n font-size: var(--text-body-size-medium);\n color: var(--fgColor-default);\n cursor: pointer;\n border-radius: var(--borderRadius-medium);\n grid-template-columns: var(--spacer-width) var(--leading-action-width) var(--toggle-width) 1fr;\n grid-template-areas: 'spacer leadingAction toggle content trailingAction';\n\n --leading-action-width: calc(var(--has-leading-action, 0) * 1.5rem);\n --spacer-width: calc(calc(var(--level) - 1) * (var(--toggle-width) / 2));\n\n &:hover {\n background-color: var(--control-transparent-bgColor-hover);\n\n @media (forced-colors: active) {\n outline: 2px solid transparent;\n outline-offset: -2px;\n }\n }\n\n @media (pointer: coarse) {\n --toggle-width: 1.5rem;\n --min-item-height: 2.75rem;\n }\n\n /*\n * NOTE: Uses descendant :has() - TreeViewItemSkeleton is nested inside\n * TreeViewItemContent > TreeViewItemContentText, not a direct child.\n * This is acceptable as the search is scoped to this element's subtree.\n */\n /* stylelint-disable-next-line selector-pseudo-class-disallowed-list -- scoped to CSS Module, audited (github/github-ui#17224) */\n &:has(.TreeViewItemSkeleton):hover {\n cursor: default;\n background-color: transparent;\n\n @media (forced-colors: active) {\n outline: none;\n }\n }\n }\n\n &:where([data-omit-spacer='true']) .TreeViewItemContainer {\n grid-template-columns: 0 0 0 1fr;\n }\n\n .TreeViewItem[aria-current='true'] > .TreeViewItemContainer {\n background-color: var(--control-transparent-bgColor-selected);\n\n /* Current item indicator */\n /* stylelint-disable-next-line selector-max-specificity */\n &::after {\n position: absolute;\n top: calc(50% - var(--base-size-12));\n left: calc(-1 * var(--base-size-8));\n width: 0.25rem;\n height: 1.5rem;\n content: '';\n\n /*\n * Use fgColor accent for consistency across all themes. Using the \"correct\" variable,\n * --bgColor-accent-emphasis, causes vrt failures for dark high contrast mode\n */\n /* stylelint-disable-next-line primer/colors */\n background-color: var(--fgColor-accent);\n border-radius: var(--borderRadius-medium);\n\n @media (forced-colors: active) {\n background-color: HighlightText;\n }\n }\n }\n\n .TreeViewItemToggle {\n display: flex;\n height: 100%;\n\n /* The toggle should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc(var(--min-item-height) / 2 - var(--base-size-12) / 2);\n color: var(--fgColor-muted);\n grid-area: toggle;\n justify-content: center;\n align-items: flex-start;\n }\n\n .TreeViewItemToggleHover:hover {\n background-color: var(--control-transparent-bgColor-hover);\n }\n\n .TreeViewItemToggleEnd {\n border-top-left-radius: var(--borderRadius-medium);\n border-bottom-left-radius: var(--borderRadius-medium);\n }\n\n .TreeViewItemContent {\n display: flex;\n height: 100%;\n padding: 0 var(--base-size-8);\n\n /* The dynamic top and bottom padding to maintain the minimum item height for single line items */\n /* stylelint-disable-next-line primer/spacing */\n padding-top: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n /* stylelint-disable-next-line primer/spacing */\n padding-bottom: calc((var(--min-item-height) - var(--custom-line-height, 1.3rem)) / 2);\n line-height: var(--custom-line-height, var(--text-body-lineHeight-medium, 1.4285));\n grid-area: content;\n gap: var(--stack-gap-condensed);\n }\n\n .TreeViewItemContentText {\n flex: 1 1 auto;\n width: 0;\n }\n\n &:where([data-truncate-text='true']) .TreeViewItemContentText {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n &:where([data-truncate-text='false']) .TreeViewItemContentText {\n /* stylelint-disable-next-line declaration-property-value-keyword-no-deprecated */\n word-break: break-word;\n }\n\n .TreeViewItemVisual {\n display: flex;\n\n /* The visual icons should appear vertically centered for single-line items, but remain at the top for items that wrap\n across more lines. */\n height: var(--custom-line-height, 1.3rem);\n color: var(--fgColor-muted);\n align-items: center;\n }\n\n .TreeViewItemLeadingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: leadingAction;\n\n & > button {\n flex-shrink: 1;\n }\n }\n\n .TreeViewItemTrailingAction {\n display: flex;\n color: var(--fgColor-muted);\n grid-area: trailingAction;\n }\n\n .TreeViewItemTrailingActionButton {\n flex-shrink: 1;\n }\n\n .TreeViewItemLevelLine {\n width: 100%;\n height: 100%;\n\n /*\n * On devices without hover, the nesting indicator lines\n * appear at all times.\n */\n border-color: var(--borderColor-muted);\n border-right: var(--borderWidth-thin) solid;\n }\n\n /*\n * On devices with :hover support, the nesting indicator lines\n * fade in when the user mouses over the entire component,\n * or when there's focus inside the component. This makes\n * sure the component remains simple when not in use.\n */\n @media (hover: hover) {\n .TreeViewItemLevelLine {\n border-color: transparent;\n }\n\n &:hover .TreeViewItemLevelLine,\n &:focus-within .TreeViewItemLevelLine {\n border-color: var(--borderColor-muted);\n }\n }\n\n .TreeViewDirectoryIcon {\n display: grid;\n color: var(--treeViewItem-leadingVisual-iconColor-rest);\n }\n\n .TreeViewVisuallyHidden {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n /* stylelint-disable-next-line primer/spacing */\n margin: -1px;\n overflow: hidden;\n /* stylelint-disable-next-line property-no-deprecated */\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n }\n}\n\n.TreeViewSkeletonItemContainerStyle {\n display: flex;\n align-items: center;\n column-gap: 0.5rem;\n height: 2rem;\n\n @media (pointer: coarse) {\n height: 2.75rem;\n }\n\n &:nth-of-type(5n + 1) {\n --tree-item-loading-width: 67%;\n }\n\n &:nth-of-type(5n + 2) {\n --tree-item-loading-width: 47%;\n }\n\n &:nth-of-type(5n + 3) {\n --tree-item-loading-width: 73%;\n }\n\n &:nth-of-type(5n + 4) {\n --tree-item-loading-width: 64%;\n }\n\n &:nth-of-type(5n + 5) {\n --tree-item-loading-width: 50%;\n }\n}\n\n.TreeItemSkeletonTextStyles {\n width: var(--tree-item-loading-width, 67%);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../src/TreeView/TreeView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EACV,MAAM,wBAAwB,CAAA;AAE/B,OAAO,KAA+B,MAAM,OAAO,CAAA;AAsBnD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAiDpD,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,YAAY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