@primer/styled-react 0.0.0-20251002013345 → 0.0.0-20251002020018

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.
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ import { ActionList as PrimerActionList, type ActionListProps as PrimerActionListProps, type ActionListItemProps as PrimerActionListItemProps, type ActionListLinkItemProps as PrimerActionListLinkItemProps, type ActionListGroupProps as PrimerActionListGroupProps, type ActionListDividerProps as PrimerActionListDividerProps, type ActionListDescriptionProps as PrimerActionListDescriptionProps, type ActionListLeadingVisualProps as PrimerActionListLeadingVisualProps, type ActionListTrailingVisualProps as PrimerActionListTrailingVisualProps } from '@primer/react';
3
+ import { type SxProp } from '../sx';
4
+ import type { ForwardRefComponent } from '../polymorphic';
5
+ type PrimerActionListGroupHeadingProps = React.ComponentProps<typeof PrimerActionList.GroupHeading>;
6
+ type PrimerActionListHeadingProps = React.ComponentProps<typeof PrimerActionList.Heading>;
7
+ type PrimerActionListTrailingActionProps = React.ComponentProps<typeof PrimerActionList.TrailingAction>;
8
+ export type ActionListProps<As extends React.ElementType = 'ul'> = PrimerActionListProps<As> & SxProp;
9
+ export type ActionListItemProps = PrimerActionListItemProps & SxProp;
10
+ export type ActionListLinkItemProps = PrimerActionListLinkItemProps & SxProp;
11
+ export type ActionListGroupProps = PrimerActionListGroupProps & SxProp;
12
+ export type ActionListGroupHeadingProps = PrimerActionListGroupHeadingProps & SxProp;
13
+ export type ActionListDividerProps = PrimerActionListDividerProps & SxProp;
14
+ export type ActionListDescriptionProps = PrimerActionListDescriptionProps & SxProp;
15
+ export type ActionListLeadingVisualProps = PrimerActionListLeadingVisualProps & SxProp;
16
+ export type ActionListTrailingVisualProps = PrimerActionListTrailingVisualProps & SxProp;
17
+ export type ActionListHeadingProps = PrimerActionListHeadingProps & SxProp;
18
+ export type ActionListTrailingActionProps = PrimerActionListTrailingActionProps & SxProp;
19
+ type HeadingLevels = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
20
+ type TrailingActionElements = 'button' | 'a';
21
+ declare function ActionListGroup(props: ActionListGroupProps): React.JSX.Element;
22
+ declare function ActionListGroupHeading(props: ActionListGroupHeadingProps): React.JSX.Element;
23
+ declare function ActionListDivider(props: ActionListDividerProps): React.JSX.Element;
24
+ declare function ActionListDescription(props: ActionListDescriptionProps): React.JSX.Element;
25
+ declare function ActionListLeadingVisual(props: ActionListLeadingVisualProps): React.JSX.Element;
26
+ declare function ActionListTrailingVisual(props: ActionListTrailingVisualProps): React.JSX.Element;
27
+ export declare const ActionList: React.ForwardRefExoticComponent<Omit<ActionListProps<React.ElementType<any, keyof React.JSX.IntrinsicElements>>, "ref"> & React.RefAttributes<unknown>> & {
28
+ Item: React.ForwardRefExoticComponent<Omit<ActionListItemProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
29
+ LinkItem: ForwardRefComponent<"a", ActionListLinkItemProps>;
30
+ Group: typeof ActionListGroup;
31
+ GroupHeading: typeof ActionListGroupHeading;
32
+ Divider: typeof ActionListDivider;
33
+ Description: typeof ActionListDescription;
34
+ LeadingVisual: typeof ActionListLeadingVisual;
35
+ TrailingVisual: typeof ActionListTrailingVisual;
36
+ Heading: ForwardRefComponent<HeadingLevels, ActionListHeadingProps>;
37
+ TrailingAction: ForwardRefComponent<TrailingActionElements, ActionListTrailingActionProps>;
38
+ };
39
+ export {};
40
+ //# sourceMappingURL=ActionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionList.d.ts","sourceRoot":"","sources":["../../src/components/ActionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EACL,UAAU,IAAI,gBAAgB,EAC9B,KAAK,eAAe,IAAI,qBAAqB,EAC7C,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,KAAK,uBAAuB,IAAI,6BAA6B,EAC7D,KAAK,oBAAoB,IAAI,0BAA0B,EACvD,KAAK,sBAAsB,I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AAM,CAAA;AAyBxF,KAAK,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAS5D,KAAK,sBAAsB,GAAG,QAAQ,GAAG,GAAG,CAAA;AAa5C,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAEnD;AAED,iBAAS,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,qBAEjE;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAEvD;AAED,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,qBAE/D;AAED,iBAAS,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,qBAEnE;AAED,iBAAS,wBAAwB,CAAC,KAAK,EAAE,6BAA6B,qBAErE;AAED,eAAO,MAAM,UAAU;;;;;;;;;;;CAWrB,CAAA"}
@@ -1,25 +1,33 @@
1
1
  import { NavList as PrimerNavList } from '@primer/react';
