@bison-lab/ui 3.7.0 → 3.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
@@ -403,8 +403,8 @@ const FOCUSABLE_SELECTOR = [
403
403
  * Move focus to the first control the schema rejected (WCAG technique G139).
404
404
  *
405
405
  * Dives inside the invalid element when the element itself cannot hold focus:
406
- * a checkbox group marks the `<fieldset>` invalid, and a fieldset is not
407
- * focusable, so the first checkbox inside it is the right landing point.
406
+ * a checkbox in a group carries `aria-invalid` (a fieldset must not — axe's
407
+ * `aria-allowed-attr`), and the first of those is the landing point.
408
408
  */
409
409
  function focusFirstInvalid(form) {
410
410
  const invalids = form.querySelectorAll("[aria-invalid=\"true\"]");
@@ -849,13 +849,18 @@ function FormField({ name, label, description, required, labelLayout = "stack",
849
849
  ref: wrapRef,
850
850
  className: cn("flex flex-col", errorMessage && "bison-shake", className),
851
851
  "aria-describedby": describedBy,
852
- "aria-invalid": errorMessage ? true : void 0,
853
- "aria-required": required || void 0,
854
852
  children: [
855
853
  label && /* @__PURE__ */ jsxs("legend", {
856
854
  id: labelId,
857
855
  className: "mb-1.5 text-sm font-medium leading-none",
858
- children: [label, requiredMark]
856
+ children: [
857
+ label,
858
+ required ? /* @__PURE__ */ jsx("span", {
859
+ className: "sr-only",
860
+ children: " (required)"
861
+ }) : null,
862
+ requiredMark
863
+ ]
859
864
  }),
860
865
  children,
861
866
  messages
@@ -885,7 +890,7 @@ function FormField({ name, label, description, required, labelLayout = "stack",
885
890
  function FormError({ message, className }) {
886
891
  if (!message) return null;
887
892
  return /* @__PURE__ */ jsx("div", {
888
- className: cn("rounded-md border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive", className),
893
+ className: cn("rounded-md border border-destructive-300 bg-destructive-50 px-4 py-3 text-sm text-destructive-700", className),
889
894
  role: "alert",
890
895
  children: message
891
896
  });
@@ -952,7 +957,7 @@ const Button = React.forwardRef(({ className, variant, size, fullWidth, asChild
952
957
  "data-loading": loading || void 0,
953
958
  ...props,
954
959
  children: loading ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
955
- className: "invisible inline-flex items-center justify-center",
960
+ className: "inline-flex items-center justify-center opacity-0",
956
961
  children
957
962
  }), /* @__PURE__ */ jsx("span", {
958
963
  "aria-hidden": "true",
@@ -1046,12 +1051,12 @@ const menuSurfaceClasses = "z-[var(--z-dropdown)] min-w-[8rem] overflow-hidden r
1046
1051
  * Base menu item: focus styling, disabled state, selection-ready.
1047
1052
  * Used by: Select Item, DropdownMenu Item, ContextMenu Item, Command Item.
1048
1053
  */
1049
- const menuItemClasses = "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-default";
1054
+ const menuItemClasses = "relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[disabled=true]:cursor-default data-[disabled=\"\"]:pointer-events-none data-[disabled=\"\"]:opacity-50 data-[disabled=\"\"]:cursor-default";
1050
1055
  /**
1051
1056
  * Menu item variant with indicator gutter on the left (for checkbox/radio
1052
1057
  * indicators on Select, DropdownMenu, ContextMenu).
1053
1058
  */
1054
- const menuItemWithIndicatorClasses = "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[disabled]:cursor-default";
1059
+ const menuItemWithIndicatorClasses = "relative flex cursor-pointer select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[disabled=true]:cursor-default data-[disabled=\"\"]:pointer-events-none data-[disabled=\"\"]:opacity-50 data-[disabled=\"\"]:cursor-default";
1055
1060
  /**
1056
1061
  * Menu separator: horizontal rule sitting between menu groups.
1057
1062
  */
@@ -1471,8 +1476,8 @@ const Calendar = ({ className, classNames, showOutsideDays = true, ...props }) =
1471
1476
  range_end: "day-range-end rounded-r-md",
1472
1477
  selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
1473
1478
  today: "bg-accent text-accent-foreground",
1474
- outside: "day-outside text-muted-foreground aria-selected:text-muted-foreground opacity-50 aria-selected:opacity-30",
1475
- disabled: "text-muted-foreground opacity-50",
1479
+ outside: "day-outside text-muted-foreground aria-selected:text-muted-foreground",
1480
+ disabled: "text-muted-foreground",
1476
1481
  range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
1477
1482
  hidden: "invisible",
1478
1483
  ...classNames
@@ -1989,13 +1994,53 @@ Separator.displayName = Separator$1.Root.displayName;
1989
1994
  const TooltipProvider = Tooltip$1.Provider;
1990
1995
  const Tooltip = Tooltip$1.Root;
1991
1996
  const TooltipTrigger = Tooltip$1.Trigger;
1992
- const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Content, {
1997
+ const tooltipContentVariants = cva("z-[var(--z-tooltip)] rounded-md border bg-popover text-sm text-popover-foreground shadow-md", {
1998
+ variants: { size: {
1999
+ sm: "px-3 py-1.5",
2000
+ md: "flex max-w-xs flex-col gap-1.5 px-3 py-2.5"
2001
+ } },
2002
+ defaultVariants: { size: "sm" }
2003
+ });
2004
+ const TooltipContent = React.forwardRef(({ className, sideOffset = 6, size, arrow = true, children, ...props }, ref) => /* @__PURE__ */ jsxs(Tooltip$1.Content, {
1993
2005
  ref,
1994
2006
  sideOffset,
1995
- className: cn("z-[var(--z-tooltip)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md", tooltipAnimationClasses, className),
1996
- ...props
2007
+ className: cn(tooltipContentVariants({ size }), tooltipAnimationClasses, className),
2008
+ ...props,
2009
+ children: [children, arrow ? /* @__PURE__ */ jsx(TooltipArrow, {}) : null]
1997
2010
  }));
1998
2011
  TooltipContent.displayName = Tooltip$1.Content.displayName;
2012
+ const TooltipTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", {
2013
+ ref,
2014
+ className: cn("font-semibold leading-none", className),
2015
+ ...props
2016
+ }));
2017
+ TooltipTitle.displayName = "TooltipTitle";
2018
+ const TooltipDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("p", {
2019
+ ref,
2020
+ className: cn("text-xs text-muted-foreground", className),
2021
+ ...props
2022
+ }));
2023
+ TooltipDescription.displayName = "TooltipDescription";
2024
+ const TooltipMedia = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2025
+ ref,
2026
+ className: cn("shrink-0", className),
2027
+ ...props
2028
+ }));
2029
+ TooltipMedia.displayName = "TooltipMedia";
2030
+ const TooltipShortcut = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
2031
+ ref,
2032
+ className: cn("ml-auto inline-flex items-center gap-1", className),
2033
+ ...props
2034
+ }));
2035
+ TooltipShortcut.displayName = "TooltipShortcut";
2036
+ const TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Arrow, {
2037
+ ref,
2038
+ width: 12,
2039
+ height: 7,
2040
+ className: cn("fill-popover drop-shadow-[0_1px_0_hsl(var(--border))]", className),
2041
+ ...props
2042
+ }));
2043
+ TooltipArrow.displayName = Tooltip$1.Arrow.displayName;
1999
2044
  //#endregion
