@usethrottle/auth 0.2.0 → 0.2.2
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 +1 -0
- package/dist/react/components/index.cjs +90 -15
- package/dist/react/components/index.cjs.map +1 -1
- package/dist/react/components/index.d.cts +2 -1
- package/dist/react/components/index.d.ts +2 -1
- package/dist/react/components/index.js +101 -26
- package/dist/react/components/index.js.map +1 -1
- package/dist/styles.css +11 -2
- package/package.json +46 -11
package/dist/styles.css
CHANGED
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
--throttle-color-muted: #eceef2;
|
|
9
9
|
--throttle-color-muted-foreground: #5b6472;
|
|
10
10
|
--throttle-color-border: #e2e8f0;
|
|
11
|
+
/* The boundary of an INTERACTIVE control, which WCAG 1.4.11 requires to
|
|
12
|
+
reach 3:1 against its adjacent colour — an input identified only by a
|
|
13
|
+
1.23:1 hairline is not identifiable at all. Decorative separators (card
|
|
14
|
+
edges, table rules, dividers) keep --throttle-color-border: they do not
|
|
15
|
+
identify a control, so the requirement does not apply and darkening
|
|
16
|
+
them would only add noise. */
|
|
17
|
+
--throttle-color-border-control: #8b93a1;
|
|
11
18
|
--throttle-color-danger: #c2321f;
|
|
12
19
|
--throttle-color-danger-surface: #fef2f2;
|
|
13
20
|
--throttle-color-danger-border: #fecaca;
|
|
@@ -60,6 +67,7 @@
|
|
|
60
67
|
--throttle-color-muted: #21262d;
|
|
61
68
|
--throttle-color-muted-foreground: #9aa4b2;
|
|
62
69
|
--throttle-color-border: #30363d;
|
|
70
|
+
--throttle-color-border-control: #5c6570;
|
|
63
71
|
--throttle-color-danger: #ff6b58;
|
|
64
72
|
--throttle-color-danger-surface: #2a1513;
|
|
65
73
|
--throttle-color-danger-border: #5c2b25;
|
|
@@ -82,6 +90,7 @@
|
|
|
82
90
|
--throttle-color-muted: #21262d;
|
|
83
91
|
--throttle-color-muted-foreground: #9aa4b2;
|
|
84
92
|
--throttle-color-border: #30363d;
|
|
93
|
+
--throttle-color-border-control: #5c6570;
|
|
85
94
|
--throttle-color-danger: #ff6b58;
|
|
86
95
|
--throttle-color-danger-surface: #2a1513;
|
|
87
96
|
--throttle-color-danger-border: #5c2b25;
|
|
@@ -129,7 +138,7 @@
|
|
|
129
138
|
font-size: var(--throttle-font-size);
|
|
130
139
|
color: var(--throttle-color-foreground);
|
|
131
140
|
background: var(--throttle-color-background);
|
|
132
|
-
border: var(--throttle-border-width) solid var(--throttle-color-border);
|
|
141
|
+
border: var(--throttle-border-width) solid var(--throttle-color-border-control);
|
|
133
142
|
border-radius: var(--throttle-radius-sm);
|
|
134
143
|
/* padding-block stays 0 so min-height alone owns the height, exactly as
|
|
135
144
|
.throttle-button does. With 12px vertical padding the box computed to
|
|
@@ -184,7 +193,7 @@
|
|
|
184
193
|
.throttle-button:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--throttle-color-background), 0 0 0 4px var(--throttle-color-primary); }
|
|
185
194
|
.throttle-button--primary { background: var(--throttle-color-primary); color: var(--throttle-color-primary-foreground); width: 100%; }
|
|
186
195
|
.throttle-button--primary:hover:not(:disabled) { filter: brightness(0.92); }
|
|
187
|
-
.throttle-button--secondary { background: var(--throttle-color-surface); color: var(--throttle-color-foreground); border-color: var(--throttle-color-border); }
|
|
196
|
+
.throttle-button--secondary { background: var(--throttle-color-surface); color: var(--throttle-color-foreground); border-color: var(--throttle-color-border-control); }
|
|
188
197
|
.throttle-button--secondary:hover:not(:disabled) { background: var(--throttle-color-muted); }
|
|
189
198
|
.throttle-button--danger { background: transparent; color: var(--throttle-color-danger); border-color: var(--throttle-color-border); }
|
|
190
199
|
.throttle-button--danger:hover:not(:disabled) { background: color-mix(in srgb, var(--throttle-color-danger) 10%, transparent); }
|
package/package.json
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@usethrottle/auth",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Buyer authentication for Throttle storefronts — headless core, React hooks, and drop-in forms.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"CLAUDE.md"
|
|
13
|
+
],
|
|
10
14
|
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./react": {
|
|
21
|
+
"types": "./dist/react/index.d.ts",
|
|
22
|
+
"import": "./dist/react/index.js",
|
|
23
|
+
"require": "./dist/react/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./forms": {
|
|
26
|
+
"types": "./dist/react/forms/index.d.ts",
|
|
27
|
+
"import": "./dist/react/forms/index.js",
|
|
28
|
+
"require": "./dist/react/forms/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./components": {
|
|
31
|
+
"types": "./dist/react/components/index.d.ts",
|
|
32
|
+
"import": "./dist/react/components/index.js",
|
|
33
|
+
"require": "./dist/react/components/index.cjs"
|
|
34
|
+
},
|
|
35
|
+
"./styles.css": "./dist/styles.css",
|
|
36
|
+
"./package.json": "./package.json"
|
|
16
37
|
},
|
|
17
38
|
"scripts": {
|
|
18
39
|
"build": "tsup",
|
|
@@ -20,8 +41,18 @@
|
|
|
20
41
|
"test": "vitest run",
|
|
21
42
|
"typecheck": "tsc --noEmit"
|
|
22
43
|
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": ">=18",
|
|
46
|
+
"react-dom": ">=18"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"react": {
|
|
50
|
+
"optional": true
|
|
51
|
+
},
|
|
52
|
+
"react-dom": {
|
|
53
|
+
"optional": true
|
|
54
|
+
}
|
|
55
|
+
},
|
|
25
56
|
"devDependencies": {
|
|
26
57
|
"@testing-library/react": "^16.1.0",
|
|
27
58
|
"@types/react": "^19.1.0",
|
|
@@ -34,6 +65,10 @@
|
|
|
34
65
|
"typescript": "^5.7.0",
|
|
35
66
|
"vitest": "^2.1.9"
|
|
36
67
|
},
|
|
37
|
-
"publishConfig": {
|
|
38
|
-
|
|
68
|
+
"publishConfig": {
|
|
69
|
+
"access": "public"
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=20"
|
|
73
|
+
}
|
|
39
74
|
}
|