@kumix/ui 0.3.3 → 0.3.4
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/motion/checkbox.d.ts +3 -1
- package/dist/components/motion/checkbox.d.ts.map +1 -1
- package/dist/components/motion/checkbox.js +2 -1
- package/dist/components/motion/checkbox.js.map +1 -1
- package/dist/components/motion/signup-form.d.ts +56 -0
- package/dist/components/motion/signup-form.d.ts.map +1 -0
- package/dist/components/motion/signup-form.js +337 -0
- package/dist/components/motion/signup-form.js.map +1 -0
- package/dist/components/reui/alert.d.ts +1 -1
- package/dist/components/reui/autocomplete.d.ts +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/data-grid/data-grid-column-filter.js +2 -2
- package/dist/components/reui/date-selector.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-month-view.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/filters.js +3 -3
- package/dist/components/reui/frame.d.ts +2 -2
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-view.js +3 -3
- package/dist/components/reui/icon-tile.d.ts +1 -1
- package/dist/components/reui/number-field.d.ts +3 -3
- package/dist/components/reui/phone-input.js +1 -1
- package/dist/components/reui/rating.d.ts +1 -1
- package/dist/components/ui/attachment.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/item.d.ts +3 -3
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts +2 -2
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/toggle.d.ts +2 -2
- package/package.json +7 -7
|
@@ -8,8 +8,10 @@ interface CheckboxProps {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
id?: string;
|
|
10
10
|
"aria-label"?: string;
|
|
11
|
+
/** Associates an external message (e.g. a form error) with the control. */
|
|
12
|
+
"aria-describedby"?: string;
|
|
11
13
|
}
|
|
12
|
-
declare function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, className, id: idProp, "aria-label": ariaLabel }: CheckboxProps): import("react").JSX.Element;
|
|
14
|
+
declare function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, className, id: idProp, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy }: CheckboxProps): import("react").JSX.Element;
|
|
13
15
|
//#endregion
|
|
14
16
|
export { Checkbox, CheckboxProps };
|
|
15
17
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../../src/components/motion/checkbox.tsx"],"mappings":";UAWiB;EACf;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;;iBAGc,WACd,SACA,iBACA,UACA,eACA,OACA,WACA,IAAI,sBACU,
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","names":[],"sources":["../../../src/components/motion/checkbox.tsx"],"mappings":";UAWiB;EACf;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;;EAEA;;iBAGc,WACd,SACA,iBACA,UACA,eACA,OACA,WACA,IAAI,sBACU,+BACM,mBACnB,gCAAa,IAAA"}
|
|
@@ -7,7 +7,7 @@ import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
|
7
7
|
//#region src/components/motion/checkbox.tsx
|
|
8
8
|
const CHECK_PATH = "M5 13l4 4L19 7";
|
|
9
9
|
const INDETERMINATE_PATH = "M6 12h12";
|
|
10
|
-
function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, className, id: idProp, "aria-label": ariaLabel }) {
|
|
10
|
+
function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, className, id: idProp, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy }) {
|
|
11
11
|
const autoId = useId();
|
|
12
12
|
const id = idProp ?? autoId;
|
|
13
13
|
const reduce = useReducedMotion();
|
|
@@ -22,6 +22,7 @@ function Checkbox({ checked, onCheckedChange, disabled, indeterminate, label, cl
|
|
|
22
22
|
role: "checkbox",
|
|
23
23
|
"aria-checked": indeterminate ? "mixed" : checked,
|
|
24
24
|
"aria-label": ariaLabel,
|
|
25
|
+
"aria-describedby": ariaDescribedBy,
|
|
25
26
|
disabled,
|
|
26
27
|
onClick: () => !disabled && onCheckedChange(!checked),
|
|
27
28
|
whileTap: reduce || disabled ? void 0 : { scale: .92 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","names":[],"sources":["../../../src/components/motion/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { useId } from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT, SPRING_PRESS } from \"../../lib/ease\";\n\nconst CHECK_PATH = \"M5 13l4 4L19 7\";\nconst INDETERMINATE_PATH = \"M6 12h12\";\n\nexport interface CheckboxProps {\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n disabled?: boolean;\n indeterminate?: boolean;\n label?: string;\n className?: string;\n id?: string;\n \"aria-label\"?: string;\n}\n\nexport function Checkbox({\n checked,\n onCheckedChange,\n disabled,\n indeterminate,\n label,\n className,\n id: idProp,\n \"aria-label\": ariaLabel,\n}: CheckboxProps) {\n const autoId = useId();\n const id = idProp ?? autoId;\n const reduce = useReducedMotion();\n const showMark = checked || indeterminate;\n const path = indeterminate ? INDETERMINATE_PATH : CHECK_PATH;\n\n return (\n <label\n htmlFor={id}\n className={cn(\n \"inline-flex items-center gap-3\",\n disabled ? \"cursor-not-allowed\" : \"cursor-pointer\",\n className,\n )}\n >\n <motion.button\n id={id}\n type=\"button\"\n role=\"checkbox\"\n aria-checked={indeterminate ? \"mixed\" : checked}\n aria-label={ariaLabel}\n disabled={disabled}\n onClick={() => !disabled && onCheckedChange(!checked)}\n whileTap={reduce || disabled ? undefined : { scale: 0.92 }}\n transition={SPRING_PRESS}\n data-state={checked ? \"checked\" : indeterminate ? \"indeterminate\" : \"unchecked\"}\n className={cn(\n \"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md border-2 outline-none transition-colors duration-200\",\n \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-60\",\n showMark\n ? \"border-primary bg-primary text-primary-foreground\"\n : \"border-muted-foreground/50 bg-background hover:border-muted-foreground\",\n )}\n >\n <AnimatePresence initial={false}>\n {showMark ? (\n <motion.svg\n key={indeterminate ? \"indeterminate\" : \"checked\"}\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n initial={reduce ? { opacity: 1 } : { opacity: 0, scale: 0.5 }}\n animate={reduce ? { opacity: 1 } : { opacity: 1, scale: 1 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5, filter: \"blur(4px)\" }}\n transition={reduce ? { duration: 0 } : { duration: 0.16, ease: EASE_OUT }}\n aria-hidden\n >\n <title>{indeterminate ? \"Partially selected\" : \"Selected\"}</title>\n <motion.path\n d={path}\n initial={reduce ? { pathLength: 1 } : { pathLength: 0 }}\n animate={{ pathLength: 1 }}\n transition={\n reduce\n ? { duration: 0 }\n : {\n duration: indeterminate ? 0.2 : 0.3,\n ease: EASE_OUT,\n delay: 0.04,\n }\n }\n />\n </motion.svg>\n ) : null}\n </AnimatePresence>\n </motion.button>\n {label ? (\n <span className={cn(\"select-none text-foreground text-sm\", disabled && \"opacity-60\")}>\n {label}\n </span>\n ) : null}\n </label>\n );\n}\n"],"mappings":";;;;;;;AAQA,MAAM,aAAa;AACnB,MAAM,qBAAqB;
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":[],"sources":["../../../src/components/motion/checkbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { useId } from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT, SPRING_PRESS } from \"../../lib/ease\";\n\nconst CHECK_PATH = \"M5 13l4 4L19 7\";\nconst INDETERMINATE_PATH = \"M6 12h12\";\n\nexport interface CheckboxProps {\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n disabled?: boolean;\n indeterminate?: boolean;\n label?: string;\n className?: string;\n id?: string;\n \"aria-label\"?: string;\n /** Associates an external message (e.g. a form error) with the control. */\n \"aria-describedby\"?: string;\n}\n\nexport function Checkbox({\n checked,\n onCheckedChange,\n disabled,\n indeterminate,\n label,\n className,\n id: idProp,\n \"aria-label\": ariaLabel,\n \"aria-describedby\": ariaDescribedBy,\n}: CheckboxProps) {\n const autoId = useId();\n const id = idProp ?? autoId;\n const reduce = useReducedMotion();\n const showMark = checked || indeterminate;\n const path = indeterminate ? INDETERMINATE_PATH : CHECK_PATH;\n\n return (\n <label\n htmlFor={id}\n className={cn(\n \"inline-flex items-center gap-3\",\n disabled ? \"cursor-not-allowed\" : \"cursor-pointer\",\n className,\n )}\n >\n <motion.button\n id={id}\n type=\"button\"\n role=\"checkbox\"\n aria-checked={indeterminate ? \"mixed\" : checked}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedBy}\n disabled={disabled}\n onClick={() => !disabled && onCheckedChange(!checked)}\n whileTap={reduce || disabled ? undefined : { scale: 0.92 }}\n transition={SPRING_PRESS}\n data-state={checked ? \"checked\" : indeterminate ? \"indeterminate\" : \"unchecked\"}\n className={cn(\n \"inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-md border-2 outline-none transition-colors duration-200\",\n \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-60\",\n showMark\n ? \"border-primary bg-primary text-primary-foreground\"\n : \"border-muted-foreground/50 bg-background hover:border-muted-foreground\",\n )}\n >\n <AnimatePresence initial={false}>\n {showMark ? (\n <motion.svg\n key={indeterminate ? \"indeterminate\" : \"checked\"}\n width=\"12\"\n height=\"12\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n initial={reduce ? { opacity: 1 } : { opacity: 0, scale: 0.5 }}\n animate={reduce ? { opacity: 1 } : { opacity: 1, scale: 1 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5, filter: \"blur(4px)\" }}\n transition={reduce ? { duration: 0 } : { duration: 0.16, ease: EASE_OUT }}\n aria-hidden\n >\n <title>{indeterminate ? \"Partially selected\" : \"Selected\"}</title>\n <motion.path\n d={path}\n initial={reduce ? { pathLength: 1 } : { pathLength: 0 }}\n animate={{ pathLength: 1 }}\n transition={\n reduce\n ? { duration: 0 }\n : {\n duration: indeterminate ? 0.2 : 0.3,\n ease: EASE_OUT,\n delay: 0.04,\n }\n }\n />\n </motion.svg>\n ) : null}\n </AnimatePresence>\n </motion.button>\n {label ? (\n <span className={cn(\"select-none text-foreground text-sm\", disabled && \"opacity-60\")}>\n {label}\n </span>\n ) : null}\n </label>\n );\n}\n"],"mappings":";;;;;;;AAQA,MAAM,aAAa;AACnB,MAAM,qBAAqB;AAe3B,SAAgB,SAAS,EACvB,SACA,iBACA,UACA,eACA,OACA,WACA,IAAI,QACJ,cAAc,WACd,oBAAoB,mBACJ;CAChB,MAAM,SAAS,MAAM;CACrB,MAAM,KAAK,UAAU;CACrB,MAAM,SAAS,iBAAiB;CAChC,MAAM,WAAW,WAAW;CAC5B,MAAM,OAAO,gBAAgB,qBAAqB;CAElD,OACE,qBAAC,SAAD;EACE,SAAS;EACT,WAAW,GACT,kCACA,WAAW,uBAAuB,kBAClC,SACF;EANF,UAAA,CAQE,oBAAC,OAAO,QAAR;GACM;GACJ,MAAK;GACL,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
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/motion/signup-form.d.ts
|
|
3
|
+
type SignUpStatus = "idle" | "loading" | "success" | "error";
|
|
4
|
+
type SignUpValues = {
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
confirmPassword: string;
|
|
9
|
+
terms: boolean;
|
|
10
|
+
};
|
|
11
|
+
type SignUpErrors = Partial<Record<keyof SignUpValues, string>>;
|
|
12
|
+
type SignUpFormClassNames = {
|
|
13
|
+
root?: string;
|
|
14
|
+
header?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
fields?: string;
|
|
18
|
+
strength?: string;
|
|
19
|
+
terms?: string;
|
|
20
|
+
submit?: string;
|
|
21
|
+
footer?: string;
|
|
22
|
+
};
|
|
23
|
+
interface SignUpFormProps {
|
|
24
|
+
/** Controlled values. Omit for uncontrolled. */
|
|
25
|
+
values?: SignUpValues;
|
|
26
|
+
defaultValues?: Partial<SignUpValues>;
|
|
27
|
+
onValuesChange?: (values: SignUpValues) => void;
|
|
28
|
+
/** Called with valid values only. Return a promise to drive the button state. */
|
|
29
|
+
onSubmit?: (values: SignUpValues) => void | Promise<void>;
|
|
30
|
+
/** Replace the built-in rules — return a message per invalid field. */
|
|
31
|
+
validate?: (values: SignUpValues) => SignUpErrors;
|
|
32
|
+
/** Controlled submit state. Omit to let the form track it. */
|
|
33
|
+
status?: SignUpStatus;
|
|
34
|
+
/** Form-level failure message, shown above the submit button. */
|
|
35
|
+
errorMessage?: string;
|
|
36
|
+
title?: ReactNode;
|
|
37
|
+
description?: ReactNode;
|
|
38
|
+
submitLabel?: string;
|
|
39
|
+
footer?: ReactNode;
|
|
40
|
+
/** Show the password strength meter. */
|
|
41
|
+
strengthMeter?: boolean;
|
|
42
|
+
className?: string;
|
|
43
|
+
classNames?: SignUpFormClassNames;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Length-weighted strength score, 0-4. NIST SP 800-63B advises against
|
|
47
|
+
* composition requirements and treats length as the dominant factor, so extra
|
|
48
|
+
* character classes only nudge the score — they can't rescue a short password.
|
|
49
|
+
* This is a heuristic for feedback, not entropy estimation; pair it with a
|
|
50
|
+
* breach-list check server-side for anything real.
|
|
51
|
+
*/
|
|
52
|
+
declare function passwordStrength(password: string): number;
|
|
53
|
+
declare function SignUpForm({ values: valuesProp, defaultValues, onValuesChange, onSubmit, validate, status: statusProp, errorMessage, title, description, submitLabel, footer, strengthMeter, className, classNames }: SignUpFormProps): import("react").JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { SignUpErrors, SignUpForm, SignUpFormClassNames, SignUpFormProps, SignUpStatus, SignUpValues, passwordStrength };
|
|
56
|
+
//# sourceMappingURL=signup-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-form.d.ts","names":[],"sources":["../../../src/components/motion/signup-form.tsx"],"mappings":";;KAYY;KAEA;EACV;EACA;EACA;EACA;EACA;;KAGU,eAAe,QAAQ,aAAa;KAEpC;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;;EAEf,SAAS;EACT,gBAAgB,QAAQ;EACxB,kBAAkB,QAAQ;;EAE1B,YAAY,QAAQ,wBAAwB;;EAE5C,YAAY,QAAQ,iBAAiB;;EAErC,SAAS;;EAET;EACA,QAAQ;EACR,cAAc;EACd;EACA,SAAS;;EAET;EACA;EACA,aAAa;;;;;;;;;iBAkCC,iBAAiB;iBA+CjB,aACd,QAAQ,YACR,eACA,gBACA,UACA,UACA,QAAQ,YACR,cACA,OACA,aACA,aACA,QACA,eACA,WACA,cACC,kCAAe,IAAA"}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { EASE_OUT, SPRING_LAYOUT } from "../../lib/ease.js";
|
|
3
|
+
import { StatefulButton } from "./button/stateful.js";
|
|
4
|
+
import "./button/index.js";
|
|
5
|
+
import { Checkbox } from "./checkbox.js";
|
|
6
|
+
import { Input } from "./input.js";
|
|
7
|
+
import { useCallback, useId, useMemo, useState } from "react";
|
|
8
|
+
import { cn } from "@kumix/utils";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
11
|
+
import { Eye, EyeOff, Lock, Mail, User } from "lucide-react";
|
|
12
|
+
//#region src/components/motion/signup-form.tsx
|
|
13
|
+
const EMPTY_VALUES = {
|
|
14
|
+
name: "",
|
|
15
|
+
email: "",
|
|
16
|
+
password: "",
|
|
17
|
+
confirmPassword: "",
|
|
18
|
+
terms: false
|
|
19
|
+
};
|
|
20
|
+
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
21
|
+
const MIN_PASSWORD_LENGTH = 8;
|
|
22
|
+
const STRENGTH_LABELS = [
|
|
23
|
+
"Too short",
|
|
24
|
+
"Weak",
|
|
25
|
+
"Fair",
|
|
26
|
+
"Good",
|
|
27
|
+
"Strong"
|
|
28
|
+
];
|
|
29
|
+
const STRENGTH_COLORS = [
|
|
30
|
+
"bg-destructive",
|
|
31
|
+
"bg-destructive",
|
|
32
|
+
"bg-amber-500",
|
|
33
|
+
"bg-amber-400",
|
|
34
|
+
"bg-(--color-success)"
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* Length-weighted strength score, 0-4. NIST SP 800-63B advises against
|
|
38
|
+
* composition requirements and treats length as the dominant factor, so extra
|
|
39
|
+
* character classes only nudge the score — they can't rescue a short password.
|
|
40
|
+
* This is a heuristic for feedback, not entropy estimation; pair it with a
|
|
41
|
+
* breach-list check server-side for anything real.
|
|
42
|
+
*/
|
|
43
|
+
function passwordStrength(password) {
|
|
44
|
+
if (password.length < MIN_PASSWORD_LENGTH) return 0;
|
|
45
|
+
let score = 1;
|
|
46
|
+
if (password.length >= 12) score += 1;
|
|
47
|
+
if (password.length >= 16) score += 1;
|
|
48
|
+
if ([
|
|
49
|
+
/[a-z]/,
|
|
50
|
+
/[A-Z]/,
|
|
51
|
+
/\d/,
|
|
52
|
+
/[^A-Za-z0-9]/
|
|
53
|
+
].filter((pattern) => pattern.test(password)).length >= 3) score += 1;
|
|
54
|
+
return Math.min(score, 4);
|
|
55
|
+
}
|
|
56
|
+
function defaultValidate(values) {
|
|
57
|
+
const errors = {};
|
|
58
|
+
if (!values.name.trim()) errors.name = "Enter your name.";
|
|
59
|
+
if (!values.email.trim()) errors.email = "Enter your email.";
|
|
60
|
+
else if (!EMAIL_PATTERN.test(values.email)) errors.email = "That doesn't look like an email address.";
|
|
61
|
+
if (!values.password) errors.password = "Choose a password.";
|
|
62
|
+
else if (values.password.length < MIN_PASSWORD_LENGTH) errors.password = `Use at least ${MIN_PASSWORD_LENGTH} characters.`;
|
|
63
|
+
if (!values.confirmPassword) errors.confirmPassword = "Confirm your password.";
|
|
64
|
+
else if (values.confirmPassword !== values.password) errors.confirmPassword = "Passwords don't match.";
|
|
65
|
+
if (!values.terms) errors.terms = "Accept the terms to continue.";
|
|
66
|
+
return errors;
|
|
67
|
+
}
|
|
68
|
+
function SignUpForm({ values: valuesProp, defaultValues, onValuesChange, onSubmit, validate, status: statusProp, errorMessage, title = "Create your account", description = "Start building in under a minute.", submitLabel = "Create account", footer, strengthMeter = true, className, classNames }) {
|
|
69
|
+
const reduce = useReducedMotion();
|
|
70
|
+
const baseId = useId();
|
|
71
|
+
const controlled = valuesProp !== void 0;
|
|
72
|
+
const [internalValues, setInternalValues] = useState({
|
|
73
|
+
...EMPTY_VALUES,
|
|
74
|
+
...defaultValues
|
|
75
|
+
});
|
|
76
|
+
const values = controlled ? valuesProp : internalValues;
|
|
77
|
+
const [internalStatus, setInternalStatus] = useState("idle");
|
|
78
|
+
const status = statusProp ?? internalStatus;
|
|
79
|
+
const [revealPassword, setRevealPassword] = useState(false);
|
|
80
|
+
const [touched, setTouched] = useState({});
|
|
81
|
+
const errors = useMemo(() => (validate ?? defaultValidate)(values), [values, validate]);
|
|
82
|
+
const setValue = useCallback((key, next) => {
|
|
83
|
+
const nextValues = {
|
|
84
|
+
...values,
|
|
85
|
+
[key]: next
|
|
86
|
+
};
|
|
87
|
+
if (!controlled) {
|
|
88
|
+
setInternalValues(nextValues);
|
|
89
|
+
if (statusProp === void 0) setInternalStatus((current) => current === "success" || current === "error" ? "idle" : current);
|
|
90
|
+
}
|
|
91
|
+
onValuesChange?.(nextValues);
|
|
92
|
+
}, [
|
|
93
|
+
controlled,
|
|
94
|
+
onValuesChange,
|
|
95
|
+
statusProp,
|
|
96
|
+
values
|
|
97
|
+
]);
|
|
98
|
+
const touch = useCallback((key) => {
|
|
99
|
+
setTouched((prev) => prev[key] ? prev : {
|
|
100
|
+
...prev,
|
|
101
|
+
[key]: true
|
|
102
|
+
});
|
|
103
|
+
}, []);
|
|
104
|
+
/** Error to render for a field — hidden until the field has been touched. */
|
|
105
|
+
const shownError = (key) => touched[key] ? errors[key] : void 0;
|
|
106
|
+
/** Success check draws only once a touched field is non-empty and valid. */
|
|
107
|
+
const isValid = (key) => Boolean(touched[key]) && !errors[key] && Boolean(values[key]);
|
|
108
|
+
const strength = passwordStrength(values.password);
|
|
109
|
+
const showStrength = strengthMeter && values.password.length > 0;
|
|
110
|
+
const isSubmitting = status === "loading";
|
|
111
|
+
const handleSubmit = async (event) => {
|
|
112
|
+
event.preventDefault();
|
|
113
|
+
setTouched({
|
|
114
|
+
name: true,
|
|
115
|
+
email: true,
|
|
116
|
+
password: true,
|
|
117
|
+
confirmPassword: true,
|
|
118
|
+
terms: true
|
|
119
|
+
});
|
|
120
|
+
if (Object.keys(errors).length > 0) return;
|
|
121
|
+
if (!onSubmit) return;
|
|
122
|
+
if (statusProp === void 0) setInternalStatus("loading");
|
|
123
|
+
try {
|
|
124
|
+
await onSubmit(values);
|
|
125
|
+
if (statusProp === void 0) setInternalStatus("success");
|
|
126
|
+
} catch {
|
|
127
|
+
if (statusProp === void 0) setInternalStatus("error");
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const termsErrorId = `${baseId}-terms-error`;
|
|
131
|
+
const formErrorId = `${baseId}-form-error`;
|
|
132
|
+
return /* @__PURE__ */ jsxs("form", {
|
|
133
|
+
noValidate: true,
|
|
134
|
+
onSubmit: handleSubmit,
|
|
135
|
+
className: cn("flex w-full max-w-sm flex-col gap-5 rounded-3xl border border-border p-6", className, classNames?.root),
|
|
136
|
+
children: [
|
|
137
|
+
title || description ? /* @__PURE__ */ jsxs("div", {
|
|
138
|
+
className: cn("flex flex-col gap-1", classNames?.header),
|
|
139
|
+
children: [title ? /* @__PURE__ */ jsx("h2", {
|
|
140
|
+
className: cn("font-semibold text-foreground text-xl tracking-tight", classNames?.title),
|
|
141
|
+
children: title
|
|
142
|
+
}) : null, description ? /* @__PURE__ */ jsx("p", {
|
|
143
|
+
className: cn("text-muted-foreground text-sm", classNames?.description),
|
|
144
|
+
children: description
|
|
145
|
+
}) : null]
|
|
146
|
+
}) : null,
|
|
147
|
+
/* @__PURE__ */ jsxs("div", {
|
|
148
|
+
className: cn("flex flex-col gap-4", classNames?.fields),
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ jsx(Input, {
|
|
151
|
+
label: "Name",
|
|
152
|
+
autoComplete: "name",
|
|
153
|
+
placeholder: "Ada Lovelace",
|
|
154
|
+
leftIcon: /* @__PURE__ */ jsx(User, {}),
|
|
155
|
+
disabled: isSubmitting,
|
|
156
|
+
value: values.name,
|
|
157
|
+
onChange: (next) => setValue("name", next),
|
|
158
|
+
onBlur: () => touch("name"),
|
|
159
|
+
error: shownError("name"),
|
|
160
|
+
success: isValid("name")
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ jsx(Input, {
|
|
163
|
+
label: "Email",
|
|
164
|
+
type: "email",
|
|
165
|
+
inputMode: "email",
|
|
166
|
+
autoComplete: "email",
|
|
167
|
+
placeholder: "you@example.com",
|
|
168
|
+
leftIcon: /* @__PURE__ */ jsx(Mail, {}),
|
|
169
|
+
disabled: isSubmitting,
|
|
170
|
+
value: values.email,
|
|
171
|
+
onChange: (next) => setValue("email", next),
|
|
172
|
+
onBlur: () => touch("email"),
|
|
173
|
+
error: shownError("email"),
|
|
174
|
+
success: isValid("email")
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ jsxs("div", {
|
|
177
|
+
className: "flex flex-col gap-2",
|
|
178
|
+
children: [/* @__PURE__ */ jsx(Input, {
|
|
179
|
+
label: "Password",
|
|
180
|
+
type: revealPassword ? "text" : "password",
|
|
181
|
+
autoComplete: "new-password",
|
|
182
|
+
placeholder: "At least 8 characters",
|
|
183
|
+
leftIcon: /* @__PURE__ */ jsx(Lock, {}),
|
|
184
|
+
rightIcon: /* @__PURE__ */ jsx("button", {
|
|
185
|
+
type: "button",
|
|
186
|
+
disabled: isSubmitting,
|
|
187
|
+
onClick: () => setRevealPassword((prev) => !prev),
|
|
188
|
+
"aria-label": revealPassword ? "Hide password" : "Show password",
|
|
189
|
+
className: "text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:text-foreground",
|
|
190
|
+
children: revealPassword ? /* @__PURE__ */ jsx(EyeOff, {}) : /* @__PURE__ */ jsx(Eye, {})
|
|
191
|
+
}),
|
|
192
|
+
disabled: isSubmitting,
|
|
193
|
+
value: values.password,
|
|
194
|
+
onChange: (next) => setValue("password", next),
|
|
195
|
+
onBlur: () => touch("password"),
|
|
196
|
+
error: shownError("password")
|
|
197
|
+
}), /* @__PURE__ */ jsx(AnimatePresence, {
|
|
198
|
+
initial: false,
|
|
199
|
+
children: showStrength ? /* @__PURE__ */ jsxs(motion.div, {
|
|
200
|
+
initial: reduce ? { opacity: 0 } : {
|
|
201
|
+
opacity: 0,
|
|
202
|
+
y: -4
|
|
203
|
+
},
|
|
204
|
+
animate: {
|
|
205
|
+
opacity: 1,
|
|
206
|
+
y: 0
|
|
207
|
+
},
|
|
208
|
+
exit: reduce ? { opacity: 0 } : {
|
|
209
|
+
opacity: 0,
|
|
210
|
+
y: -4
|
|
211
|
+
},
|
|
212
|
+
transition: {
|
|
213
|
+
duration: .18,
|
|
214
|
+
ease: EASE_OUT
|
|
215
|
+
},
|
|
216
|
+
className: cn("flex flex-col gap-1.5 px-1", classNames?.strength),
|
|
217
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
218
|
+
className: "flex gap-1.5",
|
|
219
|
+
"aria-hidden": true,
|
|
220
|
+
children: [
|
|
221
|
+
0,
|
|
222
|
+
1,
|
|
223
|
+
2,
|
|
224
|
+
3
|
|
225
|
+
].map((index) => /* @__PURE__ */ jsx("span", {
|
|
226
|
+
className: "h-1 flex-1 overflow-hidden rounded-full bg-muted-foreground/20",
|
|
227
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
228
|
+
initial: false,
|
|
229
|
+
animate: { scaleX: index < strength ? 1 : 0 },
|
|
230
|
+
transition: reduce ? { duration: 0 } : SPRING_LAYOUT,
|
|
231
|
+
className: cn("block h-full w-full origin-left rounded-full", STRENGTH_COLORS[strength])
|
|
232
|
+
})
|
|
233
|
+
}, index))
|
|
234
|
+
}), /* @__PURE__ */ jsxs("p", {
|
|
235
|
+
"aria-live": "polite",
|
|
236
|
+
className: "text-muted-foreground text-xs",
|
|
237
|
+
children: ["Password strength: ", STRENGTH_LABELS[strength]]
|
|
238
|
+
})]
|
|
239
|
+
}) : null
|
|
240
|
+
})]
|
|
241
|
+
}),
|
|
242
|
+
/* @__PURE__ */ jsx(Input, {
|
|
243
|
+
label: "Confirm password",
|
|
244
|
+
type: revealPassword ? "text" : "password",
|
|
245
|
+
autoComplete: "new-password",
|
|
246
|
+
placeholder: "Re-enter your password",
|
|
247
|
+
leftIcon: /* @__PURE__ */ jsx(Lock, {}),
|
|
248
|
+
disabled: isSubmitting,
|
|
249
|
+
value: values.confirmPassword,
|
|
250
|
+
onChange: (next) => setValue("confirmPassword", next),
|
|
251
|
+
onBlur: () => touch("confirmPassword"),
|
|
252
|
+
error: shownError("confirmPassword"),
|
|
253
|
+
success: isValid("confirmPassword")
|
|
254
|
+
})
|
|
255
|
+
]
|
|
256
|
+
}),
|
|
257
|
+
/* @__PURE__ */ jsxs("div", {
|
|
258
|
+
className: cn("flex flex-col gap-1.5", classNames?.terms),
|
|
259
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
260
|
+
checked: values.terms,
|
|
261
|
+
disabled: isSubmitting,
|
|
262
|
+
onCheckedChange: (next) => {
|
|
263
|
+
setValue("terms", next);
|
|
264
|
+
touch("terms");
|
|
265
|
+
},
|
|
266
|
+
label: "I agree to the Terms and Privacy Policy",
|
|
267
|
+
"aria-describedby": shownError("terms") ? termsErrorId : void 0
|
|
268
|
+
}), /* @__PURE__ */ jsx(AnimatePresence, {
|
|
269
|
+
initial: false,
|
|
270
|
+
children: shownError("terms") ? /* @__PURE__ */ jsx(motion.p, {
|
|
271
|
+
id: termsErrorId,
|
|
272
|
+
role: "alert",
|
|
273
|
+
initial: reduce ? { opacity: 0 } : {
|
|
274
|
+
opacity: 0,
|
|
275
|
+
y: -4,
|
|
276
|
+
filter: "blur(4px)"
|
|
277
|
+
},
|
|
278
|
+
animate: {
|
|
279
|
+
opacity: 1,
|
|
280
|
+
y: 0,
|
|
281
|
+
filter: "blur(0px)"
|
|
282
|
+
},
|
|
283
|
+
exit: reduce ? { opacity: 0 } : {
|
|
284
|
+
opacity: 0,
|
|
285
|
+
y: -4,
|
|
286
|
+
filter: "blur(4px)"
|
|
287
|
+
},
|
|
288
|
+
transition: { duration: .2 },
|
|
289
|
+
className: "px-1 text-destructive text-xs",
|
|
290
|
+
children: shownError("terms")
|
|
291
|
+
}) : null
|
|
292
|
+
})]
|
|
293
|
+
}),
|
|
294
|
+
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
295
|
+
initial: false,
|
|
296
|
+
children: errorMessage ? /* @__PURE__ */ jsx(motion.p, {
|
|
297
|
+
id: formErrorId,
|
|
298
|
+
role: "alert",
|
|
299
|
+
initial: reduce ? { opacity: 0 } : {
|
|
300
|
+
opacity: 0,
|
|
301
|
+
y: -4
|
|
302
|
+
},
|
|
303
|
+
animate: {
|
|
304
|
+
opacity: 1,
|
|
305
|
+
y: 0
|
|
306
|
+
},
|
|
307
|
+
exit: reduce ? { opacity: 0 } : {
|
|
308
|
+
opacity: 0,
|
|
309
|
+
y: -4
|
|
310
|
+
},
|
|
311
|
+
transition: { duration: .2 },
|
|
312
|
+
className: "rounded-2xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-destructive text-xs",
|
|
313
|
+
children: errorMessage
|
|
314
|
+
}) : null
|
|
315
|
+
}),
|
|
316
|
+
/* @__PURE__ */ jsx(StatefulButton, {
|
|
317
|
+
type: "submit",
|
|
318
|
+
size: "lg",
|
|
319
|
+
state: status,
|
|
320
|
+
loadingText: "Creating account",
|
|
321
|
+
successText: "Account created",
|
|
322
|
+
errorText: "Try again",
|
|
323
|
+
"aria-describedby": errorMessage ? formErrorId : void 0,
|
|
324
|
+
className: cn("w-full", classNames?.submit),
|
|
325
|
+
children: submitLabel
|
|
326
|
+
}),
|
|
327
|
+
footer ? /* @__PURE__ */ jsx("div", {
|
|
328
|
+
className: cn("text-center text-muted-foreground text-sm", classNames?.footer),
|
|
329
|
+
children: footer
|
|
330
|
+
}) : null
|
|
331
|
+
]
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
export { SignUpForm, passwordStrength };
|
|
336
|
+
|
|
337
|
+
//# sourceMappingURL=signup-form.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signup-form.js","names":[],"sources":["../../../src/components/motion/signup-form.tsx"],"sourcesContent":["\"use client\";\n\nimport { type FormEvent, type ReactNode, useCallback, useId, useMemo, useState } from \"react\";\nimport { Eye, EyeOff, Lock, Mail, User } from \"lucide-react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\n\nimport { cn } from \"@kumix/utils\";\nimport { EASE_OUT, SPRING_LAYOUT } from \"../../lib/ease\";\nimport { StatefulButton } from \"./button\";\nimport { Checkbox } from \"./checkbox\";\nimport { Input } from \"./input\";\n\nexport type SignUpStatus = \"idle\" | \"loading\" | \"success\" | \"error\";\n\nexport type SignUpValues = {\n name: string;\n email: string;\n password: string;\n confirmPassword: string;\n terms: boolean;\n};\n\nexport type SignUpErrors = Partial<Record<keyof SignUpValues, string>>;\n\nexport type SignUpFormClassNames = {\n root?: string;\n header?: string;\n title?: string;\n description?: string;\n fields?: string;\n strength?: string;\n terms?: string;\n submit?: string;\n footer?: string;\n};\n\nexport interface SignUpFormProps {\n /** Controlled values. Omit for uncontrolled. */\n values?: SignUpValues;\n defaultValues?: Partial<SignUpValues>;\n onValuesChange?: (values: SignUpValues) => void;\n /** Called with valid values only. Return a promise to drive the button state. */\n onSubmit?: (values: SignUpValues) => void | Promise<void>;\n /** Replace the built-in rules — return a message per invalid field. */\n validate?: (values: SignUpValues) => SignUpErrors;\n /** Controlled submit state. Omit to let the form track it. */\n status?: SignUpStatus;\n /** Form-level failure message, shown above the submit button. */\n errorMessage?: string;\n title?: ReactNode;\n description?: ReactNode;\n submitLabel?: string;\n footer?: ReactNode;\n /** Show the password strength meter. */\n strengthMeter?: boolean;\n className?: string;\n classNames?: SignUpFormClassNames;\n}\n\nconst EMPTY_VALUES: SignUpValues = {\n name: \"\",\n email: \"\",\n password: \"\",\n confirmPassword: \"\",\n terms: false,\n};\n\n// Deliberately permissive. Full RFC 5322 matching is impractical in a regex and\n// rejects addresses that deliver fine; the only real check is sending mail.\nconst EMAIL_PATTERN = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\n\nconst MIN_PASSWORD_LENGTH = 8;\n\nconst STRENGTH_LABELS = [\"Too short\", \"Weak\", \"Fair\", \"Good\", \"Strong\"] as const;\n\nconst STRENGTH_COLORS = [\n \"bg-destructive\",\n \"bg-destructive\",\n \"bg-amber-500\",\n \"bg-amber-400\",\n \"bg-(--color-success)\",\n] as const;\n\n/**\n * Length-weighted strength score, 0-4. NIST SP 800-63B advises against\n * composition requirements and treats length as the dominant factor, so extra\n * character classes only nudge the score — they can't rescue a short password.\n * This is a heuristic for feedback, not entropy estimation; pair it with a\n * breach-list check server-side for anything real.\n */\nexport function passwordStrength(password: string): number {\n if (password.length < MIN_PASSWORD_LENGTH) return 0;\n\n let score = 1;\n if (password.length >= 12) score += 1;\n if (password.length >= 16) score += 1;\n\n const classes = [/[a-z]/, /[A-Z]/, /\\d/, /[^A-Za-z0-9]/].filter((pattern) =>\n pattern.test(password),\n ).length;\n if (classes >= 3) score += 1;\n\n return Math.min(score, 4);\n}\n\nfunction defaultValidate(values: SignUpValues): SignUpErrors {\n const errors: SignUpErrors = {};\n\n if (!values.name.trim()) {\n errors.name = \"Enter your name.\";\n }\n\n if (!values.email.trim()) {\n errors.email = \"Enter your email.\";\n } else if (!EMAIL_PATTERN.test(values.email)) {\n errors.email = \"That doesn't look like an email address.\";\n }\n\n if (!values.password) {\n errors.password = \"Choose a password.\";\n } else if (values.password.length < MIN_PASSWORD_LENGTH) {\n errors.password = `Use at least ${MIN_PASSWORD_LENGTH} characters.`;\n }\n\n if (!values.confirmPassword) {\n errors.confirmPassword = \"Confirm your password.\";\n } else if (values.confirmPassword !== values.password) {\n errors.confirmPassword = \"Passwords don't match.\";\n }\n\n if (!values.terms) {\n errors.terms = \"Accept the terms to continue.\";\n }\n\n return errors;\n}\n\nexport function SignUpForm({\n values: valuesProp,\n defaultValues,\n onValuesChange,\n onSubmit,\n validate,\n status: statusProp,\n errorMessage,\n title = \"Create your account\",\n description = \"Start building in under a minute.\",\n submitLabel = \"Create account\",\n footer,\n strengthMeter = true,\n className,\n classNames,\n}: SignUpFormProps) {\n const reduce = useReducedMotion();\n const baseId = useId();\n\n const controlled = valuesProp !== undefined;\n const [internalValues, setInternalValues] = useState<SignUpValues>({\n ...EMPTY_VALUES,\n ...defaultValues,\n });\n const values = controlled ? valuesProp : internalValues;\n\n const [internalStatus, setInternalStatus] = useState<SignUpStatus>(\"idle\");\n const status = statusProp ?? internalStatus;\n\n const [revealPassword, setRevealPassword] = useState(false);\n\n // \"Reward early, punish late\": errors are computed on every change, but a\n // field only *shows* its error once it has been blurred (or submit touched\n // everything). So a first entry is never flagged mid-typing, while a field\n // already in error clears the moment it becomes valid.\n const [touched, setTouched] = useState<Partial<Record<keyof SignUpValues, boolean>>>({});\n\n const errors = useMemo(() => (validate ?? defaultValidate)(values), [values, validate]);\n\n const setValue = useCallback(\n <K extends keyof SignUpValues>(key: K, next: SignUpValues[K]) => {\n const nextValues = { ...values, [key]: next };\n if (!controlled) {\n setInternalValues(nextValues);\n if (statusProp === undefined) {\n setInternalStatus((current) =>\n current === \"success\" || current === \"error\" ? \"idle\" : current,\n );\n }\n }\n onValuesChange?.(nextValues);\n },\n [controlled, onValuesChange, statusProp, values],\n );\n\n const touch = useCallback((key: keyof SignUpValues) => {\n setTouched((prev) => (prev[key] ? prev : { ...prev, [key]: true }));\n }, []);\n\n /** Error to render for a field — hidden until the field has been touched. */\n const shownError = (key: keyof SignUpValues) => (touched[key] ? errors[key] : undefined);\n\n /** Success check draws only once a touched field is non-empty and valid. */\n const isValid = (key: keyof SignUpValues) =>\n Boolean(touched[key]) && !errors[key] && Boolean(values[key]);\n\n const strength = passwordStrength(values.password);\n const showStrength = strengthMeter && values.password.length > 0;\n const isSubmitting = status === \"loading\";\n\n const handleSubmit = async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n\n setTouched({\n name: true,\n email: true,\n password: true,\n confirmPassword: true,\n terms: true,\n });\n\n if (Object.keys(errors).length > 0) return;\n if (!onSubmit) return;\n\n if (statusProp === undefined) setInternalStatus(\"loading\");\n try {\n await onSubmit(values);\n if (statusProp === undefined) setInternalStatus(\"success\");\n } catch {\n if (statusProp === undefined) setInternalStatus(\"error\");\n }\n };\n\n const termsErrorId = `${baseId}-terms-error`;\n const formErrorId = `${baseId}-form-error`;\n\n return (\n <form\n noValidate\n onSubmit={handleSubmit}\n className={cn(\n \"flex w-full max-w-sm flex-col gap-5 rounded-3xl border border-border p-6\",\n className,\n classNames?.root,\n )}\n >\n {title || description ? (\n <div className={cn(\"flex flex-col gap-1\", classNames?.header)}>\n {title ? (\n <h2\n className={cn(\n \"font-semibold text-foreground text-xl tracking-tight\",\n classNames?.title,\n )}\n >\n {title}\n </h2>\n ) : null}\n {description ? (\n <p className={cn(\"text-muted-foreground text-sm\", classNames?.description)}>\n {description}\n </p>\n ) : null}\n </div>\n ) : null}\n\n <div className={cn(\"flex flex-col gap-4\", classNames?.fields)}>\n <Input\n label=\"Name\"\n autoComplete=\"name\"\n placeholder=\"Ada Lovelace\"\n leftIcon={<User />}\n disabled={isSubmitting}\n value={values.name}\n onChange={(next) => setValue(\"name\", next)}\n onBlur={() => touch(\"name\")}\n error={shownError(\"name\")}\n success={isValid(\"name\")}\n />\n\n <Input\n label=\"Email\"\n type=\"email\"\n inputMode=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n leftIcon={<Mail />}\n disabled={isSubmitting}\n value={values.email}\n onChange={(next) => setValue(\"email\", next)}\n onBlur={() => touch(\"email\")}\n error={shownError(\"email\")}\n success={isValid(\"email\")}\n />\n\n <div className=\"flex flex-col gap-2\">\n <Input\n label=\"Password\"\n type={revealPassword ? \"text\" : \"password\"}\n autoComplete=\"new-password\"\n placeholder=\"At least 8 characters\"\n leftIcon={<Lock />}\n rightIcon={\n <button\n type=\"button\"\n disabled={isSubmitting}\n onClick={() => setRevealPassword((prev) => !prev)}\n aria-label={revealPassword ? \"Hide password\" : \"Show password\"}\n className=\"text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:text-foreground\"\n >\n {revealPassword ? <EyeOff /> : <Eye />}\n </button>\n }\n disabled={isSubmitting}\n value={values.password}\n onChange={(next) => setValue(\"password\", next)}\n onBlur={() => touch(\"password\")}\n error={shownError(\"password\")}\n />\n\n <AnimatePresence initial={false}>\n {showStrength ? (\n <motion.div\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: -4 }}\n animate={{ opacity: 1, y: 0 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -4 }}\n transition={{ duration: 0.18, ease: EASE_OUT }}\n className={cn(\"flex flex-col gap-1.5 px-1\", classNames?.strength)}\n >\n <div className=\"flex gap-1.5\" aria-hidden>\n {[0, 1, 2, 3].map((index) => (\n <span\n key={index}\n className=\"h-1 flex-1 overflow-hidden rounded-full bg-muted-foreground/20\"\n >\n {/* scaleX rather than width — transforms only, per the\n motion conventions, and it keeps the bar off layout. */}\n <motion.span\n initial={false}\n animate={{ scaleX: index < strength ? 1 : 0 }}\n transition={reduce ? { duration: 0 } : SPRING_LAYOUT}\n className={cn(\n \"block h-full w-full origin-left rounded-full\",\n STRENGTH_COLORS[strength],\n )}\n />\n </span>\n ))}\n </div>\n <p aria-live=\"polite\" className=\"text-muted-foreground text-xs\">\n Password strength: {STRENGTH_LABELS[strength]}\n </p>\n </motion.div>\n ) : null}\n </AnimatePresence>\n </div>\n\n <Input\n label=\"Confirm password\"\n type={revealPassword ? \"text\" : \"password\"}\n autoComplete=\"new-password\"\n placeholder=\"Re-enter your password\"\n leftIcon={<Lock />}\n disabled={isSubmitting}\n value={values.confirmPassword}\n onChange={(next) => setValue(\"confirmPassword\", next)}\n onBlur={() => touch(\"confirmPassword\")}\n error={shownError(\"confirmPassword\")}\n success={isValid(\"confirmPassword\")}\n />\n </div>\n\n <div className={cn(\"flex flex-col gap-1.5\", classNames?.terms)}>\n <Checkbox\n checked={values.terms}\n disabled={isSubmitting}\n onCheckedChange={(next) => {\n setValue(\"terms\", next);\n touch(\"terms\");\n }}\n label=\"I agree to the Terms and Privacy Policy\"\n aria-describedby={shownError(\"terms\") ? termsErrorId : undefined}\n />\n <AnimatePresence initial={false}>\n {shownError(\"terms\") ? (\n <motion.p\n id={termsErrorId}\n role=\"alert\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n animate={{ opacity: 1, y: 0, filter: \"blur(0px)\" }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -4, filter: \"blur(4px)\" }}\n transition={{ duration: 0.2 }}\n className=\"px-1 text-destructive text-xs\"\n >\n {shownError(\"terms\")}\n </motion.p>\n ) : null}\n </AnimatePresence>\n </div>\n\n <AnimatePresence initial={false}>\n {errorMessage ? (\n <motion.p\n id={formErrorId}\n role=\"alert\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, y: -4 }}\n animate={{ opacity: 1, y: 0 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, y: -4 }}\n transition={{ duration: 0.2 }}\n className=\"rounded-2xl border border-destructive/30 bg-destructive/10 px-3 py-2 text-destructive text-xs\"\n >\n {errorMessage}\n </motion.p>\n ) : null}\n </AnimatePresence>\n\n <StatefulButton\n type=\"submit\"\n size=\"lg\"\n state={status}\n loadingText=\"Creating account\"\n successText=\"Account created\"\n errorText=\"Try again\"\n aria-describedby={errorMessage ? formErrorId : undefined}\n className={cn(\"w-full\", classNames?.submit)}\n >\n {submitLabel}\n </StatefulButton>\n\n {footer ? (\n <div className={cn(\"text-center text-muted-foreground text-sm\", classNames?.footer)}>\n {footer}\n </div>\n ) : null}\n </form>\n );\n}\n"],"mappings":";;;;;;;;;;;;AA2DA,MAAM,eAA6B;CACjC,MAAM;CACN,OAAO;CACP,UAAU;CACV,iBAAiB;CACjB,OAAO;AACT;AAIA,MAAM,gBAAgB;AAEtB,MAAM,sBAAsB;AAE5B,MAAM,kBAAkB;CAAC;CAAa;CAAQ;CAAQ;CAAQ;AAAQ;AAEtE,MAAM,kBAAkB;CACtB;CACA;CACA;CACA;CACA;AACF;;;;;;;;AASA,SAAgB,iBAAiB,UAA0B;CACzD,IAAI,SAAS,SAAS,qBAAqB,OAAO;CAElD,IAAI,QAAQ;CACZ,IAAI,SAAS,UAAU,IAAI,SAAS;CACpC,IAAI,SAAS,UAAU,IAAI,SAAS;CAKpC,IAHgB;EAAC;EAAS;EAAS;EAAM;CAAc,CAAC,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G,6CAA6C,YAAY,MAAM;IAC/E,UAAA;GACE,CAAA,IACH;EACA;;AAEV"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
2
|
//#region src/components/reui/alert.d.ts
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
4
|
+
variant?: "success" | "default" | "destructive" | "info" | "warning" | "invert" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react").JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { Autocomplete as Autocomplete$1 } from "@base-ui/react/autocomplete";
|
|
3
3
|
//#region src/components/reui/autocomplete.d.ts
|
|
4
4
|
declare const inputVariants: (props?: ({
|
|
5
|
-
size?: "
|
|
5
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare const Autocomplete: typeof Autocomplete$1.Root;
|
|
8
8
|
declare function AutocompleteValue({ ...props }: Autocomplete$1.Value.Props): import("react").JSX.Element;
|
|
@@ -2,8 +2,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
//#region src/components/reui/badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "success" | "default" | "destructive" | "secondary" | "outline" | "info" | "warning" | "invert" | "focus" | "primary-light" | "warning-light" | "success-light" | "info-light" | "destructive-light" | "invert-light" | "focus-light" | "primary-outline" | "warning-outline" | "success-outline" | "info-outline" | "destructive-outline" | "invert-outline" | "focus-outline" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | "xs" | "xl" | null | undefined;
|
|
7
7
|
radius?: "default" | "full" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends useRender.ComponentProps<"span"> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "../../ui/button.js";
|
|
3
|
-
import { Badge } from "../badge.js";
|
|
4
|
-
import { Input } from "../../ui/input.js";
|
|
5
3
|
import { Separator } from "../../ui/separator.js";
|
|
4
|
+
import { Input } from "../../ui/input.js";
|
|
6
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
6
|
+
import { Badge } from "../badge.js";
|
|
7
7
|
import { useMemo, useState } from "react";
|
|
8
8
|
import { cn } from "@kumix/utils";
|
|
9
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
3
3
|
import { Button } from "../ui/button.js";
|
|
4
|
-
import { ScrollArea } from "../ui/scroll-area.js";
|
|
5
4
|
import { Calendar, CalendarDayButton } from "../ui/calendar.js";
|
|
6
5
|
import { Input } from "../ui/input.js";
|
|
6
|
+
import { ScrollArea } from "../ui/scroll-area.js";
|
|
7
7
|
import { Tabs, TabsList, TabsTrigger } from "../ui/tabs.js";
|
|
8
8
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState } from "react";
|
|
9
9
|
import { cn } from "@kumix/utils";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ScrollArea } from "../../ui/scroll-area.js";
|
|
3
2
|
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
3
|
+
import { ScrollArea } from "../../ui/scroll-area.js";
|
|
4
4
|
import { getDayKey, getRangeKey, resolveOffDay, toZoned, zonedStartOfDay } from "./event-calendar-lib.js";
|
|
5
5
|
import { EventCalendarViewContext, useEventCalendar, useEventCalendarDay, useEventCalendarSelector, useEventCalendarSettings, useEventCalendarViewConfig, useEventCalendarViewSettings, useEventCalendarWeek } from "./event-calendar.js";
|
|
6
6
|
import { useEventCalendarGestures, wasRecentChipPress, wasRecentDrag } from "./event-calendar-dnd.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Button } from "../../ui/button.js";
|
|
3
3
|
import { Calendar } from "../../ui/calendar.js";
|
|
4
4
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from "../../ui/dropdown-menu.js";
|
|
5
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
6
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
7
7
|
import { toZoned } from "./event-calendar-lib.js";
|
|
8
8
|
import { useEventCalendarNavigation, useEventCalendarSettings, useEventCalendarView, useEventCalendarViewConfig } from "./event-calendar.js";
|
|
9
9
|
import { useState } from "react";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use no memo";
|
|
3
3
|
import { Button } from "../ui/button.js";
|
|
4
|
-
import { ScrollArea } from "../ui/scroll-area.js";
|
|
5
|
-
import { Input } from "../ui/input.js";
|
|
6
4
|
import { ButtonGroup, ButtonGroupText } from "../ui/button-group.js";
|
|
7
|
-
import {
|
|
5
|
+
import { Input } from "../ui/input.js";
|
|
8
6
|
import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText } from "../ui/input-group.js";
|
|
7
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "../ui/dropdown-menu.js";
|
|
9
8
|
import { Kbd } from "../ui/kbd.js";
|
|
9
|
+
import { ScrollArea } from "../ui/scroll-area.js";
|
|
10
10
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../ui/tooltip.js";
|
|
11
11
|
import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
12
12
|
import { cn } from "@kumix/utils";
|
|
@@ -13,8 +13,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
13
13
|
* :not() or !important needed
|
|
14
14
|
*/
|
|
15
15
|
declare const frameVariants: (props?: ({
|
|
16
|
-
variant?: "
|
|
17
|
-
spacing?: "
|
|
16
|
+
variant?: "default" | "ghost" | "inverse" | null | undefined;
|
|
17
|
+
spacing?: "sm" | "default" | "lg" | "xs" | null | undefined;
|
|
18
18
|
stacked?: boolean | null | undefined;
|
|
19
19
|
dense?: boolean | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
3
2
|
import { ContextMenu, ContextMenuContent, ContextMenuTrigger } from "../../ui/context-menu.js";
|
|
3
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
4
4
|
import { flattenResources, toZoned } from "./gantt-lib.js";
|
|
5
5
|
import { useGantt, useGanttSelector, useGanttViewConfig } from "./gantt.js";
|
|
6
6
|
import { useGanttGestures, wasRecentDrag } from "./gantt-dnd.js";
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { Button } from "../../ui/button.js";
|
|
3
3
|
import { Calendar } from "../../ui/calendar.js";
|
|
4
4
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from "../../ui/dropdown-menu.js";
|
|
5
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
6
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../ui/popover.js";
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
7
7
|
import { toZoned } from "./gantt-lib.js";
|
|
8
8
|
import { useGanttNavigation, useGanttScale, useGanttSettings, useGanttViewConfig } from "./gantt.js";
|
|
9
9
|
import { useState } from "react";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "../../ui/button.js";
|
|
3
|
-
import { ScrollArea as ScrollArea$1, ScrollBar } from "../../ui/scroll-area.js";
|
|
4
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
5
3
|
import { Checkbox } from "../../ui/checkbox.js";
|
|
6
4
|
import { ContextMenu, ContextMenuContent, ContextMenuTrigger } from "../../ui/context-menu.js";
|
|
5
|
+
import { ScrollArea as ScrollArea$1, ScrollBar } from "../../ui/scroll-area.js";
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../ui/tooltip.js";
|
|
7
7
|
import { getDayKey, getLaneKey, getRangeKey, packTimedSegments, reorderResources, resolveOffDay, toZoned, zonedStartOfDay } from "./gantt-lib.js";
|
|
8
8
|
import { resolveScheduleMode, resolveTimelineLines, useGantt, useGanttSelector, useGanttSettings, useGanttViewConfig } from "./gantt.js";
|
|
9
9
|
import { cancelActiveGanttGestures, markGestureEnd, useGanttGestureTeardown, useGanttGestures, wasRecentDrag } from "./gantt-dnd.js";
|
|
@@ -12,9 +12,9 @@ import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useStat
|
|
|
12
12
|
import { cn } from "@kumix/utils";
|
|
13
13
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { ChevronLeftIcon, ChevronRightIcon, GripVerticalIcon, MinusIcon, PlusIcon } from "lucide-react";
|
|
15
|
-
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
16
15
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
17
16
|
import { useRender } from "@base-ui/react/use-render";
|
|
17
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
18
18
|
import { addDays, addMinutes, addMonths, format, getWeek, startOfMonth, startOfQuarter, startOfWeek } from "date-fns";
|
|
19
19
|
//#region src/components/reui/gantt/gantt-view.tsx
|
|
20
20
|
/** Current time, refreshed on an interval and on tab focus. */
|
|
@@ -23,7 +23,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
23
23
|
*/
|
|
24
24
|
declare const iconTileVariants: (props?: ({
|
|
25
25
|
variant?: "outline" | "soft" | "solid" | "elevated" | "frame" | null | undefined;
|
|
26
|
-
size?: "
|
|
26
|
+
size?: "sm" | "default" | "lg" | "xs" | "xl" | null | undefined;
|
|
27
27
|
radius?: "default" | "full" | null | undefined;
|
|
28
28
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
29
29
|
interface IconTileProps extends useRender.ComponentProps<"span"> {
|
|
@@ -3,13 +3,13 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { NumberField as NumberField$1 } from "@base-ui/react/number-field";
|
|
4
4
|
//#region src/components/reui/number-field.d.ts
|
|
5
5
|
declare const numberFieldGroupVariants: (props?: ({
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare const numberFieldButtonVariants: (props?: ({
|
|
9
|
-
size?: "
|
|
9
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
declare const numberFieldInputVariants: (props?: ({
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
declare function NumberField({ id, className, size, ...props }: NumberField$1.Root.Props & VariantProps<typeof numberFieldGroupVariants>): import("react").JSX.Element;
|
|
15
15
|
declare function NumberFieldGroup({ className, size: sizeProp, ...props }: NumberField$1.Group.Props & Partial<VariantProps<typeof numberFieldGroupVariants>>): import("react").JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button } from "../ui/button.js";
|
|
3
|
-
import { ScrollArea } from "../ui/scroll-area.js";
|
|
4
3
|
import { Input } from "../ui/input.js";
|
|
5
4
|
import { Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue } from "../ui/combobox.js";
|
|
5
|
+
import { ScrollArea } from "../ui/scroll-area.js";
|
|
6
6
|
import { createContext, useContext, useMemo, useState } from "react";
|
|
7
7
|
import { cn } from "@kumix/utils";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from "class-variance-authority";
|
|
2
2
|
//#region src/components/reui/rating.d.ts
|
|
3
3
|
declare const ratingVariants: (props?: ({
|
|
4
|
-
size?: "
|
|
4
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Rating({ rating, maxRating, size, className, starClassName, showValue, editable, onRatingChange, ...props }: React.ComponentProps<"div"> & VariantProps<typeof ratingVariants> & {
|
|
7
7
|
/**
|
|
@@ -4,7 +4,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
//#region src/components/ui/attachment.d.ts
|
|
6
6
|
declare const attachmentVariants: (props?: ({
|
|
7
|
-
size?: "
|
|
7
|
+
size?: "sm" | "default" | "xs" | null | undefined;
|
|
8
8
|
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
9
9
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
10
|
declare function Attachment({ className, state, size, orientation, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof attachmentVariants> & {
|
|
@@ -2,7 +2,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
3
|
//#region src/components/ui/badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
8
8
|
//#endregion
|
|
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
//#region src/components/ui/bubble.d.ts
|
|
5
5
|
declare function BubbleGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
6
6
|
declare const bubbleVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "ghost" | "muted" | "tinted" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
declare function Bubble({ variant, align, className, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof bubbleVariants> & {
|
|
10
10
|
align?: "start" | "end";
|
|
@@ -2,8 +2,8 @@ import { Button as Button$1 } from "@base-ui/react/button";
|
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
//#region src/components/ui/button.d.ts
|
|
4
4
|
declare const buttonVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "link" | "default" | "destructive" | "secondary" | "outline" | "ghost" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Button({ className, variant, size, ...props }: Button$1.Props & VariantProps<typeof buttonVariants>): import("react").JSX.Element;
|
|
9
9
|
//#endregion
|
|
@@ -6,12 +6,12 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
6
6
|
declare function ItemGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
7
7
|
declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): React$1.JSX.Element;
|
|
8
8
|
declare const itemVariants: (props?: ({
|
|
9
|
-
variant?: "
|
|
10
|
-
size?: "
|
|
9
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
10
|
+
size?: "sm" | "default" | "xs" | null | undefined;
|
|
11
11
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
12
|
declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
13
13
|
declare const itemMediaVariants: (props?: ({
|
|
14
|
-
variant?: "
|
|
14
|
+
variant?: "image" | "default" | "icon" | null | undefined;
|
|
15
15
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
16
|
declare function ItemMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React$1.JSX.Element;
|
|
17
17
|
declare function ItemContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/ui/marker.d.ts
|
|
5
5
|
declare const markerVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "separator" | "default" | "border" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
9
9
|
declare function MarkerIcon({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
|
|
@@ -41,8 +41,8 @@ declare function SidebarGroupContent({ className, ...props }: React$1.ComponentP
|
|
|
41
41
|
declare function SidebarMenu({ className, ...props }: React$1.ComponentProps<"ul">): React$1.JSX.Element;
|
|
42
42
|
declare function SidebarMenuItem({ className, ...props }: React$1.ComponentProps<"li">): React$1.JSX.Element;
|
|
43
43
|
declare const sidebarMenuButtonVariants: (props?: ({
|
|
44
|
-
variant?: "
|
|
45
|
-
size?: "
|
|
44
|
+
variant?: "default" | "outline" | null | undefined;
|
|
45
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
46
46
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
47
47
|
declare function SidebarMenuButton({ render, isActive, variant, size, tooltip, className, ...props }: useRender.ComponentProps<"button"> & React$1.ComponentProps<"button"> & {
|
|
48
48
|
isActive?: boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useIsMobile } from "../../hooks/use-mobile.js";
|
|
3
3
|
import { Button } from "./button.js";
|
|
4
|
-
import { Input } from "./input.js";
|
|
5
4
|
import { Separator } from "./separator.js";
|
|
6
|
-
import {
|
|
5
|
+
import { Input } from "./input.js";
|
|
7
6
|
import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "./sheet.js";
|
|
8
7
|
import { Skeleton } from "./skeleton.js";
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.js";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
10
|
import { cn } from "@kumix/utils";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -2,8 +2,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import { Toggle as Toggle$1 } from "@base-ui/react/toggle";
|
|
3
3
|
//#region src/components/ui/toggle.d.ts
|
|
4
4
|
declare const toggleVariants: (props?: ({
|
|
5
|
-
variant?: "
|
|
6
|
-
size?: "
|
|
5
|
+
variant?: "default" | "outline" | null | undefined;
|
|
6
|
+
size?: "sm" | "default" | "lg" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
declare function Toggle({ className, variant, size, ...props }: Toggle$1.Props & VariantProps<typeof toggleVariants>): import("react").JSX.Element;
|
|
9
9
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumix/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Kumix React UI kit: shadcn/ui (Base UI, base-nova) + ReUI components, Tailwind tokens, and hooks. Per-file ESM exports.",
|
|
5
5
|
"author": "Kumix Labs <hai@kumix.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"add:reui": "shadcn add @reui/alert @reui/autocomplete @reui/badge @reui/data-grid @reui/date-selector @reui/event-calendar @reui/use-file-upload @reui/filters @reui/frame @reui/gantt @reui/icon-stack @reui/icon-tile @reui/kanban @reui/number-field @reui/phone-input @reui/rating @reui/scrollspy @reui/sortable @reui/stepper @reui/timeline @reui/tree --overwrite",
|
|
42
42
|
"add:beui:ai-agents": "shadcn add @beui/prompt-input @beui/todo-list @beui/code-block @beui/approval-card @beui/file-diff @beui/tool-result @beui/streaming-response @beui/image-generation @beui/tool-approval @beui/citations @beui/agent-activity @beui/reasoning-text @beui/thinking-shimmer @beui/agent-progress @beui/ai-sidebar @beui/chat-app @beui/message-bubble @beui/message @beui/message-scroller --overwrite",
|
|
43
43
|
"add:beui:components": "shadcn add @beui/marquee @beui/tabs @beui/switch @beui/input @beui/select @beui/select-morph @beui/checkbox @beui/radio @beui/bottom-sheet @beui/pull-to-refresh @beui/shared-layout-bg @beui/bounce-sidebar @beui/animated-sidebar @beui/preview-rail @beui/dock @beui/tooltip @beui/context-menu @beui/popover @beui/popover-morph @beui/morphing-modal @beui/center-morph-modal @beui/chromatic-text-reveal @beui/text-reveal @beui/text-shimmer @beui/text-cascade @beui/number-ticker @beui/animated-number @beui/animated-badge @beui/action-swap-cascade @beui/action-swap-blur @beui/action-swap-roll @beui/animated-toast-stack @beui/theme-toggle @beui/bouncy-accordion @beui/drawer @beui/smooth-scroll @beui/scroll-progress @beui/parallax @beui/scroll-to @beui/scroll-reveal @beui/range-slider @beui/range-slider-fluid @beui/range-slider-wave @beui/range-slider-bubble @beui/range-slider-ruler @beui/wheel-picker @beui/table @beui/table-editable @beui/table-async @beui/shader-background @beui/cylinder-carousel @beui/loader @beui/tilt-card @beui/button-base @beui/button-stateful @beui/button-magnetic @beui/hold-action-button @beui/slide-action-button --overwrite",
|
|
44
|
-
"add:beui:blocks": "shadcn add @beui/availability-scheduler @beui/dynamic-island @beui/command-palette @beui/expandable-action-bar @beui/overflow-actions @beui/expandable-tabs @beui/morphing-tabs @beui/swipeable-list @beui/attachment-upload @beui/file-upload @beui/otp-input @beui/bloom-menu @beui/feedback-widget @beui/not-found-glitch @beui/not-found-magnetic @beui/not-found-spotlight @beui/not-found-stacked @beui/not-found-terminal @beui/infinite-masonry @beui/notification-stack --overwrite",
|
|
44
|
+
"add:beui:blocks": "shadcn add @beui/availability-scheduler @beui/dynamic-island @beui/command-palette @beui/expandable-action-bar @beui/overflow-actions @beui/expandable-tabs @beui/morphing-tabs @beui/swipeable-list @beui/attachment-upload @beui/file-upload @beui/otp-input @beui/signup-form @beui/bloom-menu @beui/feedback-widget @beui/not-found-glitch @beui/not-found-magnetic @beui/not-found-spotlight @beui/not-found-stacked @beui/not-found-terminal @beui/infinite-masonry @beui/notification-stack --overwrite",
|
|
45
45
|
"add:beui": "bun run add:beui:ai-agents && bun run add:beui:components && bun run add:beui:blocks"
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/kumixlabs/ui",
|
|
@@ -81,9 +81,9 @@
|
|
|
81
81
|
"@headless-tree/core": "^1.7.0",
|
|
82
82
|
"@kumix/tsconfig": "^0.1.0",
|
|
83
83
|
"@kumix/utils": "^0.1.3",
|
|
84
|
-
"@paper-design/shaders-react": "^0.0.
|
|
84
|
+
"@paper-design/shaders-react": "^0.0.80",
|
|
85
85
|
"@shadcn/react": "^0.3.0",
|
|
86
|
-
"@tanstack/react-table": "^9.1.
|
|
86
|
+
"@tanstack/react-table": "^9.1.2",
|
|
87
87
|
"@tanstack/react-virtual": "^3.14.9",
|
|
88
88
|
"@types/react": "^19.2.18",
|
|
89
89
|
"class-variance-authority": "^0.7.1",
|
|
@@ -93,15 +93,15 @@
|
|
|
93
93
|
"embla-carousel-react": "^8.6.0",
|
|
94
94
|
"input-otp": "^1.4.2",
|
|
95
95
|
"lenis": "^1.3.26",
|
|
96
|
-
"lucide-react": "^1.
|
|
97
|
-
"motion": "^13.
|
|
96
|
+
"lucide-react": "^1.31.0",
|
|
97
|
+
"motion": "^13.1.0",
|
|
98
98
|
"next-themes": "^0.4.6",
|
|
99
99
|
"react": "^19.2.8",
|
|
100
100
|
"react-day-picker": "^10.0.1",
|
|
101
101
|
"react-phone-number-input": "^3.4.17",
|
|
102
102
|
"react-resizable-panels": "^4.12.2",
|
|
103
103
|
"recharts": "3.10.1",
|
|
104
|
-
"shiki": "^4.4.
|
|
104
|
+
"shiki": "^4.4.3",
|
|
105
105
|
"tailwind-merge": "^3.6.0",
|
|
106
106
|
"tsdown": "^0.22.14",
|
|
107
107
|
"typescript": "6.0.3"
|