@bison-lab/ui 1.7.0 → 1.9.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
@@ -6,7 +6,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { AnimatePresence, motion } from "motion/react";
7
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";
8
8
  import { cva } from "class-variance-authority";
9
- import { AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bold, Calendar as Calendar$1, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CircleX, Code, Eye, EyeOff, FastForward, FileQuestion, Heading1, Heading2, Heading3, Image, Inbox, Info, Italic, Link, List, ListOrdered, LoaderCircle, LogOut, Mail, Menu, Minus, MoreHorizontal, PanelLeft, Pencil, Plus, Quote, Redo, Search, Server, Settings2, ShieldAlert, Star, Strikethrough, TriangleAlert, Underline, Undo, Unlink, Wrench, X } from "lucide-react";
9
+ import { AlignCenter, AlignLeft, AlignRight, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, ArrowUpDown, Bold, Calendar as Calendar$1, Camera, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, ChevronsLeft, ChevronsRight, ChevronsUpDown, Circle, CircleAlert, CircleCheck, CircleHelp, CircleX, Code, Eye, EyeOff, FastForward, FileQuestion, Heading1, Heading2, Heading3, Image, Inbox, Info, Italic, Link, List, ListOrdered, LoaderCircle, LogOut, Mail, MapPin, Menu, Minus, MoreHorizontal, MoveUpRight, PanelLeft, Pause, Pencil, Phone, Play, Plus, Quote, Redo, Search, Server, Settings2, ShieldAlert, Star, Strikethrough, TriangleAlert, Underline, Undo, Unlink, Wrench, X } from "lucide-react";
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";
@@ -297,11 +297,45 @@ const FormContext = React.createContext(void 0);
297
297
  function useFormContext() {
298
298
  return React.useContext(FormContext);
299
299
  }
