@css-hooks/core 0.1.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/cjs/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hookTypes = void 0;
4
+ /** @internal */
5
+ exports.hookTypes = {
6
+ active: ":active",
7
+ checked: ":checked",
8
+ disabled: ":disabled",
9
+ "even-child": ":nth-child(even)",
10
+ "first-child": ":first-child",
11
+ focus: ":focus",
12
+ "focus-visible": ":focus-visible",
13
+ "focus-within": ":focus-within",
14
+ hover: ":hover",
15
+ "last-child": ":last-child",
16
+ "odd-child": ":nth-child(odd)",
17
+ };
package/css/index.css ADDED
@@ -0,0 +1,109 @@
1
+ .use-active {
2
+ --active-0: initial;
3
+ --active-1: ;
4
+ }
5
+
6
+ .use-active:active {
7
+ --active-0: ;
8
+ --active-1: initial;
9
+ }
10
+
11
+ .use-checked {
12
+ --checked-0: initial;
13
+ --checked-1: ;
14
+ }
15
+
16
+ .use-checked:checked {
17
+ --checked-0: ;
18
+ --checked-1: initial;
19
+ }
20
+
21
+ .use-disabled {
22
+ --disabled-0: initial;
23
+ --disabled-1: ;
24
+ }
25
+
26
+ .use-disabled:disabled {
27
+ --disabled-0: ;
28
+ --disabled-1: initial;
29
+ }
30
+
31
+ .use-even-child {
32
+ --even-child-0: initial;
33
+ --even-child-1: ;
34
+ }
35
+
36
+ .use-even-child:nth-child(even) {
37
+ --even-child-0: ;
38
+ --even-child-1: initial;
39
+ }
40
+
41
+ .use-first-child {
42
+ --first-child-0: initial;
43
+ --first-child-1: ;
44
+ }
45
+
46
+ .use-first-child:first-child {
47
+ --first-child-0: ;
48
+ --first-child-1: initial;
49
+ }
50
+
51
+ .use-focus {
52
+ --focus-0: initial;
53
+ --focus-1: ;
54
+ }
55
+
56
+ .use-focus:focus {
57
+ --focus-0: ;
58
+ --focus-1: initial;
59
+ }
60
+
61
+ .use-focus-visible {
62
+ --focus-visible-0: initial;
63
+ --focus-visible-1: ;
64
+ }
65
+
66
+ .use-focus-visible:focus-visible {
67
+ --focus-visible-0: ;
68
+ --focus-visible-1: initial;
69
+ }
70
+
71
+ .use-focus-within {
72
+ --focus-within-0: initial;
73
+ --focus-within-1: ;
74
+ }
75
+
76
+ .use-focus-within:focus-within {
77
+ --focus-within-0: ;
78
+ --focus-within-1: initial;
79
+ }
80
+
81
+ .use-hover {
82
+ --hover-0: initial;
83
+ --hover-1: ;
84
+ }
85
+
86
+ .use-hover:hover {
87
+ --hover-0: ;
88
+ --hover-1: initial;
89
+ }
90
+
91
+ .use-last-child {
92
+ --last-child-0: initial;
93
+ --last-child-1: ;
94
+ }
95
+
96
+ .use-last-child:last-child {
97
+ --last-child-0: ;
98
+ --last-child-1: initial;
99
+ }
100
+
101
+ .use-odd-child {
102
+ --odd-child-0: initial;
103
+ --odd-child-1: ;
104
+ }
105
+
106
+ .use-odd-child:nth-child(odd) {
107
+ --odd-child-0: ;
108
+ --odd-child-1: initial;
109
+ }
@@ -0,0 +1 @@
1
+ .use-active{--active-0:initial;--active-1: }.use-active:active{--active-0: ;--active-1:initial}.use-checked{--checked-0:initial;--checked-1: }.use-checked:checked{--checked-0: ;--checked-1:initial}.use-disabled{--disabled-0:initial;--disabled-1: }.use-disabled:disabled{--disabled-0: ;--disabled-1:initial}.use-even-child{--even-child-0:initial;--even-child-1: }.use-even-child:nth-child(2n){--even-child-0: ;--even-child-1:initial}.use-first-child{--first-child-0:initial;--first-child-1: }.use-first-child:first-child{--first-child-0: ;--first-child-1:initial}.use-focus{--focus-0:initial;--focus-1: }.use-focus:focus{--focus-0: ;--focus-1:initial}.use-focus-visible{--focus-visible-0:initial;--focus-visible-1: }.use-focus-visible:focus-visible{--focus-visible-0: ;--focus-visible-1:initial}.use-focus-within{--focus-within-0:initial;--focus-within-1: }.use-focus-within:focus-within{--focus-within-0: ;--focus-within-1:initial}.use-hover{--hover-0:initial;--hover-1: }.use-hover:hover{--hover-0: ;--hover-1:initial}.use-last-child{--last-child-0:initial;--last-child-1: }.use-last-child:last-child{--last-child-0: ;--last-child-1:initial}.use-odd-child{--odd-child-0:initial;--odd-child-1: }.use-odd-child:nth-child(odd){--odd-child-0: ;--odd-child-1:initial}
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":null,"mappings":"AAAA,4CAKA,mDAKA,+CAKA,uDAKA,kDAKA,2DAKA,wDAKA,sEAKA,2DAKA,uEAKA,yCAKA,+CAKA,iEAKA,+EAKA,8DAKA,2EAKA,yCAKA,+CAKA,wDAKA,mEAKA,qDAKA","sources":["index.css"],"sourcesContent":[".use-active {\n --active-0: initial;\n --active-1: ;\n}\n\n.use-active:active {\n --active-0: ;\n --active-1: initial;\n}\n\n.use-checked {\n --checked-0: initial;\n --checked-1: ;\n}\n\n.use-checked:checked {\n --checked-0: ;\n --checked-1: initial;\n}\n\n.use-disabled {\n --disabled-0: initial;\n --disabled-1: ;\n}\n\n.use-disabled:disabled {\n --disabled-0: ;\n --disabled-1: initial;\n}\n\n.use-even-child {\n --even-child-0: initial;\n --even-child-1: ;\n}\n\n.use-even-child:nth-child(even) {\n --even-child-0: ;\n --even-child-1: initial;\n}\n\n.use-first-child {\n --first-child-0: initial;\n --first-child-1: ;\n}\n\n.use-first-child:first-child {\n --first-child-0: ;\n --first-child-1: initial;\n}\n\n.use-focus {\n --focus-0: initial;\n --focus-1: ;\n}\n\n.use-focus:focus {\n --focus-0: ;\n --focus-1: initial;\n}\n\n.use-focus-visible {\n --focus-visible-0: initial;\n --focus-visible-1: ;\n}\n\n.use-focus-visible:focus-visible {\n --focus-visible-0: ;\n --focus-visible-1: initial;\n}\n\n.use-focus-within {\n --focus-within-0: initial;\n --focus-within-1: ;\n}\n\n.use-focus-within:focus-within {\n --focus-within-0: ;\n --focus-within-1: initial;\n}\n\n.use-hover {\n --hover-0: initial;\n --hover-1: ;\n}\n\n.use-hover:hover {\n --hover-0: ;\n --hover-1: initial;\n}\n\n.use-last-child {\n --last-child-0: initial;\n --last-child-1: ;\n}\n\n.use-last-child:last-child {\n --last-child-0: ;\n --last-child-1: initial;\n}\n\n.use-odd-child {\n --odd-child-0: initial;\n --odd-child-1: ;\n}\n\n.use-odd-child:nth-child(odd) {\n --odd-child-0: ;\n --odd-child-1: initial;\n}"],"names":[]}
package/esm/index.js ADDED
@@ -0,0 +1,14 @@
1
+ /** @internal */
2
+ export var hookTypes = {
3
+ active: ":active",
4
+ checked: ":checked",
5
+ disabled: ":disabled",
6
+ "even-child": ":nth-child(even)",
7
+ "first-child": ":first-child",
8
+ focus: ":focus",
9
+ "focus-visible": ":focus-visible",
10
+ "focus-within": ":focus-within",
11
+ hover: ":hover",
12
+ "last-child": ":last-child",
13
+ "odd-child": ":nth-child(odd)",
14
+ };
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@css-hooks/core",
3
+ "description": "CSS Hooks core library",
4
+ "version": "0.1.0",
5
+ "author": "Nick Saunders",
6
+ "devDependencies": {
7
+ "@tsconfig/node-lts": "^18.12.3",
8
+ "@tsconfig/strictest": "^2.0.1",
9
+ "lightningcss": "^1.21.5",
10
+ "rimraf": "^5.0.1",
11
+ "ts-node": "^10.9.1",
12
+ "typescript": "^5.1.6"
13
+ },
14
+ "files": [
15
+ "cjs",
16
+ "css",
17
+ "esm",
18
+ "types"
19
+ ],
20
+ "license": "MIT",
21
+ "main": "cjs/index.js",
22
+ "module": "esm/index.js",
23
+ "private": false,
24
+ "repository": "css-hooks/css-hooks",
25
+ "scripts": {
26
+ "clean": "rimraf cjs css esm types",
27
+ "prepublishOnly": "ts-node ./__fixtures__/generate-css.ts && tsc -p tsconfig.dist.json --outDir esm --module es6 && tsc -p tsconfig.dist.json --outDir cjs --module commonjs && tsc -p tsconfig.dist.json --outDir types --declaration --emitDeclarationOnly",
28
+ "test": "echo \"You should add tests.\""
29
+ },
30
+ "style": "css/index.css",
31
+ "types": "types/index.d.ts"
32
+ }
@@ -0,0 +1,15 @@
1
+ /** @internal */
2
+ export declare const hookTypes: {
3
+ readonly active: ":active";
4
+ readonly checked: ":checked";
5
+ readonly disabled: ":disabled";
6
+ readonly "even-child": ":nth-child(even)";
7
+ readonly "first-child": ":first-child";
8
+ readonly focus: ":focus";
9
+ readonly "focus-visible": ":focus-visible";
10
+ readonly "focus-within": ":focus-within";
11
+ readonly hover: ":hover";
12
+ readonly "last-child": ":last-child";
13
+ readonly "odd-child": ":nth-child(odd)";
14
+ };
15
+ export type HookType = keyof typeof hookTypes;