@bison-lab/ui 0.14.1 → 0.16.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.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { t as cn } from "./utils-DPv8mMhD.mjs";
3
3
  import * as React from "react";
4
- import { defaultFontWeights, densityPresets, deriveDarkPalette, deriveLightPalette, generateBrandScales, generateScaleCSS, motionPresets, radiusPresets, shadowPresets, zIndexTokens } from "@bison-lab/tokens";
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
6
  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
7
  import { cva } from "class-variance-authority";
8
8
  import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
9
- import { faAlignCenter, faAlignLeft, faAlignRight, faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsUpDown, faBars, faBold, faCalendar, faCamera, faCheck, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faChevronsLeft, faChevronsRight, faCircle, faCode, faEllipsis, faEnvelope, faEye, faEyeSlash, faFileCircleQuestion, faH1, faH2, faH3, faImage, faInbox, faItalic, faLink, faLinkSlash, faList, faListOl, faMagnifyingGlass, faMinus, faPlus, faQuoteLeft, faRightFromBracket, faRotateLeft, faRotateRight, faServer, faSidebarFlip, faSlidersUp, faSpinnerThird, faStrikethrough, faUnderline, faUpDown, faWrench, faXmark } from "@fortawesome/pro-regular-svg-icons";
9
+ import { faAlignCenter, faAlignLeft, faAlignRight, faArrowDown, faArrowLeft, faArrowRight, faArrowUp, faArrowsUpDown, faBars, faBold, faCalendar, faCamera, faCheck, faChevronDown, faChevronLeft, faChevronRight, faChevronUp, faChevronsLeft, faChevronsRight, faCircle, faCode, faEllipsis, faEnvelope, faEye, faEyeSlash, faFileCircleQuestion, faH1, faH2, faH3, faImage, faInbox, faItalic, faLink, faLinkSlash, faList, faListOl, faMagnifyingGlass, faMinus, faPen, faPlus, faQuoteLeft, faRightFromBracket, faRotateLeft, faRotateRight, faServer, faSidebarFlip, faSlidersUp, faSpinnerThird, faStrikethrough, faUnderline, faUpDown, faWrench, faXmark } from "@fortawesome/pro-regular-svg-icons";
10
10
  import { DayPicker } from "react-day-picker";
11
11
  import { endOfMonth, endOfWeek, format, startOfMonth, startOfWeek, startOfYear, subDays, subMonths, subYears } from "date-fns";
12
12
  import { EditorContent, useEditor } from "@tiptap/react";
@@ -18,6 +18,20 @@ import TextAlign from "@tiptap/extension-text-align";
18
18
  import { Toaster as Toaster$1, toast } from "sonner";