2000
2045
  //#region src/components/text-editor.tsx
2001
2046
  const ToolbarButton = ({ onClick, isActive, disabled, tooltip, children }) => /* @__PURE__ */ jsxs(Tooltip, { children: [/* @__PURE__ */ jsx(TooltipTrigger, {
@@ -2007,6 +2052,7 @@ const ToolbarButton = ({ onClick, isActive, disabled, tooltip, children }) => /*
2007
2052
  disabled,
2008
2053
  className: cn("h-8 w-8 p-0", isActive && "bg-accent text-accent-foreground"),
2009
2054
  onClick,
2055
+ "aria-label": tooltip,
2010
2056
  children
2011
2057
  })
2012
2058
  }), /* @__PURE__ */ jsx(TooltipContent, {
@@ -2193,6 +2239,11 @@ const TextEditor = React.forwardRef(({ value, onChange, placeholder = "Start wri
2193
2239
  ],
2194
2240
  content: value,
2195
2241
  editable: !disabled,
2242
+ editorProps: { attributes: {
2243
+ role: "textbox",
2244
+ "aria-multiline": "true",
2245
+ "aria-label": placeholder || "Editor"
2246
+ } },
2196
2247
  onUpdate: ({ editor: e }) => {
2197
2248
  onChange?.(e.getHTML());
2198
2249
  },
@@ -2334,7 +2385,7 @@ Switch.displayName = Switch$1.Root.displayName;
2334
2385
  //#endregion
2335
2386
  //#region src/components/slider.tsx
2336
2387
  const Slider = React.forwardRef(({ className, ...props }, ref) => {
2337
- const { id, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-required": ariaRequired, ...rootProps } = useFieldControl(props);
2388
+ const { id, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-required": ariaRequired, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...rootProps } = useFieldControl(props);
2338
2389
  return /* @__PURE__ */ jsxs(Slider$1.Root, {
2339
2390
  ref,
2340
2391
  className: cn("relative flex w-full touch-none select-none items-center", className),
@@ -2344,6 +2395,8 @@ const Slider = React.forwardRef(({ className, ...props }, ref) => {
2344
2395
  children: /* @__PURE__ */ jsx(Slider$1.Range, { className: "absolute h-full bg-primary" })
2345
2396
  }), /* @__PURE__ */ jsx(Slider$1.Thumb, {
2346
2397
  id,
2398
+ "aria-label": ariaLabel,
2399
+ "aria-labelledby": ariaLabelledBy,
2347
2400
  "aria-describedby": describedBy,
2348
2401
  "aria-invalid": invalid,
2349
2402
  "aria-required": ariaRequired,
@@ -2503,6 +2556,14 @@ function Badge({ className, variant, ...props }) {
2503
2556
  });
2504
2557
  }
2505
2558
  //#endregion
2559
+ //#region src/components/kbd.tsx
2560
+ const Kbd = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("kbd", {
2561
+ ref,
2562
+ className: cn("pointer-events-none inline-flex h-5 min-w-5 items-center justify-center rounded-sm border border-border bg-muted px-1 font-sans text-[0.6875rem] font-medium text-muted-foreground select-none", className),
2563
+ ...props
2564
+ }));
2565
+ Kbd.displayName = "Kbd";
2566
+ //#endregion
2506
2567
  //#region src/components/rotating-badge.tsx
2507
2568
  const DEFAULT_SIZE = 160;
2508
2569
  const DEFAULT_DURATION = 26;
@@ -3026,7 +3087,7 @@ const Stepper = React.forwardRef(({ className, orientation = "horizontal", inter
3026
3087
  children: /* @__PURE__ */ jsx("div", {
3027
3088
  ref,
3028
3089
  role: interactive ? "tablist" : void 0,
3029
- "aria-orientation": orientation,
3090
+ "aria-orientation": interactive ? orientation : void 0,
3030
3091
  className: cn("flex w-full", orientation === "horizontal" ? "flex-row items-start" : "flex-col items-stretch", className),
3031
3092
  ...props,
3032
3093
  children: decoratedChildren
@@ -3575,6 +3636,7 @@ function DataTableInner({ columns, data, filterColumn, filterPlaceholder = "Filt
3575
3636
  },
3576
3637
  children: [/* @__PURE__ */ jsx(SelectTrigger, {
3577
3638
  className: "h-8 w-[70px]",
3639
+ "aria-label": "Rows per page",
3578
3640
  children: /* @__PURE__ */ jsx(SelectValue, { placeholder: `${paginationVal.pageSize}` })
3579
3641
  }), /* @__PURE__ */ jsx(SelectContent, {
3580
3642
  side: "top",
@@ -3657,6 +3719,7 @@ const Progress = React.forwardRef(({ className, value, ...props }, ref) => /* @_
3657
3719
  ref,
3658
3720
  className: cn("relative h-4 w-full overflow-hidden rounded-full bg-muted", className),
3659
3721
  ...props,
3722
+ "aria-label": props["aria-label"] ?? "Progress",
3660
3723
  children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
3661
3724
  className: "h-full w-full flex-1 bg-primary transition-all duration-normal ease-default",
3662
3725
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
@@ -3691,7 +3754,8 @@ function formatCurrency(amount, divisor, locale, currency) {
3691
3754
  maximumFractionDigits: 0
3692
3755
  }).format(amount / divisor);
3693
3756
  }
3694
- const ProgressBar = React.forwardRef(({ className, value = 0, max = 100, color, size, label, showValue, format = "percent", locale = "en-US", currency = "USD", currencyDivisor = 1, ...props }, ref) => {
3757
+ const ProgressBar = React.forwardRef(({ className, value = 0, max = 100, color, size, label, showValue, format = "percent", locale = "en-US", currency = "USD", currencyDivisor = 1, "aria-label": ariaLabel, ...props }, ref) => {
3758
+ const labelId = React.useId();
3695
3759
  const pct = Math.min(100, Math.max(0, value / max * 100));
3696
3760
  const formattedValue = React.useMemo(() => {
3697
3761
  if (format === "currency") return `${formatCurrency(value, currencyDivisor, locale, currency)} of ${formatCurrency(max, currencyDivisor, locale, currency)}`;
@@ -3712,6 +3776,7 @@ const ProgressBar = React.forwardRef(({ className, value = 0, max = 100, color,
3712
3776
  children: [(label || showValue) && /* @__PURE__ */ jsxs("div", {
3713
3777
  className: "mb-1.5 flex items-center justify-between text-sm",
3714
3778
  children: [label && /* @__PURE__ */ jsx("span", {
3779
+ id: labelId,
3715
3780
  className: "font-medium text-foreground",
3716
3781
  children: label
3717
3782
  }), showValue && /* @__PURE__ */ jsx("span", {
@@ -3724,6 +3789,8 @@ const ProgressBar = React.forwardRef(({ className, value = 0, max = 100, color,
3724
3789
  "aria-valuenow": value,
3725
3790
  "aria-valuemin": 0,
3726
3791
  "aria-valuemax": max,
3792
+ "aria-labelledby": label ? labelId : void 0,
3793
+ "aria-label": label ? void 0 : ariaLabel ?? "Progress",
3727
3794
  children: /* @__PURE__ */ jsx("div", {
3728
3795
  className: cn(progressBarVariants({ color })),
3729
3796
  style: { width: `${pct}%` }
@@ -3740,6 +3807,7 @@ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) =>
3740
3807
  ...props,
3741
3808
  children: [
3742
3809
  /* @__PURE__ */ jsx(ScrollArea$1.Viewport, {
3810
+ tabIndex: 0,
3743
3811
  className: "h-full w-full rounded-[inherit]",
3744
3812
  children
3745
3813
  }),
@@ -4036,11 +4104,31 @@ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props
4036
4104
  ]
4037
4105
  }));
4038
4106
  NavigationMenuTrigger.displayName = NavigationMenu$1.Trigger.displayName;
4039
- const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
4040
- ref,
4041
- className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:duration-200 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0", className),
4042
- ...props
4043
- }));
4107
+ const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => {
4108
+ const innerRef = React.useRef(null);
4109
+ React.useImperativeHandle(ref, () => innerRef.current);
4110
+ const [closed, setClosed] = React.useState(true);
4111
+ React.useEffect(() => {
4112
+ const el = innerRef.current;
4113
+ if (!el) return;
4114
+ const sync = () => {
4115
+ setClosed(el.getAttribute("data-state") === "closed" || el.hasAttribute("hidden"));
4116
+ };
4117
+ sync();
4118
+ const observer = new MutationObserver(sync);
4119
+ observer.observe(el, {
4120
+ attributes: true,
4121
+ attributeFilter: ["data-state", "hidden"]
4122
+ });
4123
+ return () => observer.disconnect();
4124
+ }, []);
4125
+ return /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
4126
+ ref: innerRef,
4127
+ inert: closed,
4128
+ className: cn("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto", "group-data-[viewport=false]/navigation-menu:top-full group-data-[viewport=false]/navigation-menu:mt-1.5 group-data-[viewport=false]/navigation-menu:overflow-hidden group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:border group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow-lg group-data-[viewport=false]/navigation-menu:duration-200 group-data-[viewport=false]/navigation-menu:data-[state=open]:animate-in group-data-[viewport=false]/navigation-menu:data-[state=closed]:animate-out group-data-[viewport=false]/navigation-menu:data-[state=closed]:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-[state=open]:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-[state=closed]:fade-out-0 group-data-[viewport=false]/navigation-menu:data-[state=open]:fade-in-0", className),
4129
+ ...props
4130
+ });
4131
+ });
4044
4132
  NavigationMenuContent.displayName = NavigationMenu$1.Content.displayName;
4045
4133
  const NavigationMenuLink = NavigationMenu$1.Link;
4046
4134
  const NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
@@ -4175,7 +4263,7 @@ PaginationEllipsis.displayName = "PaginationEllipsis";
4175
4263
  //#region src/components/command.tsx
4176
4264
  const Command = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1, {
4177
4265
  ref,
4178
- className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className),
4266
+ className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-foreground", className),
4179
4267
  ...props
4180
4268
  }));
4181
4269
  Command.displayName = Command$1.displayName;
@@ -4219,13 +4307,14 @@ const CommandGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PU
4219
4307
  CommandGroup.displayName = Command$1.Group.displayName;
4220
4308
  const CommandSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Separator, {
4221
4309
  ref,
4310
+ "aria-hidden": "true",
4222
4311
  className: cn("-mx-1 h-px bg-border", className),
4223
4312
  ...props
4224
4313
  }));
4225
4314
  CommandSeparator.displayName = Command$1.Separator.displayName;
4226
4315
  const CommandItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Command$1.Item, {
4227
4316
  ref,
4228
- className: cn(menuItemClasses, "data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground", className),
4317
+ className: cn(menuItemClasses, "text-foreground data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground", className),
4229
4318
  ...props
4230
4319
  }));
4231
4320
  CommandItem.displayName = Command$1.Item.displayName;
@@ -4394,6 +4483,7 @@ const EditableTitle = React.forwardRef(({ className, size, value, onSave, onChan
4394
4483
  }),
4395
4484
  loading && /* @__PURE__ */ jsx("span", {
4396
4485
  className: cn("inline-flex items-center justify-center shrink-0 rounded-md text-muted-foreground", loadingSpinnerWrapClass(size), "animate-spin pointer-events-none"),
4486
+ role: "status",
4397
4487
  "aria-label": "Saving",
4398
4488
  children: /* @__PURE__ */ jsxs("svg", {
4399
4489
  xmlns: "http://www.w3.org/2000/svg",
@@ -5491,7 +5581,8 @@ function VerifyBlock({ onVerify, onResend, codeLength = 6, loading = false, erro
5491
5581
  onKeyDown: (e) => handleKeyDown(index, e),
5492
5582
  disabled: loading || disabled,
5493
5583
  className: "h-12 w-12 text-center text-lg font-semibold",
5494
- autoFocus: index === 0
5584
+ autoFocus: index === 0,
5585
+ "aria-label": `Digit ${index + 1} of ${codeLength}`
5495
5586
  }, index))
5496
5587
  }),
5497
5588
  loading && /* @__PURE__ */ jsx("div", {
@@ -5696,6 +5787,7 @@ function HeaderBlock({ logo, nav, actions, onMenuToggle, sticky = true, classNam
5696
5787
  children: logo
5697
5788
  }),
5698
5789
  nav && /* @__PURE__ */ jsx("nav", {
5790
+ "aria-label": "Primary",
5699
5791
  className: "hidden md:flex items-center gap-6 text-sm font-medium flex-1",
5700
5792
  children: nav
5701
5793
  }),
@@ -6099,6 +6191,7 @@ function SidebarItemComponent({ item, collapsed }) {
6099
6191
  return /* @__PURE__ */ jsxs(item.href ? "a" : "button", {
6100
6192
  href: item.href,
6101
6193
  onClick: item.onClick,
6194
+ "aria-label": collapsed ? item.label : void 0,
6102
6195
  className: cn("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground", item.active && "bg-accent text-accent-foreground", collapsed && "justify-center px-2"),
6103
6196
  children: [item.icon && /* @__PURE__ */ jsx("span", {
6104
6197
  className: "flex h-5 w-5 shrink-0 items-center justify-center",
@@ -6115,6 +6208,7 @@ function SidebarBlock({ sections, header, footer, collapsed = false, className }
6115
6208
  children: header
6116
6209
  }),
6117
6210
  /* @__PURE__ */ jsx("nav", {
6211
+ "aria-label": "Sidebar",
6118
6212
  className: "flex-1 space-y-4 overflow-y-auto p-4",
6119
6213
  children: sections.map((section, sIdx) => /* @__PURE__ */ jsxs("div", {
6120
6214
  className: "space-y-1",
@@ -6148,6 +6242,7 @@ function FooterBlock({ copyright, links = [], logo, className }) {
6148
6242
  children: copyright
6149
6243
  })]
6150
6244
  }), links.length > 0 && /* @__PURE__ */ jsx("nav", {
6245
+ "aria-label": "Footer",
6151
6246
  className: "flex gap-4",
6152
6247
  children: links.map((link) => /* @__PURE__ */ jsx("a", {
6153
6248
  href: link.href,
@@ -6718,8 +6813,8 @@ const ShowcasePanelsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, a
6718
6813
  ...props,
6719
6814
  children: [/* @__PURE__ */ jsxs("div", {
6720
6815
  className: "hidden md:block",
6721
- children: [/* @__PURE__ */ jsx("ul", {
6722
- role: "tablist",
6816
+ children: [/* @__PURE__ */ jsx("div", {
6817
+ role: "group",
6723
6818
  "aria-label": ariaLabel,
6724
6819
  className: "relative grid h-[28rem] gap-[3px] motion-safe:transition-[grid-template-columns] motion-safe:duration-500 md:h-[36rem]",
6725
6820
  style: {
@@ -6732,7 +6827,7 @@ const ShowcasePanelsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, a
6732
6827
  const isActive = i === activeIndex;
6733
6828
  const isShown = i === shownIndex;
6734
6829
  const numeral = numeralFor(item, i);
6735
- return /* @__PURE__ */ jsxs("li", {
6830
+ return /* @__PURE__ */ jsxs("div", {
6736
6831
  className: "relative h-full min-w-0 overflow-hidden",
6737
6832
  children: [
6738
6833
  /* @__PURE__ */ jsx("button", {
@@ -6740,10 +6835,9 @@ const ShowcasePanelsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, a
6740
6835
  tabRefs.current[i] = el;
6741
6836
  },
6742
6837
  type: "button",
6743
- role: "tab",
6744
6838
  id: tabId(i),
6745
6839
  "aria-controls": panelId(i),
6746
- "aria-selected": isActive,
6840
+ "aria-pressed": isActive,
6747
6841
  "aria-label": `${numeral}: ${item.title}`,
6748
6842
  tabIndex: isActive ? 0 : -1,
6749
6843
  onClick: () => setActiveIndex(i),
@@ -6761,11 +6855,8 @@ const ShowcasePanelsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, a
6761
6855
  })
6762
6856
  }),
6763
6857
  /* @__PURE__ */ jsxs("div", {
6764
- role: "tabpanel",
6765
6858
  id: panelId(i),
6766
- "aria-labelledby": tabId(i),
6767
6859
  "aria-hidden": !isShown,
6768
- tabIndex: isShown ? 0 : -1,
6769
6860
  className: "pointer-events-none absolute inset-0 outline-none",
6770
6861
  children: [
6771
6862
  (renderImage ?? defaultImage)(item, i),
@@ -7043,7 +7134,7 @@ const ProcessStepsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, act
7043
7134
  }, item.id);
7044
7135
  })
7045
7136
  ]
7046
- }), /* @__PURE__ */ jsx("ol", {
7137
+ }), /* @__PURE__ */ jsx("div", {
7047
7138
  role: "tablist",
7048
7139
  "aria-label": ariaLabel,
7049
7140
  onKeyDown: handleTablistKeyDown,
@@ -7051,43 +7142,40 @@ const ProcessStepsBlock = React.forwardRef(({ items, defaultActiveIndex = 0, act
7051
7142
  style: { gridTemplateColumns: `repeat(${total}, minmax(0, 1fr))` },
7052
7143
  children: items.map((item, i) => {
7053
7144
  const isActive = i === activeIndex;
7054
- return /* @__PURE__ */ jsx("li", {
7055
- className: "relative",
7056
- children: /* @__PURE__ */ jsxs("button", {
7057
- ref: (el) => {
7058
- tabRefs.current[i] = el;
7059
- },
7060
- type: "button",
7061
- role: "tab",
7062
- id: tabId(i),
7063
- "aria-controls": panelId(i),
7064
- "aria-selected": isActive,
7065
- "aria-current": isActive ? "step" : void 0,
7066
- tabIndex: isActive ? 0 : -1,
7067
- onClick: () => setActiveIndex(i),
7068
- 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"),
7069
- children: [
7070
- /* @__PURE__ */ jsx("span", {
7071
- className: "font-mono text-[0.5625rem] tracking-[0.2em] text-foreground/45 uppercase md:text-[0.625rem]",
7072
- children: stepLabel(item, i)
7073
- }),
7074
- /* @__PURE__ */ jsx("span", {
7075
- className: "hidden text-sm font-medium tracking-tight md:inline md:text-base",
7076
- children: item.title
7077
- }),
7078
- /* @__PURE__ */ jsx("span", {
7079
- "aria-hidden": true,
7080
- className: "pointer-events-none absolute inset-x-0 top-0 h-px overflow-hidden bg-foreground/10",
7081
- children: isActive && /* @__PURE__ */ jsx("span", {
7082
- className: "block h-full origin-left bg-brand-accent",
7083
- style: {
7084
- transform: `scaleX(${isAutoAdvancing ? progress : 1})`,
7085
- transition: isAutoAdvancing ? `transform ${TICK_MS}ms linear` : "none"
7086
- }
7087
- })
7145
+ return /* @__PURE__ */ jsxs("button", {
7146
+ ref: (el) => {
7147
+ tabRefs.current[i] = el;
7148
+ },
7149
+ type: "button",
7150
+ role: "tab",
7151
+ id: tabId(i),
7152
+ "aria-controls": panelId(i),
7153
+ "aria-selected": isActive,
7154
+ "aria-current": isActive ? "step" : void 0,
7155
+ tabIndex: isActive ? 0 : -1,
7156
+ onClick: () => setActiveIndex(i),
7157
+ 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"),
7158
+ children: [
7159
+ /* @__PURE__ */ jsx("span", {
7160
+ className: "font-mono text-[0.5625rem] tracking-[0.2em] text-muted-foreground uppercase md:text-[0.625rem]",
7161
+ children: stepLabel(item, i)
7162
+ }),
7163
+ /* @__PURE__ */ jsx("span", {
7164
+ className: "hidden text-sm font-medium tracking-tight md:inline md:text-base",
7165
+ children: item.title
7166
+ }),
7167
+ /* @__PURE__ */ jsx("span", {
7168
+ "aria-hidden": true,
7169
+ className: "pointer-events-none absolute inset-x-0 top-0 h-px overflow-hidden bg-foreground/10",
7170
+ children: isActive && /* @__PURE__ */ jsx("span", {
7171
+ className: "block h-full origin-left bg-brand-accent",
7172
+ style: {
7173
+ transform: `scaleX(${isAutoAdvancing ? progress : 1})`,
7174
+ transition: isAutoAdvancing ? `transform ${TICK_MS}ms linear` : "none"
7175
+ }
7088
7176
  })
7089
- ]
7090
- })
7177
+ })
7178
+ ]
7091
7179
  }, item.id);
7092
7180
  })
7093
7181
  })]
@@ -7354,7 +7442,8 @@ const ReviewsBlock = React.forwardRef(({ reviews, averageRating, totalReviews, t
7354
7442
  }),
7355
7443
  /* @__PURE__ */ jsx(Progress, {
7356
7444
  value: totalReviews > 0 ? count / totalReviews * 100 : 0,
7357
- className: "h-2 flex-1"
7445
+ className: "h-2 flex-1",
7446
+ "aria-label": `${star} star reviews`
7358
7447
  }),
7359
7448
  /* @__PURE__ */ jsx("span", {
7360
7449
  className: "w-8 text-right text-sm text-muted-foreground",
@@ -8140,6 +8229,7 @@ function ProfileSettingsBlock({ initialData, onSave, onAvatarChange, loading = f
8140
8229
  type: "button",
8141
8230
  onClick: handleAvatarClick,
8142
8231
  disabled: loading || disabled,
8232
+ "aria-label": "Change photo",
8143
8233
  className: "absolute inset-0 flex items-center justify-center rounded-full bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",
8144
8234
  children: /* @__PURE__ */ jsx(Camera, { className: "h-5 w-5 text-white" })
8145
8235
  }),
@@ -8355,7 +8445,8 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
8355
8445
  }), /* @__PURE__ */ jsx(Switch, {
8356
8446
  checked: values[setting.id],
8357
8447
  onCheckedChange: (checked) => handleToggle(setting.id, checked),
8358
- disabled: loading || disabled
8448
+ disabled: loading || disabled,
8449
+ "aria-label": setting.label
8359
8450
  })]
8360
8451
  }, setting.id))
8361
8452
  }) })] }, gIdx)),
@@ -8810,7 +8901,7 @@ function BrandBand() {
8810
8901
  className: "rounded-lg bg-brand-accent px-6 py-10 text-brand-accent-foreground md:px-10",
8811
8902
  children: [
8812
8903
  /* @__PURE__ */ jsx("p", {
8813
- className: "text-xs font-semibold uppercase tracking-wide text-highlight",
8904
+ className: "text-xs font-semibold uppercase tracking-wide text-brand-accent-foreground",
8814
8905
  children: "Built on the brand accent"
8815
8906
  }),
8816
8907
  /* @__PURE__ */ jsx("h3", {
@@ -8950,6 +9041,6 @@ const ContrastStrip = React.forwardRef(({ checks, mode = "both", failingOnly = f
8950
9041
  });
8951
9042
  ContrastStrip.displayName = "ContrastStrip";
8952
9043
  //#endregion
8953
- 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, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, 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, ContrastStrip, 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, FloatingNavBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, JsonLd, Label, MaintenanceBlock, MediaCard, MegaMenuPanel, 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, ResourcesBlock, ReviewsBlock, RotatingBadge, 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, SocialFeedBlock, SocialProviders, Spinner, StatsBandBlock, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TestimonialCarousel, TestimonialMasonry, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, ThemeShowcase, TimePicker, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, megaMenuGridColumns, megaMenuToFloatingNavItems, napRecordToJsonLd, navigationMenuTriggerStyle, newTabAttributes, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, renderPlainLink, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, testimonialInitials, themeShowcaseSections, toast, useCarousel, useDensity, useField, useFieldControl, useFieldGroup, useFieldIds, useFormContext, useHideOnScroll, useIsMobile, useScrollReveal, useSidebar, useTheme };
9044
+ 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, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, 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, ContrastStrip, 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, FloatingNavBlock, FooterBlock, ForgotPasswordBlock, Form, FormError, FormField, HeaderBlock, Input, InputGroup, JsonLd, Kbd, Label, MaintenanceBlock, MediaCard, MegaMenuPanel, 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, ResourcesBlock, ReviewsBlock, RotatingBadge, 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, SocialFeedBlock, SocialProviders, Spinner, StatsBandBlock, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TestimonialCarousel, TestimonialMasonry, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, ThemeShowcase, TimePicker, Toaster, Tooltip, TooltipArrow, TooltipContent, TooltipDescription, TooltipMedia, TooltipProvider, TooltipShortcut, TooltipTitle, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, megaMenuGridColumns, megaMenuToFloatingNavItems, napRecordToJsonLd, navigationMenuTriggerStyle, newTabAttributes, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, ratingVariants, renderPlainLink, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, testimonialInitials, themeShowcaseSections, toast, useCarousel, useDensity, useField, useFieldControl, useFieldGroup, useFieldIds, useFormContext, useHideOnScroll, useIsMobile, useScrollReveal, useSidebar, useTheme };
8954
9045
 
8955
9046
  //# sourceMappingURL=index.mjs.map