@primer/styled-react 0.1.0 → 1.0.0-rc.0
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/config/vitest/browser/setup.d.ts +2 -0
- package/dist/config/vitest/browser/setup.d.ts.map +1 -0
- package/dist/src/__tests__/exports.test.d.ts.map +1 -0
- package/dist/src/deprecated.d.ts.map +1 -0
- package/dist/src/experimental.d.ts.map +1 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/utils/__tests__/createStyledComponent.browser.test.d.ts +2 -0
- package/dist/src/utils/__tests__/createStyledComponent.browser.test.d.ts.map +1 -0
- package/dist/src/utils/createStyledComponent.d.ts +20 -0
- package/dist/src/utils/createStyledComponent.d.ts.map +1 -0
- package/package.json +11 -10
- package/dist/__tests__/exports.test.d.ts.map +0 -1
- package/dist/deprecated.d.ts.map +0 -1
- package/dist/experimental.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- /package/dist/{__tests__ → src/__tests__}/exports.test.d.ts +0 -0
- /package/dist/{deprecated.d.ts → src/deprecated.d.ts} +0 -0
- /package/dist/{experimental.d.ts → src/experimental.d.ts} +0 -0
- /package/dist/{index.d.ts → src/index.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../../../config/vitest/browser/setup.ts"],"names":[],"mappings":"AAEA,OAAO,kCAAkC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/exports.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../../src/experimental.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,GAAG,EACH,KAAK,QAAQ,EACb,WAAW,EACX,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EAGR,EAAE,EACF,KAAK,MAAM,EACX,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStyledComponent.browser.test.d.ts","sourceRoot":"","sources":["../../../../src/utils/__tests__/createStyledComponent.browser.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SxProp } from '@primer/react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { BackgroundProps, BorderProps, ColorProps, FlexboxProps, GridProps, LayoutProps, PositionProps, ShadowProps, SpaceProps, TypographyProps } from 'styled-system';
|
|
4
|
+
type StyledBoxProps = SxProp & SpaceProps & ColorProps & TypographyProps & LayoutProps & FlexboxProps & GridProps & BackgroundProps & BorderProps & PositionProps & ShadowProps;
|
|
5
|
+
/**
|
|
6
|
+
* Utility that mirrors the functionality of the `Box` component from
|
|
7
|
+
* `@primer/react`. Used to create a styled component variant of a component
|
|
8
|
+
* from `@primer/react` that no longer supports `sx` or other styled-system
|
|
9
|
+
* props.
|
|
10
|
+
*
|
|
11
|
+
* Note: make sure to include #__PURE__ when using this function to create a
|
|
12
|
+
* component. For example:
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const Link = \/*#__PURE__*\/ createStyledComponent(PrimerLink)
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare function createStyledComponent<P>(Component: React.ComponentType<P>): import("styled-components").StyledComponent<React.ComponentType<P>, any, StyledBoxProps, never>;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=createStyledComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStyledComponent.d.ts","sourceRoot":"","sources":["../../../src/utils/createStyledComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,eAAe,CAAA;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,YAAY,EACZ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EAChB,MAAM,eAAe,CAAA;AAEtB,KAAK,cAAc,GAAG,MAAM,GAC1B,UAAU,GACV,UAAU,GACV,eAAe,GACf,WAAW,GACX,YAAY,GACZ,SAAS,GACT,eAAe,GACf,WAAW,GACX,aAAa,GACb,WAAW,CAAA;AAEb;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,mGAczE"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/styled-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"default": "dist/index.js"
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"default": "./dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"./deprecated": {
|
|
11
|
-
"types": "dist/deprecated.d.ts",
|
|
12
|
-
"default": "dist/deprecated.js"
|
|
11
|
+
"types": "./dist/deprecated.d.ts",
|
|
12
|
+
"default": "./dist/deprecated.js"
|
|
13
13
|
},
|
|
14
14
|
"./experimental": {
|
|
15
|
-
"types": "dist/experimental.d.ts",
|
|
16
|
-
"default": "dist/experimental.js"
|
|
15
|
+
"types": "./dist/experimental.d.ts",
|
|
16
|
+
"default": "./dist/experimental.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
@@ -27,20 +27,21 @@
|
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/preset-typescript": "^7.27.1",
|
|
30
|
-
"@primer/react": "^
|
|
30
|
+
"@primer/react": "^38.0.0-rc.0",
|
|
31
31
|
"@rollup/plugin-babel": "^6.0.4",
|
|
32
32
|
"@types/react": "18.3.11",
|
|
33
33
|
"@types/react-dom": "18.3.1",
|
|
34
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
34
35
|
"react": "18.3.1",
|
|
35
36
|
"react-dom": "18.3.1",
|
|
36
37
|
"rimraf": "^6.0.1",
|
|
37
|
-
"rollup": "4.
|
|
38
|
+
"rollup": "4.46.2",
|
|
38
39
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
39
40
|
"styled-components": "5.3.11",
|
|
40
41
|
"typescript": "^5.8.2"
|
|
41
42
|
},
|
|
42
43
|
"peerDependencies": {
|
|
43
|
-
"@primer/react": "
|
|
44
|
+
"@primer/react": "38.0.0-rc.0",
|
|
44
45
|
"@types/react": "18.x || 19.x",
|
|
45
46
|
"@types/react-dom": "18.x || 19.x",
|
|
46
47
|
"@types/react-is": "18.x || 19.x",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/exports.test.ts"],"names":[],"mappings":""}
|
package/dist/deprecated.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,4BAA4B,CAAA"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,GAAG,EACH,KAAK,QAAQ,EACb,WAAW,EACX,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,UAAU,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,IAAI,EACJ,SAAS,EACT,QAAQ,EAGR,EAAE,EACF,KAAK,MAAM,EACX,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAA"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|