@medialane/ui 0.243.0 → 0.244.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/dist/components/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
- package/dist/components/launchpad/pop-create-fields.cjs +295 -0
- package/dist/components/launchpad/pop-create-fields.cjs.map +1 -0
- package/dist/components/launchpad/pop-create-fields.d.cts +25 -0
- package/dist/components/launchpad/pop-create-fields.d.ts +25 -0
- package/dist/components/launchpad/pop-create-fields.js +273 -0
- package/dist/components/launchpad/pop-create-fields.js.map +1 -0
- package/dist/components/launchpad/pop-create-schema.cjs +71 -0
- package/dist/components/launchpad/pop-create-schema.cjs.map +1 -0
- package/dist/components/launchpad/pop-create-schema.d.cts +41 -0
- package/dist/components/launchpad/pop-create-schema.d.ts +41 -0
- package/dist/components/launchpad/pop-create-schema.js +37 -0
- package/dist/components/launchpad/pop-create-schema.js.map +1 -0
- package/dist/components/launchpad/pop-create.cjs +191 -0
- package/dist/components/launchpad/pop-create.cjs.map +1 -0
- package/dist/components/launchpad/pop-create.d.cts +8 -0
- package/dist/components/launchpad/pop-create.d.ts +8 -0
- package/dist/components/launchpad/pop-create.js +167 -0
- package/dist/components/launchpad/pop-create.js.map +1 -0
- package/dist/components/sheet.d.cts +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as input_otp from 'input-otp';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
onChange?: (newValue: string) => unknown;
|
|
7
7
|
maxLength: number;
|
|
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
14
14
|
} & {
|
|
15
15
|
render: (props: input_otp.RenderProps) => React.ReactNode;
|
|
16
16
|
children?: never;
|
|
17
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
18
18
|
value?: string;
|
|
19
19
|
onChange?: (newValue: string) => unknown;
|
|
20
20
|
maxLength: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as input_otp from 'input-otp';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
5
5
|
value?: string;
|
|
6
6
|
onChange?: (newValue: string) => unknown;
|
|
7
7
|
maxLength: number;
|
|
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
14
14
|
} & {
|
|
15
15
|
render: (props: input_otp.RenderProps) => React.ReactNode;
|
|
16
16
|
children?: never;
|
|
17
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
17
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
18
18
|
value?: string;
|
|
19
19
|
onChange?: (newValue: string) => unknown;
|
|
20
20
|
maxLength: number;
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
|
|
7
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
|
|
7
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
10
|
asChild?: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { FastMintProps } from './types.cjs';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { FastMintProps } from './types.js';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -16,7 +16,6 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
16
16
|
royalty: zod.ZodNumber;
|
|
17
17
|
}, "strip", zod.ZodTypeAny, {
|
|
18
18
|
name: string;
|
|
19
|
-
value: string;
|
|
20
19
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
21
20
|
licenseType: string;
|
|
22
21
|
commercialUse: "Yes" | "No";
|
|
@@ -25,12 +24,12 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
25
24
|
geographicScope: string;
|
|
26
25
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
27
26
|
royalty: number;
|
|
27
|
+
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
name: string;
|
|
33
|
-
value: string;
|
|
34
33
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
35
34
|
licenseType: string;
|
|
36
35
|
commercialUse: "Yes" | "No";
|
|
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
39
38
|
geographicScope: string;
|
|
40
39
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
41
40
|
royalty: number;
|
|
41
|
+
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
|
@@ -16,7 +16,6 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
16
16
|
royalty: zod.ZodNumber;
|
|
17
17
|
}, "strip", zod.ZodTypeAny, {
|
|
18
18
|
name: string;
|
|
19
|
-
value: string;
|
|
20
19
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
21
20
|
licenseType: string;
|
|
22
21
|
commercialUse: "Yes" | "No";
|
|
@@ -25,12 +24,12 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
25
24
|
geographicScope: string;
|
|
26
25
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
27
26
|
royalty: number;
|
|
27
|
+
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
name: string;
|
|
33
|
-
value: string;
|
|
34
33
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
35
34
|
licenseType: string;
|
|
36
35
|
commercialUse: "Yes" | "No";
|
|
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
39
38
|
geographicScope: string;
|
|
40
39
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
41
40
|
royalty: number;
|
|
41
|
+
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var pop_create_fields_exports = {};
|
|
31
|
+
__export(pop_create_fields_exports, {
|
|
32
|
+
PopCreateFields: () => PopCreateFields
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pop_create_fields_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_image = __toESM(require("../image.js"), 1);
|
|
37
|
+
var import_lucide_react = require("lucide-react");
|
|
38
|
+
var import_sdk = require("@medialane/sdk");
|
|
39
|
+
var import_button = require("../button.js");
|
|
40
|
+
var import_input = require("../input.js");
|
|
41
|
+
var import_textarea = require("../textarea.js");
|
|
42
|
+
var import_form = require("../form.js");
|
|
43
|
+
var import_motion_primitives = require("../motion-primitives.js");
|
|
44
|
+
var import_external_link_field = require("../external-link-field.js");
|
|
45
|
+
var import_cn = require("../../utils/cn.js");
|
|
46
|
+
const EVENT_TYPES = [
|
|
47
|
+
{ value: "Conference", label: "Conference", icon: import_lucide_react.Mic2, description: "Talks & panels" },
|
|
48
|
+
{ value: "Bootcamp", label: "Bootcamp", icon: import_lucide_react.Code2, description: "Intensive training" },
|
|
49
|
+
{ value: "Workshop", label: "Workshop", icon: import_lucide_react.Wrench, description: "Hands-on learning" },
|
|
50
|
+
{ value: "Hackathon", label: "Hackathon", icon: import_lucide_react.Zap, description: "Build & compete" },
|
|
51
|
+
{ value: "Meetup", label: "Meetup", icon: import_lucide_react.Users, description: "Community gathering" },
|
|
52
|
+
{ value: "Course", label: "Course", icon: import_lucide_react.BookOpen, description: "Structured learning" },
|
|
53
|
+
{ value: "Other", label: "Other", icon: import_lucide_react.Star, description: "Something unique" }
|
|
54
|
+
];
|
|
55
|
+
function PopCreateFields({
|
|
56
|
+
form,
|
|
57
|
+
walletAddress,
|
|
58
|
+
eventType,
|
|
59
|
+
isPublic,
|
|
60
|
+
imagePreview,
|
|
61
|
+
imageUri,
|
|
62
|
+
imageUploading,
|
|
63
|
+
isSubmitting,
|
|
64
|
+
fileInputRef,
|
|
65
|
+
onSetEventType,
|
|
66
|
+
onSetPublic,
|
|
67
|
+
onImageSelect,
|
|
68
|
+
onClearImage
|
|
69
|
+
}) {
|
|
70
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-5", children: [
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.06, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: "What kind of event is this?" }),
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-4 gap-2", children: EVENT_TYPES.map(({ value, label, icon: Icon }) => {
|
|
74
|
+
const selected = eventType === value;
|
|
75
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
76
|
+
"button",
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
onClick: () => onSetEventType(value),
|
|
80
|
+
className: (0, import_cn.cn)(
|
|
81
|
+
"flex flex-col items-center gap-1.5 p-3 rounded-xl border text-center transition-all",
|
|
82
|
+
selected ? "border-green-500 bg-green-500/10 text-green-600 dark:text-green-400" : "border-border bg-muted/30 hover:border-green-500/40 hover:bg-green-500/5 text-muted-foreground"
|
|
83
|
+
),
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)("h-5 w-5", selected && "text-green-500") }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-2xs font-semibold leading-tight", children: label })
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
value
|
|
90
|
+
);
|
|
91
|
+
}) }),
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: EVENT_TYPES.find((event) => event.value === eventType)?.description }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "This helps label the credential collection and makes the event easier to understand at a glance." })
|
|
94
|
+
] }) }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium", children: [
|
|
97
|
+
"Badge image ",
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
|
|
99
|
+
] }),
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
role: "button",
|
|
105
|
+
tabIndex: 0,
|
|
106
|
+
onClick: () => !imageUploading && fileInputRef.current?.click(),
|
|
107
|
+
onKeyDown: (event) => {
|
|
108
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
109
|
+
event.preventDefault();
|
|
110
|
+
if (!imageUploading) fileInputRef.current?.click();
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
className: "relative h-20 w-20 rounded-2xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-green-500/50 transition-colors",
|
|
114
|
+
children: [
|
|
115
|
+
imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: imagePreview, alt: "Badge", fill: true, unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImagePlus, { className: "h-6 w-6 text-muted-foreground" }),
|
|
116
|
+
imageUploading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-background/70 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) }) : null
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
+
"input",
|
|
123
|
+
{
|
|
124
|
+
ref: fileInputRef,
|
|
125
|
+
type: "file",
|
|
126
|
+
accept: (0, import_sdk.acceptFor)("image"),
|
|
127
|
+
className: "hidden",
|
|
128
|
+
onChange: (event) => {
|
|
129
|
+
const file = event.target.files?.[0];
|
|
130
|
+
if (file) onImageSelect(file);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
),
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
|
+
import_button.Button,
|
|
136
|
+
{
|
|
137
|
+
type: "button",
|
|
138
|
+
variant: "outline",
|
|
139
|
+
size: "sm",
|
|
140
|
+
disabled: imageUploading,
|
|
141
|
+
onClick: () => fileInputRef.current?.click(),
|
|
142
|
+
children: imageUploading ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-3.5 w-3.5 mr-1.5 animate-spin" }),
|
|
144
|
+
"Uploading\u2026"
|
|
145
|
+
] }) : imagePreview ? "Change" : "Upload badge art"
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
imagePreview ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
149
|
+
"button",
|
|
150
|
+
{
|
|
151
|
+
type: "button",
|
|
152
|
+
onClick: onClearImage,
|
|
153
|
+
className: "flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3 w-3" }),
|
|
156
|
+
" Remove"
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
) : null,
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: imageUri ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-green-500", children: "\u2713 Uploaded" }) : "JPG, PNG, SVG or WebP" })
|
|
161
|
+
] })
|
|
162
|
+
] })
|
|
163
|
+
] }) }),
|
|
164
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.12, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
165
|
+
import_form.FormField,
|
|
166
|
+
{
|
|
167
|
+
control: form.control,
|
|
168
|
+
name: "name",
|
|
169
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Event name *" }),
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { placeholder: "Starknet Hackathon 2026", ...field }) }),
|
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "The event or program name participants will recognize immediately." }),
|
|
173
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
174
|
+
] })
|
|
175
|
+
}
|
|
176
|
+
) }),
|
|
177
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.14, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
178
|
+
import_form.FormField,
|
|
179
|
+
{
|
|
180
|
+
control: form.control,
|
|
181
|
+
name: "symbol",
|
|
182
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
183
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormLabel, { children: "Symbol *" }),
|
|
184
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
185
|
+
import_input.Input,
|
|
186
|
+
{
|
|
187
|
+
placeholder: "SKHACK",
|
|
188
|
+
...field,
|
|
189
|
+
onChange: (event) => field.onChange(event.target.value.toUpperCase()),
|
|
190
|
+
className: "max-w-[160px]"
|
|
191
|
+
}
|
|
192
|
+
) }),
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormDescription, { children: "Short ticker shown in wallets. We suggest one from the event name." }),
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
195
|
+
] })
|
|
196
|
+
}
|
|
197
|
+
) }),
|
|
198
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.15, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
199
|
+
import_form.FormField,
|
|
200
|
+
{
|
|
201
|
+
control: form.control,
|
|
202
|
+
name: "description",
|
|
203
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { children: [
|
|
204
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormLabel, { children: [
|
|
205
|
+
"Description ",
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
|
|
207
|
+
] }),
|
|
208
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_textarea.Textarea, { placeholder: "What this credential recognizes", rows: 3, ...field }) }),
|
|
209
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
210
|
+
] })
|
|
211
|
+
}
|
|
212
|
+
) }),
|
|
213
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.155, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_external_link_field.ExternalLinkField, { form, address: walletAddress }) }),
|
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.16, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: "Claim window closes *" }),
|
|
216
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
217
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
218
|
+
import_form.FormField,
|
|
219
|
+
{
|
|
220
|
+
control: form.control,
|
|
221
|
+
name: "claimEndDate",
|
|
222
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_form.FormItem, { className: "flex-1", children: [
|
|
223
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "date", ...field }) }),
|
|
224
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormMessage, {})
|
|
225
|
+
] })
|
|
226
|
+
}
|
|
227
|
+
),
|
|
228
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
229
|
+
import_form.FormField,
|
|
230
|
+
{
|
|
231
|
+
control: form.control,
|
|
232
|
+
name: "claimEndTime",
|
|
233
|
+
render: ({ field }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormItem, { className: "w-28", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form.FormControl, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { type: "time", ...field }) }) })
|
|
234
|
+
}
|
|
235
|
+
)
|
|
236
|
+
] }),
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Participants can only claim credentials before this time. After it closes, the collection remains as the onchain record." })
|
|
238
|
+
] }) }),
|
|
239
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_motion_primitives.FadeIn, { delay: 0.18, children: [
|
|
240
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between p-4 rounded-xl border border-border bg-muted/20", children: [
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-0.5", children: [
|
|
242
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium", children: "Event visibility" }),
|
|
243
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: isPublic ? "Listed publicly on the POP launchpad" : "Only accessible via direct link" })
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
246
|
+
"button",
|
|
247
|
+
{
|
|
248
|
+
type: "button",
|
|
249
|
+
role: "switch",
|
|
250
|
+
"aria-checked": isPublic,
|
|
251
|
+
onClick: () => onSetPublic(!isPublic),
|
|
252
|
+
className: (0, import_cn.cn)(
|
|
253
|
+
"relative inline-flex h-6 w-11 shrink-0 rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
254
|
+
isPublic ? "bg-green-500" : "bg-muted-foreground/30"
|
|
255
|
+
),
|
|
256
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
257
|
+
"span",
|
|
258
|
+
{
|
|
259
|
+
className: (0, import_cn.cn)(
|
|
260
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-sm transition-transform",
|
|
261
|
+
isPublic ? "translate-x-5" : "translate-x-0"
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] }),
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Private events remain claimable by link, but won\u2019t appear in the public POP directory." })
|
|
269
|
+
] }),
|
|
270
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_motion_primitives.FadeIn, { delay: 0.2, children: [
|
|
271
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
272
|
+
import_button.Button,
|
|
273
|
+
{
|
|
274
|
+
type: "submit",
|
|
275
|
+
size: "lg",
|
|
276
|
+
className: "w-full rounded-xl mt-2",
|
|
277
|
+
disabled: isSubmitting || imageUploading,
|
|
278
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
|
|
280
|
+
"Creating event\u2026"
|
|
281
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Award, { className: "h-4 w-4 mr-2" }),
|
|
283
|
+
"Create Event"
|
|
284
|
+
] })
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-center text-muted-foreground mt-2", children: "Free to publish \u2014 protocol fee is zero." })
|
|
288
|
+
] })
|
|
289
|
+
] });
|
|
290
|
+
}
|
|
291
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
292
|
+
0 && (module.exports = {
|
|
293
|
+
PopCreateFields
|
|
294
|
+
});
|
|
295
|
+
//# sourceMappingURL=pop-create-fields.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/launchpad/pop-create-fields.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, RefObject } from \"react\";\nimport type { UseFormReturn } from \"react-hook-form\";\nimport Image from \"../image.js\";\nimport {\n Award,\n BookOpen,\n Code2,\n ImagePlus,\n Loader2,\n Mic2,\n Star,\n Users,\n Wrench,\n X,\n Zap,\n} from \"lucide-react\";\nimport { acceptFor } from \"@medialane/sdk\";\nimport { Button } from \"../button.js\";\nimport { Input } from \"../input.js\";\nimport { Textarea } from \"../textarea.js\";\nimport { FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from \"../form.js\";\nimport { FadeIn } from \"../motion-primitives.js\";\nimport { ExternalLinkField } from \"../external-link-field.js\";\nimport { cn } from \"../../utils/cn.js\";\nimport type { PopCreateValues } from \"./pop-create-schema.js\";\n\nexport type PopEventType = \"Conference\" | \"Bootcamp\" | \"Workshop\" | \"Hackathon\" | \"Meetup\" | \"Course\" | \"Other\";\n\nconst EVENT_TYPES: { value: PopEventType; label: string; icon: ElementType; description: string }[] = [\n { value: \"Conference\", label: \"Conference\", icon: Mic2, description: \"Talks & panels\" },\n { value: \"Bootcamp\", label: \"Bootcamp\", icon: Code2, description: \"Intensive training\" },\n { value: \"Workshop\", label: \"Workshop\", icon: Wrench, description: \"Hands-on learning\" },\n { value: \"Hackathon\", label: \"Hackathon\", icon: Zap, description: \"Build & compete\" },\n { value: \"Meetup\", label: \"Meetup\", icon: Users, description: \"Community gathering\" },\n { value: \"Course\", label: \"Course\", icon: BookOpen, description: \"Structured learning\" },\n { value: \"Other\", label: \"Other\", icon: Star, description: \"Something unique\" },\n];\n\ninterface PopCreateFieldsProps {\n form: UseFormReturn<PopCreateValues>;\n walletAddress: string | null | undefined;\n eventType: PopEventType;\n isPublic: boolean;\n imagePreview: string | null;\n imageUri: string | null;\n imageUploading: boolean;\n isSubmitting: boolean;\n fileInputRef: RefObject<HTMLInputElement | null>;\n onSetEventType: (value: PopEventType) => void;\n onSetPublic: (value: boolean) => void;\n onImageSelect: (file: File) => void;\n onClearImage: () => void;\n}\n\nexport function PopCreateFields({\n form,\n walletAddress,\n eventType,\n isPublic,\n imagePreview,\n imageUri,\n imageUploading,\n isSubmitting,\n fileInputRef,\n onSetEventType,\n onSetPublic,\n onImageSelect,\n onClearImage,\n}: PopCreateFieldsProps) {\n return (\n <div className=\"space-y-5\">\n <FadeIn delay={0.06}>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-medium\">What kind of event is this?</p>\n <div className=\"grid grid-cols-4 gap-2\">\n {EVENT_TYPES.map(({ value, label, icon: Icon }) => {\n const selected = eventType === value;\n return (\n <button\n key={value}\n type=\"button\"\n onClick={() => onSetEventType(value)}\n className={cn(\n \"flex flex-col items-center gap-1.5 p-3 rounded-xl border text-center transition-all\",\n selected\n ? \"border-green-500 bg-green-500/10 text-green-600 dark:text-green-400\"\n : \"border-border bg-muted/30 hover:border-green-500/40 hover:bg-green-500/5 text-muted-foreground\"\n )}\n >\n <Icon className={cn(\"h-5 w-5\", selected && \"text-green-500\")} />\n <span className=\"text-2xs font-semibold leading-tight\">{label}</span>\n </button>\n );\n })}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n {EVENT_TYPES.find((event) => event.value === eventType)?.description}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n This helps label the credential collection and makes the event easier to understand at a glance.\n </p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.1}>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-medium\">\n Badge image <span className=\"text-muted-foreground font-normal\">(optional)</span>\n </p>\n <div className=\"flex items-center gap-4\">\n <div\n role=\"button\"\n tabIndex={0}\n onClick={() => !imageUploading && fileInputRef.current?.click()}\n onKeyDown={(event) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n if (!imageUploading) fileInputRef.current?.click();\n }\n }}\n className=\"relative h-20 w-20 rounded-2xl border-2 border-dashed border-border bg-muted flex items-center justify-center overflow-hidden shrink-0 cursor-pointer hover:border-green-500/50 transition-colors\"\n >\n {imagePreview ? (\n <Image src={imagePreview} alt=\"Badge\" fill unoptimized className=\"object-cover\" />\n ) : (\n <ImagePlus className=\"h-6 w-6 text-muted-foreground\" />\n )}\n {imageUploading ? (\n <div className=\"absolute inset-0 bg-background/70 flex items-center justify-center\">\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n </div>\n ) : null}\n </div>\n <div className=\"space-y-1.5\">\n <input\n ref={fileInputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n className=\"hidden\"\n onChange={(event) => {\n const file = event.target.files?.[0];\n if (file) onImageSelect(file);\n }}\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n disabled={imageUploading}\n onClick={() => fileInputRef.current?.click()}\n >\n {imageUploading ? (\n <>\n <Loader2 className=\"h-3.5 w-3.5 mr-1.5 animate-spin\" />\n Uploading…\n </>\n ) : imagePreview ? (\n \"Change\"\n ) : (\n \"Upload badge art\"\n )}\n </Button>\n {imagePreview ? (\n <button\n type=\"button\"\n onClick={onClearImage}\n className=\"flex items-center gap-1 text-xs text-muted-foreground hover:text-destructive transition-colors\"\n >\n <X className=\"h-3 w-3\" /> Remove\n </button>\n ) : null}\n <p className=\"text-xs text-muted-foreground\">\n {imageUri ? <span className=\"text-green-500\">✓ Uploaded</span> : \"JPG, PNG, SVG or WebP\"}\n </p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.12}>\n <FormField\n control={form.control}\n name=\"name\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Event name *</FormLabel>\n <FormControl>\n <Input placeholder=\"Starknet Hackathon 2026\" {...field} />\n </FormControl>\n <FormDescription>The event or program name participants will recognize immediately.</FormDescription>\n <FormMessage />\n </FormItem>\n )}\n />\n </FadeIn>\n\n <FadeIn delay={0.14}>\n <FormField\n control={form.control}\n name=\"symbol\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Symbol *</FormLabel>\n <FormControl>\n <Input\n placeholder=\"SKHACK\"\n {...field}\n onChange={(event) => field.onChange(event.target.value.toUpperCase())}\n className=\"max-w-[160px]\"\n />\n </FormControl>\n <FormDescription>Short ticker shown in wallets. We suggest one from the event name.</FormDescription>\n <FormMessage />\n </FormItem>\n )}\n />\n </FadeIn>\n\n <FadeIn delay={0.15}>\n <FormField\n control={form.control}\n name=\"description\"\n render={({ field }) => (\n <FormItem>\n <FormLabel>Description <span className=\"text-muted-foreground font-normal\">(optional)</span></FormLabel>\n <FormControl>\n <Textarea placeholder=\"What this credential recognizes\" rows={3} {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n </FadeIn>\n\n <FadeIn delay={0.155}>\n <ExternalLinkField form={form} address={walletAddress} />\n </FadeIn>\n\n <FadeIn delay={0.16}>\n <div className=\"space-y-1.5\">\n <p className=\"text-sm font-medium\">Claim window closes *</p>\n <div className=\"flex gap-2 items-center\">\n <FormField\n control={form.control}\n name=\"claimEndDate\"\n render={({ field }) => (\n <FormItem className=\"flex-1\">\n <FormControl>\n <Input type=\"date\" {...field} />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n <FormField\n control={form.control}\n name=\"claimEndTime\"\n render={({ field }) => (\n <FormItem className=\"w-28\">\n <FormControl>\n <Input type=\"time\" {...field} />\n </FormControl>\n </FormItem>\n )}\n />\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Participants can only claim credentials before this time. After it closes, the collection remains as the onchain record.\n </p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.18}>\n <div className=\"flex items-center justify-between p-4 rounded-xl border border-border bg-muted/20\">\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-medium\">Event visibility</p>\n <p className=\"text-xs text-muted-foreground\">\n {isPublic ? \"Listed publicly on the POP launchpad\" : \"Only accessible via direct link\"}\n </p>\n </div>\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={isPublic}\n onClick={() => onSetPublic(!isPublic)}\n className={cn(\n \"relative inline-flex h-6 w-11 shrink-0 rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n isPublic ? \"bg-green-500\" : \"bg-muted-foreground/30\"\n )}\n >\n <span\n className={cn(\n \"pointer-events-none block h-5 w-5 rounded-full bg-white shadow-sm transition-transform\",\n isPublic ? \"translate-x-5\" : \"translate-x-0\"\n )}\n />\n </button>\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Private events remain claimable by link, but won’t appear in the public POP directory.\n </p>\n </FadeIn>\n\n <FadeIn delay={0.2}>\n <Button\n type=\"submit\"\n size=\"lg\"\n className=\"w-full rounded-xl mt-2\"\n disabled={isSubmitting || imageUploading}\n >\n {isSubmitting ? (\n <>\n <Loader2 className=\"h-4 w-4 mr-2 animate-spin\" />\n Creating event…\n </>\n ) : (\n <>\n <Award className=\"h-4 w-4 mr-2\" />\n Create Event\n </>\n )}\n </Button>\n <p className=\"text-xs text-center text-muted-foreground mt-2\">\n Free to publish — protocol fee is zero.\n </p>\n </FadeIn>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2EU;AAvEV,mBAAkB;AAClB,0BAYO;AACP,iBAA0B;AAC1B,oBAAuB;AACvB,mBAAsB;AACtB,sBAAyB;AACzB,kBAA0F;AAC1F,+BAAuB;AACvB,iCAAkC;AAClC,gBAAmB;AAKnB,MAAM,cAAgG;AAAA,EACpG,EAAE,OAAO,cAAc,OAAO,cAAc,MAAM,0BAAM,aAAa,iBAAiB;AAAA,EACtF,EAAE,OAAO,YAAY,OAAO,YAAY,MAAM,2BAAO,aAAa,qBAAqB;AAAA,EACvF,EAAE,OAAO,YAAY,OAAO,YAAY,MAAM,4BAAQ,aAAa,oBAAoB;AAAA,EACvF,EAAE,OAAO,aAAa,OAAO,aAAa,MAAM,yBAAK,aAAa,kBAAkB;AAAA,EACpF,EAAE,OAAO,UAAU,OAAO,UAAU,MAAM,2BAAO,aAAa,sBAAsB;AAAA,EACpF,EAAE,OAAO,UAAU,OAAO,UAAU,MAAM,8BAAU,aAAa,sBAAsB;AAAA,EACvF,EAAE,OAAO,SAAS,OAAO,SAAS,MAAM,0BAAM,aAAa,mBAAmB;AAChF;AAkBO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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EA,6CAAC,mCAAO,OAAO,KACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,MAAK;AAAA,UACL,WAAU;AAAA,UACV,UAAU,gBAAgB;AAAA,UAEzB,yBACC,4EACE;AAAA,wDAAC,+BAAQ,WAAU,6BAA4B;AAAA,YAAE;AAAA,aAEnD,IAEA,4EACE;AAAA,wDAAC,6BAAM,WAAU,gBAAe;AAAA,YAAE;AAAA,aAEpC;AAAA;AAAA,MAEJ;AAAA,MACA,4CAAC,OAAE,WAAU,kDAAiD,0DAE9D;AAAA,OACF;AAAA,KACF;AAEJ;","names":["Image"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
|
+
import { PopCreateValues } from './pop-create-schema.cjs';
|
|
5
|
+
import 'zod';
|
|
6
|
+
|
|
7
|
+
type PopEventType = "Conference" | "Bootcamp" | "Workshop" | "Hackathon" | "Meetup" | "Course" | "Other";
|
|
8
|
+
interface PopCreateFieldsProps {
|
|
9
|
+
form: UseFormReturn<PopCreateValues>;
|
|
10
|
+
walletAddress: string | null | undefined;
|
|
11
|
+
eventType: PopEventType;
|
|
12
|
+
isPublic: boolean;
|
|
13
|
+
imagePreview: string | null;
|
|
14
|
+
imageUri: string | null;
|
|
15
|
+
imageUploading: boolean;
|
|
16
|
+
isSubmitting: boolean;
|
|
17
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
18
|
+
onSetEventType: (value: PopEventType) => void;
|
|
19
|
+
onSetPublic: (value: boolean) => void;
|
|
20
|
+
onImageSelect: (file: File) => void;
|
|
21
|
+
onClearImage: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare function PopCreateFields({ form, walletAddress, eventType, isPublic, imagePreview, imageUri, imageUploading, isSubmitting, fileInputRef, onSetEventType, onSetPublic, onImageSelect, onClearImage, }: PopCreateFieldsProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { PopCreateFields, type PopEventType };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { RefObject } from 'react';
|
|
3
|
+
import { UseFormReturn } from 'react-hook-form';
|
|
4
|
+
import { PopCreateValues } from './pop-create-schema.js';
|
|
5
|
+
import 'zod';
|
|
6
|
+
|
|
7
|
+
type PopEventType = "Conference" | "Bootcamp" | "Workshop" | "Hackathon" | "Meetup" | "Course" | "Other";
|
|
8
|
+
interface PopCreateFieldsProps {
|
|
9
|
+
form: UseFormReturn<PopCreateValues>;
|
|
10
|
+
walletAddress: string | null | undefined;
|
|
11
|
+
eventType: PopEventType;
|
|
12
|
+
isPublic: boolean;
|
|
13
|
+
imagePreview: string | null;
|
|
14
|
+
imageUri: string | null;
|
|
15
|
+
imageUploading: boolean;
|
|
16
|
+
isSubmitting: boolean;
|
|
17
|
+
fileInputRef: RefObject<HTMLInputElement | null>;
|
|
18
|
+
onSetEventType: (value: PopEventType) => void;
|
|
19
|
+
onSetPublic: (value: boolean) => void;
|
|
20
|
+
onImageSelect: (file: File) => void;
|
|
21
|
+
onClearImage: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare function PopCreateFields({ form, walletAddress, eventType, isPublic, imagePreview, imageUri, imageUploading, isSubmitting, fileInputRef, onSetEventType, onSetPublic, onImageSelect, onClearImage, }: PopCreateFieldsProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
export { PopCreateFields, type PopEventType };
|