19
19
  import { flexRender, getCoreRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
20
20
  import { Command as Command$1 } from "cmdk";
21
+ import { AnimatePresence, motion } from "motion/react";
22
+ //#region src/lib/semantic-action-tones.ts
23
+ /**
24
+ * Reusable “soft” icon tiles: same border + shadow language, hue from semantic scales.
25
+ * Pair with `Button` variants `actionNeutral` | `actionPositive` | `actionNegative` and `size="icon"`.
26
+ *
27
+ * Requires `--success-*` and `--destructive-*` scales from BisonProvider / tailwind preset.
28
+ */
29
+ const actionNeutralToneClasses = "border border-border bg-muted/80 text-muted-foreground shadow-sm hover:border-border-strong hover:bg-muted hover:text-foreground dark:border-border dark:bg-muted/50 dark:hover:bg-muted/80 dark:hover:text-foreground";
30
+ const actionPositiveToneClasses = "border border-success-200/90 bg-success-100 text-success-600 shadow-sm hover:border-success-300 hover:bg-success-200 hover:text-success-700 focus-visible:ring-success-500/40 dark:border-success-800/55 dark:bg-success-950/40 dark:text-success-400 dark:hover:border-success-700 dark:hover:bg-success-950/60 dark:hover:text-success-300";
31
+ const actionNegativeToneClasses = "border border-destructive-200/90 bg-destructive-100 text-destructive-600 shadow-sm hover:border-destructive-300 hover:bg-destructive-200 hover:text-destructive-700 focus-visible:ring-destructive-500/40 dark:border-destructive-800/55 dark:bg-destructive-950/45 dark:text-destructive-400 dark:hover:border-destructive-700 dark:hover:bg-destructive-950/65 dark:hover:text-destructive-300";
32
+ /** @deprecated Use `actionNeutralToneClasses` + `variant="actionNeutral"` on Button. */
33
+ const actionNeutralIconChromeClasses = actionNeutralToneClasses;
34
+ //#endregion
21
35
  //#region src/hooks/use-scroll-reveal.ts
22
36
  /**
23
37
  * Returns a ref and a boolean indicating whether the element is in view.
@@ -167,7 +181,7 @@ function BisonProvider({ children, brandColors, radius = "rounded", shadow = "su
167
181
  const lightPalette = React.useMemo(() => deriveLightPalette(brandColors), [brandColors]);
168
182
  const darkPalette = React.useMemo(() => deriveDarkPalette(brandColors), [brandColors]);
169
183
  const scaleCSS = React.useMemo(() => {
170
- return generateScaleCSS(generateBrandScales(brandColors));
184
+ return `${generateScaleCSS(generateBrandScales(brandColors))}\n${generateDestructiveScaleCSS()}`;
171
185
  }, [brandColors]);
172
186
  const fontsUrl = React.useMemo(() => {
173
187
  const fonts = [bodyFont];
@@ -392,6 +406,9 @@ const buttonVariants = cva("inline-flex items-center justify-center whitespace-n
392
406
  destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
393
407
  outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
394
408
  ghost: "hover:bg-accent hover:text-accent-foreground",
409
+ actionNeutral: actionNeutralToneClasses,
410
+ actionPositive: actionPositiveToneClasses,
411
+ actionNegative: actionNegativeToneClasses,
395
412
  link: "text-primary underline-offset-4 hover:underline"
396
413
  },
397
414
  size: {
@@ -462,15 +479,63 @@ const PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
462
479
  });
463
480
  PasswordInput.displayName = "PasswordInput";
464
481
  //#endregion
465
- //#region src/components/textarea.tsx
466
- const Textarea = React.forwardRef(({ className, ...props }, ref) => {
467
- return /* @__PURE__ */ jsx("textarea", {
468
- className: cn("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
482
+ //#region src/components/code-input.tsx
483
+ const CodeInput = React.forwardRef(({ length = 6, onComplete, onChange, loading = false, disabled = false, className }, ref) => {
484
+ const [code, setCode] = React.useState(Array(length).fill(""));
485
+ const inputRefs = React.useRef([]);
486
+ const updateCode = React.useCallback((newCode) => {
487
+ setCode(newCode);
488
+ const joined = newCode.join("");
489
+ onChange?.(joined);
490
+ if (joined.length === length && newCode.every(Boolean)) onComplete?.(joined);
491
+ }, [
492
+ length,
493
+ onChange,
494
+ onComplete
495
+ ]);
496
+ const handleChange = React.useCallback((index, value) => {
497
+ if (!/^\d*$/.test(value)) return;
498
+ const newCode = [...code];
499
+ newCode[index] = value.slice(-1);
500
+ updateCode(newCode);
501
+ if (value && index < length - 1) inputRefs.current[index + 1]?.focus();
502
+ }, [
503
+ code,
504
+ length,
505
+ updateCode
506
+ ]);
507
+ const handleKeyDown = React.useCallback((index, e) => {
508
+ if (e.key === "Backspace" && !code[index] && index > 0) inputRefs.current[index - 1]?.focus();
509
+ }, [code]);
510
+ const handlePaste = React.useCallback((e) => {
511
+ e.preventDefault();
512
+ const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
513
+ const newCode = Array(length).fill("");
514
+ for (let i = 0; i < pasted.length; i++) newCode[i] = pasted[i];
515
+ updateCode(newCode);
516
+ if (pasted.length < length) inputRefs.current[pasted.length]?.focus();
517
+ }, [length, updateCode]);
518
+ return /* @__PURE__ */ jsx("div", {
469
519
  ref,
470
- ...props
520
+ className: cn("flex justify-center gap-2", className),
521
+ onPaste: handlePaste,
522
+ children: code.map((digit, index) => /* @__PURE__ */ jsx(Input, {
523
+ ref: (el) => {
524
+ inputRefs.current[index] = el;
525
+ },
526
+ type: "text",
527
+ inputMode: "numeric",
528
+ maxLength: 1,
529
+ value: digit,
530
+ onChange: (e) => handleChange(index, e.target.value),
531
+ onKeyDown: (e) => handleKeyDown(index, e),
532
+ disabled: loading || disabled,
533
+ className: "h-12 w-12 text-center text-lg font-semibold",
534
+ autoFocus: index === 0
535
+ }, index))
471
536
  });
472
537
  });
473
- Textarea.displayName = "Textarea";
538
+ CodeInput.displayName = "CodeInput";
474
539
  //#endregion
475
540
  //#region src/components/label.tsx
476
541
  const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
@@ -481,6 +546,43 @@ const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
481
546
  }));
482
547
  Label.displayName = Label$1.Root.displayName;
483
548
  //#endregion
549
+ //#region src/components/input-group.tsx
550
+ const InputGroup = React.forwardRef(({ label, htmlFor, error, hint, required, className, children }, ref) => {
551
+ return /* @__PURE__ */ jsxs("div", {
552
+ ref,
553
+ className: cn("flex flex-col gap-2", className),
554
+ children: [
555
+ /* @__PURE__ */ jsxs(Label, {
556
+ htmlFor,
557
+ children: [label, required && /* @__PURE__ */ jsx("span", {
558
+ className: "ml-0.5 text-destructive",
559
+ children: "*"
560
+ })]
561
+ }),
562
+ children,
563
+ error && /* @__PURE__ */ jsx("p", {
564
+ className: "text-sm text-destructive",
565
+ children: error
566
+ }),
567
+ !error && hint && /* @__PURE__ */ jsx("p", {
568
+ className: "text-sm text-muted-foreground",
569
+ children: hint
570
+ })
571
+ ]
572
+ });
573
+ });
574
+ InputGroup.displayName = "InputGroup";
575
+ //#endregion
576
+ //#region src/components/textarea.tsx
577
+ const Textarea = React.forwardRef(({ className, ...props }, ref) => {
578
+ return /* @__PURE__ */ jsx("textarea", {
579
+ className: cn("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", className),
580
+ ref,
581
+ ...props
582
+ });
583
+ });
584
+ Textarea.displayName = "Textarea";
585
+ //#endregion
484
586
  //#region src/components/select.tsx
485
587
  const Select = Select$1.Root;
486
588
  const SelectGroup = Select$1.Group;
@@ -1221,14 +1323,18 @@ const CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE
1221
1323
  CardFooter.displayName = "CardFooter";
1222
1324
  //#endregion
1223
1325
  //#region src/components/badge.tsx
1224
- const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
1326
+ const badgeVariants = cva("inline-flex h-6 items-center justify-center rounded-[var(--radius-sm)] border px-2.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
1225
1327
  variants: { variant: {
1226
1328
  default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
1227
1329
  secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
1228
1330
  accent: "border-transparent bg-brand-accent text-brand-accent-foreground hover:bg-brand-accent/80",
1229
1331
  highlight: "border-transparent bg-highlight text-highlight-foreground hover:bg-highlight/80",
1230
1332
  destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
1231
- outline: "text-foreground"
1333
+ outline: "text-foreground",
1334
+ success: "border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:border-emerald-400/30 dark:bg-emerald-400/10 dark:text-emerald-400",
1335
+ warning: "border-amber-500/30 bg-amber-500/10 text-amber-700 dark:border-amber-400/30 dark:bg-amber-400/10 dark:text-amber-400",
1336
+ error: "border-red-500/30 bg-red-500/10 text-red-700 dark:border-red-400/30 dark:bg-red-400/10 dark:text-red-400",
1337
+ info: "border-blue-500/30 bg-blue-500/10 text-blue-700 dark:border-blue-400/30 dark:bg-blue-400/10 dark:text-blue-400"
1232
1338
  } },
1233
1339
  defaultVariants: { variant: "default" }
1234
1340
  });
@@ -1378,17 +1484,84 @@ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PU
1378
1484
  }));
1379
1485
  SheetOverlay.displayName = Dialog$1.Overlay.displayName;
