@primer/styled-react 0.0.0-20251003233014 → 0.0.0-20251003235425

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.
@@ -1,4 +1,4 @@
1
- import { Dialog as Dialog$1, Box, PageHeader as PageHeader$1, sx } from '@primer/react';
1
+ import { Dialog as Dialog$1, Box, PageHeader as PageHeader$1, sx, Tooltip as Tooltip$1 } from '@primer/react';
2
2
  import React, { forwardRef } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import styled from 'styled-components';
@@ -141,4 +141,12 @@ const PageHeader = Object.assign(PageHeaderImpl, {
141
141
  TrailingAction: PageHeader$1.TrailingAction
142
142
  });
143
143
 
144
- export { Dialog as D, PageHeader as P };
144
+ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
145
+ return /*#__PURE__*/jsx(Box, {
146
+ as: Tooltip$1,
147
+ ref: ref,
148
+ ...props
149
+ });
150
+ });
151
+
152
+ export { Dialog as D, PageHeader as P, Tooltip as T };
@@ -1,10 +1,6 @@
1
1
  import { type TooltipProps as PrimerTooltipProps, type SxProp } from '@primer/react';
2
- import { type TooltipProps as PrimerDeprecatedTooltipProps } from '@primer/react/deprecated';
3
2
  import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
4
3
  type TooltipProps = PrimerTooltipProps & SxProp;
5
4
  declare const Tooltip: ForwardRefExoticComponent<TooltipProps & RefAttributes<HTMLDivElement>>;
6
5
  export { Tooltip, type TooltipProps };
7
- type DeprecatedTooltipProps = PrimerDeprecatedTooltipProps & SxProp;
8
- declare const DeprecatedTooltip: ForwardRefExoticComponent<DeprecatedTooltipProps & RefAttributes<HTMLSpanElement>>;
9
- export { DeprecatedTooltip, type DeprecatedTooltipProps };
10
6
  //# 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,EAAqC,MAAM,OAAO,CAAA;AAExH,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;AAInE,QAAA,MAAM,iBAAiB,EAAE,yBAAyB,CAAC,sBAAsB,GAAG,aAAa,CAAC,eAAe,CAAC,CAOtG,CAAA;AAEJ,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;AAE5G,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"}
@@ -0,0 +1,11 @@
1
+ import { type TooltipProps as PrimerTooltipProps } from '@primer/react/deprecated';
2
+ import { type SxProp } from '../../sx';
3
+ import { type PropsWithChildren } from 'react';
4
+ import type { ForwardRefComponent } from '../../polymorphic';
5
+ type TooltipProps = PropsWithChildren<PrimerTooltipProps & SxProp>;
6
+ declare const Tooltip: ForwardRefComponent<"span", TooltipProps> & {
7
+ alignments: string[];
8
+ directions: string[];
9
+ };
10
+ export { Tooltip, type TooltipProps };
11
+ //# sourceMappingURL=Tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/deprecated/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,KAAK,YAAY,IAAI,kBAAkB,EAAC,MAAM,0BAA0B,CAAA;AAG1G,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,UAAU,CAAA;AACxC,OAAO,EAAC,KAAK,iBAAiB,EAAC,MAAM,OAAO,CAAA;AAE5C,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAA;AAE1D,KAAK,YAAY,GAAG,iBAAiB,CAAC,kBAAkB,GAAG,MAAM,CAAC,CAAA;AAQlE,QAAA,MAAM,OAAO,EAEP,mBAAmB,CAAC,MAAM,EAAE,YAAY,CAAC,GAAG;IAChD,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,EAAE,CAAA;CACrB,CAAA;AAED,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,CAAA"}
@@ -1,6 +1,6 @@
1
1
  export { TabNav, type TabNavProps, type TabNavLinkProps } from './components/deprecated/TabNav';
2
2
  export { Dialog, type DialogProps, type DialogHeaderProps } from './components/deprecated/DialogV1';
3
3
  export { Octicon } from '@primer/react/deprecated';
4
- export { DeprecatedTooltip as Tooltip, type DeprecatedTooltipProps as TooltipProps } from './components/Tooltip';
4
+ export { Tooltip, type TooltipProps } from './components/deprecated/Tooltip';
5
5
  export { ActionList, type ActionListProps, type ActionListItemProps, type ActionListGroupProps, } from './components/deprecated/ActionList';
6
6
  //# 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,gCAAgC,CAAA;AAC7F,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAC,MAAM,kCAAkC,CAAA;AACjG,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAC,iBAAiB,IAAI,OAAO,EAAE,KAAK,sBAAsB,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAA;AAC9G,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,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,gCAAgC,CAAA;AAC7F,OAAO,EAAC,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAC,MAAM,kCAAkC,CAAA;AACjG,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAC,OAAO,EAAE,KAAK,YAAY,EAAC,MAAM,iCAAiC,CAAA;AAC1E,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAA"}
