@medialane/ui 0.101.1 → 0.102.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/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/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/portfolio-header.cjs +1 -1
- package/dist/components/portfolio-header.cjs.map +1 -1
- package/dist/components/portfolio-header.d.cts +1 -4
- package/dist/components/portfolio-header.d.ts +1 -4
- package/dist/components/portfolio-header.js +1 -1
- package/dist/components/portfolio-header.js.map +1 -1
- 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 +114 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -1
- package/package.json +21 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react_hook_form from 'react-hook-form';
|
|
3
|
+
import { FieldValues, FieldPath, ControllerProps } from 'react-hook-form';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
6
|
+
|
|
7
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
8
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare const useFormField: () => {
|
|
10
|
+
invalid: boolean;
|
|
11
|
+
isDirty: boolean;
|
|
12
|
+
isTouched: boolean;
|
|
13
|
+
isValidating: boolean;
|
|
14
|
+
error?: react_hook_form.FieldError | undefined;
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
formItemId: string;
|
|
18
|
+
formDescriptionId: string;
|
|
19
|
+
formMessageId: string;
|
|
20
|
+
};
|
|
21
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
23
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLElement> & {
|
|
24
|
+
children?: React.ReactNode;
|
|
25
|
+
} & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
26
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
27
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
|
+
|
|
29
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
@@ -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":"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","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,66 @@
|
|
|
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 popover_exports = {};
|
|
31
|
+
__export(popover_exports, {
|
|
32
|
+
Popover: () => Popover,
|
|
33
|
+
PopoverAnchor: () => PopoverAnchor,
|
|
34
|
+
PopoverContent: () => PopoverContent,
|
|
35
|
+
PopoverTrigger: () => PopoverTrigger
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(popover_exports);
|
|
38
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
|
+
var React = __toESM(require("react"), 1);
|
|
40
|
+
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
41
|
+
var import_cn = require("../utils/cn.js");
|
|
42
|
+
const Popover = PopoverPrimitive.Root;
|
|
43
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
44
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
45
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
PopoverPrimitive.Content,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
align,
|
|
50
|
+
sideOffset,
|
|
51
|
+
className: (0, import_cn.cn)(
|
|
52
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
53
|
+
className
|
|
54
|
+
),
|
|
55
|
+
...props
|
|
56
|
+
}
|
|
57
|
+
) }));
|
|
58
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
Popover,
|
|
62
|
+
PopoverAnchor,
|
|
63
|
+
PopoverContent,
|
|
64
|
+
PopoverTrigger
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=popover.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBI;AAhBJ,YAAuB;AACvB,uBAAkC;AAElC,gBAAmB;AAEnB,MAAM,UAAU,iBAAiB;AAEjC,MAAM,iBAAiB,iBAAiB;AAExC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,iBAAiB,MAAM,WAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,4CAAC,iBAAiB,QAAjB,EACC;AAAA,EAAC,iBAAiB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAAc,iBAAiB,QAAQ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
|
|
4
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
5
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
|
|
4
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
5
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { cn } from "../utils/cn.js";
|
|
6
|
+
const Popover = PopoverPrimitive.Root;
|
|
7
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
9
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
10
|
+
PopoverPrimitive.Content,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
align,
|
|
14
|
+
sideOffset,
|
|
15
|
+
className: cn(
|
|
16
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
) }));
|
|
22
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
23
|
+
export {
|
|
24
|
+
Popover,
|
|
25
|
+
PopoverAnchor,
|
|
26
|
+
PopoverContent,
|
|
27
|
+
PopoverTrigger
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst Popover = PopoverPrimitive.Root;\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\n\nconst PopoverAnchor = PopoverPrimitive.Anchor;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"mappings":";AAkBI;AAhBJ,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAElC,SAAS,UAAU;AAEnB,MAAM,UAAU,iBAAiB;AAEjC,MAAM,iBAAiB,iBAAiB;AAExC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,iBAAiB,MAAM,WAG3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oBAAC,iBAAiB,QAAjB,EACC;AAAA,EAAC,iBAAiB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAAc,iBAAiB,QAAQ;","names":[]}
|
|
@@ -41,7 +41,7 @@ function PortfolioHeader({
|
|
|
41
41
|
score,
|
|
42
42
|
className
|
|
43
43
|
}) {
|
|
44
|
-
const scoreChip = score && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-full bg-gradient-to-r from-brand-
|
|
44
|
+
const scoreChip = score && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-full bg-gradient-to-r from-brand-purple to-brand-orange px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap text-white", children: [
|
|
45
45
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-bold", children: score.levelName }),
|
|
46
46
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs font-medium text-white/80 tabular-nums", children: [
|
|
47
47
|
score.totalXp.toLocaleString(),
|