@primer/styled-react 1.0.0-rc.3 → 1.0.0-rc.4

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.
Files changed (54) hide show
  1. package/README.md +18 -0
  2. package/dist/PageHeader-Bvki2mbE.js +87 -0
  3. package/dist/components/Box.d.ts +2 -0
  4. package/dist/components/Box.d.ts.map +1 -0
  5. package/dist/components/Checkbox.d.ts +5 -0
  6. package/dist/components/Checkbox.d.ts.map +1 -0
  7. package/dist/components/CounterLabel.d.ts +10 -0
  8. package/dist/components/CounterLabel.d.ts.map +1 -0
  9. package/dist/components/Flash.d.ts +8 -0
  10. package/dist/components/Flash.d.ts.map +1 -0
  11. package/dist/components/Header.d.ts +11 -0
  12. package/dist/components/Header.d.ts.map +1 -0
  13. package/dist/components/LinkButton.d.ts +7 -0
  14. package/dist/components/LinkButton.d.ts.map +1 -0
  15. package/dist/components/PageHeader.d.ts +30 -0
  16. package/dist/components/PageHeader.d.ts.map +1 -0
  17. package/dist/components/RadioGroup.d.ts +22 -0
  18. package/dist/components/RadioGroup.d.ts.map +1 -0
  19. package/dist/components/RelativeTime.d.ts +6 -0
  20. package/dist/components/RelativeTime.d.ts.map +1 -0
  21. package/dist/components/SegmentedControl.d.ts +12 -0
  22. package/dist/components/SegmentedControl.d.ts.map +1 -0
  23. package/dist/components/Spinner.d.ts +6 -0
  24. package/dist/components/Spinner.d.ts.map +1 -0
  25. package/dist/components/StateLabel.d.ts +9 -0
  26. package/dist/components/StateLabel.d.ts.map +1 -0
  27. package/dist/components/StateLabelProps.d.ts +8 -0
  28. package/dist/components/StateLabelProps.d.ts.map +1 -0
  29. package/dist/components/SubNav.d.ts +9 -0
  30. package/dist/components/SubNav.d.ts.map +1 -0
  31. package/dist/components/Timeline.d.ts +26 -0
  32. package/dist/components/Timeline.d.ts.map +1 -0
  33. package/dist/components/ToggleSwitch.d.ts +6 -0
  34. package/dist/components/ToggleSwitch.d.ts.map +1 -0
  35. package/dist/components/Truncate.d.ts +7 -0
  36. package/dist/components/Truncate.d.ts.map +1 -0
  37. package/dist/components/UnderlineNav.d.ts +9 -0
  38. package/dist/components/UnderlineNav.d.ts.map +1 -0
  39. package/dist/components.json +92 -0
  40. package/dist/deprecated.d.ts +1 -1
  41. package/dist/deprecated.d.ts.map +1 -1
  42. package/dist/experimental.d.ts +2 -1
  43. package/dist/experimental.d.ts.map +1 -1
  44. package/dist/experimental.js +5 -1
  45. package/dist/index.d.ts +52 -24
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +206 -34
  48. package/dist/polymorphic.d.ts +38 -0
  49. package/dist/polymorphic.d.ts.map +1 -0
  50. package/dist/styled-props.d.ts +5 -0
  51. package/dist/styled-props.d.ts.map +1 -0
  52. package/dist/sx.d.ts +2 -0
  53. package/dist/sx.d.ts.map +1 -0
  54. package/package.json +6 -4
package/README.md CHANGED
@@ -28,6 +28,24 @@ to an alternative styling solution, such as CSS Modules.
28
28
 