1380
1486
  const sheetVariants = cva("fixed z-[var(--z-modal)] gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-slow data-[state=open]:duration-normal", {
1381
- variants: { side: {
1382
- top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1383
- bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1384
- left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",
1385
- right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"
1386
- } },
1387
- defaultVariants: { side: "right" }
1487
+ variants: {
1488
+ side: {
1489
+ top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
1490
+ bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
1491
+ left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
1492
+ right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right"
1493
+ },
1494
+ size: {
1495
+ sm: "",
1496
+ md: "",
1497
+ lg: "",
1498
+ xl: "",
1499
+ full: ""
1500
+ }
1501
+ },
1502
+ defaultVariants: {
1503
+ side: "right",
1504
+ size: "sm"
1505
+ },
1506
+ compoundVariants: [
1507
+ {
1508
+ side: "left",
1509
+ size: "sm",
1510
+ className: "sm:max-w-sm"
1511
+ },
1512
+ {
1513
+ side: "left",
1514
+ size: "md",
1515
+ className: "sm:max-w-md"
1516
+ },
1517
+ {
1518
+ side: "left",
1519
+ size: "lg",
1520
+ className: "sm:max-w-lg"
1521
+ },
1522
+ {
1523
+ side: "left",
1524
+ size: "xl",
1525
+ className: "sm:max-w-xl"
1526
+ },
1527
+ {
1528
+ side: "left",
1529
+ size: "full",
1530
+ className: "sm:max-w-full"
1531
+ },
1532
+ {
1533
+ side: "right",
1534
+ size: "sm",
1535
+ className: "sm:max-w-sm"
1536
+ },
1537
+ {
1538
+ side: "right",
1539
+ size: "md",
1540
+ className: "sm:max-w-md"
1541
+ },
1542
+ {
1543
+ side: "right",
1544
+ size: "lg",
1545
+ className: "sm:max-w-lg"
1546
+ },
1547
+ {
1548
+ side: "right",
1549
+ size: "xl",
1550
+ className: "sm:max-w-xl"
1551
+ },
1552
+ {
1553
+ side: "right",
1554
+ size: "full",
1555
+ className: "sm:max-w-full"
1556
+ }
1557
+ ]
1388
1558
  });
