@primer/styled-react 0.0.0-20251205021328 → 0.0.0-20251205154953
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/dist/components/ActionList.js +89 -145
- package/dist/components/ActionMenu.js +15 -15
- package/dist/components/Autocomplete.js +18 -20
- package/dist/components/Avatar.js +13 -11
- package/dist/components/BaseStyles.js +28 -47
- package/dist/components/Box.js +18 -10
- package/dist/components/Breadcrumbs.js +22 -32
- package/dist/components/Button.js +41 -105
- package/dist/components/Checkbox.js +14 -12
- package/dist/components/CheckboxGroup.js +34 -36
- package/dist/components/CircleBadge.js +10 -10
- package/dist/components/CounterLabel.js +13 -11
- package/dist/components/DataTable.js +19 -27
- package/dist/components/Dialog.js +53 -79
- package/dist/components/Flash.js +9 -9
- package/dist/components/FormControl.js +15 -15
- package/dist/components/Header.js +36 -44
- package/dist/components/Heading.js +9 -9
- package/dist/components/IconButton.js +23 -36
- package/dist/components/Label.js +17 -22
- package/dist/components/Link.js +17 -22
- package/dist/components/LinkButton.js +9 -9
- package/dist/components/NavList.js +46 -65
- package/dist/components/Overlay.js +9 -9
- package/dist/components/PageHeader.js +62 -100
- package/dist/components/RadioGroup.js +34 -36
- package/dist/components/RelativeTime.js +11 -11
- package/dist/components/SegmentedControl.js +27 -25
- package/dist/components/Select.js +15 -20
- package/dist/components/Spinner.js +9 -9
- package/dist/components/StateLabel.js +13 -11
- package/dist/components/SubNav.js +23 -21
- package/dist/components/Text.js +17 -22
- package/dist/components/TextInput.js +25 -32
- package/dist/components/Textarea.js +17 -22
- package/dist/components/ThemeProvider.js +132 -185
- package/dist/components/Timeline.js +40 -38
- package/dist/components/ToggleSwitch.js +13 -11
- package/dist/components/Token.js +17 -22
- package/dist/components/Tooltip.js +14 -12
- package/dist/components/Truncate.js +9 -9
- package/dist/components/UnderlineNav.js +27 -39
- package/dist/components/UnderlinePanels.js +18 -23
- package/dist/components/deprecated/ActionList.js +34 -39
- package/dist/components/deprecated/DialogV1.js +28 -38
- package/dist/components/deprecated/Octicon.js +28 -35
- package/dist/components/deprecated/TabNav.js +24 -38
- package/dist/components/deprecated/Tooltip.js +20 -28
- package/dist/deprecated.js +7 -5
- package/dist/experimental.js +7 -5
- package/dist/index.js +48 -46
- package/dist/sx.js +7 -6
- package/dist/theme-get.js +8 -8
- package/package.json +7 -4
|
@@ -1,52 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { jsx } from
|
|
1
|
+
import { Box } from "./Box.js";
|
|
2
|
+
import { Header } from "@primer/react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
//#region src/components/Header.tsx
|
|
7
|
+
const StyledHeader = /* @__PURE__ */ forwardRef(function Header$2(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
+
as: Header,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
12
13
|
});
|
|
13
|
-
const HeaderImpl =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
...props,
|
|
18
|
-
...(as ? {
|
|
19
|
-
forwardedAs: as
|
|
20
|
-
} : {}),
|
|
21
|
-
ref: ref
|
|
14
|
+
const HeaderImpl = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledHeader, {
|
|
15
|
+
...props,
|
|
16
|
+
...as ? { forwardedAs: as } : {},
|
|
17
|
+
ref
|
|
22
18
|
}));
|
|
23
|
-
const HeaderItem =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
const HeaderItem = /* @__PURE__ */ forwardRef(function HeaderItem$1(props, ref) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
21
|
+
as: Header.Item,
|
|
22
|
+
ref,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
29
25
|
});
|
|
30
|
-
const StyledHeaderLink =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
const StyledHeaderLink = /* @__PURE__ */ forwardRef(function HeaderLink$1(props, ref) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
28
|
+
as: Header.Link,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
36
32
|
});
|
|
37
|
-
const HeaderLink =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...props,
|
|
42
|
-
...(as ? {
|
|
43
|
-
forwardedAs: as
|
|
44
|
-
} : {}),
|
|
45
|
-
ref: ref
|
|
33
|
+
const HeaderLink = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledHeaderLink, {
|
|
34
|
+
...props,
|
|
35
|
+
...as ? { forwardedAs: as } : {},
|
|
36
|
+
ref
|
|
46
37
|
}));
|
|
47
|
-
const Header = Object.assign(HeaderImpl, {
|
|
48
|
-
|
|
49
|
-
|
|
38
|
+
const Header$1 = Object.assign(HeaderImpl, {
|
|
39
|
+
Item: HeaderItem,
|
|
40
|
+
Link: HeaderLink
|
|
50
41
|
});
|
|
51
42
|
|
|
52
|
-
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Header$1 as Header };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Heading } from "@primer/react";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
componentId: "sc-1vc165i-0"
|
|
5
|
+
//#region src/components/Heading.tsx
|
|
6
|
+
const Heading$1 = styled(Heading).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "Heading",
|
|
8
|
+
componentId: "sc-1vc165i-0"
|
|
10
9
|
})(["", ""], sx);
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Heading$1 as Heading };
|
|
@@ -1,40 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { generateCustomSxProp } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { jsx } from
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import { generateCustomSxProp } from "./Button.js";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { IconButton } from "@primer/react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
componentId: "sc-i53dt6-0"
|
|
8
|
+
//#region src/components/IconButton.tsx
|
|
9
|
+
const StyledIconButton = styled(IconButton).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
10
|
+
displayName: "IconButton__StyledIconButton",
|
|
11
|
+
componentId: "sc-i53dt6-0"
|
|
13
12
|
})(["", ""], sx);
|
|
14
|
-
const IconButton =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (sx !== null && sx !== undefined && Object.keys(sx).length > 0) {
|
|
25
|
-
sxStyles = generateCustomSxProp({
|
|
26
|
-
size
|
|
27
|
-
}, sx);
|
|
28
|
-
}
|
|
29
|
-
return /*#__PURE__*/jsx(StyledIconButton, {
|
|
30
|
-
sx: sxStyles,
|
|
31
|
-
...props,
|
|
32
|
-
...(as ? {
|
|
33
|
-
forwardedAs: as
|
|
34
|
-
} : {}),
|
|
35
|
-
ref: ref
|
|
36
|
-
});
|
|
13
|
+
const IconButton$1 = /* @__PURE__ */ forwardRef(({ as, sx: sx$1, ...props }, ref) => {
|
|
14
|
+
let sxStyles = sx$1;
|
|
15
|
+
const { size = "medium" } = props;
|
|
16
|
+
if (sx$1 !== null && sx$1 !== void 0 && Object.keys(sx$1).length > 0) sxStyles = generateCustomSxProp({ size }, sx$1);
|
|
17
|
+
return /* @__PURE__ */ jsx(StyledIconButton, {
|
|
18
|
+
sx: sxStyles,
|
|
19
|
+
...props,
|
|
20
|
+
...as ? { forwardedAs: as } : {},
|
|
21
|
+
ref
|
|
22
|
+
});
|
|
37
23
|
});
|
|
38
|
-
IconButton.__SLOT__ = IconButton
|
|
24
|
+
IconButton$1.__SLOT__ = IconButton.__SLOT__;
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
//#endregion
|
|
27
|
+
export { IconButton$1 as IconButton };
|
package/dist/components/Label.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { jsx } from
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Label } from "@primer/react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
componentId: "sc-1cpass9-0"
|
|
7
|
+
//#region src/components/Label.tsx
|
|
8
|
+
const StyledLabel = styled(Label).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "Label__StyledLabel",
|
|
10
|
+
componentId: "sc-1cpass9-0"
|
|
12
11
|
})(["", ""], sx);
|
|
13
|
-
const Label =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...(as ? {
|
|
20
|
-
forwardedAs: as
|
|
21
|
-
} : {}),
|
|
22
|
-
ref: ref
|
|
23
|
-
});
|
|
12
|
+
const Label$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledLabel, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
17
|
+
});
|
|
24
18
|
});
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Label$1 as Label };
|
package/dist/components/Link.js
CHANGED
|
@@ -1,26 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled from
|
|
3
|
-
import
|
|
4
|
-
import { forwardRef } from
|
|
5
|
-
import { jsx } from
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Link } from "@primer/react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
componentId: "sc-1syctfj-0"
|
|
7
|
+
//#region src/components/Link.tsx
|
|
8
|
+
const StyledLink = styled(Link).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "Link__StyledLink",
|
|
10
|
+
componentId: "sc-1syctfj-0"
|
|
12
11
|
})(["", ""], sx);
|
|
13
|
-
const Link =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...(as ? {
|
|
20
|
-
forwardedAs: as
|
|
21
|
-
} : {}),
|
|
22
|
-
ref: ref
|
|
23
|
-
});
|
|
12
|
+
const Link$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledLink, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
17
|
+
});
|
|
24
18
|
});
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Link$1 as Link };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled from
|
|
3
|
-
import
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { LinkButton } from "@primer/react";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
componentId: "sc-1v6zkmg-0"
|
|
5
|
+
//#region src/components/LinkButton.tsx
|
|
6
|
+
const LinkButton$1 = styled(LinkButton).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "LinkButton",
|
|
8
|
+
componentId: "sc-1v6zkmg-0"
|
|
10
9
|
})(["", ""], sx);
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
export { LinkButton$1 as LinkButton };
|
|
@@ -1,74 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { jsx } from
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { NavList } from "@primer/react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
componentId: "sc-86jrwg-0"
|
|
7
|
+
//#region src/components/NavList.tsx
|
|
8
|
+
const StyledNavListImpl = styled(NavList).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "NavList__StyledNavListImpl",
|
|
10
|
+
componentId: "sc-86jrwg-0"
|
|
12
11
|
})(["", ""], sx);
|
|
13
|
-
const NavListImpl =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
...(as ? {
|
|
20
|
-
forwardedAs: as
|
|
21
|
-
} : {}),
|
|
22
|
-
...props
|
|
23
|
-
});
|
|
12
|
+
const NavListImpl = /* @__PURE__ */ forwardRef(function NavList$2({ as, ...props }, ref) {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledNavListImpl, {
|
|
14
|
+
ref,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
24
18
|
});
|
|
25
|
-
const StyledNavListItem = styled(NavList
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
displayName: "NavList__StyledNavListItem",
|
|
29
|
-
componentId: "sc-86jrwg-1"
|
|
19
|
+
const StyledNavListItem = styled(NavList.Item).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
20
|
+
displayName: "NavList__StyledNavListItem",
|
|
21
|
+
componentId: "sc-86jrwg-1"
|
|
30
22
|
})(["", ""], sx);
|
|
31
|
-
const NavListItem =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
...(as ? {
|
|
38
|
-
forwardedAs: as
|
|
39
|
-
} : {}),
|
|
40
|
-
ref: ref
|
|
41
|
-
});
|
|
23
|
+
const NavListItem = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(StyledNavListItem, {
|
|
25
|
+
...props,
|
|
26
|
+
...as ? { forwardedAs: as } : {},
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
42
29
|
});
|
|
43
|
-
const StyledNavListLeadingVisual = styled(NavList
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
displayName: "NavList__StyledNavListLeadingVisual",
|
|
47
|
-
componentId: "sc-86jrwg-2"
|
|
30
|
+
const StyledNavListLeadingVisual = styled(NavList.LeadingVisual).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
31
|
+
displayName: "NavList__StyledNavListLeadingVisual",
|
|
32
|
+
componentId: "sc-86jrwg-2"
|
|
48
33
|
})(["", ""], sx);
|
|
49
|
-
const NavListLeadingVisual =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
...(as ? {
|
|
56
|
-
forwardedAs: as
|
|
57
|
-
} : {}),
|
|
58
|
-
ref: ref
|
|
59
|
-
});
|
|
34
|
+
const NavListLeadingVisual = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(StyledNavListLeadingVisual, {
|
|
36
|
+
...props,
|
|
37
|
+
...as ? { forwardedAs: as } : {},
|
|
38
|
+
ref
|
|
39
|
+
});
|
|
60
40
|
});
|
|
61
|
-
NavListLeadingVisual.__SLOT__ = NavList
|
|
62
|
-
const NavList = Object.assign(NavListImpl, {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
41
|
+
NavListLeadingVisual.__SLOT__ = NavList.LeadingVisual.__SLOT__;
|
|
42
|
+
const NavList$1 = Object.assign(NavListImpl, {
|
|
43
|
+
Item: NavListItem,
|
|
44
|
+
Group: NavList.Group,
|
|
45
|
+
GroupHeading: NavList.GroupHeading,
|
|
46
|
+
LeadingVisual: NavListLeadingVisual,
|
|
47
|
+
SubNav: NavList.SubNav,
|
|
48
|
+
Divider: NavList.Divider,
|
|
49
|
+
TrailingVisual: NavList.TrailingVisual,
|
|
50
|
+
TrailingAction: NavList.TrailingAction,
|
|
51
|
+
GroupExpand: NavList.GroupExpand
|
|
72
52
|
});
|
|
73
53
|
|
|
74
|
-
|
|
54
|
+
//#endregion
|
|
55
|
+
export { NavList$1 as NavList };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import styled from
|
|
3
|
-
import
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Overlay } from "@primer/react";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
componentId: "sc-tjbd74-0"
|
|
5
|
+
//#region src/components/Overlay.tsx
|
|
6
|
+
const Overlay$1 = styled(Overlay).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "Overlay",
|
|
8
|
+
componentId: "sc-tjbd74-0"
|
|
10
9
|
})(["", ""], sx);
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Overlay$1 as Overlay };
|
|
@@ -1,109 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import React from
|
|
6
|
-
import { jsx } from
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import { Box } from "./Box.js";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { PageHeader } from "@primer/react";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
componentId: "sc-1g9symn-0"
|
|
8
|
+
//#region src/components/PageHeader.tsx
|
|
9
|
+
const StyledPageHeader = styled(PageHeader).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
10
|
+
displayName: "PageHeader__StyledPageHeader",
|
|
11
|
+
componentId: "sc-1g9symn-0"
|
|
13
12
|
})(["", ""], sx);
|
|
14
|
-
const PageHeaderImpl =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...props,
|
|
19
|
-
...(as ? {
|
|
20
|
-
forwardedAs: as
|
|
21
|
-
} : {}),
|
|
22
|
-
ref: ref
|
|
13
|
+
const PageHeaderImpl = /* @__PURE__ */ React.forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledPageHeader, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
23
17
|
}));
|
|
24
|
-
function PageHeaderActions({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Actions
|
|
40
|
-
return /*#__PURE__*/jsx(Box, {
|
|
41
|
-
...rest,
|
|
42
|
-
as: PageHeader$1.Actions,
|
|
43
|
-
style: style,
|
|
44
|
-
sx: sx
|
|
45
|
-
});
|
|
18
|
+
function PageHeaderActions({ sx: sx$1, ...rest }) {
|
|
19
|
+
const style = {};
|
|
20
|
+
if (sx$1) {
|
|
21
|
+
const { height } = sx$1;
|
|
22
|
+
if (height) style["--custom-height"] = height;
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
25
|
+
...rest,
|
|
26
|
+
as: PageHeader.Actions,
|
|
27
|
+
style,
|
|
28
|
+
sx: sx$1
|
|
29
|
+
});
|
|
46
30
|
}
|
|
47
|
-
function StyledPageHeaderTitle({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
if (lineHeight) {
|
|
63
|
-
style['--custom-line-height'] = lineHeight;
|
|
64
|
-
}
|
|
65
|
-
if (fontWeight) {
|
|
66
|
-
style['--custom-font-weight'] = fontWeight;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Title
|
|
71
|
-
return /*#__PURE__*/jsx(Box, {
|
|
72
|
-
...rest,
|
|
73
|
-
as: PageHeader$1.Title,
|
|
74
|
-
style: style,
|
|
75
|
-
sx: sx
|
|
76
|
-
});
|
|
31
|
+
function StyledPageHeaderTitle({ sx: sx$1, ...rest }) {
|
|
32
|
+
const style = {};
|
|
33
|
+
if (sx$1) {
|
|
34
|
+
const { fontSize, lineHeight, fontWeight } = sx$1;
|
|
35
|
+
if (fontSize) style["--custom-font-size"] = fontSize;
|
|
36
|
+
if (lineHeight) style["--custom-line-height"] = lineHeight;
|
|
37
|
+
if (fontWeight) style["--custom-font-weight"] = fontWeight;
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
40
|
+
...rest,
|
|
41
|
+
as: PageHeader.Title,
|
|
42
|
+
style,
|
|
43
|
+
sx: sx$1
|
|
44
|
+
});
|
|
77
45
|
}
|
|
78
|
-
const PageHeaderTitle = ({
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}) => /*#__PURE__*/jsx(StyledPageHeaderTitle, {
|
|
82
|
-
...props,
|
|
83
|
-
...(as ? {
|
|
84
|
-
forwardedAs: as
|
|
85
|
-
} : {})
|
|
46
|
+
const PageHeaderTitle = ({ as, ...props }) => /* @__PURE__ */ jsx(StyledPageHeaderTitle, {
|
|
47
|
+
...props,
|
|
48
|
+
...as ? { forwardedAs: as } : {}
|
|
86
49
|
});
|
|
87
|
-
const PageHeaderTitleArea = styled(PageHeader
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
displayName: "PageHeader__PageHeaderTitleArea",
|
|
91
|
-
componentId: "sc-1g9symn-1"
|
|
50
|
+
const PageHeaderTitleArea = styled(PageHeader.TitleArea).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
51
|
+
displayName: "PageHeader__PageHeaderTitleArea",
|
|
52
|
+
componentId: "sc-1g9symn-1"
|
|
92
53
|
})(["", ""], sx);
|
|
93
|
-
const PageHeader = Object.assign(PageHeaderImpl, {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
54
|
+
const PageHeader$1 = Object.assign(PageHeaderImpl, {
|
|
55
|
+
Actions: PageHeaderActions,
|
|
56
|
+
ContextArea: PageHeader.ContextArea,
|
|
57
|
+
ParentLink: PageHeader.ParentLink,
|
|
58
|
+
ContextBar: PageHeader.ContextBar,
|
|
59
|
+
TitleArea: PageHeaderTitleArea,
|
|
60
|
+
ContextAreaActions: PageHeader.ContextAreaActions,
|
|
61
|
+
LeadingAction: PageHeader.LeadingAction,
|
|
62
|
+
Breadcrumbs: PageHeader.Breadcrumbs,
|
|
63
|
+
LeadingVisual: PageHeader.LeadingVisual,
|
|
64
|
+
Title: PageHeaderTitle,
|
|
65
|
+
TrailingVisual: PageHeader.TrailingVisual,
|
|
66
|
+
Description: PageHeader.Description,
|
|
67
|
+
TrailingAction: PageHeader.TrailingAction
|
|
107
68
|
});
|
|
108
69
|
|
|
109
|
-
|
|
70
|
+
//#endregion
|
|
71
|
+
export { PageHeader$1 as PageHeader };
|