300
- const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children, className, ...props }, ref) => {
300
+ /**
301
+ * Anything that can take focus. Hidden and disabled controls are excluded —
302
+ * focusing either is a no-op that would strand the user mid-form.
303
+ */
304
+ const FOCUSABLE_SELECTOR = [
305
+ "input:not([type=\"hidden\"]):not([disabled])",
306
+ "select:not([disabled])",
307
+ "textarea:not([disabled])",
308
+ "button:not([disabled])",
309
+ "[tabindex]:not([tabindex=\"-1\"])"
310
+ ].join(", ");
311
+ /**
312
+ * Move focus to the first control the schema rejected (WCAG technique G139).
313
+ *
314
+ * Dives inside the invalid element when the element itself cannot hold focus:
315
+ * a checkbox group marks the `<fieldset>` invalid, and a fieldset is not
316
+ * focusable, so the first checkbox inside it is the right landing point.
317
+ */
318
+ function focusFirstInvalid(form) {
319
+ const invalids = form.querySelectorAll("[aria-invalid=\"true\"]");
320
+ for (const el of Array.from(invalids)) {
321
+ const target = el.matches(FOCUSABLE_SELECTOR) ? el : el.querySelector(FOCUSABLE_SELECTOR);
322
+ if (target) {
323
+ target.focus();
324
+ return;
325
+ }
326
+ }
327
+ }
328
+ function defaultErrorSummary(count) {
329
+ return count === 1 ? "1 field needs attention." : `${count} fields need attention.`;
330
+ }
331
+ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", errors: externalErrors, focusOnError = true, errorSummary = defaultErrorSummary, children, className, noValidate, ...props }, ref) => {
301
332
  const [errors, setErrors] = React.useState({});
302
333
  const [touched, setTouched] = React.useState({});
303
334
  const [isSubmitting, setIsSubmitting] = React.useState(false);
304
335
  const [errorVersion, setErrorVersion] = React.useState(0);
336
+ const [announcement, setAnnouncement] = React.useState("");
337
+ const innerRef = React.useRef(null);
338
+ React.useImperativeHandle(ref, () => innerRef.current);
305
339
  const setFieldError = React.useCallback((name, error) => {
306
340
  setErrors((prev) => ({
307
341
  ...prev,
@@ -326,7 +360,11 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
326
360
  setIsSubmitting(true);
327
361
  setErrors({});
328
362
  const formData = new FormData(e.currentTarget);
329
- const data = Object.fromEntries(formData.entries());
363
+ const data = {};
364
+ for (const key of Array.from(new Set(formData.keys()))) {
365
+ const values = formData.getAll(key);
366
+ data[key] = values.length > 1 ? values : values[0];
367
+ }
330
368
  if (schema) try {
331
369
  schema.parse(data);
332
370
  } catch (err) {
@@ -338,17 +376,32 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
338
376
  }
339
377
  setErrors(fieldErrors);
340
378
  setErrorVersion((v) => v + 1);
379
+ setAnnouncement(errorSummary(Object.keys(fieldErrors).length));
341
380
  setIsSubmitting(false);
342
381
  return;
343
382
  }
383
+ setAnnouncement("");
344
384
  try {
345
385
  await onSubmit?.(data);
346
386
  } finally {
347
387
  setIsSubmitting(false);
348
388
  }
349
- }, [onSubmit, schema]);
389
+ }, [
390
+ onSubmit,
391
+ schema,
392
+ errorSummary
393
+ ]);
394
+ React.useEffect(() => {
395
+ if (!focusOnError || errorVersion === 0) return;
396
+ const form = innerRef.current;
397
+ if (form) focusFirstInvalid(form);
398
+ }, [errorVersion, focusOnError]);
399
+ const mergedErrors = React.useMemo(() => ({
400
+ ...externalErrors,
401
+ ...errors
402
+ }), [externalErrors, errors]);
350
403
  const contextValue = React.useMemo(() => ({
351
- errors,
404
+ errors: mergedErrors,
352
405
  touched,
353
406
  setFieldError,
354
407
  clearFieldError,
@@ -357,7 +410,7 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
357
410
  formMode,
358
411
  errorVersion
359
412
  }), [
360
- errors,
413
+ mergedErrors,
361
414
  touched,
362
415
  setFieldError,
363
416
  clearFieldError,
@@ -368,17 +421,127 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
368
421
  ]);
369
422
  return /* @__PURE__ */ jsx(FormContext.Provider, {
370
423
  value: contextValue,
371
- children: /* @__PURE__ */ jsx("form", {
372
- ref,
424
+ children: /* @__PURE__ */ jsxs("form", {
425
+ ref: innerRef,
373
426
  onSubmit: handleSubmit,
374
427
  className,
428
+ noValidate: noValidate ?? Boolean(schema),
375
429
  ...props,
376
- children
430
+ children: [children, /* @__PURE__ */ jsx("div", {
431
+ "aria-live": "polite",
432
+ "aria-atomic": "true",
433
+ className: "sr-only",
434
+ "data-slot": "form-status",
435
+ children: announcement ? /* @__PURE__ */ jsx("span", { children: announcement }, errorVersion) : null
436
+ })]
377
437
  })
378
438
  });
379
439
  });
380
440
  Form.displayName = "Form";
381
441
  //#endregion
442
+ //#region src/form/field-context.tsx
443
+ const FieldContext = React.createContext(void 0);
444
+ const FieldProvider = FieldContext.Provider;
445
+ /** Read the surrounding field, if there is one. */
446
+ function useField() {
447
+ return React.useContext(FieldContext);
448
+ }
449
+ /**
450
+ * Merge the surrounding field's ARIA wiring into a control's own props.
451
+ *
452
+ * Call it in every control that accepts user input and spread the result onto
453
+ * the DOM node.
454
+ *
455
+ * Inside a field the wrapper OWNS the control's `id`, and a consumer-supplied
456
+ * one is deliberately overridden. The wrapper has already rendered its
457
+ * `<label for>` pointing at the id it published, and it cannot see the child's
458
+ * props to follow it anywhere else — so honouring an override here would leave
459
+ * the label resolving to nothing, which is precisely the defect this context
460
+ * exists to remove. Set the id through the wrapper's `name` / `htmlFor`
461
+ * instead. `aria-invalid` and `aria-required` do defer to an explicit prop,
462
+ * and the field's description ids are APPENDED to any `aria-describedby` the
463
+ * consumer set rather than replacing it.
464
+ *
465
+ * Returns `props` unchanged when there is no field, or when the field is a
466
+ * group.
467
+ */
468
+ function useFieldControl(props) {
469
+ const field = useField();
470
+ if (!field || field.group) return props;
471
+ const describedBy = [
472
+ field.descriptionId,
473
+ field.errorId,
474
+ props["aria-describedby"]
475
+ ].filter(Boolean).join(" ");
476
+ return {
477
+ ...props,
478
+ id: field.controlId,
479
+ "aria-invalid": props["aria-invalid"] ?? (field.invalid || void 0),
480
+ "aria-required": props["aria-required"] ?? (field.required || void 0),
481
+ "aria-describedby": describedBy || void 0
482
+ };
483
+ }
484
+ /**
485
+ * The composite-control counterpart to {@link useFieldControl}.
486
+ *
487
+ * `TimePicker` is three selects and `CodeInput` is six inputs; neither has a
488
+ * single element for the field's label to point at, and a `<label for>` naming
489
+ * a `<div>` names nothing at all. These wrap their children in a labelled
490
+ * `role="group"` instead, so the whole composite is announced once with its
491
+ * error and hint attached.
492
+ *
493
+ * Returns `{}` outside a field wrapper, leaving standalone usage untouched.
494
+ */
495
+ function useFieldGroup() {
496
+ const field = useField();
497
+ if (!field) return {};
498
+ const describedBy = [field.descriptionId, field.errorId].filter(Boolean).join(" ");
499
+ return {
500
+ role: "group",
501
+ "aria-labelledby": field.labelId,
502
+ "aria-describedby": describedBy || void 0,
503
+ "aria-invalid": field.invalid || void 0,
504
+ "aria-required": field.required || void 0
505
+ };
506
+ }
507
+ /**
508
+ * Seals a composite control against the field it sits in.
509
+ *
510
+ * `CodeInput` renders six `<Input>`s and `TimePicker` renders three
511
+ * `<SelectTrigger>`s. Each of those calls {@link useFieldControl}, so without
512
+ * this they would every one of them adopt the SAME field id — six elements
513
+ * sharing `id="code"`, which is worse than the missing wiring this whole
514
+ * mechanism set out to fix. Re-providing the field in group mode turns the
515
+ * hook into a no-op for everything below, leaving the composite's own wrapper
516
+ * ({@link useFieldGroup}) as the single labelled thing.
517
+ */
518
+ function FieldGroupScope({ children }) {
519
+ const field = useField();
520
+ return /* @__PURE__ */ jsx(FieldProvider, {
521
+ value: React.useMemo(() => field ? {
522
+ ...field,
523
+ group: true
524
+ } : void 0, [field]),
525
+ children
526
+ });
527
+ }
528
+ /**
529
+ * Build the ids a wrapper publishes.
530
+ *
531
+ * `useId()` supplies the hint/error ids because nothing outside the wrapper
532
+ * references them, so uniqueness costs nothing. The control id stays
533
+ * caller-derived — see {@link FieldContextValue.controlId}.
534
+ */
535
+ function useFieldIds({ controlId, hasDescription, hasError }) {
536
+ const reactId = React.useId();
537
+ return {
538
+ controlId,
539
+ descriptionId: hasDescription ? `${reactId}-description` : void 0,
540
+ errorId: hasError ? `${reactId}-error` : void 0,
541
+ labelId: `${reactId}-label`
542
+ };
543
+ }
544
+ //#endregion
382
545
  //#region src/components/outlined-field.tsx
383
546
  /**
384
547
  * Strips border / ring from nested form controls so the outer outlined shell
@@ -397,6 +560,29 @@ function detectControlKind(shell) {
397
560
  return "other";
398
561
  }
399
562
  const OutlinedField = React.forwardRef(({ label, htmlFor, error, errorVersion = 0, hint, required, className, children }, ref) => {
563
+ const fallbackId = React.useId();
564
+ const controlId = htmlFor ?? `${fallbackId}-control`;
565
+ const { descriptionId, errorId, labelId } = useFieldIds({
566
+ controlId,
567
+ hasDescription: Boolean(hint) && !error,
568
+ hasError: Boolean(error)
569
+ });
570
+ const field = React.useMemo(() => ({
571
+ controlId,
572
+ descriptionId,
573
+ errorId,
574
+ labelId,
575
+ invalid: Boolean(error),
576
+ required: Boolean(required),
577
+ group: false
578
+ }), [
579
+ controlId,
580
+ descriptionId,
581
+ errorId,
582
+ labelId,
583
+ error,
584
+ required
585
+ ]);
400
586
  const shellRef = React.useRef(null);
401
587
  const [focused, setFocused] = React.useState(false);
402
588
  const [hasValue, setHasValue] = React.useState(false);
@@ -456,53 +642,84 @@ const OutlinedField = React.forwardRef(({ label, htmlFor, error, errorVersion =
456
642
  x: 0,
457
643
  y: "-50%"
458
644
  };
459
- return /* @__PURE__ */ jsxs("div", {
460
- ref,
461
- className: cn("flex flex-col gap-1.5", className),
462
- children: [
463
- /* @__PURE__ */ jsxs("div", {
464
- ref: shellRef,
465
- 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", error && "border-destructive bison-shake", outlinedFieldNestResetClasses, isTextarea ? "flex min-h-[80px] flex-col py-2" : "flex h-[var(--density-height-md)] items-stretch pointer-coarse:min-h-11", !isFloated && !focused && "[&_input]:placeholder:text-transparent [&_textarea]:placeholder:text-transparent"),
466
- onInputCapture: handleInputCapture,
467
- children: [/* @__PURE__ */ jsxs(motion.label, {
468
- htmlFor,
469
- 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"),
470
- style: { transformOrigin: "left center" },
471
- initial: false,
472
- animate: labelAnimate,
473
- transition: {
474
- type: "spring",
475
- stiffness: 520,
476
- damping: 34
477
- },
478
- children: [label, required ? /* @__PURE__ */ jsx("span", {
479
- className: "ml-0.5 text-destructive",
480
- children: "*"
481
- }) : null]
482
- }), /* @__PURE__ */ jsx("div", {
483
- 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"),
484
- children
485
- })]
486
- }),
487
- error ? /* @__PURE__ */ jsx("p", {
488
- className: "text-sm leading-none text-destructive",
489
- children: error
490
- }) : null,
491
- !error && hint ? /* @__PURE__ */ jsx("p", {
492
- className: "text-sm leading-none text-muted-foreground",
493
- children: hint
494
- }) : null
495
- ]
645
+ return /* @__PURE__ */ jsx(FieldProvider, {
646
+ value: field,
647
+ children: /* @__PURE__ */ jsxs("div", {
648
+ ref,
649
+ className: cn("flex flex-col gap-1.5", className),
650
+ children: [
651
+ /* @__PURE__ */ jsxs("div", {
652
+ ref: shellRef,
653
+ 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", error && "border-destructive bison-shake", outlinedFieldNestResetClasses, isTextarea ? "flex min-h-[80px] flex-col py-2" : "flex h-[var(--density-height-md)] items-stretch pointer-coarse:min-h-11", !isFloated && !focused && "[&_input]:placeholder:text-transparent [&_textarea]:placeholder:text-transparent"),
654
+ onInputCapture: handleInputCapture,
655
+ children: [/* @__PURE__ */ jsxs(motion.label, {
656
+ id: labelId,
657
+ htmlFor: controlId,
658
+ 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"),
659
+ style: { transformOrigin: "left center" },
660
+ initial: false,
661
+ animate: labelAnimate,
662
+ transition: {
663
+ type: "spring",
664
+ stiffness: 520,
665
+ damping: 34
666
+ },
667
+ children: [label, required ? /* @__PURE__ */ jsx("span", {
668
+ "aria-hidden": "true",
669
+ className: "ml-0.5 text-destructive",
670
+ children: "*"
671
+ }) : null]
672
+ }), /* @__PURE__ */ jsx("div", {
673
+ 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"),
674
+ children
675
+ })]
676
+ }),
677
+ error ? /* @__PURE__ */ jsx("p", {
678
+ id: errorId,
679
+ className: "text-sm leading-none text-destructive",
680
+ children: error
681
+ }) : null,
682
+ !error && hint ? /* @__PURE__ */ jsx("p", {
683
+ id: descriptionId,
684
+ className: "text-sm leading-none text-muted-foreground",
685
+ children: hint
686
+ }) : null
687
+ ]
688
+ })
496
689
  });
497
690
  });
498
691
  OutlinedField.displayName = "OutlinedField";
499
692
  //#endregion
500
693
  //#region src/form/form-field.tsx
501
- function FormField({ name, label, description, required, labelLayout = "stack", className, children }) {
694
+ function FormField({ name, label, description, required, labelLayout = "stack", as = "field", className, children }) {
502
695
  const formCtx = useFormContext();
503
696
  const errorMessage = formCtx?.errors[name];
504
697
  const errorVersion = formCtx?.errorVersion ?? 0;
505
698
  const wrapRef = React.useRef(null);
699
+ const { controlId, descriptionId, errorId, labelId } = useFieldIds({
700
+ controlId: name,
701
+ hasDescription: Boolean(description) && !errorMessage,
702
+ hasError: Boolean(errorMessage)
703
+ });
704
+ const isGroup = as === "group";
705
+ const field = React.useMemo(() => ({
706
+ controlId,
707
+ descriptionId,
708
+ errorId,
709
+ labelId: label ? labelId : void 0,
710
+ invalid: Boolean(errorMessage),
711
+ required: Boolean(required),
712
+ group: isGroup
713
+ }), [
714
+ controlId,
715
+ descriptionId,
716
+ errorId,
717
+ labelId,
718
+ label,
719
+ errorMessage,
720
+ required,
721
+ isGroup
722
+ ]);
506
723
  React.useEffect(() => {
507
724
  const el = wrapRef.current;
508
725
  if (!el || !errorMessage) return;
@@ -510,7 +727,7 @@ function FormField({ name, label, description, required, labelLayout = "stack",
510
727
  el.offsetWidth;
511
728
  el.style.animation = "";
512
729
  }, [errorVersion, errorMessage]);
513
- if (label && labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
730
+ if (!isGroup && label && labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
514
731
  label,
515
732
  htmlFor: name,
516
733
  required,
@@ -520,28 +737,56 @@ function FormField({ name, label, description, required, labelLayout = "stack",
520
737
  className,
521
738
  children
522
739
  });
523
- return /* @__PURE__ */ jsxs("div", {
524
- ref: wrapRef,
525
- className: cn("flex flex-col", errorMessage && "bison-shake", className),
526
- children: [
527
- label && /* @__PURE__ */ jsxs("label", {
528
- htmlFor: name,
529
- className: "mb-1.5 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
530
- children: [label, required && /* @__PURE__ */ jsx("span", {
531
- className: "text-destructive ml-1",
532
- children: "*"
533
- })]
534
- }),
535
- children,
536
- description && !errorMessage && /* @__PURE__ */ jsx("p", {
537
- className: "mt-1.5 text-sm leading-none text-muted-foreground",
538
- children: description
539
- }),
540
- errorMessage && /* @__PURE__ */ jsx("p", {
541
- className: "mt-1.5 text-sm leading-none text-destructive",
542
- children: errorMessage
543
- })
544
- ]
740
+ const describedBy = [descriptionId, errorId].filter(Boolean).join(" ") || void 0;
741
+ const messages = /* @__PURE__ */ jsxs(Fragment, { children: [description && !errorMessage && /* @__PURE__ */ jsx("p", {
742
+ id: descriptionId,
743
+ className: "mt-1.5 text-sm leading-none text-muted-foreground",
744
+ children: description
745
+ }), errorMessage && /* @__PURE__ */ jsx("p", {
746
+ id: errorId,
747
+ className: "mt-1.5 text-sm leading-none text-destructive",
748
+ children: errorMessage
749
+ })] });
750
+ const requiredMark = required ? /* @__PURE__ */ jsx("span", {
751
+ "aria-hidden": "true",
752
+ className: "text-destructive ml-1",
753
+ children: "*"
754
+ }) : null;
755
+ if (isGroup) return /* @__PURE__ */ jsx(FieldProvider, {
756
+ value: field,
757
+ children: /* @__PURE__ */ jsxs("fieldset", {
758
+ ref: wrapRef,
759
+ className: cn("flex flex-col", errorMessage && "bison-shake", className),
760
+ "aria-describedby": describedBy,
761
+ "aria-invalid": errorMessage ? true : void 0,
762
+ "aria-required": required || void 0,
763
+ children: [
764
+ label && /* @__PURE__ */ jsxs("legend", {
765
+ id: labelId,
766
+ className: "mb-1.5 text-sm font-medium leading-none",
767
+ children: [label, requiredMark]
768
+ }),
769
+ children,
770
+ messages
771
+ ]
772
+ })
773
+ });
774
+ return /* @__PURE__ */ jsx(FieldProvider, {
775
+ value: field,
776
+ children: /* @__PURE__ */ jsxs("div", {
777
+ ref: wrapRef,
778
+ className: cn("flex flex-col", errorMessage && "bison-shake", className),
779
+ children: [
780
+ label && /* @__PURE__ */ jsxs("label", {
781
+ id: labelId,
782
+ htmlFor: controlId,
783
+ className: "mb-1.5 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
784
+ children: [label, requiredMark]
785
+ }),
786
+ children,
787
+ messages
788
+ ]
789
+ })
545
790
  });
546
791
  }
547
792
  //#endregion
@@ -747,26 +992,29 @@ const centeredModalContentClasses = "fixed left-[50%] top-[50%] z-[var(--z-modal
747
992
  //#endregion
748
993
  //#region src/components/input.tsx
749
994
  const Input = React.forwardRef(({ className, type, ...props }, ref) => {
995
+ const fieldProps = useFieldControl(props);
750
996
  return /* @__PURE__ */ jsx("input", {
751
997
  type,
752
998
  className: cn(inputSurfaceClasses, inputSizingClasses("md"), inputFocusClasses, "file:border-0 file:bg-transparent file:text-base file:font-medium sm:file:text-sm", className),
753
999
  ref,
754
- ...props
1000
+ ...fieldProps
755
1001
  });
756
1002
  });
757
1003
  Input.displayName = "Input";
758
1004
  //#endregion
759
1005
  //#region src/components/password-input.tsx
760
- const PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
1006
+ const PasswordInput = React.forwardRef(({ className, toggleLabel = "Show or hide password", ...props }, ref) => {
1007
+ const fieldProps = useFieldControl(props);
761
1008
  return /* @__PURE__ */ jsx(unstable_PasswordToggleField.Root, { children: /* @__PURE__ */ jsxs("div", {
762
1009
  className: "relative",
763
1010
  children: [/* @__PURE__ */ jsx(unstable_PasswordToggleField.Input, {
764
1011
  className: cn(inputSurfaceClasses, inputSizingClasses("md"), inputFocusClasses, "pr-10 file:border-0 file:bg-transparent file:text-base file:font-medium sm:file:text-sm", className),
765
1012
  ref,
766
- ...props
1013
+ ...fieldProps
767
1014
  }), /* @__PURE__ */ jsx(unstable_PasswordToggleField.Toggle, {
768
1015
  className: "absolute right-0 top-0 flex h-full w-10 items-center justify-center text-muted-foreground hover:text-foreground transition-colors disabled:pointer-events-none disabled:opacity-50",
769
1016
  disabled: props.disabled,
1017
+ "aria-label": toggleLabel,
770
1018
  children: /* @__PURE__ */ jsx(unstable_PasswordToggleField.Icon, {
771
1019
  visible: /* @__PURE__ */ jsx(EyeOff, { className: "h-4 w-4" }),
772
1020
  hidden: /* @__PURE__ */ jsx(Eye, { className: "h-4 w-4" })
@@ -777,7 +1025,8 @@ const PasswordInput = React.forwardRef(({ className, ...props }, ref) => {
777
1025
  PasswordInput.displayName = "PasswordInput";
778
1026
  //#endregion
779
1027
  //#region src/components/code-input.tsx
780
- const CodeInput = React.forwardRef(({ length = 6, onComplete, onChange, loading = false, disabled = false, className }, ref) => {
1028
+ const CodeInput = React.forwardRef(({ length = 6, onComplete, onChange, loading = false, disabled = false, className, digitLabel = (position, total) => `Digit ${position} of ${total}` }, ref) => {
1029
+ const groupProps = useFieldGroup();
781
1030
  const [code, setCode] = React.useState(Array(length).fill(""));
782
1031
  const inputRefs = React.useRef([]);
783
1032
  const updateCode = React.useCallback((newCode) => {
@@ -816,7 +1065,8 @@ const CodeInput = React.forwardRef(({ length = 6, onComplete, onChange, loading
816
1065
  ref,
817
1066
  className: cn("flex justify-center gap-2", className),
818
1067
  onPaste: handlePaste,
819
- children: code.map((digit, index) => /* @__PURE__ */ jsx(Input, {
1068
+ ...groupProps,
1069
+ children: /* @__PURE__ */ jsx(FieldGroupScope, { children: code.map((digit, index) => /* @__PURE__ */ jsx(Input, {
820
1070
  ref: (el) => {
821
1071
  inputRefs.current[index] = el;
822
1072
  },
@@ -828,8 +1078,9 @@ const CodeInput = React.forwardRef(({ length = 6, onComplete, onChange, loading
828
1078
  onKeyDown: (e) => handleKeyDown(index, e),
829
1079
  disabled: loading || disabled,
830
1080
  className: "h-12 w-12 text-center text-lg font-semibold",
831
- autoFocus: index === 0
832
- }, index))
1081
+ autoFocus: index === 0,
1082
+ "aria-label": digitLabel(index + 1, length)
1083
+ }, index)) })
833
1084
  });
834
1085
  });
835
1086
  CodeInput.displayName = "CodeInput";
@@ -856,6 +1107,7 @@ function fromCents(cents) {
856
1107
  return (cents / 100).toFixed(2);
857
1108
  }
858
1109
  const CurrencyInput = React.forwardRef(({ className, value, onChange, symbol = "$", ...props }, ref) => {
1110
+ const fieldProps = useFieldControl(props);
859
1111
  const [display, setDisplay] = React.useState(() => fromCents(value));
860
1112
  const prevValue = React.useRef(value);
861
1113
  if (value !== prevValue.current) {
@@ -886,15 +1138,14 @@ const CurrencyInput = React.forwardRef(({ className, value, onChange, symbol = "
886
1138
  onChange: handleChange,
887
1139
  onBlur: handleBlur,
888
1140
  className: cn(inputSurfaceClasses, inputSizingClasses("md"), inputFocusClasses, "pl-7 pr-3 text-sm", className),
889
- ...props
1141
+ ...fieldProps
890
1142
  })]
891
1143
  });
892
1144
  });
893
1145
  CurrencyInput.displayName = "CurrencyInput";
894
1146
  //#endregion
895
- //#region src/components/phone-input.tsx
1147
+ //#region src/lib/us-phone.ts
896
1148
  const PHONE_MAX_DIGITS = 10;
897
- const PHONE_MAX_LENGTH = 14;
898
1149
  /** Strips non-digits and caps at 10 (US NANP). */
899
1150
  function parseUsPhoneDigits(value) {
900
1151
  return value.replace(/\D/g, "").slice(0, PHONE_MAX_DIGITS);
@@ -906,6 +1157,22 @@ function formatUsPhone(value) {
906
1157
  if (d.length <= 6) return `(${d.slice(0, 3)}) ${d.slice(3)}`;
907
1158
  return `(${d.slice(0, 3)}) ${d.slice(3, 6)}-${d.slice(6)}`;
908
1159
  }
1160
+ /**
1161
+ * Deliberately NOT a `'use client'` module, and deliberately not living in
1162
+ * `phone-input.tsx` any more.
1163
+ *
1164
+ * `validators.ts` needs `parseUsPhoneDigits`, and it is consumed from Server
1165
+ * Actions. Importing it from the component file dragged the whole client
1166
+ * component in behind it, and every output of the main entry carries a
1167
+ * `"use client"` banner — so calling the validator on the server failed with
1168
+ * "Attempted to call … from the server but … is on the client".
1169
+ *
1170
+ * Keep this file free of React, and free of imports from anything holding a
1171
+ * `'use client'` directive.
1172
+ */
1173
+ //#endregion
1174
+ //#region src/components/phone-input.tsx
1175
+ const PHONE_MAX_LENGTH = 14;
909
1176
  const PhoneInput = React.forwardRef(function PhoneInput({ value: valueProp, defaultValue = "", onChange, autoComplete = "tel", ...props }, ref) {
910
1177
  const isControlled = valueProp !== void 0;
911
1178
  const [uncontrolledDigits, setUncontrolledDigits] = React.useState(() => parseUsPhoneDigits(defaultValue));
@@ -945,47 +1212,78 @@ Label.displayName = Label$1.Root.displayName;
945
1212
  //#endregion
946
1213
  //#region src/components/input-group.tsx
947
1214
  const InputGroup = React.forwardRef(({ label, htmlFor, error, hint, required, labelLayout = "stack", className, children }, ref) => {
1215
+ const fallbackId = React.useId();
1216
+ const controlId = htmlFor ?? `${fallbackId}-control`;
1217
+ const { descriptionId, errorId, labelId } = useFieldIds({
1218
+ controlId,
1219
+ hasDescription: Boolean(hint) && !error,
1220
+ hasError: Boolean(error)
1221
+ });
1222
+ const field = React.useMemo(() => ({
1223
+ controlId,
1224
+ descriptionId,
1225
+ errorId,
1226
+ labelId,
1227
+ invalid: Boolean(error),
1228
+ required: Boolean(required),
1229
+ group: false
1230
+ }), [
1231
+ controlId,
1232
+ descriptionId,
1233
+ errorId,
1234
+ labelId,
1235
+ error,
1236
+ required
1237
+ ]);
948
1238
  if (labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
949
1239
  ref,
950
1240
  label,
951
- htmlFor,
1241
+ htmlFor: controlId,
952
1242
  error,
953
1243
  hint,
954
1244
  required,
955
1245
  className,
956
1246
  children
957
1247
  });
958
- return /* @__PURE__ */ jsxs("div", {
959
- ref,
960
- className: cn("flex flex-col gap-2", className),
961
- children: [
962
- /* @__PURE__ */ jsxs(Label, {
963
- htmlFor,
964
- children: [label, required && /* @__PURE__ */ jsx("span", {
965
- className: "ml-0.5 text-destructive",
966
- children: "*"
967
- })]
968
- }),
969
- children,
970
- error && /* @__PURE__ */ jsx("p", {
971
- className: "text-sm text-destructive",
972
- children: error
973
- }),
974
- !error && hint && /* @__PURE__ */ jsx("p", {
975
- className: "text-sm text-muted-foreground",
976
- children: hint
977
- })
978
- ]
1248
+ return /* @__PURE__ */ jsx(FieldProvider, {
1249
+ value: field,
1250
+ children: /* @__PURE__ */ jsxs("div", {
1251
+ ref,
1252
+ className: cn("flex flex-col gap-2", className),
1253
+ children: [
1254
+ /* @__PURE__ */ jsxs(Label, {
1255
+ id: labelId,
1256
+ htmlFor: controlId,
1257
+ children: [label, required && /* @__PURE__ */ jsx("span", {
1258
+ "aria-hidden": "true",
1259
+ className: "ml-0.5 text-destructive",
1260
+ children: "*"
1261
+ })]
1262
+ }),
1263
+ children,
1264
+ error && /* @__PURE__ */ jsx("p", {
1265
+ id: errorId,
1266
+ className: "text-sm text-destructive",
1267
+ children: error
1268
+ }),
1269
+ !error && hint && /* @__PURE__ */ jsx("p", {
1270
+ id: descriptionId,
1271
+ className: "text-sm text-muted-foreground",
1272
+ children: hint
1273
+ })
1274
+ ]
1275
+ })
979
1276
  });
980
1277
  });
981
1278
  InputGroup.displayName = "InputGroup";
982
1279
  //#endregion
983
1280
  //#region src/components/textarea.tsx
984
1281
  const Textarea = React.forwardRef(({ className, ...props }, ref) => {
1282
+ const fieldProps = useFieldControl(props);
985
1283
  return /* @__PURE__ */ jsx("textarea", {
986
1284
  className: cn(inputSurfaceClasses, "min-h-[80px] px-3 py-2", inputFocusClasses, className),
987
1285
  ref,
988
- ...props
1286
+ ...fieldProps
989
1287
  });
990
1288
  });
991
1289
  Textarea.displayName = "Textarea";
@@ -994,15 +1292,18 @@ Textarea.displayName = "Textarea";
994
1292
  const Select = Select$1.Root;
995
1293
  const SelectGroup = Select$1.Group;
996
1294
  const SelectValue = Select$1.Value;
997
- const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(Select$1.Trigger, {
998
- ref,
999
- className: cn(inputSurfaceClasses, inputSizingClasses("md"), inputFocusClasses, "items-center justify-between [&>span]:line-clamp-1", className),
1000
- ...props,
1001
- children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
1002
- asChild: true,
1003
- children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" })
1004
- })]
1005
- }));
1295
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => {
1296
+ const fieldProps = useFieldControl(props);
1297
+ return /* @__PURE__ */ jsxs(Select$1.Trigger, {
1298
+ ref,
1299
+ className: cn(inputSurfaceClasses, inputSizingClasses("md"), inputFocusClasses, "items-center justify-between [&>span]:line-clamp-1", className),
1300
+ ...fieldProps,
1301
+ children: [children, /* @__PURE__ */ jsx(Select$1.Icon, {
1302
+ asChild: true,
1303
+ children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" })
1304
+ })]
1305
+ });
1306
+ });
1006
1307
  SelectTrigger.displayName = Select$1.Trigger.displayName;
1007
1308
  const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Select$1.ScrollUpButton, {
1008
1309
  ref,
@@ -1105,6 +1406,7 @@ PopoverContent.displayName = Popover$1.Content.displayName;
1105
1406
  //#endregion
1106
1407
  //#region src/components/date-picker.tsx
1107
1408
  const DatePicker = React.forwardRef(({ value, onChange, placeholder = "Pick a date", dateFormat = "PPP", disabled = false, className, fromDate, toDate, disabledDates }, ref) => {
1409
+ const fieldProps = useFieldControl({});
1108
1410
  const [open, setOpen] = React.useState(false);
1109
1411
  const handleSelect = (date) => {
1110
1412
  onChange?.(date);
@@ -1120,6 +1422,7 @@ const DatePicker = React.forwardRef(({ value, onChange, placeholder = "Pick a da
1120
1422
  variant: "outline",
1121
1423
  disabled,
1122
1424
  className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", className),
1425
+ ...fieldProps,
1123
1426
  children: [/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }), value ? format(value, dateFormat) : /* @__PURE__ */ jsx("span", { children: placeholder })]
1124
1427
  })
1125
1428
  }), /* @__PURE__ */ jsx(PopoverContent, {
@@ -1189,6 +1492,7 @@ function formatTimeValue(parts) {
1189
1492
  return `${pad2(hour24)}:${pad2(parts.minute)}`;
1190
1493
  }
1191
1494
  const TimePicker = React.forwardRef(({ value, onChange, minuteStep = 5, size = "md", disabled = false, placeholder, className }, ref) => {
1495
+ const groupProps = useFieldGroup();
1192
1496
  const [partial, setPartial] = React.useState({});
1193
1497
  const parsedValue = parseTimeValue(value);
1194
1498
  const isControlled = parsedValue.hour12 !== void 0;
@@ -1215,10 +1519,11 @@ const TimePicker = React.forwardRef(({ value, onChange, minuteStep = 5, size = "
1215
1519
  }));
1216
1520
  }
1217
1521
  const triggerClassName = cn(inputSizingClasses(size), "w-auto min-w-0");
1218
- return /* @__PURE__ */ jsxs("div", {
1522
+ return /* @__PURE__ */ jsx("div", {
1219
1523
  ref,
1220
1524
  className: cn("flex gap-2", className),
1221
- children: [
1525
+ ...groupProps,
1526
+ children: /* @__PURE__ */ jsxs(FieldGroupScope, { children: [
1222
1527
  /* @__PURE__ */ jsxs(Select, {
1223
1528
  disabled,
1224
1529
  value: toSegmentValue(parts.hour12),
@@ -1270,7 +1575,7 @@ const TimePicker = React.forwardRef(({ value, onChange, minuteStep = 5, size = "
1270
1575
  children: "PM"
1271
1576
  })] })]
1272
1577
  })
1273
- ]
1578
+ ] })
1274
1579
  });
1275
1580
  });
1276
1581
  TimePicker.displayName = "TimePicker";
@@ -1378,6 +1683,7 @@ const dateRangePresets = {
1378
1683
  })
1379
1684
  };
1380
1685
  const DateRangePicker = React.forwardRef(({ value, onChange, placeholder = "Pick a date range", dateFormat = "LLL dd, y", disabled = false, className, presets, numberOfMonths = 2, fromDate, toDate, clearable = true, clearLabel = "Clear date range" }, ref) => {
1686
+ const fieldProps = useFieldControl({});
1381
1687
  const [open, setOpen] = React.useState(false);
1382
1688
  const handlePresetClick = (preset) => {
1383
1689
  const range = preset.range();
@@ -1401,6 +1707,7 @@ const DateRangePicker = React.forwardRef(({ value, onChange, placeholder = "Pick
1401
1707
  variant: "outline",
1402
1708
  disabled,
1403
1709
  className: cn("w-full justify-start text-left font-normal", !value && "text-muted-foreground", showClear && "pr-9", className),
1710
+ ...fieldProps,
1404
1711
  children: [/* @__PURE__ */ jsx(Calendar$1, { className: "mr-2 h-4 w-4" }), value?.from ? value.to ? /* @__PURE__ */ jsxs(Fragment, { children: [
1405
1712
  format(value.from, dateFormat),
1406
1713
  " –",
@@ -1742,24 +2049,30 @@ function IndeterminateIcon({ className }) {
1742
2049
  })
1743
2050
  });
1744
2051
  }
1745
- const Checkbox = React.forwardRef(({ className, checked, ...props }, ref) => /* @__PURE__ */ jsx(Checkbox$1.Root, {
1746
- ref,
1747
- checked,
1748
- 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", coarseHitAreaClasses, className),
1749
- ...props,
1750
- children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
1751
- className: cn("flex h-full w-full items-center justify-center text-current"),
1752
- children: checked === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { className: "h-[10px] w-[10px]" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "h-[10px] w-[10px]" })
1753
- })
1754
- }));
2052
+ const Checkbox = React.forwardRef(({ className, checked, ...props }, ref) => {
2053
+ const fieldProps = useFieldControl(props);
2054
+ return /* @__PURE__ */ jsx(Checkbox$1.Root, {
2055
+ ref,
2056
+ checked,
2057
+ 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", coarseHitAreaClasses, className),
2058
+ ...fieldProps,
2059
+ children: /* @__PURE__ */ jsx(Checkbox$1.Indicator, {
2060
+ className: cn("flex h-full w-full items-center justify-center text-current"),
2061
+ children: checked === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { className: "h-[10px] w-[10px]" }) : /* @__PURE__ */ jsx(CheckIcon, { className: "h-[10px] w-[10px]" })
2062
+ })
2063
+ });
2064
+ });
1755
2065
  Checkbox.displayName = Checkbox$1.Root.displayName;
1756
2066
  //#endregion
1757
2067
  //#region src/components/radio-group.tsx
1758
- const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup$1.Root, {
1759
- className: cn("grid gap-2", className),
1760
- ...props,
1761
- ref
1762
- }));
2068
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
2069
+ const fieldProps = useFieldControl(props);
2070
+ return /* @__PURE__ */ jsx(RadioGroup$1.Root, {
2071
+ className: cn("grid gap-2", className),
2072
+ ...fieldProps,
2073
+ ref
2074
+ });
2075
+ });
1763
2076
  RadioGroup.displayName = RadioGroup$1.Root.displayName;
1764
2077
  const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroup$1.Item, {
1765
2078
  ref,
@@ -1792,24 +2105,36 @@ const switchThumbVariants = cva("pointer-events-none block rounded-full bg-backg
1792
2105
  } },
1793
2106
  defaultVariants: { size: "md" }
1794
2107
  });
1795
- const Switch = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(Switch$1.Root, {
1796
- className: cn(switchVariants({ size }), coarseHitAreaClasses, className),
1797
- ...props,
1798
- ref,
1799
- children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn(switchThumbVariants({ size })) })
1800
- }));
2108
+ const Switch = React.forwardRef(({ className, size, ...props }, ref) => {
2109
+ const fieldProps = useFieldControl(props);
2110
+ return /* @__PURE__ */ jsx(Switch$1.Root, {
2111
+ className: cn(switchVariants({ size }), coarseHitAreaClasses, className),
2112
+ ...fieldProps,
2113
+ ref,
2114
+ children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn(switchThumbVariants({ size })) })
2115
+ });
2116
+ });
1801
2117
  Switch.displayName = Switch$1.Root.displayName;
1802
2118
  //#endregion
1803
2119
  //#region src/components/slider.tsx
1804
- const Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(Slider$1.Root, {
1805
- ref,
1806
- className: cn("relative flex w-full touch-none select-none items-center", className),
1807
- ...props,
1808
- children: [/* @__PURE__ */ jsx(Slider$1.Track, {
1809
- className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
1810
- children: /* @__PURE__ */ jsx(Slider$1.Range, { className: "absolute h-full bg-primary" })
1811
- }), /* @__PURE__ */ jsx(Slider$1.Thumb, { className: cn("block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", coarseHitAreaClasses) })]
1812
- }));
2120
+ const Slider = React.forwardRef(({ className, ...props }, ref) => {
2121
+ const { id, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-required": ariaRequired, ...rootProps } = useFieldControl(props);
2122
+ return /* @__PURE__ */ jsxs(Slider$1.Root, {
2123
+ ref,
2124
+ className: cn("relative flex w-full touch-none select-none items-center", className),
2125
+ ...rootProps,
2126
+ children: [/* @__PURE__ */ jsx(Slider$1.Track, {
2127
+ className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",
2128
+ children: /* @__PURE__ */ jsx(Slider$1.Range, { className: "absolute h-full bg-primary" })
2129
+ }), /* @__PURE__ */ jsx(Slider$1.Thumb, {
2130
+ id,
2131
+ "aria-describedby": describedBy,
2132
+ "aria-invalid": invalid,
2133
+ "aria-required": ariaRequired,
2134
+ className: cn("block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", coarseHitAreaClasses)
2135
+ })]
2136
+ });
2137
+ });
1813
2138
  Slider.displayName = Slider$1.Root.displayName;
1814
2139
  //#endregion
1815
2140
  //#region src/components/card.tsx
@@ -2679,7 +3004,7 @@ const AccordionTrigger = React.forwardRef(({ className, children, ...props }, re
2679
3004
  className: "flex",
2680
3005
  children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
2681
3006
  ref,
2682
- className: cn("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", className),
3007
+ className: cn("flex flex-1 cursor-pointer items-center justify-between py-4 font-medium transition-all hover:underline disabled:cursor-not-allowed [&[data-state=open]>svg]:rotate-180", className),
2683
3008
  ...props,
2684
3009
  children: [children, /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 shrink-0 transition-transform duration-normal" })]
2685
3010
  })
@@ -5579,6 +5904,751 @@ const ReviewsBlock = React.forwardRef(({ reviews, averageRating, totalReviews, t
5579
5904
  });
5580
5905
  ReviewsBlock.displayName = "ReviewsBlock";
5581
5906
  //#endregion
5907
+ //#region src/blocks/marketing/json-ld.tsx
5908
+ /**
5909
+ * Maps a `NapRecord` — the same object rendered by `NapBlock` — onto
5910
+ * schema.org's actual pattern for one business, one address, and multiple
5911
+ * named departments: a single LocalBusiness-family node with a `department`
5912
+ * array, where each department is its own LocalBusiness-family node
5913
+ * carrying its own `name` and `telephone` and inheriting the parent
5914
+ * `address` (https://schema.org/department). This is the real schema.org
5915
+ * shape for this case — deliberately not a bespoke "locations" array — so
5916
+ * the output validates and matches what Google expects for multi-department
5917
+ * local businesses.
5918
+ *
5919
+ * - Exactly one department: its phone is promoted to the top-level
5920
+ * `telephone` and no `department` array is emitted. The common
5921
+ * single-phone business shouldn't produce a spurious nested node.
5922
+ * - Two or more departments: every one becomes its own `department` entry
5923
+ * and the top-level `telephone` is omitted, so multiple phone numbers are
5924
+ * never flattened into one generic number.
5925
+ */
5926
+ function napRecordToJsonLd(record) {
5927
+ const { name, type, address, departments, url } = record;
5928
+ const shaped = {
5929
+ "@context": "https://schema.org",
5930
+ "@type": type,
5931
+ name,
5932
+ address: {
5933
+ "@type": "PostalAddress",
5934
+ streetAddress: address.streetAddress,
5935
+ addressLocality: address.addressLocality,
5936
+ addressRegion: address.addressRegion,
5937
+ postalCode: address.postalCode,
5938
+ addressCountry: address.addressCountry ?? "US"
5939
+ }
5940
+ };
5941
+ if (url) shaped.url = url;
5942
+ if (departments.length <= 1) {
5943
+ if (departments[0]) shaped.telephone = departments[0].phone.e164;
5944
+ return shaped;
5945
+ }
5946
+ shaped.department = departments.map((dept) => ({
5947
+ "@type": dept.type ?? type,
5948
+ name: dept.name,
5949
+ telephone: dept.phone.e164
5950
+ }));
5951
+ return shaped;
5952
+ }
5953
+ function isNapRecord(data) {
5954
+ return typeof data === "object" && data !== null && Array.isArray(data.departments) && typeof data.address === "object";
5955
+ }
5956
+ /**
5957
+ * Escapes `<` so a string value (e.g. a name containing `<\/script>`) can't
5958
+ * terminate the tag early. Standard hardening for inline JSON in HTML; see
5959
+ * https://v8.dev/features/subsume-json.
5960
+ */
5961
+ function safeJsonStringify(value) {
5962
+ return JSON.stringify(value).replace(/</g, "\\u003c");
5963
+ }
5964
+ /**
5965
+ * Dumb serializer: renders a `<script type="application/ld+json">` tag from
5966
+ * whatever schema.org-shaped object it's given. Contains no business logic
5967
+ * about what a business "should" look like — the only transformation it
5968
+ * ever performs is the structural `NapRecord` → LocalBusiness mapping in
5969
+ * `napRecordToJsonLd`, and only when handed a `NapRecord` instead of an
5970
+ * already-shaped object.
5971
+ */
5972
+ const JsonLd = React.forwardRef(({ data, nonce }, ref) => {
5973
+ return /* @__PURE__ */ jsx("script", {
5974
+ ref,
5975
+ type: "application/ld+json",
5976
+ nonce,
5977
+ dangerouslySetInnerHTML: { __html: safeJsonStringify(isNapRecord(data) ? napRecordToJsonLd(data) : data) }
5978
+ });
5979
+ });
5980
+ JsonLd.displayName = "JsonLd";
5981
+ //#endregion
5982
+ //#region src/blocks/marketing/nap-block.tsx
5983
+ const NapBlock = React.forwardRef(({ record, showName = true, headingLevel = "h3", addressIcon, phoneIcon, className, ...props }, ref) => {
5984
+ const { name, address, departments, url } = record;
5985
+ const country = address.addressCountry ?? "US";
5986
+ const Heading = headingLevel;
5987
+ const multiDepartment = departments.length > 1;
5988
+ return /* @__PURE__ */ jsxs("address", {
5989
+ ref,
5990
+ className: cn("not-italic space-y-4", className),
5991
+ ...props,
5992
+ children: [
5993
+ showName && /* @__PURE__ */ jsx(Heading, {
5994
+ className: "text-base font-semibold tracking-tight",
5995
+ children: url ? /* @__PURE__ */ jsx("a", {
5996
+ href: url,
5997
+ className: "hover:underline",
5998
+ children: name
5999
+ }) : name
6000
+ }),
6001
+ /* @__PURE__ */ jsxs("div", {
6002
+ className: "flex items-start gap-2 text-sm text-muted-foreground",
6003
+ children: [/* @__PURE__ */ jsx("span", {
6004
+ "aria-hidden": true,
6005
+ className: "mt-0.5 shrink-0 text-foreground/60",
6006
+ children: addressIcon ?? /* @__PURE__ */ jsx(MapPin, {
6007
+ className: "size-4",
6008
+ strokeWidth: 1.5
6009
+ })
6010
+ }), /* @__PURE__ */ jsxs("span", { children: [
6011
+ address.streetAddress,
6012
+ /* @__PURE__ */ jsx("br", {}),
6013
+ address.addressLocality,
6014
+ ", ",
6015
+ address.addressRegion,
6016
+ " ",
6017
+ address.postalCode,
6018
+ country !== "US" && /* @__PURE__ */ jsxs(Fragment, { children: [", ", country] })
6019
+ ] })]
6020
+ }),
6021
+ /* @__PURE__ */ jsx("ul", {
6022
+ className: "space-y-2",
6023
+ children: departments.map((dept) => /* @__PURE__ */ jsxs("li", {
6024
+ className: "flex items-center gap-2 text-sm",
6025
+ children: [/* @__PURE__ */ jsx("span", {
6026
+ "aria-hidden": true,
6027
+ className: "shrink-0 text-foreground/60",
6028
+ children: phoneIcon ?? /* @__PURE__ */ jsx(Phone, {
6029
+ className: "size-4",
6030
+ strokeWidth: 1.5
6031
+ })
6032
+ }), /* @__PURE__ */ jsxs("span", { children: [multiDepartment && /* @__PURE__ */ jsxs("span", {
6033
+ className: "mr-1.5 font-medium text-foreground",
6034
+ children: [dept.name, ":"]
6035
+ }), /* @__PURE__ */ jsx("a", {
6036
+ href: `tel:${dept.phone.e164}`,
6037
+ className: "hover:underline",
6038
+ children: dept.phone.display ?? formatUsPhone(dept.phone.e164)
6039
+ })] })]
6040
+ }, dept.id))
6041
+ })
6042
+ ]
6043
+ });
6044
+ });
6045
+ NapBlock.displayName = "NapBlock";
6046
+ //#endregion
6047
+ //#region src/blocks/marketing/showcase-panels-block.tsx
6048
+ /** 1 → "I", 2 → "II", … Enough for any sane panel count. */
6049
+ function toRoman(n) {
6050
+ const table = [
6051
+ [10, "X"],
6052
+ [9, "IX"],
6053
+ [5, "V"],
6054
+ [4, "IV"],
6055
+ [1, "I"]
6056
+ ];
6057
+ let out = "";
6058
+ for (const [value, glyph] of table) while (n >= value) {
6059
+ out += glyph;
6060
+ n -= value;
6061
+ }
6062
+ return out;
6063
+ }
6064
+ const EASE_LAYOUT = "cubic-bezier(0, 0, 0.2, 1)";
6065
+ const ShowcasePanelsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, activeIndex: activeIndexProp, onActiveIndexChange, onItemAction, watermark, ariaLabel = "Showcase panels", actionLabel = (item) => `Read more about ${item.title}`, actionIcon, renderImage, spineVariant = "numbered", renderSpine, labels, className, ...props }, ref) => {
6066
+ const [activeIndexState, setActiveIndexState] = React.useState(defaultActiveIndex);
6067
+ const activeIndex = activeIndexProp ?? activeIndexState;
6068
+ const [hoverIndex, setHoverIndex] = React.useState(null);
6069
+ const uid = React.useId();
6070
+ const tabRefs = React.useRef([]);
6071
+ const tabId = (i) => `${uid}-tab-${i}`;
6072
+ const panelId = (i) => `${uid}-panel-${i}`;
6073
+ const setActiveIndex = (i) => {
6074
+ setActiveIndexState(i);
6075
+ onActiveIndexChange?.(i);
6076
+ };
6077
+ const focusTab = (i) => {
6078
+ setActiveIndex(i);
6079
+ tabRefs.current[i]?.focus();
6080
+ };
6081
+ const handleTablistKeyDown = (event) => {
6082
+ const count = items.length;
6083
+ if (event.key === "ArrowRight") {
6084
+ event.preventDefault();
6085
+ focusTab((activeIndex + 1) % count);
6086
+ } else if (event.key === "ArrowLeft") {
6087
+ event.preventDefault();
6088
+ focusTab((activeIndex - 1 + count) % count);
6089
+ } else if (event.key === "Home") {
6090
+ event.preventDefault();
6091
+ focusTab(0);
6092
+ } else if (event.key === "End") {
6093
+ event.preventDefault();
6094
+ focusTab(count - 1);
6095
+ }
6096
+ };
6097
+ const shownIndex = hoverIndex ?? activeIndex;
6098
+ const gridTemplate = items.map((_, i) => i === shownIndex ? "3fr" : "1fr").join(" ");
6099
+ const selectedLabel = labels?.selected ?? "Selected";
6100
+ const previewLabel = labels?.preview ?? "Preview";
6101
+ const numeralFor = (item, i) => item.numeral ?? (spineVariant === "volume" ? toRoman(i + 1) : String(i + 1).padStart(2, "0"));
6102
+ const defaultImage = (item) => /* @__PURE__ */ jsx("img", {
6103
+ src: item.image.src,
6104
+ alt: item.image.alt ?? "",
6105
+ className: "absolute inset-0 h-full w-full object-cover"
6106
+ });
6107
+ const defaultSpine = (item, i, { numeral }) => {
6108
+ if (spineVariant === "minimal") return /* @__PURE__ */ jsx("span", {
6109
+ className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rotate-180 text-sm font-light tracking-[0.25em] whitespace-nowrap text-foreground/90 uppercase [writing-mode:vertical-rl] md:text-base",
6110
+ children: item.title
6111
+ });
6112
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
6113
+ /* @__PURE__ */ jsx("span", {
6114
+ "aria-hidden": true,
6115
+ className: "absolute inset-y-0 left-0 w-px bg-foreground/15"
6116
+ }),
6117
+ /* @__PURE__ */ jsx("span", {
6118
+ "aria-hidden": true,
6119
+ className: "absolute inset-y-0 right-0 w-px bg-background/40"
6120
+ }),
6121
+ spineVariant === "volume" && /* @__PURE__ */ jsxs(Fragment, { children: [
6122
+ /* @__PURE__ */ jsx("span", {
6123
+ "aria-hidden": true,
6124
+ className: "absolute inset-x-2 top-10 h-px bg-foreground/15"
6125
+ }),
6126
+ /* @__PURE__ */ jsx("span", {
6127
+ "aria-hidden": true,
6128
+ className: "absolute inset-x-2 top-12 h-px bg-foreground/15"
6129
+ }),
6130
+ /* @__PURE__ */ jsx("span", {
6131
+ "aria-hidden": true,
6132
+ className: "absolute inset-x-2 bottom-10 h-px bg-foreground/15"
6133
+ }),
6134
+ /* @__PURE__ */ jsx("span", {
6135
+ "aria-hidden": true,
6136
+ className: "absolute inset-x-2 bottom-12 h-px bg-foreground/15"
6137
+ })
6138
+ ] }),
6139
+ /* @__PURE__ */ jsx("span", {
6140
+ className: "absolute top-16 left-1/2 -translate-x-1/2 text-xl font-light tracking-widest text-foreground/70 md:text-2xl",
6141
+ children: numeral
6142
+ }),
6143
+ /* @__PURE__ */ jsx("span", {
6144
+ className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rotate-180 text-sm font-light tracking-[0.25em] whitespace-nowrap text-foreground/90 uppercase [writing-mode:vertical-rl] md:text-base",
6145
+ children: item.title
6146
+ }),
6147
+ watermark && /* @__PURE__ */ jsxs("span", {
6148
+ className: "absolute bottom-16 left-1/2 -translate-x-1/2 font-mono text-[0.625rem] tracking-widest text-foreground/40 uppercase",
6149
+ children: [
6150
+ watermark,
6151
+ " · ",
6152
+ String(i + 1).padStart(2, "0")
6153
+ ]
6154
+ })
6155
+ ] });
6156
+ };
6157
+ const cornerAction = (item, i) => {
6158
+ const icon = actionIcon ?? /* @__PURE__ */ jsx(MoveUpRight, {
6159
+ className: "size-4 transition-transform group-hover/cta:translate-x-0.5 group-hover/cta:-translate-y-0.5",
6160
+ strokeWidth: 1.5
6161
+ });
6162
+ const actionClass = "group/cta absolute top-5 right-5 z-10 grid size-10 place-items-center rounded-full bg-foreground/10 text-foreground backdrop-blur-sm transition-colors hover:bg-foreground/20 focus-visible:ring-2 focus-visible:ring-foreground/40 focus-visible:outline-none";
6163
+ if (item.href) return /* @__PURE__ */ jsx("a", {
6164
+ href: item.href,
6165
+ "aria-label": actionLabel(item),
6166
+ className: actionClass,
6167
+ children: icon
6168
+ });
6169
+ if (onItemAction) return /* @__PURE__ */ jsx("button", {
6170
+ type: "button",
6171
+ "aria-label": actionLabel(item),
6172
+ onClick: () => onItemAction(item, i),
6173
+ className: actionClass,
6174
+ children: icon
6175
+ });
6176
+ return null;
6177
+ };
6178
+ return /* @__PURE__ */ jsxs("div", {
6179
+ ref,
6180
+ "data-theme": "dark",
6181
+ className: cn("dark overflow-hidden rounded-xl bg-background text-foreground", className),
6182
+ ...props,
6183
+ children: [/* @__PURE__ */ jsxs("div", {
6184
+ className: "hidden md:block",
6185
+ children: [/* @__PURE__ */ jsx("ul", {
6186
+ role: "tablist",
6187
+ "aria-label": ariaLabel,
6188
+ className: "relative grid h-[28rem] gap-[3px] motion-safe:transition-[grid-template-columns] motion-safe:duration-500 md:h-[36rem]",
6189
+ style: {
6190
+ gridTemplateColumns: gridTemplate,
6191
+ transitionTimingFunction: EASE_LAYOUT
6192
+ },
6193
+ onMouseLeave: () => setHoverIndex(null),
6194
+ onKeyDown: handleTablistKeyDown,
6195
+ children: items.map((item, i) => {
6196
+ const isActive = i === activeIndex;
6197
+ const isShown = i === shownIndex;
6198
+ const numeral = numeralFor(item, i);
6199
+ return /* @__PURE__ */ jsxs("li", {
6200
+ className: "relative h-full min-w-0 overflow-hidden",
6201
+ children: [
6202
+ /* @__PURE__ */ jsx("button", {
6203
+ ref: (el) => {
6204
+ tabRefs.current[i] = el;
6205
+ },
6206
+ type: "button",
6207
+ role: "tab",
6208
+ id: tabId(i),
6209
+ "aria-controls": panelId(i),
6210
+ "aria-selected": isActive,
6211
+ "aria-label": `${numeral}: ${item.title}`,
6212
+ tabIndex: isActive ? 0 : -1,
6213
+ onClick: () => setActiveIndex(i),
6214
+ onMouseEnter: () => setHoverIndex(i),
6215
+ onFocus: () => setHoverIndex(i),
6216
+ onBlur: () => setHoverIndex(null),
6217
+ className: "relative block size-full text-left focus-visible:ring-2 focus-visible:ring-foreground/40 focus-visible:outline-none focus-visible:ring-inset",
6218
+ children: /* @__PURE__ */ jsx("span", {
6219
+ "aria-hidden": true,
6220
+ className: cn("absolute inset-0 z-10 bg-linear-to-b from-card via-card to-background transition-opacity duration-300 ease-out", isShown ? "pointer-events-none opacity-0" : "opacity-100"),
6221
+ children: (renderSpine ?? defaultSpine)(item, i, {
6222
+ isActive,
6223
+ numeral
6224
+ })
6225
+ })
6226
+ }),
6227
+ /* @__PURE__ */ jsxs("div", {
6228
+ role: "tabpanel",
6229
+ id: panelId(i),
6230
+ "aria-labelledby": tabId(i),
6231
+ "aria-hidden": !isShown,
6232
+ tabIndex: isShown ? 0 : -1,
6233
+ className: "pointer-events-none absolute inset-0 outline-none",
6234
+ children: [
6235
+ (renderImage ?? defaultImage)(item, i),
6236
+ /* @__PURE__ */ jsx("span", {
6237
+ "aria-hidden": true,
6238
+ className: "absolute inset-0 [mask-image:linear-gradient(to_top,black,transparent_85%)] backdrop-blur-md"
6239
+ }),
6240
+ /* @__PURE__ */ jsx("span", {
6241
+ "aria-hidden": true,
6242
+ className: "absolute inset-0 bg-linear-to-t from-background/85 via-background/40 to-transparent"
6243
+ }),
6244
+ /* @__PURE__ */ jsx("span", {
6245
+ className: "absolute inset-x-0 bottom-0 overflow-hidden",
6246
+ children: /* @__PURE__ */ jsxs("span", {
6247
+ className: cn("block space-y-2 p-5 transition-transform duration-500 ease-out", isShown ? "translate-y-0" : "motion-safe:translate-y-full"),
6248
+ children: [
6249
+ /* @__PURE__ */ jsxs("span", {
6250
+ className: cn("block font-mono text-[0.625rem] tracking-widest text-foreground/60 uppercase transition-[opacity,transform] duration-500 ease-out", isShown ? "translate-y-0 opacity-100 delay-100" : "opacity-0 motion-safe:translate-y-6"),
6251
+ children: [
6252
+ isActive ? selectedLabel : previewLabel,
6253
+ " ",
6254
+ numeral
6255
+ ]
6256
+ }),
6257
+ /* @__PURE__ */ jsx("span", {
6258
+ className: cn("block text-xl leading-tight font-medium tracking-tight transition-[opacity,transform] duration-500 ease-out md:text-2xl", isShown ? "translate-y-0 opacity-100" : "opacity-0 motion-safe:translate-y-8"),
6259
+ children: item.title
6260
+ }),
6261
+ /* @__PURE__ */ jsx("span", {
6262
+ className: cn("block max-w-md text-xs leading-snug text-foreground/75 transition-[opacity,transform] duration-500 ease-out md:text-sm", isShown ? "translate-y-0 opacity-100 delay-200" : "opacity-0 motion-safe:translate-y-8"),
6263
+ children: item.summary
6264
+ })
6265
+ ]
6266
+ })
6267
+ })
6268
+ ]
6269
+ }),
6270
+ isShown && cornerAction(item, i)
6271
+ ]
6272
+ }, item.id);
6273
+ })
6274
+ }), /* @__PURE__ */ jsx("div", {
6275
+ "aria-hidden": true,
6276
+ className: "relative mt-1 h-2 bg-linear-to-b from-foreground/30 via-foreground/10 to-transparent"
6277
+ })]
6278
+ }), /* @__PURE__ */ jsx("div", {
6279
+ className: "md:hidden",
6280
+ children: /* @__PURE__ */ jsx(Accordion, {
6281
+ type: "single",
6282
+ value: items[activeIndex]?.id ?? items[0]?.id,
6283
+ onValueChange: (v) => {
6284
+ if (!v) return;
6285
+ const i = items.findIndex((item) => item.id === v);
6286
+ if (i >= 0) setActiveIndex(i);
6287
+ },
6288
+ children: items.map((item, i) => {
6289
+ const numeral = numeralFor(item, i);
6290
+ return /* @__PURE__ */ jsxs(AccordionItem, {
6291
+ value: item.id,
6292
+ className: "border-foreground/10",
6293
+ children: [/* @__PURE__ */ jsxs(AccordionTrigger, {
6294
+ className: "items-center gap-4 px-5 py-5 text-base font-medium tracking-tight hover:no-underline",
6295
+ children: [/* @__PURE__ */ jsx("span", {
6296
+ className: "inline-block min-w-[1.75rem] shrink-0 font-mono text-xs tracking-widest text-foreground/55",
6297
+ children: numeral
6298
+ }), /* @__PURE__ */ jsx("span", {
6299
+ className: "flex-1 text-left text-foreground/80",
6300
+ children: item.title
6301
+ })]
6302
+ }), /* @__PURE__ */ jsxs(AccordionContent, {
6303
+ className: "p-0",
6304
+ children: [/* @__PURE__ */ jsxs("div", {
6305
+ className: "relative aspect-[16/10] w-full overflow-hidden",
6306
+ children: [(renderImage ?? defaultImage)(item, i), cornerAction(item, i)]
6307
+ }), /* @__PURE__ */ jsxs("div", {
6308
+ className: "space-y-3 p-5",
6309
+ children: [/* @__PURE__ */ jsxs("span", {
6310
+ className: "block font-mono text-[0.625rem] tracking-widest text-foreground/55 uppercase",
6311
+ children: [
6312
+ selectedLabel,
6313
+ " · ",
6314
+ numeral
6315
+ ]
6316
+ }), /* @__PURE__ */ jsx("p", {
6317
+ className: "text-sm leading-relaxed text-foreground/80",
6318
+ children: item.summary
6319
+ })]
6320
+ })]
6321
+ })]
6322
+ }, item.id);
6323
+ })
6324
+ })
6325
+ })]
6326
+ });
6327
+ });
6328
+ ShowcasePanelsBlock.displayName = "ShowcasePanelsBlock";
6329
+ //#endregion
6330
+ //#region src/blocks/marketing/process-steps-block.tsx
6331
+ const TICK_MS = 100;
6332
+ /**
6333
+ * React 19 recognizes `inert` as a real boolean DOM property (`true` →
6334
+ * `setAttribute("inert", "")`, `false` → removed) — confirmed against this
6335
+ * package's installed React version. On React 18, where `inert` isn't in
6336
+ * React's known-properties table, this is a no-op rather than a hazard:
6337
+ * an unrecognized boolean prop is simply dropped, so inactive panels fall
6338
+ * back to `aria-hidden` + `pointer-events-none` alone (already sufficient
6339
+ * for screen readers; `inert` is the extra guard against a stray focusable
6340
+ * node from a consumer's `renderImage`).
6341
+ */
6342
+ function inertWhen(hidden) {
6343
+ return { inert: hidden };
6344
+ }
6345
+ const ProcessStepsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, activeIndex: activeIndexProp, onActiveIndexChange, autoAdvance = true, autoAdvanceDuration = 6e3, pauseOnHover = true, renderImage, ariaLabel = "Process steps", stepLabel = (item) => `Step ${item.step ?? 1}`, labels, className, ...props }, ref) => {
6346
+ const [activeIndexState, setActiveIndexState] = React.useState(defaultActiveIndex);
6347
+ const activeIndex = activeIndexProp ?? activeIndexState;
6348
+ const [progress, setProgress] = React.useState(0);
6349
+ const hoverPausedRef = React.useRef(false);
6350
+ const manuallyPausedRef = React.useRef(false);
6351
+ const [manuallyPaused, setManuallyPaused] = React.useState(false);
6352
+ const [reducedMotion, setReducedMotion] = React.useState(false);
6353
+ const uid = React.useId();
6354
+ const tabRefs = React.useRef([]);
6355
+ const tabId = (i) => `${uid}-tab-${i}`;
6356
+ const panelId = (i) => `${uid}-panel-${i}`;
6357
+ const setActiveIndex = (i) => {
6358
+ setActiveIndexState(i);
6359
+ onActiveIndexChange?.(i);
6360
+ };
6361
+ const focusTab = (i) => {
6362
+ setActiveIndex(i);
6363
+ tabRefs.current[i]?.focus();
6364
+ };
6365
+ const handleTablistKeyDown = (event) => {
6366
+ const count = items.length;
6367
+ if (event.key === "ArrowRight") {
6368
+ event.preventDefault();
6369
+ focusTab((activeIndex + 1) % count);
6370
+ } else if (event.key === "ArrowLeft") {
6371
+ event.preventDefault();
6372
+ focusTab((activeIndex - 1 + count) % count);
6373
+ } else if (event.key === "Home") {
6374
+ event.preventDefault();
6375
+ focusTab(0);
6376
+ } else if (event.key === "End") {
6377
+ event.preventDefault();
6378
+ focusTab(count - 1);
6379
+ }
6380
+ };
6381
+ React.useEffect(() => {
6382
+ const query = window.matchMedia("(prefers-reduced-motion: reduce)");
6383
+ setReducedMotion(query.matches);
6384
+ const onChange = () => setReducedMotion(query.matches);
6385
+ query.addEventListener("change", onChange);
6386
+ return () => query.removeEventListener("change", onChange);
6387
+ }, []);
6388
+ const isAutoAdvancing = autoAdvance && !reducedMotion && items.length > 1;
6389
+ React.useEffect(() => {
6390
+ if (!isAutoAdvancing) return;
6391
+ hoverPausedRef.current = false;
6392
+ setProgress(0);
6393
+ let elapsed = 0;
6394
+ const id = setInterval(() => {
6395
+ if (hoverPausedRef.current || manuallyPausedRef.current) return;
6396
+ elapsed += TICK_MS;
6397
+ const pct = Math.min(elapsed / autoAdvanceDuration, 1);
6398
+ setProgress(pct);
6399
+ if (pct >= 1) {
6400
+ clearInterval(id);
6401
+ setActiveIndex((activeIndex + 1) % items.length);
6402
+ }
6403
+ }, TICK_MS);
6404
+ return () => clearInterval(id);
6405
+ }, [
6406
+ activeIndex,
6407
+ isAutoAdvancing,
6408
+ autoAdvanceDuration,
6409
+ items.length
6410
+ ]);
6411
+ const pause = () => {
6412
+ if (pauseOnHover) hoverPausedRef.current = true;
6413
+ };
6414
+ const resume = () => {
6415
+ if (pauseOnHover) hoverPausedRef.current = false;
6416
+ };
6417
+ const toggleManuallyPaused = () => {
6418
+ setManuallyPaused((prev) => {
6419
+ manuallyPausedRef.current = !prev;
6420
+ return !prev;
6421
+ });
6422
+ };
6423
+ const total = items.length;
6424
+ const defaultImage = (item) => /* @__PURE__ */ jsx("img", {
6425
+ src: item.image.src,
6426
+ alt: item.image.alt ?? "",
6427
+ className: cn("size-full object-cover", item.imageClassName)
6428
+ });
6429
+ return /* @__PURE__ */ jsxs("div", {
6430
+ ref,
6431
+ "data-theme": "dark",
6432
+ className: cn("dark overflow-hidden rounded-xl bg-background text-foreground ring-1 ring-foreground/10", className),
6433
+ onMouseEnter: pause,
6434
+ onMouseLeave: resume,
6435
+ onFocus: pause,
6436
+ onBlur: resume,
6437
+ ...props,
6438
+ children: [/* @__PURE__ */ jsxs("div", {
6439
+ className: "relative aspect-[4/5] md:aspect-[16/9]",
6440
+ children: [
6441
+ items.map((item, i) => {
6442
+ const isActive = i === activeIndex;
6443
+ return /* @__PURE__ */ jsx("div", {
6444
+ "aria-hidden": !isActive,
6445
+ className: "absolute inset-0 motion-safe:transition-[clip-path] motion-safe:duration-700 motion-safe:ease-out",
6446
+ style: { clipPath: isActive ? "inset(0% 0% 0% 0%)" : "inset(0% 0% 0% 100%)" },
6447
+ ...inertWhen(!isActive),
6448
+ children: (renderImage ?? defaultImage)(item, i)
6449
+ }, item.id);
6450
+ }),
6451
+ /* @__PURE__ */ jsx("div", {
6452
+ "aria-hidden": true,
6453
+ className: "absolute inset-0 bg-linear-to-t from-black/75 via-black/20 to-transparent"
6454
+ }),
6455
+ /* @__PURE__ */ jsx("div", {
6456
+ "aria-hidden": true,
6457
+ className: "absolute inset-y-0 left-0 w-2/3 bg-linear-to-r from-black/35 to-transparent"
6458
+ }),
6459
+ isAutoAdvancing && /* @__PURE__ */ jsx("button", {
6460
+ type: "button",
6461
+ onClick: toggleManuallyPaused,
6462
+ "aria-pressed": manuallyPaused,
6463
+ "aria-label": manuallyPaused ? labels?.resume ?? "Resume auto-advance" : labels?.pause ?? "Pause auto-advance",
6464
+ className: "group/cta absolute top-5 right-5 z-10 grid size-10 place-items-center rounded-full bg-foreground/10 text-white backdrop-blur-sm transition-colors hover:bg-foreground/20 focus-visible:ring-2 focus-visible:ring-foreground/40 focus-visible:outline-none",
6465
+ children: manuallyPaused ? /* @__PURE__ */ jsx(Play, {
6466
+ className: "size-4",
6467
+ strokeWidth: 1.5
6468
+ }) : /* @__PURE__ */ jsx(Pause, {
6469
+ className: "size-4",
6470
+ strokeWidth: 1.5
6471
+ })
6472
+ }),
6473
+ items.map((item, i) => {
6474
+ const isActive = i === activeIndex;
6475
+ return /* @__PURE__ */ jsxs("div", {
6476
+ role: "tabpanel",
6477
+ id: panelId(i),
6478
+ "aria-labelledby": tabId(i),
6479
+ "aria-hidden": !isActive,
6480
+ tabIndex: isActive ? 0 : -1,
6481
+ ...inertWhen(!isActive),
6482
+ className: cn("absolute right-5 bottom-6 left-5 text-white transition-[opacity,transform] duration-500 ease-out outline-none md:right-16 md:bottom-14 md:left-16", isActive ? "opacity-100" : "pointer-events-none opacity-0 motion-safe:translate-y-4"),
6483
+ children: [
6484
+ /* @__PURE__ */ jsxs("div", {
6485
+ className: "flex items-center gap-3 text-white/60",
6486
+ children: [/* @__PURE__ */ jsx("span", {
6487
+ "aria-hidden": true,
6488
+ className: "h-px w-8 bg-current md:w-10"
6489
+ }), /* @__PURE__ */ jsxs("span", {
6490
+ className: "text-xs tracking-widest md:text-sm",
6491
+ children: [
6492
+ stepLabel(item, i),
6493
+ " of ",
6494
+ total
6495
+ ]
6496
+ })]
6497
+ }),
6498
+ /* @__PURE__ */ jsx("h3", {
6499
+ className: "mt-3 text-5xl leading-[0.95] font-medium tracking-tight md:mt-6 md:text-7xl lg:text-8xl",
6500
+ children: item.title
6501
+ }),
6502
+ /* @__PURE__ */ jsx("p", {
6503
+ className: "mt-4 max-w-lg text-sm leading-snug font-medium text-white/85 md:mt-8 md:text-base md:leading-relaxed lg:text-lg",
6504
+ children: item.description
6505
+ })
6506
+ ]
6507
+ }, item.id);
6508
+ })
6509
+ ]
6510
+ }), /* @__PURE__ */ jsx("ol", {
6511
+ role: "tablist",
6512
+ "aria-label": ariaLabel,
6513
+ onKeyDown: handleTablistKeyDown,
6514
+ className: "grid border-t border-foreground/10 bg-card text-foreground",
6515
+ style: { gridTemplateColumns: `repeat(${total}, minmax(0, 1fr))` },
6516
+ children: items.map((item, i) => {
6517
+ const isActive = i === activeIndex;
6518
+ return /* @__PURE__ */ jsx("li", {
6519
+ className: "relative",
6520
+ children: /* @__PURE__ */ jsxs("button", {
6521
+ ref: (el) => {
6522
+ tabRefs.current[i] = el;
6523
+ },
6524
+ type: "button",
6525
+ role: "tab",
6526
+ id: tabId(i),
6527
+ "aria-controls": panelId(i),
6528
+ "aria-selected": isActive,
6529
+ "aria-current": isActive ? "step" : void 0,
6530
+ tabIndex: isActive ? 0 : -1,
6531
+ onClick: () => setActiveIndex(i),
6532
+ className: cn("group relative flex h-16 w-full flex-col items-center justify-center gap-1 px-3 text-center transition-colors outline-none md:h-20 md:gap-1.5", isActive ? "text-foreground" : "text-muted-foreground hover:text-foreground/85"),
6533
+ children: [
6534
+ /* @__PURE__ */ jsx("span", {
6535
+ className: "font-mono text-[0.5625rem] tracking-[0.2em] text-foreground/45 uppercase md:text-[0.625rem]",
6536
+ children: stepLabel(item, i)
6537
+ }),
6538
+ /* @__PURE__ */ jsx("span", {
6539
+ className: "hidden text-sm font-medium tracking-tight md:inline md:text-base",
6540
+ children: item.title
6541
+ }),
6542
+ /* @__PURE__ */ jsx("span", {
6543
+ "aria-hidden": true,
6544
+ className: "pointer-events-none absolute inset-x-0 top-0 h-px overflow-hidden bg-foreground/10",
6545
+ children: isActive && /* @__PURE__ */ jsx("span", {
6546
+ className: "block h-full origin-left bg-brand-accent",
6547
+ style: {
6548
+ transform: `scaleX(${isAutoAdvancing ? progress : 1})`,
6549
+ transition: isAutoAdvancing ? `transform ${TICK_MS}ms linear` : "none"
6550
+ }
6551
+ })
6552
+ })
6553
+ ]
6554
+ })
6555
+ }, item.id);
6556
+ })
6557
+ })]
6558
+ });
6559
+ });
6560
+ ProcessStepsBlock.displayName = "ProcessStepsBlock";
6561
+ //#endregion
6562
+ //#region src/blocks/marketing/faq-columns-block.tsx
6563
+ const FAQColumnsBlock = React.forwardRef(({ items, title, description, eyebrow, icon, cta, sticky = true, type = "single", collapsible = true, defaultValue, value, onValueChange, containerClassName, gridClassName, asideClassName, eyebrowClassName, titleClassName, descriptionClassName, ctaClassName, listClassName, itemClassName, questionClassName, answerClassName, className, ...props }, ref) => {
6564
+ const headingId = React.useId();
6565
+ const hasHeaderRow = eyebrow != null || icon !== null;
6566
+ const accordionProps = {
6567
+ type,
6568
+ ...type === "single" ? { collapsible } : {},
6569
+ defaultValue,
6570
+ value,
6571
+ onValueChange
6572
+ };
6573
+ return /* @__PURE__ */ jsx("section", {
6574
+ ref,
6575
+ "aria-labelledby": props["aria-label"] ? void 0 : headingId,
6576
+ className: cn("py-16 md:py-24", className),
6577
+ ...props,
6578
+ children: /* @__PURE__ */ jsx("div", {
6579
+ className: cn("mx-auto max-w-6xl px-4 sm:px-6", containerClassName),
6580
+ children: /* @__PURE__ */ jsxs("div", {
6581
+ className: cn("grid grid-cols-1 gap-12 lg:grid-cols-[1fr_1.4fr] lg:gap-16", gridClassName),
6582
+ children: [/* @__PURE__ */ jsxs("div", {
6583
+ className: cn("relative", sticky && "lg:sticky lg:top-28 lg:self-start", asideClassName),
6584
+ children: [
6585
+ hasHeaderRow && /* @__PURE__ */ jsxs("div", {
6586
+ className: "flex items-start justify-between gap-4",
6587
+ children: [typeof eyebrow === "string" ? /* @__PURE__ */ jsx(Badge, {
6588
+ variant: "outline",
6589
+ className: cn("h-7 shrink-0 rounded-full px-3 font-medium", eyebrowClassName),
6590
+ children: eyebrow
6591
+ }) : eyebrow != null ? /* @__PURE__ */ jsx("div", {
6592
+ className: cn("shrink-0", eyebrowClassName),
6593
+ children: eyebrow
6594
+ }) : /* @__PURE__ */ jsx("span", { "aria-hidden": true }), icon === void 0 ? /* @__PURE__ */ jsx(CircleHelp, {
6595
+ "aria-hidden": true,
6596
+ strokeWidth: 1,
6597
+ className: "size-6 shrink-0 text-muted-foreground"
6598
+ }) : icon]
6599
+ }),
6600
+ /* @__PURE__ */ jsx("h2", {
6601
+ id: headingId,
6602
+ className: cn("text-3xl font-light leading-[1.05] tracking-tight md:text-4xl lg:text-5xl", hasHeaderRow && "mt-8", titleClassName),
6603
+ children: title
6604
+ }),
6605
+ description ? /* @__PURE__ */ jsx("p", {
6606
+ className: cn("mt-6 max-w-md text-base text-muted-foreground", descriptionClassName),
6607
+ children: description
6608
+ }) : null,
6609
+ cta ? /* @__PURE__ */ jsxs("div", {
6610
+ className: cn("mt-10 border-t pt-6", ctaClassName),
6611
+ children: [/* @__PURE__ */ jsx("p", {
6612
+ className: "text-sm text-muted-foreground",
6613
+ children: cta.title
6614
+ }), /* @__PURE__ */ jsxs("a", {
6615
+ href: cta.href,
6616
+ ...cta.newTab ? {
6617
+ target: "_blank",
6618
+ rel: "noopener noreferrer"
6619
+ } : {},
6620
+ className: "group/faq-cta mt-1.5 inline-flex items-center gap-2 text-sm tracking-tight text-foreground transition-colors",
6621
+ children: [/* @__PURE__ */ jsx("span", {
6622
+ className: "border-b border-transparent transition-colors group-hover/faq-cta:border-current",
6623
+ children: cta.linkText
6624
+ }), cta.icon === void 0 ? /* @__PURE__ */ jsx(MoveUpRight, {
6625
+ "aria-hidden": true,
6626
+ className: "size-3.5 transition-transform group-hover/faq-cta:-translate-y-0.5 group-hover/faq-cta:translate-x-0.5"
6627
+ }) : cta.icon]
6628
+ })]
6629
+ }) : null
6630
+ ]
6631
+ }), /* @__PURE__ */ jsx(Accordion, {
6632
+ ...accordionProps,
6633
+ className: cn("w-full", listClassName),
6634
+ children: items.map((item) => /* @__PURE__ */ jsxs(AccordionItem, {
6635
+ value: item.id,
6636
+ className: itemClassName,
6637
+ children: [/* @__PURE__ */ jsx(AccordionTrigger, {
6638
+ className: cn("items-start gap-6 py-5 text-start text-base font-normal tracking-tight md:text-lg", questionClassName),
6639
+ children: item.question
6640
+ }), /* @__PURE__ */ jsx(AccordionContent, {
6641
+ className: cn("pb-5 text-base leading-relaxed text-muted-foreground", answerClassName),
6642
+ children: item.answer
6643
+ })]
6644
+ }, item.id))
6645
+ })]
6646
+ })
6647
+ })
6648
+ });
6649
+ });
6650
+ FAQColumnsBlock.displayName = "FAQColumnsBlock";
6651
+ //#endregion
5582
6652
  //#region src/blocks/settings/profile-settings-block.tsx
5583
6653
  function ProfileSettingsBlock({ initialData, onSave, onAvatarChange, loading = false, error, disabled = false, className }) {
5584
6654
  const fileInputRef = React.useRef(null);
@@ -5857,6 +6927,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
5857
6927
  });
5858
6928
  }
5859
6929
  //#endregion
5860
- 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, PhoneInput, Popover, PopoverContent, PopoverTrigger, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, Rating, ResetPasswordBlock, ReviewsBlock, 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, TimePicker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
6930
+ 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, FAQColumnsBlock, FieldGroupScope, FieldProvider, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, JsonLd, Label, MaintenanceBlock, MediaCard, NapBlock, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotFoundBlock, NotificationSettingsBlock, OutlinedField, PageShell, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PasswordInput, PhoneInput, Popover, PopoverContent, PopoverTrigger, ProcessStepsBlock, ProfileSettingsBlock, Progress, ProgressBar, RadioGroup, RadioGroupItem, Rating, ResetPasswordBlock, ReviewsBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShowcasePanelsBlock, 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, TimePicker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, napRecordToJsonLd, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, toast, useDensity, useField, useFieldControl, useFieldGroup, useFieldIds, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
5861
6931
 
5862
6932
  //# sourceMappingURL=index.mjs.map