2
- import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps } from '@primer/react';
3
- import { type ComponentProps, type PropsWithChildren } from 'react';
2
+ import type { NavListProps as PrimerNavListProps, NavListItemProps as PrimerNavListItemProps, NavListGroupHeadingProps as PrimerNavListGroupHeadingProps, NavListLeadingVisualProps as PrimerNavListLeadingVisualProps } from '@primer/react';
3
+ import { type PropsWithChildren } from 'react';
4
4
  import { type SxProp } from '../sx';
5
+ type RefComponent<E extends HTMLElement, P> = React.ForwardRefExoticComponent<P & React.RefAttributes<E>>;
5
6
  type NavListProps = PropsWithChildren<PrimerNavListProps> & SxProp;
6
- declare const NavList: import("react").ForwardRefExoticComponent<Omit<NavListProps, "ref"> & import("react").RefAttributes<HTMLElement>> & {
7
- Item: import("react").ForwardRefExoticComponent<PrimerNavListItemProps & {
8
- children?: import("react").ReactNode | undefined;
9
- } & SxProp & import("react").RefAttributes<HTMLAnchorElement>>;
10
- Group: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLLIElement> & {
11
- children: React.ReactNode;
12
- title?: string;
13
- } & {
14
- children?: import("react").ReactNode | undefined;
15
- } & SxProp & import("react").RefAttributes<HTMLLIElement>>;
16
- SubNav: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.SubNav>>>;
17
- Divider: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.Divider>>>;
18
- LeadingVisual: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.LeadingVisual>>>;
19
- TrailingVisual: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.TrailingVisual>>>;
20
- TrailingAction: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.TrailingAction>>>;
21
- GroupHeading: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.GroupHeading>>>;
22
- GroupExpand: React.FC<React.PropsWithChildren<ComponentProps<typeof PrimerNavList.GroupExpand>>>;
7
+ declare const NavListItem: import("react").ForwardRefExoticComponent<PrimerNavListItemProps & {
8
+ children?: import("react").ReactNode | undefined;
9
+ } & SxProp & import("react").RefAttributes<HTMLAnchorElement>>;
10
+ declare const NavListGroup: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLLIElement> & {
11
+ children: React.ReactNode;
12
+ title?: string;
13
+ } & {
14
+ children?: import("react").ReactNode | undefined;
15
+ } & SxProp & import("react").RefAttributes<HTMLLIElement>>;
16
+ type NavListGroupHeadingProps = PropsWithChildren<PrimerNavListGroupHeadingProps> & SxProp;
17
+ declare const NavListGroupHeading: RefComponent<HTMLElement, NavListGroupHeadingProps>;
18
+ type NavListLeadingVisualProps = PropsWithChildren<PrimerNavListLeadingVisualProps> & SxProp;
19
+ declare const NavListLeadingVisual: RefComponent<HTMLSpanElement, NavListLeadingVisualProps>;
20
+ type NavListCompound = React.ForwardRefExoticComponent<NavListProps & React.RefAttributes<HTMLElement>> & {
21
+ Item: typeof NavListItem;
22
+ Group: typeof NavListGroup;
23
+ GroupHeading: typeof NavListGroupHeading;
24
+ LeadingVisual: typeof NavListLeadingVisual;
25
+ SubNav: typeof PrimerNavList.SubNav;
26
+ Divider: typeof PrimerNavList.Divider;
27
+ TrailingVisual: typeof PrimerNavList.TrailingVisual;
28
+ TrailingAction: typeof PrimerNavList.TrailingAction;
29
+ GroupExpand: typeof PrimerNavList.GroupExpand;
23
30
  };
31
+ declare const NavList: NavListCompound;
24
32
  export { NavList, type NavListProps };
25
33
  //# sourceMappingURL=NavList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavList.d.ts","sourceRoot":"","sources":["../../src/components/NavList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,aAAa,EAAM,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,EACV,YAAY,IAAI,kBAAkB,EAClC,gBAAgB,IAAI,sBAAsB,EAE3C,MAAM,eAAe,CAAA;AACtB,OAAO,EAAa,KAAK,cAAc,EAAE,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAC7E,OAAO,EAAC,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAEjC,KAAK,YAAY,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,GAAG,MAAM,CAAA;AAoBlE,QAAA,MAAM,OAAO;;;;;;;;;;YAOqB,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;aAC5E,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC;mBACnE,KAAK,CAAC,EAAE,CACpD,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,aAAa,CAAC,CAAC,CAC5E;oBAC+C,KAAK,CAAC,EAAE,CACtD,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,cAAc,CAAC,CAAC,CAC7E;oBAC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3E,OAAO,EAAE,OAAO,iBAAiB,CAAA;IACjC,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,UAAU,EAAE,OAAO,gBAAgB,CAAC,UAAU,CAAA;IAC9C,SAAS,EAAE,OAAO,mBAAmB,CAAA;IACrC,kBAAkB,EAAE,OAAO,gBAAgB,CAAC,kBAAkB,CAAA;IAC9D,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,aAAa,EAAE,OAAO,gBAAgB,CAAC,aAAa,CAAA;IACpD,KAAK,EAAE,OAAO,eAAe,CAAA;IAC7B,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;IACtD,WAAW,EAAE,OAAO,gBAAgB,CAAC,WAAW,CAAA;IAChD,cAAc,EAAE,OAAO,gBAAgB,CAAC,cAAc,CAAA;CACvD,CAAA;AAED,QAAA,MAAM,UAAU,EAAE,uBAchB,CAAA;AAEF,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAE,sBAAsB,EAAE,oBAAoB,EAAC,CAAA"}
@@ -50,13 +50,23 @@
50
50
  "UnderlinePanels"
51
51
  ],
