@bison-lab/ui 1.0.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +42 -18
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +144 -35
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -301,6 +301,7 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
|
|
|
301
301
|
const [errors, setErrors] = React.useState({});
|
|
302
302
|
const [touched, setTouched] = React.useState({});
|
|
303
303
|
const [isSubmitting, setIsSubmitting] = React.useState(false);
|
|
304
|
+
const [errorVersion, setErrorVersion] = React.useState(0);
|
|
304
305
|
const setFieldError = React.useCallback((name, error) => {
|
|
305
306
|
setErrors((prev) => ({
|
|
306
307
|
...prev,
|
|
@@ -336,6 +337,7 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
|
|
|
336
337
|
if (!fieldErrors[path]) fieldErrors[path] = issue.message;
|
|
337
338
|
}
|
|
338
339
|
setErrors(fieldErrors);
|
|
340
|
+
setErrorVersion((v) => v + 1);
|
|
339
341
|
setIsSubmitting(false);
|
|
340
342
|
return;
|
|
341
343
|
}
|
|
@@ -352,7 +354,8 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
|
|
|
352
354
|
clearFieldError,
|
|
353
355
|
setFieldTouched,
|
|
354
356
|
isSubmitting,
|
|
355
|
-
formMode
|
|
357
|
+
formMode,
|
|
358
|
+
errorVersion
|
|
356
359
|
}), [
|
|
357
360
|
errors,
|
|
358
361
|
touched,
|
|
@@ -360,7 +363,8 @@ const Form = React.forwardRef(({ onSubmit, schema, formMode = "native", children
|
|
|
360
363
|
clearFieldError,
|
|
361
364
|
setFieldTouched,
|
|
362
365
|
isSubmitting,
|
|
363
|
-
formMode
|
|
366
|
+
formMode,
|
|
367
|
+
errorVersion
|
|
364
368
|
]);
|
|
365
369
|
return /* @__PURE__ */ jsx(FormContext.Provider, {
|
|
366
370
|
value: contextValue,
|
|
@@ -392,7 +396,7 @@ function detectControlKind(shell) {
|
|
|
392
396
|
if (shell.querySelector("input")) return "input";
|
|
393
397
|
return "other";
|
|
394
398
|
}
|
|
395
|
-
const OutlinedField = React.forwardRef(({ label, htmlFor, error, hint, required, className, children }, ref) => {
|
|
399
|
+
const OutlinedField = React.forwardRef(({ label, htmlFor, error, errorVersion = 0, hint, required, className, children }, ref) => {
|
|
396
400
|
const shellRef = React.useRef(null);
|
|
397
401
|
const [focused, setFocused] = React.useState(false);
|
|
398
402
|
const [hasValue, setHasValue] = React.useState(false);
|
|
@@ -423,6 +427,13 @@ const OutlinedField = React.forwardRef(({ label, htmlFor, error, hint, required,
|
|
|
423
427
|
shell.removeEventListener("focusout", onFocusOut);
|
|
424
428
|
};
|
|
425
429
|
}, [syncFromDom]);
|
|
430
|
+
React.useEffect(() => {
|
|
431
|
+
const el = shellRef.current;
|
|
432
|
+
if (!el || !error) return;
|
|
433
|
+
el.style.animation = "none";
|
|
434
|
+
el.offsetWidth;
|
|
435
|
+
el.style.animation = "";
|
|
436
|
+
}, [errorVersion, error]);
|
|
426
437
|
const isFloated = controlKind === "other" ? true : focused || hasValue;
|
|
427
438
|
const handleInputCapture = React.useCallback((e) => {
|
|
428
439
|
const t = e.target;
|
|
@@ -451,7 +462,7 @@ const OutlinedField = React.forwardRef(({ label, htmlFor, error, hint, required,
|
|
|
451
462
|
children: [
|
|
452
463
|
/* @__PURE__ */ jsxs("div", {
|
|
453
464
|
ref: shellRef,
|
|
454
|
-
className: cn("group/outlined relative w-full min-w-0 rounded-md border border-input bg-background", "ring-offset-background", "focus-within:border-primary focus-within:ring-2 focus-within:ring-primary/30 focus-within:ring-offset-0", outlinedFieldNestResetClasses, isTextarea ? "flex min-h-[80px] flex-col py-2" : "flex h-[var(--density-height-md)] items-stretch", !isFloated && !focused && "[&_input]:placeholder:text-transparent [&_textarea]:placeholder:text-transparent"),
|
|
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", !isFloated && !focused && "[&_input]:placeholder:text-transparent [&_textarea]:placeholder:text-transparent"),
|
|
455
466
|
onInputCapture: handleInputCapture,
|
|
456
467
|
children: [/* @__PURE__ */ jsxs(motion.label, {
|
|
457
468
|
htmlFor,
|
|
@@ -474,11 +485,11 @@ const OutlinedField = React.forwardRef(({ label, htmlFor, error, hint, required,
|
|
|
474
485
|
})]
|
|
475
486
|
}),
|
|
476
487
|
error ? /* @__PURE__ */ jsx("p", {
|
|
477
|
-
className: "text-sm text-destructive",
|
|
488
|
+
className: "text-sm leading-none text-destructive",
|
|
478
489
|
children: error
|
|
479
490
|
}) : null,
|
|
480
491
|
!error && hint ? /* @__PURE__ */ jsx("p", {
|
|
481
|
-
className: "text-sm text-muted-foreground",
|
|
492
|
+
className: "text-sm leading-none text-muted-foreground",
|
|
482
493
|
children: hint
|
|
483
494
|
}) : null
|
|
484
495
|
]
|
|
@@ -488,22 +499,34 @@ OutlinedField.displayName = "OutlinedField";
|
|
|
488
499
|
//#endregion
|
|
489
500
|
//#region src/form/form-field.tsx
|
|
490
501
|
function FormField({ name, label, description, required, labelLayout = "stack", className, children }) {
|
|
491
|
-
const
|
|
502
|
+
const formCtx = useFormContext();
|
|
503
|
+
const errorMessage = formCtx?.errors[name];
|
|
504
|
+
const errorVersion = formCtx?.errorVersion ?? 0;
|
|
505
|
+
const wrapRef = React.useRef(null);
|
|
506
|
+
React.useEffect(() => {
|
|
507
|
+
const el = wrapRef.current;
|
|
508
|
+
if (!el || !errorMessage) return;
|
|
509
|
+
el.style.animation = "none";
|
|
510
|
+
el.offsetWidth;
|
|
511
|
+
el.style.animation = "";
|
|
512
|
+
}, [errorVersion, errorMessage]);
|
|
492
513
|
if (label && labelLayout === "outlined") return /* @__PURE__ */ jsx(OutlinedField, {
|
|
493
514
|
label,
|
|
494
515
|
htmlFor: name,
|
|
495
516
|
required,
|
|
496
517
|
error: errorMessage,
|
|
518
|
+
errorVersion,
|
|
497
519
|
hint: description,
|
|
498
520
|
className,
|
|
499
521
|
children
|
|
500
522
|
});
|
|
501
523
|
return /* @__PURE__ */ jsxs("div", {
|
|
502
|
-
|
|
524
|
+
ref: wrapRef,
|
|
525
|
+
className: cn("flex flex-col", errorMessage && "bison-shake", className),
|
|
503
526
|
children: [
|
|
504
527
|
label && /* @__PURE__ */ jsxs("label", {
|
|
505
528
|
htmlFor: name,
|
|
506
|
-
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
529
|
+
className: "mb-1.5 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
507
530
|
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
508
531
|
className: "text-destructive ml-1",
|
|
509
532
|
children: "*"
|
|
@@ -511,11 +534,11 @@ function FormField({ name, label, description, required, labelLayout = "stack",
|
|
|
511
534
|
}),
|
|
512
535
|
children,
|
|
513
536
|
description && !errorMessage && /* @__PURE__ */ jsx("p", {
|
|
514
|
-
className: "text-sm text-muted-foreground",
|
|
537
|
+
className: "mt-1.5 text-sm leading-none text-muted-foreground",
|
|
515
538
|
children: description
|
|
516
539
|
}),
|
|
517
540
|
errorMessage && /* @__PURE__ */ jsx("p", {
|
|
518
|
-
className: "text-sm text-destructive",
|
|
541
|
+
className: "mt-1.5 text-sm leading-none text-destructive",
|
|
519
542
|
children: errorMessage
|
|
520
543
|
})
|
|
521
544
|
]
|
|
@@ -658,20 +681,29 @@ const menuItemWithIndicatorClasses = "relative flex cursor-pointer select-none i
|
|
|
658
681
|
*/
|
|
659
682
|
const menuSeparatorClasses = "-mx-1 my-1 h-px bg-muted";
|
|
660
683
|
/**
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
684
|
+
* transitions.dev "menu dropdown" (05): scale-pop + fade from the Radix
|
|
685
|
+
* popper transform-origin, with distinct open/close timing. Driven by the
|
|
686
|
+
* --dropdown-* tokens. Used by Select Content, DropdownMenu Content,
|
|
687
|
+
* ContextMenu Content, Popover Content, Command popovers. Tooltip has its
|
|
688
|
+
* own faster, subtler timing — see `tooltipAnimationClasses`.
|
|
689
|
+
*/
|
|
690
|
+
const floatingAnimationClasses = "origin-[var(--radix-popper-transform-origin)] data-[state=open]:bison-pop-in data-[state=closed]:bison-pop-out";
|
|
691
|
+
/**
|
|
692
|
+
* transitions.dev "tooltip" (17): faster scale-pop driven by the --tt-*
|
|
693
|
+
* tokens. Used by Tooltip Content. NB: Radix Tooltip's open state is
|
|
694
|
+
* `delayed-open` / `instant-open` (not `open` like other overlays), so the
|
|
695
|
+
* enter animation keys off both.
|
|
664
696
|
*/
|
|
665
|
-
const
|
|
697
|
+
const tooltipAnimationClasses = "origin-[var(--radix-popper-transform-origin)] data-[state=delayed-open]:bison-tooltip-in data-[state=instant-open]:bison-tooltip-in data-[state=closed]:bison-tooltip-out";
|
|
666
698
|
/**
|
|
667
699
|
* Scrim (backdrop) shared by Dialog, AlertDialog, Sheet.
|
|
668
700
|
*/
|
|
669
|
-
const overlayScrimClasses = "fixed inset-0 z-[var(--z-modal-backdrop)] bg-black/80 data-[state=open]:
|
|
701
|
+
const overlayScrimClasses = "fixed inset-0 z-[var(--z-modal-backdrop)] bg-black/80 data-[state=open]:bison-scrim-in data-[state=closed]:bison-scrim-out";
|
|
670
702
|
/**
|
|
671
703
|
* Centered modal content positioning + chrome (Dialog, AlertDialog).
|
|
672
704
|
* Sheet has its own side-anchored variants in `sheet.tsx`.
|
|
673
705
|
*/
|
|
674
|
-
const centeredModalContentClasses = "fixed left-[50%] top-[50%] z-[var(--z-modal)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg
|
|
706
|
+
const centeredModalContentClasses = "fixed left-[50%] top-[50%] z-[var(--z-modal)] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg rounded-lg data-[state=open]:bison-modal-in data-[state=closed]:bison-modal-out";
|
|
675
707
|
//#endregion
|
|
676
708
|
//#region src/components/input.tsx
|
|
677
709
|
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
@@ -1261,7 +1293,7 @@ const TooltipTrigger = Tooltip$1.Trigger;
|
|
|
1261
1293
|
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Content, {
|
|
1262
1294
|
ref,
|
|
1263
1295
|
sideOffset,
|
|
1264
|
-
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",
|
|
1296
|
+
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),
|
|
1265
1297
|
...props
|
|
1266
1298
|
}));
|
|
1267
1299
|
TooltipContent.displayName = Tooltip$1.Content.displayName;
|
|
@@ -1568,11 +1600,27 @@ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1568
1600
|
RadioGroupItem.displayName = RadioGroup$1.Item.displayName;
|
|
1569
1601
|
//#endregion
|
|
1570
1602
|
//#region src/components/switch.tsx
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1603
|
+
const switchVariants = cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors duration-fast ease-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input", {
|
|
1604
|
+
variants: { size: {
|
|
1605
|
+
sm: "h-5 w-9",
|
|
1606
|
+
md: "h-6 w-11",
|
|
1607
|
+
lg: "h-7 w-14"
|
|
1608
|
+
} },
|
|
1609
|
+
defaultVariants: { size: "md" }
|
|
1610
|
+
});
|
|
1611
|
+
const switchThumbVariants = cva("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform duration-fast ease-default data-[state=unchecked]:translate-x-0", {
|
|
1612
|
+
variants: { size: {
|
|
1613
|
+
sm: "h-4 w-4 data-[state=checked]:translate-x-4",
|
|
1614
|
+
md: "h-5 w-5 data-[state=checked]:translate-x-5",
|
|
1615
|
+
lg: "h-6 w-6 data-[state=checked]:translate-x-7"
|
|
1616
|
+
} },
|
|
1617
|
+
defaultVariants: { size: "md" }
|
|
1618
|
+
});
|
|
1619
|
+
const Switch = React.forwardRef(({ className, size, ...props }, ref) => /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
1620
|
+
className: cn(switchVariants({ size }), className),
|
|
1573
1621
|
...props,
|
|
1574
1622
|
ref,
|
|
1575
|
-
children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn(
|
|
1623
|
+
children: /* @__PURE__ */ jsx(Switch$1.Thumb, { className: cn(switchThumbVariants({ size })) })
|
|
1576
1624
|
}));
|
|
1577
1625
|
Switch.displayName = Switch$1.Root.displayName;
|
|
1578
1626
|
//#endregion
|
|
@@ -1873,7 +1921,7 @@ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1873
1921
|
ref
|
|
1874
1922
|
}));
|
|
1875
1923
|
SheetOverlay.displayName = Dialog$1.Overlay.displayName;
|
|
1876
|
-
const sheetVariants = cva("fixed z-[var(--z-modal)] gap-4 bg-background p-6 shadow-lg
|
|
1924
|
+
const sheetVariants = cva("fixed z-[var(--z-modal)] gap-4 bg-background p-6 shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:[animation-duration:var(--panel-open-dur)] data-[state=closed]:[animation-duration:var(--panel-close-dur)] data-[state=open]:[animation-timing-function:var(--panel-ease)] data-[state=closed]:[animation-timing-function:var(--panel-ease)]", {
|
|
1877
1925
|
variants: {
|
|
1878
1926
|
side: {
|
|
1879
1927
|
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
@@ -2078,15 +2126,70 @@ function Toaster({ position = "bottom-right", richColors = true, closeButton = t
|
|
|
2078
2126
|
//#endregion
|
|
2079
2127
|
//#region src/components/tabs.tsx
|
|
2080
2128
|
const Tabs = Tabs$1.Root;
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2129
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
2130
|
+
const TabsList = React.forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
2131
|
+
const innerRef = React.useRef(null);
|
|
2132
|
+
const pillRef = React.useRef(null);
|
|
2133
|
+
const setRef = React.useCallback((node) => {
|
|
2134
|
+
innerRef.current = node;
|
|
2135
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2136
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2137
|
+
}, [forwardedRef]);
|
|
2138
|
+
const move = React.useCallback((animate) => {
|
|
2139
|
+
const list = innerRef.current;
|
|
2140
|
+
const pill = pillRef.current;
|
|
2141
|
+
if (!list || !pill) return;
|
|
2142
|
+
const active = list.querySelector("[role=\"tab\"][data-state=\"active\"]");
|
|
2143
|
+
if (!active) {
|
|
2144
|
+
pill.style.opacity = "0";
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
if (!animate) pill.style.transitionProperty = "none";
|
|
2148
|
+
pill.style.opacity = "1";
|
|
2149
|
+
pill.style.transform = `translateX(${active.offsetLeft}px)`;
|
|
2150
|
+
pill.style.width = `${active.offsetWidth}px`;
|
|
2151
|
+
if (!animate) {
|
|
2152
|
+
pill.offsetWidth;
|
|
2153
|
+
pill.style.transitionProperty = "";
|
|
2154
|
+
}
|
|
2155
|
+
}, []);
|
|
2156
|
+
useIsomorphicLayoutEffect(() => {
|
|
2157
|
+
move(false);
|
|
2158
|
+
const list = innerRef.current;
|
|
2159
|
+
if (!list) return;
|
|
2160
|
+
const observer = new MutationObserver(() => move(true));
|
|
2161
|
+
observer.observe(list, {
|
|
2162
|
+
subtree: true,
|
|
2163
|
+
attributes: true,
|
|
2164
|
+
attributeFilter: ["data-state"],
|
|
2165
|
+
childList: true
|
|
2166
|
+
});
|
|
2167
|
+
const resize = new ResizeObserver(() => move(false));
|
|
2168
|
+
resize.observe(list);
|
|
2169
|
+
return () => {
|
|
2170
|
+
observer.disconnect();
|
|
2171
|
+
resize.disconnect();
|
|
2172
|
+
};
|
|
2173
|
+
}, [move]);
|
|
2174
|
+
return /* @__PURE__ */ jsxs(Tabs$1.List, {
|
|
2175
|
+
ref: setRef,
|
|
2176
|
+
className: cn("relative isolate inline-flex h-[var(--density-height-md)] items-center justify-center rounded-md bg-muted p-1 text-muted-foreground", className),
|
|
2177
|
+
...props,
|
|
2178
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2179
|
+
ref: pillRef,
|
|
2180
|
+
"aria-hidden": "true",
|
|
2181
|
+
className: cn("pointer-events-none absolute bottom-1 left-0 top-1 z-0 rounded-sm opacity-0 shadow-sm", "bg-[var(--bison-tab-active-bg,hsl(var(--primary)))]", "transition-[transform,width] motion-reduce:transition-none"),
|
|
2182
|
+
style: {
|
|
2183
|
+
transitionDuration: "var(--tabs-dur)",
|
|
2184
|
+
transitionTimingFunction: "var(--tabs-ease)"
|
|
2185
|
+
}
|
|
2186
|
+
}), children]
|
|
2187
|
+
});
|
|
2188
|
+
});
|
|
2086
2189
|
TabsList.displayName = Tabs$1.List.displayName;
|
|
2087
2190
|
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.Trigger, {
|
|
2088
2191
|
ref,
|
|
2089
|
-
className: cn("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-
|
|
2192
|
+
className: cn("relative z-[1] inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium 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 data-[state=active]:text-[var(--bison-tab-active-fg,hsl(var(--primary-foreground)))]", className),
|
|
2090
2193
|
...props
|
|
2091
2194
|
}));
|
|
2092
2195
|
TabsTrigger.displayName = Tabs$1.Trigger.displayName;
|
|
@@ -3074,11 +3177,12 @@ const ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("sp
|
|
|
3074
3177
|
});
|
|
3075
3178
|
//#endregion
|
|
3076
3179
|
//#region src/components/navigation-menu.tsx
|
|
3077
|
-
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
|
|
3180
|
+
const NavigationMenu = React.forwardRef(({ className, children, viewport = true, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
|
|
3078
3181
|
ref,
|
|
3079
|
-
|
|
3182
|
+
"data-viewport": viewport,
|
|
3183
|
+
className: cn("group/navigation-menu relative z-10 flex max-w-max flex-1 items-center justify-center", className),
|
|
3080
3184
|
...props,
|
|
3081
|
-
children: [children, /* @__PURE__ */ jsx(NavigationMenuViewport, {})]
|
|
3185
|
+
children: [children, viewport ? /* @__PURE__ */ jsx(NavigationMenuViewport, {}) : null]
|
|
3082
3186
|
}));
|
|
3083
3187
|
NavigationMenu.displayName = NavigationMenu$1.Root.displayName;
|
|
3084
3188
|
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.List, {
|
|
@@ -3087,8 +3191,13 @@ const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3087
3191
|
...props
|
|
3088
3192
|
}));
|
|
3089
3193
|
NavigationMenuList.displayName = NavigationMenu$1.List.displayName;
|
|
3090
|
-
const NavigationMenuItem = NavigationMenu$1.Item
|
|
3091
|
-
|
|
3194
|
+
const NavigationMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
3195
|
+
ref,
|
|
3196
|
+
className: cn("relative", className),
|
|
3197
|
+
...props
|
|
3198
|
+
}));
|
|
3199
|
+
NavigationMenuItem.displayName = NavigationMenu$1.Item.displayName;
|
|
3200
|
+
const navigationMenuTriggerStyle = cva("group inline-flex h-[var(--density-height-md)] w-max items-center justify-center rounded-md bg-transparent px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50");
|
|
3092
3201
|
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
|
|
3093
3202
|
ref,
|
|
3094
3203
|
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
@@ -3105,7 +3214,7 @@ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props
|
|
|
3105
3214
|
NavigationMenuTrigger.displayName = NavigationMenu$1.Trigger.displayName;
|
|
3106
3215
|
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
3107
3216
|
ref,
|
|
3108
|
-
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", className),
|
|
3217
|
+
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),
|
|
3109
3218
|
...props
|
|
3110
3219
|
}));
|
|
3111
3220
|
NavigationMenuContent.displayName = NavigationMenu$1.Content.displayName;
|
|
@@ -5398,6 +5507,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
|
|
|
5398
5507
|
});
|
|
5399
5508
|
}
|
|
5400
5509
|
//#endregion
|
|
5401
|
-
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, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5510
|
+
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, ResetPasswordBlock, SavedPing, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, Separator, ServerErrorBlock, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Sidebar, SidebarBlock, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SignInBlock, SignUpBlock, Skeleton, Slider, SocialProviders, Spinner, Stepper, StepperDescription, StepperIndicator, StepperItem, StepperLabel, StepperSeparator, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TextContent, TextEditor, Textarea, ThemeProvider, ThemeScope, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, VerifyBlock, actionNegativeToneClasses, actionNeutralIconChromeClasses, actionNeutralToneClasses, actionPositiveToneClasses, alertVariants, avatarVariants, badgeVariants, buttonVariants, cn, dateRangePresets, editableTitleVariants, formatUsPhone, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, switchVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5402
5511
|
|
|
5403
5512
|
//# sourceMappingURL=index.mjs.map
|