@primer/styled-react 0.0.0-20251202212638 → 0.0.0-20251202220556
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/_virtual/rolldown_runtime.js +29 -0
- package/dist/node_modules/clsx/dist/clsx.js +17 -0
- package/dist/node_modules/deepmerge/dist/cjs.js +88 -0
- package/dist/node_modules/focus-visible/dist/focus-visible.js +212 -0
- package/dist/packages/styled-react/src/components/ActionList.js +107 -0
- package/dist/packages/styled-react/src/components/ActionMenu.js +19 -0
- package/dist/packages/styled-react/src/components/Autocomplete.js +23 -0
- package/dist/packages/styled-react/src/components/Avatar.js +16 -0
- package/dist/{components → packages/styled-react/src/components}/BaseStyles.js +29 -47
- package/dist/packages/styled-react/src/components/Box.js +23 -0
- package/dist/packages/styled-react/src/components/Breadcrumbs.js +28 -0
- package/dist/packages/styled-react/src/components/Button.js +48 -0
- package/dist/packages/styled-react/src/components/Checkbox.js +17 -0
- package/dist/packages/styled-react/src/components/CheckboxGroup.js +41 -0
- package/dist/packages/styled-react/src/components/CircleBadge.js +12 -0
- package/dist/packages/styled-react/src/components/CounterLabel.js +16 -0
- package/dist/packages/styled-react/src/components/DataTable.js +24 -0
- package/dist/packages/styled-react/src/components/Dialog.js +64 -0
- package/dist/packages/styled-react/src/components/Flash.js +12 -0
- package/dist/packages/styled-react/src/components/FormControl.js +19 -0
- package/dist/packages/styled-react/src/components/Header.js +44 -0
- package/dist/packages/styled-react/src/components/Heading.js +12 -0
- package/dist/packages/styled-react/src/components/IconButton.js +27 -0
- package/dist/packages/styled-react/src/components/Label.js +21 -0
- package/dist/packages/styled-react/src/components/Link.js +21 -0
- package/dist/packages/styled-react/src/components/LinkButton.js +12 -0
- package/dist/packages/styled-react/src/components/NavList.js +55 -0
- package/dist/packages/styled-react/src/components/Overlay.js +12 -0
- package/dist/packages/styled-react/src/components/PageHeader.js +71 -0
- package/dist/packages/styled-react/src/components/RadioGroup.js +41 -0
- package/dist/packages/styled-react/src/components/RelativeTime.js +14 -0
- package/dist/packages/styled-react/src/components/SegmentedControl.js +33 -0
- package/dist/packages/styled-react/src/components/Select.js +19 -0
- package/dist/packages/styled-react/src/components/Spinner.js +12 -0
- package/dist/packages/styled-react/src/components/StateLabel.js +16 -0
- package/dist/packages/styled-react/src/components/SubNav.js +28 -0
- package/dist/packages/styled-react/src/components/Text.js +21 -0
- package/dist/packages/styled-react/src/components/TextInput.js +31 -0
- package/dist/packages/styled-react/src/components/Textarea.js +21 -0
- package/dist/packages/styled-react/src/components/ThemeProvider.js +152 -0
- package/dist/packages/styled-react/src/components/Timeline.js +49 -0
- package/dist/packages/styled-react/src/components/ToggleSwitch.js +16 -0
- package/dist/packages/styled-react/src/components/Token.js +21 -0
- package/dist/packages/styled-react/src/components/Tooltip.js +17 -0
- package/dist/packages/styled-react/src/components/Truncate.js +12 -0
- package/dist/packages/styled-react/src/components/UnderlineNav.js +33 -0
- package/dist/packages/styled-react/src/components/UnderlinePanels.js +23 -0
- package/dist/packages/styled-react/src/components/deprecated/ActionList.js +44 -0
- package/dist/packages/styled-react/src/components/deprecated/DialogV1.js +34 -0
- package/dist/packages/styled-react/src/components/deprecated/Octicon.js +32 -0
- package/dist/packages/styled-react/src/components/deprecated/TabNav.js +30 -0
- package/dist/packages/styled-react/src/components/deprecated/Tooltip.js +24 -0
- package/dist/packages/styled-react/src/deprecated.js +7 -0
- package/dist/packages/styled-react/src/experimental.js +7 -0
- package/dist/packages/styled-react/src/index.js +50 -0
- package/dist/packages/styled-react/src/sx.js +11 -0
- package/dist/packages/styled-react/src/theme-get.js +10 -0
- package/package.json +4 -4
- package/dist/components/ActionList.js +0 -163
- package/dist/components/ActionMenu.js +0 -19
- package/dist/components/Autocomplete.js +0 -25
- package/dist/components/Avatar.js +0 -14
- package/dist/components/Box.js +0 -15
- package/dist/components/Breadcrumbs.js +0 -38
- package/dist/components/Button.js +0 -112
- package/dist/components/Checkbox.js +0 -15
- package/dist/components/CheckboxGroup.js +0 -43
- package/dist/components/CircleBadge.js +0 -12
- package/dist/components/CounterLabel.js +0 -14
- package/dist/components/DataTable.js +0 -32
- package/dist/components/Dialog.js +0 -90
- package/dist/components/Flash.js +0 -12
- package/dist/components/FormControl.js +0 -19
- package/dist/components/Header.js +0 -52
- package/dist/components/Heading.js +0 -12
- package/dist/components/IconButton.js +0 -40
- package/dist/components/Label.js +0 -26
- package/dist/components/Link.js +0 -26
- package/dist/components/LinkButton.js +0 -12
- package/dist/components/NavList.js +0 -74
- package/dist/components/Overlay.js +0 -12
- package/dist/components/PageHeader.js +0 -109
- package/dist/components/RadioGroup.js +0 -43
- package/dist/components/RelativeTime.js +0 -14
- package/dist/components/SegmentedControl.js +0 -31
- package/dist/components/Select.js +0 -24
- package/dist/components/Spinner.js +0 -12
- package/dist/components/StateLabel.js +0 -14
- package/dist/components/SubNav.js +0 -26
- package/dist/components/Text.js +0 -26
- package/dist/components/TextInput.js +0 -38
- package/dist/components/Textarea.js +0 -26
- package/dist/components/ThemeProvider.js +0 -203
- package/dist/components/Timeline.js +0 -47
- package/dist/components/ToggleSwitch.js +0 -14
- package/dist/components/Token.js +0 -26
- package/dist/components/Tooltip.js +0 -15
- package/dist/components/Truncate.js +0 -12
- package/dist/components/UnderlineNav.js +0 -45
- package/dist/components/UnderlinePanels.js +0 -28
- package/dist/components/deprecated/ActionList.js +0 -49
- package/dist/components/deprecated/DialogV1.js +0 -44
- package/dist/components/deprecated/Octicon.js +0 -39
- package/dist/components/deprecated/TabNav.js +0 -44
- package/dist/components/deprecated/Tooltip.js +0 -32
- package/dist/deprecated.js +0 -5
- package/dist/experimental.js +0 -5
- package/dist/index.js +0 -46
- package/dist/sx.js +0 -8
- package/dist/theme-get.js +0 -10
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Button } from "@primer/react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Button.tsx
|
|
8
|
+
const StyledButtonComponent = styled(Button).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "Button__StyledButtonComponent",
|
|
10
|
+
componentId: "sc-vqy3e4-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const ButtonComponent = /* @__PURE__ */ forwardRef(({ as, sx: sx$1, style: propStyle, ...props }, ref) => {
|
|
13
|
+
const { block, size = "medium", leadingVisual, trailingVisual, trailingAction } = props;
|
|
14
|
+
let sxStyles = {};
|
|
15
|
+
const style = { ...propStyle || {} };
|
|
16
|
+
if (sx$1 !== null && Object.keys(sx$1 || {}).length > 0) {
|
|
17
|
+
sxStyles = generateCustomSxProp({
|
|
18
|
+
block,
|
|
19
|
+
size,
|
|
20
|
+
leadingVisual,
|
|
21
|
+
trailingVisual,
|
|
22
|
+
trailingAction
|
|
23
|
+
}, sx$1);
|
|
24
|
+
const { color } = sx$1;
|
|
25
|
+
if (color) style["--button-color"] = color;
|
|
26
|
+
}
|
|
27
|
+
return /* @__PURE__ */ jsx(StyledButtonComponent, {
|
|
28
|
+
style,
|
|
29
|
+
sx: sxStyles,
|
|
30
|
+
ref,
|
|
31
|
+
...props,
|
|
32
|
+
...as ? { forwardedAs: as } : {}
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
function generateCustomSxProp(props, providedSx) {
|
|
36
|
+
const cssSelector = `&${`[data-size="${props.size}"]`}${props.block ? `[data-block="block"]` : ""}${props.leadingVisual || props.trailingVisual || props.trailingAction ? "" : "[data-no-visuals]"}`;
|
|
37
|
+
const customSxProp = {};
|
|
38
|
+
if (!providedSx) return customSxProp;
|
|
39
|
+
else {
|
|
40
|
+
customSxProp[cssSelector] = providedSx;
|
|
41
|
+
return customSxProp;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
ButtonComponent.displayName = "Button";
|
|
45
|
+
ButtonComponent.__SLOT__ = Button.__SLOT__;
|
|
46
|
+
|
|
47
|
+
//#endregion
|
|
48
|
+
export { ButtonComponent, generateCustomSxProp };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Box } from "./Box.js";
|
|
2
|
+
import { Checkbox } from "@primer/react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Checkbox.tsx
|
|
7
|
+
const Checkbox$1 = /* @__PURE__ */ forwardRef(function Checkbox$2(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
+
as: Checkbox,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
Checkbox$1.__SLOT__ = Checkbox.__SLOT__;
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Checkbox$1 as Checkbox };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Box_default from "./Box.js";
|
|
2
|
+
import { CheckboxGroup } from "@primer/react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/CheckboxGroup.tsx
|
|
6
|
+
const CheckboxGroupImpl = (props) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
8
|
+
as: CheckboxGroup,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const CheckboxOrRadioGroupLabel = (props) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
14
|
+
as: CheckboxGroup.Label,
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const CheckboxOrRadioGroupCaption = (props) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
20
|
+
as: CheckboxGroup.Caption,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const CheckboxOrRadioGroupValidation = (props) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
26
|
+
as: CheckboxGroup.Validation,
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const CheckboxGroup$1 = Object.assign(CheckboxGroupImpl, {
|
|
31
|
+
Label: CheckboxOrRadioGroupLabel,
|
|
32
|
+
Caption: CheckboxOrRadioGroupCaption,
|
|
33
|
+
Validation: CheckboxOrRadioGroupValidation
|
|
34
|
+
});
|
|
35
|
+
CheckboxGroupImpl.__SLOT__ = CheckboxGroup.__SLOT__;
|
|
36
|
+
CheckboxOrRadioGroupLabel.__SLOT__ = CheckboxGroup.Label.__SLOT__;
|
|
37
|
+
CheckboxOrRadioGroupCaption.__SLOT__ = CheckboxGroup.Caption.__SLOT__;
|
|
38
|
+
CheckboxOrRadioGroupValidation.__SLOT__ = CheckboxGroup.Validation.__SLOT__;
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { CheckboxGroup$1 as CheckboxGroup };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import sx_default from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { CircleBadge } from "@primer/react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/CircleBadge.tsx
|
|
6
|
+
const CircleBadge$1 = styled(CircleBadge).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "CircleBadge",
|
|
8
|
+
componentId: "sc-1u7lp3v-0"
|
|
9
|
+
})(["", ""], sx_default);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { CircleBadge$1 as CircleBadge };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Box } from "./Box.js";
|
|
2
|
+
import { CounterLabel } from "@primer/react";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/CounterLabel.tsx
|
|
7
|
+
const CounterLabel$1 = /* @__PURE__ */ forwardRef(function CounterLabel$2(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
9
|
+
as: CounterLabel,
|
|
10
|
+
ref,
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
//#endregion
|
|
16
|
+
export { CounterLabel$1 as CounterLabel };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Table } from "@primer/react/experimental";
|
|
5
|
+
|
|
6
|
+
//#region src/components/DataTable.tsx
|
|
7
|
+
const { Container: PrimerDataTableContainer, ...rest } = Table;
|
|
8
|
+
const StyleDataTableContainer = styled(PrimerDataTableContainer).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "DataTable__StyleDataTableContainer",
|
|
10
|
+
componentId: "sc-qy1ey2-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
function DataTableContainer({ as, ...rest$1 }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyleDataTableContainer, {
|
|
14
|
+
...rest$1,
|
|
15
|
+
...as ? { forwardedAs: as } : {}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
const Table$1 = Object.assign(Table, {
|
|
19
|
+
Container: DataTableContainer,
|
|
20
|
+
...rest
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Table$1 as Table };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Dialog } from "@primer/react";
|
|
4
|
+
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Dialog.tsx
|
|
8
|
+
const StyledDialog = styled(Dialog).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
9
|
+
displayName: "Dialog__StyledDialog",
|
|
10
|
+
componentId: "sc-19zph8h-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const DialogImpl = /* @__PURE__ */ forwardRef(function Dialog$2({ as, ...props }, ref) {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledDialog, {
|
|
14
|
+
ref,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
const StyledDialogHeader = styled(Dialog.Header).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
20
|
+
displayName: "Dialog__StyledDialogHeader",
|
|
21
|
+
componentId: "sc-19zph8h-1"
|
|
22
|
+
})(["", ""], sx);
|
|
23
|
+
const DialogHeader = /* @__PURE__ */ forwardRef(function DialogHeader$1({ as, ...props }, ref) {
|
|
24
|
+
return /* @__PURE__ */ jsx(StyledDialogHeader, {
|
|
25
|
+
ref,
|
|
26
|
+
...as ? { forwardedAs: as } : {},
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const StyledDialogBody = styled(Dialog.Body).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
31
|
+
displayName: "Dialog__StyledDialogBody",
|
|
32
|
+
componentId: "sc-19zph8h-2"
|
|
33
|
+
})(["", ""], sx);
|
|
34
|
+
const DialogBody = /* @__PURE__ */ forwardRef(function DialogBody$1({ as, ...props }, ref) {
|
|
35
|
+
return /* @__PURE__ */ jsx(StyledDialogBody, {
|
|
36
|
+
ref,
|
|
37
|
+
...as ? { forwardedAs: as } : {},
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
const StyledDialogFooter = styled(Dialog.Footer).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
42
|
+
displayName: "Dialog__StyledDialogFooter",
|
|
43
|
+
componentId: "sc-19zph8h-3"
|
|
44
|
+
})(["", ""], sx);
|
|
45
|
+
const DialogFooter = /* @__PURE__ */ forwardRef(function DialogFooter$1({ as, ...props }, ref) {
|
|
46
|
+
return /* @__PURE__ */ jsx(StyledDialogFooter, {
|
|
47
|
+
ref,
|
|
48
|
+
...as ? { forwardedAs: as } : {},
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
DialogHeader.__SLOT__ = Dialog.Header.__SLOT__;
|
|
53
|
+
DialogBody.__SLOT__ = Dialog.Body.__SLOT__;
|
|
54
|
+
DialogFooter.__SLOT__ = Dialog.Footer.__SLOT__;
|
|
55
|
+
const Dialog$1 = Object.assign(DialogImpl, {
|
|
56
|
+
__SLOT__: Dialog["__SLOT__"],
|
|
57
|
+
Buttons: Dialog.Buttons,
|
|
58
|
+
Header: DialogHeader,
|
|
59
|
+
Body: DialogBody,
|
|
60
|
+
Footer: DialogFooter
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { Dialog$1 as Dialog };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Flash } from "@primer/react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/Flash.tsx
|
|
6
|
+
const Flash$1 = styled(Flash).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "Flash",
|
|
8
|
+
componentId: "sc-413izo-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Flash$1 as Flash };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { FormControl } from "@primer/react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/FormControl.tsx
|
|
6
|
+
const FormControlImpl = styled(FormControl).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
7
|
+
displayName: "FormControl__FormControlImpl",
|
|
8
|
+
componentId: "sc-1642wfe-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
const FormControl$1 = Object.assign(FormControlImpl, {
|
|
11
|
+
__SLOT__: FormControl.__SLOT__,
|
|
12
|
+
Caption: FormControl.Caption,
|
|
13
|
+
LeadingVisual: FormControl.LeadingVisual,
|
|
14
|
+
Validation: FormControl.Validation,
|
|
15
|
+
Label: FormControl.Label
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { FormControl$1 as FormControl };
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
|
|
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
|
+
});
|
|
13
|
+
});
|
|
14
|
+
const HeaderImpl = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledHeader, {
|
|
15
|
+
...props,
|
|
16
|
+
...as ? { forwardedAs: as } : {},
|
|
17
|
+
ref
|
|
18
|
+
}));
|
|
19
|
+
const HeaderItem = /* @__PURE__ */ forwardRef(function HeaderItem$1(props, ref) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
21
|
+
as: Header.Item,
|
|
22
|
+
ref,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
const StyledHeaderLink = /* @__PURE__ */ forwardRef(function HeaderLink$1(props, ref) {
|
|
27
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
28
|
+
as: Header.Link,
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const HeaderLink = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledHeaderLink, {
|
|
34
|
+
...props,
|
|
35
|
+
...as ? { forwardedAs: as } : {},
|
|
36
|
+
ref
|
|
37
|
+
}));
|
|
38
|
+
const Header$1 = Object.assign(HeaderImpl, {
|
|
39
|
+
Item: HeaderItem,
|
|
40
|
+
Link: HeaderLink
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Header$1 as Header };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Heading } from "@primer/react";
|
|
4
|
+
|
|
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"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Heading$1 as Heading };
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
|
|
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"
|
|
12
|
+
})(["", ""], sx);
|
|
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
|
+
});
|
|
23
|
+
});
|
|
24
|
+
IconButton$1.__SLOT__ = IconButton.__SLOT__;
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { IconButton$1 as IconButton };
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
|
|
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"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const Label$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledLabel, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Label$1 as Label };
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
|
|
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"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const Link$1 = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(StyledLink, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Link$1 as Link };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { LinkButton } from "@primer/react";
|
|
4
|
+
|
|
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"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { LinkButton$1 as LinkButton };
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
|
|
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"
|
|
11
|
+
})(["", ""], sx);
|
|
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
|
+
});
|
|
18
|
+
});
|
|
19
|
+
const StyledNavListItem = styled(NavList.Item).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
20
|
+
displayName: "NavList__StyledNavListItem",
|
|
21
|
+
componentId: "sc-86jrwg-1"
|
|
22
|
+
})(["", ""], sx);
|
|
23
|
+
const NavListItem = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
24
|
+
return /* @__PURE__ */ jsx(StyledNavListItem, {
|
|
25
|
+
...props,
|
|
26
|
+
...as ? { forwardedAs: as } : {},
|
|
27
|
+
ref
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const StyledNavListLeadingVisual = styled(NavList.LeadingVisual).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
31
|
+
displayName: "NavList__StyledNavListLeadingVisual",
|
|
32
|
+
componentId: "sc-86jrwg-2"
|
|
33
|
+
})(["", ""], sx);
|
|
34
|
+
const NavListLeadingVisual = /* @__PURE__ */ forwardRef(({ as, ...props }, ref) => {
|
|
35
|
+
return /* @__PURE__ */ jsx(StyledNavListLeadingVisual, {
|
|
36
|
+
...props,
|
|
37
|
+
...as ? { forwardedAs: as } : {},
|
|
38
|
+
ref
|
|
39
|
+
});
|
|
40
|
+
});
|
|
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
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { NavList$1 as NavList };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Overlay } from "@primer/react";
|
|
4
|
+
|
|
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"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Overlay$1 as Overlay };
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
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"
|
|
12
|
+
})(["", ""], sx);
|
|
13
|
+
const PageHeaderImpl = /* @__PURE__ */ React.forwardRef(({ as, ...props }, ref) => /* @__PURE__ */ jsx(StyledPageHeader, {
|
|
14
|
+
...props,
|
|
15
|
+
...as ? { forwardedAs: as } : {},
|
|
16
|
+
ref
|
|
17
|
+
}));
|
|
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
|
+
});
|
|
30
|
+
}
|
|
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
|
+
});
|
|
45
|
+
}
|
|
46
|
+
const PageHeaderTitle = ({ as, ...props }) => /* @__PURE__ */ jsx(StyledPageHeaderTitle, {
|
|
47
|
+
...props,
|
|
48
|
+
...as ? { forwardedAs: as } : {}
|
|
49
|
+
});
|
|
50
|
+
const PageHeaderTitleArea = styled(PageHeader.TitleArea).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
51
|
+
displayName: "PageHeader__PageHeaderTitleArea",
|
|
52
|
+
componentId: "sc-1g9symn-1"
|
|
53
|
+
})(["", ""], sx);
|
|
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
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { PageHeader$1 as PageHeader };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import Box_default from "./Box.js";
|
|
2
|
+
import { RadioGroup } from "@primer/react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/RadioGroup.tsx
|
|
6
|
+
const RadioGroupImpl = (props) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
8
|
+
as: RadioGroup,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const CheckboxOrRadioGroupLabel = (props) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
14
|
+
as: RadioGroup.Label,
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const CheckboxOrRadioGroupCaption = (props) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
20
|
+
as: RadioGroup.Caption,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const CheckboxOrRadioGroupValidation = (props) => {
|
|
25
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
26
|
+
as: RadioGroup.Validation,
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
const RadioGroup$1 = Object.assign(RadioGroupImpl, {
|
|
31
|
+
Label: CheckboxOrRadioGroupLabel,
|
|
32
|
+
Caption: CheckboxOrRadioGroupCaption,
|
|
33
|
+
Validation: CheckboxOrRadioGroupValidation
|
|
34
|
+
});
|
|
35
|
+
RadioGroupImpl.__SLOT__ = RadioGroup.__SLOT__;
|
|
36
|
+
CheckboxOrRadioGroupLabel.__SLOT__ = RadioGroup.Label.__SLOT__;
|
|
37
|
+
CheckboxOrRadioGroupCaption.__SLOT__ = RadioGroup.Caption.__SLOT__;
|
|
38
|
+
CheckboxOrRadioGroupValidation.__SLOT__ = RadioGroup.Validation.__SLOT__;
|
|
39
|
+
|
|
40
|
+
//#endregion
|
|
41
|
+
export { RadioGroup$1 as RadioGroup };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Box_default from "./Box.js";
|
|
2
|
+
import { RelativeTime } from "@primer/react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/RelativeTime.tsx
|
|
6
|
+
function RelativeTime$1(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box_default, {
|
|
8
|
+
as: RelativeTime,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { RelativeTime$1 as RelativeTime };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Box } from "./Box.js";
|
|
2
|
+
import { SegmentedControl } from "@primer/react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/SegmentedControl.tsx
|
|
6
|
+
const SegmentedControlButton = (props) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
8
|
+
as: SegmentedControl.Button,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
const SegmentedControlIconButton = (props) => {
|
|
13
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
14
|
+
as: SegmentedControl.IconButton,
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
const SegmentedControlImpl = (props) => {
|
|
19
|
+
return /* @__PURE__ */ jsx(Box, {
|
|
20
|
+
as: SegmentedControl,
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const SegmentedControl$1 = Object.assign(SegmentedControlImpl, {
|
|
25
|
+
__SLOT__: SegmentedControl.__SLOT__,
|
|
26
|
+
Button: SegmentedControlButton,
|
|
27
|
+
IconButton: SegmentedControlIconButton
|
|
28
|
+
});
|
|
29
|
+
SegmentedControlButton.__SLOT__ = SegmentedControl.Button.__SLOT__;
|
|
30
|
+
SegmentedControlIconButton.__SLOT__ = SegmentedControl.IconButton.__SLOT__;
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SegmentedControl$1 as SegmentedControl };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sx } from "../sx.js";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Select } from "@primer/react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/Select.tsx
|
|
7
|
+
const StyledSelect = styled(Select).withConfig({ shouldForwardProp: (prop) => prop !== "sx" }).withConfig({
|
|
8
|
+
displayName: "Select__StyledSelect",
|
|
9
|
+
componentId: "sc-1pyiuc8-0"
|
|
10
|
+
})(["", ""], sx);
|
|
11
|
+
const Select$1 = ({ as, ...props }) => {
|
|
12
|
+
return /* @__PURE__ */ jsx(StyledSelect, {
|
|
13
|
+
...props,
|
|
14
|
+
...as ? { forwardedAs: as } : {}
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Select$1 as Select };
|