1389
- const SheetContent = React.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
1559
+ const SheetContent = React.forwardRef(({ side = "right", size = "sm", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Content, {
1390
1560
  ref,
1391
- className: cn(sheetVariants({ side }), className),
1561
+ className: cn(sheetVariants({
1562
+ side,
1563
+ size
1564
+ }), className),
1392
1565
  ...props,
1393
1566
  children: [children, /* @__PURE__ */ jsxs(Dialog$1.Close, {
1394
1567
  className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",
@@ -1529,7 +1702,7 @@ const TabsList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__
1529
1702
  TabsList.displayName = Tabs$1.List.displayName;
1530
1703
  const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.Trigger, {
1531
1704
  ref,
1532
- className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm", className),
1705
+ className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-[var(--bison-tab-active-bg,hsl(var(--card)))] data-[state=active]:text-[var(--bison-tab-active-fg,hsl(var(--card-foreground)))] data-[state=active]:shadow-sm", className),
1533
1706
  ...props
1534
1707
  }));
1535
1708
  TabsTrigger.displayName = Tabs$1.Trigger.displayName;
@@ -2400,6 +2573,190 @@ const CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span",
2400
2573
  ...props
2401
2574
  });
2402
2575
  //#endregion
2576
+ //#region src/components/editable-title.tsx
2577
+ const editableTitleVariants = cva("inline-flex items-center gap-2 font-semibold text-foreground", {
2578
+ variants: { size: {
2579
+ sm: "text-lg",
2580
+ md: "text-2xl",
2581
+ lg: "text-4xl"
2582
+ } },
2583
+ defaultVariants: { size: "md" }
2584
+ });
2585
+ const editableTitleInputVariants = cva("bg-transparent border-b-2 border-primary outline-none font-semibold text-foreground w-full min-w-0", {
2586
+ variants: { size: {
2587
+ sm: "text-lg pb-0.5",
2588
+ md: "text-2xl pb-1",
2589
+ lg: "text-4xl pb-1.5"
2590
+ } },
2591
+ defaultVariants: { size: "md" }
2592
+ });
2593
+ /**
2594
+ * Fixed square chrome for edit / confirm / cancel: outer box is identical regardless of glyph.
2595
+ * Overrides `Button` `size="icon"` density vars so all three match exactly.
2596
+ */
2597
+ function titleActionButtonClass(size) {
2598
+ switch (size) {
2599
+ case "sm": return "box-border aspect-square size-6 min-h-6 min-w-6 max-h-6 max-w-6 shrink-0 p-0 leading-none overflow-hidden inline-flex items-center justify-center [&_svg]:block [&_svg]:size-3 [&_svg]:shrink-0";
2600
+ case "lg": return "box-border aspect-square size-10 min-h-10 min-w-10 max-h-10 max-w-10 shrink-0 p-0 leading-none overflow-hidden inline-flex items-center justify-center [&_svg]:block [&_svg]:size-5 [&_svg]:shrink-0";
2601
+ default: return "box-border aspect-square size-8 min-h-8 min-w-8 max-h-8 max-w-8 shrink-0 p-0 leading-none overflow-hidden inline-flex items-center justify-center [&_svg]:block [&_svg]:size-4 [&_svg]:shrink-0";
2602
+ }
2603
+ }
2604
+ /** Loading affordance: same outer square as action buttons. */
2605
+ function loadingSpinnerWrapClass(size) {
2606
+ switch (size) {
2607
+ case "sm": return "box-border size-6 min-h-6 min-w-6 max-h-6 max-w-6 [&_svg]:size-3";
2608
+ case "lg": return "box-border size-10 min-h-10 min-w-10 max-h-10 max-w-10 [&_svg]:size-5";
2609
+ default: return "box-border size-8 min-h-8 min-w-8 max-h-8 max-w-8 [&_svg]:size-4";
2610
+ }
2611
+ }
2612
+ const EditableTitle = React.forwardRef(({ className, size, value, onSave, onChange, placeholder = "Untitled", disabled = false, loading = false, maxLength, ...props }, ref) => {
2613
+ const [isEditing, setIsEditing] = React.useState(false);
2614
+ const [draft, setDraft] = React.useState(value);
2615
+ /** Avoids a flash: after save/cancel the pointer often sits where the pen mounts, so hover would show it immediately. */
2616
+ const [suppressPenReveal, setSuppressPenReveal] = React.useState(false);
2617
+ const inputRef = React.useRef(null);
2618
+ React.useEffect(() => {
2619
+ if (!suppressPenReveal) return;
2620
+ const t = window.setTimeout(() => setSuppressPenReveal(false), 200);
2621
+ return () => clearTimeout(t);
2622
+ }, [suppressPenReveal]);
2623
+ React.useEffect(() => {
2624
+ if (!isEditing) setDraft(value);
2625
+ }, [value, isEditing]);
2626
+ React.useEffect(() => {
2627
+ if (isEditing && inputRef.current) {
2628
+ inputRef.current.focus();
2629
+ inputRef.current.select();
2630
+ }
2631
+ }, [isEditing]);
2632
+ const startEditing = () => {
2633
+ if (disabled || loading) return;
2634
+ setSuppressPenReveal(false);
2635
+ setDraft(value);
2636
+ setIsEditing(true);
2637
+ };
2638
+ const endEditing = () => {
2639
+ setSuppressPenReveal(true);
2640
+ setIsEditing(false);
2641
+ };
2642
+ const save = () => {
2643
+ const trimmed = draft.trim();
2644
+ if (trimmed && trimmed !== value) onSave?.(trimmed);
2645
+ endEditing();
2646
+ };
2647
+ const cancel = () => {
2648
+ setDraft(value);
2649
+ endEditing();
2650
+ };
2651
+ const handleKeyDown = (e) => {
2652
+ if (e.key === "Enter") {
2653
+ e.preventDefault();
2654
+ save();
2655
+ } else if (e.key === "Escape") {
2656
+ e.preventDefault();
2657
+ cancel();
2658
+ }
2659
+ };
2660
+ const handleChange = (e) => {
2661
+ const newValue = e.target.value;
2662
+ if (maxLength && newValue.length > maxLength) return;
2663
+ setDraft(newValue);
2664
+ onChange?.(newValue);
2665
+ };
2666
+ if (isEditing) return /* @__PURE__ */ jsxs("div", {
2667
+ ref,
2668
+ className: cn(editableTitleVariants({ size }), className),
2669
+ ...props,
2670
+ children: [
2671
+ /* @__PURE__ */ jsx("input", {
2672
+ ref: inputRef,
2673
+ type: "text",
2674
+ value: draft,
2675
+ onChange: handleChange,
2676
+ onKeyDown: handleKeyDown,
2677
+ onBlur: save,
2678
+ placeholder,
2679
+ maxLength,
2680
+ className: cn(editableTitleInputVariants({ size }), "min-w-0 flex-1"),
2681
+ "aria-label": "Edit title"
2682
+ }),
2683
+ /* @__PURE__ */ jsx(Button, {
2684
+ type: "button",
2685
+ variant: "actionPositive",
2686
+ size: "icon",
2687
+ className: titleActionButtonClass(size),
2688
+ onMouseDown: (e) => e.preventDefault(),
2689
+ onClick: save,
2690
+ "aria-label": "Save title",
2691
+ children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faCheck })
2692
+ }),
2693
+ /* @__PURE__ */ jsx(Button, {
2694
+ type: "button",
2695
+ variant: "actionNegative",
2696
+ size: "icon",
2697
+ className: titleActionButtonClass(size),
2698
+ onMouseDown: (e) => e.preventDefault(),
2699
+ onClick: cancel,
2700
+ "aria-label": "Cancel editing",
2701
+ children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faXmark })
2702
+ })
2703
+ ]
2704
+ });
2705
+ return /* @__PURE__ */ jsxs("div", {
2706
+ ref,
2707
+ className: cn(editableTitleVariants({ size }), "group", className),
2708
+ ...props,
2709
+ children: [
2710
+ /* @__PURE__ */ jsx("span", {
2711
+ className: cn("cursor-pointer hover:text-primary transition-colors duration-fast ease-default", disabled && "cursor-default hover:text-foreground", loading && "cursor-wait hover:text-foreground opacity-70"),
2712
+ onClick: startEditing,
2713
+ role: "button",
2714
+ tabIndex: disabled ? -1 : 0,
2715
+ onKeyDown: (e) => {
2716
+ if (e.key === "Enter" || e.key === " ") {
2717
+ e.preventDefault();
2718
+ startEditing();
2719
+ }
2720
+ },
2721
+ "aria-label": disabled ? value : `Edit title: ${value}`,
2722
+ children: value || placeholder
2723
+ }),
2724
+ !disabled && !loading && /* @__PURE__ */ jsx(Button, {
2725
+ type: "button",
2726
+ variant: "actionNeutral",
2727
+ size: "icon",
2728
+ className: cn("transition-opacity duration-fast ease-default", titleActionButtonClass(size), suppressPenReveal ? "pointer-events-none opacity-0" : "opacity-0 group-hover:opacity-100 group-focus-within:opacity-100"),
2729
+ onClick: startEditing,
2730
+ tabIndex: -1,
2731
+ "aria-hidden": "true",
2732
+ children: /* @__PURE__ */ jsx(FontAwesomeIcon, { icon: faPen })
2733
+ }),
2734
+ loading && /* @__PURE__ */ jsx("span", {
2735
+ className: cn("inline-flex items-center justify-center shrink-0 rounded-md text-muted-foreground", loadingSpinnerWrapClass(size), "animate-spin pointer-events-none"),
2736
+ "aria-label": "Saving",
2737
+ children: /* @__PURE__ */ jsxs("svg", {
2738
+ xmlns: "http://www.w3.org/2000/svg",
2739
+ fill: "none",
2740
+ viewBox: "0 0 24 24",
2741
+ children: [/* @__PURE__ */ jsx("circle", {
2742
+ className: "opacity-25",
2743
+ cx: "12",
2744
+ cy: "12",
2745
+ r: "10",
2746
+ stroke: "currentColor",
2747
+ strokeWidth: "4"
2748
+ }), /* @__PURE__ */ jsx("path", {
2749
+ className: "opacity-75",
2750
+ fill: "currentColor",
2751
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
2752
+ })]
2753
+ })
2754
+ })
2755
+ ]
2756
+ });
2757
+ });
2758
+ EditableTitle.displayName = "EditableTitle";
2759
+ //#endregion
2403
2760
  //#region src/components/aspect-ratio.tsx
