@the_disreputable_doggo/password-gate 1.0.0 → 1.0.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 +3 -3
- package/dist/index.d.mts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +14 -3
- package/dist/index.mjs +14 -3
- package/package.json +6 -2
- package/index.tsx +0 -139
- package/tsconfig.json +0 -14
package/README.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @the_disreputable_doggo/password-gate
|
|
2
2
|
|
|
3
3
|
A React component that provides a full-screen password gate for early access or pre-launch sites.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @the_disreputable_doggo/password-gate
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Usage
|
|
12
12
|
|
|
13
13
|
```tsx
|
|
14
|
-
import PasswordGate from '@
|
|
14
|
+
import PasswordGate from '@the_disreputable_doggo/password-gate';
|
|
15
15
|
|
|
16
16
|
function App() {
|
|
17
17
|
return (
|
package/dist/index.d.mts
CHANGED
|
@@ -15,6 +15,28 @@ interface PasswordGateProps {
|
|
|
15
15
|
hidePasswordLabel?: string;
|
|
16
16
|
unlockBodyClass?: string;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* PasswordGate
|
|
20
|
+
*
|
|
21
|
+
* Why:
|
|
22
|
+
* Full-screen modal overlay that restricts site access during under-construction / staging phases.
|
|
23
|
+
* Validates user input against a configured password, persists unlock state in localStorage, and
|
|
24
|
+
* removes the locking CSS class from the document root.
|
|
25
|
+
*
|
|
26
|
+
* Inputs:
|
|
27
|
+
* - props: PasswordGateProps including localized copy strings, password, and unlock callback.
|
|
28
|
+
*
|
|
29
|
+
* Output:
|
|
30
|
+
* - JSX.Element | null (renders null if disabled or already unlocked).
|
|
31
|
+
*
|
|
32
|
+
* Edge cases & handling:
|
|
33
|
+
* - Accessibility landmark: Wraps the gate in <main id="main-content" role="main"> so automated audits
|
|
34
|
+
* and screen readers detect a primary landmark when the site's normal content is locked out.
|
|
35
|
+
* - Mobile touch targets: The eye toggle button is explicitly sized to 44x44px (w-11 h-11)
|
|
36
|
+
* to satisfy WCAG 2.5.5 minimum tap target requirements.
|
|
37
|
+
* - LocalStorage sync: Checks localStorage on initial load to avoid flash of locked state if previously unlocked.
|
|
38
|
+
* - Graceful exit: Triggers a smooth opacity fade-out before removing itself from the DOM tree.
|
|
39
|
+
*/
|
|
18
40
|
declare function PasswordGate({ title, subtitle, datePrefix, underConstruction, placeholder, buttonText, enabled, password, releaseDate, onUnlock, showPasswordLabel, hidePasswordLabel, unlockBodyClass }: PasswordGateProps): React.JSX.Element;
|
|
19
41
|
|
|
20
42
|
export { type PasswordGateProps, PasswordGate as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,28 @@ interface PasswordGateProps {
|
|
|
15
15
|
hidePasswordLabel?: string;
|
|
16
16
|
unlockBodyClass?: string;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* PasswordGate
|
|
20
|
+
*
|
|
21
|
+
* Why:
|
|
22
|
+
* Full-screen modal overlay that restricts site access during under-construction / staging phases.
|
|
23
|
+
* Validates user input against a configured password, persists unlock state in localStorage, and
|
|
24
|
+
* removes the locking CSS class from the document root.
|
|
25
|
+
*
|
|
26
|
+
* Inputs:
|
|
27
|
+
* - props: PasswordGateProps including localized copy strings, password, and unlock callback.
|
|
28
|
+
*
|
|
29
|
+
* Output:
|
|
30
|
+
* - JSX.Element | null (renders null if disabled or already unlocked).
|
|
31
|
+
*
|
|
32
|
+
* Edge cases & handling:
|
|
33
|
+
* - Accessibility landmark: Wraps the gate in <main id="main-content" role="main"> so automated audits
|
|
34
|
+
* and screen readers detect a primary landmark when the site's normal content is locked out.
|
|
35
|
+
* - Mobile touch targets: The eye toggle button is explicitly sized to 44x44px (w-11 h-11)
|
|
36
|
+
* to satisfy WCAG 2.5.5 minimum tap target requirements.
|
|
37
|
+
* - LocalStorage sync: Checks localStorage on initial load to avoid flash of locked state if previously unlocked.
|
|
38
|
+
* - Graceful exit: Triggers a smooth opacity fade-out before removing itself from the DOM tree.
|
|
39
|
+
*/
|
|
18
40
|
declare function PasswordGate({ title, subtitle, datePrefix, underConstruction, placeholder, buttonText, enabled, password, releaseDate, onUnlock, showPasswordLabel, hidePasswordLabel, unlockBodyClass }: PasswordGateProps): React.JSX.Element;
|
|
19
41
|
|
|
20
42
|
export { type PasswordGateProps, PasswordGate as default };
|
package/dist/index.js
CHANGED
|
@@ -83,8 +83,10 @@ function PasswordGate({
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
86
|
-
"
|
|
86
|
+
"main",
|
|
87
87
|
{
|
|
88
|
+
id: "main-content",
|
|
89
|
+
role: "main",
|
|
88
90
|
className: `fixed inset-0 z-50 flex items-center justify-center bg-base transition-opacity duration-500 ${unlocked ? "opacity-0 pointer-events-none" : "opacity-100"}`
|
|
89
91
|
},
|
|
90
92
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "max-w-2xl px-6 text-center" }, /* @__PURE__ */ import_react.default.createElement("h1", { className: "text-4xl md:text-5xl font-bold text-heading mb-6" }, title), /* @__PURE__ */ import_react.default.createElement("p", { className: "text-lg text-body mb-8" }, subtitle), /* @__PURE__ */ import_react.default.createElement("div", { className: "bg-surface p-8 rounded-xl shadow-lg inline-block border border-accent-muted" }, /* @__PURE__ */ import_react.default.createElement("p", { className: "text-accent-muted font-bold mb-4" }, datePrefix, " ", releaseDate, " ", underConstruction), /* @__PURE__ */ import_react.default.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col items-center gap-4" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -94,14 +96,14 @@ function PasswordGate({
|
|
|
94
96
|
placeholder,
|
|
95
97
|
value: passwordInput,
|
|
96
98
|
onChange: (e) => setPasswordInput(e.target.value),
|
|
97
|
-
className: `w-full px-4 py-2 pr-
|
|
99
|
+
className: `w-full px-4 py-2 pr-12 bg-base border rounded text-body focus:outline-none focus:ring-2 focus:ring-accent transition-transform ${error ? "border-red-500 animate-[shake_0.5s_ease-in-out]" : "border-accent-muted"}`
|
|
98
100
|
}
|
|
99
101
|
), /* @__PURE__ */ import_react.default.createElement(
|
|
100
102
|
"button",
|
|
101
103
|
{
|
|
102
104
|
type: "button",
|
|
103
105
|
onClick: () => setShowPassword(!showPassword),
|
|
104
|
-
className: "absolute inset-y-0 right-0
|
|
106
|
+
className: "pnp-pg-toggle-btn absolute inset-y-0 right-0 text-body hover:text-heading",
|
|
105
107
|
"aria-label": showPassword ? hidePasswordLabel : showPasswordLabel
|
|
106
108
|
},
|
|
107
109
|
showPassword ? /* @__PURE__ */ import_react.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5" }, /* @__PURE__ */ import_react.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88" })) : /* @__PURE__ */ import_react.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5" }, /* @__PURE__ */ import_react.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" }), /* @__PURE__ */ import_react.default.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }))
|
|
@@ -114,6 +116,15 @@ function PasswordGate({
|
|
|
114
116
|
buttonText
|
|
115
117
|
)))),
|
|
116
118
|
/* @__PURE__ */ import_react.default.createElement("style", null, `
|
|
119
|
+
.pnp-pg-toggle-btn {
|
|
120
|
+
width: 44px !important;
|
|
121
|
+
height: 44px !important;
|
|
122
|
+
min-width: 44px !important;
|
|
123
|
+
min-height: 44px !important;
|
|
124
|
+
display: flex !important;
|
|
125
|
+
align-items: center !important;
|
|
126
|
+
justify-content: center !important;
|
|
127
|
+
}
|
|
117
128
|
@keyframes shake {
|
|
118
129
|
0%, 100% { transform: translateX(0); }
|
|
119
130
|
25% { transform: translateX(-5px); }
|
package/dist/index.mjs
CHANGED
|
@@ -50,8 +50,10 @@ function PasswordGate({
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
return /* @__PURE__ */ React.createElement(
|
|
53
|
-
"
|
|
53
|
+
"main",
|
|
54
54
|
{
|
|
55
|
+
id: "main-content",
|
|
56
|
+
role: "main",
|
|
55
57
|
className: `fixed inset-0 z-50 flex items-center justify-center bg-base transition-opacity duration-500 ${unlocked ? "opacity-0 pointer-events-none" : "opacity-100"}`
|
|
56
58
|
},
|
|
57
59
|
/* @__PURE__ */ React.createElement("div", { className: "max-w-2xl px-6 text-center" }, /* @__PURE__ */ React.createElement("h1", { className: "text-4xl md:text-5xl font-bold text-heading mb-6" }, title), /* @__PURE__ */ React.createElement("p", { className: "text-lg text-body mb-8" }, subtitle), /* @__PURE__ */ React.createElement("div", { className: "bg-surface p-8 rounded-xl shadow-lg inline-block border border-accent-muted" }, /* @__PURE__ */ React.createElement("p", { className: "text-accent-muted font-bold mb-4" }, datePrefix, " ", releaseDate, " ", underConstruction), /* @__PURE__ */ React.createElement("form", { onSubmit: handleSubmit, className: "flex flex-col items-center gap-4" }, /* @__PURE__ */ React.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React.createElement(
|
|
@@ -61,14 +63,14 @@ function PasswordGate({
|
|
|
61
63
|
placeholder,
|
|
62
64
|
value: passwordInput,
|
|
63
65
|
onChange: (e) => setPasswordInput(e.target.value),
|
|
64
|
-
className: `w-full px-4 py-2 pr-
|
|
66
|
+
className: `w-full px-4 py-2 pr-12 bg-base border rounded text-body focus:outline-none focus:ring-2 focus:ring-accent transition-transform ${error ? "border-red-500 animate-[shake_0.5s_ease-in-out]" : "border-accent-muted"}`
|
|
65
67
|
}
|
|
66
68
|
), /* @__PURE__ */ React.createElement(
|
|
67
69
|
"button",
|
|
68
70
|
{
|
|
69
71
|
type: "button",
|
|
70
72
|
onClick: () => setShowPassword(!showPassword),
|
|
71
|
-
className: "absolute inset-y-0 right-0
|
|
73
|
+
className: "pnp-pg-toggle-btn absolute inset-y-0 right-0 text-body hover:text-heading",
|
|
72
74
|
"aria-label": showPassword ? hidePasswordLabel : showPasswordLabel
|
|
73
75
|
},
|
|
74
76
|
showPassword ? /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88" })) : /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: 1.5, stroke: "currentColor", className: "w-5 h-5" }, /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" }), /* @__PURE__ */ React.createElement("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" }))
|
|
@@ -81,6 +83,15 @@ function PasswordGate({
|
|
|
81
83
|
buttonText
|
|
82
84
|
)))),
|
|
83
85
|
/* @__PURE__ */ React.createElement("style", null, `
|
|
86
|
+
.pnp-pg-toggle-btn {
|
|
87
|
+
width: 44px !important;
|
|
88
|
+
height: 44px !important;
|
|
89
|
+
min-width: 44px !important;
|
|
90
|
+
min-height: 44px !important;
|
|
91
|
+
display: flex !important;
|
|
92
|
+
align-items: center !important;
|
|
93
|
+
justify-content: center !important;
|
|
94
|
+
}
|
|
84
95
|
@keyframes shake {
|
|
85
96
|
0%, 100% { transform: translateX(0); }
|
|
86
97
|
25% { transform: translateX(-5px); }
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the_disreputable_doggo/password-gate",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Password Gate component for Pier & Pixel templates",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
8
12
|
"scripts": {
|
|
9
13
|
"build": "tsup index.tsx --format cjs,esm --dts"
|
|
10
14
|
},
|
|
11
15
|
"repository": {
|
|
12
16
|
"type": "git",
|
|
13
|
-
"url": "git
|
|
17
|
+
"url": "git+https://github.com/HadleySwello/password-gate.git"
|
|
14
18
|
},
|
|
15
19
|
"peerDependencies": {
|
|
16
20
|
"react": "^19.0.0",
|
package/index.tsx
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
export interface PasswordGateProps {
|
|
4
|
-
title: string;
|
|
5
|
-
subtitle: string;
|
|
6
|
-
datePrefix: string;
|
|
7
|
-
underConstruction: string;
|
|
8
|
-
placeholder: string;
|
|
9
|
-
buttonText: string;
|
|
10
|
-
enabled?: boolean;
|
|
11
|
-
password?: string;
|
|
12
|
-
releaseDate?: string;
|
|
13
|
-
onUnlock?: () => void;
|
|
14
|
-
showPasswordLabel?: string;
|
|
15
|
-
hidePasswordLabel?: string;
|
|
16
|
-
unlockBodyClass?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export default function PasswordGate({
|
|
20
|
-
title,
|
|
21
|
-
subtitle,
|
|
22
|
-
datePrefix,
|
|
23
|
-
underConstruction,
|
|
24
|
-
placeholder,
|
|
25
|
-
buttonText,
|
|
26
|
-
enabled = true,
|
|
27
|
-
password = '',
|
|
28
|
-
releaseDate = '',
|
|
29
|
-
onUnlock,
|
|
30
|
-
showPasswordLabel = 'Show password',
|
|
31
|
-
hidePasswordLabel = 'Hide password',
|
|
32
|
-
unlockBodyClass = 'locked'
|
|
33
|
-
}: PasswordGateProps) {
|
|
34
|
-
const [passwordInput, setPasswordInput] = useState('');
|
|
35
|
-
const [showPassword, setShowPassword] = useState(false);
|
|
36
|
-
const [error, setError] = useState(false);
|
|
37
|
-
const [unlocked, setUnlocked] = useState(false);
|
|
38
|
-
const [shouldRender, setShouldRender] = useState(() => {
|
|
39
|
-
if (typeof window !== 'undefined') {
|
|
40
|
-
return localStorage.getItem('site_unlocked') !== 'true';
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
// If password protection is disabled, we don't render anything
|
|
46
|
-
if (!enabled) {
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (!shouldRender) return null;
|
|
51
|
-
|
|
52
|
-
const handleSubmit = (e: React.FormEvent) => {
|
|
53
|
-
e.preventDefault();
|
|
54
|
-
if (passwordInput === password) {
|
|
55
|
-
setError(false);
|
|
56
|
-
setUnlocked(true);
|
|
57
|
-
localStorage.setItem('site_unlocked', 'true');
|
|
58
|
-
|
|
59
|
-
if (unlockBodyClass && typeof document !== 'undefined') {
|
|
60
|
-
document.documentElement.classList.remove(unlockBodyClass);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (onUnlock) {
|
|
64
|
-
onUnlock();
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Allow fade out animation to finish before removing from DOM
|
|
68
|
-
setTimeout(() => {
|
|
69
|
-
setShouldRender(false);
|
|
70
|
-
}, 500);
|
|
71
|
-
} else {
|
|
72
|
-
setError(true);
|
|
73
|
-
// Reset error after animation
|
|
74
|
-
setTimeout(() => setError(false), 500);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<div
|
|
80
|
-
className={`fixed inset-0 z-50 flex items-center justify-center bg-base transition-opacity duration-500 ${unlocked ? 'opacity-0 pointer-events-none' : 'opacity-100'}`}
|
|
81
|
-
>
|
|
82
|
-
<div className="max-w-2xl px-6 text-center">
|
|
83
|
-
<h1 className="text-4xl md:text-5xl font-bold text-heading mb-6">
|
|
84
|
-
{title}
|
|
85
|
-
</h1>
|
|
86
|
-
<p className="text-lg text-body mb-8">
|
|
87
|
-
{subtitle}
|
|
88
|
-
</p>
|
|
89
|
-
<div className="bg-surface p-8 rounded-xl shadow-lg inline-block border border-accent-muted">
|
|
90
|
-
<p className="text-accent-muted font-bold mb-4">
|
|
91
|
-
{datePrefix} {releaseDate} {underConstruction}
|
|
92
|
-
</p>
|
|
93
|
-
<form onSubmit={handleSubmit} className="flex flex-col items-center gap-4">
|
|
94
|
-
<div className="relative w-full">
|
|
95
|
-
<input
|
|
96
|
-
type={showPassword ? "text" : "password"}
|
|
97
|
-
placeholder={placeholder}
|
|
98
|
-
value={passwordInput}
|
|
99
|
-
onChange={(e) => setPasswordInput(e.target.value)}
|
|
100
|
-
className={`w-full px-4 py-2 pr-10 bg-base border rounded text-body focus:outline-none focus:ring-2 focus:ring-accent transition-transform ${error ? 'border-red-500 animate-[shake_0.5s_ease-in-out]' : 'border-accent-muted'}`}
|
|
101
|
-
/>
|
|
102
|
-
<button
|
|
103
|
-
type="button"
|
|
104
|
-
onClick={() => setShowPassword(!showPassword)}
|
|
105
|
-
className="absolute inset-y-0 right-0 pr-3 flex items-center text-body hover:text-heading"
|
|
106
|
-
aria-label={showPassword ? hidePasswordLabel : showPasswordLabel}
|
|
107
|
-
>
|
|
108
|
-
{showPassword ? (
|
|
109
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-5 h-5">
|
|
110
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88" />
|
|
111
|
-
</svg>
|
|
112
|
-
) : (
|
|
113
|
-
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-5 h-5">
|
|
114
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" />
|
|
115
|
-
<path strokeLinecap="round" strokeLinejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" />
|
|
116
|
-
</svg>
|
|
117
|
-
)}
|
|
118
|
-
</button>
|
|
119
|
-
</div>
|
|
120
|
-
<button
|
|
121
|
-
type="submit"
|
|
122
|
-
className="px-6 py-2 bg-accent-muted text-white rounded font-semibold transition-colors"
|
|
123
|
-
>
|
|
124
|
-
{buttonText}
|
|
125
|
-
</button>
|
|
126
|
-
</form>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
<style>{`
|
|
130
|
-
@keyframes shake {
|
|
131
|
-
0%, 100% { transform: translateX(0); }
|
|
132
|
-
25% { transform: translateX(-5px); }
|
|
133
|
-
50% { transform: translateX(5px); }
|
|
134
|
-
75% { transform: translateX(-5px); }
|
|
135
|
-
}
|
|
136
|
-
`}</style>
|
|
137
|
-
</div>
|
|
138
|
-
);
|
|
139
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"jsx": "react",
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"skipLibCheck": true,
|
|
9
|
-
"forceConsistentCasingInFileNames": true,
|
|
10
|
-
"declaration": true,
|
|
11
|
-
"emitDeclarationOnly": true
|
|
12
|
-
},
|
|
13
|
-
"include": ["index.tsx"]
|
|
14
|
-
}
|