52
52
  "types": [
53
+ "ActionListDescriptionProps",
54
+ "ActionListDividerProps",
55
+ "ActionListGroupHeadingProps",
56
+ "ActionListGroupProps",
57
+ "ActionListHeadingProps",
58
+ "ActionListItemProps",
59
+ "ActionListLeadingVisualProps",
60
+ "ActionListLinkItemProps",
61
+ "ActionListProps",
62
+ "ActionListTrailingActionProps",
63
+ "ActionListTrailingVisualProps",
53
64
  "AutocompleteOverlayProps",
54
65
  "AvatarProps",
55
66
  "BetterSystemStyleObject",
56
67
  "BoxProps",
57
68
  "BreadcrumbsItemProps",
58
69
  "BreadcrumbsProps",
59
- "ButtonProps",
60
70
  "CheckboxGroupProps",
61
71
  "CheckboxProps",
62
72
  "CounterLabelProps",
@@ -64,7 +74,6 @@
64
74
  "DialogProps",
65
75
  "FormControlProps",
66
76
  "HeaderProps",
67
- "IconButtonProps",
68
77
  "LabelProps",
69
78
  "LinkButtonProps",
70
79
  "LinkProps",
@@ -85,7 +94,6 @@
85
94
  "SxProp",
86
95
  "TabNavLinkProps",
87
96
  "TabNavProps",
88
- "TextInputActionProps",
89
97
  "TextInputProps",
90
98
  "TextProps",
91
99
  "TimelineBadgeProps",
package/dist/index.d.ts CHANGED
@@ -1,20 +1,23 @@
1
- export { ActionList } from '@primer/react';
2
1
  export { Box, type BoxProps } from './components/Box';
2
+ export { Button } from '@primer/react';
3
3
  export { Details } from '@primer/react';
4
+ export { IconButton } from '@primer/react';
4
5
  export { ProgressBar } from '@primer/react';
5
6
  export { Select } from '@primer/react';
6
7
  export { Textarea } from '@primer/react';
8
+ export { TextInput } from '@primer/react';
9
+ export { type TextInputProps } from '@primer/react';
7
10
  export { ThemeProvider } from '@primer/react';
8
11
  export { merge } from '@primer/react';
9
12
  export { theme } from '@primer/react';
10
13
  export { themeGet } from '@primer/react';
11
14
  export { useColorSchemeVar } from '@primer/react';
12
15
  export { useTheme } from '@primer/react';
16
+ export { ActionList, type ActionListProps, type ActionListItemProps, type ActionListLinkItemProps, type ActionListGroupProps, type ActionListGroupHeadingProps, type ActionListDividerProps, type ActionListDescriptionProps, type ActionListLeadingVisualProps, type ActionListTrailingVisualProps, type ActionListHeadingProps, type ActionListTrailingActionProps, } from './components/ActionList';
13
17
  export { ActionMenu } from './components/ActionMenu';
14
18
  export { Autocomplete, type AutocompleteOverlayProps } from './components/Autocomplete';
15
19
  export { Avatar, type AvatarProps } from './components/Avatar';
16
20
  export { Breadcrumbs, Breadcrumb, type BreadcrumbsProps, type BreadcrumbsItemProps } from './components/Breadcrumbs';
17
- export { ButtonComponent as Button, type ButtonComponentProps as ButtonProps } from './components/Button';
18
21
  export { Checkbox, type CheckboxProps } from './components/Checkbox';
19
22
  export { CheckboxGroup, type CheckboxGroupProps } from './components/CheckboxGroup';
20
23
  export { CircleBadge } from './components/CircleBadge';
@@ -24,7 +27,6 @@ export { Flash } from './components/Flash';
24
27
  export { FormControl, type FormControlProps } from './components/FormControl';
25
28
  export { Header, type HeaderProps } from './components/Header';
26
29
  export { Heading } from './components/Heading';
27
- export { IconButton, type IconButtonProps } from './components/IconButton';
28
30
  export { Label, type LabelProps } from './components/Label';
29
31
  export { Link, type LinkProps } from './components/Link';
30
32
  export { LinkButton, type LinkButtonProps } from './components/LinkButton';
@@ -39,7 +41,6 @@ export { Spinner, type SpinnerProps } from './components/Spinner';
39
41
  export { StateLabel, type StateLabelProps } from './components/StateLabel';
40
42
  export { SubNav, type SubNavProps, type SubNavLinkProps } from './components/SubNav';
41
43
  export { Text, type TextProps } from './components/Text';
42
- export { TextInput, type TextInputProps, type TextInputActionProps } from './components/TextInput';
43
44
  export { Timeline, type TimelineProps, type TimelineItemProps, type TimelineBadgeProps, type TimelineBodyProps, type TimelineBreakProps, } from './components/Timeline';
44
45
  export { ToggleSwitch, type ToggleSwitchProps } from './components/ToggleSwitch';
45
46
  export { Tooltip, type TooltipProps } from './components/Tooltip';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAA;AACxC,OAAO,EAAC,GAAG,EAAE,KAAK,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACpC,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAA;AAGtC,OAAO,EAAC,aAAa,EAAC,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAC,KAAK,EAAC,MAAM,eAAe,CAAA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B,KAAK,kBAAkB,GACxB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,YAAY,EAAE,KAAK,iBAAiB,EAAC,MAAM,2BAA2B,CAAA;AAC9E,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAC,KAAK,EAAE,KAAK,UAAU,EAAC,MAAM,oBAAoB,CAAA;AACzD,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,13 +1,105 @@
1
- import { ActionMenu as ActionMenu$1, sx, Autocomplete as Autocomplete$1, Box, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Button, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, FormControl as FormControl$1, Header as Header$1, Heading as Heading$1, IconButton as IconButton$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$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, Text as Text$1, TextInput as TextInput$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1, useTheme, theme, Token as Token$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
2
- export { ActionList, Box, Details, ProgressBar, Select, Textarea, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
3
- import styled from 'styled-components';
1
+ import { ActionList as ActionList$1, sx, Box, ActionMenu as ActionMenu$1, Autocomplete as Autocomplete$1, Avatar as Avatar$1, Breadcrumbs as Breadcrumbs$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, CircleBadge as CircleBadge$1, CounterLabel as CounterLabel$1, Flash as Flash$1, FormControl as FormControl$1, Header as Header$1, Heading as Heading$1, Label as Label$1, Link as Link$1, LinkButton as LinkButton$1, NavList as NavList$1, Overlay as Overlay$1, PageLayout as PageLayout$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, Text as Text$1, Timeline as Timeline$1, ToggleSwitch as ToggleSwitch$1, useTheme, theme, Token as Token$1, Truncate as Truncate$1, UnderlineNav as UnderlineNav$1 } from '@primer/react';
2
+ export { Box, Button, Details, IconButton, ProgressBar, Select, TextInput, Textarea, ThemeProvider, merge, sx, theme, themeGet, useColorSchemeVar, useTheme } from '@primer/react';
4
3
  import React, { forwardRef } from 'react';
4
+ import styled from 'styled-components';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
7
7
  export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
8
8
  import css from '@styled-system/css';
9
9
  import '@primer/react/deprecated';
10
10
 
11
+ const StyledActionList = styled(ActionList$1).withConfig({
12
+ shouldForwardProp: prop => prop !== 'sx'
13
+ }).withConfig({
14
+ displayName: "ActionList__StyledActionList",
15
+ componentId: "sc-hw2362-0"
16
+ })(["", ""], sx);
17
+ const ActionListImpl = /*#__PURE__*/React.forwardRef(function ActionListImpl({
18
+ as,
19
+ ...rest
20
+ }, ref) {
21
+ return /*#__PURE__*/jsx(StyledActionList, {
22
+ ref: ref,
23
+ ...rest,
24
+ ...(as ? {
25
+ forwardedAs: as
26
+ } : {})
27
+ });
28
+ });
29
+ const ActionListLinkItem = styled(ActionList$1.LinkItem).withConfig({
30
+ shouldForwardProp: prop => prop !== 'sx'
31
+ }).withConfig({
32
+ displayName: "ActionList__ActionListLinkItem",
33
+ componentId: "sc-hw2362-1"
34
+ })(["", ""], sx);
35
+ const ActionListHeading = styled(ActionList$1.Heading).withConfig({
36
+ shouldForwardProp: prop => prop !== 'sx'
37
+ }).withConfig({
38
+ displayName: "ActionList__ActionListHeading",
39
+ componentId: "sc-hw2362-2"
40
+ })(["", ""], sx);
41
+ const ActionListTrailingAction = styled(ActionList$1.TrailingAction).withConfig({
42
+ shouldForwardProp: prop => prop !== 'sx'
43
+ }).withConfig({
44
+ displayName: "ActionList__ActionListTrailingAction",
45
+ componentId: "sc-hw2362-3"
46
+ })(["", ""], sx);
47
+ const ActionListItem = /*#__PURE__*/forwardRef(function Item(props, ref) {
48
+ return /*#__PURE__*/jsx(Box, {
49
+ ref: ref,
50
+ as: ActionList$1.Item,
51
+ ...props
52
+ });
53
+ });
54
+ function ActionListGroup(props) {
55
+ return /*#__PURE__*/jsx(Box, {
56
+ as: ActionList$1.Group,
57
+ ...props
58
+ });
59
+ }
60
+ function ActionListGroupHeading(props) {
61
+ return /*#__PURE__*/jsx(Box, {
62
+ as: ActionList$1.GroupHeading,
63
+ ...props
64
+ });
65
+ }
66
+ function ActionListDivider(props) {
67
+ return /*#__PURE__*/jsx(Box, {
68
+ as: ActionList$1.Divider,
69
+ ...props
70
+ });
71
+ }
72
+ function ActionListDescription(props) {
73
+ return /*#__PURE__*/jsx(Box, {
74
+ as: ActionList$1.Description,
75
+ ...props
76
+ });
77
+ }
78
+ function ActionListLeadingVisual(props) {
79
+ return /*#__PURE__*/jsx(Box, {
80
+ as: ActionList$1.LeadingVisual,
81
+ ...props
82
+ });
83
+ }
84
+ function ActionListTrailingVisual(props) {
85
+ return /*#__PURE__*/jsx(Box, {
86
+ as: ActionList$1.TrailingVisual,
87
+ ...props
88
+ });
89
+ }
90
+ const ActionList = Object.assign(ActionListImpl, {
91
+ Item: ActionListItem,
92
+ LinkItem: ActionListLinkItem,
93
+ Group: ActionListGroup,
94
+ GroupHeading: ActionListGroupHeading,
95
+ Divider: ActionListDivider,
96
+ Description: ActionListDescription,
97
+ LeadingVisual: ActionListLeadingVisual,
98
+ TrailingVisual: ActionListTrailingVisual,
99
+ Heading: ActionListHeading,
100
+ TrailingAction: ActionListTrailingAction
101
+ });
102
+
11
103
  const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
12
104
  shouldForwardProp: prop => prop !== 'sx'
13
105
  }).withConfig({
@@ -74,108 +166,6 @@ const Breadcrumbs = Object.assign(BreadcrumbsImpl, {
74
166
  */
75
167
  const Breadcrumb = Breadcrumbs;
76
168
 
77
- const StyledButtonComponent = /*#__PURE__*/forwardRef(({
78
- sx,
79
- ...rest
80
- }, ref) => {
81
- const {
82
- block,
83
- size = 'medium',
84
- leadingVisual,
85
- trailingVisual,
86
- trailingAction
87
- } = rest;
88
- let sxStyles = {};
89
- const style = {};
90
- if (sx !== null && Object.keys(sx || {}).length > 0) {
91
- sxStyles = generateCustomSxProp({
92
- block,
93
- size,
94
- leadingVisual,
95
- trailingVisual,
96
- trailingAction
97
- }, sx);
98
- const {
99
- color
100
- } = sx;
101
- if (color) style['--button-color'] = color;
102
- }
103
- return /*#__PURE__*/jsx(Box, {
104
- as: Button,
105
- style: style,
106
- sx: sxStyles,
107
- ref: ref,
108
- ...rest
109
- });
110
- });
111
- const ButtonComponent = /*#__PURE__*/forwardRef(({
112
- as,
113
- ...props
114
- }, ref) => /*#__PURE__*/jsx(StyledButtonComponent, {
115
- ref: ref,
116
- ...props,
117
- ...(as ? {
118
- forwardedAs: as
119
- } : {})
120
- }));
121
-
122
- // This function is used to generate a custom cssSelector for the sxProp
123
-
124
- // The usual sx prop can like this:
125
- // sx={{
126
- // [`@media (max-width: 768px)`]: {
127
- // '& > ul': {
128
- // backgroundColor: 'deeppink',
129
- // },
130
- // '&:hover': {
131
- // backgroundColor: 'yellow',
132
- // },
133
- // },
134
- // '&:hover': {
135
- // backgroundColor: 'yellow',
136
- // },
137
- // '&': {
138
- // width : 320px
139
- // }
140
- // }}
141
- //*
142
- /* What we want for Button styles is this:
143
- sx={{
144
- // [`@media (max-width: 768px)`]: {
145
- // '&[data-attribute="something"] > ul': {
146
- // backgroundColor: 'deeppink',
147
- // },
148
- // '&[data-attribute="something"]:hover': {
149
- // backgroundColor: 'yellow',
150
- // },
151
- // },
152
- // '&[data-attribute="something"]:hover': {
153
- // backgroundColor: 'yellow',
154
- // },
155
- // '&[data-attribute="something"]': {
156
- // width : 320px
157
- // }
158
- // }}
159
-
160
- // We need to make sure we append the customCSSSelector to the original class selector. i.e & - > &[data-attribute="Icon"][data-size="small"]
161
- */
162
- function generateCustomSxProp(props, providedSx) {
163
- // Possible data attributes: data-size, data-block, data-no-visuals
164
- const size = `[data-size="${props.size}"]`;
165
- const block = props.block ? `[data-block="block"]` : '';
166
- const noVisuals = props.leadingVisual || props.trailingVisual || props.trailingAction ? '' : '[data-no-visuals]';
167
-
168
- // this is a custom selector. We need to make sure we add the data attributes to the base css class (& -> &[data-attributename="value"]])
169
- const cssSelector = `&${size}${block}${noVisuals}`; // &[data-size="small"][data-block="block"][data-no-visuals]
170
-
171
- const customSxProp = {};
172
- if (!providedSx) return customSxProp;else {
173
- customSxProp[cssSelector] = providedSx;
174
- return customSxProp;
175
- }
176
- }
177
- ButtonComponent.displayName = 'Button';
178
-
179
169
  const Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, ref) {
180
170
  return /*#__PURE__*/jsx(Box, {
181
171
  as: Checkbox$1,
@@ -324,38 +314,6 @@ const Heading = styled(Heading$1).withConfig({
324
314
  componentId: "sc-1vc165i-0"
325
315
  })(["", ""], sx);
326
316
 
327
- const StyledIconButton = /*#__PURE__*/forwardRef(({
328
- sx,
329
- ...rest
330
- }, ref) => {
331
- let sxStyles = sx;
332
- // grap the button props that have associated data attributes in the styles
333
- const {
334
- size = 'medium'
335
- } = rest;
336
- if (sx !== null && sx !== undefined && Object.keys(sx).length > 0) {
337
- sxStyles = generateCustomSxProp({
338
- size
339
- }, sx);
340
- }
341
- return /*#__PURE__*/jsx(Box, {
342
- sx: sxStyles,
343
- as: IconButton$1,
344
- ref: ref,
345
- ...rest
346
- });
347
- });
348
- const IconButton = /*#__PURE__*/forwardRef(({
349
- as,
350
- ...props
351
- }, ref) => /*#__PURE__*/jsx(StyledIconButton, {
352
- ...props,
353
- ...(as ? {
354
- forwardedAs: as
355
- } : {}),
356
- ref: ref
357
- }));
358
-
359
317
  const StyledLabel = /*#__PURE__*/forwardRef(function Label(props, ref) {
360
318
  return /*#__PURE__*/jsx(Box, {
361
319
  as: Label$1,
@@ -425,18 +383,31 @@ const NavListGroup = /*#__PURE__*/forwardRef(function NavListGroup(props, ref) {
425
383
  ...props
426
384
  });
427
385
  });
386
+ const NavListGroupHeading = /*#__PURE__*/forwardRef(function NavListGroupHeading(props, ref) {
387
+ // @ts-expect-error - PrimerNavList.GroupHeading is not recognized as a valid component type
388
+ return /*#__PURE__*/jsx(Box, {
389
+ as: NavList$1.GroupHeading,
390
+ ref: ref,
391
+ ...props
392
+ });
393
+ });
394
+ const NavListLeadingVisual = /*#__PURE__*/forwardRef(function NavListLeadingVisual(props, ref) {
395
+ // @ts-expect-error - PrimerNavList.LeadingVisual is not recognized as a valid component type
396
+ return /*#__PURE__*/jsx(Box, {
397
+ as: NavList$1.LeadingVisual,
398
+ ref: ref,
399
+ ...props
400
+ });
401
+ });
428
402
  const NavList = Object.assign(NavListImpl, {
429
- // Wrapped components that need sx support added back in
430
403
  Item: NavListItem,
431
404
  Group: NavListGroup,
432
- // Re-exporting others directly
433
- // TODO: try to remove typecasts to work around "non-portable types" TS error
405
+ GroupHeading: NavListGroupHeading,
406
+ LeadingVisual: NavListLeadingVisual,
434
407
  SubNav: NavList$1.SubNav,
435
408
  Divider: NavList$1.Divider,
436
- LeadingVisual: NavList$1.LeadingVisual,
437
409
  TrailingVisual: NavList$1.TrailingVisual,
438
410
  TrailingAction: NavList$1.TrailingAction,
439
- GroupHeading: NavList$1.GroupHeading,
440
411
  GroupExpand: NavList$1.GroupExpand
441
412
  });
442
413
 
@@ -613,38 +584,6 @@ const Text = /*#__PURE__*/forwardRef(({
613
584
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
614
585
  });
615
586
 
616
- const StyledTextInput = /*#__PURE__*/forwardRef((props, ref) => {
617
- return /*#__PURE__*/jsx(Box, {
618
- as: TextInput$1,
619
- ref: ref,
620
- ...props
621
- });
622
- });
623
- const TextInputImpl = /*#__PURE__*/forwardRef(({
624
- as,
625
- ...props
626
- }, ref) => {
627
- return /*#__PURE__*/jsx(StyledTextInput, {
628
- ref: ref,
629
- ...props,
630
- ...(as ? {
631
- forwardedAs: as
632
- } : {})
633
- });
634
- });
635
- const TextInputAction = /*#__PURE__*/forwardRef((props, ref) => {
636
- return /*#__PURE__*/jsx(Box, {
637
- as: TextInput$1.Action,
638
- ref: ref,
639
- ...props
640
- });
641
- });
642
- const TextInput = Object.assign(TextInputImpl, {
643
- Action: TextInputAction
644
- });
645
- TextInputAction.displayName = 'TextInputAction';
646
- TextInputImpl.displayName = 'TextInput';
647
-
648
587
  const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
649
588
  return /*#__PURE__*/jsx(Box, {
650
589
  as: Timeline$1,
@@ -768,4 +707,4 @@ const UnderlineNav = Object.assign(UnderlineNavImpl, {
768
707
  Item: UnderlineNavItem
769
708
  });
770
709
 
771
- export { ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, ButtonComponent as Button, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, FormControl, Header, Heading, IconButton, Label, Link, LinkButton, NavList, Overlay, PageLayout, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, TextInput, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };
710
+ export { ActionList, ActionMenu, Autocomplete, Avatar, Breadcrumb, Breadcrumbs, Checkbox, CheckboxGroup, CircleBadge, CounterLabel, Flash, FormControl, Header, Heading, Label, Link, LinkButton, NavList, Overlay, PageLayout, RadioGroup, RelativeTime, SegmentedControl, Spinner, StateLabel, SubNav, Text, Timeline, ToggleSwitch, Token, Truncate, UnderlineNav };
package/dist/sx.d.ts CHANGED
@@ -1,5 +1,2 @@
1
1
  export { sx, type SxProp } from '@primer/react';
2
- export type CSSCustomProperties = {
3
- [key: `--${string}`]: string | number;
4
- };
5
2
  //# sourceMappingURL=sx.d.ts.map
package/dist/sx.d.ts.map CHANGED
@@ -1 +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;AAC7C,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,GAAG,EAAE,KAAK,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,CAAA;CACtC,CAAA"}
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": "0.0.0-20251002013345",
3
+ "version": "0.0.0-20251002020018",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -30,7 +30,7 @@
30
30
  "devDependencies": {
31
31
  "@babel/preset-react": "^7.27.1",
32
32
  "@babel/preset-typescript": "^7.27.1",
33
- "@primer/react": "0.0.0-20251002013345",
33
+ "@primer/react": "0.0.0-20251002020018",
34
34
  "@rollup/plugin-babel": "^6.0.4",
35
35
  "@types/react": "18.3.11",
36
36
  "@types/react-dom": "18.3.1",
@@ -46,7 +46,7 @@
46
46
  "typescript": "^5.9.2"
47
47
  },
48
48
  "peerDependencies": {
49
- "@primer/react": "0.0.0-20251002013345",
49
+ "@primer/react": "0.0.0-20251002020018",
50
50
  "@types/react": "18.x || 19.x",
51
51
  "@types/react-dom": "18.x || 19.x",
52
52
  "@types/react-is": "18.x || 19.x",
@@ -1,13 +0,0 @@
1
- import { type ButtonProps as PrimerButtonProps } from '@primer/react';
2
- import type { SxProp } from '../sx';
3
- import type { BetterSystemStyleObject } from '../styled-props';
4
- import type { ForwardRefComponent } from '../polymorphic';
5
- type ButtonComponentProps = PrimerButtonProps & SxProp & {
6
- as?: React.ElementType;
7
- };
8
- declare const ButtonComponent: ForwardRefComponent<"button", ButtonComponentProps>;
9
- export declare function generateCustomSxProp(props: Partial<Pick<PrimerButtonProps, 'size' | 'block' | 'leadingVisual' | 'trailingVisual' | 'trailingAction'>>, providedSx: BetterSystemStyleObject): {
10
- [key: string]: BetterSystemStyleObject;
11
- };
12
- export { ButtonComponent, type ButtonComponentProps };
13
- //# sourceMappingURL=Button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,WAAW,IAAI,iBAAiB,EAAC,MAAM,eAAe,CAAA;AAC3F,OAAO,KAAK,EAAC,MAAM,EAAsB,MAAM,OAAO,CAAA;AACtD,OAAO,KAAK,EAAC,uBAAuB,EAAC,MAAM,iBAAiB,CAAA;AAG5D,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAEvD,KAAK,oBAAoB,GAAG,iBAAiB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAoBjF,QAAA,MAAM,eAAe,EAEf,mBAAmB,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAA;AA0CzD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,EACjH,UAAU,EAAE,uBAAuB;;EAmBpC;AAID,OAAO,EAAC,eAAe,EAAE,KAAK,oBAAoB,EAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import { type IconButtonProps as PrimerIconButtonProps, type SxProp } from '@primer/react';
2
- import { type ForwardRefComponent } from '../polymorphic';
3
- type IconButtonProps = PrimerIconButtonProps & SxProp & {
4
- as?: React.ElementType;
5
- };
6
- declare const IconButton: ForwardRefComponent<"a" | "button", IconButtonProps>;
7
- export { IconButton };
8
- export type { IconButtonProps };
9
- //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,eAAe,IAAI,qBAAqB,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AACxH,OAAO,EAAC,KAAK,mBAAmB,EAAC,MAAM,gBAAgB,CAAA;AAKvD,KAAK,eAAe,GAAG,qBAAqB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAahF,QAAA,MAAM,UAAU,EAEV,mBAAmB,CAAC,GAAG,GAAG,QAAQ,EAAE,eAAe,CAAC,CAAA;AAE1D,OAAO,EAAC,UAAU,EAAC,CAAA;AACnB,YAAY,EAAC,eAAe,EAAC,CAAA"}
@@ -1,20 +0,0 @@
1
- import { type TextInputProps as PrimerTextInputProps, type TextInputActionProps as PrimerTextInputActionProps } from '@primer/react';
2
- import type { SxProp } from '../sx';
3
- import type { ForwardRefExoticComponent, RefAttributes } from 'react';
4
- export type TextInputProps = PrimerTextInputProps & SxProp & {
5
- as?: React.ElementType;
6
- };
7
- export type TextInputActionProps = PrimerTextInputActionProps & SxProp;
8
- declare const TextInputAction: ForwardRefExoticComponent<Omit<import("react").ButtonHTMLAttributes<HTMLButtonElement>, "size" | "aria-label" | "tooltipDirection"> & {
9
- children?: React.ReactNode;
10
- "aria-label"?: string;
11
- tooltipDirection?: "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
12
- icon?: React.FunctionComponent<React.PropsWithChildren<import("@primer/octicons-react").IconProps>>;
13
- variant?: import("@primer/react").ButtonProps["variant"];
14
- } & SxProp & RefAttributes<HTMLButtonElement>>;
15
- type TextInputComposite = ForwardRefExoticComponent<TextInputProps & RefAttributes<HTMLInputElement>> & {
16
- Action: typeof TextInputAction;
17
- };
18
- export declare const TextInput: TextInputComposite;
19
- export {};
20
- //# sourceMappingURL=TextInput.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/components/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,IAAI,oBAAoB,EAC3C,KAAK,oBAAoB,IAAI,0BAA0B,EACxD,MAAM,eAAe,CAAA;AAGtB,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,OAAO,CAAA;AACjC,OAAO,KAAK,EAAC,yBAAyB,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AAEnE,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AACrF,MAAM,MAAM,oBAAoB,GAAG,0BAA0B,GAAG,MAAM,CAAA;AAUtE,QAAA,MAAM,eAAe;;;;;;8CAEnB,CAAA;AAEF,KAAK,kBAAkB,GAAG,yBAAyB,CAAC,cAAc,GAAG,aAAa,CAAC,gBAAgB,CAAC,CAAC,GAAG;IACtG,MAAM,EAAE,OAAO,eAAe,CAAA;CAC/B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,kBAEtB,CAAA"}