2404
2761
  const AspectRatio = AspectRatio$1.Root;
2405
2762
  //#endregion
@@ -2811,6 +3168,15 @@ const providerConfig = {
2811
3168
  ]
2812
3169
  })
2813
3170
  },
3171
+ facebook: {
3172
+ label: "Facebook",
3173
+ icon: /* @__PURE__ */ jsx("svg", {
3174
+ className: "h-4 w-4",
3175
+ viewBox: "0 0 24 24",
3176
+ fill: "#1877F2",
3177
+ children: /* @__PURE__ */ jsx("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
3178
+ })
3179
+ },
2814
3180
  github: {
2815
3181
  label: "GitHub",
2816
3182
  icon: /* @__PURE__ */ jsx("svg", {
@@ -2851,17 +3217,220 @@ function SocialProviders({ providers, onSocialLogin, loading, disabled, classNam
2851
3217
  }
2852
3218
  //#endregion
2853
3219
  //#region src/blocks/auth/sign-in-block.tsx
2854
- function SignInBlock({ onSubmit, onForgotPassword, onSocialLogin, socialProviders = [], loading = false, error, disabled = false, title = "Sign in", description = "Enter your credentials to access your account", signUpHref, onSignUp, className }) {
2855
- const [rememberMe, setRememberMe] = React.useState(false);
3220
+ const AUTH_TABS = {
3221
+ PASSWORD: "password",
3222
+ OTP: "otp"
3223
+ };
3224
+ function PillTabs({ activeTab, onTabChange, otpLabel }) {
3225
+ return /* @__PURE__ */ jsx("div", {
3226
+ className: "relative flex rounded-md bg-muted p-1",
3227
+ children: [{
3228
+ value: AUTH_TABS.PASSWORD,
3229
+ label: "Password"
3230
+ }, {
3231
+ value: AUTH_TABS.OTP,
3232
+ label: otpLabel
3233
+ }].map((tab) => /* @__PURE__ */ jsxs("button", {
3234
+ type: "button",
3235
+ onClick: () => onTabChange(tab.value),
3236
+ className: cn("relative z-10 flex-1 rounded-sm px-3 py-1.5 text-sm font-medium transition-colors", activeTab === tab.value ? "text-secondary-foreground" : "text-muted-foreground hover:text-foreground"),
3237
+ children: [activeTab === tab.value && /* @__PURE__ */ jsx(motion.div, {
3238
+ layoutId: "sign-in-tab-pill",
3239
+ className: "absolute inset-0 rounded-sm bg-secondary shadow-sm",
3240
+ transition: {
3241
+ type: "spring",
3242
+ bounce: .15,
3243
+ duration: .4
3244
+ }
3245
+ }), /* @__PURE__ */ jsx("span", {
3246
+ className: "relative z-10",
3247
+ children: tab.label
3248
+ })]
3249
+ }, tab.value))
3250
+ });
3251
+ }
3252
+ function OtpForm({ onOtpRequest, onOtpVerify, loading = false, disabled = false, error }) {
3253
+ const [step, setStep] = React.useState("email");
3254
+ const [email, setEmail] = React.useState("");
3255
+ const [session, setSession] = React.useState("");
3256
+ const [otpLoading, setOtpLoading] = React.useState(false);
3257
+ const [otpError, setOtpError] = React.useState();
3258
+ const isLoading = loading || otpLoading;
3259
+ const displayError = otpError ?? error;
3260
+ async function handleEmailSubmit(e) {
3261
+ e.preventDefault();
3262
+ const emailValue = new FormData(e.currentTarget).get("otp-email");
3263
+ setOtpError(void 0);
3264
+ setOtpLoading(true);
3265
+ try {
3266
+ const result = await onOtpRequest(emailValue);
3267
+ setEmail(emailValue);
3268
+ setSession(result.session);
3269
+ setStep("code");
3270
+ } catch (err) {
3271
+ setOtpError(err instanceof Error ? err.message : "Failed to send code. Please try again.");
3272
+ } finally {
3273
+ setOtpLoading(false);
3274
+ }
3275
+ }
3276
+ if (step === "code") return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FormError, { message: displayError }), /* @__PURE__ */ jsxs("div", {
3277
+ className: "space-y-4",
3278
+ children: [
3279
+ /* @__PURE__ */ jsxs("div", {
3280
+ className: "text-center text-sm text-muted-foreground",
3281
+ children: ["We sent a 6-digit code to ", /* @__PURE__ */ jsx("strong", { children: email })]
3282
+ }),
3283
+ /* @__PURE__ */ jsx(CodeInput, {
3284
+ length: 6,
3285
+ loading: isLoading,
3286
+ disabled,
3287
+ onComplete: (fullCode) => {
3288
+ setOtpLoading(true);
3289
+ setOtpError(void 0);
3290
+ onOtpVerify({
3291
+ email,
3292
+ code: fullCode,
3293
+ session
3294
+ }).catch((err) => setOtpError(err instanceof Error ? err.message : "Invalid or expired code. Please try again.")).finally(() => setOtpLoading(false));
3295
+ }
3296
+ }),
3297
+ isLoading && /* @__PURE__ */ jsx("div", {
3298
+ className: "flex justify-center",
3299
+ children: /* @__PURE__ */ jsx(Spinner, { size: "sm" })
3300
+ }),
3301
+ /* @__PURE__ */ jsx("button", {
3302
+ type: "button",
3303
+ className: "w-full text-center text-sm text-muted-foreground hover:text-foreground",
3304
+ onClick: () => {
3305
+ setStep("email");
3306
+ setOtpError(void 0);
3307
+ },
3308
+ children: "Use a different email"
3309
+ })
3310
+ ]
3311
+ })] });
3312
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FormError, { message: displayError }), /* @__PURE__ */ jsxs("form", {
3313
+ onSubmit: handleEmailSubmit,
3314
+ className: "space-y-4",
3315
+ children: [/* @__PURE__ */ jsx(InputGroup, {
3316
+ label: "Email",
3317
+ htmlFor: "otp-email",
3318
+ children: /* @__PURE__ */ jsx(Input, {
3319
+ id: "otp-email",
3320
+ name: "otp-email",
3321
+ type: "email",
3322
+ placeholder: "name@example.com",
3323
+ required: true,
3324
+ disabled: isLoading || disabled,
3325
+ autoComplete: "email"
3326
+ })
3327
+ }), /* @__PURE__ */ jsxs(Button, {
3328
+ type: "submit",
3329
+ variant: "secondary",
3330
+ className: "w-full",
3331
+ disabled: isLoading || disabled,
3332
+ children: [isLoading ? /* @__PURE__ */ jsx(Spinner, {
3333
+ size: "sm",
3334
+ className: "mr-2"
3335
+ }) : null, "Send Login Code"]
3336
+ })]
3337
+ })] });
3338
+ }
3339
+ function SignInBlock({ onSubmit, onForgotPassword, onSocialLogin, socialProviders = [], loading = false, error, disabled = false, title = "Sign in", description = "Enter your credentials to access your account", signUpHref, onSignUp, className, children, onOtpRequest, onOtpVerify, otpLabel = "Email me a code" }) {
3340
+ const [activeTab, setActiveTab] = React.useState(AUTH_TABS.PASSWORD);
3341
+ const otpEnabled = Boolean(onOtpRequest && onOtpVerify);
2856
3342
  const handleSubmit = async (e) => {
2857
3343
  e.preventDefault();
2858
3344
  const formData = new FormData(e.currentTarget);
2859
3345
  await onSubmit({
2860
3346
  email: formData.get("email"),
2861
- password: formData.get("password"),
2862
- rememberMe
3347
+ password: formData.get("password")
2863
3348
  });
2864
3349
  };
3350
+ const passwordForm = /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(FormError, { message: error }), /* @__PURE__ */ jsxs("form", {
3351
+ onSubmit: handleSubmit,
3352
+ className: "space-y-4",
3353
+ children: [
3354
+ /* @__PURE__ */ jsx(InputGroup, {
3355
+ label: "Email",
3356
+ htmlFor: "email",
3357
+ children: /* @__PURE__ */ jsx(Input, {
3358
+ id: "email",
3359
+ name: "email",
3360
+ type: "email",
3361
+ placeholder: "name@example.com",
3362
+ required: true,
3363
+ disabled: loading || disabled,
3364
+ autoComplete: "email"
3365
+ })
3366
+ }),
3367
+ /* @__PURE__ */ jsxs(InputGroup, {
3368
+ label: "Password",
3369
+ htmlFor: "password",
3370
+ children: [/* @__PURE__ */ jsx(PasswordInput, {
3371
+ id: "password",
3372
+ name: "password",
3373
+ required: true,
3374
+ disabled: loading || disabled,
3375
+ autoComplete: "current-password"
3376
+ }), onForgotPassword && /* @__PURE__ */ jsx("div", {
3377
+ className: "flex justify-end",
3378
+ children: /* @__PURE__ */ jsx("button", {
3379
+ type: "button",
3380
+ onClick: onForgotPassword,
3381
+ className: "text-sm text-primary hover:underline",
3382
+ tabIndex: -1,
3383
+ children: "Forgot password?"
3384
+ })
3385
+ })]
3386
+ }),
3387
+ /* @__PURE__ */ jsxs(Button, {
3388
+ type: "submit",
3389
+ variant: "secondary",
3390
+ className: "w-full",
3391
+ disabled: loading || disabled,
3392
+ children: [loading ? /* @__PURE__ */ jsx(Spinner, {
3393
+ size: "sm",
3394
+ className: "mr-2"
3395
+ }) : null, "Sign in"]
3396
+ })
3397
+ ]
3398
+ })] });
3399
+ const socialSection = socialProviders.length > 0 && onSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
3400
+ className: "relative",
3401
+ children: [/* @__PURE__ */ jsx("div", {
3402
+ className: "absolute inset-0 flex items-center",
3403
+ children: /* @__PURE__ */ jsx(Separator, { className: "w-full" })
3404
+ }), /* @__PURE__ */ jsx("div", {
3405
+ className: "relative flex justify-center text-xs uppercase",
3406
+ children: /* @__PURE__ */ jsx("span", {
3407
+ className: "bg-card px-2 text-muted-foreground",
3408
+ children: "or"
3409
+ })
3410
+ })]
3411
+ }), /* @__PURE__ */ jsx(SocialProviders, {
3412
+ providers: socialProviders,
3413
+ onSocialLogin,
3414
+ loading,
3415
+ disabled
3416
+ })] });
3417
+ const footerLinks = /* @__PURE__ */ jsx(Fragment, { children: (signUpHref || onSignUp) && /* @__PURE__ */ jsxs("p", {
3418
+ className: "text-center text-sm text-muted-foreground",
3419
+ children: [
3420
+ "Don't have an account?",
3421
+ " ",
3422
+ onSignUp ? /* @__PURE__ */ jsx("button", {
3423
+ type: "button",
3424
+ onClick: onSignUp,
3425
+ className: "text-primary hover:underline font-medium",
3426
+ children: "Sign up"
3427
+ }) : /* @__PURE__ */ jsx("a", {
3428
+ href: signUpHref,
3429
+ className: "text-primary hover:underline font-medium",
3430
+ children: "Sign up"
3431
+ })
3432
+ ]
3433
+ }) });
2865
3434
  return /* @__PURE__ */ jsxs(Card, {
2866
3435
  className: cn("w-full max-w-md mx-auto", className),
2867
3436
  children: [/* @__PURE__ */ jsxs(CardHeader, {
@@ -2870,108 +3439,46 @@ function SignInBlock({ onSubmit, onForgotPassword, onSocialLogin, socialProvider
2870
3439
  }), /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", {
2871
3440
  className: "space-y-4",
2872
3441
  children: [
2873
- socialProviders.length > 0 && onSocialLogin && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SocialProviders, {
2874
- providers: socialProviders,
2875
- onSocialLogin,
2876
- loading,
2877
- disabled
2878
- }), /* @__PURE__ */ jsxs("div", {
2879
- className: "relative",
2880
- children: [/* @__PURE__ */ jsx("div", {
2881
- className: "absolute inset-0 flex items-center",
2882
- children: /* @__PURE__ */ jsx(Separator, { className: "w-full" })
2883
- }), /* @__PURE__ */ jsx("div", {
2884
- className: "relative flex justify-center text-xs uppercase",
2885
- children: /* @__PURE__ */ jsx("span", {
2886
- className: "bg-card px-2 text-muted-foreground",
2887
- children: "Or continue with"
2888
- })
2889
- })]
2890
- })] }),
2891
- /* @__PURE__ */ jsx(FormError, { message: error }),
2892
- /* @__PURE__ */ jsxs("form", {
2893
- onSubmit: handleSubmit,
2894
- className: "space-y-4",
2895
- children: [
2896
- /* @__PURE__ */ jsxs("div", {
2897
- className: "space-y-2",
2898
- children: [/* @__PURE__ */ jsx(Label, {
2899
- htmlFor: "email",
2900
- children: "Email"
2901
- }), /* @__PURE__ */ jsx(Input, {
2902
- id: "email",
2903
- name: "email",
2904
- type: "email",
2905
- placeholder: "name@example.com",
2906
- required: true,
2907
- disabled: loading || disabled,
2908
- autoComplete: "email"
2909
- })]
2910
- }),
2911
- /* @__PURE__ */ jsxs("div", {
2912
- className: "space-y-2",
2913
- children: [
2914
- /* @__PURE__ */ jsx(Label, {
2915
- htmlFor: "password",
2916
- children: "Password"
2917
- }),
2918
- /* @__PURE__ */ jsx(PasswordInput, {
2919
- id: "password",
2920
- name: "password",
2921
- required: true,
2922
- disabled: loading || disabled,
2923
- autoComplete: "current-password"
2924
- }),
2925
- onForgotPassword && /* @__PURE__ */ jsx("button", {
2926
- type: "button",
2927
- onClick: onForgotPassword,
2928
- className: "text-sm text-primary hover:underline self-start",
2929
- tabIndex: 0,
2930
- children: "Forgot password?"
2931
- })
2932
- ]
2933
- }),
2934
- /* @__PURE__ */ jsxs("div", {
2935
- className: "flex items-center space-x-2",
2936
- children: [/* @__PURE__ */ jsx(Checkbox, {
2937
- id: "remember",
2938
- checked: rememberMe,
2939
- onCheckedChange: (checked) => setRememberMe(checked === true),
2940
- disabled: loading || disabled
2941
- }), /* @__PURE__ */ jsx("label", {
2942
- htmlFor: "remember",
2943
- className: "text-sm text-muted-foreground cursor-pointer",
2944
- children: "Remember me"
2945
- })]
2946
- }),
2947
- /* @__PURE__ */ jsxs(Button, {
2948
- type: "submit",
2949
- className: "w-full",
2950
- disabled: loading || disabled,
2951
- children: [loading ? /* @__PURE__ */ jsx(Spinner, {
2952
- size: "sm",
2953
- className: "mr-2"
2954
- }) : null, "Sign in"]
2955
- })
2956
- ]
2957
- }),
2958
- (signUpHref || onSignUp) && /* @__PURE__ */ jsxs("p", {
2959
- className: "text-center text-sm text-muted-foreground",
2960
- children: [
2961
- "Don't have an account?",
2962
- " ",
2963
- onSignUp ? /* @__PURE__ */ jsx("button", {
2964
- type: "button",
2965
- onClick: onSignUp,
2966
- className: "text-primary hover:underline font-medium",
2967
- children: "Sign up"
2968
- }) : /* @__PURE__ */ jsx("a", {
2969
- href: signUpHref,
2970
- className: "text-primary hover:underline font-medium",
2971
- children: "Sign up"
2972
- })
2973
- ]
2974
- })
3442
+ children ? children : otpEnabled ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PillTabs, {
3443
+ activeTab,
3444
+ onTabChange: setActiveTab,
3445
+ otpLabel
3446
+ }), /* @__PURE__ */ jsx(motion.div, {
3447
+ layout: true,
3448
+ transition: {
3449
+ type: "spring",
3450
+ bounce: 0,
3451
+ duration: .4
3452
+ },
3453
+ className: "",
3454
+ children: /* @__PURE__ */ jsx(AnimatePresence, {
3455
+ mode: "wait",
3456
+ initial: false,
3457
+ children: activeTab === AUTH_TABS.PASSWORD ? /* @__PURE__ */ jsx(motion.div, {
3458
+ initial: { opacity: 0 },
3459
+ animate: { opacity: 1 },
3460
+ exit: { opacity: 0 },
3461
+ transition: { duration: .15 },
3462
+ className: "space-y-4",
3463
+ children: passwordForm
3464
+ }, "password") : /* @__PURE__ */ jsx(motion.div, {
3465
+ initial: { opacity: 0 },
3466
+ animate: { opacity: 1 },
3467
+ exit: { opacity: 0 },
3468
+ transition: { duration: .15 },
3469
+ className: "space-y-4",
3470
+ children: /* @__PURE__ */ jsx(OtpForm, {
3471
+ onOtpRequest,
3472
+ onOtpVerify,
3473
+ loading,
3474
+ disabled,
3475
+ error
3476
+ })
3477
+ }, "otp")
3478
+ })
3479
+ })] }) : passwordForm,
3480
+ socialSection,
3481
+ footerLinks
2975
3482
  ]
