@bison-lab/ui 0.19.3 → 0.20.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/index.d.mts +52 -5
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +231 -42
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { t as cn } from "./utils-DPv8mMhD.mjs";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generateBrandScales, generateDestructiveScaleCSS, generateScaleCSS, motionPresets, radiusPresets, shadowPresets, zIndexTokens } from "@bison-lab/tokens";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
6
7
|
import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, ContextMenu as ContextMenu$1, Dialog as Dialog$1, DropdownMenu as DropdownMenu$1, Label as Label$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Slot, Switch as Switch$1, Tabs as Tabs$1, Tooltip as Tooltip$1, unstable_PasswordToggleField } from "radix-ui";
|
|
7
8
|
import { cva } from "class-variance-authority";
|
|
8
9
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
@@ -17,7 +18,6 @@ import Underline from "@tiptap/extension-underline";
|
|
|
17
18
|
import TextAlign from "@tiptap/extension-text-align";
|
|
18
19
|
import { Toaster as Toaster$1, toast } from "sonner";
|
|
19
20
|
import { flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
20
|
-
import { AnimatePresence, motion } from "motion/react";
|
|
21
21
|
import { Command as Command$1 } from "cmdk";
|
|
22
22
|
//#region src/lib/semantic-action-tones.ts
|
|
23
23
|
/**
|
|
@@ -376,9 +376,129 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
|
|
|
376
376
|
});
|
|
377
377
|
Form.displayName = "Form";
|
|
378
378
|
//#endregion
|
|
379
|
+
//#region src/components/outlined-field.tsx
|
|
380
|
+
/**
|
|
381
|
+
* Strips border / ring from nested form controls so the outer outlined shell
|
|
382
|
+
* owns the chrome. Targets inputs, textareas, and select triggers (buttons).
|
|
383
|
+
*/
|
|
384
|
+
const outlinedFieldNestResetClasses = cn("[&_input]:!h-full [&_input]:min-h-0 [&_input]:border-0 [&_input]:bg-transparent [&_input]:shadow-none", "[&_input]:focus-visible:ring-0 [&_input]:focus-visible:ring-offset-0", "[&_textarea]:box-border [&_textarea]:min-h-[72px] [&_textarea]:h-auto [&_textarea]:!h-auto [&_textarea]:flex-1 [&_textarea]:resize-y", "[&_textarea]:border-0 [&_textarea]:bg-transparent [&_textarea]:shadow-none", "[&_textarea]:focus-visible:ring-0 [&_textarea]:focus-visible:ring-offset-0", "[&_button]:h-full [&_button]:min-h-0 [&_button]:border-0 [&_button]:bg-transparent [&_button]:shadow-none", "[&_button]:focus-visible:ring-0 [&_button]:focus-visible:ring-offset-0");
|
|
385
|
+
function readValueFromShell(shell) {
|
|
386
|
+
const input = shell.querySelector("input");
|
|
387
|
+
const el = shell.querySelector("textarea") ?? input;
|
|
388
|
+
if (el) return Boolean(el.value);
|
|
389
|
+
return true;
|
|
390
|
+
}
|
|
391
|
+
function detectControlKind(shell) {
|
|
392
|
+
if (shell.querySelector("textarea")) return "textarea";
|
|
393
|
+
if (shell.querySelector("input")) return "input";
|
|
394
|
+
return "other";
|
|
395
|
+
}
|
|
396
|
+
const OutlinedField = React.forwardRef(({ label, htmlFor, error, hint, required, className, children }, ref) => {
|
|
397
|
+
const shellRef = React.useRef(null);
|
|
398
|
+
const [focused, setFocused] = React.useState(false);
|
|
399
|
+
const [hasValue, setHasValue] = React.useState(false);
|
|
400
|
+
const [controlKind, setControlKind] = React.useState("input");
|
|
401
|
+
const syncFromDom = React.useCallback(() => {
|
|
402
|
+
const shell = shellRef.current;
|
|
403
|
+
if (!shell) return;
|
|
404
|
+
setControlKind(detectControlKind(shell));
|
|
405
|
+
setHasValue(readValueFromShell(shell));
|
|
406
|
+
}, []);
|
|
407
|
+
React.useLayoutEffect(() => {
|
|
408
|
+
syncFromDom();
|
|
409
|
+
}, [children, syncFromDom]);
|
|
410
|
+
React.useEffect(() => {
|
|
411
|
+
const shell = shellRef.current;
|
|
412
|
+
if (!shell) return;
|
|
413
|
+
const onFocusIn = () => setFocused(true);
|
|
414
|
+
const onFocusOut = (ev) => {
|
|
415
|
+
if (!shell.contains(ev.relatedTarget)) {
|
|
416
|
+
setFocused(false);
|
|
417
|
+
syncFromDom();
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
shell.addEventListener("focusin", onFocusIn);
|
|
421
|
+
shell.addEventListener("focusout", onFocusOut);
|
|
422
|
+
return () => {
|
|
423
|
+
shell.removeEventListener("focusin", onFocusIn);
|
|
424
|
+
shell.removeEventListener("focusout", onFocusOut);
|
|
425
|
+
};
|
|
426
|
+
}, [syncFromDom]);
|
|
427
|
+
const isFloated = controlKind === "other" ? true : focused || hasValue;
|
|
428
|
+
const handleInputCapture = React.useCallback((e) => {
|
|
429
|
+
const t = e.target;
|
|
430
|
+
if (t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement) setHasValue(Boolean(t.value));
|
|
431
|
+
}, []);
|
|
432
|
+
const isTextarea = controlKind === "textarea";
|
|
433
|
+
const labelAnimate = isTextarea && !isFloated ? {
|
|
434
|
+
top: 20,
|
|
435
|
+
left: 12,
|
|
436
|
+
x: 0,
|
|
437
|
+
y: 0
|
|
438
|
+
} : isFloated ? {
|
|
439
|
+
top: 0,
|
|
440
|
+
left: 10,
|
|
441
|
+
x: 0,
|
|
442
|
+
y: "-50%"
|
|
443
|
+
} : {
|
|
444
|
+
top: "50%",
|
|
445
|
+
left: 12,
|
|
446
|
+
x: 0,
|
|
447
|
+
y: "-50%"
|
|
448
|
+
};
|
|
449
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
450
|
+
ref,
|
|
451
|
+
className: cn("flex flex-col gap-1.5", className),
|
|
452
|
+
children: [
|
|
453
|
+
/* @__PURE__ */ jsxs("div", {
|
|
454
|
+
ref: shellRef,
|
|
455
|
+
className: cn("group/outlined relative w-full min-w-0 rounded-md border border-input bg-background", "ring-offset-background", "focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/30 focus-within:ring-offset-0", outlinedFieldNestResetClasses, isTextarea ? "flex min-h-[80px] flex-col py-2" : "flex h-[var(--density-height-md)] items-stretch", !isFloated && !focused && "[&_input]:placeholder:text-transparent [&_textarea]:placeholder:text-transparent"),
|
|
456
|
+
onInputCapture: handleInputCapture,
|
|
457
|
+
children: [/* @__PURE__ */ jsxs(motion.label, {
|
|
458
|
+
htmlFor,
|
|
459
|
+
className: cn("pointer-events-none absolute z-10 bg-background px-1 font-medium leading-none text-muted-foreground", isFloated ? "text-xs" : "text-base", focused && "text-primary"),
|
|
460
|
+
style: { transformOrigin: "left center" },
|
|
461
|
+
initial: false,
|
|
462
|
+
animate: labelAnimate,
|
|
463
|
+
transition: {
|
|
464
|
+
type: "spring",
|
|
465
|
+
stiffness: 520,
|
|
466
|
+
damping: 34
|
|
467
|
+
},
|
|
468
|
+
children: [label, required ? /* @__PURE__ */ jsx("span", {
|
|
469
|
+
className: "ml-0.5 text-destructive",
|
|
470
|
+
children: "*"
|
|
471
|
+
}) : null]
|
|
472
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
473
|
+
className: cn("box-border flex min-h-0 min-w-0 flex-1", isTextarea ? "items-stretch pt-4 [&>*]:flex [&>*]:min-h-0 [&>*]:min-w-0 [&>*]:flex-1" : "items-stretch [&>*]:min-h-0 [&>*]:min-w-0 [&>*]:flex-1"),
|
|
474
|
+
children
|
|
475
|
+
})]
|
|
476
|
+
}),
|
|
477
|
+
error ? /* @__PURE__ */ jsx("p", {
|
|
478
|
+
className: "text-sm text-destructive",
|
|
479
|
+
children: error
|
|
480
|
+
}) : null,
|
|
481
|
+
!error && hint ? /* @__PURE__ */ jsx("p", {
|
|
482
|
+
className: "text-sm text-muted-foreground",
|
|
483
|
+
children: hint
|
|
484
|
+
}) : null
|
|
485
|
+
]
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
OutlinedField.displayName = "OutlinedField";
|
|
489
|
+
//#endregion
|
|
379
490
|
//#region src/form/form-field.tsx
|
|
380
|
-
function FormField({ name, label, description, required, className, children }) {
|
|
381
|
-
const
|
|
491
|
+
function FormField({ name, label, description, required, labelLayout = "stack", className, children }) {
|
|
492
|
+
const errorMessage = useFormContext()?.errors[name];
|
|
493
|
+
if (label && labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
|
|
494
|
+
label,
|
|
495
|
+
htmlFor: name,
|
|
496
|
+
required,
|
|
497
|
+
error: errorMessage,
|
|
498
|
+
hint: description,
|
|
499
|
+
className,
|
|
500
|
+
children
|
|
501
|
+
});
|
|
382
502
|
return /* @__PURE__ */ jsxs("div", {
|
|
383
503
|
className: cn("space-y-2", className),
|
|
384
504
|
children: [
|
|
@@ -391,13 +511,13 @@ function FormField({ name, label, description, required, className, children })
|
|
|
391
511
|
})]
|
|
392
512
|
}),
|
|
393
513
|
children,
|
|
394
|
-
description && !
|
|
514
|
+
description && !errorMessage && /* @__PURE__ */ jsx("p", {
|
|
395
515
|
className: "text-sm text-muted-foreground",
|
|
396
516
|
children: description
|
|
397
517
|
}),
|
|
398
|
-
|
|
518
|
+
errorMessage && /* @__PURE__ */ jsx("p", {
|
|
399
519
|
className: "text-sm text-destructive",
|
|
400
|
-
children:
|
|
520
|
+
children: errorMessage
|
|
401
521
|
})
|
|
402
522
|
]
|
|
403
523
|
});
|
|
@@ -713,16 +833,32 @@ const CurrencyInput = React.forwardRef(({ className, value, onChange, symbol = "
|
|
|
713
833
|
CurrencyInput.displayName = "CurrencyInput";
|
|
714
834
|
//#endregion
|
|
715
835
|
//#region src/components/label.tsx
|
|
716
|
-
const labelVariants = cva("
|
|
717
|
-
|
|
836
|
+
const labelVariants = cva("inline-block text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70", {
|
|
837
|
+
variants: { layout: {
|
|
838
|
+
stack: "mb-2 leading-none",
|
|
839
|
+
inline: "mb-0 leading-snug"
|
|
840
|
+
} },
|
|
841
|
+
defaultVariants: { layout: "stack" }
|
|
842
|
+
});
|
|
843
|
+
const Label = React.forwardRef(({ className, layout, ...props }, ref) => /* @__PURE__ */ jsx(Label$1.Root, {
|
|
718
844
|
ref,
|
|
719
|
-
className: cn(labelVariants(), className),
|
|
845
|
+
className: cn(labelVariants({ layout }), className),
|
|
720
846
|
...props
|
|
721
847
|
}));
|
|
722
848
|
Label.displayName = Label$1.Root.displayName;
|
|
723
849
|
//#endregion
|
|
724
850
|
//#region src/components/input-group.tsx
|
|
725
|
-
const InputGroup = React.forwardRef(({ label, htmlFor, error, hint, required, className, children }, ref) => {
|
|
851
|
+
const InputGroup = React.forwardRef(({ label, htmlFor, error, hint, required, labelLayout = "stack", className, children }, ref) => {
|
|
852
|
+
if (labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
|
|
853
|
+
ref,
|
|
854
|
+
label,
|
|
855
|
+
htmlFor,
|
|
856
|
+
error,
|
|
857
|
+
hint,
|
|
858
|
+
required,
|
|
859
|
+
className,
|
|
860
|
+
children
|
|
861
|
+
});
|
|
726
862
|
return /* @__PURE__ */ jsxs("div", {
|
|
727
863
|
ref,
|
|
728
864
|
className: cn("flex flex-col gap-2", className),
|
|
@@ -1426,16 +1562,45 @@ const TextContent = React.forwardRef(({ content, className, ...props }, ref) =>
|
|
|
1426
1562
|
TextContent.displayName = "TextContent";
|
|
1427
1563
|
//#endregion
|
|
1428
1564
|
//#region src/components/checkbox.tsx
|
|
1429
|
-
|
|
1565
|
+
function CheckIcon({ className }) {
|
|
1566
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
1567
|
+
viewBox: "0 0 12 12",
|
|
1568
|
+
fill: "none",
|
|
1569
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1570
|
+
className: cn("shrink-0", className),
|
|
1571
|
+
"aria-hidden": true,
|
|
1572
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1573
|
+
d: "M2.5 6.25 5 8.75 9.5 3.25",
|
|
1574
|
+
stroke: "currentColor",
|
|
1575
|
+
strokeWidth: "1.5",
|
|
1576
|
+
strokeLinecap: "round",
|
|
1577
|
+
strokeLinejoin: "round"
|
|
1578
|
+
})
|
|
1579
|
+
});
|
|
1580
|
+
}
|
|
1581
|
+
function IndeterminateIcon({ className }) {
|
|
1582
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
1583
|
+
viewBox: "0 0 12 12",
|
|
1584
|
+
fill: "none",
|
|
1585
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1586
|
+
className: cn("shrink-0", className),
|
|
1587
|
+
"aria-hidden": true,
|
|
1588
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
1589
|
+
d: "M2.5 6h7",
|
|
1590
|
+
stroke: "currentColor",
|
|
1591
|
+
strokeWidth: "1.5",
|
|
1592
|
+
strokeLinecap: "round"
|
|
1593
|
+
})
|
|
1594
|
+
});
|
|
1595
|
+
}
|
|
1596
|
+
const Checkbox = React.forwardRef(({ className, checked, ...props }, ref) => /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
1430
1597
|
ref,
|
|
1431
|
-
|
|
1598
|
+
checked,
|
|
1599
|
+
className: cn("peer h-4 w-4 shrink-0 cursor-pointer rounded-[2px] border border-primary bg-background ring-offset-background transition-[color,background-color,border-color] duration-fast ease-default focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-primary/35 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", className),
|
|
1432
1600
|
...props,
|
|
1433
1601
|
children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
|
|
1434
|
-
className: cn("flex items-center justify-center text-current"),
|
|
1435
|
-
children: /* @__PURE__ */ jsx(
|
|
1436
|
-
icon: faCheck,
|
|
1437
|
-
className: "h-4 w-4"
|
|
1438
|
-
})
|
|
1602
|
+
className: cn("flex h-full w-full items-center justify-center text-current"),
|
|
1603
|
+
children: checked === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { className: "h-[10px] w-[10px]" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "h-[10px] w-[10px]" })
|
|
1439
1604
|
})
|
|
1440
1605
|
}));
|
|
1441
1606
|
Checkbox.displayName = Checkbox$1.Root.displayName;
|
|
@@ -1449,13 +1614,13 @@ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1449
1614
|
RadioGroup.displayName = RadioGroup$1.Root.displayName;
|
|
1450
1615
|
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup$1.Item, {
|
|
1451
1616
|
ref,
|
|
1452
|
-
className: cn("
|
|
1617
|
+
className: cn("inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full border border-primary bg-background text-primary ring-offset-background focus:outline-none focus-visible:ring-1 focus-visible:ring-primary/35 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary", className),
|
|
1453
1618
|
...props,
|
|
1454
1619
|
children: /* @__PURE__ */ jsx(RadioGroup$1.Indicator, {
|
|
1455
|
-
className: "flex items-center justify-center",
|
|
1456
|
-
children: /* @__PURE__ */ jsx(
|
|
1457
|
-
|
|
1458
|
-
className: "h-2
|
|
1620
|
+
className: "flex h-full w-full items-center justify-center",
|
|
1621
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
1622
|
+
"aria-hidden": true,
|
|
1623
|
+
className: "block h-2 w-2 rounded-full bg-current"
|
|
1459
1624
|
})
|
|
1460
1625
|
})
|
|
1461
1626
|
}));
|
|
@@ -1521,7 +1686,7 @@ const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1521
1686
|
CardFooter.displayName = "CardFooter";
|
|
1522
1687
|
//#endregion
|
|
1523
1688
|
//#region src/components/alert.tsx
|
|
1524
|
-
const alertVariants = cva("
|
|
1689
|
+
const alertVariants = cva("flex w-full items-start gap-3 rounded-[var(--radius-md)] border p-4 text-sm", {
|
|
1525
1690
|
variants: { variant: {
|
|
1526
1691
|
default: "bg-muted/50 text-foreground border-border [&_[data-alert-icon]]:text-muted-foreground dark:bg-muted/30 dark:border-border-strong",
|
|
1527
1692
|
destructive: "border-destructive-300 bg-destructive-50 text-destructive-900 [&_[data-alert-icon]]:text-destructive-600 dark:border-destructive-700 dark:bg-destructive-900/60 dark:text-destructive-100 dark:[&_[data-alert-icon]]:text-destructive-300",
|
|
@@ -1540,11 +1705,23 @@ const defaultIcons = {
|
|
|
1540
1705
|
danger: faCircleExclamation,
|
|
1541
1706
|
info: faCircleInfo
|
|
1542
1707
|
};
|
|
1543
|
-
const Alert = React.forwardRef(({ className, variant = "default", showIcon = false, icon, dismissable = false, onDismiss, children, ...props }, ref) => {
|
|
1708
|
+
const Alert = React.forwardRef(({ className, variant = "default", showIcon = false, icon, iconSlot, dismissable = false, onDismiss, children, ...props }, ref) => {
|
|
1544
1709
|
const [dismissed, setDismissed] = React.useState(false);
|
|
1545
1710
|
if (dismissed) return null;
|
|
1546
1711
|
const resolvedIcon = icon ?? defaultIcons[variant ?? "default"];
|
|
1547
|
-
const
|
|
1712
|
+
const leading = iconSlot != null ? /* @__PURE__ */ jsx("span", {
|
|
1713
|
+
className: "mt-0.5 inline-flex shrink-0 [&_svg]:shrink-0",
|
|
1714
|
+
"data-alert-icon": "",
|
|
1715
|
+
children: iconSlot
|
|
1716
|
+
}) : iconSlot == null && Boolean(showIcon && resolvedIcon) ? /* @__PURE__ */ jsx("span", {
|
|
1717
|
+
className: "mt-0.5 inline-flex shrink-0",
|
|
1718
|
+
"data-alert-icon": "",
|
|
1719
|
+
"aria-hidden": true,
|
|
1720
|
+
children: /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
1721
|
+
icon: resolvedIcon,
|
|
1722
|
+
className: "size-4"
|
|
1723
|
+
})
|
|
1724
|
+
}) : null;
|
|
1548
1725
|
const handleDismiss = () => {
|
|
1549
1726
|
setDismissed(true);
|
|
1550
1727
|
onDismiss?.();
|
|
@@ -1552,25 +1729,24 @@ const Alert = React.forwardRef(({ className, variant = "default", showIcon = fal
|
|
|
1552
1729
|
return /* @__PURE__ */ jsxs("div", {
|
|
1553
1730
|
ref,
|
|
1554
1731
|
role: "alert",
|
|
1555
|
-
className: cn(alertVariants({ variant }),
|
|
1732
|
+
className: cn(alertVariants({ variant }), "min-w-0", className),
|
|
1556
1733
|
...props,
|
|
1557
1734
|
children: [
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
"
|
|
1561
|
-
|
|
1735
|
+
leading,
|
|
1736
|
+
/* @__PURE__ */ jsx("div", {
|
|
1737
|
+
className: "min-w-0 flex-1",
|
|
1738
|
+
children
|
|
1562
1739
|
}),
|
|
1563
|
-
|
|
1564
|
-
dismissable && /* @__PURE__ */ jsx("button", {
|
|
1740
|
+
dismissable ? /* @__PURE__ */ jsx("button", {
|
|
1565
1741
|
type: "button",
|
|
1566
1742
|
onClick: handleDismiss,
|
|
1567
|
-
className: "
|
|
1743
|
+
className: "shrink-0 self-start rounded-[var(--radius-sm)] p-1.5 opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/40 focus:ring-offset-2",
|
|
1568
1744
|
"aria-label": "Dismiss",
|
|
1569
1745
|
children: /* @__PURE__ */ jsx(FontAwesomeIcon, {
|
|
1570
1746
|
icon: faXmark,
|
|
1571
1747
|
className: "size-4"
|
|
1572
1748
|
})
|
|
1573
|
-
})
|
|
1749
|
+
}) : null
|
|
1574
1750
|
]
|
|
1575
1751
|
});
|
|
1576
1752
|
});
|
|
@@ -4194,7 +4370,8 @@ function SignUpBlock({ onSubmit, onSocialLogin, socialProviders = [], loading =
|
|
|
4194
4370
|
e.preventDefault();
|
|
4195
4371
|
const formData = new FormData(e.currentTarget);
|
|
4196
4372
|
await onSubmit({
|
|
4197
|
-
|
|
4373
|
+
firstName: formData.get("firstName") ?? "",
|
|
4374
|
+
lastName: formData.get("lastName") ?? "",
|
|
4198
4375
|
email: formData.get("email"),
|
|
4199
4376
|
password: formData.get("password"),
|
|
4200
4377
|
confirmPassword: formData.get("confirmPassword"),
|
|
@@ -4233,15 +4410,27 @@ function SignUpBlock({ onSubmit, onSocialLogin, socialProviders = [], loading =
|
|
|
4233
4410
|
className: "space-y-4",
|
|
4234
4411
|
children: [
|
|
4235
4412
|
/* @__PURE__ */ jsx(InputGroup, {
|
|
4236
|
-
label: "
|
|
4237
|
-
htmlFor: "
|
|
4413
|
+
label: "First name",
|
|
4414
|
+
htmlFor: "firstName",
|
|
4415
|
+
children: /* @__PURE__ */ jsx(Input, {
|
|
4416
|
+
id: "firstName",
|
|
4417
|
+
name: "firstName",
|
|
4418
|
+
placeholder: "Jane",
|
|
4419
|
+
required: true,
|
|
4420
|
+
disabled: loading || disabled,
|
|
4421
|
+
autoComplete: "given-name"
|
|
4422
|
+
})
|
|
4423
|
+
}),
|
|
4424
|
+
/* @__PURE__ */ jsx(InputGroup, {
|
|
4425
|
+
label: "Last name",
|
|
4426
|
+
htmlFor: "lastName",
|
|
4238
4427
|
children: /* @__PURE__ */ jsx(Input, {
|
|
4239
|
-
id: "
|
|
4240
|
-
name: "
|
|
4241
|
-
placeholder: "
|
|
4428
|
+
id: "lastName",
|
|
4429
|
+
name: "lastName",
|
|
4430
|
+
placeholder: "Doe",
|
|
4242
4431
|
required: true,
|
|
4243
4432
|
disabled: loading || disabled,
|
|
4244
|
-
autoComplete: "name"
|
|
4433
|
+
autoComplete: "family-name"
|
|
4245
4434
|
})
|
|
4246
4435
|
}),
|
|
4247
4436
|
/* @__PURE__ */ jsx(InputGroup, {
|
|
@@ -5400,6 +5589,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
|
|
|
5400
5589
|
});
|
|
5401
5590
|
}
|
|
5402
5591
|
//#endregion
|
|
5403
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, Label, MaintenanceBlock, MediaCard, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, navigationMenuTriggerStyle, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5592
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, CodeInput, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CurrencyInput, DataTable, DataTableColumnHeader, DatePicker, DateRangePicker, DensityProvider, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableTitle, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, Label, MaintenanceBlock, MediaCard, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5404
5593
|
|
|
5405
5594
|
//# sourceMappingURL=index.mjs.map
|