@primer/styled-react 0.0.0-20250926225310 → 0.0.0-20250926231646
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/README.md +0 -18
- package/dist/deprecated.d.ts +1 -2
- package/dist/deprecated.d.ts.map +1 -1
- package/dist/deprecated.js +1 -41
- package/dist/experimental.d.ts +1 -3
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +1 -6
- package/dist/index.d.ts +24 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -298
- package/package.json +4 -6
- package/dist/PageHeader-C_Msl3QK.js +0 -125
- package/dist/components/Box.d.ts +0 -2
- package/dist/components/Box.d.ts.map +0 -1
- package/dist/components/Checkbox.d.ts +0 -5
- package/dist/components/Checkbox.d.ts.map +0 -1
- package/dist/components/CounterLabel.d.ts +0 -10
- package/dist/components/CounterLabel.d.ts.map +0 -1
- package/dist/components/Dialog.d.ts +0 -19
- package/dist/components/Dialog.d.ts.map +0 -1
- package/dist/components/Flash.d.ts +0 -8
- package/dist/components/Flash.d.ts.map +0 -1
- package/dist/components/Header.d.ts +0 -11
- package/dist/components/Header.d.ts.map +0 -1
- package/dist/components/Link.d.ts +0 -22
- package/dist/components/Link.d.ts.map +0 -1
- package/dist/components/LinkButton.d.ts +0 -7
- package/dist/components/LinkButton.d.ts.map +0 -1
- package/dist/components/NavList.d.ts +0 -25
- package/dist/components/NavList.d.ts.map +0 -1
- package/dist/components/PageHeader.d.ts +0 -30
- package/dist/components/PageHeader.d.ts.map +0 -1
- package/dist/components/PageLayout.d.ts +0 -22
- package/dist/components/PageLayout.d.ts.map +0 -1
- package/dist/components/RadioGroup.d.ts +0 -22
- package/dist/components/RadioGroup.d.ts.map +0 -1
- package/dist/components/RelativeTime.d.ts +0 -6
- package/dist/components/RelativeTime.d.ts.map +0 -1
- package/dist/components/SegmentedControl.d.ts +0 -12
- package/dist/components/SegmentedControl.d.ts.map +0 -1
- package/dist/components/Spinner.d.ts +0 -6
- package/dist/components/Spinner.d.ts.map +0 -1
- package/dist/components/StateLabel.d.ts +0 -9
- package/dist/components/StateLabel.d.ts.map +0 -1
- package/dist/components/StateLabelProps.d.ts +0 -8
- package/dist/components/StateLabelProps.d.ts.map +0 -1
- package/dist/components/SubNav.d.ts +0 -9
- package/dist/components/SubNav.d.ts.map +0 -1
- package/dist/components/TabNav.d.ts +0 -9
- package/dist/components/TabNav.d.ts.map +0 -1
- package/dist/components/Timeline.d.ts +0 -26
- package/dist/components/Timeline.d.ts.map +0 -1
- package/dist/components/ToggleSwitch.d.ts +0 -6
- package/dist/components/ToggleSwitch.d.ts.map +0 -1
- package/dist/components/Truncate.d.ts +0 -7
- package/dist/components/Truncate.d.ts.map +0 -1
- package/dist/components/UnderlineNav.d.ts +0 -9
- package/dist/components/UnderlineNav.d.ts.map +0 -1
- package/dist/components.json +0 -98
- package/dist/polymorphic.d.ts +0 -38
- package/dist/polymorphic.d.ts.map +0 -1
- package/dist/styled-props.d.ts +0 -5
- package/dist/styled-props.d.ts.map +0 -1
- package/dist/sx.d.ts +0 -2
- package/dist/sx.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -28,24 +28,6 @@ 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
|
-
|
|
49
31
|
## 🙌 Contributing
|
|
50
32
|
|
|
51
33
|
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.
|
package/dist/deprecated.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Dialog, Octicon, Tooltip, type TooltipProps } from '@primer/react/deprecated';
|
|
1
|
+
export { Dialog, Octicon, TabNav, Tooltip } from '@primer/react/deprecated';
|
|
3
2
|
//# sourceMappingURL=deprecated.d.ts.map
|
package/dist/deprecated.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,
|
|
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"}
|
package/dist/deprecated.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Dialog, Octicon, Tooltip } from '@primer/react/deprecated';
|
|
3
|
-
import { sx } from '@primer/react';
|
|
4
|
-
import styled from 'styled-components';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
const StyledTabNav = styled(TabNav$1).withConfig({
|
|
8
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
9
|
-
}).withConfig({
|
|
10
|
-
displayName: "TabNav__StyledTabNav",
|
|
11
|
-
componentId: "sc-v7az9x-0"
|
|
12
|
-
})(["", ""], sx);
|
|
13
|
-
|
|
14
|
-
// @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
|
|
15
|
-
const TabNavImpl = ({
|
|
16
|
-
as,
|
|
17
|
-
...props
|
|
18
|
-
}) => /*#__PURE__*/jsx(StyledTabNav, {
|
|
19
|
-
forwardedAs: as,
|
|
20
|
-
...props
|
|
21
|
-
});
|
|
22
|
-
const StyledTabNavLink = styled(TabNav$1.Link).withConfig({
|
|
23
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
24
|
-
}).withConfig({
|
|
25
|
-
displayName: "TabNav__StyledTabNavLink",
|
|
26
|
-
componentId: "sc-v7az9x-1"
|
|
27
|
-
})(["", ""], sx);
|
|
28
|
-
|
|
29
|
-
// @ts-ignore forwardedAs is valid here but I don't know how to fix the typescript error
|
|
30
|
-
const TabNavLink = ({
|
|
31
|
-
as,
|
|
32
|
-
...props
|
|
33
|
-
}) => /*#__PURE__*/jsx(StyledTabNavLink, {
|
|
34
|
-
forwardedAs: as,
|
|
35
|
-
...props
|
|
36
|
-
});
|
|
37
|
-
const TabNav = Object.assign(TabNavImpl, {
|
|
38
|
-
Link: TabNavLink
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
export { TabNav };
|
|
1
|
+
export { Dialog, Octicon, TabNav, Tooltip } from '@primer/react/deprecated';
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
export { Dialog,
|
|
2
|
-
export { PageHeader, type PageHeaderProps, type PageHeaderActionsProps, type PageHeaderTitleProps, } from './components/PageHeader';
|
|
3
|
-
export { Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
|
|
1
|
+
export { Dialog, PageHeader, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
|
|
4
2
|
//# 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,
|
|
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"}
|
package/dist/experimental.js
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
|
|
3
|
-
import '@primer/react';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'styled-components';
|
|
1
|
+
export { Dialog, PageHeader, Table, Tooltip, UnderlinePanels } from '@primer/react/experimental';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,53 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export { ThemeProvider } from '@primer/react';
|
|
26
|
-
export { merge } from '@primer/react';
|
|
27
|
-
export { theme } from '@primer/react';
|
|
28
|
-
export { themeGet } from '@primer/react';
|
|
29
|
-
export { useColorSchemeVar } from '@primer/react';
|
|
30
|
-
export { useTheme } from '@primer/react';
|
|
31
|
-
export { Checkbox, type CheckboxProps } from './components/Checkbox';
|
|
32
|
-
export { CounterLabel, type CounterLabelProps } from './components/CounterLabel';
|
|
33
|
-
export { Dialog, type DialogProps } from './components/Dialog';
|
|
34
|
-
export { Flash } from './components/Flash';
|
|
35
|
-
export { Header, type HeaderProps } from './components/Header';
|
|
36
|
-
export { Link, type LinkProps } from './components/Link';
|
|
37
|
-
export { LinkButton, type LinkButtonProps } from './components/LinkButton';
|
|
38
|
-
export { NavList, type NavListProps } from './components/NavList';
|
|
39
|
-
export { PageLayout, type PageLayoutProps } from './components/PageLayout';
|
|
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';
|
|
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 };
|
|
53
25
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,MAAM,CAAA;AAM7C,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,CAAA;AAMrD,QAAA,MAAM,MAAM;;CAEV,CAAA;AAIF,QAAA,MAAM,YAAY,sJAEhB,CAAA;AAEF,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAC,CAAA;AAE3D,OAAO,EACL,UAAU,EACV,UAAU,EACV,YAAY,EACZ,MAAM,EACN,WAAW,EACX,MAAM,EACN,QAAQ,EACR,aAAa,EACb,WAAW,EACX,YAAY,EACZ,OAAO,EACP,MAAM,EACN,KAAK,EACL,WAAW,EACX,MAAM,EACN,OAAO,EACP,UAAU,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,OAAO,EACP,OAAO,EACP,UAAU,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,YAAY,EACZ,MAAM,EACN,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,KAAK,EACL,OAAO,EACP,QAAQ,EACR,YAAY,EAGZ,GAAG,EACH,EAAE,EAGF,aAAa,EACb,KAAK,EACL,KAAK,EACL,QAAQ,EACR,iBAAiB,EACjB,QAAQ,GACT,MAAM,eAAe,CAAA;AACtB,YAAY,EAAC,QAAQ,EAAE,MAAM,EAAE,uBAAuB,EAAC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,328 +1,62 @@
|
|
|
1
|
-
import { Box,
|
|
2
|
-
export { ActionList, ActionMenu, Autocomplete, Avatar, Box, Breadcrumbs, Button, CheckboxGroup, CircleBadge, Details, FormControl, Heading, IconButton, Label, Overlay, ProgressBar, Select, Text, TextInput, Textarea, ThemeProvider, Token, Tooltip, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
|
|
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
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { jsx } from 'react/jsx-runtime';
|
|
5
|
-
export { D as Dialog, P as PageHeader } from './PageHeader-C_Msl3QK.js';
|
|
6
|
-
import styled from 'styled-components';
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 Link = styled(Link$1).withConfig({
|
|
58
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
59
|
-
}).withConfig({
|
|
60
|
-
displayName: "Link",
|
|
61
|
-
componentId: "sc-1syctfj-0"
|
|
62
|
-
})(["", ""], sx);
|
|
63
|
-
|
|
64
|
-
const LinkButton = styled(LinkButton$1).withConfig({
|
|
65
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
66
|
-
}).withConfig({
|
|
67
|
-
displayName: "LinkButton",
|
|
68
|
-
componentId: "sc-1v6zkmg-0"
|
|
69
|
-
})(["", ""], sx);
|
|
70
|
-
|
|
71
|
-
const NavListImpl = /*#__PURE__*/forwardRef(function NavList(props, ref) {
|
|
72
|
-
return /*#__PURE__*/jsx(Box, {
|
|
73
|
-
as: NavList$1,
|
|
74
|
-
ref: ref,
|
|
75
|
-
...props
|
|
76
|
-
});
|
|
77
|
-
});
|
|
78
|
-
const NavListItem = /*#__PURE__*/forwardRef(function NavListItem(props, ref) {
|
|
79
|
-
// @ts-expect-error - PrimerNavList.Item is not recognized as a valid component type
|
|
80
|
-
return /*#__PURE__*/jsx(Box, {
|
|
81
|
-
as: NavList$1.Item,
|
|
82
|
-
ref: ref,
|
|
83
|
-
...props
|
|
84
|
-
});
|
|
85
|
-
});
|
|
86
|
-
const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
|
|
87
|
-
// @ts-expect-error - PrimerNavList.Group is not recognized as a valid component type
|
|
88
|
-
return /*#__PURE__*/jsx(Box, {
|
|
89
|
-
as: NavList$1.Group,
|
|
90
|
-
ref: ref,
|
|
91
|
-
...props
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
const NavList = Object.assign(NavListImpl, {
|
|
95
|
-
// Wrapped components that need sx support added back in
|
|
96
|
-
Item: NavListItem,
|
|
97
|
-
Group: NavListGroup,
|
|
98
|
-
// Re-exporting others directly
|
|
99
|
-
// TODO: try to remove typecasts to work around "non-portable types" TS error
|
|
100
|
-
SubNav: NavList$1.SubNav,
|
|
101
|
-
Divider: NavList$1.Divider,
|
|
102
|
-
LeadingVisual: NavList$1.LeadingVisual,
|
|
103
|
-
TrailingVisual: NavList$1.TrailingVisual,
|
|
104
|
-
TrailingAction: NavList$1.TrailingAction,
|
|
105
|
-
GroupHeading: NavList$1.GroupHeading,
|
|
106
|
-
GroupExpand: NavList$1.GroupExpand
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
const Wrapper = styled.div.withConfig({
|
|
110
|
-
displayName: "PageLayout__Wrapper",
|
|
111
|
-
componentId: "sc-pjybtc-0"
|
|
112
|
-
})(["", ""], sx);
|
|
113
|
-
const PageLayoutImpl = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
114
|
-
// @ts-expect-error - PrimerPageLayout is not recognized as a valid component type
|
|
115
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
116
|
-
as: PageLayout$1,
|
|
117
|
-
ref: ref,
|
|
118
|
-
...props
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
const PageLayoutContent = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
122
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
123
|
-
as: PageLayout$1.Content,
|
|
124
|
-
ref: ref,
|
|
125
|
-
...props
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
const PageLayoutHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
129
|
-
// @ts-expect-error - PrimerPageLayout.Header is not recognized as a valid component type
|
|
130
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
131
|
-
as: PageLayout$1.Header,
|
|
132
|
-
ref: ref,
|
|
133
|
-
...props
|
|
134
|
-
});
|
|
135
|
-
});
|
|
136
|
-
const PageLayoutPane = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
137
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
138
|
-
as: PageLayout$1.Pane,
|
|
139
|
-
ref: ref,
|
|
140
|
-
...props
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
const PageLayoutFooter = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
144
|
-
// @ts-expect-error - PrimerPageLayout.Footer is not recognized as a valid component type
|
|
145
|
-
return /*#__PURE__*/jsx(Wrapper, {
|
|
146
|
-
as: PageLayout$1.Footer,
|
|
147
|
-
ref: ref,
|
|
148
|
-
...props
|
|
149
|
-
});
|
|
150
|
-
});
|
|
151
|
-
const PageLayout = Object.assign(PageLayoutImpl, {
|
|
152
|
-
Content: PageLayoutContent,
|
|
153
|
-
Header: PageLayoutHeader,
|
|
154
|
-
Pane: PageLayoutPane,
|
|
155
|
-
Footer: PageLayoutFooter
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
const RadioGroupImpl = props => {
|
|
159
|
-
return /*#__PURE__*/jsx(Box, {
|
|
160
|
-
as: RadioGroup$1,
|
|
161
|
-
...props
|
|
162
|
-
});
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
// Define local types based on the internal component props
|
|
166
|
-
|
|
167
|
-
const CheckboxOrRadioGroupLabel = props => {
|
|
168
|
-
return /*#__PURE__*/jsx(Box, {
|
|
169
|
-
as: RadioGroup$1.Label,
|
|
170
|
-
...props
|
|
171
|
-
});
|
|
172
|
-
};
|
|
173
|
-
const CheckboxOrRadioGroupCaption = props => {
|
|
174
|
-
return /*#__PURE__*/jsx(Box, {
|
|
175
|
-
as: RadioGroup$1.Caption,
|
|
176
|
-
...props
|
|
177
|
-
});
|
|
178
|
-
};
|
|
179
|
-
const CheckboxOrRadioGroupValidation = props => {
|
|
180
|
-
return /*#__PURE__*/jsx(Box, {
|
|
181
|
-
as: RadioGroup$1.Validation,
|
|
182
|
-
...props
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
const RadioGroup = Object.assign(RadioGroupImpl, {
|
|
186
|
-
Label: CheckboxOrRadioGroupLabel,
|
|
187
|
-
Caption: CheckboxOrRadioGroupCaption,
|
|
188
|
-
Validation: CheckboxOrRadioGroupValidation
|
|
189
|
-
});
|
|
190
|
-
|
|
191
|
-
function RelativeTime(props) {
|
|
192
|
-
// @ts-expect-error the types for Box are not correctly inferred here
|
|
193
|
-
return /*#__PURE__*/jsx(Box, {
|
|
194
|
-
as: RelativeTime$1,
|
|
195
|
-
...props
|
|
196
|
-
});
|
|
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);
|
|
197
13
|
}
|
|
198
14
|
|
|
199
15
|
const SegmentedControlButton = props => {
|
|
200
|
-
return /*#__PURE__*/
|
|
201
|
-
as: SegmentedControl$1.Button
|
|
202
|
-
|
|
203
|
-
});
|
|
16
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
17
|
+
as: SegmentedControl$1.Button
|
|
18
|
+
}, props));
|
|
204
19
|
};
|
|
205
20
|
const SegmentedControlIconButton = props => {
|
|
206
|
-
return /*#__PURE__*/
|
|
207
|
-
as: SegmentedControl$1.IconButton
|
|
208
|
-
|
|
209
|
-
});
|
|
21
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
22
|
+
as: SegmentedControl$1.IconButton
|
|
23
|
+
}, props));
|
|
210
24
|
};
|
|
211
25
|
const SegmentedControlImpl = props => {
|
|
212
|
-
return /*#__PURE__*/
|
|
213
|
-
as: SegmentedControl$1
|
|
214
|
-
|
|
215
|
-
});
|
|
26
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
27
|
+
as: SegmentedControl$1
|
|
28
|
+
}, props));
|
|
216
29
|
};
|
|
217
30
|
const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
218
31
|
Button: SegmentedControlButton,
|
|
219
32
|
IconButton: SegmentedControlIconButton
|
|
220
33
|
});
|
|
221
|
-
|
|
222
|
-
function Spinner(props) {
|
|
223
|
-
return /*#__PURE__*/jsx(Box, {
|
|
224
|
-
as: Spinner$1,
|
|
225
|
-
...props
|
|
226
|
-
});
|
|
227
|
-
}
|
|
228
|
-
|
|
229
34
|
const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
|
|
230
|
-
return /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
231
36
|
as: StateLabel$1,
|
|
232
|
-
ref: ref
|
|
233
|
-
|
|
234
|
-
});
|
|
37
|
+
ref: ref
|
|
38
|
+
}, props));
|
|
235
39
|
});
|
|
236
|
-
|
|
237
40
|
const SubNavImpl = /*#__PURE__*/forwardRef(function SubNav(props, ref) {
|
|
238
|
-
return /*#__PURE__*/
|
|
41
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
239
42
|
as: SubNav$1,
|
|
240
|
-
ref: ref
|
|
241
|
-
|
|
242
|
-
});
|
|
43
|
+
ref: ref
|
|
44
|
+
}, props));
|
|
243
45
|
});
|
|
244
46
|
const SubNavLink = /*#__PURE__*/forwardRef(function SubNavLink(props, ref) {
|
|
245
|
-
return /*#__PURE__*/
|
|
47
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
246
48
|
as: SubNav$1.Link,
|
|
247
|
-
ref: ref
|
|
248
|
-
|
|
249
|
-
});
|
|
49
|
+
ref: ref
|
|
50
|
+
}, props));
|
|
250
51
|
});
|
|
251
52
|
const SubNav = Object.assign(SubNavImpl, {
|
|
252
53
|
Link: SubNavLink
|
|
253
54
|
});
|
|
254
|
-
|
|
255
|
-
const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
|
|
256
|
-
return /*#__PURE__*/jsx(Box, {
|
|
257
|
-
as: Timeline$1,
|
|
258
|
-
ref: ref,
|
|
259
|
-
...props
|
|
260
|
-
});
|
|
261
|
-
});
|
|
262
|
-
const TimelineItem = /*#__PURE__*/forwardRef(function TimelineItem(props, ref) {
|
|
263
|
-
return /*#__PURE__*/jsx(Box, {
|
|
264
|
-
as: Timeline$1.Item,
|
|
265
|
-
ref: ref,
|
|
266
|
-
...props
|
|
267
|
-
});
|
|
268
|
-
});
|
|
269
|
-
function TimelineBadge(props) {
|
|
270
|
-
return /*#__PURE__*/jsx(Box, {
|
|
271
|
-
as: Timeline$1.Badge,
|
|
272
|
-
...props
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
const TimelineBody = /*#__PURE__*/forwardRef(function TimelineBody(props, ref) {
|
|
276
|
-
return /*#__PURE__*/jsx(Box, {
|
|
277
|
-
as: Timeline$1.Body,
|
|
278
|
-
ref: ref,
|
|
279
|
-
...props
|
|
280
|
-
});
|
|
281
|
-
});
|
|
282
|
-
const TimelineBreak = /*#__PURE__*/forwardRef(function TimelineBreak(props, ref) {
|
|
283
|
-
return /*#__PURE__*/jsx(Box, {
|
|
284
|
-
as: Timeline$1.Break,
|
|
285
|
-
ref: ref,
|
|
286
|
-
...props
|
|
287
|
-
});
|
|
288
|
-
});
|
|
289
|
-
const Timeline = Object.assign(TimelineImpl, {
|
|
290
|
-
Item: TimelineItem,
|
|
291
|
-
Badge: TimelineBadge,
|
|
292
|
-
Body: TimelineBody,
|
|
293
|
-
Break: TimelineBreak
|
|
294
|
-
});
|
|
295
|
-
|
|
296
55
|
const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
|
|
297
|
-
return /*#__PURE__*/
|
|
56
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
298
57
|
as: ToggleSwitch$1,
|
|
299
|
-
ref: ref
|
|
300
|
-
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
|
|
304
|
-
const Truncate = styled(Truncate$1).withConfig({
|
|
305
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
306
|
-
}).withConfig({
|
|
307
|
-
displayName: "Truncate",
|
|
308
|
-
componentId: "sc-x3i4it-0"
|
|
309
|
-
})(["", ""], sx);
|
|
310
|
-
|
|
311
|
-
const UnderlineNavImpl = /*#__PURE__*/forwardRef(function UnderlineNav(props, ref) {
|
|
312
|
-
return /*#__PURE__*/jsx(Box, {
|
|
313
|
-
as: UnderlineNav$1,
|
|
314
|
-
ref: ref,
|
|
315
|
-
...props
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
const UnderlineNavItem = styled(UnderlineNav$1.Item).withConfig({
|
|
319
|
-
shouldForwardProp: prop => prop !== 'sx'
|
|
320
|
-
}).withConfig({
|
|
321
|
-
displayName: "UnderlineNav__UnderlineNavItem",
|
|
322
|
-
componentId: "sc-dx6br2-0"
|
|
323
|
-
})(["", ""], sx);
|
|
324
|
-
const UnderlineNav = Object.assign(UnderlineNavImpl, {
|
|
325
|
-
Item: UnderlineNavItem
|
|
58
|
+
ref: ref
|
|
59
|
+
}, props));
|
|
326
60
|
});
|
|
327
61
|
|
|
328
|
-
export {
|
|
62
|
+
export { SegmentedControl, StateLabel, SubNav, ToggleSwitch };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-20250926231646",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
"./experimental": {
|
|
15
15
|
"types": "./dist/experimental.d.ts",
|
|
16
16
|
"default": "./dist/experimental.js"
|
|
17
|
-
}
|
|
18
|
-
"./components.json": "./dist/components.json"
|
|
17
|
+
}
|
|
19
18
|
},
|
|
20
19
|
"files": [
|
|
21
20
|
"README.md",
|
|
@@ -30,12 +29,11 @@
|
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@babel/preset-react": "^7.27.1",
|
|
32
31
|
"@babel/preset-typescript": "^7.27.1",
|
|
33
|
-
"@primer/react": "0.0.0-
|
|
32
|
+
"@primer/react": "0.0.0-20250926231646",
|
|
34
33
|
"@rollup/plugin-babel": "^6.0.4",
|
|
35
34
|
"@types/react": "18.3.11",
|
|
36
35
|
"@types/react-dom": "18.3.1",
|
|
37
36
|
"@vitejs/plugin-react": "^4.3.3",
|
|
38
|
-
"babel-plugin-styled-components": "2.1.4",
|
|
39
37
|
"publint": "^0.3.12",
|
|
40
38
|
"react": "18.3.1",
|
|
41
39
|
"react-dom": "18.3.1",
|
|
@@ -46,7 +44,7 @@
|
|
|
46
44
|
"typescript": "^5.9.2"
|
|
47
45
|
},
|
|
48
46
|
"peerDependencies": {
|
|
49
|
-
"@primer/react": "0.0.0-
|
|
47
|
+
"@primer/react": "0.0.0-20250926231646",
|
|
50
48
|
"@types/react": "18.x || 19.x",
|
|
51
49
|
"@types/react-dom": "18.x || 19.x",
|
|
52
50
|
"@types/react-is": "18.x || 19.x",
|