@primer/react 0.0.0-20260601225305 → 0.0.0-20260601230721
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 +3 -38
- package/dist/ActionList/ActionList-2a35a40c.css +2 -0
- package/dist/ActionList/ActionList-2a35a40c.css.map +1 -0
- package/dist/ActionList/ActionList.module.css.js +2 -2
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +118 -125
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/List.d.ts +11 -2
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.js +0 -1
- package/dist/ActionList/Visuals.js +4 -6
- package/dist/ActionList/index.d.ts +24 -4
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +8 -2
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +2 -1
- package/dist/Autocomplete/AutocompleteInput.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteInput.js +2 -1
- package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
- package/dist/BranchName/BranchName.d.ts +4 -2
- package/dist/BranchName/BranchName.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +10 -4
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Button/{ButtonBase-311501b9.css → ButtonBase-713ecf3d.css} +2 -2
- package/dist/Button/{ButtonBase-311501b9.css.map → ButtonBase-713ecf3d.css.map} +1 -1
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +0 -1
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/Card/Card.d.ts +14 -2
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/index.d.ts +7 -2
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.d.ts +1 -6
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -6
- package/dist/KeybindingHint/components/Chord.d.ts +1 -2
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +1 -1
- package/dist/KeybindingHint/components/Key.js +10 -10
- package/dist/KeybindingHint/components/Sequence.d.ts +1 -2
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -2
- package/dist/KeybindingHint/key-names.d.ts +3 -4
- package/dist/KeybindingHint/key-names.d.ts.map +1 -1
- package/dist/KeybindingHint/key-names.js +14 -15
- package/dist/Link/Link.d.ts +1 -1
- package/dist/NavList/NavList.d.ts +8 -2
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +2 -0
- package/dist/Overlay/Overlay.d.ts +1 -0
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.d.ts +6 -24
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +2 -7
- package/dist/Text/{Text-d649cda5.css → Text-ca7603b7.css} +2 -2
- package/dist/Text/Text-ca7603b7.css.map +1 -0
- package/dist/Text/Text.d.ts +6 -4
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +14 -20
- package/dist/Text/Text.module.css.js +1 -1
- package/dist/ThemeProvider.d.ts +0 -6
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +21 -38
- package/dist/Timeline/Timeline-c5e15bf9.css +2 -0
- package/dist/Timeline/Timeline-c5e15bf9.css.map +1 -0
- package/dist/Timeline/Timeline.d.ts +1 -10
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +0 -42
- package/dist/Timeline/Timeline.module.css.js +2 -2
- package/dist/Timeline/index.d.ts +1 -1
- package/dist/Timeline/index.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +3 -3
- package/dist/TreeView/TreeView-0fe09f34.css +2 -0
- package/dist/TreeView/TreeView-0fe09f34.css.map +1 -0
- package/dist/TreeView/TreeView.d.ts +2 -11
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +92 -128
- package/dist/TreeView/TreeView.module.css.js +2 -2
- package/dist/hooks/useIsMacOS.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper-889df5d3.css +2 -0
- package/dist/internal/components/TextInputWrapper-889df5d3.css.map +1 -0
- package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper.js +24 -33
- package/dist/internal/components/TextInputWrapper.module.css.js +1 -1
- package/dist/utils/modern-polymorphic.d.ts +1 -1
- package/dist/utils/modern-polymorphic.d.ts.map +1 -1
- package/generated/components.json +9 -64
- package/package.json +1 -1
- package/dist/ActionList/ActionList-1940009e.css +0 -2
- package/dist/ActionList/ActionList-1940009e.css.map +0 -1
- package/dist/KeybindingHint/platform.d.ts +0 -22
- package/dist/KeybindingHint/platform.d.ts.map +0 -1
- package/dist/KeybindingHint/platform.js +0 -61
- package/dist/Text/Text-d649cda5.css.map +0 -1
- package/dist/Timeline/Timeline-0c88f21b.css +0 -2
- package/dist/Timeline/Timeline-0c88f21b.css.map +0 -1
- package/dist/TreeView/TreeView-1bf45a33.css +0 -2
- package/dist/TreeView/TreeView-1bf45a33.css.map +0 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +0 -2
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.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(
|
|
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 ($[
|
|
38
|
+
if ($[6] !== className) {
|
|
43
39
|
t1 = clsx(className, classes.Text);
|
|
44
|
-
$[
|
|
45
|
-
$[
|
|
40
|
+
$[6] = className;
|
|
41
|
+
$[7] = t1;
|
|
46
42
|
} else {
|
|
47
|
-
t1 = $[
|
|
43
|
+
t1 = $[7];
|
|
48
44
|
}
|
|
49
45
|
let t2;
|
|
50
|
-
if ($[
|
|
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
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
63
|
-
$[
|
|
64
|
-
$[
|
|
65
|
-
$[
|
|
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 = $[
|
|
62
|
+
t2 = $[14];
|
|
69
63
|
}
|
|
70
64
|
return t2;
|
|
71
65
|
}
|
package/dist/ThemeProvider.d.ts
CHANGED
|
@@ -10,12 +10,6 @@ export type ThemeProviderProps = {
|
|
|
10
10
|
dayScheme?: string;
|
|
11
11
|
nightScheme?: string;
|
|
12
12
|
preventSSRMismatch?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* When true, only provides theme context to descendants without rendering
|
|
15
|
-
* a wrapping `<div>` with `data-*` theme attributes.
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
|
-
contextOnly?: boolean;
|
|
19
13
|
};
|
|
20
14
|
export declare const ThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>>;
|
|
21
15
|
export declare function useTheme(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,eAAO,MAAM,gBAAgB,QAAQ,CAAA;AAKrC,MAAM,MAAM,KAAK,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAC,CAAA;AACxC,KAAK,SAAS,GAAG,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,CAAC,CAAC;oBAC1C,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;EAmH7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,UAG1F;AAqED,eAAe,aAAa,CAAA"}
|
package/dist/ThemeProvider.js
CHANGED
|
@@ -43,7 +43,7 @@ const getServerHandoff = id => {
|
|
|
43
43
|
const emptySubscribe = () => () => {};
|
|
44
44
|
const ThemeProvider = t0 => {
|
|
45
45
|
var _ref, _props$colorMode, _ref2, _props$dayScheme, _ref3, _props$nightScheme;
|
|
46
|
-
const $ = c(
|
|
46
|
+
const $ = c(42);
|
|
47
47
|
let children;
|
|
48
48
|
let props;
|
|
49
49
|
if ($[0] !== t0) {
|
|
@@ -154,9 +154,10 @@ const ThemeProvider = t0 => {
|
|
|
154
154
|
t6 = $[28];
|
|
155
155
|
}
|
|
156
156
|
const contextValue = t6;
|
|
157
|
-
|
|
157
|
+
const t7 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
|
|
158
|
+
let t8;
|
|
158
159
|
if ($[29] !== props.preventSSRMismatch || $[30] !== resolvedColorMode || $[31] !== uniqueDataId) {
|
|
159
|
-
|
|
160
|
+
t8 = props.preventSSRMismatch ? /*#__PURE__*/jsx("script", {
|
|
160
161
|
type: "application/json",
|
|
161
162
|
id: `__PRIMER_DATA_${uniqueDataId}__`,
|
|
162
163
|
dangerouslySetInnerHTML: {
|
|
@@ -168,56 +169,38 @@ const ThemeProvider = t0 => {
|
|
|
168
169
|
$[29] = props.preventSSRMismatch;
|
|
169
170
|
$[30] = resolvedColorMode;
|
|
170
171
|
$[31] = uniqueDataId;
|
|
171
|
-
$[32] =
|
|
172
|
+
$[32] = t8;
|
|
172
173
|
} else {
|
|
173
|
-
|
|
174
|
+
t8 = $[32];
|
|
174
175
|
}
|
|
175
|
-
const ssrHandoffScript = t7;
|
|
176
|
-
if (props.contextOnly) {
|
|
177
|
-
let t8;
|
|
178
|
-
if ($[33] !== children || $[34] !== contextValue || $[35] !== ssrHandoffScript) {
|
|
179
|
-
t8 = /*#__PURE__*/jsxs(ThemeContext.Provider, {
|
|
180
|
-
value: contextValue,
|
|
181
|
-
children: [children, ssrHandoffScript]
|
|
182
|
-
});
|
|
183
|
-
$[33] = children;
|
|
184
|
-
$[34] = contextValue;
|
|
185
|
-
$[35] = ssrHandoffScript;
|
|
186
|
-
$[36] = t8;
|
|
187
|
-
} else {
|
|
188
|
-
t8 = $[36];
|
|
189
|
-
}
|
|
190
|
-
return t8;
|
|
191
|
-
}
|
|
192
|
-
const t8 = colorMode === "auto" ? "auto" : colorScheme.includes("dark") ? "dark" : "light";
|
|
193
176
|
let t9;
|
|
194
|
-
if ($[
|
|
177
|
+
if ($[33] !== children || $[34] !== dayScheme || $[35] !== nightScheme || $[36] !== t7 || $[37] !== t8) {
|
|
195
178
|
t9 = /*#__PURE__*/jsxs("div", {
|
|
196
|
-
"data-color-mode":
|
|
179
|
+
"data-color-mode": t7,
|
|
197
180
|
"data-light-theme": dayScheme,
|
|
198
181
|
"data-dark-theme": nightScheme,
|
|
199
|
-
children: [children,
|
|
182
|
+
children: [children, t8]
|
|
200
183
|
});
|
|
201
|
-
$[
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
184
|
+
$[33] = children;
|
|
185
|
+
$[34] = dayScheme;
|
|
186
|
+
$[35] = nightScheme;
|
|
187
|
+
$[36] = t7;
|
|
188
|
+
$[37] = t8;
|
|
189
|
+
$[38] = t9;
|
|
207
190
|
} else {
|
|
208
|
-
t9 = $[
|
|
191
|
+
t9 = $[38];
|
|
209
192
|
}
|
|
210
193
|
let t10;
|
|
211
|
-
if ($[
|
|
194
|
+
if ($[39] !== contextValue || $[40] !== t9) {
|
|
212
195
|
t10 = /*#__PURE__*/jsx(ThemeContext.Provider, {
|
|
213
196
|
value: contextValue,
|
|
214
197
|
children: t9
|
|
215
198
|
});
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
199
|
+
$[39] = contextValue;
|
|
200
|
+
$[40] = t9;
|
|
201
|
+
$[41] = t10;
|
|
219
202
|
} else {
|
|
220
|
-
t10 = $[
|
|
203
|
+
t10 = $[41];
|
|
221
204
|
}
|
|
222
205
|
return t10;
|
|
223
206
|
};
|
|
@@ -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):where([data-condensed]):before{top:var(--base-size-12,.75rem)}: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-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-c5e15bf9.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Timeline/Timeline.module.css.js"],"names":[],"mappings":"AAAA,6BACE,YAAa,CACb,qBAuBF,CAnBI,6KACE,aAKF,CAHE,iNACE,8BACF,CAMF,0KACE,gBAKF,CAHE,8MACE,iCACF,CAKN,iCAEE,YAAa,CAEb,oCAAgC,CADhC,kCAA8B,CAF9B,iBAkCF,CA7BE,wCASE,mDAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAeF,CAZE,oEACE,uCACF,CAEA,2FAKE,4CAAwC,CACxC,QAAS,CAFT,kCAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAIJ,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-c5e15bf9.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 &:where([data-condensed])::before {\n top: var(--base-size-12);\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}\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"]}
|
|
@@ -13,8 +13,7 @@ type StyledTimelineItemProps = {
|
|
|
13
13
|
*/
|
|
14
14
|
export type TimelineItemsProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'div'>;
|
|
15
15
|
export type TimelineItemProps = StyledTimelineItemProps & React.ComponentPropsWithoutRef<'div'>;
|
|
16
|
-
export
|
|
17
|
-
export type TimelineBadgeVariant = (typeof TimelineBadgeVariants)[number];
|
|
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;
|
|
@@ -33,16 +32,8 @@ export type TimelineActionsProps = {
|
|
|
33
32
|
/** Class name for custom styling */
|
|
34
33
|
className?: string;
|
|
35
34
|
} & React.ComponentPropsWithoutRef<'div'>;
|
|
36
|
-
export type TimelineAvatarProps = {
|
|
37
|
-
/** Class name for custom styling */
|
|
38
|
-
className?: string;
|
|
39
|
-
} & React.ComponentPropsWithoutRef<'div'>;
|
|
40
35
|
declare const _default: React.ForwardRefExoticComponent<StyledTimelineProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>> & {
|
|
41
36
|
Item: React.ForwardRefExoticComponent<StyledTimelineItemProps & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
-
Avatar: React.ForwardRefExoticComponent<{
|
|
43
|
-
/** Class name for custom styling */
|
|
44
|
-
className?: string;
|
|
45
|
-
} & Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
37
|
Badge: {
|
|
47
38
|
({ className, variant, ...props }: TimelineBadgeProps): React.JSX.Element;
|
|
48
39
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,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,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAsBvF,KAAK,uBAAuB,GAAG;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAExE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAEhG,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAiB/F,
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/Timeline/Timeline.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,KAAK,mBAAmB,GAAG;IAAC,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,C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AK,CAAC,CAAA;;;;2CAnCc,kBAAkB;;;;QAWvE,oCAAoC;oBACxB,MAAM;;;QAUlB,oCAAoC;oBACxB,MAAM;;;QAUlB,oCAAoC;oBACxB,MAAM;;;AASpB,wBAME"}
|
|
@@ -289,50 +289,8 @@ const TimelineActions = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
|
289
289
|
return t2;
|
|
290
290
|
});
|
|
291
291
|
TimelineActions.displayName = 'Timeline.Actions';
|
|
292
|
-
const TimelineAvatar = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
293
|
-
const $ = c(9);
|
|
294
|
-
let className;
|
|
295
|
-
let props;
|
|
296
|
-
if ($[0] !== t0) {
|
|
297
|
-
({
|
|
298
|
-
className,
|
|
299
|
-
...props
|
|
300
|
-
} = t0);
|
|
301
|
-
$[0] = t0;
|
|
302
|
-
$[1] = className;
|
|
303
|
-
$[2] = props;
|
|
304
|
-
} else {
|
|
305
|
-
className = $[1];
|
|
306
|
-
props = $[2];
|
|
307
|
-
}
|
|
308
|
-
let t1;
|
|
309
|
-
if ($[3] !== className) {
|
|
310
|
-
t1 = clsx(className, classes.TimelineItemAvatar);
|
|
311
|
-
$[3] = className;
|
|
312
|
-
$[4] = t1;
|
|
313
|
-
} else {
|
|
314
|
-
t1 = $[4];
|
|
315
|
-
}
|
|
316
|
-
let t2;
|
|
317
|
-
if ($[5] !== forwardRef || $[6] !== props || $[7] !== t1) {
|
|
318
|
-
t2 = /*#__PURE__*/jsx("div", {
|
|
319
|
-
...props,
|
|
320
|
-
className: t1,
|
|
321
|
-
ref: forwardRef
|
|
322
|
-
});
|
|
323
|
-
$[5] = forwardRef;
|
|
324
|
-
$[6] = props;
|
|
325
|
-
$[7] = t1;
|
|
326
|
-
$[8] = t2;
|
|
327
|
-
} else {
|
|
328
|
-
t2 = $[8];
|
|
329
|
-
}
|
|
330
|
-
return t2;
|
|
331
|
-
});
|
|
332
|
-
TimelineAvatar.displayName = 'Timeline.Avatar';
|
|
333
292
|
var Timeline_default = Object.assign(Timeline, {
|
|
334
293
|
Item: TimelineItem,
|
|
335
|
-
Avatar: TimelineAvatar,
|
|
336
294
|
Badge: TimelineBadge,
|
|
337
295
|
Body: TimelineBody,
|
|
338
296
|
Break: TimelineBreak,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './Timeline-
|
|
1
|
+
import './Timeline-c5e15bf9.css';
|
|
2
2
|
|
|
3
|
-
var classes = {"Timeline":"prc-Timeline-Timeline-awSoC","TimelineItem":"prc-Timeline-TimelineItem-QwDVH","
|
|
3
|
+
var classes = {"Timeline":"prc-Timeline-Timeline-awSoC","TimelineItem":"prc-Timeline-TimelineItem-QwDVH","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
|
|
|
5
5
|
export { classes as default };
|
package/dist/Timeline/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default } from './Timeline';
|
|
2
|
-
export type { TimelineProps, TimelineItemsProps, TimelineItemProps,
|
|
2
|
+
export type { TimelineProps, TimelineItemsProps, TimelineItemProps, TimelineBadgeVariant, TimelineBadgeProps, TimelineBodyProps, TimelineBreakProps, TimelineActionsProps, } from './Timeline';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Timeline/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,YAAY,CAAA;AAClC,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,YAAY,CAAA"}
|
|
@@ -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;
|
|
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
|
|
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,
|
|
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,CArOE,0EACE,YAgBF,CAdE,kMAEE,mFAOF,CALE,8BAJF,kMAKI,+BAAgC,CAEhC,iBAEJ,CADE,CAGF,wGACE,sBACF,CAGF,mFACE,SAAU,CACV,mBAAoB,CACpB,sBAAuB,CAQvB,gDAAyC,CAFzC,oCAA6B,CAC7B,cAAe,CAJf,YAAa,CAEb,8CAAuC,CAKvC,wEAAyE,CADzE,6FAA8F,CAP9F,iBAAkB,CAElB,UAAW,CAQX,gEAAmE,CACnE,+DA8BF,CA5BE,8FACE,mEAMF,CAJE,8BAHF,8FAII,6BAA8B,CAC9B,mBAEJ,CADE,CAGF,wBA3BF,mFA4BI,qBAAsB,CACtB,yBAiBJ,CAhBE,CAQA,4IAEE,4BAA6B,CAD7B,cAMF,CAHE,8BAJF,4IAKI,YAEJ,CADE,CAIJ,kHACE,+BACF,CAEA,uIACE,sEAwBF,CApBE,kJAaE,8CAAuC,CACvC,gDAAyC,CARzC,UAAW,CADX,aAAc,CAFd,sCAAmC,CAFnC,iBAAkB,CAClB,0CAAoC,CAEpC,YAeF,CAHE,8BAhBF,kJAiBI,8BAEJ,CADE,CAIJ,gFAWE,sBAAuB,CAHvB,kCAA2B,CAP3B,YAAa,CAQb,gBAAiB,CAPjB,WAAY,CAQZ,sBAAuB,CAHvB,yEAKF,CAEA,2FACE,mEACF,CAEA,mFAEE,4DAAqD,CADrD,yDAEF,CAEA,iFACE,YAAa,CAWb,oCAA+B,CAD/B,iBAAkB,CATlB,WAAY,CAQZ,+EAAkF,CAPlF,kCAA6B,CAM7B,mFAAsF,CAFtF,gFAMF,CAEA,qFACE,aAAc,CACd,OACF,CAEA,sHACE,eAAgB,CAChB,sBAAuB,CACvB,kBACF,CAEA,uHAEE,qBACF,CAEA,gFAOE,kBAAmB,CADnB,kCAA2B,CAL3B,YAAa,CAIb,uCAGF,CAEA,uFAEE,kCAA2B,CAD3B,YAAa,CAEb,uBAKF,CAHE,mGACE,aACF,CAGF,wFAEE,kCAA2B,CAD3B,YAAa,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,7 +1,6 @@
|
|
|
1
1
|
import { type Icon } from '@primer/octicons-react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { FCWithSlotMarker } from '../utils/types';
|
|
4
|
-
import { type DistributiveOmit } from '../utils/modern-polymorphic';
|
|
5
4
|
export type TreeViewProps = {
|
|
6
5
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
7
6
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
@@ -18,7 +17,7 @@ export type TreeViewSecondaryActions = {
|
|
|
18
17
|
count?: number | string;
|
|
19
18
|
className?: string;
|
|
20
19
|
};
|
|
21
|
-
type
|
|
20
|
+
export type TreeViewItemProps = {
|
|
22
21
|
'aria-label'?: React.AriaAttributes['aria-label'];
|
|
23
22
|
'aria-labelledby'?: React.AriaAttributes['aria-labelledby'];
|
|
24
23
|
id: string;
|
|
@@ -32,9 +31,6 @@ type TreeViewItemBaseProps = {
|
|
|
32
31
|
className?: string;
|
|
33
32
|
secondaryActions?: TreeViewSecondaryActions[];
|
|
34
33
|
};
|
|
35
|
-
export type TreeViewItemProps<As extends React.ElementType = 'li'> = DistributiveOmit<React.ComponentPropsWithoutRef<React.ElementType extends As ? 'li' : As>, 'as' | 'onSelect'> & TreeViewItemBaseProps & {
|
|
36
|
-
as?: As;
|
|
37
|
-
};
|
|
38
34
|
export type SubTreeState = 'initial' | 'loading' | 'done' | 'error';
|
|
39
35
|
export type TreeViewSubTreeProps = {
|
|
40
36
|
children?: React.ReactNode;
|
|
@@ -66,11 +62,7 @@ export type TreeViewErrorDialogProps = {
|
|
|
66
62
|
onDismiss?: () => void;
|
|
67
63
|
};
|
|
68
64
|
export declare const TreeView: React.FC<TreeViewProps> & {
|
|
69
|
-
Item:
|
|
70
|
-
as?: As | undefined;
|
|
71
|
-
} & React.RefAttributes<unknown>) => React.ReactNode) & {
|
|
72
|
-
displayName: string;
|
|
73
|
-
};
|
|
65
|
+
Item: React.ForwardRefExoticComponent<TreeViewItemProps & React.RefAttributes<HTMLElement>>;
|
|
74
66
|
SubTree: FCWithSlotMarker<TreeViewSubTreeProps>;
|
|
75
67
|
LeadingAction: React.FC<TreeViewVisualProps>;
|
|
76
68
|
LeadingVisual: React.FC<TreeViewVisualProps>;
|
|
@@ -78,5 +70,4 @@ export declare const TreeView: React.FC<TreeViewProps> & {
|
|
|
78
70
|
DirectoryIcon: () => React.JSX.Element;
|
|
79
71
|
ErrorDialog: React.FC<TreeViewErrorDialogProps>;
|
|
80
72
|
};
|
|
81
|
-
export {};
|
|
82
73
|
//# sourceMappingURL=TreeView.d.ts.map
|
|
@@ -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;
|
|
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;AA4CpD,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,KAAK,CAAC,c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