2976
3483
  }) })]
2977
3484
  });
@@ -3022,26 +3529,22 @@ function SignUpBlock({ onSubmit, onSocialLogin, socialProviders = [], loading =
3022
3529
  onSubmit: handleSubmit,
3023
3530
  className: "space-y-4",
3024
3531
  children: [
3025
- /* @__PURE__ */ jsxs("div", {
3026
- className: "space-y-2",
3027
- children: [/* @__PURE__ */ jsx(Label, {
3028
- htmlFor: "name",
3029
- children: "Full name"
3030
- }), /* @__PURE__ */ jsx(Input, {
3532
+ /* @__PURE__ */ jsx(InputGroup, {
3533
+ label: "Full name",
3534
+ htmlFor: "name",
3535
+ children: /* @__PURE__ */ jsx(Input, {
3031
3536
  id: "name",
3032
3537
  name: "name",
3033
3538
  placeholder: "John Doe",
3034
3539
  required: true,
3035
3540
  disabled: loading || disabled,
3036
3541
  autoComplete: "name"
3037
- })]
3542
+ })
3038
3543
  }),
3039
- /* @__PURE__ */ jsxs("div", {
3040
- className: "space-y-2",
3041
- children: [/* @__PURE__ */ jsx(Label, {
3042
- htmlFor: "email",
3043
- children: "Email"
3044
- }), /* @__PURE__ */ jsx(Input, {
3544
+ /* @__PURE__ */ jsx(InputGroup, {
3545
+ label: "Email",
3546
+ htmlFor: "email",
3547
+ children: /* @__PURE__ */ jsx(Input, {
3045
3548
  id: "email",
3046
3549
  name: "email",
3047
3550
  type: "email",
@@ -3049,33 +3552,29 @@ function SignUpBlock({ onSubmit, onSocialLogin, socialProviders = [], loading =
3049
3552
  required: true,
3050
3553
  disabled: loading || disabled,
3051
3554
  autoComplete: "email"
3052
- })]
3555
+ })
3053
3556
  }),
3054
- /* @__PURE__ */ jsxs("div", {
3055
- className: "space-y-2",
3056
- children: [/* @__PURE__ */ jsx(Label, {
3057
- htmlFor: "password",
3058
- children: "Password"
3059
- }), /* @__PURE__ */ jsx(PasswordInput, {
3557
+ /* @__PURE__ */ jsx(InputGroup, {
3558
+ label: "Password",
3559
+ htmlFor: "password",
3560
+ children: /* @__PURE__ */ jsx(PasswordInput, {
3060
3561
  id: "password",
3061
3562
  name: "password",
3062
3563
  required: true,
3063
3564
  disabled: loading || disabled,
3064
3565
  autoComplete: "new-password"
3065
- })]
3566
+ })
3066
3567
  }),
3067
- /* @__PURE__ */ jsxs("div", {
3068
- className: "space-y-2",
3069
- children: [/* @__PURE__ */ jsx(Label, {
3070
- htmlFor: "confirmPassword",
3071
- children: "Confirm password"
3072
- }), /* @__PURE__ */ jsx(PasswordInput, {
3568
+ /* @__PURE__ */ jsx(InputGroup, {
3569
+ label: "Confirm password",
3570
+ htmlFor: "confirmPassword",
3571
+ children: /* @__PURE__ */ jsx(PasswordInput, {
3073
3572
  id: "confirmPassword",
3074
3573
  name: "confirmPassword",
3075
3574
  required: true,
3076
3575
  disabled: loading || disabled,
3077
3576
  autoComplete: "new-password"
3078
- })]
3577
+ })
3079
3578
  }),
3080
3579
  /* @__PURE__ */ jsxs("div", {
3081
3580
  className: "flex items-start space-x-2",
@@ -3168,12 +3667,10 @@ function ForgotPasswordBlock({ onSubmit, onBack, loading = false, error, disable
3168
3667
  /* @__PURE__ */ jsxs("form", {
3169
3668
  onSubmit: handleSubmit,
3170
3669
  className: "space-y-4",
3171
- children: [/* @__PURE__ */ jsxs("div", {
3172
- className: "space-y-2",
3173
- children: [/* @__PURE__ */ jsx(Label, {
3174
- htmlFor: "email",
3175
- children: "Email"
3176
- }), /* @__PURE__ */ jsx(Input, {
3670
+ children: [/* @__PURE__ */ jsx(InputGroup, {
3671
+ label: "Email",
3672
+ htmlFor: "email",
3673
+ children: /* @__PURE__ */ jsx(Input, {
3177
3674
  id: "email",
3178
3675
  name: "email",
3179
3676
  type: "email",
@@ -3181,7 +3678,7 @@ function ForgotPasswordBlock({ onSubmit, onBack, loading = false, error, disable
3181
3678
  required: true,
3182
3679
  disabled: loading || disabled,
3183
3680
  autoComplete: "email"
3184
- })]
3681
+ })
3185
3682
  }), /* @__PURE__ */ jsxs(Button, {
3186
3683
  type: "submit",
3187
3684
  className: "w-full",
@@ -3227,31 +3724,27 @@ function ResetPasswordBlock({ onSubmit, loading = false, error, disabled = false
3227
3724
  onSubmit: handleSubmit,
3228
3725
  className: "space-y-4",
3229
3726
  children: [
3230
- /* @__PURE__ */ jsxs("div", {
3231
- className: "space-y-2",
3232
- children: [/* @__PURE__ */ jsx(Label, {
3233
- htmlFor: "password",
3234
- children: "New password"
3235
- }), /* @__PURE__ */ jsx(PasswordInput, {
3727
+ /* @__PURE__ */ jsx(InputGroup, {
3728
+ label: "New password",
3729
+ htmlFor: "password",
3730
+ children: /* @__PURE__ */ jsx(PasswordInput, {
3236
3731
  id: "password",
3237
3732
  name: "password",
3238
3733
  required: true,
3239
3734
  disabled: loading || disabled,
3240
3735
  autoComplete: "new-password"
3241
- })]
3736
+ })
3242
3737
  }),
3243
- /* @__PURE__ */ jsxs("div", {
3244
- className: "space-y-2",
3245
- children: [/* @__PURE__ */ jsx(Label, {
3246
- htmlFor: "confirmPassword",
3247
- children: "Confirm new password"
3248
- }), /* @__PURE__ */ jsx(PasswordInput, {
3738
+ /* @__PURE__ */ jsx(InputGroup, {
3739
+ label: "Confirm new password",
3740
+ htmlFor: "confirmPassword",
3741
+ children: /* @__PURE__ */ jsx(PasswordInput, {
3249
3742
  id: "confirmPassword",
3250
3743
  name: "confirmPassword",
3251
3744
  required: true,
3252
3745
  disabled: loading || disabled,
3253
3746
  autoComplete: "new-password"
3254
- })]
3747
+ })
3255
3748
  }),
3256
3749
  /* @__PURE__ */ jsxs(Button, {
3257
3750
  type: "submit",
@@ -4216,6 +4709,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
4216
4709
  });
4217
4710
  }
4218
4711
  //#endregion
4219
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AppSidebarBlock, AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, BisonProvider, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, 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, 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, EmptyStateBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, 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, 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, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, navigationMenuTriggerStyle, progressBarVariants, spinnerVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
4712
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountSettingsBlock, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, 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, 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, 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, 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, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, navigationMenuTriggerStyle, progressBarVariants, spinnerVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
4220
4713
 
4221
4714
  //# sourceMappingURL=index.mjs.map