@primer/styled-react 0.0.0-20251004174629 → 0.0.0-20251004180535

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.
@@ -10,11 +10,14 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
10
10
  ...props
11
11
  });
12
12
  });
13
- function DeprecatedTooltip(props) {
13
+ // Cast the polymorphic component to a compatible type for styled-components
14
+ const DeprecatedTooltipComponent = Tooltip$2;
15
+ const DeprecatedTooltip = /*#__PURE__*/forwardRef(function DeprecatedTooltip(props, ref) {
14
16
  return /*#__PURE__*/jsx(Box, {
15
- as: Tooltip$2,
17
+ as: DeprecatedTooltipComponent,
18
+ ref: ref,
16
19
  ...props
17
20
  });
18
- }
21
+ });
19
22
 
20
23
  export { DeprecatedTooltip as D, Tooltip as T };
@@ -5,6 +5,6 @@ type TooltipProps = PrimerTooltipProps & SxProp;
5
5
  declare const Tooltip: ForwardRefExoticComponent<TooltipProps & RefAttributes<HTMLDivElement>>;
6
6
  export { Tooltip, type TooltipProps };
7
7
  type DeprecatedTooltipProps = PrimerDeprecatedTooltipProps & SxProp;
8
- declare function DeprecatedTooltip(props: DeprecatedTooltipProps): import("react").JSX.Element;
8
+ declare const DeprecatedTooltip: ForwardRefExoticComponent<DeprecatedTooltipProps & RefAttributes<HTMLSpanElement>>;
9
9
  export { DeprecatedTooltip, type DeprecatedTooltipProps };
10
10
  //# sourceMappingURL=Tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,IAAI,kBAAkB,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AAC5G,OAAO,EAEL,KAAK,YAAY,IAAI,4BAA4B,EAClD,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAa,KAAK,yBAAyB,EAAE,KAAK,aAAa,EAAC,MAAM,OAAO,CAAA;AAEpF,KAAK,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE/C,QAAA,MAAM,OAAO,EAAE,yBAAyB,CAAC,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,CAKnF,CAAA;AAEF,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA;AAEnC,KAAK,sBAAsB,GAAG,4BAA4B,GAAG,MAAM,CAAA;AAEnE,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,+BAEvD;AACD,OAAO,EAAC,iBAAiB,EAAE,KAAK,sBAAsB,EAAC,CAAA"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,IAAI,kBAAkB,EAAE,KAAK,MAAM,EAAC,MAAM,eAAe,CAAA;AAC5G,OAAO,EAEL,KAAK,YAAY,IAAI,4BAA4B,EAClD,MAAM,0BAA0B,CAAA;AAEjC,OAAO,EAAa,KAAK,yBAAyB,EAAE,KAAK,aAAa,EAAqB,MAAM,OAAO,CAAA;AAExG,KAAK,YAAY,GAAG,kBAAkB,GAAG,MAAM,CAAA;AAE/C,QAAA,MAAM,OAAO,EAAE,yBAAyB,CAAC,YAAY,GAAG,aAAa,CAAC,cAAc,CAAC,CAKnF,CAAA;AAEF,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA;AAEnC,KAAK,sBAAsB,GAAG,4BAA4B,GAAG,MAAM,CAAA;AAKnE,QAAA,MAAM,iBAAiB,EAAE,yBAAyB,CAAC,sBAAsB,GAAG,aAAa,CAAC,eAAe,CAAC,CAGtG,CAAA;AACJ,OAAO,EAAC,iBAAiB,EAAE,KAAK,sBAAsB,EAAC,CAAA"}
@@ -66,7 +66,6 @@
66
66
  "LinkButtonProps",
67
67
  "LinkProps",
68
68
  "NavListProps",
69
- "OcticonProps",
70
69
  "PageHeaderActionsProps",
71
70
  "PageHeaderProps",
72
71
  "PageHeaderTitleProps",
@@ -1,5 +1,5 @@
1
1
  export { TabNav, type TabNavProps, type TabNavLinkProps } from './components/TabNav';
2
2
  export { Dialog, type DialogProps, type DialogHeaderProps } from './components/DialogV1';
3
- export { Octicon, type OcticonProps } from './components/Octicon';
3
+ export { Octicon } from '@primer/react/deprecated';
4
4
  export { DeprecatedTooltip as Tooltip, type DeprecatedTooltipProps as TooltipProps } from './components/Tooltip';
