@primer/styled-react 0.0.0-20251010151846 → 0.0.0-20251010190842
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.d.ts +36 -0
- package/dist/components/ActionList.d.ts.map +1 -0
- package/dist/components/ActionList.js +104 -0
- package/dist/components/ActionMenu.d.ts +12 -0
- package/dist/components/ActionMenu.d.ts.map +1 -0
- package/dist/components/ActionMenu.js +17 -0
- package/dist/components/Autocomplete.d.ts +15 -0
- package/dist/components/Autocomplete.d.ts.map +1 -0
- package/dist/components/Autocomplete.js +17 -0
- package/dist/components/Avatar.d.ts +13 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Avatar.js +13 -0
- package/dist/components/BaseStyles.d.ts +17 -0
- package/dist/components/BaseStyles.d.ts.map +1 -0
- package/dist/components/BaseStyles.js +51 -0
- package/dist/components/Breadcrumbs.d.ts +18 -0
- package/dist/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/components/Breadcrumbs.js +37 -0
- package/dist/components/Checkbox.d.ts +5 -0
- package/dist/components/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox.js +13 -0
- package/dist/components/CheckboxGroup.d.ts +22 -0
- package/dist/components/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/CheckboxGroup.js +38 -0
- package/dist/components/CircleBadge.d.ts +7 -0
- package/dist/components/CircleBadge.d.ts.map +1 -0
- package/dist/components/CircleBadge.js +11 -0
- package/dist/components/CounterLabel.d.ts +10 -0
- package/dist/components/CounterLabel.d.ts.map +1 -0
- package/dist/components/CounterLabel.js +13 -0
- package/dist/components/DataTable.d.ts +11 -0
- package/dist/components/DataTable.d.ts.map +1 -0
- package/dist/components/DataTable.js +32 -0
- package/dist/components/Dialog.d.ts +19 -0
- package/dist/components/Dialog.d.ts.map +1 -0
- package/dist/components/Dialog.js +42 -0
- package/dist/components/FeatureFlaggedTheming.d.ts +6 -0
- package/dist/components/FeatureFlaggedTheming.d.ts.map +1 -0
- package/dist/components/FeatureFlaggedTheming.js +54 -0
- package/dist/components/Flash.js +11 -0
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Header.js +51 -0
- package/dist/components/Heading.d.ts +8 -0
- package/dist/components/Heading.d.ts.map +1 -0
- package/dist/components/Heading.js +11 -0
- package/dist/components/Label.d.ts +9 -0
- package/dist/components/Label.d.ts.map +1 -0
- package/dist/components/Label.js +25 -0
- package/dist/components/Link.d.ts +7 -0
- package/dist/components/Link.d.ts.map +1 -0
- package/dist/components/Link.js +25 -0
- package/dist/components/LinkButton.js +11 -0
- package/dist/components/NavList.d.ts +33 -0
- package/dist/components/NavList.d.ts.map +1 -0
- package/dist/components/NavList.js +56 -0
- package/dist/components/Overlay.d.ts +7 -0
- package/dist/components/Overlay.d.ts.map +1 -0
- package/dist/components/Overlay.js +11 -0
- package/dist/components/PageHeader.d.ts +18 -14
- package/dist/components/PageHeader.d.ts.map +1 -1
- package/dist/{PageHeader-BYlYLcfB.js → components/PageHeader.js} +30 -9
- package/dist/components/PageLayout.d.ts +18 -0
- package/dist/components/PageLayout.d.ts.map +1 -0
- package/dist/components/PageLayout.js +39 -0
- package/dist/components/RadioGroup.d.ts +22 -0
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/components/RadioGroup.js +38 -0
- package/dist/components/RelativeTime.d.ts +6 -0
- package/dist/components/RelativeTime.d.ts.map +1 -0
- package/dist/components/RelativeTime.js +13 -0
- package/dist/components/SegmentedControl.d.ts +12 -0
- package/dist/components/SegmentedControl.d.ts.map +1 -0
- package/dist/components/SegmentedControl.js +27 -0
- package/dist/components/Spinner.d.ts +5 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +11 -0
- package/dist/components/StateLabel.d.ts +9 -0
- package/dist/components/StateLabel.d.ts.map +1 -0
- package/dist/components/StateLabel.js +13 -0
- package/dist/components/SubNav.d.ts +9 -0
- package/dist/components/SubNav.d.ts.map +1 -0
- package/dist/components/SubNav.js +23 -0
- package/dist/components/Text.d.ts +15 -0
- package/dist/components/Text.d.ts.map +1 -0
- package/dist/components/Text.js +25 -0
- package/dist/components/ThemeProvider.d.ts +30 -0
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/components/ThemeProvider.js +202 -0
- package/dist/components/Timeline.d.ts +26 -0
- package/dist/components/Timeline.d.ts.map +1 -0
- package/dist/components/Timeline.js +46 -0
- package/dist/components/ToggleSwitch.d.ts +6 -0
- package/dist/components/ToggleSwitch.d.ts.map +1 -0
- package/dist/components/ToggleSwitch.js +13 -0
- package/dist/components/Token.d.ts +8 -0
- package/dist/components/Token.d.ts.map +1 -0
- package/dist/components/Token.js +25 -0
- package/dist/components/Tooltip.d.ts +6 -0
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip.js +13 -0
- package/dist/components/Truncate.d.ts +7 -0
- package/dist/components/Truncate.d.ts.map +1 -0
- package/dist/components/Truncate.js +11 -0
- package/dist/components/UnderlineNav.d.ts +11 -0
- package/dist/components/UnderlineNav.d.ts.map +1 -0
- package/dist/components/UnderlineNav.js +43 -0
- package/dist/components/UnderlinePanels.d.ts +12 -0
- package/dist/components/UnderlinePanels.d.ts.map +1 -0
- package/dist/components/UnderlinePanels.js +27 -0
- package/dist/components/deprecated/ActionList.d.ts +23 -0
- package/dist/components/deprecated/ActionList.d.ts.map +1 -0
- package/dist/components/deprecated/ActionList.js +48 -0
- package/dist/components/deprecated/DialogV1.d.ts +11 -0
- package/dist/components/deprecated/DialogV1.d.ts.map +1 -0
- package/dist/components/deprecated/DialogV1.js +44 -0
- package/dist/components/deprecated/Octicon.d.ts +17 -0
- package/dist/components/deprecated/Octicon.d.ts.map +1 -0
- package/dist/components/deprecated/Octicon.js +39 -0
- package/dist/components/deprecated/TabNav.d.ts +9 -0
- package/dist/components/deprecated/TabNav.d.ts.map +1 -0
- package/dist/components/deprecated/TabNav.js +44 -0
- package/dist/components/deprecated/Tooltip.d.ts +13 -0
- package/dist/components/deprecated/Tooltip.d.ts.map +1 -0
- package/dist/components/deprecated/Tooltip.js +31 -0
- package/dist/components.json +60 -1
- package/dist/deprecated.d.ts +5 -1
- package/dist/deprecated.d.ts.map +1 -1
- package/dist/deprecated.js +5 -1
- package/dist/experimental.d.ts +4 -1
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +5 -5
- package/dist/index.d.ts +48 -81
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +36 -223
- package/dist/styled-props.d.ts +5 -0
- package/dist/styled-props.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Dialog as Dialog$1, Box } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const DialogImpl = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
|
|
6
|
+
// @ts-expect-error - PrimerDialog is not recognized as a valid component type
|
|
7
|
+
return /*#__PURE__*/jsx(Box, {
|
|
8
|
+
as: Dialog$1,
|
|
9
|
+
ref: ref,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
const DialogHeader = /*#__PURE__*/forwardRef(function DialogHeader(props, ref) {
|
|
14
|
+
return /*#__PURE__*/jsx(Box, {
|
|
15
|
+
as: Dialog$1.Header,
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
const DialogBody = /*#__PURE__*/forwardRef(function DialogBody(props, ref) {
|
|
21
|
+
// @ts-expect-error - PrimerDialog.Body is not recognized as a valid component type
|
|
22
|
+
return /*#__PURE__*/jsx(Box, {
|
|
23
|
+
as: Dialog$1.Body,
|
|
24
|
+
ref: ref,
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const DialogFooter = /*#__PURE__*/forwardRef(function DialogFooter(props, ref) {
|
|
29
|
+
return /*#__PURE__*/jsx(Box, {
|
|
30
|
+
as: Dialog$1.Footer,
|
|
31
|
+
ref: ref,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
const Dialog = Object.assign(DialogImpl, {
|
|
36
|
+
Buttons: Dialog$1.Buttons,
|
|
37
|
+
Header: DialogHeader,
|
|
38
|
+
Body: DialogBody,
|
|
39
|
+
Footer: DialogFooter
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export { Dialog };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ThemeProviderProps, type BaseStylesProps, useTheme as primerReactUseTheme, useColorSchemeVar as primerReactUseColorSchemeVar } from '@primer/react';
|
|
2
|
+
export declare const ThemeProvider: React.FC<React.PropsWithChildren<ThemeProviderProps>>;
|
|
3
|
+
export declare const BaseStyles: React.FC<React.PropsWithChildren<BaseStylesProps>>;
|
|
4
|
+
export declare const useTheme: typeof primerReactUseTheme;
|
|
5
|
+
export declare const useColorSchemeVar: typeof primerReactUseColorSchemeVar;
|
|
6
|
+
//# sourceMappingURL=FeatureFlaggedTheming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlaggedTheming.d.ts","sourceRoot":"","sources":["../../src/components/FeatureFlaggedTheming.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,eAAe,EACpB,QAAQ,IAAI,mBAAmB,EAC/B,iBAAiB,IAAI,4BAA4B,EAClD,MAAM,eAAe,CAAA;AAStB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAO/E,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAOzE,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,OAAO,mBAM7B,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,OAAO,4BAMtC,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ThemeProvider as ThemeProvider$2, useTheme as useTheme$2, useColorSchemeVar as useColorSchemeVar$2, BaseStyles as BaseStyles$2 } from '@primer/react';
|
|
2
|
+
import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, useColorSchemeVar as useColorSchemeVar$1 } from './ThemeProvider.js';
|
|
3
|
+
import { BaseStyles as BaseStyles$1 } from './BaseStyles.js';
|
|
4
|
+
import { useFeatureFlag } from '@primer/react/experimental';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
const ThemeProvider = ({
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}) => {
|
|
11
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
12
|
+
if (enabled) {
|
|
13
|
+
return /*#__PURE__*/jsx(ThemeProvider$1, {
|
|
14
|
+
...props,
|
|
15
|
+
children: children
|
|
16
|
+
});
|
|
17
|
+
} else {
|
|
18
|
+
return /*#__PURE__*/jsx(ThemeProvider$2, {
|
|
19
|
+
...props,
|
|
20
|
+
children: children
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const BaseStyles = ({
|
|
25
|
+
children,
|
|
26
|
+
...props
|
|
27
|
+
}) => {
|
|
28
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
29
|
+
if (enabled) {
|
|
30
|
+
return /*#__PURE__*/jsx(BaseStyles$1, {
|
|
31
|
+
...props,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
} else {
|
|
35
|
+
return /*#__PURE__*/jsx(BaseStyles$2, {
|
|
36
|
+
...props,
|
|
37
|
+
children: children
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const useTheme = () => {
|
|
42
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
43
|
+
const styledReactResults = useTheme$1();
|
|
44
|
+
const primerReactResults = useTheme$2();
|
|
45
|
+
return enabled ? styledReactResults : primerReactResults;
|
|
46
|
+
};
|
|
47
|
+
const useColorSchemeVar = (values, fallback) => {
|
|
48
|
+
const enabled = useFeatureFlag('primer_react_use_styled_react_theming');
|
|
49
|
+
const styledReactResults = useColorSchemeVar$1(values, fallback);
|
|
50
|
+
const primerReactResults = useColorSchemeVar$2(values, fallback);
|
|
51
|
+
return enabled ? styledReactResults : primerReactResults;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { BaseStyles, ThemeProvider, useColorSchemeVar, useTheme };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Flash as Flash$1, sx } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const Flash = styled(Flash$1).withConfig({
|
|
5
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "Flash",
|
|
8
|
+
componentId: "sc-413izo-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
export { Flash };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,eAAe,IAAI,qBAAqB,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../src/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,eAAe,IAAI,qBAAqB,EAG9C,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAU7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAcrD,QAAA,MAAM,MAAM;;;CAGV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,CAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Box, Header as Header$1 } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const StyledHeader = /*#__PURE__*/forwardRef(function Header(props, ref) {
|
|
6
|
+
return /*#__PURE__*/jsx(Box, {
|
|
7
|
+
as: Header$1,
|
|
8
|
+
ref: ref,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
const HeaderImpl = /*#__PURE__*/forwardRef(({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeader, {
|
|
16
|
+
...props,
|
|
17
|
+
...(as ? {
|
|
18
|
+
forwardedAs: as
|
|
19
|
+
} : {}),
|
|
20
|
+
ref: ref
|
|
21
|
+
}));
|
|
22
|
+
const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
|
|
23
|
+
return /*#__PURE__*/jsx(Box, {
|
|
24
|
+
as: Header$1.Item,
|
|
25
|
+
ref: ref,
|
|
26
|
+
...props
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
const StyledHeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
|
|
30
|
+
return /*#__PURE__*/jsx(Box, {
|
|
31
|
+
as: Header$1.Link,
|
|
32
|
+
ref: ref,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const HeaderLink = /*#__PURE__*/forwardRef(({
|
|
37
|
+
as,
|
|
38
|
+
...props
|
|
39
|
+
}, ref) => /*#__PURE__*/jsx(StyledHeaderLink, {
|
|
40
|
+
...props,
|
|
41
|
+
...(as ? {
|
|
42
|
+
forwardedAs: as
|
|
43
|
+
} : {}),
|
|
44
|
+
ref: ref
|
|
45
|
+
}));
|
|
46
|
+
const Header = Object.assign(HeaderImpl, {
|
|
47
|
+
Item: HeaderItem,
|
|
48
|
+
Link: HeaderLink
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { Header };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type HeadingProps as PrimerHeadingProps } from '@primer/react';
|
|
2
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type HeadingLevels = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
|
+
type HeadingProps = PrimerHeadingProps & SxProp;
|
|
6
|
+
declare const Heading: ForwardRefComponent<HeadingLevels, HeadingProps>;
|
|
7
|
+
export { Heading, type HeadingProps };
|
|
8
|
+
//# sourceMappingURL=Heading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../src/components/Heading.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,eAAe,CAAA;AACrE,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AACvD,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAGrC,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAE5D,KAAK,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE/C,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,aAAa,EAAE,YAAY,CAI7D,CAAA;AAED,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Heading as Heading$1, sx } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const Heading = styled(Heading$1).withConfig({
|
|
5
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "Heading",
|
|
8
|
+
componentId: "sc-1vc165i-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
export { Heading };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type LabelProps as PrimerLabelProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
+
type LabelProps = PrimerLabelProps & SxProp & {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
};
|
|
7
|
+
declare const Label: ForwardRefComponent<"span", LabelProps>;
|
|
8
|
+
export { Label, type LabelProps };
|
|
9
|
+
//# sourceMappingURL=Label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.ts","sourceRoot":"","sources":["../../src/components/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,EAAuB,MAAM,eAAe,CAAA;AACvF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,KAAK,UAAU,GAAG,gBAAgB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQtE,QAAA,MAAM,KAAK,EAEL,mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAE7C,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Label as Label$1, sx } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import styled from 'styled-components';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const StyledLabel = styled(Label$1).withConfig({
|
|
7
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
8
|
+
}).withConfig({
|
|
9
|
+
displayName: "Label__StyledLabel",
|
|
10
|
+
componentId: "sc-1cpass9-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const Label = /*#__PURE__*/forwardRef(({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
return /*#__PURE__*/jsx(StyledLabel, {
|
|
17
|
+
...props,
|
|
18
|
+
...(as ? {
|
|
19
|
+
forwardedAs: as
|
|
20
|
+
} : {}),
|
|
21
|
+
ref: ref
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { Label };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type LinkProps as PrimerLinkProps } from '@primer/react';
|
|
2
|
+
import { type SxProp } from '../sx';
|
|
3
|
+
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
|
+
type LinkProps = PrimerLinkProps & SxProp;
|
|
5
|
+
declare const Link: ForwardRefComponent<"a", LinkProps>;
|
|
6
|
+
export { Link, type LinkProps };
|
|
7
|
+
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../src/components/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,IAAI,eAAe,EAAC,MAAM,eAAe,CAAA;AAEnF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,KAAK,SAAS,GAAG,eAAe,GAAG,MAAM,CAAA;AAQzC,QAAA,MAAM,IAAI,EAEJ,mBAAmB,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;AAEzC,OAAO,EAAC,IAAI,EAAE,KAAK,SAAS,EAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Link as Link$1, sx } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const StyledLink = styled(Link$1).withConfig({
|
|
7
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
8
|
+
}).withConfig({
|
|
9
|
+
displayName: "Link__StyledLink",
|
|
10
|
+
componentId: "sc-1syctfj-0"
|
|
11
|
+
})(["", ""], sx);
|
|
12
|
+
const Link = /*#__PURE__*/forwardRef(({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => {
|
|
16
|
+
return /*#__PURE__*/jsx(StyledLink, {
|
|
17
|
+
...props,
|
|
18
|
+
...(as ? {
|
|
19
|
+
forwardedAs: as
|
|
20
|
+
} : {}),
|
|
21
|
+
ref: ref
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { Link };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LinkButton as LinkButton$1, sx } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const LinkButton = styled(LinkButton$1).withConfig({
|
|
5
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "LinkButton",
|
|
8
|
+
componentId: "sc-1v6zkmg-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
export { LinkButton };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { NavList as PrimerNavList } from '@primer/react';
|
|
2
|
+
import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps, NavListGroupHeadingProps as PrimerNavListGroupHeadingProps, NavListLeadingVisualProps as PrimerNavListLeadingVisualProps } from '@primer/react';
|
|
3
|
+
import { type PropsWithChildren } from 'react';
|
|
4
|
+
import { type SxProp } from '../sx';
|
|
5
|
+
type RefComponent<E extends HTMLElement, P> = React.ForwardRefExoticComponent<P & React.RefAttributes<E>>;
|
|
6
|
+
type NavListProps = PropsWithChildren<PrimerNavListProps> & SxProp;
|
|
7
|
+
declare const NavListItem: import("react").ForwardRefExoticComponent<PrimerNavListItemProps & {
|
|
8
|
+
children?: import("react").ReactNode | undefined;
|
|
9
|
+
} & SxProp & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
declare const NavListGroup: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLLIElement> & {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
title?: string;
|
|
13
|
+
} & {
|
|
14
|
+
children?: import("react").ReactNode | undefined;
|
|
15
|
+
} & SxProp & import("react").RefAttributes<HTMLLIElement>>;
|
|
16
|
+
type NavListGroupHeadingProps = PropsWithChildren<PrimerNavListGroupHeadingProps> & SxProp;
|
|
17
|
+
declare const NavListGroupHeading: RefComponent<HTMLElement, NavListGroupHeadingProps>;
|
|
18
|
+
type NavListLeadingVisualProps = PropsWithChildren<PrimerNavListLeadingVisualProps> & SxProp;
|
|
19
|
+
declare const NavListLeadingVisual: RefComponent<HTMLSpanElement, NavListLeadingVisualProps>;
|
|
20
|
+
type NavListCompound = React.ForwardRefExoticComponent<NavListProps & React.RefAttributes<HTMLElement>> & {
|
|
21
|
+
Item: typeof NavListItem;
|
|
22
|
+
Group: typeof NavListGroup;
|
|
23
|
+
GroupHeading: typeof NavListGroupHeading;
|
|
24
|
+
LeadingVisual: typeof NavListLeadingVisual;
|
|
25
|
+
SubNav: typeof PrimerNavList.SubNav;
|
|
26
|
+
Divider: typeof PrimerNavList.Divider;
|
|
27
|
+
TrailingVisual: typeof PrimerNavList.TrailingVisual;
|
|
28
|
+
TrailingAction: typeof PrimerNavList.TrailingAction;
|
|
29
|
+
GroupExpand: typeof PrimerNavList.GroupExpand;
|
|
30
|
+
};
|
|
31
|
+
declare const NavList: NavListCompound;
|
|
32
|
+
export { NavList, type NavListProps };
|
|
33
|
+
//# sourceMappingURL=NavList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAM,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,EAE1C,wBAAwB,IAAI,8BAA8B,EAC1D,yBAAyB,IAAI,+BAA+B,EAC7D,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACxD,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,YAAY,CAAC,CAAC,SAAS,WAAW,EAAE,CAAC,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAA;AAEzG,KAAK,YAAY,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAA;AAQlE,QAAA,MAAM,WAAW;;8DAGf,CAAA;AAIF,QAAA,MAAM,YAAY;;;;;0DAGhB,CAAA;AAEF,KAAK,wBAAwB,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAA;AAE1F,QAAA,MAAM,mBAAmB,EAGnB,YAAY,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAA;AAEzD,KAAK,yBAAyB,GAAG,iBAAiB,CAAC,+BAA+B,CAAC,GAAG,MAAM,CAAA;AAE5F,QAAA,MAAM,oBAAoB,EAKrB,YAAY,CAAC,eAAe,EAAE,yBAAyB,CAAC,CAAA;AAE7D,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,YAAY,CAAA;IAC1B,YAAY,EAAE,OAAO,mBAAmB,CAAA;IACxC,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"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { NavList as NavList$1, Box } from '@primer/react';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
const NavListImpl = /*#__PURE__*/forwardRef(function NavList(props, ref) {
|
|
6
|
+
return /*#__PURE__*/jsx(Box, {
|
|
7
|
+
as: NavList$1,
|
|
8
|
+
ref: ref,
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
const NavListItem = /*#__PURE__*/forwardRef(function NavListItem(props, ref) {
|
|
13
|
+
// @ts-expect-error - PrimerNavList.Item is not recognized as a valid component type
|
|
14
|
+
return /*#__PURE__*/jsx(Box, {
|
|
15
|
+
as: NavList$1.Item,
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
|
|
21
|
+
// @ts-expect-error - PrimerNavList.Group is not recognized as a valid component type
|
|
22
|
+
return /*#__PURE__*/jsx(Box, {
|
|
23
|
+
as: NavList$1.Group,
|
|
24
|
+
ref: ref,
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
const NavListGroupHeading = /*#__PURE__*/forwardRef(function NavListGroupHeading(props, ref) {
|
|
29
|
+
// @ts-expect-error - PrimerNavList.GroupHeading is not recognized as a valid component type
|
|
30
|
+
return /*#__PURE__*/jsx(Box, {
|
|
31
|
+
as: NavList$1.GroupHeading,
|
|
32
|
+
ref: ref,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
const NavListLeadingVisual = /*#__PURE__*/forwardRef(function NavListLeadingVisual(props, ref) {
|
|
37
|
+
// @ts-expect-error - PrimerNavList.LeadingVisual is not recognized as a valid component type
|
|
38
|
+
return /*#__PURE__*/jsx(Box, {
|
|
39
|
+
as: NavList$1.LeadingVisual,
|
|
40
|
+
ref: ref,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
const NavList = Object.assign(NavListImpl, {
|
|
45
|
+
Item: NavListItem,
|
|
46
|
+
Group: NavListGroup,
|
|
47
|
+
GroupHeading: NavListGroupHeading,
|
|
48
|
+
LeadingVisual: NavListLeadingVisual,
|
|
49
|
+
SubNav: NavList$1.SubNav,
|
|
50
|
+
Divider: NavList$1.Divider,
|
|
51
|
+
TrailingVisual: NavList$1.TrailingVisual,
|
|
52
|
+
TrailingAction: NavList$1.TrailingAction,
|
|
53
|
+
GroupExpand: NavList$1.GroupExpand
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export { NavList };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type OverlayProps as PrimerOverlayProps, type SxProp } from '@primer/react';
|
|
2
|
+
import { type ForwardRefComponent } from '../polymorphic';
|
|
3
|
+
type OverlayProps = PrimerOverlayProps & SxProp;
|
|
4
|
+
declare const Overlay: ForwardRefComponent<'div', OverlayProps>;
|
|
5
|
+
export { Overlay };
|
|
6
|
+
export type { OverlayProps };
|
|
7
|
+
//# sourceMappingURL=Overlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../src/components/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,IAAI,kBAAkB,EAAM,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AAEhH,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE/C,QAAA,MAAM,OAAO,EAAE,mBAAmB,CAAC,KAAK,EAAE,YAAY,CAIrD,CAAA;AAED,OAAO,EAAC,OAAO,EAAC,CAAA;AAChB,YAAY,EAAC,YAAY,EAAC,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Overlay as Overlay$1, sx } from '@primer/react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
|
|
4
|
+
const Overlay = styled(Overlay$1).withConfig({
|
|
5
|
+
shouldForwardProp: prop => prop !== 'sx'
|
|
6
|
+
}).withConfig({
|
|
7
|
+
displayName: "Overlay",
|
|
8
|
+
componentId: "sc-tjbd74-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
|
|
11
|
+
export { Overlay };
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { type PageHeaderProps as PrimerPageHeaderProps, type PageHeaderTitleProps as PrimerPageHeaderTitleProps, type PageHeaderActionsProps as PrimerPageHeaderActionsProps, type PageHeaderTitleAreaProps as PrimerPageHeaderTitleAreaProps } from '@primer/react';
|
|
1
|
+
import { PageHeader as PrimerPageHeader, type PageHeaderProps as PrimerPageHeaderProps, type PageHeaderTitleProps as PrimerPageHeaderTitleProps, type PageHeaderActionsProps as PrimerPageHeaderActionsProps, type PageHeaderTitleAreaProps as PrimerPageHeaderTitleAreaProps } from '@primer/react';
|
|
2
2
|
import { type SxProp } from '../sx';
|
|
3
3
|
import type { ForwardRefComponent } from '../polymorphic';
|
|
4
4
|
import type { PropsWithChildren } from 'react';
|
|
5
|
+
import React from 'react';
|
|
5
6
|
type PageHeaderProps = PrimerPageHeaderProps & SxProp;
|
|
6
7
|
type PageHeaderActionsProps = PrimerPageHeaderActionsProps & SxProp;
|
|
7
|
-
declare function PageHeaderActions({ sx, ...rest }: PageHeaderActionsProps):
|
|
8
|
+
declare function PageHeaderActions({ sx, ...rest }: PageHeaderActionsProps): React.JSX.Element;
|
|
8
9
|
type PageHeaderTitleProps = PropsWithChildren<PrimerPageHeaderTitleProps> & SxProp;
|
|
9
|
-
declare
|
|
10
|
+
declare const PageHeaderTitle: ({ as, ...props }: PageHeaderTitleProps) => React.JSX.Element;
|
|
10
11
|
type PageHeaderTitleAreaProps = PropsWithChildren<PrimerPageHeaderTitleAreaProps> & SxProp;
|
|
11
|
-
declare const
|
|
12
|
+
declare const PageHeaderTitleArea: ForwardRefComponent<'div', PageHeaderTitleAreaProps>;
|
|
13
|
+
type PageHeaderComponentType = ForwardRefComponent<'div', PageHeaderProps> & {
|
|
12
14
|
Actions: typeof PageHeaderActions;
|
|
15
|
+
ContextArea: typeof PrimerPageHeader.ContextArea;
|
|
16
|
+
ParentLink: typeof PrimerPageHeader.ParentLink;
|
|
17
|
+
ContextBar: typeof PrimerPageHeader.ContextBar;
|
|
18
|
+
TitleArea: typeof PageHeaderTitleArea;
|
|
19
|
+
ContextAreaActions: typeof PrimerPageHeader.ContextAreaActions;
|
|
20
|
+
LeadingAction: typeof PrimerPageHeader.LeadingAction;
|
|
21
|
+
Breadcrumbs: typeof PrimerPageHeader.Breadcrumbs;
|
|
22
|
+
LeadingVisual: typeof PrimerPageHeader.LeadingVisual;
|
|
13
23
|
Title: typeof PageHeaderTitle;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
TrailingVisual: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
18
|
-
Description: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
19
|
-
ContextBar: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
20
|
-
LeadingAction: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
21
|
-
Breadcrumbs: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
22
|
-
LeadingVisual: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
23
|
-
TrailingAction: import("react").FC<PropsWithChildren<import("@primer/react").PageHeaderChildrenPropTypes>>;
|
|
24
|
+
TrailingVisual: typeof PrimerPageHeader.TrailingVisual;
|
|
25
|
+
Description: typeof PrimerPageHeader.Description;
|
|
26
|
+
TrailingAction: typeof PrimerPageHeader.TrailingAction;
|
|
24
27
|
};
|
|
28
|
+
declare const PageHeader: PageHeaderComponentType;
|
|
25
29
|
export { PageHeader };
|
|
26
30
|
export type { PageHeaderProps, PageHeaderActionsProps, PageHeaderTitleProps };
|
|
27
31
|
//# sourceMappingURL=PageHeader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/components/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../src/components/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,IAAI,gBAAgB,EAC9B,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,oBAAoB,IAAI,0BAA0B,EACvD,KAAK,sBAAsB,IAAI,4BAA4B,EAC3D,KAAK,wBAAwB,IAAI,8BAA8B,EAChE,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAcrD,KAAK,sBAAsB,GAAG,4BAA4B,GAAG,MAAM,CAAA;AAEnE,iBAAS,iBAAiB,CAAC,EAAC,EAAE,EAAE,GAAG,IAAI,EAAC,EAAE,sBAAsB,qBAY/D;AAED,KAAK,oBAAoB,GAAG,iBAAiB,CAAC,0BAA0B,CAAC,GAAG,MAAM,CAAA;AA4BlF,QAAA,MAAM,eAAe,GAAI,kBAAgB,oBAAoB,sBAE5D,CAAA;AAED,KAAK,wBAAwB,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,GAAG,MAAM,CAAA;AAE1F,QAAA,MAAM,mBAAmB,EAAE,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,CAM7E,CAAA;AAED,KAAK,uBAAuB,GAAG,mBAAmB,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG;IAC3E,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,SAAS,EAAE,OAAO,mBAAmB,CAAA;IACrC,kBAAkB,EAAE,OAAO,gBAAgB,CAAC,kBAAkB,CAAA;IAC9D,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;IACtD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;CACvD,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,uBAchB,CAAA;AAEF,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAC,CAAA"}
|
|
@@ -1,13 +1,24 @@
|
|
|
1
1
|
import { PageHeader as PageHeader$1, sx, Box } from '@primer/react';
|
|
2
2
|
import styled from 'styled-components';
|
|
3
|
+
import React from 'react';
|
|
3
4
|
import { jsx } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
const
|
|
6
|
+
const StyledPageHeader = styled(PageHeader$1).withConfig({
|
|
6
7
|
shouldForwardProp: prop => prop !== 'sx'
|
|
7
8
|
}).withConfig({
|
|
8
|
-
displayName: "
|
|
9
|
+
displayName: "PageHeader__StyledPageHeader",
|
|
9
10
|
componentId: "sc-1g9symn-0"
|
|
10
11
|
})(["", ""], sx);
|
|
12
|
+
const PageHeaderImpl = /*#__PURE__*/React.forwardRef(({
|
|
13
|
+
as,
|
|
14
|
+
...props
|
|
15
|
+
}, ref) => /*#__PURE__*/jsx(StyledPageHeader, {
|
|
16
|
+
...props,
|
|
17
|
+
...(as ? {
|
|
18
|
+
forwardedAs: as
|
|
19
|
+
} : {}),
|
|
20
|
+
ref: ref
|
|
21
|
+
}));
|
|
11
22
|
function PageHeaderActions({
|
|
12
23
|
sx,
|
|
13
24
|
...rest
|
|
@@ -31,7 +42,7 @@ function PageHeaderActions({
|
|
|
31
42
|
sx: sx
|
|
32
43
|
});
|
|
33
44
|
}
|
|
34
|
-
function
|
|
45
|
+
function StyledPageHeaderTitle({
|
|
35
46
|
sx,
|
|
36
47
|
...rest
|
|
37
48
|
}) {
|
|
@@ -62,6 +73,15 @@ function PageHeaderTitle({
|
|
|
62
73
|
sx: sx
|
|
63
74
|
});
|
|
64
75
|
}
|
|
76
|
+
const PageHeaderTitle = ({
|
|
77
|
+
as,
|
|
78
|
+
...props
|
|
79
|
+
}) => /*#__PURE__*/jsx(StyledPageHeaderTitle, {
|
|
80
|
+
...props,
|
|
81
|
+
...(as ? {
|
|
82
|
+
forwardedAs: as
|
|
83
|
+
} : {})
|
|
84
|
+
});
|
|
65
85
|
const PageHeaderTitleArea = styled(PageHeader$1.TitleArea).withConfig({
|
|
66
86
|
shouldForwardProp: prop => prop !== 'sx'
|
|
67
87
|
}).withConfig({
|
|
@@ -70,17 +90,18 @@ const PageHeaderTitleArea = styled(PageHeader$1.TitleArea).withConfig({
|
|
|
70
90
|
})(["", ""], sx);
|
|
71
91
|
const PageHeader = Object.assign(PageHeaderImpl, {
|
|
72
92
|
Actions: PageHeaderActions,
|
|
73
|
-
Title: PageHeaderTitle,
|
|
74
|
-
TitleArea: PageHeaderTitleArea,
|
|
75
93
|
ContextArea: PageHeader$1.ContextArea,
|
|
76
|
-
|
|
77
|
-
TrailingVisual: PageHeader$1.TrailingVisual,
|
|
78
|
-
Description: PageHeader$1.Description,
|
|
94
|
+
ParentLink: PageHeader$1.ParentLink,
|
|
79
95
|
ContextBar: PageHeader$1.ContextBar,
|
|
96
|
+
TitleArea: PageHeaderTitleArea,
|
|
97
|
+
ContextAreaActions: PageHeader$1.ContextAreaActions,
|
|
80
98
|
LeadingAction: PageHeader$1.LeadingAction,
|
|
81
99
|
Breadcrumbs: PageHeader$1.Breadcrumbs,
|
|
82
100
|
LeadingVisual: PageHeader$1.LeadingVisual,
|
|
101
|
+
Title: PageHeaderTitle,
|
|
102
|
+
TrailingVisual: PageHeader$1.TrailingVisual,
|
|
103
|
+
Description: PageHeader$1.Description,
|
|
83
104
|
TrailingAction: PageHeader$1.TrailingAction
|
|
84
105
|
});
|
|
85
106
|
|
|
86
|
-
export { PageHeader
|
|
107
|
+
export { PageHeader };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { type PropsWithChildren } from 'react';
|
|
2
|
+
import type { PageLayoutProps as PrimerPageLayoutProps, PageLayoutContentProps as PrimerPageLayoutContentProps, PageLayoutPaneProps as PrimerPageLayoutPaneProps } from '@primer/react';
|
|
3
|
+
import { type SxProp } from '../sx';
|
|
4
|
+
type PageLayoutProps = PropsWithChildren<PrimerPageLayoutProps> & SxProp;
|
|
5
|
+
declare const PageLayout: React.ForwardRefExoticComponent<PrimerPageLayoutProps & {
|
|
6
|
+
children?: React.ReactNode | undefined;
|
|
7
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>> & {
|
|
8
|
+
Content: React.ForwardRefExoticComponent<PrimerPageLayoutContentProps & {
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
10
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Header: React.FC<React.PropsWithChildren<import("@primer/react").PageLayoutHeaderProps>>;
|
|
12
|
+
Pane: React.ForwardRefExoticComponent<PrimerPageLayoutPaneProps & {
|
|
13
|
+
children?: React.ReactNode | undefined;
|
|
14
|
+
} & SxProp & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Footer: React.FC<React.PropsWithChildren<import("@primer/react").PageLayoutFooterProps>>;
|
|
16
|
+
};
|
|
17
|
+
export { PageLayout, type PageLayoutProps };
|
|
18
|
+
//# sourceMappingURL=PageLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageLayout.d.ts","sourceRoot":"","sources":["../../src/components/PageLayout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EACV,eAAe,IAAI,qBAAqB,EACxC,sBAAsB,IAAI,4BAA4B,EACtD,mBAAmB,IAAI,yBAAyB,EACjD,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAMrC,KAAK,eAAe,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAA;AAmBxE,QAAA,MAAM,UAAU;;;;;;;;;;;CAKd,CAAA;AAEF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import styled from 'styled-components';
|
|
3
|
+
import { sx, PageLayout as PageLayout$1 } from '@primer/react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
const Wrapper = styled.div.withConfig({
|
|
7
|
+
displayName: "PageLayout__Wrapper",
|
|
8
|
+
componentId: "sc-pjybtc-0"
|
|
9
|
+
})(["", ""], sx);
|
|
10
|
+
const PageLayoutImpl = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
11
|
+
// @ts-expect-error - PrimerPageLayout is not recognized as a valid component type
|
|
12
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
13
|
+
as: PageLayout$1,
|
|
14
|
+
ref: ref,
|
|
15
|
+
...props
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
const PageLayoutContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
19
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
20
|
+
as: PageLayout$1.Content,
|
|
21
|
+
ref: ref,
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
26
|
+
return /*#__PURE__*/jsx(Wrapper, {
|
|
27
|
+
as: PageLayout$1.Pane,
|
|
28
|
+
ref: ref,
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const PageLayout = Object.assign(PageLayoutImpl, {
|
|
33
|
+
Content: PageLayoutContent,
|
|
34
|
+
Header: PageLayout$1.Header,
|
|
35
|
+
Pane: PageLayoutPane,
|
|
36
|
+
Footer: PageLayout$1.Footer
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export { PageLayout };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type RadioGroupProps as PrimerRadioGroupProps } from '@primer/react';
|
|
2
|
+
import React, { type PropsWithChildren } from 'react';
|
|
3
|
+
import type { SxProp } from '../sx';
|
|
4
|
+
export type RadioGroupProps = PropsWithChildren<PrimerRadioGroupProps> & SxProp;
|
|
5
|
+
type CheckboxOrRadioGroupLabelProps = PropsWithChildren<{
|
|
6
|
+
className?: string;
|
|
7
|
+
visuallyHidden?: boolean;
|
|
8
|
+
} & SxProp>;
|
|
9
|
+
type CheckboxOrRadioGroupCaptionProps = PropsWithChildren<{
|
|
10
|
+
className?: string;
|
|
11
|
+
} & SxProp>;
|
|
12
|
+
type CheckboxOrRadioGroupValidationProps = PropsWithChildren<{
|
|
13
|
+
className?: string;
|
|
14
|
+
variant: 'error' | 'success';
|
|
15
|
+
} & SxProp>;
|
|
16
|
+
export declare const RadioGroup: ((props: RadioGroupProps) => React.JSX.Element) & {
|
|
17
|
+
Label: (props: CheckboxOrRadioGroupLabelProps) => React.JSX.Element;
|
|
18
|
+
Caption: (props: CheckboxOrRadioGroupCaptionProps) => React.JSX.Element;
|
|
19
|
+
Validation: (props: CheckboxOrRadioGroupValidationProps) => React.JSX.Element;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../src/components/RadioGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,eAAe,IAAI,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAChH,OAAO,KAAK,EAAE,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AACnD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,GAAG,MAAM,CAAA;AAO/E,KAAK,8BAA8B,GAAG,iBAAiB,CACrD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,gCAAgC,GAAG,iBAAiB,CACvD;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CACX,CAAA;AAKD,KAAK,mCAAmC,GAAG,iBAAiB,CAC1D;IACE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;CAC7B,GAAG,MAAM,CACX,CAAA;AAKD,eAAO,MAAM,UAAU,WAlCQ,eAAe;mBAWJ,8BAA8B;qBAS5B,gCAAgC;wBAU7B,mCAAmC;CAQhF,CAAA"}
|