@primer/styled-react 0.0.0-20251016015647 → 0.0.0-20251016023441
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.
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import { NavList as PrimerNavList } from '@primer/react';
|
|
2
|
-
import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps,
|
|
2
|
+
import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps, NavListLeadingVisualProps as PrimerNavListLeadingVisualProps } from '@primer/react';
|
|
3
3
|
import { type PropsWithChildren } from 'react';
|
|
4
4
|
import { type SxProp } from '../sx';
|
|
5
|
-
type
|
|
6
|
-
type NavListProps = PropsWithChildren<PrimerNavListProps> & SxProp
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const NavListGroupHeading: RefComponent<HTMLElement, NavListGroupHeadingProps>;
|
|
18
|
-
type NavListLeadingVisualProps = PropsWithChildren<PrimerNavListLeadingVisualProps> & SxProp;
|
|
19
|
-
declare const NavListLeadingVisual: RefComponent<HTMLSpanElement, NavListLeadingVisualProps>;
|
|
5
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
6
|
+
type NavListProps = PropsWithChildren<PrimerNavListProps> & SxProp & {
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
};
|
|
9
|
+
type NavListItemProps = PropsWithChildren<PrimerNavListItemProps> & SxProp & {
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
};
|
|
12
|
+
declare const NavListItem: ForwardRefComponent<"a", NavListItemProps>;
|
|
13
|
+
type NavListLeadingVisualProps = PropsWithChildren<PrimerNavListLeadingVisualProps> & SxProp & {
|
|
14
|
+
as?: React.ElementType;
|
|
15
|
+
};
|
|
16
|
+
declare const NavListLeadingVisual: ForwardRefComponent<"span", NavListLeadingVisualProps>;
|
|
20
17
|
type NavListCompound = React.ForwardRefExoticComponent<NavListProps & React.RefAttributes<HTMLElement>> & {
|
|
21
18
|
Item: typeof NavListItem;
|
|
22
|
-
Group: typeof
|
|
23
|
-
GroupHeading: typeof
|
|
19
|
+
Group: typeof PrimerNavList.Group;
|
|
20
|
+
GroupHeading: typeof PrimerNavList.GroupHeading;
|
|
24
21
|
LeadingVisual: typeof NavListLeadingVisual;
|
|
25
22
|
SubNav: typeof PrimerNavList.SubNav;
|
|
26
23
|
Divider: typeof PrimerNavList.Divider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,eAAe,CAAA;AACtD,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,EAC1C,yBAAyB,IAAI,+BAA+B,EAE7D,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACxD,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAGjC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,YAAY,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAY7F,KAAK,gBAAgB,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,GAC/D,MAAM,GAAG;IACP,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CACvB,CAAA;AAQH,QAAA,MAAM,WAAW,EAEX,mBAAmB,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAA;AAEhD,KAAK,yBAAyB,GAAG,iBAAiB,CAAC,+BAA+B,CAAC,GACjF,MAAM,GAAG;IACP,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CACvB,CAAA;AAQH,QAAA,MAAM,oBAAoB,EAEpB,mBAAmB,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAE3D;AAED,KAAK,eAAe,GAAG,KAAK,CAAC,yBAAyB,CAAC,YAAY,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,GAAG;IACxG,IAAI,EAAE,OAAO,WAAW,CAAA;IACxB,KAAK,EAAE,OAAO,aAAa,CAAC,KAAK,CAAA;IACjC,YAAY,EAAE,OAAO,aAAa,CAAC,YAAY,CAAA;IAC/C,aAAa,EAAE,OAAO,oBAAoB,CAAA;IAC1C,MAAM,EAAE,OAAO,aAAa,CAAC,MAAM,CAAA;IACnC,OAAO,EAAE,OAAO,aAAa,CAAC,OAAO,CAAA;IACrC,cAAc,EAAE,OAAO,aAAa,CAAC,cAAc,CAAA;IACnD,cAAc,EAAE,OAAO,aAAa,CAAC,cAAc,CAAA;IACnD,WAAW,EAAE,OAAO,aAAa,CAAC,WAAW,CAAA;CAC9C,CAAA;AAED,QAAA,MAAM,OAAO,EAAE,eAUb,CAAA;AAEF,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA"}
|
|
@@ -1,51 +1,67 @@
|
|
|
1
|
-
import { NavList as NavList$1 } from '@primer/react';
|
|
1
|
+
import { NavList as NavList$1, sx } from '@primer/react';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import styled from 'styled-components';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const StyledNavListImpl = styled(NavList$1).withConfig({
|
|
7
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
8
|
+
}).withConfig({
|
|
9
|
+
displayName: "NavList__StyledNavListImpl",
|
|
10
|
+
componentId: "sc-86jrwg-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const NavListImpl = /*#__PURE__*/forwardRef(function NavList({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) {
|
|
16
|
+
return /*#__PURE__*/jsx(StyledNavListImpl, {
|
|
9
17
|
ref: ref,
|
|
18
|
+
...(as ? {
|
|
19
|
+
forwardedAs: as
|
|
20
|
+
} : {}),
|
|
10
21
|
...props
|
|
11
22
|
});
|
|
12
23
|
});
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return /*#__PURE__*/jsx(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
const StyledNavListItem = styled(NavList$1.Item).withConfig({
|
|
25
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
26
|
+
}).withConfig({
|
|
27
|
+
displayName: "NavList__StyledNavListItem",
|
|
28
|
+
componentId: "sc-86jrwg-1"
|
|
29
|
+
})(["", ""], sx);
|
|
30
|
+
const NavListItem = /*#__PURE__*/forwardRef(({
|
|
31
|
+
as,
|
|
32
|
+
...props
|
|
33
|
+
}, ref) => {
|
|
34
|
+
return /*#__PURE__*/jsx(StyledNavListItem, {
|
|
35
|
+
...props,
|
|
36
|
+
...(as ? {
|
|
37
|
+
forwardedAs: as
|
|
38
|
+
} : {}),
|
|
39
|
+
ref: ref
|
|
27
40
|
});
|
|
28
41
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return /*#__PURE__*/jsx(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const StyledNavListLeadingVisual = styled(NavList$1.LeadingVisual).withConfig({
|
|
43
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
44
|
+
}).withConfig({
|
|
45
|
+
displayName: "NavList__StyledNavListLeadingVisual",
|
|
46
|
+
componentId: "sc-86jrwg-2"
|
|
47
|
+
})(["", ""], sx);
|
|
48
|
+
const NavListLeadingVisual = /*#__PURE__*/forwardRef(({
|
|
49
|
+
as,
|
|
50
|
+
...props
|
|
51
|
+
}, ref) => {
|
|
52
|
+
return /*#__PURE__*/jsx(StyledNavListLeadingVisual, {
|
|
53
|
+
...props,
|
|
54
|
+
...(as ? {
|
|
55
|
+
forwardedAs: as
|
|
56
|
+
} : {}),
|
|
57
|
+
ref: ref
|
|
43
58
|
});
|
|
44
59
|
});
|
|
60
|
+
NavListLeadingVisual.__SLOT__ = NavList$1.LeadingVisual.__SLOT__;
|
|
45
61
|
const NavList = Object.assign(NavListImpl, {
|
|
46
62
|
Item: NavListItem,
|
|
47
|
-
Group:
|
|
48
|
-
GroupHeading:
|
|
63
|
+
Group: NavList$1.Group,
|
|
64
|
+
GroupHeading: NavList$1.GroupHeading,
|
|
49
65
|
LeadingVisual: NavListLeadingVisual,
|
|
50
66
|
SubNav: NavList$1.SubNav,
|
|
51
67
|
Divider: NavList$1.Divider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20251016023441",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@babel/preset-react": "^7.27.1",
|
|
32
32
|
"@babel/preset-typescript": "^7.27.1",
|
|
33
|
-
"@primer/react": "0.0.0-
|
|
33
|
+
"@primer/react": "0.0.0-20251016023441",
|
|
34
34
|
"@rollup/plugin-babel": "^6.0.4",
|
|
35
35
|
"@types/react": "18.3.11",
|
|
36
36
|
"@types/react-dom": "18.3.1",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"typescript": "^5.9.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@primer/react": "0.0.0-
|
|
49
|
+
"@primer/react": "0.0.0-20251016023441",
|
|
50
50
|
"@types/react": "18.x || 19.x",
|
|
51
51
|
"@types/react-dom": "18.x || 19.x",
|
|
52
52
|
"@types/react-is": "18.x || 19.x",
|