@css-hooks/solid 2.0.4 → 3.0.1
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/README.md +30 -33
- package/cjs/index.js +16 -7
- package/esm/index.js +11 -3
- package/package.json +9 -16
- package/types/index.d.ts +2 -4
- package/types/tsdoc-metadata.json +11 -0
package/README.md
CHANGED
|
@@ -27,18 +27,18 @@ experience without runtime style injection or build steps.
|
|
|
27
27
|
|
|
28
28
|
```jsx
|
|
29
29
|
<button
|
|
30
|
-
style={
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
style={pipe(
|
|
31
|
+
{
|
|
32
|
+
background: "#004982",
|
|
33
|
+
color: "#eeeff0",
|
|
34
|
+
},
|
|
35
|
+
on("&:hover", {
|
|
36
|
+
background: "#1b659c",
|
|
37
|
+
}),
|
|
38
|
+
on("&:active", {
|
|
39
|
+
background: "#9f3131",
|
|
40
|
+
}),
|
|
41
|
+
)}
|
|
42
42
|
>
|
|
43
43
|
Save changes
|
|
44
44
|
</button>
|
|
@@ -50,13 +50,12 @@ experience without runtime style injection or build steps.
|
|
|
50
50
|
<label>
|
|
51
51
|
<input type="checkbox" checked />
|
|
52
52
|
<span
|
|
53
|
-
style={
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
})}
|
|
53
|
+
style={pipe(
|
|
54
|
+
{},
|
|
55
|
+
on(":checked + &", {
|
|
56
|
+
textDecoration: "line-through",
|
|
57
|
+
}),
|
|
58
|
+
)}
|
|
60
59
|
>
|
|
61
60
|
Simplify CSS architecture
|
|
62
61
|
</span>
|
|
@@ -68,24 +67,22 @@ experience without runtime style injection or build steps.
|
|
|
68
67
|
```jsx
|
|
69
68
|
<>
|
|
70
69
|
<span
|
|
71
|
-
style={
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
})}
|
|
70
|
+
style={pipe(
|
|
71
|
+
{},
|
|
72
|
+
on(not("@container (width < 400px)"), {
|
|
73
|
+
display: "none",
|
|
74
|
+
}),
|
|
75
|
+
)}
|
|
78
76
|
>
|
|
79
77
|
sm
|
|
80
78
|
</span>
|
|
81
79
|
<span
|
|
82
|
-
style={
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
})}
|
|
80
|
+
style={pipe(
|
|
81
|
+
{},
|
|
82
|
+
on("@container (width < 400px)", {
|
|
83
|
+
display: "none",
|
|
84
|
+
}),
|
|
85
|
+
)}
|
|
89
86
|
>
|
|
90
87
|
lg
|
|
91
88
|
</span>
|
package/cjs/index.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
exports
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* CSS Hooks for {@link https://www.solidjs.com/ | Solid}
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.createHooks = void 0;
|
|
9
|
+
const core_1 = require("@css-hooks/core");
|
|
10
|
+
/**
|
|
11
|
+
* A {@link @css-hooks/core#CreateHooksFn} configured to use Solid's
|
|
12
|
+
* `JSX.CSSProperties` type and logic for converting CSS values into strings.
|
|
13
|
+
*
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
exports.createHooks = (0, core_1.buildHooksSystem)();
|
package/esm/index.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* CSS Hooks for {@link https://www.solidjs.com/ | Solid}
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
3
6
|
import { buildHooksSystem } from "@css-hooks/core";
|
|
4
|
-
|
|
7
|
+
/**
|
|
8
|
+
* A {@link @css-hooks/core#CreateHooksFn} configured to use Solid's
|
|
9
|
+
* `JSX.CSSProperties` type and logic for converting CSS values into strings.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
5
13
|
export const createHooks = buildHooksSystem();
|
package/package.json
CHANGED
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@css-hooks/solid",
|
|
3
3
|
"description": "CSS Hooks for Solid",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.1",
|
|
5
5
|
"author": "Nick Saunders",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@css-hooks/core": "
|
|
7
|
+
"@css-hooks/core": "3.0.1"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@microsoft/api-extractor": "^7.39.4",
|
|
11
|
-
"@tsconfig/strictest": "^2.0.1",
|
|
12
|
-
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
13
|
-
"@typescript-eslint/parser": "^7.0.0",
|
|
14
|
-
"ascjs": "^6.0.3",
|
|
15
|
-
"eslint": "^8.47.0",
|
|
16
|
-
"eslint-plugin-compat": "^4.2.0",
|
|
17
11
|
"rimraf": "^5.0.1",
|
|
18
12
|
"solid-js": "^1.7.11",
|
|
19
|
-
"
|
|
20
|
-
"typescript": "
|
|
13
|
+
"tsx": "^4.19.1",
|
|
14
|
+
"typescript": "=5.4.5"
|
|
21
15
|
},
|
|
22
16
|
"files": [
|
|
23
17
|
"cjs",
|
|
24
18
|
"esm",
|
|
25
19
|
"types",
|
|
26
|
-
"tsdoc-metadata.json"
|
|
20
|
+
"tsdoc-metadata.json",
|
|
21
|
+
"!**/*.test.*"
|
|
27
22
|
],
|
|
28
23
|
"license": "MIT",
|
|
29
24
|
"main": "cjs",
|
|
@@ -41,6 +36,7 @@
|
|
|
41
36
|
"types": "types",
|
|
42
37
|
"exports": {
|
|
43
38
|
".": {
|
|
39
|
+
"@css-hooks/source": "./src/index.ts",
|
|
44
40
|
"import": "./esm/index.js",
|
|
45
41
|
"require": "./cjs/index.js",
|
|
46
42
|
"types": "./types/index.d.ts"
|
|
@@ -50,10 +46,7 @@
|
|
|
50
46
|
"supports css-variables"
|
|
51
47
|
],
|
|
52
48
|
"scripts": {
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"lint": "eslint src .*.*js *.*js",
|
|
56
|
-
"test": "tsc && node --test",
|
|
57
|
-
"test.watch": "tsc-watch --onSuccess 'node --test'"
|
|
49
|
+
"clean": "rimraf cjs esm types",
|
|
50
|
+
"test": "node --import tsx --conditions @css-hooks/source --test src/index.test.ts"
|
|
58
51
|
}
|
|
59
52
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
6
|
import type { JSX } from "solid-js";
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export type * from "@css-hooks/core";
|
|
10
8
|
/**
|
|
11
9
|
* A {@link @css-hooks/core#CreateHooksFn} configured to use Solid's
|
|
12
10
|
* `JSX.CSSProperties` type and logic for converting CSS values into strings.
|
|
13
11
|
*
|
|
14
12
|
* @public
|
|
15
13
|
*/
|
|
16
|
-
export const createHooks: CreateHooksFn<JSX.CSSProperties>;
|
|
14
|
+
export declare const createHooks: import("@css-hooks/core").CreateHooksFn<JSX.CSSProperties>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.47.11"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|