@primer/styled-react 0.0.0-20251009004757 → 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.
- package/dist/components/Text.d.ts +4 -17
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/package.json +3 -3
|
@@ -1,23 +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
|
|
5
|
-
|
|
4
|
+
import { type StyledComponent } from 'styled-components';
|
|
5
|
+
type TextProps = PrimerTextProps & SxProp & {
|
|
6
|
+
as?: React.ElementType;
|
|
6
7
|
};
|
|
7
|
-
declare const Text:
|
|
8
|
-
size?: "large" | "medium" | "small";
|
|
9
|
-
weight?: "light" | "normal" | "medium" | "semibold";
|
|
10
|
-
className?: string;
|
|
11
|
-
} & {
|
|
12
|
-
as?: "span" | undefined;
|
|
13
|
-
} & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref">, "as" | keyof {
|
|
14
|
-
size?: "large" | "medium" | "small";
|
|
15
|
-
weight?: "light" | "normal" | "medium" | "semibold";
|
|
16
|
-
className?: string;
|
|
17
|
-
}> & {
|
|
18
|
-
children?: React.ReactNode | undefined;
|
|
19
|
-
} & SxProp & {
|
|
20
|
-
as?: "span" | undefined;
|
|
21
|
-
} & React.RefAttributes<HTMLElement>>;
|
|
8
|
+
declare const Text: StyledComponent<"span", any, TextProps, never>;
|
|
22
9
|
export { Text, type TextProps };
|
|
23
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;
|
|
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((
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
...restProps
|
|
530
|
-
} = props;
|
|
527
|
+
const Text = /*#__PURE__*/forwardRef(({
|
|
528
|
+
as,
|
|
529
|
+
...props
|
|
530
|
+
}, ref) => {
|
|
531
531
|
return /*#__PURE__*/jsx(StyledText, {
|
|
532
|
-
...
|
|
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-
|
|
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-
|
|
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-
|
|
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",
|