5
5
  //# 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,KAAK,WAAW,EAAE,KAAK,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAC/D,OAAO,EAAC,iBAAiB,IAAI,OAAO,EAAE,KAAK,sBAAsB,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAA"}
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,eAAe,EAAC,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAC,MAAM,uBAAuB,CAAA;AACtF,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAC,iBAAiB,IAAI,OAAO,EAAE,KAAK,sBAAsB,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAA"}
@@ -1,9 +1,10 @@
1
- import { TabNav as TabNav$1, Dialog as Dialog$1, Octicon as Octicon$1 } from '@primer/react/deprecated';
1
+ import { TabNav as TabNav$1, Dialog as Dialog$1 } from '@primer/react/deprecated';
2
+ export { Octicon } from '@primer/react/deprecated';
2
3
  import { sx, Box } from '@primer/react';
3
4
  import styled from 'styled-components';
4
5
  import { forwardRef } from 'react';
5
6
  import { jsx } from 'react/jsx-runtime';
6
- export { D as Tooltip } from './Tooltip-YuSlJ5b_.js';
7
+ export { D as Tooltip } from './Tooltip-BG0Yv54T.js';
7
8
 
8
9
  const StyledTabNav = styled(TabNav$1).withConfig({
9
10
  shouldForwardProp: prop => prop !== 'sx'
@@ -80,36 +81,4 @@ const Dialog = Object.assign(DialogImpl, {
80
81
  Header: DialogHeader
81
82
  });
82
83
 
83
- /**
84
- * @deprecated Use the icon component directly from `@primer/octicons-react` instead
85
- */
86
- const StyledOcticon = styled(Octicon$1).withConfig({
87
- shouldForwardProp(prop) {
88
- return prop !== 'sx';
89
- }
90
- }).withConfig({
91
- displayName: "Octicon__StyledOcticon",
92
- componentId: "sc-17xnf60-0"
93
- })(["", ""], ({
94
- color,
95
- sx: sxProp
96
- }) => sx({
97
- sx: {
98
- color,
99
- ...sxProp
100
- }
101
- }));
102
- const Octicon = /*#__PURE__*/forwardRef(({
103
- as,
104
- ...props
105
- }, ref) => {
106
- return /*#__PURE__*/jsx(StyledOcticon, {
107
- ...props,
108
- ...(as ? {
109
- forwardedAs: as
110
- } : {}),
111
- ref: ref
112
- });
113
- });
114
-
115
- export { Dialog, Octicon, TabNav };
84
+ export { Dialog, TabNav };
@@ -1,5 +1,5 @@
1
1
  export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
2
- export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
2
+ export { T as Tooltip } from './Tooltip-BG0Yv54T.js';
3
3
  import { UnderlinePanels as UnderlinePanels$1 } from '@primer/react/experimental';
4
4
  export { Table } from '@primer/react/experimental';
5
5
  import styled from 'styled-components';
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import React, { forwardRef } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
  export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
7
- export { T as Tooltip } from './Tooltip-YuSlJ5b_.js';
7
+ export { T as Tooltip } from './Tooltip-BG0Yv54T.js';
8
8
  import css from '@styled-system/css';
9
9
  import '@primer/react/deprecated';
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "0.0.0-20251004174629",
3
+ "version": "0.0.0-20251004180535",
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-20251004174629",
33
+ "@primer/react": "0.0.0-20251004180535",
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-20251004174629",
49
+ "@primer/react": "0.0.0-20251004180535",
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,17 +0,0 @@
1
- import { type OcticonProps as PrimerOcticonProps } from '@primer/react/deprecated';
2
- import { type SxProp } from '../sx';
3
- /**
4
- * @deprecated Use the icon component directly from `@primer/octicons-react` instead
5
- */
6
- export type OcticonProps = PrimerOcticonProps & SxProp & {
7
- color?: string;
8
- };
9
- declare const Octicon: import("react").ForwardRefExoticComponent<{
10
- icon: React.ElementType;
11
- as?: React.ElementType;
12
- } & import("@primer/octicons-react").IconProps & SxProp & {
13
- color?: string;
14
- } & import("react").RefAttributes<unknown>>;
15
- export default Octicon;
16
- export { Octicon };
17
- //# sourceMappingURL=Octicon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Octicon.d.ts","sourceRoot":"","sources":["../../src/components/Octicon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,0BAA0B,CAAA;AAE1G,OAAO,EAAC,KAAK,MAAM,EAAK,MAAM,OAAO,CAAA;AAGrC;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,MAAM,GAAG;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,CAAA;AAazE,QAAA,MAAM,OAAO;;;;YAbqD,MAAM;2CAetE,CAAA;AAEF,eAAe,OAAO,CAAA;AACtB,OAAO,EAAC,OAAO,EAAC,CAAA"}