@medialane/ui 0.101.2 → 0.103.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/alert.cjs +75 -0
- package/dist/components/alert.cjs.map +1 -0
- package/dist/components/alert.d.cts +11 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +39 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/badge.cjs +52 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +13 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +27 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.cjs +86 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +14 -0
- package/dist/components/button.d.ts +14 -0
- package/dist/components/button.js +51 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.cjs +87 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +10 -0
- package/dist/components/card.d.ts +10 -0
- package/dist/components/card.js +48 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.cjs +63 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +6 -0
- package/dist/components/checkbox.d.ts +6 -0
- package/dist/components/checkbox.js +29 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/collapsible.cjs +47 -0
- package/dist/components/collapsible.cjs.map +1 -0
- package/dist/components/collapsible.d.cts +8 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +11 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/creator-analytics.cjs +170 -0
- package/dist/components/creator-analytics.cjs.map +1 -0
- package/dist/components/creator-analytics.d.cts +10 -0
- package/dist/components/creator-analytics.d.ts +10 -0
- package/dist/components/creator-analytics.js +153 -0
- package/dist/components/creator-analytics.js.map +1 -0
- package/dist/components/drop-countdown.cjs +66 -0
- package/dist/components/drop-countdown.cjs.map +1 -0
- package/dist/components/drop-countdown.d.cts +8 -0
- package/dist/components/drop-countdown.d.ts +8 -0
- package/dist/components/drop-countdown.js +42 -0
- package/dist/components/drop-countdown.js.map +1 -0
- package/dist/components/empty-or-error.cjs +88 -0
- package/dist/components/empty-or-error.cjs.map +1 -0
- package/dist/components/empty-or-error.d.cts +23 -0
- package/dist/components/empty-or-error.d.ts +23 -0
- package/dist/components/empty-or-error.js +54 -0
- package/dist/components/empty-or-error.js.map +1 -0
- package/dist/components/form.cjs +150 -0
- package/dist/components/form.cjs.map +1 -0
- package/dist/components/form.d.cts +29 -0
- package/dist/components/form.d.ts +29 -0
- package/dist/components/form.js +113 -0
- package/dist/components/form.js.map +1 -0
- package/dist/components/help-icon.cjs +47 -0
- package/dist/components/help-icon.cjs.map +1 -0
- package/dist/components/help-icon.d.cts +14 -0
- package/dist/components/help-icon.d.ts +14 -0
- package/dist/components/help-icon.js +23 -0
- package/dist/components/help-icon.js.map +1 -0
- package/dist/components/input.cjs +58 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +5 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.js +24 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.cjs +49 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +8 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.js +15 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/owner-setup-panel.cjs +91 -0
- package/dist/components/owner-setup-panel.cjs.map +1 -0
- package/dist/components/owner-setup-panel.d.cts +10 -0
- package/dist/components/owner-setup-panel.d.ts +10 -0
- package/dist/components/owner-setup-panel.js +57 -0
- package/dist/components/owner-setup-panel.js.map +1 -0
- package/dist/components/popover.cjs +66 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +9 -0
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.js +29 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/select.cjs +163 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +15 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +120 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/skeleton.cjs +42 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +5 -0
- package/dist/components/skeleton.d.ts +5 -0
- package/dist/components/skeleton.js +18 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/switch.cjs +63 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +6 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +29 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.cjs +86 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +9 -0
- package/dist/components/tabs.d.ts +9 -0
- package/dist/components/tabs.js +49 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/index.cjs +142 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.js +108 -1
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +0 -16
- package/dist/utils/use-creators.cjs +53 -0
- package/dist/utils/use-creators.cjs.map +1 -0
- package/dist/utils/use-creators.d.cts +11 -0
- package/dist/utils/use-creators.d.ts +11 -0
- package/dist/utils/use-creators.js +19 -0
- package/dist/utils/use-creators.js.map +1 -0
- package/dist/utils/use-medialane-client.cjs +33 -0
- package/dist/utils/use-medialane-client.cjs.map +1 -0
- package/dist/utils/use-medialane-client.d.cts +5 -0
- package/dist/utils/use-medialane-client.d.ts +5 -0
- package/dist/utils/use-medialane-client.js +9 -0
- package/dist/utils/use-medialane-client.js.map +1 -0
- package/dist/utils/use-rewards.cjs +100 -0
- package/dist/utils/use-rewards.cjs.map +1 -0
- package/dist/utils/use-rewards.d.cts +61 -0
- package/dist/utils/use-rewards.d.ts +61 -0
- package/dist/utils/use-rewards.js +62 -0
- package/dist/utils/use-rewards.js.map +1 -0
- package/package.json +25 -1
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import {
|
|
6
|
+
Controller,
|
|
7
|
+
FormProvider,
|
|
8
|
+
useFormContext
|
|
9
|
+
} from "react-hook-form";
|
|
10
|
+
import { cn } from "../utils/cn.js";
|
|
11
|
+
import { Label } from "./label.js";
|
|
12
|
+
const Form = FormProvider;
|
|
13
|
+
const FormFieldContext = React.createContext({});
|
|
14
|
+
const FormField = ({
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx(Controller, { ...props }) });
|
|
18
|
+
};
|
|
19
|
+
const useFormField = () => {
|
|
20
|
+
const fieldContext = React.useContext(FormFieldContext);
|
|
21
|
+
const itemContext = React.useContext(FormItemContext);
|
|
22
|
+
const { getFieldState, formState } = useFormContext();
|
|
23
|
+
const fieldState = getFieldState(fieldContext.name, formState);
|
|
24
|
+
if (!fieldContext) {
|
|
25
|
+
throw new Error("useFormField should be used within <FormField>");
|
|
26
|
+
}
|
|
27
|
+
const { id } = itemContext;
|
|
28
|
+
return {
|
|
29
|
+
id,
|
|
30
|
+
name: fieldContext.name,
|
|
31
|
+
formItemId: `${id}-form-item`,
|
|
32
|
+
formDescriptionId: `${id}-form-item-description`,
|
|
33
|
+
formMessageId: `${id}-form-item-message`,
|
|
34
|
+
...fieldState
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const FormItemContext = React.createContext({});
|
|
38
|
+
const FormItem = React.forwardRef(
|
|
39
|
+
({ className, ...props }, ref) => {
|
|
40
|
+
const id = React.useId();
|
|
41
|
+
return /* @__PURE__ */ jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx("div", { ref, className: cn("space-y-2", className), ...props }) });
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
FormItem.displayName = "FormItem";
|
|
45
|
+
const FormLabel = React.forwardRef(({ className, ...props }, ref) => {
|
|
46
|
+
const { error, formItemId } = useFormField();
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Label,
|
|
49
|
+
{
|
|
50
|
+
ref,
|
|
51
|
+
className: cn(error && "text-destructive", className),
|
|
52
|
+
htmlFor: formItemId,
|
|
53
|
+
...props
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
FormLabel.displayName = "FormLabel";
|
|
58
|
+
const FormControl = React.forwardRef(({ ...props }, ref) => {
|
|
59
|
+
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
60
|
+
return /* @__PURE__ */ jsx(
|
|
61
|
+
Slot,
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
id: formItemId,
|
|
65
|
+
"aria-describedby": !error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`,
|
|
66
|
+
"aria-invalid": !!error,
|
|
67
|
+
...props
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
FormControl.displayName = "FormControl";
|
|
72
|
+
const FormDescription = React.forwardRef(({ className, ...props }, ref) => {
|
|
73
|
+
const { formDescriptionId } = useFormField();
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
"p",
|
|
76
|
+
{
|
|
77
|
+
ref,
|
|
78
|
+
id: formDescriptionId,
|
|
79
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
80
|
+
...props
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
FormDescription.displayName = "FormDescription";
|
|
85
|
+
const FormMessage = React.forwardRef(({ className, children, ...props }, ref) => {
|
|
86
|
+
const { error, formMessageId } = useFormField();
|
|
87
|
+
const body = error ? String(error?.message) : children;
|
|
88
|
+
if (!body) {
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
return /* @__PURE__ */ jsx(
|
|
92
|
+
"p",
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
id: formMessageId,
|
|
96
|
+
className: cn("text-sm font-medium text-destructive", className),
|
|
97
|
+
...props,
|
|
98
|
+
children: body
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
FormMessage.displayName = "FormMessage";
|
|
103
|
+
export {
|
|
104
|
+
Form,
|
|
105
|
+
FormControl,
|
|
106
|
+
FormDescription,
|
|
107
|
+
FormField,
|
|
108
|
+
FormItem,
|
|
109
|
+
FormLabel,
|
|
110
|
+
FormMessage,
|
|
111
|
+
useFormField
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/form.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n Controller,\n ControllerProps,\n FieldPath,\n FieldValues,\n FormProvider,\n useFormContext,\n} from \"react-hook-form\";\nimport { cn } from \"../utils/cn.js\";\nimport { Label } from \"./label.js\";\n\nconst Form = FormProvider;\n\ntype FormFieldContextValue<\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n> = {\n name: TName;\n};\n\nconst FormFieldContext = React.createContext<FormFieldContextValue>({} as FormFieldContextValue);\n\nconst FormField = <\n TFieldValues extends FieldValues = FieldValues,\n TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,\n>({\n ...props\n}: ControllerProps<TFieldValues, TName>) => {\n return (\n <FormFieldContext.Provider value={{ name: props.name }}>\n <Controller {...props} />\n </FormFieldContext.Provider>\n );\n};\n\nconst useFormField = () => {\n const fieldContext = React.useContext(FormFieldContext);\n const itemContext = React.useContext(FormItemContext);\n const { getFieldState, formState } = useFormContext();\n\n const fieldState = getFieldState(fieldContext.name, formState);\n\n if (!fieldContext) {\n throw new Error(\"useFormField should be used within <FormField>\");\n }\n\n const { id } = itemContext;\n\n return {\n id,\n name: fieldContext.name,\n formItemId: `${id}-form-item`,\n formDescriptionId: `${id}-form-item-description`,\n formMessageId: `${id}-form-item-message`,\n ...fieldState,\n };\n};\n\ntype FormItemContextValue = {\n id: string;\n};\n\nconst FormItemContext = React.createContext<FormItemContextValue>({} as FormItemContextValue);\n\nconst FormItem = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const id = React.useId();\n\n return (\n <FormItemContext.Provider value={{ id }}>\n <div ref={ref} className={cn(\"space-y-2\", className)} {...props} />\n </FormItemContext.Provider>\n );\n }\n);\nFormItem.displayName = \"FormItem\";\n\nconst FormLabel = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => {\n const { error, formItemId } = useFormField();\n\n return (\n <Label\n ref={ref}\n className={cn(error && \"text-destructive\", className)}\n htmlFor={formItemId}\n {...props}\n />\n );\n});\nFormLabel.displayName = \"FormLabel\";\n\nconst FormControl = React.forwardRef<\n React.ElementRef<typeof Slot>,\n React.ComponentPropsWithoutRef<typeof Slot>\n>(({ ...props }, ref) => {\n const { error, formItemId, formDescriptionId, formMessageId } = useFormField();\n\n return (\n <Slot\n ref={ref}\n id={formItemId}\n aria-describedby={!error ? `${formDescriptionId}` : `${formDescriptionId} ${formMessageId}`}\n aria-invalid={!!error}\n {...props}\n />\n );\n});\nFormControl.displayName = \"FormControl\";\n\nconst FormDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => {\n const { formDescriptionId } = useFormField();\n\n return (\n <p\n ref={ref}\n id={formDescriptionId}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n );\n});\nFormDescription.displayName = \"FormDescription\";\n\nconst FormMessage = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, children, ...props }, ref) => {\n const { error, formMessageId } = useFormField();\n const body = error ? String(error?.message) : children;\n\n if (!body) {\n return null;\n }\n\n return (\n <p\n ref={ref}\n id={formMessageId}\n className={cn(\"text-sm font-medium text-destructive\", className)}\n {...props}\n >\n {body}\n </p>\n );\n});\nFormMessage.displayName = \"FormMessage\";\n\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n};\n"],"mappings":";AAmCM;AAjCN,YAAY,WAAW;AAEvB,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EAIA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU;AACnB,SAAS,aAAa;AAEtB,MAAM,OAAO;AASb,MAAM,mBAAmB,MAAM,cAAqC,CAAC,CAA0B;AAE/F,MAAM,YAAY,CAGhB;AAAA,EACA,GAAG;AACL,MAA4C;AAC1C,SACE,oBAAC,iBAAiB,UAAjB,EAA0B,OAAO,EAAE,MAAM,MAAM,KAAK,GACnD,8BAAC,cAAY,GAAG,OAAO,GACzB;AAEJ;AAEA,MAAM,eAAe,MAAM;AACzB,QAAM,eAAe,MAAM,WAAW,gBAAgB;AACtD,QAAM,cAAc,MAAM,WAAW,eAAe;AACpD,QAAM,EAAE,eAAe,UAAU,IAAI,eAAe;AAEpD,QAAM,aAAa,cAAc,aAAa,MAAM,SAAS;AAE7D,MAAI,CAAC,cAAc;AACjB,UAAM,IAAI,MAAM,gDAAgD;AAAA,EAClE;AAEA,QAAM,EAAE,GAAG,IAAI;AAEf,SAAO;AAAA,IACL;AAAA,IACA,MAAM,aAAa;AAAA,IACnB,YAAY,GAAG,EAAE;AAAA,IACjB,mBAAmB,GAAG,EAAE;AAAA,IACxB,eAAe,GAAG,EAAE;AAAA,IACpB,GAAG;AAAA,EACL;AACF;AAMA,MAAM,kBAAkB,MAAM,cAAoC,CAAC,CAAyB;AAE5F,MAAM,WAAW,MAAM;AAAA,EACrB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAChC,UAAM,KAAK,MAAM,MAAM;AAEvB,WACE,oBAAC,gBAAgB,UAAhB,EAAyB,OAAO,EAAE,GAAG,GACpC,8BAAC,SAAI,KAAU,WAAW,GAAG,aAAa,SAAS,GAAI,GAAG,OAAO,GACnE;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;AAEvB,MAAM,YAAY,MAAM,WAGtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,QAAM,EAAE,OAAO,WAAW,IAAI,aAAa;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,SAAS,oBAAoB,SAAS;AAAA,MACpD,SAAS;AAAA,MACR,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,UAAU,cAAc;AAExB,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,GAAG,MAAM,GAAG,QAAQ;AACvB,QAAM,EAAE,OAAO,YAAY,mBAAmB,cAAc,IAAI,aAAa;AAE7E,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,oBAAkB,CAAC,QAAQ,GAAG,iBAAiB,KAAK,GAAG,iBAAiB,IAAI,aAAa;AAAA,MACzF,gBAAc,CAAC,CAAC;AAAA,MACf,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,YAAY,cAAc;AAE1B,MAAM,kBAAkB,MAAM,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAAQ;AAClC,QAAM,EAAE,kBAAkB,IAAI,aAAa;AAE3C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,WAAW,GAAG,iCAAiC,SAAS;AAAA,MACvD,GAAG;AAAA;AAAA,EACN;AAEJ,CAAC;AACD,gBAAgB,cAAc;AAE9B,MAAM,cAAc,MAAM,WAGxB,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5C,QAAM,EAAE,OAAO,cAAc,IAAI,aAAa;AAC9C,QAAM,OAAO,QAAQ,OAAO,OAAO,OAAO,IAAI;AAE9C,MAAI,CAAC,MAAM;AACT,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,IAAI;AAAA,MACJ,WAAW,GAAG,wCAAwC,SAAS;AAAA,MAC9D,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ,CAAC;AACD,YAAY,cAAc;","names":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var help_icon_exports = {};
|
|
21
|
+
__export(help_icon_exports, {
|
|
22
|
+
HelpIcon: () => HelpIcon
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(help_icon_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_lucide_react = require("lucide-react");
|
|
27
|
+
var import_popover = require("./popover.js");
|
|
28
|
+
function HelpIcon({ content, side = "top", className }) {
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_popover.Popover, { children: [
|
|
30
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
"aria-label": "Help",
|
|
35
|
+
onClick: (e) => e.stopPropagation(),
|
|
36
|
+
className: `inline-flex items-center justify-center rounded-full text-muted-foreground/50 hover:text-muted-foreground active:text-muted-foreground transition-colors shrink-0 ${className ?? ""}`,
|
|
37
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Info, { className: "h-3.5 w-3.5" })
|
|
38
|
+
}
|
|
39
|
+
) }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_popover.PopoverContent, { side, className: "text-sm max-w-[220px] px-3 py-2.5 leading-snug", children: content })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
HelpIcon
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=help-icon.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/help-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { Info } from \"lucide-react\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover.js\";\n\ninterface HelpIconProps {\n content: string;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n className?: string;\n}\n\n/**\n * Tap/click to reveal an explanation popover — works on mobile and desktop.\n * Place inline next to any element that needs contextual help.\n */\nexport function HelpIcon({ content, side = \"top\", className }: HelpIconProps) {\n return (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"Help\"\n onClick={(e) => e.stopPropagation()}\n className={`inline-flex items-center justify-center rounded-full text-muted-foreground/50 hover:text-muted-foreground active:text-muted-foreground transition-colors shrink-0 ${className ?? \"\"}`}\n >\n <Info className=\"h-3.5 w-3.5\" />\n </button>\n </PopoverTrigger>\n <PopoverContent side={side} className=\"text-sm max-w-[220px] px-3 py-2.5 leading-snug\">\n {content}\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAfJ,0BAAqB;AACrB,qBAAwD;AAYjD,SAAS,SAAS,EAAE,SAAS,OAAO,OAAO,UAAU,GAAkB;AAC5E,SACE,6CAAC,0BACC;AAAA,gDAAC,iCAAe,SAAO,MACrB;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC,WAAW,qKAAqK,aAAa,EAAE;AAAA,QAE/L,sDAAC,4BAAK,WAAU,eAAc;AAAA;AAAA,IAChC,GACF;AAAA,IACA,4CAAC,iCAAe,MAAY,WAAU,kDACnC,mBACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface HelpIconProps {
|
|
4
|
+
content: string;
|
|
5
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Tap/click to reveal an explanation popover — works on mobile and desktop.
|
|
10
|
+
* Place inline next to any element that needs contextual help.
|
|
11
|
+
*/
|
|
12
|
+
declare function HelpIcon({ content, side, className }: HelpIconProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { HelpIcon };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface HelpIconProps {
|
|
4
|
+
content: string;
|
|
5
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Tap/click to reveal an explanation popover — works on mobile and desktop.
|
|
10
|
+
* Place inline next to any element that needs contextual help.
|
|
11
|
+
*/
|
|
12
|
+
declare function HelpIcon({ content, side, className }: HelpIconProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
export { HelpIcon };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Info } from "lucide-react";
|
|
4
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
5
|
+
function HelpIcon({ content, side = "top", className }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
7
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
8
|
+
"button",
|
|
9
|
+
{
|
|
10
|
+
type: "button",
|
|
11
|
+
"aria-label": "Help",
|
|
12
|
+
onClick: (e) => e.stopPropagation(),
|
|
13
|
+
className: `inline-flex items-center justify-center rounded-full text-muted-foreground/50 hover:text-muted-foreground active:text-muted-foreground transition-colors shrink-0 ${className ?? ""}`,
|
|
14
|
+
children: /* @__PURE__ */ jsx(Info, { className: "h-3.5 w-3.5" })
|
|
15
|
+
}
|
|
16
|
+
) }),
|
|
17
|
+
/* @__PURE__ */ jsx(PopoverContent, { side, className: "text-sm max-w-[220px] px-3 py-2.5 leading-snug", children: content })
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
HelpIcon
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=help-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/help-icon.tsx"],"sourcesContent":["\"use client\";\n\nimport { Info } from \"lucide-react\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover.js\";\n\ninterface HelpIconProps {\n content: string;\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n className?: string;\n}\n\n/**\n * Tap/click to reveal an explanation popover — works on mobile and desktop.\n * Place inline next to any element that needs contextual help.\n */\nexport function HelpIcon({ content, side = \"top\", className }: HelpIconProps) {\n return (\n <Popover>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n aria-label=\"Help\"\n onClick={(e) => e.stopPropagation()}\n className={`inline-flex items-center justify-center rounded-full text-muted-foreground/50 hover:text-muted-foreground active:text-muted-foreground transition-colors shrink-0 ${className ?? \"\"}`}\n >\n <Info className=\"h-3.5 w-3.5\" />\n </button>\n </PopoverTrigger>\n <PopoverContent side={side} className=\"text-sm max-w-[220px] px-3 py-2.5 leading-snug\">\n {content}\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";AAiBI,SAQM,KARN;AAfJ,SAAS,YAAY;AACrB,SAAS,SAAS,gBAAgB,sBAAsB;AAYjD,SAAS,SAAS,EAAE,SAAS,OAAO,OAAO,UAAU,GAAkB;AAC5E,SACE,qBAAC,WACC;AAAA,wBAAC,kBAAe,SAAO,MACrB;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAW;AAAA,QACX,SAAS,CAAC,MAAM,EAAE,gBAAgB;AAAA,QAClC,WAAW,qKAAqK,aAAa,EAAE;AAAA,QAE/L,8BAAC,QAAK,WAAU,eAAc;AAAA;AAAA,IAChC,GACF;AAAA,IACA,oBAAC,kBAAe,MAAY,WAAU,kDACnC,mBACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var input_exports = {};
|
|
30
|
+
__export(input_exports, {
|
|
31
|
+
Input: () => Input
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(input_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var React = __toESM(require("react"), 1);
|
|
36
|
+
var import_cn = require("../utils/cn.js");
|
|
37
|
+
const Input = React.forwardRef(
|
|
38
|
+
({ className, type, ...props }, ref) => {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
"input",
|
|
41
|
+
{
|
|
42
|
+
type,
|
|
43
|
+
className: (0, import_cn.cn)(
|
|
44
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
ref,
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
Input.displayName = "Input";
|
|
54
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
55
|
+
0 && (module.exports = {
|
|
56
|
+
Input
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=input.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOM;AAPN,YAAuB;AAEvB,gBAAmB;AAEnB,MAAM,QAAQ,MAAM;AAAA,EAClB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
const Input = React.forwardRef(
|
|
5
|
+
({ className, type, ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
"input",
|
|
8
|
+
{
|
|
9
|
+
type,
|
|
10
|
+
className: cn(
|
|
11
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
ref,
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
Input.displayName = "Input";
|
|
21
|
+
export {
|
|
22
|
+
Input
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/input.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n );\n }\n);\nInput.displayName = \"Input\";\n\nexport { Input };\n"],"mappings":"AAOM;AAPN,YAAY,WAAW;AAEvB,SAAS,UAAU;AAEnB,MAAM,QAAQ,MAAM;AAAA,EAClB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 label_exports = {};
|
|
31
|
+
__export(label_exports, {
|
|
32
|
+
Label: () => Label
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(label_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var React = __toESM(require("react"), 1);
|
|
37
|
+
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
38
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
39
|
+
var import_cn = require("../utils/cn.js");
|
|
40
|
+
const labelVariants = (0, import_class_variance_authority.cva)(
|
|
41
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
42
|
+
);
|
|
43
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LabelPrimitive.Root, { ref, className: (0, import_cn.cn)(labelVariants(), className), ...props }));
|
|
44
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
Label
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=label.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/label.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils/cn.js\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeE;AAbF,YAAuB;AACvB,qBAAgC;AAChC,sCAAuC;AACvC,gBAAmB;AAEnB,MAAM,oBAAgB;AAAA,EACpB;AACF;AAEA,MAAM,QAAQ,MAAM,WAGlB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,4CAAC,eAAe,MAAf,EAAoB,KAAU,eAAW,cAAG,cAAc,GAAG,SAAS,GAAI,GAAG,OAAO,CACtF;AACD,MAAM,cAAc,eAAe,KAAK;","names":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
|
|
8
|
+
export { Label };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
|
|
8
|
+
export { Label };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { cn } from "../utils/cn.js";
|
|
7
|
+
const labelVariants = cva(
|
|
8
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
9
|
+
);
|
|
10
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, { ref, className: cn(labelVariants(), className), ...props }));
|
|
11
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
12
|
+
export {
|
|
13
|
+
Label
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/label.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"../utils/cn.js\";\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n);\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"],"mappings":";AAeE;AAbF,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,WAA8B;AACvC,SAAS,UAAU;AAEnB,MAAM,gBAAgB;AAAA,EACpB;AACF;AAEA,MAAM,QAAQ,MAAM,WAGlB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,eAAe,MAAf,EAAoB,KAAU,WAAW,GAAG,cAAc,GAAG,SAAS,GAAI,GAAG,OAAO,CACtF;AACD,MAAM,cAAc,eAAe,KAAK;","names":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
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 owner_setup_panel_exports = {};
|
|
31
|
+
__export(owner_setup_panel_exports, {
|
|
32
|
+
OwnerSetupPanel: () => OwnerSetupPanel
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(owner_setup_panel_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
+
var import_lucide_react = require("lucide-react");
|
|
38
|
+
var import_cn = require("../utils/cn.js");
|
|
39
|
+
function OwnerSetupPanel({ contract, profile }) {
|
|
40
|
+
const items = [
|
|
41
|
+
{ label: "Display name", done: !!profile?.displayName },
|
|
42
|
+
{ label: "Description", done: !!profile?.description },
|
|
43
|
+
{ label: "Cover image", done: !!profile?.image },
|
|
44
|
+
{ label: "Banner image", done: !!profile?.bannerImage },
|
|
45
|
+
{ label: "Social links", done: !!(profile?.twitterUrl || profile?.discordUrl || profile?.websiteUrl) },
|
|
46
|
+
{ label: "Exclusive content", done: !!profile?.hasGatedContent }
|
|
47
|
+
];
|
|
48
|
+
const doneCount = items.filter((i) => i.done).length;
|
|
49
|
+
if (doneCount === items.length) return null;
|
|
50
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mx-4 sm:mx-6 mt-3 rounded-2xl border border-border bg-card/80 p-4 space-y-3", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Settings, { className: "h-4 w-4 text-muted-foreground" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: "Set up your collection" })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs text-muted-foreground tabular-nums", children: [
|
|
57
|
+
doneCount,
|
|
58
|
+
"/",
|
|
59
|
+
items.length,
|
|
60
|
+
" complete"
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
className: "h-full rounded-full btn-border-animated transition-all duration-500",
|
|
67
|
+
style: { width: `${doneCount / items.length * 100}%` }
|
|
68
|
+
}
|
|
69
|
+
) }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: items.map(({ label, done }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
71
|
+
done ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-3.5 w-3.5 text-emerald-500 shrink-0" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Circle, { className: "h-3.5 w-3.5 text-muted-foreground/40 shrink-0" }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.cn)("text-xs", done ? "text-muted-foreground line-through" : "text-foreground"), children: label })
|
|
73
|
+
] }, label)) }),
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
75
|
+
import_link.default,
|
|
76
|
+
{
|
|
77
|
+
href: `/portfolio/collections/${contract}/settings`,
|
|
78
|
+
className: "inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-3 w-3" }),
|
|
81
|
+
"Complete your collection profile"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] });
|
|
86
|
+
}
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
OwnerSetupPanel
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=owner-setup-panel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/owner-setup-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { CheckCircle2, Circle, Settings, Sparkles } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\n\ninterface SetupItem {\n label: string;\n done: boolean;\n}\n\ninterface OwnerSetupPanelProps {\n contract: string;\n profile: ApiCollectionProfile | null;\n}\n\nexport function OwnerSetupPanel({ contract, profile }: OwnerSetupPanelProps) {\n const items: SetupItem[] = [\n { label: \"Display name\", done: !!profile?.displayName },\n { label: \"Description\", done: !!profile?.description },\n { label: \"Cover image\", done: !!profile?.image },\n { label: \"Banner image\", done: !!profile?.bannerImage },\n { label: \"Social links\", done: !!(profile?.twitterUrl || profile?.discordUrl || profile?.websiteUrl) },\n { label: \"Exclusive content\", done: !!profile?.hasGatedContent },\n ];\n\n const doneCount = items.filter((i) => i.done).length;\n\n if (doneCount === items.length) return null;\n\n return (\n <div className=\"mx-4 sm:mx-6 mt-3 rounded-2xl border border-border bg-card/80 p-4 space-y-3\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2\">\n <Settings className=\"h-4 w-4 text-muted-foreground\" />\n <p className=\"text-sm font-semibold\">Set up your collection</p>\n </div>\n <span className=\"text-xs text-muted-foreground tabular-nums\">\n {doneCount}/{items.length} complete\n </span>\n </div>\n\n <div className=\"w-full h-1.5 rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full rounded-full btn-border-animated transition-all duration-500\"\n style={{ width: `${(doneCount / items.length) * 100}%` }}\n />\n </div>\n\n <div className=\"grid grid-cols-2 gap-x-4 gap-y-1\">\n {items.map(({ label, done }) => (\n <div key={label} className=\"flex items-center gap-1.5\">\n {done ? (\n <CheckCircle2 className=\"h-3.5 w-3.5 text-emerald-500 shrink-0\" />\n ) : (\n <Circle className=\"h-3.5 w-3.5 text-muted-foreground/40 shrink-0\" />\n )}\n <span className={cn(\"text-xs\", done ? \"text-muted-foreground line-through\" : \"text-foreground\")}>\n {label}\n </span>\n </div>\n ))}\n </div>\n\n <Link\n href={`/portfolio/collections/${contract}/settings`}\n className=\"inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline\"\n >\n <Sparkles className=\"h-3 w-3\" />\n Complete your collection profile\n </Link>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCQ;AAhCR,kBAAiB;AACjB,0BAAyD;AACzD,gBAAmB;AAaZ,SAAS,gBAAgB,EAAE,UAAU,QAAQ,GAAyB;AAC3E,QAAM,QAAqB;AAAA,IACzB,EAAE,OAAO,gBAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,eAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,eAAqB,MAAM,CAAC,CAAC,SAAS,MAAM;AAAA,IACrD,EAAE,OAAO,gBAAqB,MAAM,CAAC,CAAC,SAAS,YAAY;AAAA,IAC3D,EAAE,OAAO,gBAAqB,MAAM,CAAC,EAAE,SAAS,cAAc,SAAS,cAAc,SAAS,YAAY;AAAA,IAC1G,EAAE,OAAO,qBAAqB,MAAM,CAAC,CAAC,SAAS,gBAAgB;AAAA,EACjE;AAEA,QAAM,YAAY,MAAM,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE;AAE9C,MAAI,cAAc,MAAM,OAAQ,QAAO;AAEvC,SACE,6CAAC,SAAI,WAAU,+EACb;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SAAI,WAAU,2BACb;AAAA,oDAAC,gCAAS,WAAU,iCAAgC;AAAA,QACpD,4CAAC,OAAE,WAAU,yBAAwB,oCAAsB;AAAA,SAC7D;AAAA,MACA,6CAAC,UAAK,WAAU,8CACb;AAAA;AAAA,QAAU;AAAA,QAAE,MAAM;AAAA,QAAO;AAAA,SAC5B;AAAA,OACF;AAAA,IAEA,4CAAC,SAAI,WAAU,sDACb;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,OAAO,GAAI,YAAY,MAAM,SAAU,GAAG,IAAI;AAAA;AAAA,IACzD,GACF;AAAA,IAEA,4CAAC,SAAI,WAAU,oCACZ,gBAAM,IAAI,CAAC,EAAE,OAAO,KAAK,MACxB,6CAAC,SAAgB,WAAU,6BACxB;AAAA,aACC,4CAAC,oCAAa,WAAU,yCAAwC,IAEhE,4CAAC,8BAAO,WAAU,iDAAgD;AAAA,MAEpE,4CAAC,UAAK,eAAW,cAAG,WAAW,OAAO,uCAAuC,iBAAiB,GAC3F,iBACH;AAAA,SARQ,KASV,CACD,GACH;AAAA,IAEA;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QACC,MAAM,0BAA0B,QAAQ;AAAA,QACxC,WAAU;AAAA,QAEV;AAAA,sDAAC,gCAAS,WAAU,WAAU;AAAA,UAAE;AAAA;AAAA;AAAA,IAElC;AAAA,KACF;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollectionProfile } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface OwnerSetupPanelProps {
|
|
5
|
+
contract: string;
|
|
6
|
+
profile: ApiCollectionProfile | null;
|
|
7
|
+
}
|
|
8
|
+
declare function OwnerSetupPanel({ contract, profile }: OwnerSetupPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
|
|
10
|
+
export { OwnerSetupPanel };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ApiCollectionProfile } from '@medialane/sdk';
|
|
3
|
+
|
|
4
|
+
interface OwnerSetupPanelProps {
|
|
5
|
+
contract: string;
|
|
6
|
+
profile: ApiCollectionProfile | null;
|
|
7
|
+
}
|
|
8
|
+
declare function OwnerSetupPanel({ contract, profile }: OwnerSetupPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
9
|
+
|
|
10
|
+
export { OwnerSetupPanel };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { CheckCircle2, Circle, Settings, Sparkles } from "lucide-react";
|
|
5
|
+
import { cn } from "../utils/cn.js";
|
|
6
|
+
function OwnerSetupPanel({ contract, profile }) {
|
|
7
|
+
const items = [
|
|
8
|
+
{ label: "Display name", done: !!profile?.displayName },
|
|
9
|
+
{ label: "Description", done: !!profile?.description },
|
|
10
|
+
{ label: "Cover image", done: !!profile?.image },
|
|
11
|
+
{ label: "Banner image", done: !!profile?.bannerImage },
|
|
12
|
+
{ label: "Social links", done: !!(profile?.twitterUrl || profile?.discordUrl || profile?.websiteUrl) },
|
|
13
|
+
{ label: "Exclusive content", done: !!profile?.hasGatedContent }
|
|
14
|
+
];
|
|
15
|
+
const doneCount = items.filter((i) => i.done).length;
|
|
16
|
+
if (doneCount === items.length) return null;
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", { className: "mx-4 sm:mx-6 mt-3 rounded-2xl border border-border bg-card/80 p-4 space-y-3", children: [
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Settings, { className: "h-4 w-4 text-muted-foreground" }),
|
|
21
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Set up your collection" })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground tabular-nums", children: [
|
|
24
|
+
doneCount,
|
|
25
|
+
"/",
|
|
26
|
+
items.length,
|
|
27
|
+
" complete"
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "w-full h-1.5 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: "h-full rounded-full btn-border-animated transition-all duration-500",
|
|
34
|
+
style: { width: `${doneCount / items.length * 100}%` }
|
|
35
|
+
}
|
|
36
|
+
) }),
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 gap-x-4 gap-y-1", children: items.map(({ label, done }) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
38
|
+
done ? /* @__PURE__ */ jsx(CheckCircle2, { className: "h-3.5 w-3.5 text-emerald-500 shrink-0" }) : /* @__PURE__ */ jsx(Circle, { className: "h-3.5 w-3.5 text-muted-foreground/40 shrink-0" }),
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-xs", done ? "text-muted-foreground line-through" : "text-foreground"), children: label })
|
|
40
|
+
] }, label)) }),
|
|
41
|
+
/* @__PURE__ */ jsxs(
|
|
42
|
+
Link,
|
|
43
|
+
{
|
|
44
|
+
href: `/portfolio/collections/${contract}/settings`,
|
|
45
|
+
className: "inline-flex items-center gap-1.5 text-xs font-semibold text-primary hover:underline",
|
|
46
|
+
children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "h-3 w-3" }),
|
|
48
|
+
"Complete your collection profile"
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
] });
|
|
53
|
+
}
|
|
54
|
+
export {
|
|
55
|
+
OwnerSetupPanel
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=owner-setup-panel.js.map
|