@wow-two-beta/ui 0.0.16 → 0.0.18
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/actions/backToTopButton/BackToTopButton.d.ts +19 -0
- package/dist/actions/backToTopButton/BackToTopButton.d.ts.map +1 -0
- package/dist/actions/backToTopButton/index.d.ts +2 -0
- package/dist/actions/backToTopButton/index.d.ts.map +1 -0
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +2 -2
- package/dist/{chunk-XHGWBSIR.js → chunk-25CGSOXZ.js} +5 -87
- package/dist/chunk-25CGSOXZ.js.map +1 -0
- package/dist/{chunk-SM2TOB4U.js → chunk-3KPILWVX.js} +268 -4
- package/dist/chunk-3KPILWVX.js.map +1 -0
- package/dist/{chunk-ILYL6ROC.js → chunk-3P7DZCDS.js} +257 -5
- package/dist/chunk-3P7DZCDS.js.map +1 -0
- package/dist/{chunk-3IN5ULKY.js → chunk-45SFQEMP.js} +417 -37
- package/dist/chunk-45SFQEMP.js.map +1 -0
- package/dist/{chunk-W7LQZKTH.js → chunk-D7XIPKDJ.js} +109 -4
- package/dist/chunk-D7XIPKDJ.js.map +1 -0
- package/dist/{chunk-2VAZKEQD.js → chunk-DSA7L7PD.js} +256 -141
- package/dist/chunk-DSA7L7PD.js.map +1 -0
- package/dist/{chunk-NRAJPSEK.js → chunk-GRJBIGUD.js} +72 -6
- package/dist/chunk-GRJBIGUD.js.map +1 -0
- package/dist/chunk-NKADHZMX.js +39 -0
- package/dist/chunk-NKADHZMX.js.map +1 -0
- package/dist/chunk-NTW7SDAP.js +92 -0
- package/dist/chunk-NTW7SDAP.js.map +1 -0
- package/dist/chunk-O6UUYPTB.js +148 -0
- package/dist/chunk-O6UUYPTB.js.map +1 -0
- package/dist/{chunk-4ESR253U.js → chunk-XRTXK5Y4.js} +119 -7
- package/dist/chunk-XRTXK5Y4.js.map +1 -0
- package/dist/display/index.d.ts +1 -0
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +2 -2
- package/dist/display/swipeActions/SwipeActions.d.ts +17 -0
- package/dist/display/swipeActions/SwipeActions.d.ts.map +1 -0
- package/dist/display/swipeActions/index.d.ts +2 -0
- package/dist/display/swipeActions/index.d.ts.map +1 -0
- package/dist/feedback/index.d.ts +3 -0
- package/dist/feedback/index.d.ts.map +1 -1
- package/dist/feedback/index.js +3 -1
- package/dist/feedback/onboardingChecklist/OnboardingChecklist.d.ts +33 -0
- package/dist/feedback/onboardingChecklist/OnboardingChecklist.d.ts.map +1 -0
- package/dist/feedback/onboardingChecklist/index.d.ts +3 -0
- package/dist/feedback/onboardingChecklist/index.d.ts.map +1 -0
- package/dist/feedback/tour/Tour.d.ts +25 -0
- package/dist/feedback/tour/Tour.d.ts.map +1 -0
- package/dist/feedback/tour/index.d.ts +2 -0
- package/dist/feedback/tour/index.d.ts.map +1 -0
- package/dist/feedback/undoBar/UndoBar.d.ts +22 -0
- package/dist/feedback/undoBar/UndoBar.d.ts.map +1 -0
- package/dist/feedback/undoBar/index.d.ts +2 -0
- package/dist/feedback/undoBar/index.d.ts.map +1 -0
- package/dist/forms/index.d.ts +1 -0
- package/dist/forms/index.d.ts.map +1 -1
- package/dist/forms/index.js +6 -4
- package/dist/forms/wizard/Wizard.d.ts +58 -0
- package/dist/forms/wizard/Wizard.d.ts.map +1 -0
- package/dist/forms/wizard/index.d.ts +3 -0
- package/dist/forms/wizard/index.d.ts.map +1 -0
- package/dist/index.js +12 -9
- package/dist/layout/appShell/AppShell.d.ts +50 -0
- package/dist/layout/appShell/AppShell.d.ts.map +1 -0
- package/dist/layout/appShell/index.d.ts +3 -0
- package/dist/layout/appShell/index.d.ts.map +1 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/index.js +7 -2
- package/dist/layout/pullToRefresh/PullToRefresh.d.ts +15 -0
- package/dist/layout/pullToRefresh/PullToRefresh.d.ts.map +1 -0
- package/dist/layout/pullToRefresh/index.d.ts +2 -0
- package/dist/layout/pullToRefresh/index.d.ts.map +1 -0
- package/dist/nav/index.d.ts +2 -0
- package/dist/nav/index.d.ts.map +1 -1
- package/dist/nav/index.js +4 -3
- package/dist/nav/scrollSpy/ScrollSpy.d.ts +25 -0
- package/dist/nav/scrollSpy/ScrollSpy.d.ts.map +1 -0
- package/dist/nav/scrollSpy/index.d.ts +2 -0
- package/dist/nav/scrollSpy/index.d.ts.map +1 -0
- package/dist/nav/tableOfContents/TableOfContents.d.ts +24 -0
- package/dist/nav/tableOfContents/TableOfContents.d.ts.map +1 -0
- package/dist/nav/tableOfContents/index.d.ts +2 -0
- package/dist/nav/tableOfContents/index.d.ts.map +1 -0
- package/dist/overlays/actionSheet/ActionSheet.d.ts +29 -0
- package/dist/overlays/actionSheet/ActionSheet.d.ts.map +1 -0
- package/dist/overlays/actionSheet/index.d.ts +3 -0
- package/dist/overlays/actionSheet/index.d.ts.map +1 -0
- package/dist/overlays/bottomSheet/BottomSheet.d.ts +29 -0
- package/dist/overlays/bottomSheet/BottomSheet.d.ts.map +1 -0
- package/dist/overlays/bottomSheet/index.d.ts +2 -0
- package/dist/overlays/bottomSheet/index.d.ts.map +1 -0
- package/dist/overlays/index.d.ts +2 -0
- package/dist/overlays/index.d.ts.map +1 -1
- package/dist/overlays/index.js +5 -3
- package/package.json +1 -1
- package/dist/chunk-2VAZKEQD.js.map +0 -1
- package/dist/chunk-3IN5ULKY.js.map +0 -1
- package/dist/chunk-4ESR253U.js.map +0 -1
- package/dist/chunk-ILYL6ROC.js.map +0 -1
- package/dist/chunk-NRAJPSEK.js.map +0 -1
- package/dist/chunk-SM2TOB4U.js.map +0 -1
- package/dist/chunk-W7LQZKTH.js.map +0 -1
- package/dist/chunk-XHGWBSIR.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ButtonHTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export type BackToTopPosition = 'bottom-right' | 'bottom-left' | 'bottom-center' | 'top-right' | 'top-left';
|
|
3
|
+
export interface BackToTopButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
/** Scroll distance (px) before the button appears. Default 400. */
|
|
5
|
+
threshold?: number;
|
|
6
|
+
/** Scope to a specific scrollable element. Defaults to the window. */
|
|
7
|
+
scrollContainer?: HTMLElement | null;
|
|
8
|
+
position?: BackToTopPosition;
|
|
9
|
+
/** Visible label. Omit for icon-only. */
|
|
10
|
+
label?: ReactNode;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Floating button that appears after the user scrolls past `threshold`.
|
|
15
|
+
* Click scrolls the target back to top with smooth-scroll (skipped under
|
|
16
|
+
* `prefers-reduced-motion`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const BackToTopButton: import("react").ForwardRefExoticComponent<BackToTopButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
19
|
+
//# sourceMappingURL=BackToTopButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackToTopButton.d.ts","sourceRoot":"","sources":["../../../src/actions/backToTopButton/BackToTopButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,oBAAoB,EACzB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,aAAa,GACb,eAAe,GACf,WAAW,GACX,UAAU,CAAC;AAEf,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACnF,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sEAAsE;IACtE,eAAe,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,yCAAyC;IACzC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAUD;;;;GAIG;AACH,eAAO,MAAM,eAAe,oHAgE3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/backToTopButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,mBAAmB,CAAC"}
|
package/dist/actions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,OAAO,CAAC;AACtB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC"}
|
package/dist/actions/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Button, ButtonGroup, CopyButton, DisclosureButton, FAB, IconButton, Link, OverlayButton, SegmentedControl, SpeedDial, SpeedDialAction, SpeedDialTrigger, ToggleButton, ToggleButtonGroup, Toolbar, ToolbarButton, ToolbarLink, ToolbarSeparator, buttonVariants, fabVariants, iconButtonVariants, linkVariants, overlayButtonVariants, toggleButtonVariants } from '../chunk-
|
|
2
|
-
import '../chunk-4P2TFUVW.js';
|
|
1
|
+
export { BackToTopButton, Button, ButtonGroup, CopyButton, DisclosureButton, FAB, IconButton, Link, OverlayButton, SegmentedControl, SpeedDial, SpeedDialAction, SpeedDialTrigger, ToggleButton, ToggleButtonGroup, Toolbar, ToolbarButton, ToolbarLink, ToolbarSeparator, buttonVariants, fabVariants, iconButtonVariants, linkVariants, overlayButtonVariants, toggleButtonVariants } from '../chunk-GRJBIGUD.js';
|
|
3
2
|
import '../chunk-BMBIZLO4.js';
|
|
3
|
+
import '../chunk-4P2TFUVW.js';
|
|
4
4
|
import '../chunk-TDX22OWF.js';
|
|
5
5
|
import '../chunk-NC2CBGX2.js';
|
|
6
6
|
import '../chunk-DN7WBRIV.js';
|
|
@@ -1,95 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OverlayChromeProvider, OverlayBody, OverlayCloseButton, OverlayDescription, OverlayFooter, OverlayHeader, OverlayTitle } from './chunk-NTW7SDAP.js';
|
|
2
2
|
import { Backdrop } from './chunk-ASIHQQDQ.js';
|
|
3
|
+
import { useControlled } from './chunk-4P2TFUVW.js';
|
|
3
4
|
import { Slot, Portal, ScrollLockProvider, DismissableLayer } from './chunk-NC2CBGX2.js';
|
|
4
5
|
import { composeRefs } from './chunk-DN7WBRIV.js';
|
|
5
6
|
import { cn } from './chunk-KZ4VFY2T.js';
|
|
6
7
|
import { createContext, forwardRef, useCallback, useMemo, useContext, useRef, useId } from 'react';
|
|
7
8
|
import { FocusScope } from '@radix-ui/react-focus-scope';
|
|
8
|
-
import { X } from 'lucide-react';
|
|
9
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
10
10
|
|
|
11
|
-
var OverlayChromeContext = createContext(null);
|
|
12
|
-
var OverlayChromeProvider = OverlayChromeContext.Provider;
|
|
13
|
-
function useOverlayChromeContext() {
|
|
14
|
-
const ctx = useContext(OverlayChromeContext);
|
|
15
|
-
if (!ctx)
|
|
16
|
-
throw new Error(
|
|
17
|
-
"Overlay chrome subcomponents must be used inside an OverlayChromeProvider (Dialog / Drawer)"
|
|
18
|
-
);
|
|
19
|
-
return ctx;
|
|
20
|
-
}
|
|
21
|
-
function OverlayHeader({ className, children, ...rest }) {
|
|
22
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mb-4 flex flex-col gap-1.5", className), ...rest, children });
|
|
23
|
-
}
|
|
24
|
-
function OverlayTitle({ className, children, ...rest }) {
|
|
25
|
-
const ctx = useOverlayChromeContext();
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
-
"h2",
|
|
28
|
-
{
|
|
29
|
-
id: ctx.titleId,
|
|
30
|
-
className: cn("text-lg font-semibold leading-none text-foreground", className),
|
|
31
|
-
...rest,
|
|
32
|
-
children
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
function OverlayDescription({
|
|
37
|
-
className,
|
|
38
|
-
children,
|
|
39
|
-
...rest
|
|
40
|
-
}) {
|
|
41
|
-
const ctx = useOverlayChromeContext();
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
"p",
|
|
44
|
-
{
|
|
45
|
-
id: ctx.descriptionId,
|
|
46
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
47
|
-
...rest,
|
|
48
|
-
children
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
function OverlayBody({ className, children, ...rest }) {
|
|
53
|
-
return /* @__PURE__ */ jsx("div", { className: cn("text-sm text-foreground", className), ...rest, children });
|
|
54
|
-
}
|
|
55
|
-
function OverlayFooter({ className, children, ...rest }) {
|
|
56
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
-
"div",
|
|
58
|
-
{
|
|
59
|
-
className: cn(
|
|
60
|
-
"mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
61
|
-
className
|
|
62
|
-
),
|
|
63
|
-
...rest,
|
|
64
|
-
children
|
|
65
|
-
}
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
var OverlayCloseButton = forwardRef(
|
|
69
|
-
function OverlayCloseButton2({ asChild, onClick, className, children, ...rest }, forwardedRef) {
|
|
70
|
-
const ctx = useOverlayChromeContext();
|
|
71
|
-
const Component = asChild ? Slot : "button";
|
|
72
|
-
return /* @__PURE__ */ jsx(
|
|
73
|
-
Component,
|
|
74
|
-
{
|
|
75
|
-
ref: forwardedRef,
|
|
76
|
-
type: "button",
|
|
77
|
-
"aria-label": children ? void 0 : "Close",
|
|
78
|
-
onClick: (e) => {
|
|
79
|
-
onClick?.(e);
|
|
80
|
-
if (e.defaultPrevented) return;
|
|
81
|
-
ctx.close();
|
|
82
|
-
},
|
|
83
|
-
className: asChild ? className : cn(
|
|
84
|
-
"absolute right-4 top-4 grid h-7 w-7 place-items-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
85
|
-
className
|
|
86
|
-
),
|
|
87
|
-
...rest,
|
|
88
|
-
children: children ?? /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
11
|
var DialogContext = createContext(null);
|
|
94
12
|
function useDialogContext() {
|
|
95
13
|
const ctx = useContext(DialogContext);
|
|
@@ -217,6 +135,6 @@ Dialog.Body = DialogBody;
|
|
|
217
135
|
Dialog.Footer = DialogFooter;
|
|
218
136
|
Dialog.Close = DialogClose;
|
|
219
137
|
|
|
220
|
-
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger
|
|
221
|
-
//# sourceMappingURL=chunk-
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
export { Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger };
|
|
139
|
+
//# sourceMappingURL=chunk-25CGSOXZ.js.map
|
|
140
|
+
//# sourceMappingURL=chunk-25CGSOXZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/overlays/dialog/Dialog.tsx"],"names":["DialogTrigger","DialogContent"],"mappings":";;;;;;;;;;AAuCA,IAAM,aAAA,GAAgB,cAAyC,IAAI,CAAA;AAEnE,SAAS,gBAAA,GAAmB;AAC1B,EAAA,MAAM,GAAA,GAAM,WAAW,aAAa,CAAA;AACpC,EAAA,IAAI,CAAC,GAAA,EAAK,MAAM,IAAI,MAAM,uCAAuC,CAAA;AACjE,EAAA,OAAO,GAAA;AACT;AAaO,SAAS,MAAA,CAAO;AAAA,EACrB,IAAA,EAAM,QAAA;AAAA,EACN,WAAA,GAAc,KAAA;AAAA,EACd,YAAA;AAAA,EACA,qBAAA,GAAwB,IAAA;AAAA,EACxB,eAAA,GAAkB,IAAA;AAAA,EAClB,IAAA,GAAO,QAAA;AAAA,EACP;AACF,CAAA,EAAgB;AACd,EAAA,MAAM,CAAC,IAAA,EAAM,OAAO,CAAA,GAAI,aAAA,CAAc;AAAA,IACpC,UAAA,EAAY,QAAA;AAAA,IACZ,OAAA,EAAS,WAAA;AAAA,IACT,QAAA,EAAU;AAAA,GACX,CAAA;AACD,EAAA,MAAM,UAAA,GAAa,OAA2B,IAAI,CAAA;AAClD,EAAA,MAAM,UAAU,KAAA,EAAM;AACtB,EAAA,MAAM,gBAAgB,KAAA,EAAM;AAE5B,EAAA,MAAM,GAAA,GAAM,OAAA;AAAA,IACV,OAAO;AAAA,MACL,IAAA;AAAA,MACA,OAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,a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AC,KAAA;AAAA,YAAA;AAAA,cACC,GAAA,EAAK,YAAA;AAAA,cACL,MAAM,GAAA,CAAI,IAAA;AAAA,cACV,YAAA,EAAW,MAAA;AAAA,cACX,mBAAiB,GAAA,CAAI,OAAA;AAAA,cACrB,oBAAkB,GAAA,CAAI,aAAA;AAAA,cACtB,YAAA,EAAW,MAAA;AAAA,cACX,SAAA,EAAW,EAAA;AAAA,gBACT,mIAAA;AAAA,gBACA;AAAA,eACF;AAAA,cACC,GAAG,IAAA;AAAA,cAEJ,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAsB,KAAA,EAAO,SAAA,EAAY,QAAA,EAAS;AAAA;AAAA;AACrD;AAAA,SAEJ,CAAA,EACF;AAAA,KAAA,EACF,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;AAGO,IAAM,YAAA,GAAe;AACrB,IAAM,WAAA,GAAc;AACpB,IAAM,iBAAA,GAAoB;AAC1B,IAAM,UAAA,GAAa;AACnB,IAAM,YAAA,GAAe;AACrB,IAAM,WAAA,GAAc;AAa1B,MAAA,CAA2B,OAAA,GAAU,aAAA;AACrC,MAAA,CAA2B,OAAA,GAAU,aAAA;AACrC,MAAA,CAA2B,MAAA,GAAS,YAAA;AACpC,MAAA,CAA2B,KAAA,GAAQ,WAAA;AACnC,MAAA,CAA2B,WAAA,GAAc,iBAAA;AACzC,MAAA,CAA2B,IAAA,GAAO,UAAA;AAClC,MAAA,CAA2B,MAAA,GAAS,YAAA;AACpC,MAAA,CAA2B,KAAA,GAAQ,WAAA","file":"chunk-25CGSOXZ.js","sourcesContent":["import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useId,\n useMemo,\n useRef,\n type ButtonHTMLAttributes,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { FocusScope } from '@radix-ui/react-focus-scope';\nimport { cn, composeRefs } from '../../utils';\nimport { useControlled } from '../../hooks';\nimport { DismissableLayer, Portal, ScrollLockProvider, Slot } from '../../primitives';\nimport { Backdrop } from '../backdrop';\nimport {\n OverlayBody,\n OverlayChromeProvider,\n OverlayCloseButton,\n OverlayDescription,\n OverlayFooter,\n OverlayHeader,\n OverlayTitle,\n type OverlayChromeContextValue,\n} from '../OverlayChrome';\n\ninterface DialogContextValue {\n open: boolean;\n setOpen: (open: boolean) => void;\n triggerRef: React.MutableRefObject<HTMLElement | null>;\n titleId: string;\n descriptionId: string;\n role: 'dialog' | 'alertdialog';\n dismissOnOutsideClick: boolean;\n dismissOnEscape: boolean;\n}\n\nconst DialogContext = createContext<DialogContextValue | null>(null);\n\nfunction useDialogContext() {\n const ctx = useContext(DialogContext);\n if (!ctx) throw new Error('Dialog.* must be used inside <Dialog>');\n return ctx;\n}\n\nexport interface DialogProps {\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n dismissOnOutsideClick?: boolean;\n dismissOnEscape?: boolean;\n /** Internal — `AlertDialog` overrides this. */\n role?: 'dialog' | 'alertdialog';\n children: ReactNode;\n}\n\nexport function Dialog({\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n dismissOnOutsideClick = true,\n dismissOnEscape = true,\n role = 'dialog',\n children,\n}: DialogProps) {\n const [open, setOpen] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n onChange: onOpenChange,\n });\n const triggerRef = useRef<HTMLElement | null>(null);\n const titleId = useId();\n const descriptionId = useId();\n\n const ctx = useMemo<DialogContextValue>(\n () => ({\n open,\n setOpen,\n triggerRef,\n titleId,\n descriptionId,\n role,\n dismissOnOutsideClick,\n dismissOnEscape,\n }),\n [open, setOpen, titleId, descriptionId, role, dismissOnOutsideClick, dismissOnEscape],\n );\n\n return <DialogContext.Provider value={ctx}>{children}</DialogContext.Provider>;\n}\n\nexport interface DialogTriggerProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n asChild?: boolean;\n children: ReactNode;\n}\n\nexport const DialogTrigger = forwardRef<HTMLButtonElement, DialogTriggerProps>(\n function DialogTrigger({ asChild, onClick, children, ...rest }, forwardedRef) {\n const ctx = useDialogContext();\n const Component = asChild ? Slot : 'button';\n return (\n <Component\n ref={composeRefs(forwardedRef, ctx.triggerRef as React.MutableRefObject<HTMLButtonElement | null>) as never}\n type=\"button\"\n aria-haspopup=\"dialog\"\n aria-expanded={ctx.open}\n data-state={ctx.open ? 'open' : 'closed'}\n onClick={(e: React.MouseEvent<HTMLButtonElement>) => {\n onClick?.(e);\n if (e.defaultPrevented) return;\n ctx.setOpen(true);\n }}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\n\nexport interface DialogContentProps extends HTMLAttributes<HTMLDivElement> {\n /** Disable the default backdrop. */\n hideBackdrop?: boolean;\n /** Apply backdrop blur. */\n blur?: boolean;\n children: ReactNode;\n}\n\nexport const DialogContent = forwardRef<HTMLDivElement, DialogContentProps>(\n function DialogContent(\n { hideBackdrop, blur, className, children, ...rest },\n forwardedRef,\n ) {\n const ctx = useDialogContext();\n\n const close = useCallback(() => {\n ctx.setOpen(false);\n requestAnimationFrame(() => ctx.triggerRef.current?.focus());\n }, [ctx]);\n\n const chromeCtx = useMemo<OverlayChromeContextValue>(\n () => ({ titleId: ctx.titleId, descriptionId: ctx.descriptionId, close }),\n [ctx.titleId, ctx.descriptionId, close],\n );\n\n if (!ctx.open) return null;\n return (\n <Portal>\n <ScrollLockProvider>\n {!hideBackdrop && (\n <Backdrop\n inline\n blur={blur}\n onClick={() => {\n if (ctx.dismissOnOutsideClick) ctx.setOpen(false);\n }}\n />\n )}\n <div className=\"fixed inset-0 z-50 grid place-items-center overflow-y-auto p-4\">\n <FocusScope asChild trapped loop>\n <DismissableLayer\n disableEscape={!ctx.dismissOnEscape}\n onEscape={() => ctx.setOpen(false)}\n disableOutsideClick\n >\n <div\n ref={forwardedRef}\n role={ctx.role}\n aria-modal=\"true\"\n aria-labelledby={ctx.titleId}\n aria-describedby={ctx.descriptionId}\n data-state=\"open\"\n className={cn(\n 'relative w-full max-w-lg rounded-lg border border-border bg-background p-6 shadow-lg outline-none animate-in fade-in-0 zoom-in-95',\n className,\n )}\n {...rest}\n >\n <OverlayChromeProvider value={chromeCtx}>{children}</OverlayChromeProvider>\n </div>\n </DismissableLayer>\n </FocusScope>\n </div>\n </ScrollLockProvider>\n </Portal>\n );\n },\n);\n\n// Re-export shared chrome subcomponents under the Dialog namespace.\nexport const DialogHeader = OverlayHeader;\nexport const DialogTitle = OverlayTitle;\nexport const DialogDescription = OverlayDescription;\nexport const DialogBody = OverlayBody;\nexport const DialogFooter = OverlayFooter;\nexport const DialogClose = OverlayCloseButton;\n\ntype DialogComponent = typeof Dialog & {\n Trigger: typeof DialogTrigger;\n Content: typeof DialogContent;\n Header: typeof DialogHeader;\n Title: typeof DialogTitle;\n Description: typeof DialogDescription;\n Body: typeof DialogBody;\n Footer: typeof DialogFooter;\n Close: typeof DialogClose;\n};\n\n(Dialog as DialogComponent).Trigger = DialogTrigger;\n(Dialog as DialogComponent).Content = DialogContent;\n(Dialog as DialogComponent).Header = DialogHeader;\n(Dialog as DialogComponent).Title = DialogTitle;\n(Dialog as DialogComponent).Description = DialogDescription;\n(Dialog as DialogComponent).Body = DialogBody;\n(Dialog as DialogComponent).Footer = DialogFooter;\n(Dialog as DialogComponent).Close = DialogClose;\n\nexport default Dialog as DialogComponent;\n"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Drawer, DrawerContent } from './chunk-O6UUYPTB.js';
|
|
2
|
+
import { Spinner } from './chunk-NKADHZMX.js';
|
|
2
3
|
import { tv } from './chunk-BMBIZLO4.js';
|
|
4
|
+
import { useControlled, useMediaQuery } from './chunk-4P2TFUVW.js';
|
|
5
|
+
import { Announce } from './chunk-NC2CBGX2.js';
|
|
3
6
|
import { cn } from './chunk-KZ4VFY2T.js';
|
|
4
7
|
import { forwardRef, createContext, useRef, useEffect, useCallback, useMemo, Children, isValidElement, useState, useContext } from 'react';
|
|
5
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
@@ -635,7 +638,268 @@ var ResizableSeparator = forwardRef(
|
|
|
635
638
|
ResizableSeparator.displayName = "ResizableSeparator";
|
|
636
639
|
ResizablePanels.Panel = ResizablePanel;
|
|
637
640
|
ResizablePanels.Separator = ResizableSeparator;
|
|
641
|
+
var PullToRefresh = forwardRef(
|
|
642
|
+
function PullToRefresh2({ onRefresh, threshold = 60, maxPull = 120, disabled, className, children, ...rest }, forwardedRef) {
|
|
643
|
+
const containerRef = useRef(null);
|
|
644
|
+
const startYRef = useRef(null);
|
|
645
|
+
const [pull, setPull] = useState(0);
|
|
646
|
+
const [refreshing, setRefreshing] = useState(false);
|
|
647
|
+
const onPointerDown = (e) => {
|
|
648
|
+
if (disabled || refreshing) return;
|
|
649
|
+
const el = containerRef.current;
|
|
650
|
+
if (!el || el.scrollTop > 0) return;
|
|
651
|
+
startYRef.current = e.clientY;
|
|
652
|
+
};
|
|
653
|
+
const onPointerMove = (e) => {
|
|
654
|
+
if (startYRef.current == null) return;
|
|
655
|
+
const dy = e.clientY - startYRef.current;
|
|
656
|
+
if (dy < 0) {
|
|
657
|
+
setPull(0);
|
|
658
|
+
return;
|
|
659
|
+
}
|
|
660
|
+
const eased = dy < threshold ? dy : threshold + (dy - threshold) * 0.4;
|
|
661
|
+
setPull(Math.min(maxPull, eased));
|
|
662
|
+
};
|
|
663
|
+
const onPointerUp = async () => {
|
|
664
|
+
if (startYRef.current == null) return;
|
|
665
|
+
const reached2 = pull >= threshold;
|
|
666
|
+
startYRef.current = null;
|
|
667
|
+
if (reached2) {
|
|
668
|
+
setRefreshing(true);
|
|
669
|
+
setPull(threshold);
|
|
670
|
+
try {
|
|
671
|
+
await onRefresh();
|
|
672
|
+
} finally {
|
|
673
|
+
setRefreshing(false);
|
|
674
|
+
setPull(0);
|
|
675
|
+
}
|
|
676
|
+
} else {
|
|
677
|
+
setPull(0);
|
|
678
|
+
}
|
|
679
|
+
};
|
|
680
|
+
const reached = pull >= threshold;
|
|
681
|
+
return /* @__PURE__ */ jsxs(
|
|
682
|
+
"div",
|
|
683
|
+
{
|
|
684
|
+
ref: (el) => {
|
|
685
|
+
containerRef.current = el;
|
|
686
|
+
if (typeof forwardedRef === "function") forwardedRef(el);
|
|
687
|
+
else if (forwardedRef) forwardedRef.current = el;
|
|
688
|
+
},
|
|
689
|
+
onPointerDown,
|
|
690
|
+
onPointerMove,
|
|
691
|
+
onPointerUp,
|
|
692
|
+
onPointerCancel: onPointerUp,
|
|
693
|
+
className: cn("relative h-full overflow-y-auto", className),
|
|
694
|
+
style: { touchAction: "pan-y" },
|
|
695
|
+
...rest,
|
|
696
|
+
children: [
|
|
697
|
+
/* @__PURE__ */ jsx(
|
|
698
|
+
"div",
|
|
699
|
+
{
|
|
700
|
+
"aria-hidden": "true",
|
|
701
|
+
className: "pointer-events-none absolute inset-x-0 top-0 z-10 flex items-center justify-center",
|
|
702
|
+
style: {
|
|
703
|
+
height: pull,
|
|
704
|
+
transition: startYRef.current == null ? "height 200ms ease-out" : "none"
|
|
705
|
+
},
|
|
706
|
+
children: pull > 8 && /* @__PURE__ */ jsx(
|
|
707
|
+
"div",
|
|
708
|
+
{
|
|
709
|
+
className: cn(
|
|
710
|
+
"transition-opacity",
|
|
711
|
+
refreshing ? "opacity-100" : reached ? "opacity-100" : "opacity-60"
|
|
712
|
+
),
|
|
713
|
+
style: { transform: `scale(${Math.min(1, pull / threshold)})` },
|
|
714
|
+
children: /* @__PURE__ */ jsx(Spinner, { size: "md", tone: reached ? "brand" : "default" })
|
|
715
|
+
}
|
|
716
|
+
)
|
|
717
|
+
}
|
|
718
|
+
),
|
|
719
|
+
/* @__PURE__ */ jsx(
|
|
720
|
+
"div",
|
|
721
|
+
{
|
|
722
|
+
style: {
|
|
723
|
+
transform: `translateY(${pull}px)`,
|
|
724
|
+
transition: startYRef.current == null ? "transform 200ms ease-out" : "none"
|
|
725
|
+
},
|
|
726
|
+
children
|
|
727
|
+
}
|
|
728
|
+
),
|
|
729
|
+
/* @__PURE__ */ jsx(Announce, { politeness: "polite", children: refreshing ? "Refreshing" : "" })
|
|
730
|
+
]
|
|
731
|
+
}
|
|
732
|
+
);
|
|
733
|
+
}
|
|
734
|
+
);
|
|
735
|
+
var BREAKPOINT_PX = {
|
|
736
|
+
sm: 640,
|
|
737
|
+
md: 768,
|
|
738
|
+
lg: 1024,
|
|
739
|
+
xl: 1280,
|
|
740
|
+
"2xl": 1536
|
|
741
|
+
};
|
|
742
|
+
var AppShellContext = createContext(null);
|
|
743
|
+
function useAppShellContext() {
|
|
744
|
+
const ctx = useContext(AppShellContext);
|
|
745
|
+
if (!ctx) throw new Error("AppShell.* must be used inside <AppShell>");
|
|
746
|
+
return ctx;
|
|
747
|
+
}
|
|
748
|
+
var AppShell = forwardRef(function AppShell2({
|
|
749
|
+
sidebarWidth = "240px",
|
|
750
|
+
asideWidth = "280px",
|
|
751
|
+
sidebarBreakpoint = "lg",
|
|
752
|
+
asideBreakpoint = "xl",
|
|
753
|
+
sidebarOpen: sidebarOpenProp,
|
|
754
|
+
defaultSidebarOpen = false,
|
|
755
|
+
onSidebarOpenChange,
|
|
756
|
+
className,
|
|
757
|
+
children,
|
|
758
|
+
...rest
|
|
759
|
+
}, ref) {
|
|
760
|
+
const [sidebarOpen, setSidebarOpen] = useControlled({
|
|
761
|
+
controlled: sidebarOpenProp,
|
|
762
|
+
default: defaultSidebarOpen,
|
|
763
|
+
onChange: onSidebarOpenChange
|
|
764
|
+
});
|
|
765
|
+
const isSidebarCollapsed = !useMediaQuery(`(min-width: ${BREAKPOINT_PX[sidebarBreakpoint]}px)`);
|
|
766
|
+
const isAsideHidden = !useMediaQuery(`(min-width: ${BREAKPOINT_PX[asideBreakpoint]}px)`);
|
|
767
|
+
const ctx = useMemo(
|
|
768
|
+
() => ({
|
|
769
|
+
sidebarWidth,
|
|
770
|
+
asideWidth,
|
|
771
|
+
sidebarOpen,
|
|
772
|
+
setSidebarOpen,
|
|
773
|
+
isSidebarCollapsed,
|
|
774
|
+
isAsideHidden
|
|
775
|
+
}),
|
|
776
|
+
[sidebarWidth, asideWidth, sidebarOpen, setSidebarOpen, isSidebarCollapsed, isAsideHidden]
|
|
777
|
+
);
|
|
778
|
+
const gridTemplate = isSidebarCollapsed ? `'header header' auto 'main main' 1fr 'footer footer' auto / 1fr` : `'header header' auto 'sidebar main' 1fr 'sidebar footer' auto / ${sidebarWidth} 1fr`;
|
|
779
|
+
return /* @__PURE__ */ jsx(AppShellContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxs(
|
|
780
|
+
"div",
|
|
781
|
+
{
|
|
782
|
+
ref,
|
|
783
|
+
className: cn("grid min-h-svh bg-background text-foreground", className),
|
|
784
|
+
style: { gridTemplate },
|
|
785
|
+
...rest,
|
|
786
|
+
children: [
|
|
787
|
+
/* @__PURE__ */ jsx(
|
|
788
|
+
"a",
|
|
789
|
+
{
|
|
790
|
+
href: "#app-shell-main",
|
|
791
|
+
className: "sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded-md focus:bg-card focus:px-3 focus:py-2 focus:shadow",
|
|
792
|
+
children: "Skip to content"
|
|
793
|
+
}
|
|
794
|
+
),
|
|
795
|
+
children
|
|
796
|
+
]
|
|
797
|
+
}
|
|
798
|
+
) });
|
|
799
|
+
});
|
|
800
|
+
var AppShellHeader = forwardRef(
|
|
801
|
+
function AppShellHeader2({ className, ...rest }, ref) {
|
|
802
|
+
return /* @__PURE__ */ jsx(
|
|
803
|
+
"header",
|
|
804
|
+
{
|
|
805
|
+
ref,
|
|
806
|
+
role: "banner",
|
|
807
|
+
className: cn(
|
|
808
|
+
"sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-card px-4 [grid-area:header]",
|
|
809
|
+
className
|
|
810
|
+
),
|
|
811
|
+
...rest
|
|
812
|
+
}
|
|
813
|
+
);
|
|
814
|
+
}
|
|
815
|
+
);
|
|
816
|
+
var AppShellSidebar = forwardRef(
|
|
817
|
+
function AppShellSidebar2({ className, children, ...rest }, ref) {
|
|
818
|
+
const ctx = useAppShellContext();
|
|
819
|
+
if (ctx.isSidebarCollapsed) {
|
|
820
|
+
return /* @__PURE__ */ jsx(Drawer, { open: ctx.sidebarOpen, onOpenChange: ctx.setSidebarOpen, side: "left", children: /* @__PURE__ */ jsx(DrawerContent, { className: "w-72 max-w-[80%]", children: /* @__PURE__ */ jsx("nav", { className: cn("flex h-full flex-col", className), children }) }) });
|
|
821
|
+
}
|
|
822
|
+
return /* @__PURE__ */ jsx(
|
|
823
|
+
"aside",
|
|
824
|
+
{
|
|
825
|
+
ref,
|
|
826
|
+
className: cn(
|
|
827
|
+
"sticky top-14 hidden h-[calc(100svh-3.5rem)] overflow-y-auto border-r border-border bg-card [grid-area:sidebar] lg:flex",
|
|
828
|
+
className
|
|
829
|
+
),
|
|
830
|
+
...rest,
|
|
831
|
+
children: /* @__PURE__ */ jsx("nav", { className: "flex h-full w-full flex-col p-3", children })
|
|
832
|
+
}
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
);
|
|
836
|
+
var AppShellMain = forwardRef(
|
|
837
|
+
function AppShellMain2({ className, children, ...rest }, ref) {
|
|
838
|
+
return /* @__PURE__ */ jsx(
|
|
839
|
+
"main",
|
|
840
|
+
{
|
|
841
|
+
ref,
|
|
842
|
+
id: "app-shell-main",
|
|
843
|
+
className: cn(
|
|
844
|
+
"flex flex-col [grid-area:main] focus:outline-none",
|
|
845
|
+
className
|
|
846
|
+
),
|
|
847
|
+
tabIndex: -1,
|
|
848
|
+
...rest,
|
|
849
|
+
children
|
|
850
|
+
}
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
);
|
|
854
|
+
var AppShellContent = forwardRef(
|
|
855
|
+
function AppShellContent2({ className, ...rest }, ref) {
|
|
856
|
+
return /* @__PURE__ */ jsx("div", { ref, className: cn("flex-1 overflow-y-auto p-6", className), ...rest });
|
|
857
|
+
}
|
|
858
|
+
);
|
|
859
|
+
var AppShellAside = forwardRef(
|
|
860
|
+
function AppShellAside2({ className, ...rest }, ref) {
|
|
861
|
+
const ctx = useAppShellContext();
|
|
862
|
+
if (ctx.isAsideHidden) return null;
|
|
863
|
+
return /* @__PURE__ */ jsx(
|
|
864
|
+
"aside",
|
|
865
|
+
{
|
|
866
|
+
ref,
|
|
867
|
+
style: { width: ctx.asideWidth },
|
|
868
|
+
className: cn(
|
|
869
|
+
"sticky top-14 h-[calc(100svh-3.5rem)] shrink-0 overflow-y-auto border-l border-border bg-card p-4",
|
|
870
|
+
className
|
|
871
|
+
),
|
|
872
|
+
...rest
|
|
873
|
+
}
|
|
874
|
+
);
|
|
875
|
+
}
|
|
876
|
+
);
|
|
877
|
+
var AppShellFooter = forwardRef(
|
|
878
|
+
function AppShellFooter2({ className, ...rest }, ref) {
|
|
879
|
+
return /* @__PURE__ */ jsx(
|
|
880
|
+
"footer",
|
|
881
|
+
{
|
|
882
|
+
ref,
|
|
883
|
+
role: "contentinfo",
|
|
884
|
+
className: cn(
|
|
885
|
+
"border-t border-border bg-card px-4 py-3 text-sm text-muted-foreground [grid-area:footer]",
|
|
886
|
+
className
|
|
887
|
+
),
|
|
888
|
+
...rest
|
|
889
|
+
}
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
);
|
|
893
|
+
AppShell.Header = AppShellHeader;
|
|
894
|
+
AppShell.Sidebar = AppShellSidebar;
|
|
895
|
+
AppShell.Main = AppShellMain;
|
|
896
|
+
AppShell.Content = AppShellContent;
|
|
897
|
+
AppShell.Aside = AppShellAside;
|
|
898
|
+
AppShell.Footer = AppShellFooter;
|
|
899
|
+
function useAppShell() {
|
|
900
|
+
return useAppShellContext();
|
|
901
|
+
}
|
|
638
902
|
|
|
639
|
-
export { AspectRatio, Box, Center, Cluster, Container, Flex, Frame, Grid, HStack, Inline, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Spacer, Stack, TwoColumn, VStack, containerVariants, gridVariants, stackVariants };
|
|
640
|
-
//# sourceMappingURL=chunk-
|
|
641
|
-
//# sourceMappingURL=chunk-
|
|
903
|
+
export { AppShell, AppShellAside, AppShellContent, AppShellFooter, AppShellHeader, AppShellMain, AppShellSidebar, AspectRatio, Box, Center, Cluster, Container, Flex, Frame, Grid, HStack, Inline, PullToRefresh, ResizablePanel, ResizablePanels, ResizableSeparator, ScrollArea, Spacer, Stack, TwoColumn, VStack, containerVariants, gridVariants, stackVariants, useAppShell };
|
|
904
|
+
//# sourceMappingURL=chunk-3KPILWVX.js.map
|
|
905
|
+
//# sourceMappingURL=chunk-3KPILWVX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/layout/box/Box.tsx","../src/layout/stack/Stack.variants.ts","../src/layout/stack/Stack.tsx","../src/layout/hStack/HStack.tsx","../src/layout/vStack/VStack.tsx","../src/layout/grid/Grid.variants.ts","../src/layout/grid/Grid.tsx","../src/layout/container/Container.variants.ts","../src/layout/container/Container.tsx","../src/layout/flex/Flex.tsx","../src/layout/aspectRatio/AspectRatio.tsx","../src/layout/spacer/Spacer.tsx","../src/layout/center/Center.tsx","../src/layout/scrollArea/ScrollArea.tsx","../src/layout/inline/Inline.tsx","../src/layout/cluster/Cluster.tsx","../src/layout/frame/Frame.tsx","../src/layout/twoColumn/TwoColumn.tsx","../src/layout/resizablePanels/ResizablePanels.tsx","../src/layout/pullToRefresh/PullToRefresh.tsx","../src/layout/appShell/AppShell.tsx"],"names":["forwardRef","jsx","GAP","ResizablePanels","ResizablePanel","ResizableSeparator","PullToRefresh","useRef","useState","reached","jsxs","createContext","useContext","AppShell","useMemo","AppShellHeader","AppShellSidebar","AppShellMain","AppShellContent","AppShellAside","AppShellFooter"],"mappings":";;;;;;;;;AAaO,IAAM,GAAA,GAAM,UAAA;AAAA,EACjB,CAAC,EAAE,EAAA,EAAI,YAAY,KAAA,EAAO,SAAA,EAAW,GAAG,KAAA,EAAM,EAAG,GAAA,qBAC/C,GAAA,CAAC,aAAU,GAAA,EAA8B,SAAA,EAAW,GAAG,SAAS,CAAA,EAAI,GAAG,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A,EAEJ;AACF;AAIO,IAAM,cAAA,GAAiBD,UAAAA;AAAA,EAC5B,SAASoB,eAAAA,CAAe,EAAE,WAAW,GAAG,IAAA,IAAQ,GAAA,EAAK;AACnD,IAAA,uBACEnB,GAAAA;AAAA,MAAC,QAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,IAAA,EAAK,aAAA;AAAA,QACL,SAAA,EAAW,EAAA;AAAA,UACT,2FAAA;AAAA,UACA;AAAA,SACF;AAAA,QACC,GAAG;AAAA;AAAA,KACN;AAAA,EAEJ;AACF;AAWC,QAAA,CAA+B,MAAA,GAAS,cAAA;AACxC,QAAA,CAA+B,OAAA,GAAU,eAAA;AACzC,QAAA,CAA+B,IAAA,GAAO,YAAA;AACtC,QAAA,CAA+B,OAAA,GAAU,eAAA;AACzC,QAAA,CAA+B,KAAA,GAAQ,aAAA;AACvC,QAAA,CAA+B,MAAA,GAAS,cAAA;AAElC,SAAS,WAAA,GAAc;AAC5B,EAAA,OAAO,kBAAA,EAAmB;AAC5B","file":"chunk-3KPILWVX.js","sourcesContent":["import { forwardRef, type ComponentPropsWithoutRef, type ElementType, type Ref } from 'react';\nimport { cn } from '../../utils';\n\nexport interface BoxProps extends Omit<ComponentPropsWithoutRef<'div'>, 'as'> {\n /** HTML element to render. Default `div`. */\n as?: ElementType;\n}\n\n/**\n * The lowest-level layout primitive. Renders any element (default `div`)\n * with className passthrough. Use as a styling shell when no other layout\n * atom fits.\n */\nexport const Box = forwardRef<HTMLElement, BoxProps>(\n ({ as: Component = 'div', className, ...props }, ref) => (\n <Component ref={ref as Ref<HTMLElement>} className={cn(className)} {...props} />\n ),\n);\nBox.displayName = 'Box';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const stackVariants = tv({\n base: 'flex',\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n gap: {\n '0': 'gap-0',\n '1': 'gap-1',\n '2': 'gap-2',\n '3': 'gap-3',\n '4': 'gap-4',\n '5': 'gap-5',\n '6': 'gap-6',\n '8': 'gap-8',\n '10': 'gap-10',\n '12': 'gap-12',\n },\n wrap: {\n wrap: 'flex-wrap',\n nowrap: 'flex-nowrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n gap: '4',\n },\n});\n\nexport type StackVariants = VariantProps<typeof stackVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { stackVariants, type StackVariants } from './Stack.variants';\n\nexport interface StackProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n StackVariants {\n as?: ElementType;\n}\n\n/**\n * Vertical (default) or horizontal flex container with gap and alignment\n * variants. For row preset use `HStack`, for column use `VStack`.\n */\nexport const Stack = forwardRef<HTMLElement, StackProps>(\n ({ as: Component = 'div', className, direction, align, justify, gap, wrap, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(stackVariants({ direction, align, justify, gap, wrap }), className)}\n {...props}\n />\n ),\n);\nStack.displayName = 'Stack';\n","import { forwardRef, type Ref } from 'react';\nimport { Stack, type StackProps } from '../stack/Stack';\n\nexport type HStackProps = Omit<StackProps, 'direction'>;\n\n/** Stack preset: `direction=\"row\"`. */\nexport const HStack = forwardRef<HTMLElement, HStackProps>((props, ref) => (\n <Stack ref={ref as Ref<HTMLElement>} direction=\"row\" {...props} />\n));\nHStack.displayName = 'HStack';\n","import { forwardRef, type Ref } from 'react';\nimport { Stack, type StackProps } from '../stack/Stack';\n\nexport type VStackProps = Omit<StackProps, 'direction'>;\n\n/** Stack preset: `direction=\"column\"` (default). Provided for symmetry with HStack. */\nexport const VStack = forwardRef<HTMLElement, VStackProps>((props, ref) => (\n <Stack ref={ref as Ref<HTMLElement>} direction=\"column\" {...props} />\n));\nVStack.displayName = 'VStack';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const gridVariants = tv({\n base: 'grid',\n variants: {\n columns: {\n '1': 'grid-cols-1',\n '2': 'grid-cols-2',\n '3': 'grid-cols-3',\n '4': 'grid-cols-4',\n '5': 'grid-cols-5',\n '6': 'grid-cols-6',\n '8': 'grid-cols-8',\n '12': 'grid-cols-12',\n },\n gap: {\n '0': 'gap-0',\n '1': 'gap-1',\n '2': 'gap-2',\n '3': 'gap-3',\n '4': 'gap-4',\n '5': 'gap-5',\n '6': 'gap-6',\n '8': 'gap-8',\n '10': 'gap-10',\n '12': 'gap-12',\n },\n },\n defaultVariants: {\n columns: '2',\n gap: '4',\n },\n});\n\nexport type GridVariants = VariantProps<typeof gridVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { gridVariants, type GridVariants } from './Grid.variants';\n\nexport interface GridProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n GridVariants {\n as?: ElementType;\n}\n\n/**\n * CSS grid container with column and gap variants. For non-uniform tracks\n * pass an explicit `style={{ gridTemplateColumns }}` — the variant covers\n * the equal-column case.\n */\nexport const Grid = forwardRef<HTMLElement, GridProps>(\n ({ as: Component = 'div', className, columns, gap, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(gridVariants({ columns, gap }), className)}\n {...props}\n />\n ),\n);\nGrid.displayName = 'Grid';\n","import { tv, type VariantProps } from '../../utils';\n\nexport const containerVariants = tv({\n base: 'mx-auto w-full px-4',\n variants: {\n size: {\n sm: 'max-w-screen-sm',\n md: 'max-w-screen-md',\n lg: 'max-w-screen-lg',\n xl: 'max-w-screen-xl',\n '2xl': 'max-w-screen-2xl',\n full: 'max-w-full',\n },\n },\n defaultVariants: {\n size: 'lg',\n },\n});\n\nexport type ContainerVariants = VariantProps<typeof containerVariants>;\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\nimport { containerVariants, type ContainerVariants } from './Container.variants';\n\nexport interface ContainerProps\n extends Omit<ComponentPropsWithoutRef<'div'>, 'as'>,\n ContainerVariants {\n as?: ElementType;\n}\n\n/**\n * Centered max-width wrapper with horizontal padding. Use at page-level to\n * constrain content width.\n */\nexport const Container = forwardRef<HTMLElement, ContainerProps>(\n ({ as: Component = 'div', className, size, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn(containerVariants({ size }), className)}\n {...props}\n />\n ),\n);\nContainer.displayName = 'Container';\n","import {\n forwardRef,\n type ComponentPropsWithoutRef,\n type ElementType,\n type Ref,\n} from 'react';\nimport { cn } from '../../utils';\n\nexport interface FlexProps extends Omit<ComponentPropsWithoutRef<'div'>, 'as'> {\n as?: ElementType;\n}\n\n/**\n * Bare flex container — no opinions on direction, gap, or alignment.\n * Use for one-off flex layouts that don't fit `Stack`'s variant matrix.\n */\nexport const Flex = forwardRef<HTMLElement, FlexProps>(\n ({ as: Component = 'div', className, ...props }, ref) => (\n <Component\n ref={ref as Ref<HTMLElement>}\n className={cn('flex', className)}\n {...props}\n />\n ),\n);\nFlex.displayName = 'Flex';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface AspectRatioProps extends ComponentPropsWithoutRef<'div'> {\n /** Numeric ratio (width/height). Default 1 (square). */\n ratio?: number;\n}\n\n/**\n * Constrain children to an aspect ratio (width / height). Children are\n * absolutely positioned and stretched to fill — typically pass a single\n * `<img>`, `<video>`, or `<iframe>` with `className=\"absolute inset-0 w-full h-full\"`.\n */\nexport const AspectRatio = forwardRef<HTMLDivElement, AspectRatioProps>(\n ({ ratio = 1, className, style, children, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('relative w-full', className)}\n style={{ aspectRatio: `${ratio}`, ...style }}\n {...props}\n >\n {children}\n </div>\n ),\n);\nAspectRatio.displayName = 'AspectRatio';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface SpacerProps extends ComponentPropsWithoutRef<'div'> {\n /** Optional explicit size (CSS length). When inside a flex/grid parent,\n * the default `flex: 1` already pushes siblings apart. */\n size?: number | string;\n axis?: 'horizontal' | 'vertical';\n}\n\n/**\n * A flexible empty box. In a flex parent it expands (`flex: 1`) and pushes\n * siblings to opposite ends. Pass `size` for a fixed gap.\n */\nexport const Spacer = forwardRef<HTMLDivElement, SpacerProps>(\n ({ size, axis = 'horizontal', className, style, ...props }, ref) => {\n const fixed: React.CSSProperties | undefined =\n size !== undefined\n ? axis === 'horizontal'\n ? { width: typeof size === 'number' ? `${size}px` : size, flexShrink: 0 }\n : { height: typeof size === 'number' ? `${size}px` : size, flexShrink: 0 }\n : undefined;\n\n return (\n <div\n ref={ref}\n aria-hidden=\"true\"\n className={cn(size === undefined && 'flex-1', className)}\n style={{ ...fixed, ...style }}\n {...props}\n />\n );\n },\n);\nSpacer.displayName = 'Spacer';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport type CenterProps = ComponentPropsWithoutRef<'div'>;\n\n/** Flex shorthand that centers its children both axes. */\nexport const Center = forwardRef<HTMLDivElement, CenterProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex items-center justify-center', className)}\n {...props}\n />\n ),\n);\nCenter.displayName = 'Center';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface ScrollAreaProps extends ComponentPropsWithoutRef<'div'> {\n axis?: 'vertical' | 'horizontal' | 'both';\n}\n\n/**\n * Native scrollable container with stable visuals. For custom-styled\n * scrollbars (track + thumb separately animated) use the L5 ScrollArea\n * organism. This atom exists for the common case.\n */\nexport const ScrollArea = forwardRef<HTMLDivElement, ScrollAreaProps>(\n ({ axis = 'vertical', className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'relative',\n axis === 'vertical' && 'overflow-y-auto overflow-x-hidden',\n axis === 'horizontal' && 'overflow-x-auto overflow-y-hidden',\n axis === 'both' && 'overflow-auto',\n className,\n )}\n {...props}\n />\n ),\n);\nScrollArea.displayName = 'ScrollArea';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface InlineProps extends ComponentPropsWithoutRef<'div'> {\n /** Gap between children (Tailwind spacing). Default `2`. */\n gap?: '0' | '1' | '2' | '3' | '4' | '6' | '8';\n /** Vertical alignment. Default `center`. */\n align?: 'start' | 'center' | 'end' | 'baseline';\n}\n\nconst GAP: Record<NonNullable<InlineProps['gap']>, string> = {\n '0': 'gap-0', '1': 'gap-1', '2': 'gap-2', '3': 'gap-3', '4': 'gap-4', '6': 'gap-6', '8': 'gap-8',\n};\nconst ALIGN: Record<NonNullable<InlineProps['align']>, string> = {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n baseline: 'items-baseline',\n};\n\n/**\n * Wrapping horizontal row with consistent gap. Use for chips/tag rows,\n * inline button groups, breadcrumb-like sequences.\n */\nexport const Inline = forwardRef<HTMLDivElement, InlineProps>(\n ({ gap = '2', align = 'center', className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-wrap', GAP[gap], ALIGN[align], className)}\n {...props}\n />\n ),\n);\nInline.displayName = 'Inline';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface ClusterProps extends ComponentPropsWithoutRef<'div'> {\n /** Gap between children. Default `4`. */\n gap?: '2' | '3' | '4' | '6' | '8';\n /** Justify on cross axis. Default `center`. */\n justify?: 'start' | 'center' | 'end';\n}\n\nconst GAP: Record<NonNullable<ClusterProps['gap']>, string> = {\n '2': 'gap-2', '3': 'gap-3', '4': 'gap-4', '6': 'gap-6', '8': 'gap-8',\n};\nconst JUSTIFY: Record<NonNullable<ClusterProps['justify']>, string> = {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n};\n\n/**\n * Centered wrapping row — for auth-page action clusters, hero CTAs, footer\n * link groups. `Inline` left-aligns; `Cluster` centers by default.\n */\nexport const Cluster = forwardRef<HTMLDivElement, ClusterProps>(\n ({ gap = '4', justify = 'center', className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('flex flex-wrap items-center', GAP[gap], JUSTIFY[justify], className)}\n {...props}\n />\n ),\n);\nCluster.displayName = 'Cluster';\n","import { forwardRef, type ComponentPropsWithoutRef } from 'react';\nimport { cn } from '../../utils';\n\nexport interface FrameProps extends ComponentPropsWithoutRef<'div'> {\n /** Padding. Default `4`. */\n padding?: '0' | '2' | '3' | '4' | '6' | '8';\n /** Border radius. Default `md`. */\n radius?: 'none' | 'sm' | 'md' | 'lg';\n /** Surface background — `card` (raised) or `muted` (recessed). Default `card`. */\n surface?: 'card' | 'muted' | 'transparent';\n /** Show the border. Default `true`. */\n bordered?: boolean;\n}\n\nconst PADDING: Record<NonNullable<FrameProps['padding']>, string> = {\n '0': '', '2': 'p-2', '3': 'p-3', '4': 'p-4', '6': 'p-6', '8': 'p-8',\n};\nconst RADIUS: Record<NonNullable<FrameProps['radius']>, string> = {\n none: '', sm: 'rounded-sm', md: 'rounded-md', lg: 'rounded-lg',\n};\nconst SURFACE: Record<NonNullable<FrameProps['surface']>, string> = {\n card: 'bg-card text-card-foreground',\n muted: 'bg-muted text-foreground',\n transparent: '',\n};\n\n/**\n * Bordered shell with padding + radius — `Card` without slot semantics.\n * Use when you want the visual but not the structured Header/Body/Footer.\n */\nexport const Frame = forwardRef<HTMLDivElement, FrameProps>(\n ({ padding = '4', radius = 'md', surface = 'card', bordered = true, className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n SURFACE[surface],\n PADDING[padding],\n RADIUS[radius],\n bordered && 'border border-border',\n className,\n )}\n {...props}\n />\n ),\n);\nFrame.displayName = 'Frame';\n","import { forwardRef, type ComponentPropsWithoutRef, type ReactNode } from 'react';\nimport { cn } from '../../utils';\n\nexport interface TwoColumnProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {\n /** Sidebar / aside content. */\n aside: ReactNode;\n /** Main content. */\n children: ReactNode;\n /** Aside width — Tailwind class string (e.g. `w-64`). Default `w-64`. */\n asideWidth?: string;\n /** Side the aside sits on. Default `left`. */\n asideSide?: 'left' | 'right';\n /** Gap between aside and main. Default `6`. */\n gap?: '0' | '4' | '6' | '8' | '10';\n}\n\nconst GAP: Record<NonNullable<TwoColumnProps['gap']>, string> = {\n '0': 'gap-0', '4': 'gap-4', '6': 'gap-6', '8': 'gap-8', '10': 'gap-10',\n};\n\n/**\n * Two-pane layout — fixed-width aside + flexible main. Sidebar+content,\n * filter+results, table-of-contents+article patterns.\n */\nexport const TwoColumn = forwardRef<HTMLDivElement, TwoColumnProps>(\n (\n { aside, children, asideWidth = 'w-64', asideSide = 'left', gap = '6', className, ...props },\n ref,\n ) => (\n <div\n ref={ref}\n className={cn(\n 'flex w-full',\n asideSide === 'right' && 'flex-row-reverse',\n GAP[gap],\n className,\n )}\n {...props}\n >\n <aside className={cn('shrink-0', asideWidth)}>{aside}</aside>\n <main className=\"min-w-0 flex-1\">{children}</main>\n </div>\n ),\n);\nTwoColumn.displayName = 'TwoColumn';\n","import {\n Children,\n createContext,\n forwardRef,\n isValidElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type HTMLAttributes,\n type KeyboardEvent,\n type MouseEvent as ReactMouseEvent,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils';\nimport { useControlled } from '../../hooks';\n\ninterface PanelInfo {\n index: number;\n defaultSize: number;\n minSize: number;\n maxSize: number;\n}\n\ninterface ResizableContextValue {\n orientation: 'horizontal' | 'vertical';\n sizes: number[];\n panels: React.MutableRefObject<PanelInfo[]>;\n containerRef: React.MutableRefObject<HTMLDivElement | null>;\n beginDrag: (separatorIndex: number, event: ReactMouseEvent) => void;\n nudge: (separatorIndex: number, deltaPct: number) => void;\n resetPair: (separatorIndex: number) => void;\n}\n\nconst ResizableContext = createContext<ResizableContextValue | null>(null);\n\nfunction useResizableContext() {\n const ctx = useContext(ResizableContext);\n if (!ctx) throw new Error('ResizablePanels.* must be used inside <ResizablePanels>');\n return ctx;\n}\n\nexport interface ResizablePanelsProps extends HTMLAttributes<HTMLDivElement> {\n orientation?: 'horizontal' | 'vertical';\n defaultSizes?: number[];\n sizes?: number[];\n onSizesChange?: (sizes: number[]) => void;\n children: ReactNode;\n}\n\nfunction countPanels(children: ReactNode): number {\n let n = 0;\n Children.forEach(children, (child) => {\n if (isValidElement(child) && (child.type as { displayName?: string }).displayName === 'ResizablePanel') {\n n += 1;\n }\n });\n return n;\n}\n\nexport const ResizablePanels = forwardRef<HTMLDivElement, ResizablePanelsProps>(\n function ResizablePanels(\n { orientation = 'horizontal', defaultSizes, sizes: sizesProp, onSizesChange, className, children, ...rest },\n forwardedRef,\n ) {\n const panels = useRef<PanelInfo[]>([]);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const panelCount = countPanels(children);\n\n const initialSizes =\n defaultSizes && defaultSizes.length === panelCount\n ? defaultSizes\n : Array(panelCount).fill(100 / Math.max(panelCount, 1));\n\n const [sizes, setSizes] = useControlled<number[]>({\n controlled: sizesProp,\n default: initialSizes,\n onChange: onSizesChange,\n });\n\n // If the panel count changes (children added/removed), reset to equal sizes.\n useEffect(() => {\n if (sizes.length === panelCount) return;\n setSizes(Array(panelCount).fill(100 / Math.max(panelCount, 1)));\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [panelCount]);\n\n const applyDelta = useCallback(\n (separatorIndex: number, deltaPct: number) => {\n const a = separatorIndex;\n const b = separatorIndex + 1;\n const aInfo = panels.current[a];\n const bInfo = panels.current[b];\n if (!aInfo || !bInfo) return;\n const next = sizes.slice();\n let nextA = next[a]! + deltaPct;\n let nextB = next[b]! - deltaPct;\n\n // Clamp by min/max — adjust deltaPct on overshoot.\n if (nextA < aInfo.minSize) {\n const adj = aInfo.minSize - nextA;\n nextA += adj;\n nextB -= adj;\n }\n if (nextB < bInfo.minSize) {\n const adj = bInfo.minSize - nextB;\n nextB += adj;\n nextA -= adj;\n }\n if (nextA > aInfo.maxSize) {\n const adj = nextA - aInfo.maxSize;\n nextA -= adj;\n nextB += adj;\n }\n if (nextB > bInfo.maxSize) {\n const adj = nextB - bInfo.maxSize;\n nextB -= adj;\n nextA += adj;\n }\n\n next[a] = nextA;\n next[b] = nextB;\n setSizes(next);\n },\n [sizes, setSizes],\n );\n\n const beginDrag = useCallback(\n (separatorIndex: number, event: ReactMouseEvent) => {\n const container = containerRef.current;\n if (!container) return;\n const startX = event.clientX;\n const startY = event.clientY;\n const rect = container.getBoundingClientRect();\n const total = orientation === 'horizontal' ? rect.width : rect.height;\n if (total === 0) return;\n\n const startSizes = sizes.slice();\n\n const onMove = (e: MouseEvent) => {\n const deltaPx =\n orientation === 'horizontal' ? e.clientX - startX : e.clientY - startY;\n const deltaPct = (deltaPx / total) * 100;\n // Recompute against the start state, not the live state, to prevent drift.\n const a = separatorIndex;\n const b = separatorIndex + 1;\n const aInfo = panels.current[a];\n const bInfo = panels.current[b];\n if (!aInfo || !bInfo) return;\n let nextA = startSizes[a]! + deltaPct;\n let nextB = startSizes[b]! - deltaPct;\n nextA = Math.max(aInfo.minSize, Math.min(aInfo.maxSize, nextA));\n nextB = Math.max(bInfo.minSize, Math.min(bInfo.maxSize, nextB));\n // Restore the locked total after clamping.\n const sum = nextA + nextB;\n const startSum = startSizes[a]! + startSizes[b]!;\n if (sum !== startSum) {\n const diff = startSum - sum;\n // Push surplus onto whichever side has slack.\n if (nextA + diff <= aInfo.maxSize && nextA + diff >= aInfo.minSize) {\n nextA = nextA + diff;\n } else {\n nextB = nextB + diff;\n }\n }\n const next = startSizes.slice();\n next[a] = nextA;\n next[b] = nextB;\n setSizes(next);\n };\n\n const onUp = () => {\n window.removeEventListener('mousemove', onMove);\n window.removeEventListener('mouseup', onUp);\n document.body.style.cursor = '';\n document.body.style.userSelect = '';\n };\n\n document.body.style.cursor = orientation === 'horizontal' ? 'col-resize' : 'row-resize';\n document.body.style.userSelect = 'none';\n window.addEventListener('mousemove', onMove);\n window.addEventListener('mouseup', onUp);\n },\n [orientation, sizes, setSizes],\n );\n\n const resetPair = useCallback(\n (separatorIndex: number) => {\n const a = separatorIndex;\n const b = separatorIndex + 1;\n const aInfo = panels.current[a];\n const bInfo = panels.current[b];\n if (!aInfo || !bInfo) return;\n const next = sizes.slice();\n const total = next[a]! + next[b]!;\n next[a] = (total * aInfo.defaultSize) / (aInfo.defaultSize + bInfo.defaultSize);\n next[b] = total - next[a]!;\n setSizes(next);\n },\n [sizes, setSizes],\n );\n\n const ctx = useMemo<ResizableContextValue>(\n () => ({\n orientation,\n sizes,\n panels,\n containerRef,\n beginDrag,\n nudge: applyDelta,\n resetPair,\n }),\n [orientation, sizes, beginDrag, applyDelta, resetPair],\n );\n\n // Render children with separator indices threaded through.\n let panelIdx = 0;\n let sepIdx = 0;\n const elements = Children.map(children, (child) => {\n if (!isValidElement(child)) return child;\n const displayName = (child.type as { displayName?: string }).displayName;\n if (displayName === 'ResizablePanel') {\n const node = (\n <ResizablePanelInner\n key={`p-${panelIdx}`}\n index={panelIdx}\n {...(child.props as ResizablePanelProps)}\n />\n );\n panelIdx += 1;\n return node;\n }\n if (displayName === 'ResizableSeparator') {\n const node = (\n <ResizableSeparatorInner\n key={`s-${sepIdx}`}\n index={sepIdx}\n {...(child.props as ResizableSeparatorProps)}\n />\n );\n sepIdx += 1;\n return node;\n }\n return child;\n });\n\n return (\n <ResizableContext.Provider value={ctx}>\n <div\n ref={(el) => {\n containerRef.current = el;\n if (typeof forwardedRef === 'function') forwardedRef(el);\n else if (forwardedRef) (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = el;\n }}\n data-orientation={orientation}\n className={cn(\n 'flex h-full w-full',\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n className,\n )}\n {...rest}\n >\n {elements}\n </div>\n </ResizableContext.Provider>\n );\n },\n);\n\nexport interface ResizablePanelProps extends HTMLAttributes<HTMLDivElement> {\n defaultSize?: number;\n minSize?: number;\n maxSize?: number;\n children?: ReactNode;\n}\n\ninterface ResizablePanelInnerProps extends ResizablePanelProps {\n index: number;\n}\n\nfunction ResizablePanelInner({\n index,\n defaultSize = 100,\n minSize = 0,\n maxSize = 100,\n className,\n children,\n ...rest\n}: ResizablePanelInnerProps) {\n const ctx = useResizableContext();\n\n // Register panel info before first paint so beginDrag can reference it.\n if (!ctx.panels.current[index]) {\n ctx.panels.current[index] = { index, defaultSize, minSize, maxSize };\n } else {\n ctx.panels.current[index] = { index, defaultSize, minSize, maxSize };\n }\n\n const size = ctx.sizes[index] ?? defaultSize;\n\n return (\n <div\n data-panel-index={index}\n className={cn('overflow-auto', className)}\n style={\n ctx.orientation === 'horizontal'\n ? { width: `${size}%`, height: '100%' }\n : { height: `${size}%`, width: '100%' }\n }\n {...rest}\n >\n {children}\n </div>\n );\n}\n\n// Marker component — ResizablePanels swaps each <ResizablePanel> for its inner\n// impl via Children.map. The wrapper exists only as a typed slot.\nexport const ResizablePanel = forwardRef<HTMLDivElement, ResizablePanelProps>(\n function ResizablePanel() {\n return null;\n },\n);\nResizablePanel.displayName = 'ResizablePanel';\n\nexport interface ResizableSeparatorProps extends HTMLAttributes<HTMLDivElement> {\n disabled?: boolean;\n}\n\ninterface ResizableSeparatorInnerProps extends ResizableSeparatorProps {\n index: number;\n}\n\nfunction ResizableSeparatorInner({\n index,\n disabled,\n className,\n onKeyDown,\n onDoubleClick,\n ...rest\n}: ResizableSeparatorInnerProps) {\n const ctx = useResizableContext();\n const [dragging, setDragging] = useState(false);\n\n const handleMouseDown = (e: ReactMouseEvent<HTMLDivElement>) => {\n if (disabled) return;\n if (e.button !== 0) return;\n e.preventDefault();\n setDragging(true);\n ctx.beginDrag(index, e);\n const onUp = () => {\n setDragging(false);\n window.removeEventListener('mouseup', onUp);\n };\n window.addEventListener('mouseup', onUp);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(e);\n if (e.defaultPrevented || disabled) return;\n const step = e.shiftKey ? 10 : 1;\n if (ctx.orientation === 'horizontal') {\n if (e.key === 'ArrowLeft') {\n e.preventDefault();\n ctx.nudge(index, -step);\n } else if (e.key === 'ArrowRight') {\n e.preventDefault();\n ctx.nudge(index, step);\n }\n } else {\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n ctx.nudge(index, -step);\n } else if (e.key === 'ArrowDown') {\n e.preventDefault();\n ctx.nudge(index, step);\n }\n }\n };\n\n const ariaValueNow = ctx.sizes[index + 1] ?? 50;\n const nextPanel = ctx.panels.current[index + 1];\n\n return (\n <div\n role=\"separator\"\n aria-orientation={ctx.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n aria-valuenow={Math.round(ariaValueNow)}\n aria-valuemin={nextPanel?.minSize ?? 0}\n aria-valuemax={nextPanel?.maxSize ?? 100}\n aria-disabled={disabled || undefined}\n tabIndex={disabled ? -1 : 0}\n data-dragging={dragging || undefined}\n onMouseDown={handleMouseDown}\n onKeyDown={handleKeyDown}\n onDoubleClick={(e) => {\n onDoubleClick?.(e);\n if (e.defaultPrevented || disabled) return;\n ctx.resetPair(index);\n }}\n className={cn(\n 'flex shrink-0 items-center justify-center bg-border transition-colors',\n ctx.orientation === 'horizontal'\n ? 'w-1 cursor-col-resize hover:bg-border-strong data-[dragging]:bg-primary'\n : 'h-1 cursor-row-resize hover:bg-border-strong data-[dragging]:bg-primary',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n disabled && 'cursor-default opacity-50 hover:bg-border',\n className,\n )}\n {...rest}\n />\n );\n}\n\nexport const ResizableSeparator = forwardRef<HTMLDivElement, ResizableSeparatorProps>(\n function ResizableSeparator() {\n return null;\n },\n);\nResizableSeparator.displayName = 'ResizableSeparator';\n\ntype ResizablePanelsComponent = typeof ResizablePanels & {\n Panel: typeof ResizablePanel;\n Separator: typeof ResizableSeparator;\n};\n\n(ResizablePanels as ResizablePanelsComponent).Panel = ResizablePanel;\n(ResizablePanels as ResizablePanelsComponent).Separator = ResizableSeparator;\n\nexport default ResizablePanels as ResizablePanelsComponent;\n","import {\n forwardRef,\n useRef,\n useState,\n type HTMLAttributes,\n type PointerEvent as ReactPointerEvent,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils';\nimport { Announce } from '../../primitives';\nimport { Spinner } from '../../feedback/spinner';\n\nexport interface PullToRefreshProps extends HTMLAttributes<HTMLDivElement> {\n onRefresh: () => Promise<void> | void;\n threshold?: number;\n maxPull?: number;\n disabled?: boolean;\n children: ReactNode;\n}\n\n/**\n * Pull-to-refresh wrapper. Listen to pointer drag at scrollTop=0; once past\n * `threshold`, fire `onRefresh`. Visual indicator: spinner that scales in as\n * the user pulls.\n */\nexport const PullToRefresh = forwardRef<HTMLDivElement, PullToRefreshProps>(\n function PullToRefresh(\n { onRefresh, threshold = 60, maxPull = 120, disabled, className, children, ...rest },\n forwardedRef,\n ) {\n const containerRef = useRef<HTMLDivElement | null>(null);\n const startYRef = useRef<number | null>(null);\n const [pull, setPull] = useState(0);\n const [refreshing, setRefreshing] = useState(false);\n\n const onPointerDown = (e: ReactPointerEvent<HTMLDivElement>) => {\n if (disabled || refreshing) return;\n const el = containerRef.current;\n if (!el || el.scrollTop > 0) return;\n startYRef.current = e.clientY;\n };\n\n const onPointerMove = (e: ReactPointerEvent<HTMLDivElement>) => {\n if (startYRef.current == null) return;\n const dy = e.clientY - startYRef.current;\n if (dy < 0) {\n setPull(0);\n return;\n }\n // Resistance: sub-linear growth past threshold.\n const eased = dy < threshold ? dy : threshold + (dy - threshold) * 0.4;\n setPull(Math.min(maxPull, eased));\n };\n\n const onPointerUp = async () => {\n if (startYRef.current == null) return;\n const reached = pull >= threshold;\n startYRef.current = null;\n if (reached) {\n setRefreshing(true);\n setPull(threshold);\n try {\n await onRefresh();\n } finally {\n setRefreshing(false);\n setPull(0);\n }\n } else {\n setPull(0);\n }\n };\n\n const reached = pull >= threshold;\n\n return (\n <div\n ref={(el) => {\n containerRef.current = el;\n if (typeof forwardedRef === 'function') forwardedRef(el);\n else if (forwardedRef) (forwardedRef as React.MutableRefObject<HTMLDivElement | null>).current = el;\n }}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerUp}\n onPointerCancel={onPointerUp}\n className={cn('relative h-full overflow-y-auto', className)}\n style={{ touchAction: 'pan-y' }}\n {...rest}\n >\n <div\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute inset-x-0 top-0 z-10 flex items-center justify-center\"\n style={{\n height: pull,\n transition: startYRef.current == null ? 'height 200ms ease-out' : 'none',\n }}\n >\n {pull > 8 && (\n <div\n className={cn(\n 'transition-opacity',\n refreshing ? 'opacity-100' : reached ? 'opacity-100' : 'opacity-60',\n )}\n style={{ transform: `scale(${Math.min(1, pull / threshold)})` }}\n >\n <Spinner size=\"md\" tone={reached ? 'brand' : 'default'} />\n </div>\n )}\n </div>\n <div\n style={{\n transform: `translateY(${pull}px)`,\n transition: startYRef.current == null ? 'transform 200ms ease-out' : 'none',\n }}\n >\n {children}\n </div>\n <Announce politeness=\"polite\">\n {refreshing ? 'Refreshing' : ''}\n </Announce>\n </div>\n );\n },\n);\n","import {\n createContext,\n forwardRef,\n useContext,\n useMemo,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cn } from '../../utils';\nimport { useControlled, useMediaQuery } from '../../hooks';\nimport { Drawer, DrawerContent } from '../../overlays/drawer';\n\ntype Breakpoint = 'sm' | 'md' | 'lg' | 'xl' | '2xl';\n\nconst BREAKPOINT_PX: Record<Breakpoint, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n};\n\ninterface AppShellContextValue {\n sidebarWidth: string;\n asideWidth: string;\n sidebarOpen: boolean;\n setSidebarOpen: (open: boolean) => void;\n isSidebarCollapsed: boolean;\n isAsideHidden: boolean;\n}\n\nconst AppShellContext = createContext<AppShellContextValue | null>(null);\n\nfunction useAppShellContext() {\n const ctx = useContext(AppShellContext);\n if (!ctx) throw new Error('AppShell.* must be used inside <AppShell>');\n return ctx;\n}\n\nexport interface AppShellProps extends HTMLAttributes<HTMLDivElement> {\n sidebarWidth?: string;\n asideWidth?: string;\n sidebarBreakpoint?: Breakpoint;\n asideBreakpoint?: Breakpoint;\n sidebarOpen?: boolean;\n defaultSidebarOpen?: boolean;\n onSidebarOpenChange?: (open: boolean) => void;\n children: ReactNode;\n}\n\n/**\n * Top-level page frame. Children: `AppShell.Header / Sidebar / Main / Aside /\n * Footer`. CSS-grid layout; sidebar collapses to a Drawer below\n * `sidebarBreakpoint`.\n */\nexport const AppShell = forwardRef<HTMLDivElement, AppShellProps>(function AppShell(\n {\n sidebarWidth = '240px',\n asideWidth = '280px',\n sidebarBreakpoint = 'lg',\n asideBreakpoint = 'xl',\n sidebarOpen: sidebarOpenProp,\n defaultSidebarOpen = false,\n onSidebarOpenChange,\n className,\n children,\n ...rest\n },\n ref,\n) {\n const [sidebarOpen, setSidebarOpen] = useControlled({\n controlled: sidebarOpenProp,\n default: defaultSidebarOpen,\n onChange: onSidebarOpenChange,\n });\n\n const isSidebarCollapsed = !useMediaQuery(`(min-width: ${BREAKPOINT_PX[sidebarBreakpoint]}px)`);\n const isAsideHidden = !useMediaQuery(`(min-width: ${BREAKPOINT_PX[asideBreakpoint]}px)`);\n\n const ctx = useMemo<AppShellContextValue>(\n () => ({\n sidebarWidth,\n asideWidth,\n sidebarOpen,\n setSidebarOpen,\n isSidebarCollapsed,\n isAsideHidden,\n }),\n [sidebarWidth, asideWidth, sidebarOpen, setSidebarOpen, isSidebarCollapsed, isAsideHidden],\n );\n\n const gridTemplate = isSidebarCollapsed\n ? `'header header' auto 'main main' 1fr 'footer footer' auto / 1fr`\n : `'header header' auto 'sidebar main' 1fr 'sidebar footer' auto / ${sidebarWidth} 1fr`;\n\n return (\n <AppShellContext.Provider value={ctx}>\n <div\n ref={ref}\n className={cn('grid min-h-svh bg-background text-foreground', className)}\n style={{ gridTemplate }}\n {...rest}\n >\n <a\n href=\"#app-shell-main\"\n className=\"sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded-md focus:bg-card focus:px-3 focus:py-2 focus:shadow\"\n >\n Skip to content\n </a>\n {children}\n </div>\n </AppShellContext.Provider>\n );\n});\n\nexport type AppShellHeaderProps = HTMLAttributes<HTMLElement>;\n\nexport const AppShellHeader = forwardRef<HTMLElement, AppShellHeaderProps>(\n function AppShellHeader({ className, ...rest }, ref) {\n return (\n <header\n ref={ref}\n role=\"banner\"\n className={cn(\n 'sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-border bg-card px-4 [grid-area:header]',\n className,\n )}\n {...rest}\n />\n );\n },\n);\n\nexport type AppShellSidebarProps = HTMLAttributes<HTMLElement>;\n\nexport const AppShellSidebar = forwardRef<HTMLElement, AppShellSidebarProps>(\n function AppShellSidebar({ className, children, ...rest }, ref) {\n const ctx = useAppShellContext();\n\n if (ctx.isSidebarCollapsed) {\n return (\n <Drawer open={ctx.sidebarOpen} onOpenChange={ctx.setSidebarOpen} side=\"left\">\n <DrawerContent className=\"w-72 max-w-[80%]\">\n <nav className={cn('flex h-full flex-col', className)}>{children}</nav>\n </DrawerContent>\n </Drawer>\n );\n }\n return (\n <aside\n ref={ref}\n className={cn(\n 'sticky top-14 hidden h-[calc(100svh-3.5rem)] overflow-y-auto border-r border-border bg-card [grid-area:sidebar] lg:flex',\n className,\n )}\n {...rest}\n >\n <nav className=\"flex h-full w-full flex-col p-3\">{children}</nav>\n </aside>\n );\n },\n);\n\nexport type AppShellMainProps = HTMLAttributes<HTMLElement>;\n\nexport const AppShellMain = forwardRef<HTMLElement, AppShellMainProps>(\n function AppShellMain({ className, children, ...rest }, ref) {\n return (\n <main\n ref={ref}\n id=\"app-shell-main\"\n className={cn(\n 'flex flex-col [grid-area:main] focus:outline-none',\n className,\n )}\n tabIndex={-1}\n {...rest}\n >\n {children}\n </main>\n );\n },\n);\n\nexport type AppShellContentProps = HTMLAttributes<HTMLDivElement>;\n\nexport const AppShellContent = forwardRef<HTMLDivElement, AppShellContentProps>(\n function AppShellContent({ className, ...rest }, ref) {\n return <div ref={ref} className={cn('flex-1 overflow-y-auto p-6', className)} {...rest} />;\n },\n);\n\nexport type AppShellAsideProps = HTMLAttributes<HTMLElement>;\n\nexport const AppShellAside = forwardRef<HTMLElement, AppShellAsideProps>(\n function AppShellAside({ className, ...rest }, ref) {\n const ctx = useAppShellContext();\n if (ctx.isAsideHidden) return null;\n return (\n <aside\n ref={ref}\n style={{ width: ctx.asideWidth }}\n className={cn(\n 'sticky top-14 h-[calc(100svh-3.5rem)] shrink-0 overflow-y-auto border-l border-border bg-card p-4',\n className,\n )}\n {...rest}\n />\n );\n },\n);\n\nexport type AppShellFooterProps = HTMLAttributes<HTMLElement>;\n\nexport const AppShellFooter = forwardRef<HTMLElement, AppShellFooterProps>(\n function AppShellFooter({ className, ...rest }, ref) {\n return (\n <footer\n ref={ref}\n role=\"contentinfo\"\n className={cn(\n 'border-t border-border bg-card px-4 py-3 text-sm text-muted-foreground [grid-area:footer]',\n className,\n )}\n {...rest}\n />\n );\n },\n);\n\ntype AppShellComponent = typeof AppShell & {\n Header: typeof AppShellHeader;\n Sidebar: typeof AppShellSidebar;\n Main: typeof AppShellMain;\n Content: typeof AppShellContent;\n Aside: typeof AppShellAside;\n Footer: typeof AppShellFooter;\n};\n\n(AppShell as AppShellComponent).Header = AppShellHeader;\n(AppShell as AppShellComponent).Sidebar = AppShellSidebar;\n(AppShell as AppShellComponent).Main = AppShellMain;\n(AppShell as AppShellComponent).Content = AppShellContent;\n(AppShell as AppShellComponent).Aside = AppShellAside;\n(AppShell as AppShellComponent).Footer = AppShellFooter;\n\nexport function useAppShell() {\n return useAppShellContext();\n}\n\nexport default AppShell as AppShellComponent;\n"]}
|