@primer/styled-react 0.0.0-20251008233539 → 0.0.0-20251009004757
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 +17 -4
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/package.json +3 -3
|
@@ -1,10 +1,23 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
as?: React.ElementType;
|
|
4
|
+
type TextProps<As extends React.ElementType = 'span'> = PrimerTextProps<As> & SxProp & {
|
|
5
|
+
as?: As;
|
|
7
6
|
};
|
|
8
|
-
declare const Text:
|
|
7
|
+
declare const Text: React.ForwardRefExoticComponent<{
|
|
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>>;
|
|
9
22
|
export { Text, type TextProps };
|
|
10
23
|
//# 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;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;;;;;;;;;;;;;;qCAGR,CAAA;AAEF,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({
|
|
524
522
|
displayName: "Text__StyledText",
|
|
525
523
|
componentId: "sc-1klmep6-0"
|
|
526
524
|
})(["", ""], sx);
|
|
527
|
-
const Text = /*#__PURE__*/forwardRef(({
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
525
|
+
const Text = /*#__PURE__*/forwardRef((props, ref) => {
|
|
526
|
+
const {
|
|
527
|
+
as,
|
|
528
|
+
sx: sxProp,
|
|
529
|
+
...restProps
|
|
530
|
+
} = props;
|
|
531
531
|
return /*#__PURE__*/jsx(StyledText, {
|
|
532
|
-
...
|
|
532
|
+
...restProps,
|
|
533
|
+
sx: sxProp,
|
|
533
534
|
...(as ? {
|
|
534
535
|
forwardedAs: as
|
|
535
536
|
} : {}),
|
|
536
537
|
ref: ref
|
|
537
538
|
});
|
|
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-20251009004757",
|
|
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-20251009004757",
|
|
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-20251009004757",
|
|
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",
|