@primer/styled-react 0.0.0-20251009005549 → 0.0.0-20251009012644

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,9 +1,10 @@
1
1
  import { type TextProps as PrimerTextProps } from '@primer/react';
2
2
  import { type SxProp } from '../sx';
3
3
  import type React from 'react';
4
- type TextProps<As extends React.ElementType = 'span'> = PrimerTextProps<As> & SxProp & {
5
- as?: As;
4
+ import { type StyledComponent } from 'styled-components';
5
+ type TextProps = PrimerTextProps & SxProp & {
6
+ as?: React.ElementType;
6
7
  };
7
- declare const Text: React.ForwardRefExoticComponent<Omit<TextProps<"span">, "ref"> & React.RefAttributes<HTMLElement>>;
8
+ declare const Text: StyledComponent<"span", any, TextProps, never>;
8
9
  export { Text, type TextProps };
9
10
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,IAAI,eAAe,EAAC,MAAM,eAAe,CAAA;AACnF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,SAAS,CAAC,EAAE,SAAS,KAAK,CAAC,WAAW,GAAG,MAAM,IAAI,eAAe,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,EAAE,CAAA;CAAC,CAAA;AAMhG,QAAA,MAAM,IAAI,oGAGR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAE,KAAK,SAAS,EAAC,CAAA"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,IAAI,eAAe,EAAC,MAAM,eAAe,CAAA;AACnF,OAAO,EAAK,KAAK,MAAM,EAAC,MAAM,OAAO,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,mBAAmB,CAAA;AAGtD,KAAK,SAAS,GAAG,eAAe,GAAG,MAAM,GAAG;IAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;CAAC,CAAA;AAQpE,QAAA,MAAM,IAAI,EAGJ,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;AAEpD,OAAO,EAAC,IAAI,EAAE,KAAK,SAAS,EAAC,CAAA"}
package/dist/index.js CHANGED
@@ -519,23 +519,23 @@ const SubNav = Object.assign(SubNavImpl, {
519
519
  });
520
520
 
521
521
  const StyledText = styled(Text$1).withConfig({
522
+ shouldForwardProp: prop => prop !== 'sx'
523
+ }).withConfig({
522
524
  displayName: "Text__StyledText",
523
525
  componentId: "sc-1klmep6-0"
524
526
  })(["", ""], sx);
525
- const Text = /*#__PURE__*/forwardRef((props, ref) => {
526
- const {
527
- as,
528
- sx: sxProp,
529
- ...restProps
530
- } = props;
527
+ const Text = /*#__PURE__*/forwardRef(({
528
+ as,
529
+ ...props
530
+ }, ref) => {
531
531
  return /*#__PURE__*/jsx(StyledText, {
532
- ...restProps,
533
- sx: sxProp,
532
+ ...props,
534
533
  ...(as ? {
535
534
  forwardedAs: as
536
535
  } : {}),
537
536
  ref: ref
538
537
  });
538
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
539
539
  });
540
540
 
541
541
  const TimelineImpl = /*#__PURE__*/forwardRef(function Timeline(props, ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primer/styled-react",
3
- "version": "0.0.0-20251009005549",
3
+ "version": "0.0.0-20251009012644",
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-20251009005549",
33
+ "@primer/react": "0.0.0-20251009012644",
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-20251009005549",
49
+ "@primer/react": "0.0.0-20251009012644",
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",