@shipsite.dev/components 0.2.60 → 0.2.65
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/dist/marketing/ContactForm.js +1 -1
- package/dist/marketing/ContactForm.js.map +1 -1
- package/dist/marketing/FormClient.js +1 -1
- package/dist/marketing/NewsletterForm.js +1 -1
- package/dist/marketing/WaitlistForm.js +1 -1
- package/package.json +1 -1
- package/src/marketing/ContactForm.tsx +2 -2
- package/src/marketing/FormClient.tsx +2 -2
- package/src/marketing/NewsletterForm.tsx +1 -1
- package/src/marketing/WaitlistForm.tsx +1 -1
- package/src/styles/utils.css +7 -0
|
@@ -20,7 +20,7 @@ export function ContactForm({ id, action, title = "Get in Touch", description, n
|
|
|
20
20
|
submit(fields);
|
|
21
21
|
}
|
|
22
22
|
const successContent = (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] }));
|
|
23
|
-
const formContent = status === "success" ? (successContent) : (_jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-
|
|
23
|
+
const formContent = status === "success" ? (successContent) : (_jsxs("form", { onSubmit: handleSubmit, className: "space-y-6", children: [_jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-6", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-name`, children: nameLabel }), _jsx(Input, { id: `${uid}-name`, name: "name", placeholder: "Your name", value: fields.name, onChange: (e) => update("name", e.target.value), required: true, disabled: status === "loading" })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-email`, children: emailLabel }), _jsx(Input, { id: `${uid}-email`, name: "email", type: "email", placeholder: "you@example.com", value: fields.email, onChange: (e) => update("email", e.target.value), required: true, disabled: status === "loading" })] })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: `${uid}-message`, children: messageLabel }), _jsx(Textarea, { id: `${uid}-message`, name: "message", placeholder: "Your message...", value: fields.message, onChange: (e) => update("message", e.target.value), required: true, disabled: status === "loading" })] }), _jsx(Button, { type: "submit", variant: "default", size: "lg", className: "w-full mt-2", disabled: status === "loading", children: status === "loading" ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "size-4 animate-spin mr-2" }), "Sending..."] })) : (submitLabel) }), status === "error" && (_jsx("p", { className: "text-sm text-destructive", "aria-live": "polite", children: errorMsg }))] }));
|
|
24
24
|
if (variant === "card") {
|
|
25
25
|
return (_jsx("div", { className: "glass-2 rounded-2xl p-8", children: formContent }));
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactForm.js","sourceRoot":"","sources":["../../src/marketing/ContactForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAc,EAAa,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgBvD,MAAM,UAAU,WAAW,CAAC,EAC1B,EAAE,EACF,MAAM,EACN,KAAK,GAAG,cAAc,EACtB,WAAW,EACX,SAAS,GAAG,MAAM,EAClB,UAAU,GAAG,OAAO,EAC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AC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,OAAO,IAAC,EAAE,EAAE,EAAE,YACb,eAAK,SAAS,EAAC,0BAA0B,aACtC,CAAC,KAAK,IAAI,WAAW,CAAC,IAAI,CACzB,eAAK,SAAS,EAAC,mBAAmB,aAC/B,KAAK,IAAI,CACR,aAAI,SAAS,EAAC,qDAAqD,YAChE,KAAK,GACH,CACN,EACA,WAAW,IAAI,CACd,YAAG,SAAS,EAAC,iDAAiD,YAC3D,WAAW,GACV,CACL,IACG,CACP,EACD,cAAK,SAAS,EAAC,yBAAyB,YAAE,WAAW,GAAO,IACxD,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -36,6 +36,6 @@ export function FormClient({ id, action, title, description, columns = 1, submit
|
|
|
36
36
|
e.preventDefault();
|
|
37
37
|
submit(values);
|
|
38
38
|
}
|
|
39
|
-
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-3xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), status === "success" ? (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "glass-1 rounded-2xl p-8", children: [_jsx("div", { className: cn("grid grid-cols-1 gap-
|
|
39
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-3xl", children: [(title || description) && (_jsxs("div", { className: "text-center mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), status === "success" ? (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "glass-1 rounded-2xl p-8", children: [_jsx("div", { className: cn("grid grid-cols-1 gap-6", gridColsMap[columns]), children: fields.map((field) => (_jsxs("div", { className: cn("space-y-2", field.colSpan && colSpanMap[field.colSpan]), children: [_jsx(Label, { htmlFor: `${uid}-${field.name}`, children: field.label }), field.type === "textarea" ? (_jsx(Textarea, { id: `${uid}-${field.name}`, name: field.name, placeholder: field.placeholder, required: field.required, value: values[field.name] ?? "", onChange: (e) => update(field.name, e.target.value), disabled: status === "loading" })) : field.type === "select" && field.options ? (_jsxs(Select, { value: values[field.name] ?? "", onValueChange: (v) => update(field.name, v), required: field.required, disabled: status === "loading", children: [_jsx(SelectTrigger, { id: `${uid}-${field.name}`, children: _jsx(SelectValue, { placeholder: field.placeholder || "Select..." }) }), _jsx(SelectContent, { children: field.options.map((opt) => (_jsx(SelectItem, { value: opt, children: opt }, opt))) })] })) : (_jsx(Input, { id: `${uid}-${field.name}`, name: field.name, type: field.type || "text", placeholder: field.placeholder, required: field.required, value: values[field.name] ?? "", onChange: (e) => update(field.name, e.target.value), disabled: status === "loading" }))] }, field.name))) }), _jsxs("div", { className: "mt-8", children: [_jsx(Button, { type: "submit", variant: "default", size: "lg", className: "w-full", disabled: status === "loading", children: status === "loading" ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "size-4 animate-spin mr-2" }), "Submitting..."] })) : (submitLabel) }), status === "error" && (_jsx("p", { className: "text-sm text-destructive mt-2", "aria-live": "polite", children: errorMsg }))] })] }))] }) }));
|
|
40
40
|
}
|
|
41
41
|
//# sourceMappingURL=FormClient.js.map
|
|
@@ -14,7 +14,7 @@ export function NewsletterForm({ id, action, title, description, placeholder = "
|
|
|
14
14
|
submit({ email });
|
|
15
15
|
}
|
|
16
16
|
const successContent = (_jsxs("div", { className: "flex items-center justify-center gap-2 text-sm text-primary", children: [_jsx(CheckCircle, { className: "size-4" }), _jsx("span", { children: successMessage })] }));
|
|
17
|
-
const formContent = status === "success" ? (successContent) : (_jsxs(_Fragment, { children: [_jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col sm:flex-row gap-
|
|
17
|
+
const formContent = status === "success" ? (successContent) : (_jsxs(_Fragment, { children: [_jsxs("form", { onSubmit: handleSubmit, className: "flex flex-col sm:flex-row gap-3 max-w-md mx-auto", children: [_jsx(Input, { type: "email", placeholder: placeholder, value: email, onChange: (e) => setEmail(e.target.value), required: true, className: "flex-1", disabled: status === "loading" }), _jsx(Button, { type: "submit", variant: "default", disabled: status === "loading", children: status === "loading" ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (submitLabel) })] }), status === "error" && (_jsx("p", { className: "text-sm text-destructive text-center mt-2", "aria-live": "polite", children: errorMsg }))] }));
|
|
18
18
|
if (variant === "inline") {
|
|
19
19
|
return formContent;
|
|
20
20
|
}
|
|
@@ -22,6 +22,6 @@ export function WaitlistForm({ id, action, title = "Join the Waitlist", descript
|
|
|
22
22
|
data.name = fields.name;
|
|
23
23
|
submit(data);
|
|
24
24
|
}
|
|
25
|
-
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-2xl text-center", children: [badge && (_jsx("div", { className: "mb-4", children: _jsx(Badge, { variant: "outline", children: badge }) })), (title || description) && (_jsxs("div", { className: "mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), status === "success" ? (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "glass-1 rounded-2xl p-8 max-w-md mx-auto space-y-
|
|
25
|
+
return (_jsx(Section, { id: id, children: _jsxs("div", { className: "container-main max-w-2xl text-center", children: [badge && (_jsx("div", { className: "mb-4", children: _jsx(Badge, { variant: "outline", children: badge }) })), (title || description) && (_jsxs("div", { className: "mb-12", children: [title && (_jsx("h2", { className: "text-3xl md:text-4xl font-bold text-foreground mb-4", children: title })), description && (_jsx("p", { className: "text-lg text-muted-foreground max-w-2xl mx-auto", children: description }))] })), status === "success" ? (_jsxs("div", { className: "text-center py-12", children: [_jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 mx-auto mb-4 flex items-center justify-center", children: _jsx(CheckCircle, { className: "w-8 h-8 text-primary" }) }), _jsx("h3", { className: "text-xl font-semibold text-foreground mb-2", children: successTitle }), _jsx("p", { className: "text-muted-foreground", children: successMessage })] })) : (_jsxs("form", { onSubmit: handleSubmit, className: "glass-1 rounded-2xl p-8 max-w-md mx-auto space-y-6", children: [showName && (_jsxs("div", { className: "space-y-2 text-left", children: [_jsx(Label, { htmlFor: `${uid}-name`, children: nameLabel }), _jsx(Input, { id: `${uid}-name`, name: "name", placeholder: "Your name", value: fields.name, onChange: (e) => update("name", e.target.value), required: true, disabled: status === "loading" })] })), _jsxs("div", { className: "space-y-2 text-left", children: [_jsx(Label, { htmlFor: `${uid}-email`, children: emailLabel }), _jsx(Input, { id: `${uid}-email`, name: "email", type: "email", placeholder: "you@example.com", value: fields.email, onChange: (e) => update("email", e.target.value), required: true, disabled: status === "loading" })] }), _jsx(Button, { type: "submit", variant: "default", size: "lg", className: "w-full", disabled: status === "loading", children: status === "loading" ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "size-4 animate-spin mr-2" }), "Joining..."] })) : (submitLabel) }), status === "error" && (_jsx("p", { className: "text-sm text-destructive", "aria-live": "polite", children: errorMsg }))] }))] }) }));
|
|
26
26
|
}
|
|
27
27
|
//# sourceMappingURL=WaitlistForm.js.map
|
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@ export function ContactForm({
|
|
|
64
64
|
successContent
|
|
65
65
|
) : (
|
|
66
66
|
<form onSubmit={handleSubmit} className="space-y-6">
|
|
67
|
-
<div className="grid grid-cols-1 md:grid-cols-2 gap-
|
|
67
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
68
68
|
<div className="space-y-2">
|
|
69
69
|
<Label htmlFor={`${uid}-name`}>{nameLabel}</Label>
|
|
70
70
|
<Input
|
|
@@ -107,7 +107,7 @@ export function ContactForm({
|
|
|
107
107
|
type="submit"
|
|
108
108
|
variant="default"
|
|
109
109
|
size="lg"
|
|
110
|
-
className="w-full"
|
|
110
|
+
className="w-full mt-2"
|
|
111
111
|
disabled={status === "loading"}
|
|
112
112
|
>
|
|
113
113
|
{status === "loading" ? (
|
|
@@ -110,7 +110,7 @@ export function FormClient({
|
|
|
110
110
|
) : (
|
|
111
111
|
<form onSubmit={handleSubmit} className="glass-1 rounded-2xl p-8">
|
|
112
112
|
<div
|
|
113
|
-
className={cn("grid grid-cols-1 gap-
|
|
113
|
+
className={cn("grid grid-cols-1 gap-6", gridColsMap[columns])}
|
|
114
114
|
>
|
|
115
115
|
{fields.map((field) => (
|
|
116
116
|
<div
|
|
@@ -163,7 +163,7 @@ export function FormClient({
|
|
|
163
163
|
</div>
|
|
164
164
|
))}
|
|
165
165
|
</div>
|
|
166
|
-
<div className="mt-
|
|
166
|
+
<div className="mt-8">
|
|
167
167
|
<Button
|
|
168
168
|
type="submit"
|
|
169
169
|
variant="default"
|
|
@@ -48,7 +48,7 @@ export function NewsletterForm({
|
|
|
48
48
|
successContent
|
|
49
49
|
) : (
|
|
50
50
|
<>
|
|
51
|
-
<form onSubmit={handleSubmit} className="flex flex-col sm:flex-row gap-
|
|
51
|
+
<form onSubmit={handleSubmit} className="flex flex-col sm:flex-row gap-3 max-w-md mx-auto">
|
|
52
52
|
<Input
|
|
53
53
|
type="email"
|
|
54
54
|
placeholder={placeholder}
|
|
@@ -87,7 +87,7 @@ export function WaitlistForm({
|
|
|
87
87
|
) : (
|
|
88
88
|
<form
|
|
89
89
|
onSubmit={handleSubmit}
|
|
90
|
-
className="glass-1 rounded-2xl p-8 max-w-md mx-auto space-y-
|
|
90
|
+
className="glass-1 rounded-2xl p-8 max-w-md mx-auto space-y-6"
|
|
91
91
|
>
|
|
92
92
|
{showName && (
|
|
93
93
|
<div className="space-y-2 text-left">
|
package/src/styles/utils.css
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
border-width: 0 0 var(--line-width, 0);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
/* Collapse double padding between adjacent sections */
|
|
78
|
+
@layer base {
|
|
79
|
+
[data-slot="section"] + [data-slot="section"] {
|
|
80
|
+
@apply pt-0 sm:pt-0 md:pt-0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
77
84
|
@utility line-t {
|
|
78
85
|
@apply border-border dark:border-border/10;
|
|
79
86
|
border-width: var(--line-width, 0) 0;
|