@bison-lab/ui 1.0.1 → 1.1.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 +39 -17
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +131 -37
- 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
|
]
|
|
@@ -647,31 +670,40 @@ const menuSurfaceClasses = "z-[var(--z-dropdown)] min-w-[8rem] overflow-hidden r
|
|
|
647
670
|
* Base menu item: focus styling, disabled state, selection-ready.
|
|
648
671
|
* Used by: Select Item, DropdownMenu Item, ContextMenu Item, Command Item.
|
|
649
672
|
*/
|
|
650
|
-
const menuItemClasses = "relative flex cursor-
|
|
673
|
+
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";
|
|
651
674
|
/**
|
|
652
675
|
* Menu item variant with indicator gutter on the left (for checkbox/radio
|
|
653
676
|
* indicators on Select, DropdownMenu, ContextMenu).
|
|
654
677
|
*/
|
|
655
|
-
const menuItemWithIndicatorClasses = "relative flex cursor-
|
|
678
|
+
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";
|
|
656
679
|
/**
|
|
657
680
|
* Menu separator: horizontal rule sitting between menu groups.
|
|
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) => {
|
|
@@ -827,8 +859,9 @@ const PHONE_MAX_LENGTH = 14;
|
|
|
827
859
|
function parseUsPhoneDigits(value) {
|
|
828
860
|
return value.replace(/\D/g, "").slice(0, PHONE_MAX_DIGITS);
|
|
829
861
|
}
|
|
830
|
-
|
|
831
|
-
|
|
862
|
+
/** Formats a phone value (digits, E.164, or any mixed string) as `(XXX) XXX-XXXX`. */
|
|
863
|
+
function formatUsPhone(value) {
|
|
864
|
+
const d = parseUsPhoneDigits(value);
|
|
832
865
|
if (d.length <= 3) return d;
|
|
833
866
|
if (d.length <= 6) return `(${d.slice(0, 3)}) ${d.slice(3)}`;
|
|
834
867
|
return `(${d.slice(0, 3)}) ${d.slice(3, 6)}-${d.slice(6)}`;
|
|
@@ -836,7 +869,7 @@ function formatPhoneDisplay(digits) {
|
|
|
836
869
|
const PhoneInput = React.forwardRef(function PhoneInput({ value: valueProp, defaultValue = "", onChange, autoComplete = "tel", ...props }, ref) {
|
|
837
870
|
const isControlled = valueProp !== void 0;
|
|
838
871
|
const [uncontrolledDigits, setUncontrolledDigits] = React.useState(() => parseUsPhoneDigits(defaultValue));
|
|
839
|
-
const display =
|
|
872
|
+
const display = formatUsPhone(isControlled ? parseUsPhoneDigits(valueProp ?? "") : uncontrolledDigits);
|
|
840
873
|
function handleChange(event) {
|
|
841
874
|
const next = parseUsPhoneDigits(event.target.value);
|
|
842
875
|
if (!isControlled) setUncontrolledDigits(next);
|
|
@@ -1260,7 +1293,7 @@ const TooltipTrigger = Tooltip$1.Trigger;
|
|
|
1260
1293
|
const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Content, {
|
|
1261
1294
|
ref,
|
|
1262
1295
|
sideOffset,
|
|
1263
|
-
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),
|
|
1264
1297
|
...props
|
|
1265
1298
|
}));
|
|
1266
1299
|
TooltipContent.displayName = Tooltip$1.Content.displayName;
|
|
@@ -1872,7 +1905,7 @@ const SheetOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
1872
1905
|
ref
|
|
1873
1906
|
}));
|
|
1874
1907
|
SheetOverlay.displayName = Dialog$1.Overlay.displayName;
|
|
1875
|
-
const sheetVariants = cva("fixed z-[var(--z-modal)] gap-4 bg-background p-6 shadow-lg
|
|
1908
|
+
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)]", {
|
|
1876
1909
|
variants: {
|
|
1877
1910
|
side: {
|
|
1878
1911
|
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
@@ -2077,15 +2110,70 @@ function Toaster({ position = "bottom-right", richColors = true, closeButton = t
|
|
|
2077
2110
|
//#endregion
|
|
2078
2111
|
//#region src/components/tabs.tsx
|
|
2079
2112
|
const Tabs = Tabs$1.Root;
|
|
2080
|
-
const
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2113
|
+
const useIsomorphicLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
2114
|
+
const TabsList = React.forwardRef(({ className, children, ...props }, forwardedRef) => {
|
|
2115
|
+
const innerRef = React.useRef(null);
|
|
2116
|
+
const pillRef = React.useRef(null);
|
|
2117
|
+
const setRef = React.useCallback((node) => {
|
|
2118
|
+
innerRef.current = node;
|
|
2119
|
+
if (typeof forwardedRef === "function") forwardedRef(node);
|
|
2120
|
+
else if (forwardedRef) forwardedRef.current = node;
|
|
2121
|
+
}, [forwardedRef]);
|
|
2122
|
+
const move = React.useCallback((animate) => {
|
|
2123
|
+
const list = innerRef.current;
|
|
2124
|
+
const pill = pillRef.current;
|
|
2125
|
+
if (!list || !pill) return;
|
|
2126
|
+
const active = list.querySelector("[role=\"tab\"][data-state=\"active\"]");
|
|
2127
|
+
if (!active) {
|
|
2128
|
+
pill.style.opacity = "0";
|
|
2129
|
+
return;
|
|
2130
|
+
}
|
|
2131
|
+
if (!animate) pill.style.transitionProperty = "none";
|
|
2132
|
+
pill.style.opacity = "1";
|
|
2133
|
+
pill.style.transform = `translateX(${active.offsetLeft}px)`;
|
|
2134
|
+
pill.style.width = `${active.offsetWidth}px`;
|
|
2135
|
+
if (!animate) {
|
|
2136
|
+
pill.offsetWidth;
|
|
2137
|
+
pill.style.transitionProperty = "";
|
|
2138
|
+
}
|
|
2139
|
+
}, []);
|
|
2140
|
+
useIsomorphicLayoutEffect(() => {
|
|
2141
|
+
move(false);
|
|
2142
|
+
const list = innerRef.current;
|
|
2143
|
+
if (!list) return;
|
|
2144
|
+
const observer = new MutationObserver(() => move(true));
|
|
2145
|
+
observer.observe(list, {
|
|
2146
|
+
subtree: true,
|
|
2147
|
+
attributes: true,
|
|
2148
|
+
attributeFilter: ["data-state"],
|
|
2149
|
+
childList: true
|
|
2150
|
+
});
|
|
2151
|
+
const resize = new ResizeObserver(() => move(false));
|
|
2152
|
+
resize.observe(list);
|
|
2153
|
+
return () => {
|
|
2154
|
+
observer.disconnect();
|
|
2155
|
+
resize.disconnect();
|
|
2156
|
+
};
|
|
2157
|
+
}, [move]);
|
|
2158
|
+
return /* @__PURE__ */ jsxs(Tabs$1.List, {
|
|
2159
|
+
ref: setRef,
|
|
2160
|
+
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),
|
|
2161
|
+
...props,
|
|
2162
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2163
|
+
ref: pillRef,
|
|
2164
|
+
"aria-hidden": "true",
|
|
2165
|
+
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"),
|
|
2166
|
+
style: {
|
|
2167
|
+
transitionDuration: "var(--tabs-dur)",
|
|
2168
|
+
transitionTimingFunction: "var(--tabs-ease)"
|
|
2169
|
+
}
|
|
2170
|
+
}), children]
|
|
2171
|
+
});
|
|
2172
|
+
});
|
|
2085
2173
|
TabsList.displayName = Tabs$1.List.displayName;
|
|
2086
2174
|
const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Tabs$1.Trigger, {
|
|
2087
2175
|
ref,
|
|
2088
|
-
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-
|
|
2176
|
+
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),
|
|
2089
2177
|
...props
|
|
2090
2178
|
}));
|
|
2091
2179
|
TabsTrigger.displayName = Tabs$1.Trigger.displayName;
|
|
@@ -3073,11 +3161,12 @@ const ContextMenuShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("sp
|
|
|
3073
3161
|
});
|
|
3074
3162
|
//#endregion
|
|
3075
3163
|
//#region src/components/navigation-menu.tsx
|
|
3076
|
-
const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
|
|
3164
|
+
const NavigationMenu = React.forwardRef(({ className, children, viewport = true, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Root, {
|
|
3077
3165
|
ref,
|
|
3078
|
-
|
|
3166
|
+
"data-viewport": viewport,
|
|
3167
|
+
className: cn("group/navigation-menu relative z-10 flex max-w-max flex-1 items-center justify-center", className),
|
|
3079
3168
|
...props,
|
|
3080
|
-
children: [children, /* @__PURE__ */ jsx(NavigationMenuViewport, {})]
|
|
3169
|
+
children: [children, viewport ? /* @__PURE__ */ jsx(NavigationMenuViewport, {}) : null]
|
|
3081
3170
|
}));
|
|
3082
3171
|
NavigationMenu.displayName = NavigationMenu$1.Root.displayName;
|
|
3083
3172
|
const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.List, {
|
|
@@ -3086,8 +3175,13 @@ const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3086
3175
|
...props
|
|
3087
3176
|
}));
|
|
3088
3177
|
NavigationMenuList.displayName = NavigationMenu$1.List.displayName;
|
|
3089
|
-
const NavigationMenuItem = NavigationMenu$1.Item
|
|
3090
|
-
|
|
3178
|
+
const NavigationMenuItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Item, {
|
|
3179
|
+
ref,
|
|
3180
|
+
className: cn("relative", className),
|
|
3181
|
+
...props
|
|
3182
|
+
}));
|
|
3183
|
+
NavigationMenuItem.displayName = NavigationMenu$1.Item.displayName;
|
|
3184
|
+
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");
|
|
3091
3185
|
const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(NavigationMenu$1.Trigger, {
|
|
3092
3186
|
ref,
|
|
3093
3187
|
className: cn(navigationMenuTriggerStyle(), "group", className),
|
|
@@ -3104,7 +3198,7 @@ const NavigationMenuTrigger = React.forwardRef(({ className, children, ...props
|
|
|
3104
3198
|
NavigationMenuTrigger.displayName = NavigationMenu$1.Trigger.displayName;
|
|
3105
3199
|
const NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(NavigationMenu$1.Content, {
|
|
3106
3200
|
ref,
|
|
3107
|
-
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),
|
|
3201
|
+
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),
|
|
3108
3202
|
...props
|
|
3109
3203
|
}));
|
|
3110
3204
|
NavigationMenuContent.displayName = NavigationMenu$1.Content.displayName;
|
|
@@ -5397,6 +5491,6 @@ function NotificationSettingsBlock({ groups, onSave, loading = false, error, dis
|
|
|
5397
5491
|
});
|
|
5398
5492
|
}
|
|
5399
5493
|
//#endregion
|
|
5400
|
-
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, navigationMenuTriggerStyle, outlinedFieldNestResetClasses, parseUsPhoneDigits, progressBarVariants, spinnerVariants, stepperIndicatorVariants, stepperItemVariants, stepperLabelVariants, toast, useDensity, useFormContext, useIsMobile, useScrollReveal, useSidebar, useTheme };
|
|
5494
|
+
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 };
|
|
5401
5495
|
|
|
5402
5496
|
//# sourceMappingURL=index.mjs.map
|