@primer/react 0.0.0-20260313192901 → 0.0.0-20260313194214
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 +2 -2
- package/dist/ActionList/LinkItem.d.ts +6 -3
- package/dist/ActionList/LinkItem.d.ts.map +1 -1
- package/dist/ActionList/LinkItem.js +42 -87
- package/dist/ActionList/index.d.ts +25 -1
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +23 -8
- package/dist/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.js +27 -65
- package/dist/NavList/NavList.d.ts +20 -3
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +50 -124
- package/dist/Timeline/Timeline-19bef8c5.css +2 -0
- package/dist/Timeline/Timeline-19bef8c5.css.map +1 -0
- package/dist/Timeline/Timeline.d.ts +1 -1
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +14 -27
- package/dist/Timeline/Timeline.module.css.js +1 -1
- package/generated/components.json +2 -10
- package/package.json +1 -1
- package/dist/Timeline/Timeline-4d67684a.css +0 -2
- package/dist/Timeline/Timeline-4d67684a.css.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @primer/react
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-20260313194214
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#7658](https://github.com/primer/react/pull/7658) [`2da6602`](https://github.com/primer/react/commit/2da66024e332ac0510815aa304ecc13b6d07ea75) Thanks [@hussam-i-am](https://github.com/hussam-i-am)! - fix(polymorphic): Improve prop passthrough for ActionList.LinkItem and Breadcrumbs.Item
|
|
8
8
|
|
|
9
9
|
### Patch Changes
|
|
10
10
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type {
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { WithSlotMarker } from '../utils/types/Slots';
|
|
3
3
|
import type { ActionListItemProps } from './shared';
|
|
4
4
|
type LinkProps = {
|
|
5
5
|
download?: string;
|
|
@@ -14,6 +14,9 @@ type LinkProps = {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
16
|
export type ActionListLinkItemProps = Pick<ActionListItemProps, 'active' | 'children' | 'inactiveText' | 'variant' | 'size'> & LinkProps;
|
|
17
|
-
|
|
17
|
+
declare const LinkItemComponent: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & Pick<ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & LinkProps ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
18
|
+
as?: As | undefined;
|
|
19
|
+
} & React.RefAttributes<unknown>) => React.ReactNode;
|
|
20
|
+
export declare const LinkItem: WithSlotMarker<typeof LinkItemComponent>;
|
|
18
21
|
export {};
|
|
19
22
|
//# sourceMappingURL=LinkItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkItem.d.ts","sourceRoot":"","sources":["../../src/ActionList/LinkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"LinkItem.d.ts","sourceRoot":"","sources":["../../src/ActionList/LinkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAGxD,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AAIjD,KAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,gBAAgB,CAAC,CAAA;IAChF,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAGD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,mBAAmB,EACnB,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAC5D,GACC,SAAS,CAAA;AAIX,QAAA,MAAM,iBAAiB,GACpB,EAAE,SAAS,KAAK,CAAC,WAAW;;oDAqC9B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,cAAc,CAAC,OAAO,iBAAiB,CAG5D,CAAA"}
|
|
@@ -1,62 +1,46 @@
|
|
|
1
|
-
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import React from 'react';
|
|
3
1
|
import { Item } from './Item.js';
|
|
2
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
4
3
|
import { jsx } from 'react/jsx-runtime';
|
|
5
4
|
import Link from '../Link/Link.js';
|
|
6
5
|
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
$[2] = active;
|
|
29
|
-
$[3] = className;
|
|
30
|
-
$[4] = inactiveText;
|
|
31
|
-
$[5] = props;
|
|
32
|
-
$[6] = size;
|
|
33
|
-
$[7] = variant;
|
|
34
|
-
} else {
|
|
35
|
-
Component = $[1];
|
|
36
|
-
active = $[2];
|
|
37
|
-
className = $[3];
|
|
38
|
-
inactiveText = $[4];
|
|
39
|
-
props = $[5];
|
|
40
|
-
size = $[6];
|
|
41
|
-
variant = $[7];
|
|
42
|
-
}
|
|
43
|
-
const t1 = inactiveText ? true : undefined;
|
|
44
|
-
let t2;
|
|
45
|
-
if ($[8] !== Component || $[9] !== forwardedRef || $[10] !== inactiveText || $[11] !== props) {
|
|
46
|
-
t2 = t3 => {
|
|
47
|
-
const {
|
|
48
|
-
children,
|
|
49
|
-
onClick,
|
|
50
|
-
...rest
|
|
51
|
-
} = t3;
|
|
6
|
+
const LinkItemComponent = fixedForwardRef(({
|
|
7
|
+
active,
|
|
8
|
+
inactiveText,
|
|
9
|
+
variant,
|
|
10
|
+
size,
|
|
11
|
+
as: Component,
|
|
12
|
+
className,
|
|
13
|
+
...props
|
|
14
|
+
}, forwardedRef) => {
|
|
15
|
+
return /*#__PURE__*/jsx(Item, {
|
|
16
|
+
className: className,
|
|
17
|
+
active: active,
|
|
18
|
+
inactiveText: inactiveText,
|
|
19
|
+
"data-inactive": inactiveText ? true : undefined,
|
|
20
|
+
variant: variant,
|
|
21
|
+
size: size,
|
|
22
|
+
_PrivateItemWrapper: ({
|
|
23
|
+
children,
|
|
24
|
+
onClick,
|
|
25
|
+
...rest
|
|
26
|
+
}) => {
|
|
52
27
|
const clickHandler = event => {
|
|
53
28
|
onClick && onClick(event);
|
|
54
29
|
props.onClick && props.onClick(event);
|
|
55
30
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
31
|
+
if (inactiveText) {
|
|
32
|
+
return /*#__PURE__*/jsx("span", {
|
|
33
|
+
...rest,
|
|
34
|
+
children: children
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// Type safety for the polymorphic `as` prop is enforced at the
|
|
39
|
+
// LinkItem boundary via fixedForwardRef. Internally we widen
|
|
40
|
+
// Link's type so TypeScript doesn't re-check the generic
|
|
41
|
+
// constraint across two polymorphic layers.
|
|
42
|
+
const InternalLink = Link;
|
|
43
|
+
return /*#__PURE__*/jsx(InternalLink, {
|
|
60
44
|
as: Component,
|
|
61
45
|
...rest,
|
|
62
46
|
...props,
|
|
@@ -64,42 +48,13 @@ const LinkItem = /*#__PURE__*/React.forwardRef((t0, forwardedRef) => {
|
|
|
64
48
|
ref: forwardedRef,
|
|
65
49
|
children: children
|
|
66
50
|
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
t2 = $[12];
|
|
75
|
-
}
|
|
76
|
-
let t3;
|
|
77
|
-
if ($[13] !== active || $[14] !== className || $[15] !== inactiveText || $[16] !== props.children || $[17] !== size || $[18] !== t1 || $[19] !== t2 || $[20] !== variant) {
|
|
78
|
-
t3 = /*#__PURE__*/jsx(Item, {
|
|
79
|
-
className: className,
|
|
80
|
-
active: active,
|
|
81
|
-
inactiveText: inactiveText,
|
|
82
|
-
"data-inactive": t1,
|
|
83
|
-
variant: variant,
|
|
84
|
-
size: size,
|
|
85
|
-
_PrivateItemWrapper: t2,
|
|
86
|
-
children: props.children
|
|
87
|
-
});
|
|
88
|
-
$[13] = active;
|
|
89
|
-
$[14] = className;
|
|
90
|
-
$[15] = inactiveText;
|
|
91
|
-
$[16] = props.children;
|
|
92
|
-
$[17] = size;
|
|
93
|
-
$[18] = t1;
|
|
94
|
-
$[19] = t2;
|
|
95
|
-
$[20] = variant;
|
|
96
|
-
$[21] = t3;
|
|
97
|
-
} else {
|
|
98
|
-
t3 = $[21];
|
|
99
|
-
}
|
|
100
|
-
return t3;
|
|
51
|
+
},
|
|
52
|
+
children: props.children
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
const LinkItem = Object.assign(LinkItemComponent, {
|
|
56
|
+
displayName: 'ActionList.LinkItem',
|
|
57
|
+
__SLOT__: Symbol('ActionList.LinkItem')
|
|
101
58
|
});
|
|
102
|
-
LinkItem.displayName = 'ActionList.LinkItem';
|
|
103
|
-
LinkItem.__SLOT__ = Symbol('ActionList.LinkItem');
|
|
104
59
|
|
|
105
60
|
export { LinkItem };
|
|
@@ -84,7 +84,31 @@ export declare const ActionList: (<As extends React.ElementType = "ul">(props: (
|
|
|
84
84
|
__SLOT__: symbol;
|
|
85
85
|
};
|
|
86
86
|
/** A `Item` that renders a full-size anchor inside ListItem */
|
|
87
|
-
LinkItem: import("../utils/
|
|
87
|
+
LinkItem: import("../utils/types").WithSlotMarker<(<As extends React.ElementType = "a">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
|
|
88
|
+
download?: string;
|
|
89
|
+
href?: string;
|
|
90
|
+
hrefLang?: string;
|
|
91
|
+
media?: string;
|
|
92
|
+
ping?: string;
|
|
93
|
+
rel?: string;
|
|
94
|
+
target?: string;
|
|
95
|
+
type?: string;
|
|
96
|
+
referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
|
|
97
|
+
className?: string;
|
|
98
|
+
} extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "a" : As> & Pick<import("./shared").ActionListItemProps, "children" | "size" | "active" | "variant" | "inactiveText"> & {
|
|
99
|
+
download?: string;
|
|
100
|
+
href?: string;
|
|
101
|
+
hrefLang?: string;
|
|
102
|
+
media?: string;
|
|
103
|
+
ping?: string;
|
|
104
|
+
rel?: string;
|
|
105
|
+
target?: string;
|
|
106
|
+
type?: string;
|
|
107
|
+
referrerPolicy?: React.AnchorHTMLAttributes<HTMLAnchorElement>["referrerPolicy"];
|
|
108
|
+
className?: string;
|
|
109
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
110
|
+
as?: As | undefined;
|
|
111
|
+
} & import("react").RefAttributes<unknown>) => React.ReactNode)>;
|
|
88
112
|
/** Visually separates `Item`s or `Group`s in an `ActionList`. */
|
|
89
113
|
Divider: import("../utils/types").FCWithSlotMarker<import("react").PropsWithChildren<import("./Divider").ActionListDividerProps>>;
|
|
90
114
|
/** Secondary text which provides additional information about an `Item`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ActionList/index.ts"],"names":[],"mappings":"AAUA,YAAY,EAAC,eAAe,EAAC,MAAM,UAAU,CAAA;AAC7C,YAAY,EAAC,oBAAoB,EAAE,2BAA2B,EAAC,MAAM,SAAS,CAAA;AAC9E,YAAY,EAAC,mBAAmB,EAAC,MAAM,UAAU,CAAA;AACjD,YAAY,EAAC,uBAAuB,EAAC,MAAM,YAAY,CAAA;AACvD,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,0BAA0B,EAAC,MAAM,eAAe,CAAA;AAC7D,YAAY,EAAC,4BAA4B,EAAE,6BAA6B,EAAC,MAAM,WAAW,CAAA;AAC1F,YAAY,EAAC,sBAAsB,EAAC,MAAM,WAAW,CAAA;AACrD,YAAY,EAAC,6BAA6B,EAAC,MAAM,kBAAkB,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;IACrB,mDAAmD;;IAGnD,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGzC,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;IAG/D,iEAAiE;;IAGjE,4EAA4E;;IAG5E,uDAAuD;;IAGvD,sDAAsD;;IAGtD,mCAAmC;;IAGnC,qCAAqC;;IAGrC,uBAAuB;;CAEvB,CAAA"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { To } from 'history';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { type PolymorphicProps } from '../utils/modern-polymorphic';
|
|
3
4
|
export type BreadcrumbsProps = React.PropsWithChildren<{
|
|
4
5
|
/**
|
|
5
6
|
* Optional class name for the breadcrumbs container.
|
|
@@ -27,24 +28,38 @@ declare function Breadcrumbs({ className, children, style, overflow, variant }:
|
|
|
27
28
|
declare namespace Breadcrumbs {
|
|
28
29
|
var displayName: string;
|
|
29
30
|
}
|
|
30
|
-
type
|
|
31
|
-
type StyledBreadcrumbsItemProps<As extends React.ElementType> = {
|
|
32
|
-
as?: As;
|
|
31
|
+
type StyledBreadcrumbsItemProps<As extends React.ElementType = 'a'> = PolymorphicProps<As, 'a', {
|
|
33
32
|
to?: To;
|
|
34
33
|
selected?: boolean;
|
|
35
|
-
|
|
36
|
-
style?: React.CSSProperties;
|
|
37
|
-
} & DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? 'a' : As>, 'as'>;
|
|
34
|
+
}>;
|
|
38
35
|
export type BreadcrumbsItemProps<As extends React.ElementType = 'a'> = StyledBreadcrumbsItemProps<As>;
|
|
39
36
|
declare const _default: typeof Breadcrumbs & {
|
|
40
|
-
Item:
|
|
37
|
+
Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
38
|
+
to?: To;
|
|
39
|
+
selected?: boolean;
|
|
40
|
+
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
41
|
+
to?: To;
|
|
42
|
+
selected?: boolean;
|
|
43
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
44
|
+
as?: As | undefined;
|
|
45
|
+
} & React.RefAttributes<any>) => React.ReactNode) & {
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
41
48
|
};
|
|
42
49
|
export default _default;
|
|
43
50
|
/**
|
|
44
51
|
* @deprecated Use the `Breadcrumbs` component instead (i.e. `<Breadcrumb>` → `<Breadcrumbs>`)
|
|
45
52
|
*/
|
|
46
53
|
export declare const Breadcrumb: typeof Breadcrumbs & {
|
|
47
|
-
Item:
|
|
54
|
+
Item: <As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
55
|
+
to?: To;
|
|
56
|
+
selected?: boolean;
|
|
57
|
+
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
58
|
+
to?: To;
|
|
59
|
+
selected?: boolean;
|
|
60
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
61
|
+
as?: As | undefined;
|
|
62
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
48
63
|
};
|
|
49
64
|
/**
|
|
50
65
|
* @deprecated Use the `BreadcrumbsProps` type instead
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/Breadcrumbs/Breadcrumbs.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,EAAE,EAAC,MAAM,SAAS,CAAA;AAC/B,OAAO,KAA6E,MAAM,OAAO,CAAA;AAWjG,OAAO,EAAC,KAAK,gBAAgB,EAAkB,MAAM,6BAA6B,CAAA;AAElF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,gBAAgB,CAAA;IAC7C;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AA8GF,iBAAS,WAAW,CAAC,EAAC,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAiB,EAAE,OAAkB,EAAC,EAAE,gBAAgB,qBA+MzG;kBA/MQ,WAAW;;;AA2NpB,KAAK,0BAA0B,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,gBAAgB,CACpF,EAAE,EACF,GAAG,EACH;IACE,EAAE,CAAC,EAAE,EAAE,CAAA;IACP,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CACF,CAAA;AAsBD,MAAM,MAAM,oBAAoB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,0BAA0B,CAAC,EAAE,CAAC,CAAA;;YAnBlG,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;;;;AA2BtB,wBAAiF;AAEjF;;GAEG;AACH,eAAO,MAAM,UAAU;WA3BpB,EAAE,SAAS,KAAK,CAAC,WAAW;aANtB,EAAE;mBACI,OAAO;;aADb,EAAE;mBACI,OAAO;;;;CAgCuD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,CAAA;AAE9C;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAA"}
|
|
@@ -8,6 +8,7 @@ import { KebabHorizontalIcon } from '@primer/octicons-react';
|
|
|
8
8
|
import { useResizeObserver } from '../hooks/useResizeObserver.js';
|
|
9
9
|
import { useOnEscapePress } from '../hooks/useOnEscapePress.js';
|
|
10
10
|
import { useOnOutsideClick } from '../hooks/useOnOutsideClick.js';
|
|
11
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
11
12
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
12
13
|
import { useFeatureFlag } from '../FeatureFlags/useFeatureFlag.js';
|
|
13
14
|
import Details from '../Details/Details.js';
|
|
@@ -399,69 +400,26 @@ const ItemSeparator = () => {
|
|
|
399
400
|
}
|
|
400
401
|
return t0;
|
|
401
402
|
};
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
...rest
|
|
417
|
-
} = props);
|
|
418
|
-
$[0] = props;
|
|
419
|
-
$[1] = className;
|
|
420
|
-
$[2] = rest;
|
|
421
|
-
$[3] = selected;
|
|
422
|
-
$[4] = t0;
|
|
423
|
-
} else {
|
|
424
|
-
className = $[1];
|
|
425
|
-
rest = $[2];
|
|
426
|
-
selected = $[3];
|
|
427
|
-
t0 = $[4];
|
|
428
|
-
}
|
|
429
|
-
const Component = t0 === undefined ? "a" : t0;
|
|
430
|
-
const t1 = selected && "selected";
|
|
431
|
-
let t2;
|
|
432
|
-
if ($[5] !== className || $[6] !== t1) {
|
|
433
|
-
t2 = clsx(className, classes.Item, t1);
|
|
434
|
-
$[5] = className;
|
|
435
|
-
$[6] = t1;
|
|
436
|
-
$[7] = t2;
|
|
437
|
-
} else {
|
|
438
|
-
t2 = $[7];
|
|
439
|
-
}
|
|
440
|
-
const t3 = selected ? "page" : undefined;
|
|
441
|
-
let t4;
|
|
442
|
-
if ($[8] !== Component || $[9] !== ref || $[10] !== rest || $[11] !== t2 || $[12] !== t3) {
|
|
443
|
-
t4 = /*#__PURE__*/jsx(Component, {
|
|
444
|
-
className: t2,
|
|
445
|
-
"aria-current": t3,
|
|
446
|
-
ref: ref,
|
|
447
|
-
...rest
|
|
448
|
-
});
|
|
449
|
-
$[8] = Component;
|
|
450
|
-
$[9] = ref;
|
|
451
|
-
$[10] = rest;
|
|
452
|
-
$[11] = t2;
|
|
453
|
-
$[12] = t3;
|
|
454
|
-
$[13] = t4;
|
|
455
|
-
} else {
|
|
456
|
-
t4 = $[13];
|
|
457
|
-
}
|
|
458
|
-
return t4;
|
|
459
|
-
}
|
|
460
|
-
BreadcrumbsItemComponent.displayName = 'Breadcrumbs.Item';
|
|
461
|
-
const BreadcrumbsItem = /*#__PURE__*/React.forwardRef(BreadcrumbsItemComponent);
|
|
403
|
+
const BreadcrumbsItem = fixedForwardRef((props, ref) => {
|
|
404
|
+
const {
|
|
405
|
+
as: Component = 'a',
|
|
406
|
+
selected,
|
|
407
|
+
className,
|
|
408
|
+
...rest
|
|
409
|
+
} = props;
|
|
410
|
+
return /*#__PURE__*/jsx(Component, {
|
|
411
|
+
className: clsx(className, classes.Item, selected && 'selected'),
|
|
412
|
+
"aria-current": selected ? 'page' : undefined,
|
|
413
|
+
ref: ref,
|
|
414
|
+
...rest
|
|
415
|
+
});
|
|
416
|
+
});
|
|
462
417
|
Breadcrumbs.displayName = 'Breadcrumbs';
|
|
418
|
+
const BreadcrumbsItemWithDisplayName = Object.assign(BreadcrumbsItem, {
|
|
419
|
+
displayName: 'Breadcrumbs.Item'
|
|
420
|
+
});
|
|
463
421
|
var Breadcrumbs_default = Object.assign(Breadcrumbs, {
|
|
464
|
-
Item:
|
|
422
|
+
Item: BreadcrumbsItemWithDisplayName
|
|
465
423
|
});
|
|
466
424
|
|
|
467
425
|
/**
|
|
@@ -479,11 +437,15 @@ const Breadcrumb = Object.assign(Breadcrumbs, {
|
|
|
479
437
|
* @deprecated Use the `BreadcrumbsItemProps` type instead
|
|
480
438
|
*/
|
|
481
439
|
function _temp(item, index) {
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
440
|
+
const {
|
|
441
|
+
children,
|
|
442
|
+
selected,
|
|
443
|
+
as: Component,
|
|
444
|
+
...itemProps
|
|
445
|
+
} = item.props;
|
|
485
446
|
return /*#__PURE__*/jsx(ActionList.LinkItem, {
|
|
486
|
-
|
|
447
|
+
as: Component,
|
|
448
|
+
...itemProps,
|
|
487
449
|
"aria-current": selected ? "page" : undefined,
|
|
488
450
|
children: children
|
|
489
451
|
}, index);
|
|
@@ -2,16 +2,17 @@ import { type Icon } from '@primer/octicons-react';
|
|
|
2
2
|
import type { ForwardRefComponent as PolymorphicForwardRefComponent } from '../utils/polymorphic';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import type { ActionListTrailingActionProps, ActionListDividerProps, ActionListLeadingVisualProps, ActionListTrailingVisualProps, ActionListGroupHeadingProps } from '../ActionList';
|
|
5
|
+
import { type PolymorphicProps } from '../utils/modern-polymorphic';
|
|
5
6
|
export type NavListProps = {
|
|
6
7
|
children: React.ReactNode;
|
|
7
8
|
} & React.ComponentProps<'nav'>;
|
|
8
|
-
export type NavListItemProps = {
|
|
9
|
+
export type NavListItemProps<As extends React.ElementType = 'a'> = PolymorphicProps<As, 'a', {
|
|
9
10
|
children: React.ReactNode;
|
|
10
11
|
defaultOpen?: boolean;
|
|
11
12
|
href?: string;
|
|
12
13
|
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | boolean;
|
|
13
14
|
inactiveText?: string;
|
|
14
|
-
}
|
|
15
|
+
}>;
|
|
15
16
|
export type NavListSubNavProps = {
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
};
|
|
@@ -40,7 +41,23 @@ export declare const GroupExpand: React.ForwardRefExoticComponent<NavListGroupEx
|
|
|
40
41
|
export type NavListGroupHeadingProps = ActionListGroupHeadingProps;
|
|
41
42
|
export declare const NavList: React.ForwardRefExoticComponent<Omit<NavListProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
42
43
|
Description: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("..").ActionListDescriptionProps>>;
|
|
43
|
-
Item:
|
|
44
|
+
Item: (<As extends React.ElementType = "a">(props: (React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
45
|
+
children: React.ReactNode;
|
|
46
|
+
defaultOpen?: boolean;
|
|
47
|
+
href?: string;
|
|
48
|
+
'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
|
|
49
|
+
inactiveText?: string;
|
|
50
|
+
} extends infer T ? T extends React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As> & {
|
|
51
|
+
children: React.ReactNode;
|
|
52
|
+
defaultOpen?: boolean;
|
|
53
|
+
href?: string;
|
|
54
|
+
'aria-current'?: "page" | "step" | "location" | "date" | "time" | "true" | "false" | boolean;
|
|
55
|
+
inactiveText?: string;
|
|
56
|
+
} ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
|
|
57
|
+
as?: As | undefined;
|
|
58
|
+
} & React.RefAttributes<unknown>) => React.ReactNode) & {
|
|
59
|
+
displayName: string;
|
|
60
|
+
};
|
|
44
61
|
SubNav: PolymorphicForwardRefComponent<"ul", NavListSubNavProps>;
|
|
45
62
|
LeadingVisual: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("../ActionList/Visuals").VisualProps>>;
|
|
46
63
|
TrailingVisual: import("../utils/types").FCWithSlotMarker<React.PropsWithChildren<import("../ActionList/Visuals").VisualProps>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAuB,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/NavList/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4B,KAAK,IAAI,EAAC,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAK,EAAC,mBAAmB,IAAI,8BAA8B,EAAC,MAAM,sBAAsB,CAAA;AAC/F,OAAO,KAAuB,MAAM,OAAO,CAAA;AAE3C,OAAO,KAAK,EACV,6BAA6B,EAC7B,sBAAsB,EACtB,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC5B,MAAM,eAAe,CAAA;AAUtB,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,6BAA6B,CAAA;AAKlF,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAA;AAqB/B,MAAM,MAAM,gBAAgB,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI,gBAAgB,CACjF,EAAE,EACF,GAAG,EACH;IACE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;IAC5F,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CACF,CAAA;AA8HD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAkCD,MAAM,MAAM,yBAAyB,GAAG,4BAA4B,CAAA;AASpE,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AAStE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,CAAA;AAQxD,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,CAAA;AAStE,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,GAAG;IACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAqBD,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,cAAc,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC9B,aAAa,CAAC,EAAE,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,6BAA6B,CAAA;IAC9C,0BAA0B,CAAC,EAAE,MAAM,CAAA;CACpC,GAAG,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAA;AAEtC,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,SAAS,EAAE,CAAA;IAClB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAA;CAClD,CAAA;AAED,eAAO,MAAM,WAAW,mGAgFvB,CAAA;AAKD,MAAM,MAAM,wBAAwB,GAAG,2BAA2B,CAAA;AAqBlE,eAAO,MAAM,OAAO;;YAnVjB,EAAE,SAAS,KAAK,CAAC,WAAW;kBATjB,KAAK,CAAC,SAAS;sBACX,OAAO;eACd,MAAM;yBACI,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO;uBAC7E,MAAM;;kBAJX,KAAK,CAAC,SAAS;sBACX,OAAO;eACd,MAAM;yBACI,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO;uBAC7E,MAAM;;;;;;;;;;;;;;CAmWvB,CAAA"}
|
package/dist/NavList/NavList.js
CHANGED
|
@@ -11,6 +11,7 @@ import classes from '../ActionList/ActionList.module.css.js';
|
|
|
11
11
|
import navListClasses from './NavList.module.css.js';
|
|
12
12
|
import { flushSync } from 'react-dom';
|
|
13
13
|
import { isSlot } from '../utils/is-slot.js';
|
|
14
|
+
import { fixedForwardRef } from '../utils/modern-polymorphic.js';
|
|
14
15
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
15
16
|
|
|
16
17
|
const Root = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
@@ -72,128 +73,59 @@ Root.displayName = 'NavList';
|
|
|
72
73
|
// ----------------------------------------------------------------------------
|
|
73
74
|
// NavList.Item
|
|
74
75
|
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
({
|
|
83
|
-
"aria-current": ariaCurrent,
|
|
84
|
-
children,
|
|
85
|
-
defaultOpen,
|
|
86
|
-
...props
|
|
87
|
-
} = t0);
|
|
88
|
-
$[0] = t0;
|
|
89
|
-
$[1] = ariaCurrent;
|
|
90
|
-
$[2] = children;
|
|
91
|
-
$[3] = defaultOpen;
|
|
92
|
-
$[4] = props;
|
|
93
|
-
} else {
|
|
94
|
-
ariaCurrent = $[1];
|
|
95
|
-
children = $[2];
|
|
96
|
-
defaultOpen = $[3];
|
|
97
|
-
props = $[4];
|
|
98
|
-
}
|
|
76
|
+
const ItemComponent = fixedForwardRef(({
|
|
77
|
+
'aria-current': ariaCurrent,
|
|
78
|
+
children,
|
|
79
|
+
defaultOpen,
|
|
80
|
+
as: Component,
|
|
81
|
+
...props
|
|
82
|
+
}, ref) => {
|
|
99
83
|
const {
|
|
100
84
|
depth
|
|
101
85
|
} = React.useContext(SubNavContext);
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
$[7] = childrenWithoutSubNavOrTrailingAction;
|
|
123
|
-
$[8] = subNav;
|
|
124
|
-
$[9] = t1;
|
|
125
|
-
} else {
|
|
126
|
-
childrenWithoutSubNavOrTrailingAction = $[7];
|
|
127
|
-
subNav = $[8];
|
|
128
|
-
t1 = $[9];
|
|
129
|
-
}
|
|
130
|
-
if (t1) {
|
|
131
|
-
let t2;
|
|
132
|
-
if ($[12] !== depth) {
|
|
133
|
-
t2 = {
|
|
134
|
-
"--subitem-depth": depth
|
|
135
|
-
};
|
|
136
|
-
$[12] = depth;
|
|
137
|
-
$[13] = t2;
|
|
138
|
-
} else {
|
|
139
|
-
t2 = $[13];
|
|
140
|
-
}
|
|
141
|
-
const t3 = t2;
|
|
142
|
-
let t4;
|
|
143
|
-
if ($[14] !== childrenWithoutSubNavOrTrailingAction || $[15] !== defaultOpen || $[16] !== depth || $[17] !== subNav || $[18] !== t3) {
|
|
144
|
-
t4 = /*#__PURE__*/jsx(ItemWithSubNav, {
|
|
145
|
-
subNav: subNav,
|
|
146
|
-
depth: depth,
|
|
147
|
-
defaultOpen: defaultOpen,
|
|
148
|
-
style: t3,
|
|
149
|
-
children: childrenWithoutSubNavOrTrailingAction
|
|
150
|
-
});
|
|
151
|
-
$[14] = childrenWithoutSubNavOrTrailingAction;
|
|
152
|
-
$[15] = defaultOpen;
|
|
153
|
-
$[16] = depth;
|
|
154
|
-
$[17] = subNav;
|
|
155
|
-
$[18] = t3;
|
|
156
|
-
$[19] = t4;
|
|
157
|
-
} else {
|
|
158
|
-
t4 = $[19];
|
|
159
|
-
}
|
|
160
|
-
return t4;
|
|
161
|
-
}
|
|
162
|
-
const t2 = Boolean(ariaCurrent) && ariaCurrent !== "false";
|
|
163
|
-
let t3;
|
|
164
|
-
if ($[20] !== depth) {
|
|
165
|
-
t3 = {
|
|
166
|
-
"--subitem-depth": depth
|
|
167
|
-
};
|
|
168
|
-
$[20] = depth;
|
|
169
|
-
$[21] = t3;
|
|
170
|
-
} else {
|
|
171
|
-
t3 = $[21];
|
|
172
|
-
}
|
|
173
|
-
const t4 = t3;
|
|
174
|
-
let t5;
|
|
175
|
-
if ($[22] !== ariaCurrent || $[23] !== children || $[24] !== props || $[25] !== ref || $[26] !== t2 || $[27] !== t4) {
|
|
176
|
-
t5 = /*#__PURE__*/jsx(ActionList.LinkItem, {
|
|
177
|
-
ref: ref,
|
|
178
|
-
"aria-current": ariaCurrent,
|
|
179
|
-
active: t2,
|
|
180
|
-
style: t4,
|
|
181
|
-
...props,
|
|
182
|
-
children: children
|
|
86
|
+
|
|
87
|
+
// Get SubNav from children
|
|
88
|
+
const subNav = React.Children.toArray(children).find(child => /*#__PURE__*/isValidElement(child) && (child.type === SubNav || isSlot(child, SubNav)));
|
|
89
|
+
|
|
90
|
+
// Get children without SubNav or TrailingAction
|
|
91
|
+
const childrenWithoutSubNavOrTrailingAction = React.Children.toArray(children).filter(child => /*#__PURE__*/isValidElement(child) ? child.type !== SubNav && child.type !== TrailingAction && !isSlot(child, SubNav) && !isSlot(child, TrailingAction) : true);
|
|
92
|
+
if (! /*#__PURE__*/isValidElement(subNav) && defaultOpen)
|
|
93
|
+
// eslint-disable-next-line no-console
|
|
94
|
+
console.error('NavList.Item must have a NavList.SubNav to use defaultOpen.');
|
|
95
|
+
|
|
96
|
+
// Render ItemWithSubNav if SubNav is present
|
|
97
|
+
if (subNav && /*#__PURE__*/isValidElement(subNav)) {
|
|
98
|
+
return /*#__PURE__*/jsx(ItemWithSubNav, {
|
|
99
|
+
subNav: subNav,
|
|
100
|
+
depth: depth,
|
|
101
|
+
defaultOpen: defaultOpen,
|
|
102
|
+
style: {
|
|
103
|
+
'--subitem-depth': depth
|
|
104
|
+
},
|
|
105
|
+
children: childrenWithoutSubNavOrTrailingAction
|
|
183
106
|
});
|
|
184
|
-
$[22] = ariaCurrent;
|
|
185
|
-
$[23] = children;
|
|
186
|
-
$[24] = props;
|
|
187
|
-
$[25] = ref;
|
|
188
|
-
$[26] = t2;
|
|
189
|
-
$[27] = t4;
|
|
190
|
-
$[28] = t5;
|
|
191
|
-
} else {
|
|
192
|
-
t5 = $[28];
|
|
193
107
|
}
|
|
194
|
-
|
|
108
|
+
|
|
109
|
+
// Type safety for the polymorphic `as` prop is enforced at the
|
|
110
|
+
// Item boundary via fixedForwardRef. Internally we widen
|
|
111
|
+
// LinkItem's type so TypeScript doesn't re-check the generic
|
|
112
|
+
// constraint across two polymorphic layers.
|
|
113
|
+
const InternalLinkItem = ActionList.LinkItem;
|
|
114
|
+
return /*#__PURE__*/jsx(InternalLinkItem, {
|
|
115
|
+
ref: ref,
|
|
116
|
+
as: Component,
|
|
117
|
+
"aria-current": ariaCurrent,
|
|
118
|
+
active: Boolean(ariaCurrent) && ariaCurrent !== 'false',
|
|
119
|
+
style: {
|
|
120
|
+
'--subitem-depth': depth
|
|
121
|
+
},
|
|
122
|
+
...props,
|
|
123
|
+
children: children
|
|
124
|
+
});
|
|
125
|
+
});
|
|
126
|
+
const Item = Object.assign(ItemComponent, {
|
|
127
|
+
displayName: 'NavList.Item'
|
|
195
128
|
});
|
|
196
|
-
Item.displayName = 'NavList.Item';
|
|
197
129
|
|
|
198
130
|
// ----------------------------------------------------------------------------
|
|
199
131
|
// ItemWithSubNav (internal)
|
|
@@ -259,7 +191,7 @@ function ItemWithSubNav(t0) {
|
|
|
259
191
|
const t4 = !isOpen && containsCurrentItem;
|
|
260
192
|
let t5;
|
|
261
193
|
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
262
|
-
t5 = () => setIsOpen(
|
|
194
|
+
t5 = () => setIsOpen(_temp);
|
|
263
195
|
$[8] = t5;
|
|
264
196
|
} else {
|
|
265
197
|
t5 = $[8];
|
|
@@ -341,7 +273,7 @@ function ItemWithSubNav(t0) {
|
|
|
341
273
|
|
|
342
274
|
// ----------------------------------------------------------------------------
|
|
343
275
|
// NavList.SubNav
|
|
344
|
-
function
|
|
276
|
+
function _temp(open) {
|
|
345
277
|
return !open;
|
|
346
278
|
}
|
|
347
279
|
const SubNavContext = /*#__PURE__*/React.createContext({
|
|
@@ -696,11 +628,5 @@ const NavList = Object.assign(Root, {
|
|
|
696
628
|
GroupExpand,
|
|
697
629
|
GroupHeading
|
|
698
630
|
});
|
|
699
|
-
function _temp(child) {
|
|
700
|
-
return /*#__PURE__*/isValidElement(child) && (child.type === SubNav || isSlot(child, SubNav));
|
|
701
|
-
}
|
|
702
|
-
function _temp2(child_0) {
|
|
703
|
-
return /*#__PURE__*/isValidElement(child_0) ? child_0.type !== SubNav && child_0.type !== TrailingAction && !isSlot(child_0, SubNav) && !isSlot(child_0, TrailingAction) : true;
|
|
704
|
-
}
|
|
705
631
|
|
|
706
632
|
export { GroupExpand, NavList };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-Timeline-Timeline-awSoC{display:flex;flex-direction:column}.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-QwDVH:first-child{padding-top:0}:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-QwDVH:first-child):where([data-condensed]):before{top:var(--base-size-12,.75rem)}.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar]) .prc-Timeline-TimelineItem-QwDVH:last-child{padding-bottom:0}:is(.prc-Timeline-Timeline-awSoC:where([data-clip-sidebar]) .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,var(--color-border-muted));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,var(--color-canvas-default));border:0;color:var(--fgColor-muted,var(--color-fg-muted));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,var(--color-timeline-badge-bg));border-color:var(--bgColor-default,var(--color-canvas-default));border-radius:50%;border-style:solid;border-width:var(--borderWidth-thick,.125rem);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,.prc-Timeline-TimelineBody-tjOtb{color:var(--fgColor-muted,var(--color-fg-muted))}.prc-Timeline-TimelineBody-tjOtb{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,var(--color-canvas-default));border:0;border-top:var(--borderWidth-thicker,.25rem) solid var(--borderColor-default,var(--color-border-default));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)}
|
|
2
|
+
/*# sourceMappingURL=Timeline-19bef8c5.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Timeline/Timeline.module.css.js"],"names":[],"mappings":"AAAA,6BACE,YAAa,CACb,qBAmBF,CAhBI,qGACE,aAKF,CAHE,yIACE,8BACF,CAGF,oGACE,gBAKF,CAHE,wIACE,iCACF,CAKN,iCAEE,YAAa,CAEb,oCAAgC,CADhC,kCAA8B,CAF9B,iBAkCF,CA7BE,wCASE,mEAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAeF,CAZE,oEACE,uCACF,CAEA,2FAKE,mEAAwC,CACxC,QAAS,CAFT,gDAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAIJ,yCACE,iBAAkB,CAClB,SACF,CAEA,kCAkBE,kBAAmB,CANnB,4EAA8C,CAE9C,+DAAoC,CAGpC,iBAAkB,CAFlB,kBAAmB,CACnB,6CAAsC,CAftC,YAAa,CAMb,aAAc,CAJd,WAAY,CAgBZ,sBAAuB,CAbvB,iBAAkB,CAFlB,qCAAgC,CAIhC,eAAgB,CANhB,UAkBF,CAEA,mEAbE,gDAqBF,CARA,iCAOE,SAAU,CAFV,8CAAuC,CADvC,gDAA0C,CAF1C,cAAe,CADf,WAOF,CAEA,kCAOE,mEAAwC,CACxC,QAAS,CACT,yGAAuE,CANvE,iCAA2B,CAC3B,QAAS,CACT,+CAA6C,CAC7C,aAAc,CALd,iBAAkB,CAClB,SAYF,CAHE,yDACE,iDACF","file":"Timeline-19bef8c5.css","sourcesContent":[".Timeline {\n display: flex;\n flex-direction: column;\n\n &:where([data-clip-sidebar]) {\n .TimelineItem:first-child {\n padding-top: 0;\n\n &:where([data-condensed])::before {\n top: var(--base-size-12);\n }\n }\n\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\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 &:has(+ [data-condensed]) {\n margin-bottom: calc(-1 * var(--base-size-12));\n }\n}\n"]}
|
|
@@ -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,
|
|
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,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAEtE,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAevF,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,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAA;AAYzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;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;;;;kCAxBK,kBAAkB;;;;QAW9D,oCAAoC;oBACxB,MAAM;;;QAUlB,oCAAoC;oBACxB,MAAM;;;AASpB,wBAKE"}
|
|
@@ -4,13 +4,8 @@ import React from 'react';
|
|
|
4
4
|
import classes from './Timeline.module.css.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
|
-
function resolveClipSidebar(clipSidebar) {
|
|
8
|
-
if (clipSidebar === true || clipSidebar === 'both') return 'both';
|
|
9
|
-
if (clipSidebar === 'start' || clipSidebar === 'end') return clipSidebar;
|
|
10
|
-
return undefined;
|
|
11
|
-
}
|
|
12
7
|
const Timeline = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
13
|
-
const $ = c(
|
|
8
|
+
const $ = c(11);
|
|
14
9
|
let className;
|
|
15
10
|
let clipSidebar;
|
|
16
11
|
let props;
|
|
@@ -30,37 +25,29 @@ const Timeline = /*#__PURE__*/React.forwardRef((t0, forwardRef) => {
|
|
|
30
25
|
props = $[3];
|
|
31
26
|
}
|
|
32
27
|
let t1;
|
|
33
|
-
if ($[4] !==
|
|
34
|
-
t1 =
|
|
35
|
-
$[4] =
|
|
28
|
+
if ($[4] !== className) {
|
|
29
|
+
t1 = clsx(className, classes.Timeline);
|
|
30
|
+
$[4] = className;
|
|
36
31
|
$[5] = t1;
|
|
37
32
|
} else {
|
|
38
33
|
t1 = $[5];
|
|
39
34
|
}
|
|
40
|
-
const
|
|
41
|
-
let t2;
|
|
42
|
-
if ($[6] !== className) {
|
|
43
|
-
t2 = clsx(className, classes.Timeline);
|
|
44
|
-
$[6] = className;
|
|
45
|
-
$[7] = t2;
|
|
46
|
-
} else {
|
|
47
|
-
t2 = $[7];
|
|
48
|
-
}
|
|
35
|
+
const t2 = clipSidebar ? "" : undefined;
|
|
49
36
|
let t3;
|
|
50
|
-
if ($[
|
|
37
|
+
if ($[6] !== forwardRef || $[7] !== props || $[8] !== t1 || $[9] !== t2) {
|
|
51
38
|
t3 = /*#__PURE__*/jsx("div", {
|
|
52
39
|
...props,
|
|
53
|
-
className:
|
|
40
|
+
className: t1,
|
|
54
41
|
ref: forwardRef,
|
|
55
|
-
"data-clip-sidebar":
|
|
42
|
+
"data-clip-sidebar": t2
|
|
56
43
|
});
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
44
|
+
$[6] = forwardRef;
|
|
45
|
+
$[7] = props;
|
|
46
|
+
$[8] = t1;
|
|
47
|
+
$[9] = t2;
|
|
48
|
+
$[10] = t3;
|
|
62
49
|
} else {
|
|
63
|
-
t3 = $[
|
|
50
|
+
t3 = $[10];
|
|
64
51
|
}
|
|
65
52
|
return t3;
|
|
66
53
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './Timeline-
|
|
1
|
+
import './Timeline-19bef8c5.css';
|
|
2
2
|
|
|
3
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"};
|
|
4
4
|
|
|
@@ -7845,14 +7845,6 @@
|
|
|
7845
7845
|
"id": "components-timeline-features--clip-sidebar",
|
|
7846
7846
|
"code": "() => (\n <Timeline clipSidebar>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
7847
7847
|
},
|
|
7848
|
-
{
|
|
7849
|
-
"id": "components-timeline-features--clip-sidebar-start",
|
|
7850
|
-
"code": "() => (\n <Timeline clipSidebar=\"start\">\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
7851
|
-
},
|
|
7852
|
-
{
|
|
7853
|
-
"id": "components-timeline-features--clip-sidebar-end",
|
|
7854
|
-
"code": "() => (\n <Timeline clipSidebar=\"end\">\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
7855
|
-
},
|
|
7856
7848
|
{
|
|
7857
7849
|
"id": "components-timeline-features--condensed-items",
|
|
7858
7850
|
"code": "() => (\n <Timeline>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Break />\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n <Timeline.Item condensed>\n <Timeline.Badge>\n <Octicon icon={GitCommitIcon} aria-label=\"Commit\" />\n </Timeline.Badge>\n <Timeline.Body>This is a message</Timeline.Body>\n </Timeline.Item>\n </Timeline>\n)"
|
|
@@ -7870,8 +7862,8 @@
|
|
|
7870
7862
|
"props": [
|
|
7871
7863
|
{
|
|
7872
7864
|
"name": "clipSidebar",
|
|
7873
|
-
"type": "
|
|
7874
|
-
"description": "
|
|
7865
|
+
"type": "boolean",
|
|
7866
|
+
"description": "Hides the sidebar above the first Timeline.Item and below the last Timeline.Item."
|
|
7875
7867
|
}
|
|
7876
7868
|
],
|
|
7877
7869
|
"subcomponents": [
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
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,var(--color-border-muted));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,var(--color-canvas-default));border:0;color:var(--fgColor-muted,var(--color-fg-muted));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,var(--color-timeline-badge-bg));border-color:var(--bgColor-default,var(--color-canvas-default));border-radius:50%;border-style:solid;border-width:var(--borderWidth-thick,.125rem);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,.prc-Timeline-TimelineBody-tjOtb{color:var(--fgColor-muted,var(--color-fg-muted))}.prc-Timeline-TimelineBody-tjOtb{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,var(--color-canvas-default));border:0;border-top:var(--borderWidth-thicker,.25rem) solid var(--borderColor-default,var(--color-border-default));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)}
|
|
2
|
-
/*# sourceMappingURL=Timeline-4d67684a.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
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,mEAA0C,CAN1C,QAAS,CAIT,UAAW,CAFX,aAAc,CADd,MAAO,CAHP,iBAAkB,CAClB,KAAM,CAIN,SAIF,CAEA,yDAEE,gBAAiB,CADjB,qCAeF,CAZE,oEACE,uCACF,CAEA,2FAKE,mEAAwC,CACxC,QAAS,CAFT,gDAA2B,CAH3B,WAAY,CAEZ,sCAAiC,CADjC,mCAKF,CAIJ,yCACE,iBAAkB,CAClB,SACF,CAEA,kCAkBE,kBAAmB,CANnB,4EAA8C,CAE9C,+DAAoC,CAGpC,iBAAkB,CAFlB,kBAAmB,CACnB,6CAAsC,CAftC,YAAa,CAMb,aAAc,CAJd,WAAY,CAgBZ,sBAAuB,CAbvB,iBAAkB,CAFlB,qCAAgC,CAIhC,eAAgB,CANhB,UAkBF,CAEA,mEAbE,gDAqBF,CARA,iCAOE,SAAU,CAFV,8CAAuC,CADvC,gDAA0C,CAF1C,cAAe,CADf,WAOF,CAEA,kCAOE,mEAAwC,CACxC,QAAS,CACT,yGAAuE,CANvE,iCAA2B,CAC3B,QAAS,CACT,+CAA6C,CAC7C,aAAc,CALd,iBAAkB,CAClB,SAYF,CAHE,yDACE,iDACF","file":"Timeline-4d67684a.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\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 &:has(+ [data-condensed]) {\n margin-bottom: calc(-1 * var(--base-size-12));\n }\n}\n"]}
|