@primer/styled-react 1.0.0-rc.2 → 1.0.0-rc.3
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/index.d.ts +16 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -4
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,25 @@
|
|
|
1
|
-
import { type BetterSystemStyleObject, type BoxProps, type SxProp, type SubNavProps as PrimerSubNavProps, type SubNavLinkProps as PrimerSubNavLinkProps, type ToggleSwitchProps as PrimerToggleSwitchProps } from '@primer/react';
|
|
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';
|
|
2
3
|
import type { BackgroundProps, BorderProps, ColorProps, FlexboxProps, GridProps, LayoutProps, PositionProps, ShadowProps, SpaceProps, TypographyProps } from 'styled-system';
|
|
3
4
|
type StyledProps = SxProp & SpaceProps & ColorProps & TypographyProps & LayoutProps & FlexboxProps & GridProps & BackgroundProps & BorderProps & PositionProps & ShadowProps;
|
|
4
|
-
|
|
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> & {
|
|
5
13
|
variant?: "small" | "normal";
|
|
6
14
|
status: "open" | "issueOpened" | "pullOpened" | "issueClosed" | "issueClosedNotPlanned" | "pullClosed" | "pullMerged" | "draft" | "issueDraft" | "pullQueued" | "unavailable" | "closed";
|
|
7
|
-
} & SxProp &
|
|
15
|
+
} & SxProp & React.RefAttributes<HTMLSpanElement>>;
|
|
8
16
|
type SubNavProps = PrimerSubNavProps & SxProp;
|
|
9
17
|
type SubNavLinkProps = PrimerSubNavLinkProps & SxProp;
|
|
10
|
-
declare const SubNav:
|
|
11
|
-
Link:
|
|
18
|
+
declare const SubNav: React.ForwardRefExoticComponent<Omit<SubNavProps, "ref"> & React.RefAttributes<HTMLElement>> & {
|
|
19
|
+
Link: React.ForwardRefExoticComponent<Omit<SubNavLinkProps, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
20
|
};
|
|
13
|
-
declare const ToggleSwitch:
|
|
14
|
-
export { StateLabel, SubNav, ToggleSwitch };
|
|
15
|
-
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,
|
|
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';
|
|
16
24
|
export type { BoxProps, SxProp, BetterSystemStyleObject };
|
|
17
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,EACL,KAAK,uBAAuB,EAE5B,KAAK,QAAQ,EACb,KAAK,MAAM,EAIX,KAAK,WAAW,IAAI,iBAAiB,EACrC,KAAK,eAAe,IAAI,qBAAqB,EAE7C,KAAK,iBAAiB,IAAI,uBAAuB,
|
|
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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package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Box, 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,
|
|
3
|
-
import { forwardRef } from '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
|
+
import React, { forwardRef } from 'react';
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
6
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -12,6 +12,25 @@ function _extends() {
|
|
|
12
12
|
}, _extends.apply(null, arguments);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
const SegmentedControlButton = props => {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
17
|
+
as: SegmentedControl$1.Button
|
|
18
|
+
}, props));
|
|
19
|
+
};
|
|
20
|
+
const SegmentedControlIconButton = props => {
|
|
21
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
22
|
+
as: SegmentedControl$1.IconButton
|
|
23
|
+
}, props));
|
|
24
|
+
};
|
|
25
|
+
const SegmentedControlImpl = props => {
|
|
26
|
+
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
27
|
+
as: SegmentedControl$1
|
|
28
|
+
}, props));
|
|
29
|
+
};
|
|
30
|
+
const SegmentedControl = Object.assign(SegmentedControlImpl, {
|
|
31
|
+
Button: SegmentedControlButton,
|
|
32
|
+
IconButton: SegmentedControlIconButton
|
|
33
|
+
});
|
|
15
34
|
const StateLabel = /*#__PURE__*/forwardRef(function StateLabel(props, ref) {
|
|
16
35
|
return /*#__PURE__*/React.createElement(Box, _extends({
|
|
17
36
|
as: StateLabel$1,
|
|
@@ -40,4 +59,4 @@ const ToggleSwitch = /*#__PURE__*/forwardRef(function ToggleSwitch(props, ref) {
|
|
|
40
59
|
}, props));
|
|
41
60
|
});
|
|
42
61
|
|
|
43
|
-
export { StateLabel, SubNav, ToggleSwitch };
|
|
62
|
+
export { SegmentedControl, StateLabel, SubNav, ToggleSwitch };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@babel/preset-react": "^7.27.1",
|
|
31
31
|
"@babel/preset-typescript": "^7.27.1",
|
|
32
|
-
"@primer/react": "^38.0.0-rc.
|
|
32
|
+
"@primer/react": "^38.0.0-rc.3",
|
|
33
33
|
"@rollup/plugin-babel": "^6.0.4",
|
|
34
34
|
"@types/react": "18.3.11",
|
|
35
35
|
"@types/react-dom": "18.3.1",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"typescript": "^5.9.2"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@primer/react": "38.0.0-rc.
|
|
47
|
+
"@primer/react": "38.0.0-rc.3",
|
|
48
48
|
"@types/react": "18.x || 19.x",
|
|
49
49
|
"@types/react-dom": "18.x || 19.x",
|
|
50
50
|
"@types/react-is": "18.x || 19.x",
|