29
29
  The documentation for `@primer/react` lives at [primer.style](https://primer.style). There, you'll find detailed documentation on getting started, all of the components, our theme, our principles, and more.
30
30
 
31
+ ## Components List
32
+
33
+ A machine-readable list of all exported components, utilities, and types is available at build time:
34
+
35
+ ```javascript
36
+ import componentsData from '@primer/styled-react/components.json' with {type: 'json'}
37
+
38
+ console.log(componentsData.components) // Array of component names
39
+ console.log(componentsData.utilities) // Array of utility names
40
+ console.log(componentsData.types) // Array of type names
41
+ ```
42
+
43
+ This JSON file is automatically generated during the build process and includes:
44
+
45
+ - `components`: All React components exported by the package
46
+ - `utilities`: Theme utilities and helper functions
47
+ - `types`: TypeScript type definitions
48
+
31
49
  ## 🙌 Contributing
32
50
 
33
51
  We love collaborating with folks inside and outside of GitHub and welcome contributions! If you're interested, check out our [contributing docs](contributor-docs/CONTRIBUTING.md) for more info on how to get started.
@@ -0,0 +1,87 @@
1
+ import { PageHeader as PageHeader$1, sx, Box } from '@primer/react';
2
+ import styled from 'styled-components';
3
+ import { jsx } from 'react/jsx-runtime';
4
+
5
+ const PageHeaderImpl = styled(PageHeader$1).withConfig({
6
+ shouldForwardProp: prop => prop !== 'sx'
7
+ }).withConfig({
8
+ displayName: "PageHeader__PageHeaderImpl",
9
+ componentId: "sc-1g9symn-0"
10
+ })(["", ""], sx);
11
+ function PageHeaderActions({
12
+ sx,
13
+ ...rest
14
+ }) {
15
+ const style = {};
16
+ if (sx) {
17
+ // @ts-ignore sx has height attribute
18
+ const {
19
+ height
20
+ } = sx;
21
+ if (height) {
22
+ style['--custom-height'] = height;
23
+ }
24
+ }
25
+
26
+ // @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Actions
27
+ return /*#__PURE__*/jsx(Box, {
28
+ ...rest,
29
+ as: PageHeader$1.Actions,
30
+ style: style,
31
+ sx: sx
32
+ });
33
+ }
34
+ function PageHeaderTitle({
35
+ sx,
36
+ ...rest
37
+ }) {
38
+ const style = {};
39
+ if (sx) {
40
+ // @ts-ignore sx can have color attribute
41
+ const {
42
+ fontSize,
43
+ lineHeight,
44
+ fontWeight
45
+ } = sx;
46
+ if (fontSize) {
47
+ style['--custom-font-size'] = fontSize;
48
+ }
49
+ if (lineHeight) {
50
+ style['--custom-line-height'] = lineHeight;
51
+ }
52
+ if (fontWeight) {
53
+ style['--custom-font-weight'] = fontWeight;
54
+ }
55
+ }
56
+
57
+ // @ts-expect-error type mismatch between Box usage here and PrimerPageHeader.Title
58
+ return /*#__PURE__*/jsx(Box, {
59
+ ...rest,
60
+ as: PageHeader$1.Title,
61
+ style: style,
62
+ sx: sx
63
+ });
64
+ }
65
+ const PageHeaderTitleArea = styled(PageHeader$1.TitleArea).withConfig({
66
+ shouldForwardProp: prop => prop !== 'sx'
67
+ }).withConfig({
68
+ displayName: "PageHeader__PageHeaderTitleArea",
69
+ componentId: "sc-1g9symn-1"
70
+ })(["", ""], sx);
71
+ const PageHeader = Object.assign(PageHeaderImpl, {
72
+ Actions: PageHeaderActions,
73
+ ContextArea: PageHeader$1.ContextArea,
74
+ ParentLink: PageHeader$1.ParentLink,
75
+ ContextBar: PageHeader$1.ContextBar,
76
+ TitleArea: PageHeaderTitleArea,
77
+ ContextAreaActions: PageHeader$1.ContextAreaActions,
78
+ LeadingAction: PageHeader$1.LeadingAction,
79
+ Breadcrumbs: PageHeader$1.Breadcrumbs,
80
+ LeadingVisual: PageHeader$1.LeadingVisual,
81
+ Title: PageHeaderTitle,
82
+ TrailingVisual: PageHeader$1.TrailingVisual,
83
+ Description: PageHeader$1.Description,
84
+ TrailingAction: PageHeader$1.TrailingAction
85
+ });
86
+
87
+ export { PageHeader as P };
@@ -0,0 +1,2 @@
1
+ export { Box, type BoxProps } from '@primer/react';
2
+ //# sourceMappingURL=Box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/components/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,KAAK,QAAQ,EAAC,MAAM,eAAe,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { type CheckboxProps as PrimerCheckboxProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ export type CheckboxProps = PrimerCheckboxProps & SxProp;
4
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
5
+ //# sourceMappingURL=Checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../src/components/Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAC,MAAM,eAAe,CAAA;AAGnG,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,MAAM,CAAA;AAExD,eAAO,MAAM,QAAQ,yHAEnB,CAAA"}
@@ -0,0 +1,10 @@
1
+ import { type CounterLabelProps as PrimerCounterLabelProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ export type CounterLabelProps = PrimerCounterLabelProps & SxProp;
4
+ export declare const CounterLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
5
+ scheme?: "primary" | "secondary";
6
+ className?: string;
7
+ } & {
8
+ children?: import("react").ReactNode | undefined;
9
+ } & SxProp & import("react").RefAttributes<HTMLSpanElement>>;
10
+ //# sourceMappingURL=CounterLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CounterLabel.d.ts","sourceRoot":"","sources":["../../src/components/CounterLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,iBAAiB,IAAI,uBAAuB,EAAC,MAAM,eAAe,CAAA;AAGnH,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAEhE,eAAO,MAAM,YAAY;;;;;4DAEvB,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { type FlashProps as PrimerFlashProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ import type { ForwardRefComponent } from '../polymorphic';
4
+ type FlashProps = PrimerFlashProps & SxProp;
5
+ declare const Flash: ForwardRefComponent<'div', FlashProps>;
6
+ export { Flash };
7
+ export type { FlashProps };
8
+ //# sourceMappingURL=Flash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flash.d.ts","sourceRoot":"","sources":["../../src/components/Flash.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,IAAI,gBAAgB,EAAuB,MAAM,eAAe,CAAA;AAEvF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AACrC,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,UAAU,GAAG,gBAAgB,GAAG,MAAM,CAAA;AAE3C,QAAA,MAAM,KAAK,EAAE,mBAAmB,CAAC,KAAK,EAAE,UAAU,CAIjD,CAAA;AAED,OAAO,EAAC,KAAK,EAAC,CAAA;AACd,YAAY,EAAC,UAAU,EAAC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { type HeaderProps as PrimerHeaderProps, type HeaderItemProps as PrimerHeaderItemProps, type HeaderLinkProps as PrimerHeaderLinkProps } from '@primer/react';
2
+ import type { ForwardRefComponent } from '../polymorphic';
3
+ import type { SxProp } from '../sx';
4
+ type HeaderProps = PrimerHeaderProps & SxProp;
5
+ type HeaderItemProps = PrimerHeaderItemProps & SxProp;
6
+ declare const Header: ForwardRefComponent<"header", HeaderProps> & {
7
+ Item: import("react").ForwardRefExoticComponent<Omit<HeaderItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
8
+ Link: import("react").ForwardRefExoticComponent<Omit<PrimerHeaderLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
9
+ };
10
+ export { Header, type HeaderProps };
11
+ //# sourceMappingURL=Header.d.ts.map
@@ -0,0 +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,EAE9C,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;AAM7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAUrD,QAAA,MAAM,MAAM;;;CAGV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { type LinkButtonProps as PrimerLinkButtonProps, type SxProp } from '@primer/react';
2
+ import { type ForwardRefComponent } from '../polymorphic';
3
+ type LinkButtonProps = PrimerLinkButtonProps & SxProp;
4
+ declare const LinkButton: ForwardRefComponent<'a', LinkButtonProps>;
5
+ export { LinkButton };
6
+ export type { LinkButtonProps };
7
+ //# sourceMappingURL=LinkButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkButton.d.ts","sourceRoot":"","sources":["../../src/components/LinkButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,IAAI,qBAAqB,EAE7C,KAAK,MAAM,EACZ,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAErD,QAAA,MAAM,UAAU,EAAE,mBAAmB,CAAC,GAAG,EAAE,eAAe,CAIzD,CAAA;AAED,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAC,CAAA"}
@@ -0,0 +1,30 @@
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
+ import { type SxProp } from '../sx';
3
+ import type { ForwardRefComponent } from '../polymorphic';
4
+ import type { PropsWithChildren } from 'react';
5
+ type PageHeaderProps = PrimerPageHeaderProps & SxProp;
6
+ type PageHeaderActionsProps = PrimerPageHeaderActionsProps & SxProp;
7
+ declare function PageHeaderActions({ sx, ...rest }: PageHeaderActionsProps): import("react").JSX.Element;
8
+ type PageHeaderTitleProps = PropsWithChildren<PrimerPageHeaderTitleProps> & SxProp;
9
+ declare function PageHeaderTitle({ sx, ...rest }: PageHeaderTitleProps): import("react").JSX.Element;
10
+ type PageHeaderTitleAreaProps = PropsWithChildren<PrimerPageHeaderTitleAreaProps> & SxProp;
11
+ declare const PageHeaderTitleArea: ForwardRefComponent<'div', PageHeaderTitleAreaProps>;
12
+ type PageHeaderComponent = ForwardRefComponent<'div', PageHeaderProps> & {
13
+ Actions: typeof PageHeaderActions;
14
+ ContextArea: typeof PrimerPageHeader.ContextArea;
15
+ ParentLink: typeof PrimerPageHeader.ParentLink;
16
+ ContextBar: typeof PrimerPageHeader.ContextBar;
17
+ TitleArea: typeof PageHeaderTitleArea;
18
+ ContextAreaActions: typeof PrimerPageHeader.ContextAreaActions;
19
+ LeadingAction: typeof PrimerPageHeader.LeadingAction;
20
+ Breadcrumbs: typeof PrimerPageHeader.Breadcrumbs;
21
+ LeadingVisual: typeof PrimerPageHeader.LeadingVisual;
22
+ Title: typeof PageHeaderTitle;
23
+ TrailingVisual: typeof PrimerPageHeader.TrailingVisual;
24
+ Description: typeof PrimerPageHeader.Description;
25
+ TrailingAction: typeof PrimerPageHeader.TrailingAction;
26
+ };
27
+ declare const PageHeader: PageHeaderComponent;
28
+ export { PageHeader };
29
+ export type { PageHeaderProps, PageHeaderActionsProps, PageHeaderTitleProps };
30
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1 @@
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;AAE5C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAA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,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAC,CAAA"}
@@ -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"}
@@ -0,0 +1,6 @@
1
+ import { type RelativeTimeProps as PrimerRelativeTimeProps } from '@primer/react';
2
+ import React from 'react';
3
+ import type { SxProp } from '../sx';
4
+ export type RelativeTimeProps = PrimerRelativeTimeProps & SxProp;
5
+ export declare function RelativeTime(props: RelativeTimeProps): React.JSX.Element;
6
+ //# sourceMappingURL=RelativeTime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RelativeTime.d.ts","sourceRoot":"","sources":["../../src/components/RelativeTime.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,iBAAiB,IAAI,uBAAuB,EAAC,MAAM,eAAe,CAAA;AACxH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAEhE,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAGpD"}
@@ -0,0 +1,12 @@
1
+ import { type SegmentedControlProps as PrimerSegmentedControlProps, type SegmentedControlButtonProps as PrimerSegmentedControlButtonProps, type SegmentedControlIconButtonProps as PrimerSegmentedControlIconButtonProps } from '@primer/react';
2
+ import type { PropsWithChildren } from 'react';
3
+ import type { SxProp } from '../sx';
4
+ type SegmentedControlProps = PropsWithChildren<PrimerSegmentedControlProps> & SxProp;
5
+ type SegmentedControlButtonProps = PropsWithChildren<PrimerSegmentedControlButtonProps> & SxProp;
6
+ type SegmentedControlIconButtonProps = PropsWithChildren<PrimerSegmentedControlIconButtonProps> & SxProp;
7
+ declare const SegmentedControl: ((props: SegmentedControlProps) => import("react").JSX.Element) & {
8
+ Button: (props: SegmentedControlButtonProps) => import("react").JSX.Element;
9
+ IconButton: (props: SegmentedControlIconButtonProps) => import("react").JSX.Element;
10
+ };
11
+ export { SegmentedControl, type SegmentedControlProps, type SegmentedControlButtonProps, type SegmentedControlIconButtonProps, };
12
+ //# sourceMappingURL=SegmentedControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../src/components/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,IAAI,2BAA2B,EAEzD,KAAK,2BAA2B,IAAI,iCAAiC,EACrE,KAAK,+BAA+B,IAAI,qCAAqC,EAC9E,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAGjC,KAAK,qBAAqB,GAAG,iBAAiB,CAAC,2BAA2B,CAAC,GAAG,MAAM,CAAA;AACpF,KAAK,2BAA2B,GAAG,iBAAiB,CAAC,iCAAiC,CAAC,GAAG,MAAM,CAAA;AAChG,KAAK,+BAA+B,GAAG,iBAAiB,CAAC,qCAAqC,CAAC,GAAG,MAAM,CAAA;AAcxG,QAAA,MAAM,gBAAgB,WAJe,qBAAqB;oBARnB,2BAA2B;wBAIvB,+BAA+B;CAWxE,CAAA;AAEF,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,KAAK,2BAA2B,EAChC,KAAK,+BAA+B,GACrC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { type SpinnerProps as PrimerSpinnerProps } from '@primer/react';
2
+ import React from 'react';
3
+ import type { SxProp } from '../sx';
4
+ export type SpinnerProps = PrimerSpinnerProps & SxProp;
5
+ export declare function Spinner(props: SpinnerProps): React.JSX.Element;
6
+ //# sourceMappingURL=Spinner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../src/components/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,eAAe,CAAA;AACpG,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAEtD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,qBAE1C"}
@@ -0,0 +1,9 @@
1
+ import { type StateLabelProps as PrimerStateLabelProps } from '@primer/react';
2
+ import type { SxProp } from '../sx';
3
+ type StateLabelProps = PrimerStateLabelProps & SxProp;
4
+ declare const StateLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
5
+ variant?: "small" | "normal";
6
+ status: "open" | "issueOpened" | "pullOpened" | "issueClosed" | "issueClosedNotPlanned" | "pullClosed" | "pullMerged" | "draft" | "issueDraft" | "pullQueued" | "unavailable" | "closed";
7
+ } & SxProp & import("react").RefAttributes<HTMLSpanElement>>;
8
+ export { StateLabel, type StateLabelProps };
9
+ //# sourceMappingURL=StateLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateLabel.d.ts","sourceRoot":"","sources":["../../src/components/StateLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAG3G,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAErD,QAAA,MAAM,UAAU;;;4DAEd,CAAA;AAEF,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { type StateLabelProps as PrimerStateLabelProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ export type StateLabelProps = PrimerStateLabelProps & SxProp;
4
+ export declare const StateLabel: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLSpanElement> & {
5
+ variant?: "small" | "normal";
6
+ status: "open" | "issueOpened" | "pullOpened" | "issueClosed" | "issueClosedNotPlanned" | "pullClosed" | "pullMerged" | "draft" | "issueDraft" | "pullQueued" | "unavailable" | "closed";
7
+ } & SxProp & import("react").RefAttributes<HTMLSpanElement>>;
8
+ //# sourceMappingURL=StateLabelProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StateLabelProps.d.ts","sourceRoot":"","sources":["../../src/components/StateLabelProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAC,MAAM,eAAe,CAAA;AAG3G,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAE5D,eAAO,MAAM,UAAU;;;4DAErB,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { type SubNavProps as PrimerSubNavProps, type SubNavLinkProps as PrimerSubNavLinkProps } from '@primer/react';
2
+ import type { SxProp } from '../sx';
3
+ type SubNavProps = PrimerSubNavProps & SxProp;
4
+ type SubNavLinkProps = PrimerSubNavLinkProps & SxProp;
5
+ declare const SubNav: import("react").ForwardRefExoticComponent<Omit<SubNavProps, "ref"> & import("react").RefAttributes<HTMLElement>> & {
6
+ Link: import("react").ForwardRefExoticComponent<Omit<SubNavLinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
7
+ };
8
+ export { SubNav, type SubNavProps, type SubNavLinkProps };
9
+ //# sourceMappingURL=SubNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SubNav.d.ts","sourceRoot":"","sources":["../../src/components/SubNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAC9C,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,WAAW,GAAG,iBAAiB,GAAG,MAAM,CAAA;AAM7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAMrD,QAAA,MAAM,MAAM;;CAEV,CAAA;AAEF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { type TimelineProps as PrimerTimelineProps, type TimelineItemProps as PrimerTimelineItemProps, type TimelineBadgeProps as PrimerTimelineBadgeProps, type TimelineBodyProps as PrimerTimelineBodyProps, type TimelineBreakProps as PrimerTimelineBreakProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ export type TimelineProps = PrimerTimelineProps & SxProp;
4
+ export type TimelineItemProps = PrimerTimelineItemProps & SxProp;
5
+ export type TimelineBadgeProps = PrimerTimelineBadgeProps & SxProp;
6
+ export type TimelineBodyProps = PrimerTimelineBodyProps & SxProp;
7
+ export type TimelineBreakProps = PrimerTimelineBreakProps & SxProp;
8
+ declare function TimelineBadge(props: TimelineBadgeProps): import("react").JSX.Element;
9
+ export declare const Timeline: import("react").ForwardRefExoticComponent<{
10
+ clipSidebar?: boolean;
11
+ className?: string;
12
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>> & {
13
+ Item: import("react").ForwardRefExoticComponent<{
14
+ condensed?: boolean;
15
+ className?: string;
16
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>>;
17
+ Badge: typeof TimelineBadge;
18
+ Body: import("react").ForwardRefExoticComponent<{
19
+ className?: string;
20
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>>;
21
+ Break: import("react").ForwardRefExoticComponent<{
22
+ className?: string;
23
+ } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & SxProp & import("react").RefAttributes<HTMLDivElement>>;
24
+ };
25
+ export {};
26
+ //# sourceMappingURL=Timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/components/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,IAAI,mBAAmB,EACzC,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,KAAK,kBAAkB,IAAI,wBAAwB,EACnD,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,KAAK,kBAAkB,IAAI,wBAAwB,EACpD,MAAM,eAAe,CAAA;AAGtB,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,MAAM,CAAA;AACxD,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAChE,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,MAAM,CAAA;AAClE,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAChE,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG,MAAM,CAAA;AAUlE,iBAAS,aAAa,CAAC,KAAK,EAAE,kBAAkB,+BAE/C;AAUD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAKnB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { type ToggleSwitchProps as PrimerToggleSwitchProps } from '@primer/react';
2
+ import type { StyledProps } from '../styled-props';
3
+ type ToggleSwitchProps = PrimerToggleSwitchProps & Omit<StyledProps, keyof PrimerToggleSwitchProps>;
4
+ declare const ToggleSwitch: import("react").ForwardRefExoticComponent<PrimerToggleSwitchProps & Omit<StyledProps, keyof PrimerToggleSwitchProps> & import("react").RefAttributes<HTMLButtonElement>>;
5
+ export { ToggleSwitch, type ToggleSwitchProps };
6
+ //# sourceMappingURL=ToggleSwitch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../src/components/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,iBAAiB,IAAI,uBAAuB,EAAC,MAAM,eAAe,CAAA;AAGnH,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAEhD,KAAK,iBAAiB,GAAG,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,uBAAuB,CAAC,CAAA;AAEnG,QAAA,MAAM,YAAY,0KAEhB,CAAA;AAEF,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { type TruncateProps as PrimerTruncateProps } from '@primer/react';
2
+ import { type SxProp } from '../sx';
3
+ import type { PropsWithChildren } from 'react';
4
+ import type { ForwardRefComponent } from '../polymorphic';
5
+ export type TruncateProps = PropsWithChildren<PrimerTruncateProps> & SxProp;
6
+ export declare const Truncate: ForwardRefComponent<'div', TruncateProps>;
7
+ //# sourceMappingURL=Truncate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Truncate.d.ts","sourceRoot":"","sources":["../../src/components/Truncate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,aAAa,IAAI,mBAAmB,EAAC,MAAM,eAAe,CAAA;AACnG,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC5C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,GAAG,MAAM,CAAA;AAE3E,eAAO,MAAM,QAAQ,EAAE,mBAAmB,CAAC,KAAK,EAAE,aAAa,CAI9D,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { type UnderlineNavProps as PrimerUnderlineNavProps, type UnderlineNavItemProps as PrimerUnderlineNavItemProps } from '@primer/react';
2
+ import type { ForwardRefComponent } from '../polymorphic';
3
+ import { type SxProp } from '../sx';
4
+ export type UnderlineNavProps = PrimerUnderlineNavProps & SxProp;
5
+ export type UnderlineNavItemProps = PrimerUnderlineNavItemProps & SxProp;
6
+ export declare const UnderlineNav: import("react").ForwardRefExoticComponent<PrimerUnderlineNavProps & SxProp & import("react").RefAttributes<HTMLElement>> & {
7
+ Item: ForwardRefComponent<"a", UnderlineNavItemProps>;
8
+ };
9
+ //# sourceMappingURL=UnderlineNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnderlineNav.d.ts","sourceRoot":"","sources":["../../src/components/UnderlineNav.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,KAAK,qBAAqB,IAAI,2BAA2B,EAC1D,MAAM,eAAe,CAAA;AAEtB,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAGvD,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAA;AAMhE,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAAG,MAAM,CAAA;AAUxE,eAAO,MAAM,YAAY;;CAEvB,CAAA"}
@@ -0,0 +1,92 @@
1
+ {
2
+ "components": [
3
+ "ActionList",
4
+ "ActionMenu",
5
+ "Autocomplete",
6
+ "Avatar",
7
+ "Box",
8
+ "Breadcrumbs",
9
+ "Button",
10
+ "Checkbox",
11
+ "CheckboxGroup",
12
+ "CircleBadge",
13
+ "CounterLabel",
14
+ "Details",
15
+ "Dialog",
16
+ "Flash",
17
+ "FormControl",
18
+ "Header",
19
+ "Heading",
20
+ "IconButton",
21
+ "Label",
22
+ "Link",
23
+ "LinkButton",
24
+ "NavList",
25
+ "Octicon",
26
+ "Overlay",
27
+ "PageHeader",
28
+ "PageLayout",
29
+ "ProgressBar",
30
+ "RadioGroup",
31
+ "RelativeTime",
32
+ "SegmentedControl",
33
+ "Select",
34
+ "Spinner",
35
+ "StateLabel",
36
+ "SubNav",
37
+ "Table",
38
+ "TabNav",
39
+ "Text",
40
+ "Textarea",
41
+ "TextInput",
42
+ "ThemeProvider",
43
+ "Timeline",
44
+ "ToggleSwitch",
45
+ "Token",
46
+ "Tooltip",
47
+ "Truncate",
48
+ "UnderlineNav",
49
+ "UnderlinePanels"
50
+ ],
51
+ "types": [
52
+ "BetterSystemStyleObject",
53
+ "BoxProps",
54
+ "CheckboxProps",
55
+ "CounterLabelProps",
56
+ "HeaderProps",
57
+ "LinkButtonProps",
58
+ "PageHeaderActionsProps",
59
+ "PageHeaderProps",
60
+ "PageHeaderTitleProps",
61
+ "RadioGroupProps",
62
+ "RelativeTimeProps",
63
+ "SegmentedControlButtonProps",
64
+ "SegmentedControlIconButtonProps",
65
+ "SegmentedControlProps",
66
+ "SpinnerProps",
67
+ "StateLabelProps",
68
+ "SubNavLinkProps",
69
+ "SubNavProps",
70
+ "SxProp",
71
+ "TextInputProps",
72
+ "TimelineBadgeProps",
73
+ "TimelineBodyProps",
74
+ "TimelineBreakProps",
75
+ "TimelineItemProps",
76
+ "TimelineProps",
77
+ "ToggleSwitchProps",
78
+ "TokenProps",
79
+ "TooltipProps",
80
+ "TruncateProps",
81
+ "UnderlineNavItemProps",
82
+ "UnderlineNavProps"
83
+ ],
84
+ "utilities": [
85
+ "merge",
86
+ "sx",
87
+ "theme",
88
+ "themeGet",
89
+ "useColorSchemeVar",
90
+ "useTheme"
91
+ ]
92
+ }
@@ -1,2 +1,2 @@
1
- export { Dialog, Octicon, TabNav, Tooltip } from '@primer/react/deprecated';
1
+ export { Dialog, Octicon, TabNav, Tooltip, type TooltipProps } from '@primer/react/deprecated';
2
2
  //# sourceMappingURL=deprecated.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAC,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,0BAA0B,CAAA"}
@@ -1,2 +1,3 @@
1
- export { Dialog, PageHeader, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
1
+ export { PageHeader, type PageHeaderProps, type PageHeaderActionsProps, type PageHeaderTitleProps, } from './components/PageHeader';
2
+ export { Dialog, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
2
3
  //# sourceMappingURL=experimental.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAC,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAC,MAAM,4BAA4B,CAAA"}
@@ -1 +1,5 @@
1
- export { Dialog, PageHeader, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
1
+ export { P as PageHeader } from './PageHeader-Bvki2mbE.js';
2
+ export { Dialog, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
3
+ import '@primer/react';
4
+ import 'styled-components';
5
+ import 'react/jsx-runtime';
package/dist/index.d.ts CHANGED
@@ -1,25 +1,53 @@
1
- import { type BetterSystemStyleObject, type BoxProps, type SxProp, type SubNavProps as PrimerSubNavProps, type SubNavLinkProps as PrimerSubNavLinkProps, type ToggleSwitchProps as PrimerToggleSwitchProps, type SegmentedControlProps as PrimerSegmentedControlProps, type SegmentedControlButtonProps as PrimerSegmentedControlButtonProps, type SegmentedControlIconButtonProps as PrimerSegmentedControlIconButtonProps } from '@primer/react';
2
- import React, { type PropsWithChildren } from 'react';
3
- import type { BackgroundProps, BorderProps, ColorProps, FlexboxProps, GridProps, LayoutProps, PositionProps, ShadowProps, SpaceProps, TypographyProps } from 'styled-system';
4
- type StyledProps = SxProp & SpaceProps & ColorProps & TypographyProps & LayoutProps & FlexboxProps & GridProps & BackgroundProps & BorderProps & PositionProps & ShadowProps;
5
- type SegmentedControlProps = PropsWithChildren<PrimerSegmentedControlProps> & SxProp;
6
- type SegmentedControlButtonProps = PropsWithChildren<PrimerSegmentedControlButtonProps> & SxProp;
7
- type SegmentedControlIconButtonProps = PropsWithChildren<PrimerSegmentedControlIconButtonProps> & SxProp;
8
- declare const SegmentedControl: ((props: SegmentedControlProps) => React.JSX.Element) & {
9
- Button: (props: SegmentedControlButtonProps) => React.JSX.Element;
10
- IconButton: (props: SegmentedControlIconButtonProps) => React.JSX.Element;
11
- };
12
- declare const StateLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
13
- variant?: "small" | "normal";
14
- status: "open" | "issueOpened" | "pullOpened" | "issueClosed" | "issueClosedNotPlanned" | "pullClosed" | "pullMerged" | "draft" | "issueDraft" | "pullQueued" | "unavailable" | "closed";
15
- } & SxProp & React.RefAttributes<HTMLSpanElement>>;
16
- type SubNavProps = PrimerSubNavProps & SxProp;
17
- type SubNavLinkProps = PrimerSubNavLinkProps & SxProp;
18
- declare const SubNav: React.ForwardRefExoticComponent<Omit<SubNavProps, "ref"> & React.RefAttributes<HTMLElement>> & {
19
- Link: React.ForwardRefExoticComponent<Omit<SubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
20
- };
21
- declare const ToggleSwitch: React.ForwardRefExoticComponent<PrimerToggleSwitchProps & Omit<StyledProps, keyof PrimerToggleSwitchProps> & React.RefAttributes<HTMLButtonElement>>;
22
- export { SegmentedControl, StateLabel, SubNav, ToggleSwitch };
23
- export { ActionList, ActionMenu, Autocomplete, Avatar, Breadcrumbs, Button, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Details, Dialog, Flash, FormControl, Header, Heading, IconButton, Label, Link, LinkButton, NavList, Overlay, PageHeader, PageLayout, ProgressBar, RadioGroup, RelativeTime, Select, Spinner, Text, Textarea, TextInput, Timeline, Token, Tooltip, Truncate, UnderlineNav, Box, sx, ThemeProvider, merge, theme, themeGet, useColorSchemeVar, useTheme, } from '@primer/react';
24
- export type { BoxProps, SxProp, BetterSystemStyleObject };
1
+ export { ActionList } from '@primer/react';
2
+ export { ActionMenu } from '@primer/react';
3
+ export { Autocomplete } from '@primer/react';
4
+ export { Avatar } from '@primer/react';
5
+ export { Breadcrumbs } from '@primer/react';
6
+ export { Box, type BoxProps } from './components/Box';
7
+ export { Button } from '@primer/react';
8
+ export { CheckboxGroup } from '@primer/react';
9
+ export { CircleBadge } from '@primer/react';
10
+ export { Details } from '@primer/react';
11
+ export { Dialog } from '@primer/react';
12
+ export { FormControl } from '@primer/react';
13
+ export { Heading } from '@primer/react';
14
+ export { IconButton } from '@primer/react';
15
+ export { Label } from '@primer/react';
16
+ export { Link } from '@primer/react';
17
+ export { NavList } from '@primer/react';
18
+ export { Overlay } from '@primer/react';
19
+ export { PageLayout } from '@primer/react';
20
+ export { ProgressBar } from '@primer/react';
21
+ export { Select } from '@primer/react';
22
+ export { Text } from '@primer/react';
23
+ export { Textarea } from '@primer/react';
24
+ export { TextInput } from '@primer/react';
25
+ export { Token } from '@primer/react';
26
+ export { Tooltip } from '@primer/react';
27
+ export { type TextInputProps } from '@primer/react';
28
+ export { type TokenProps } from '@primer/react';
29
+ export { ThemeProvider } from '@primer/react';
30
+ export { merge } from '@primer/react';
31
+ export { theme } from '@primer/react';
32
+ export { themeGet } from '@primer/react';
33
+ export { useColorSchemeVar } from '@primer/react';
34
+ export { useTheme } from '@primer/react';
35
+ export { Checkbox, type CheckboxProps } from './components/Checkbox';
36
+ export { CounterLabel, type CounterLabelProps } from './components/CounterLabel';
37
+ export { Flash } from './components/Flash';
38
+ export { Header, type HeaderProps } from './components/Header';
39
+ export { LinkButton, type LinkButtonProps } from './components/LinkButton';
40
+ export { PageHeader, type PageHeaderProps, type PageHeaderActionsProps, type PageHeaderTitleProps, } from './components/PageHeader';
41
+ export { RadioGroup, type RadioGroupProps } from './components/RadioGroup';
42
+ export { RelativeTime, type RelativeTimeProps } from './components/RelativeTime';
43
+ export { SegmentedControl, type SegmentedControlProps, type SegmentedControlButtonProps, type SegmentedControlIconButtonProps, } from './components/SegmentedControl';
44
+ export { Spinner, type SpinnerProps } from './components/Spinner';
45
+ export { StateLabel, type StateLabelProps } from './components/StateLabel';
46
+ export { SubNav, type SubNavProps, type SubNavLinkProps } from './components/SubNav';
47
+ export { Timeline, type TimelineProps, type TimelineItemProps, type TimelineBadgeProps, type TimelineBodyProps, type TimelineBreakProps, } from './components/Timeline';
48
+ export { ToggleSwitch, type ToggleSwitchProps } from './components/ToggleSwitch';
49
+ export { Truncate, type TruncateProps } from './components/Truncate';
50
+ export { UnderlineNav, type UnderlineNavProps, type UnderlineNavItemProps } from './components/UnderlineNav';
51
+ export { sx, type SxProp } from './sx';
52
+ export type { BetterSystemStyleObject } from './styled-props';
25
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAE5B,KAAK,QAAQ,EACb,KAAK,MAAM,EAIX,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAE7C,KAAK,iBAAiB,IAAI,uBAAuB,EACjD,KAAK,qBAAqB,IAAI,2BAA2B,EAEzD,KAAK,2BAA2B,IAAI,iCAAiC,EACrE,KAAK,+BAA+B,IAAI,qCAAqC,EAC9E,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAE,EAAa,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC/D,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,KAAK,WAAW,GAAG,MAAM,GACvB,UAAU,GACV,UAAU,GACV,eAAe,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,eAAe,GACf,WAAW,GACX,aAAa,GACb,WAAW,CAAA;AAEb,KAAK,qBAAqB,GAAG,iBAAiB,CAAC,2BAA2B,CAAC,GAAG,MAAM,CAAA;AACpF,KAAK,2BAA2B,GAAG,iBAAiB,CAAC,iCAAiC,CAAC,GAAG,MAAM,CAAA;AAChG,KAAK,+BAA+B,GAAG,iBAAiB,CAAC,qCAAqC,CAAC,GAAG,MAAM,CAAA;AAcxG,QAAA,MAAM,gBAAgB,WAJe,qBAAqB;oBARnB,2BAA2B;wBAIvB,+BAA+B;CAWxE,CAAA;AAIF,QAAA,MAAM,UAAU;;;kDAEd,CAAA;AAEF,KAAK,WAAW,GAAG,iBAAiB,GAAG,M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AAM,2BAA2B,CAAA;AAC9E,OAAO,EAAC,QAAQ,EAAE,KAAK,aAAa,EAAC,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAE,KAAK,qBAAqB,EAAC,MAAM,2BAA2B,CAAA;AAE1G,OAAO,EAAC,EAAE,EAAE,KAAK,MAAM,EAAC,MAAM,MAAM,CAAA;AAEpC,YAAY,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAA"}
package/dist/index.js CHANGED
@@ -1,62 +1,234 @@
1
- import { Box, SegmentedControl as SegmentedControl$1, SubNav as SubNav$1, StateLabel as StateLabel$1, ToggleSwitch as ToggleSwitch$1 } from '@primer/react';
2
- export { ActionList, ActionMenu, Autocomplete, Avatar, Box, Breadcrumbs, Button, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Details, Dialog, Flash, FormControl, Header, Heading, IconButton, Label, Link, LinkButton, NavList, Overlay, PageHeader, PageLayout, ProgressBar, RadioGroup, RelativeTime, Select, Spinner, Text, TextInput, Textarea, ThemeProvider, Timeline, Token, Tooltip, Truncate, UnderlineNav, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
3
- import React, { forwardRef } from 'react';
4
-
5
- function _extends() {
6
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
7
- for (var e = 1; e < arguments.length; e++) {
8
- var t = arguments[e];
9
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
10
- }
11
- return n;
12
- }, _extends.apply(null, arguments);
1
+ import { Box, Checkbox as Checkbox$1, CounterLabel as CounterLabel$1, Flash as Flash$1, sx, Header as Header$1, LinkButton as LinkButton$1, RadioGroup as RadioGroup$1, RelativeTime as RelativeTime$1, SegmentedControl as SegmentedControl$1, Spinner as Spinner$1, StateLabel as StateLabel$1, SubNav as SubNav$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
2
+ export { ActionList, ActionMenu, Autocomplete, Avatar, Box, Breadcrumbs, Button, CheckboxGroup, CircleBadge, Details, Dialog, FormControl, Heading, IconButton, Label, Link, NavList, Overlay, PageLayout, ProgressBar, Select, Text, TextInput, Textarea, ThemeProvider, Token, Tooltip, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
3
+ import { forwardRef } from 'react';
4
+ import { jsx } from 'react/jsx-runtime';
5
+ import styled from 'styled-components';
6
+ export { P as PageHeader } from './PageHeader-Bvki2mbE.js';
7
+
8
+ const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
9
+ return /*#__PURE__*/jsx(Box, {
10
+ as: Checkbox$1,
11
+ ref: ref,
12
+ ...props
13
+ });
14
+ });
15
+
16
+ const CounterLabel = /*#__PURE__*/forwardRef(function CounterLabel(props, ref) {
17
+ return /*#__PURE__*/jsx(Box, {
18
+ as: CounterLabel$1,
19
+ ref: ref,
20
+ ...props
21
+ });
22
+ });
23
+
24
+ const Flash = styled(Flash$1).withConfig({
25
+ shouldForwardProp: prop => prop !== 'sx'
26
+ }).withConfig({
27
+ displayName: "Flash",
28
+ componentId: "sc-413izo-0"
29
+ })(["", ""], sx);
30
+
31
+ const HeaderImpl = /*#__PURE__*/forwardRef(function Header(props, ref) {
32
+ return /*#__PURE__*/jsx(Box, {
33
+ as: Header$1,
34
+ ref: ref,
35
+ ...props
36
+ });
37
+ });
38
+ const HeaderItem = /*#__PURE__*/forwardRef(function HeaderItem(props, ref) {
39
+ return /*#__PURE__*/jsx(Box, {
40
+ as: Header$1.Item,
41
+ ref: ref,
42
+ ...props
43
+ });
44
+ });
45
+ const HeaderLink = /*#__PURE__*/forwardRef(function HeaderLink(props, ref) {
46
+ return /*#__PURE__*/jsx(Box, {
47
+ as: Header$1.Link,
48
+ ref: ref,
49
+ ...props
50
+ });
51
+ });
52
+ const Header = Object.assign(HeaderImpl, {
53
+ Item: HeaderItem,
54
+ Link: HeaderLink
55
+ });
56
+
57
+ const LinkButton = styled(LinkButton$1).withConfig({
58
+ shouldForwardProp: prop => prop !== 'sx'
59
+ }).withConfig({
60
+ displayName: "LinkButton",
61
+ componentId: "sc-1v6zkmg-0"
62
+ })(["", ""], sx);
63
+
64
+ const RadioGroupImpl = props => {
65
+ return /*#__PURE__*/jsx(Box, {
66
+ as: RadioGroup$1,
67
+ ...props
68
+ });
69
+ };
70
+
71
+ // Define local types based on the internal component props
72
+
73
+ const CheckboxOrRadioGroupLabel = props => {
74
+ return /*#__PURE__*/jsx(Box, {
75
+ as: RadioGroup$1.Label,
76
+ ...props
77
+ });
78
+ };
79
+ const CheckboxOrRadioGroupCaption = props => {
80
+ return /*#__PURE__*/jsx(Box, {
81
+ as: RadioGroup$1.Caption,
82
+ ...props
83
+ });
84
+ };
85
+ const CheckboxOrRadioGroupValidation = props => {
86
+ return /*#__PURE__*/jsx(Box, {
87
+ as: RadioGroup$1.Validation,
88
+ ...props
89
+ });
90
+ };
91
+ const RadioGroup = Object.assign(RadioGroupImpl, {
92
+ Label: CheckboxOrRadioGroupLabel,
93
+ Caption: CheckboxOrRadioGroupCaption,
94
+ Validation: CheckboxOrRadioGroupValidation
95
+ });
96
+
97
+ function RelativeTime(props) {
98
+ // @ts-expect-error the types for Box are not correctly inferred here
99
+ return /*#__PURE__*/jsx(Box, {
100
+ as: RelativeTime$1,
101
+ ...props
102
+ });
13
103
  }
14
104
 
15
105
  const SegmentedControlButton = props => {
16
- return /*#__PURE__*/React.createElement(Box, _extends({
17
- as: SegmentedControl$1.Button
18
- }, props));
106
+ return /*#__PURE__*/jsx(Box, {
107
+ as: SegmentedControl$1.Button,
108
+ ...props
109
+ });
19
110
  };
20
111
  const SegmentedControlIconButton = props => {
21
- return /*#__PURE__*/React.createElement(Box, _extends({
22
- as: SegmentedControl$1.IconButton
23
- }, props));
112
+ return /*#__PURE__*/jsx(Box, {
113
+ as: SegmentedControl$1.IconButton,
114
+ ...props
115
+ });
24
116
  };
25
117
  const SegmentedControlImpl = props => {
26
- return /*#__PURE__*/React.createElement(Box, _extends({
27
- as: SegmentedControl$1
28
- }, props));
118
+ return /*#__PURE__*/jsx(Box, {
119
+ as: SegmentedControl$1,
120
+ ...props
121
+ });
29
122
  };
30
123
  const SegmentedControl = Object.assign(SegmentedControlImpl, {
31
124
  Button: SegmentedControlButton,
32
125
  IconButton: SegmentedControlIconButton
33
126
  });
127
+
128
+ function Spinner(props) {
129
+ return /*#__PURE__*/jsx(Box, {
130
+ as: Spinner$1,
131
+ ...props
132
+ });
133
+ }
134
+
34
135
  const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
35
- return /*#__PURE__*/React.createElement(Box, _extends({
136
+ return /*#__PURE__*/jsx(Box, {
36
137
  as: StateLabel$1,
37
- ref: ref
38
- }, props));
138
+ ref: ref,
139
+ ...props
140
+ });
39
141
  });
142
+
40
143
  const SubNavImpl = /*#__PURE__*/forwardRef(function SubNav(props, ref) {
41
- return /*#__PURE__*/React.createElement(Box, _extends({
144
+ return /*#__PURE__*/jsx(Box, {
42
145
  as: SubNav$1,
43
- ref: ref
44
- }, props));
146
+ ref: ref,
147
+ ...props
148
+ });
45
149
  });
46
150
  const SubNavLink = /*#__PURE__*/forwardRef(function SubNavLink(props, ref) {
47
- return /*#__PURE__*/React.createElement(Box, _extends({
151
+ return /*#__PURE__*/jsx(Box, {
48
152
  as: SubNav$1.Link,
49
- ref: ref
50
- }, props));
153
+ ref: ref,
154
+ ...props
155
+ });
51
156
  });
52
157
  const SubNav = Object.assign(SubNavImpl, {
53
158
  Link: SubNavLink
54
159
  });
160
+
161
+ const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
162
+ return /*#__PURE__*/jsx(Box, {
163
+ as: Timeline$1,
164
+ ref: ref,
165
+ ...props
166
+ });
167
+ });
168
+ const TimelineItem = /*#__PURE__*/forwardRef(function TimelineItem(props, ref) {
169
+ return /*#__PURE__*/jsx(Box, {
170
+ as: Timeline$1.Item,
171
+ ref: ref,
172
+ ...props
173
+ });
174
+ });
175
+ function TimelineBadge(props) {
176
+ return /*#__PURE__*/jsx(Box, {
177
+ as: Timeline$1.Badge,
178
+ ...props
179
+ });
180
+ }
181
+ const TimelineBody = /*#__PURE__*/forwardRef(function TimelineBody(props, ref) {
182
+ return /*#__PURE__*/jsx(Box, {
183
+ as: Timeline$1.Body,
184
+ ref: ref,
185
+ ...props
186
+ });
187
+ });
188
+ const TimelineBreak = /*#__PURE__*/forwardRef(function TimelineBreak(props, ref) {
189
+ return /*#__PURE__*/jsx(Box, {
190
+ as: Timeline$1.Break,
191
+ ref: ref,
192
+ ...props
193
+ });
194
+ });
195
+ const Timeline = Object.assign(TimelineImpl, {
196
+ Item: TimelineItem,
197
+ Badge: TimelineBadge,
198
+ Body: TimelineBody,
199
+ Break: TimelineBreak
200
+ });
201
+
55
202
  const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
56
- return /*#__PURE__*/React.createElement(Box, _extends({
203
+ return /*#__PURE__*/jsx(Box, {
57
204
  as: ToggleSwitch$1,
58
- ref: ref
59
- }, props));
205
+ ref: ref,
206
+ ...props
207
+ });
208
+ });
209
+
210
+ const Truncate = styled(Truncate$1).withConfig({
211
+ shouldForwardProp: prop => prop !== 'sx'
212
+ }).withConfig({
213
+ displayName: "Truncate",
214
+ componentId: "sc-x3i4it-0"
215
+ })(["", ""], sx);
216
+
217
+ const UnderlineNavImpl = /*#__PURE__*/forwardRef(function UnderlineNav(props, ref) {
218
+ return /*#__PURE__*/jsx(Box, {
219
+ as: UnderlineNav$1,
220
+ ref: ref,
221
+ ...props
222
+ });
223
+ });
224
+ const UnderlineNavItem = styled(UnderlineNav$1.Item).withConfig({
225
+ shouldForwardProp: prop => prop !== 'sx'
226
+ }).withConfig({
227
+ displayName: "UnderlineNav__UnderlineNavItem",
228
+ componentId: "sc-dx6br2-0"
229
+ })(["", ""], sx);
230
+ const UnderlineNav = Object.assign(UnderlineNavImpl, {
231
+ Item: UnderlineNavItem
60
232
  });
61
233
 
62
- export { SegmentedControl, StateLabel, SubNav, ToggleSwitch };
234
+ export { Checkbox, CounterLabel, Flash, Header, LinkButton, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Timeline, ToggleSwitch, Truncate, UnderlineNav };
@@ -0,0 +1,38 @@
1
+ /**
2
+ * This file is originally from `@radix-ui/react-polymorphic` before the package
3
+ * was deprecated. The original source for this lived in the URL below.
4
+ *
5
+ * @see https://github.com/radix-ui/primitives/blob/17ffcb7aaa42cbd36b3c210ba86d7d73d218e5be/packages/react/polymorphic/src/polymorphic.ts
6
+ */
7
+ import * as React from 'react';
8
+ type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
9
+ /**
10
+ * Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
11
+ */
12
+ type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
13
+ /**
14
+ * Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
15
+ */
16
+ type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
17
+ type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
18
+ as?: E;
19
+ }>>;
20
+ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
21
+ /**
22
+ * When `as` prop is passed, use this overload.
23
+ * Merges original own props (without DOM props) and the inferred props
24
+ * from `as` element with the own props taking precedence.
25
+ *
26
+ * We explicitly avoid `React.ElementType` and manually narrow the prop types
27
+ * so that events are typed when using JSX.IntrinsicElements.
28
+ */
29
+ <As = IntrinsicElementString>(props: As extends '' ? {
30
+ as: keyof JSX.IntrinsicElements;
31
+ } : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
32
+ as: As;
33
+ }> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
34
+ as: As;
35
+ }> : never): React.ReactElement | null;
36
+ }
37
+ export type { ForwardRefComponent, OwnProps, IntrinsicElement, Merge };
38
+ //# sourceMappingURL=polymorphic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polymorphic.d.ts","sourceRoot":"","sources":["../src/polymorphic.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,KAAK,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,CAAA;AAEtD;;GAEG;AACH,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;AAEvE;;GAEG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,SAAS,mBAAmB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAElF,KAAK,yBAAyB,CAAC,CAAC,EAAE,QAAQ,IAAI,KAAK,CAAC,yBAAyB,CAC3E,KAAK,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,QAAQ,GAAG;IAAC,EAAE,CAAC,EAAE,CAAC,CAAA;CAAC,CAAC,CACjG,CAAA;AAMD,UAAU,mBAAmB,CAC3B,sBAAsB,EACtB,QAAQ,GAAG,EAAE,CAKb,SAAQ,yBAAyB,CAAC,sBAAsB,EAAE,QAAQ,CAAC;IACnE;;;;;;;OAOG;IACH,CAAC,EAAE,GAAG,sBAAsB,EAC1B,KAAK,EAAE,EAAE,SAAS,EAAE,GAChB;QAAC,EAAE,EAAE,MAAM,GAAG,CAAC,iBAAiB,CAAA;KAAC,GACjC,EAAE,SAAS,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,GACrC,KAAK,CAAC,CAAC,EAAE,QAAQ,GAAG;QAAC,EAAE,EAAE,EAAE,CAAA;KAAC,CAAC,GAC7B,EAAE,SAAS,MAAM,GAAG,CAAC,iBAAiB,GACpC,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG;QAAC,EAAE,EAAE,EAAE,CAAA;KAAC,CAAC,GACrD,KAAK,GACZ,KAAK,CAAC,YAAY,GAAG,IAAI,CAAA;CAC7B;AAED,YAAY,EAAC,mBAAmB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAC,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { BackgroundProps, BorderProps, ColorProps, FlexboxProps, GridProps, LayoutProps, PositionProps, ShadowProps, SpaceProps, TypographyProps } from 'styled-system';
2
+ import type { SxProp } from './sx';
3
+ export type StyledProps = SxProp & SpaceProps & ColorProps & TypographyProps & LayoutProps & FlexboxProps & GridProps & BackgroundProps & BorderProps & PositionProps & ShadowProps;
4
+ export type { BetterSystemStyleObject } from '@primer/react';
5
+ //# sourceMappingURL=styled-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styled-props.d.ts","sourceRoot":"","sources":["../src/styled-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAChB,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,MAAM,CAAA;AAEhC,MAAM,MAAM,WAAW,GAAG,MAAM,GAC9B,UAAU,GACV,UAAU,GACV,eAAe,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,eAAe,GACf,WAAW,GACX,aAAa,GACb,WAAW,CAAA;AAEb,YAAY,EAAC,uBAAuB,EAAC,MAAM,eAAe,CAAA"}
package/dist/sx.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export { sx, type SxProp } from '@primer/react';
2
+ //# sourceMappingURL=sx.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sx.d.ts","sourceRoot":"","sources":["../src/sx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "1.0.0-rc.3",
3
+ "version": "1.0.0-rc.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -14,7 +14,8 @@
14
14
  "./experimental": {
15
15
  "types": "./dist/experimental.d.ts",
16
16
  "default": "./dist/experimental.js"
17
- }
17
+ },
18
+ "./components.json": "./dist/components.json"
18
19
  },
19
20
  "files": [
20
21
  "README.md",
@@ -29,11 +30,12 @@
29
30
  "devDependencies": {
30
31
  "@babel/preset-react": "^7.27.1",
31
32
  "@babel/preset-typescript": "^7.27.1",
32
- "@primer/react": "^38.0.0-rc.3",
33
+ "@primer/react": "^38.0.0-rc.4",
33
34
  "@rollup/plugin-babel": "^6.0.4",
34
35
  "@types/react": "18.3.11",
35
36
  "@types/react-dom": "18.3.1",
36
37
  "@vitejs/plugin-react": "^4.3.3",
38
+ "babel-plugin-styled-components": "2.1.4",
37
39
  "publint": "^0.3.12",
38
40
  "react": "18.3.1",
39
41
  "react-dom": "18.3.1",
@@ -44,7 +46,7 @@
44
46
  "typescript": "^5.9.2"
45
47
  },
46
48
  "peerDependencies": {
47
- "@primer/react": "38.0.0-rc.3",
49
+ "@primer/react": "38.0.0-rc.4",
48
50
  "@types/react": "18.x || 19.x",
49
51
  "@types/react-dom": "18.x || 19.x",
50
52
  "@types/react-is": "18.x || 19.x",