@@ -1,10 +1,9 @@
1
- import { TabNav as TabNav$1, Dialog as Dialog$1, ActionList as ActionList$1 } from '@primer/react/deprecated';
1
+ import { TabNav as TabNav$1, Dialog as Dialog$1, Tooltip as Tooltip$1, ActionList as ActionList$1 } from '@primer/react/deprecated';
2
2
  export { Octicon } from '@primer/react/deprecated';
3
3
  import { sx, Box } from '@primer/react';
4
4
  import styled from 'styled-components';
5
5
  import { forwardRef } from 'react';
6
6
  import { jsx } from 'react/jsx-runtime';
7
- export { D as Tooltip } from './Tooltip-CTlPFQgQ.js';
8
7
 
9
8
  const StyledTabNav = styled(TabNav$1).withConfig({
10
9
  shouldForwardProp: prop => prop !== 'sx'
@@ -81,6 +80,25 @@ const Dialog = Object.assign(DialogImpl, {
81
80
  Header: DialogHeader
82
81
  });
83
82
 
83
+ const StyledTooltip = styled(Tooltip$1).withConfig({
84
+ shouldForwardProp: prop => prop !== 'sx'
85
+ }).withConfig({
86
+ displayName: "Tooltip__StyledTooltip",
87
+ componentId: "sc-145jcib-0"
88
+ })(["", ""], sx);
89
+ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip({
90
+ as,
91
+ ...props
92
+ }, ref) {
93
+ return /*#__PURE__*/jsx(StyledTooltip, {
94
+ ...props,
95
+ ...(as ? {
96
+ forwardedAs: as
97
+ } : {}),
98
+ ref: ref
99
+ });
100
+ });
101
+
84
102
  const ActionListImpl = /*#__PURE__*/forwardRef(function ActionList(props, ref) {
85
103
  return /*#__PURE__*/jsx(Box, {
86
104
  as: ActionList$1,
@@ -122,4 +140,4 @@ const ActionList = Object.assign(ActionListImpl, {
122
140
  Divider: ActionListDivider
123
141
  });
124
142
 
125
- export { ActionList, Dialog, TabNav };
143
+ export { ActionList, Dialog, TabNav, Tooltip };
@@ -1,12 +1,10 @@
1
- export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
2
- export { T as Tooltip } from './Tooltip-CTlPFQgQ.js';
1
+ export { D as Dialog, P as PageHeader, T as Tooltip } from './Tooltip-DIHgr01r.js';
3
2
  import { UnderlinePanels as UnderlinePanels$1 } from '@primer/react/experimental';
4
3
  export { Table } from '@primer/react/experimental';
5
4
  import styled from 'styled-components';
6
5
  import { sx } from '@primer/react';
7
6
  import { jsx } from 'react/jsx-runtime';
8
7
  import 'react';
9
- import '@primer/react/deprecated';
10
8
 
11
9
  const StyledUnderlinePanels = styled(UnderlinePanels$1).withConfig({
12
10
  shouldForwardProp: prop => prop !== 'sx'
package/dist/index.js CHANGED
@@ -3,10 +3,8 @@ export { ActionList, Box, Button, Details, FormControl, IconButton, PageLayout,
3
3
  import styled from 'styled-components';
4
4
  import React, { forwardRef } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
6
- export { D as Dialog, P as PageHeader } from './PageHeader-DCDIR2C1.js';
7
- export { T as Tooltip } from './Tooltip-CTlPFQgQ.js';
6
+ export { D as Dialog, P as PageHeader, T as Tooltip } from './Tooltip-DIHgr01r.js';
8
7
  import css from '@styled-system/css';
9
- import '@primer/react/deprecated';
10
8
 
11
9
  const ActionMenuOverlay = styled(ActionMenu$1.Overlay).withConfig({
12
10
  shouldForwardProp: prop => prop !== 'sx'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "0.0.0-20251003233014",
3
+ "version": "0.0.0-20251003235425",
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-20251003233014",
33
+ "@primer/react": "0.0.0-20251003235425",
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-20251003233014",
49
+ "@primer/react": "0.0.0-20251003235425",
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,24 +0,0 @@
1
- import { Box, Tooltip as Tooltip$1 } from '@primer/react';
2
- import { Tooltip as Tooltip$2 } from '@primer/react/deprecated';
3
- import { forwardRef } from 'react';
4
- import { jsx } from 'react/jsx-runtime';
5
-
6
- const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
7
- return /*#__PURE__*/jsx(Box, {
8
- as: Tooltip$1,
9
- ref: ref,
10
- ...props
11
- });
12
- });
13
- const DeprecatedTooltipComponent = Tooltip$2;
14
- const DeprecatedTooltip = /*#__PURE__*/forwardRef(function DeprecatedTooltip(props, forwardedRef) {
15
- // Filter out legacy string refs that styled-components doesn't support
16
- const ref = typeof forwardedRef === 'string' ? null : forwardedRef;
17
- return /*#__PURE__*/jsx(Box, {
18
- as: DeprecatedTooltipComponent,
19
- ref: ref,
20
- ...props
21
- });
22
- });
23
-
24
- export { DeprecatedTooltip as D, Tooltip as T };