styled-components-jsx 1.0.5 → 1.0.7
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/package.json +91 -90
- package/src/index.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,92 +1,93 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
2
|
+
"version": "1.0.7",
|
|
3
|
+
"license": "MIT",
|
|
4
|
+
"name": "styled-components-jsx",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": {
|
|
7
|
+
"email": "freshcrowd@gmail.com",
|
|
8
|
+
"name": "Denis Orlov",
|
|
9
|
+
"url": "https://github.com/Cr0WD"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Cr0WD/styled-components-jsx"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"css",
|
|
17
|
+
"styling",
|
|
18
|
+
"babel-plugin-macros",
|
|
19
|
+
"styled-jsx",
|
|
20
|
+
"styled-components",
|
|
21
|
+
"css-in-js",
|
|
22
|
+
"react",
|
|
23
|
+
"reactjs",
|
|
24
|
+
"react-typescript",
|
|
25
|
+
"typescript"
|
|
26
|
+
],
|
|
27
|
+
"main": "./src/index.tsx",
|
|
28
|
+
"types": "./src/index.tsx",
|
|
29
|
+
"files": [
|
|
30
|
+
"src"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"postinstall": "manypkg fix && manypkg check"
|
|
34
|
+
},
|
|
35
|
+
"prettier": {
|
|
36
|
+
"printWidth": 100,
|
|
37
|
+
"trailingComma": "es5",
|
|
38
|
+
"semi": false,
|
|
39
|
+
"singleQuote": true,
|
|
40
|
+
"bracketSpacing": true,
|
|
41
|
+
"arrowParens": "avoid",
|
|
42
|
+
"endOfLine": "lf",
|
|
43
|
+
"useTabs": true,
|
|
44
|
+
"tabWidth": 4
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public",
|
|
48
|
+
"branches": [
|
|
49
|
+
"main"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@types/react": "^19.2.13",
|
|
54
|
+
"@types/styled-jsx": "^3.0.0",
|
|
55
|
+
"react": "^19.2.4",
|
|
56
|
+
"react-dom": "^19.2.4",
|
|
57
|
+
"styled-jsx": "^5.1.7"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@types/react": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@types/styled-jsx": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@eslint/js": "10.0.1",
|
|
69
|
+
"@manypkg/cli": "0.25.1",
|
|
70
|
+
"@types/react": "^19.2.13",
|
|
71
|
+
"@types/react-dom": "^19.2.3",
|
|
72
|
+
"@types/styled-jsx": "3.4.4",
|
|
73
|
+
"@typescript-eslint/eslint-plugin": "8.54.0",
|
|
74
|
+
"@typescript-eslint/parser": "8.54.0",
|
|
75
|
+
"eslint": "10.0.0",
|
|
76
|
+
"eslint-config-prettier": "^10.1.8",
|
|
77
|
+
"eslint-import-resolver-typescript": "4.4.4",
|
|
78
|
+
"eslint-plugin-import": "2.32.0",
|
|
79
|
+
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
80
|
+
"eslint-plugin-promise": "7.2.1",
|
|
81
|
+
"eslint-plugin-react": "^7.37.5",
|
|
82
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
83
|
+
"eslint-plugin-security": "3.0.1",
|
|
84
|
+
"eslint-plugin-unicorn": "62.0.0",
|
|
85
|
+
"prettier": "3.8.1",
|
|
86
|
+
"react": "^19.2.4",
|
|
87
|
+
"react-dom": "^19.2.4",
|
|
88
|
+
"styled-jsx": "^5.1.7",
|
|
89
|
+
"typescript": "5.9.3",
|
|
90
|
+
"typescript-eslint": "^8.54.0"
|
|
91
|
+
},
|
|
92
|
+
"packageManager": "yarn@1.22.22"
|
|
92
93
|
}
|
package/src/index.tsx
CHANGED
|
@@ -21,7 +21,7 @@ const filterDollarProperties = <T extends Record<string, unknown>>(properties: T
|
|
|
21
21
|
/**
|
|
22
22
|
* Base function to create styled components.
|
|
23
23
|
*
|
|
24
|
-
* @param Component - An HTML tag (e.g
|
|
24
|
+
* @param Component - An HTML tag (e.g. "div", "button") or a React component.
|
|
25
25
|
* @returns A function that takes CSS styles and returns a styled component.
|
|
26
26
|
*/
|
|
27
27
|
const createStyled =
|
|
@@ -49,7 +49,7 @@ const createStyled =
|
|
|
49
49
|
: filterDollarProperties(properties)
|
|
50
50
|
|
|
51
51
|
// Ensure Component is a valid React component or HTML tag
|
|
52
|
-
const Element
|
|
52
|
+
const Element = Component as ElementType<{ className?: string }>
|
|
53
53
|
|
|
54
54
|
return (
|
|
55
55
|
<>
|