@web-my-money/primitives 1.0.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/accordion/index.d.mts +9 -0
- package/dist/accordion/index.d.ts +9 -0
- package/dist/accordion/index.js +99 -0
- package/dist/accordion/index.mjs +14 -0
- package/dist/alert-dialog/index.d.mts +22 -0
- package/dist/alert-dialog/index.d.ts +22 -0
- package/dist/alert-dialog/index.js +206 -0
- package/dist/alert-dialog/index.mjs +29 -0
- package/dist/avatar/index.d.mts +23 -0
- package/dist/avatar/index.d.ts +23 -0
- package/dist/avatar/index.js +133 -0
- package/dist/avatar/index.mjs +10 -0
- package/dist/badge/index.d.mts +15 -0
- package/dist/badge/index.d.ts +15 -0
- package/dist/badge/index.js +96 -0
- package/dist/badge/index.mjs +10 -0
- package/dist/breadcrumb/index.d.mts +20 -0
- package/dist/breadcrumb/index.d.ts +20 -0
- package/dist/breadcrumb/index.js +126 -0
- package/dist/breadcrumb/index.mjs +20 -0
- package/dist/button/index.d.mts +12 -0
- package/dist/button/index.d.ts +12 -0
- package/dist/button/index.js +88 -0
- package/dist/button/index.mjs +10 -0
- package/dist/calendar/index.d.mts +29 -0
- package/dist/calendar/index.d.ts +29 -0
- package/dist/calendar/index.js +191 -0
- package/dist/calendar/index.mjs +9 -0
- package/dist/card/index.d.mts +13 -0
- package/dist/card/index.d.ts +13 -0
- package/dist/card/index.js +141 -0
- package/dist/card/index.mjs +19 -0
- package/dist/carousel/index.d.mts +20 -0
- package/dist/carousel/index.d.ts +20 -0
- package/dist/carousel/index.js +236 -0
- package/dist/carousel/index.mjs +19 -0
- package/dist/checkbox/index.d.mts +6 -0
- package/dist/checkbox/index.d.ts +6 -0
- package/dist/checkbox/index.js +63 -0
- package/dist/checkbox/index.mjs +8 -0
- package/dist/chunk-32LEHNCH.mjs +155 -0
- package/dist/chunk-3ZJ4L43B.mjs +92 -0
- package/dist/chunk-4KQNZMKT.mjs +47 -0
- package/dist/chunk-4W6U222X.mjs +113 -0
- package/dist/chunk-556SM2PJ.mjs +40 -0
- package/dist/chunk-5LYTCNI6.mjs +127 -0
- package/dist/chunk-5N7LGYZK.mjs +137 -0
- package/dist/chunk-6OG237U6.mjs +54 -0
- package/dist/chunk-7TMIJ7HZ.mjs +149 -0
- package/dist/chunk-DTENOVQN.mjs +44 -0
- package/dist/chunk-DUGW62XX.mjs +143 -0
- package/dist/chunk-DWLKKYIU.mjs +156 -0
- package/dist/chunk-DYCSGLM5.mjs +32 -0
- package/dist/chunk-DZPJV6MN.mjs +66 -0
- package/dist/chunk-FT72MNAV.mjs +25 -0
- package/dist/chunk-FV6JTZAK.mjs +30 -0
- package/dist/chunk-GLD4KQD3.mjs +90 -0
- package/dist/chunk-GWVW5OI6.mjs +106 -0
- package/dist/chunk-JWCA4M7E.mjs +160 -0
- package/dist/chunk-K4UYYX45.mjs +199 -0
- package/dist/chunk-KVQKOJNU.mjs +52 -0
- package/dist/chunk-LPMRBQLR.mjs +120 -0
- package/dist/chunk-M6HSM6GV.mjs +68 -0
- package/dist/chunk-NE5LEVMC.mjs +201 -0
- package/dist/chunk-NGWDLZ6E.mjs +33 -0
- package/dist/chunk-NH5ZVHAV.mjs +36 -0
- package/dist/chunk-PFXSPRVI.mjs +65 -0
- package/dist/chunk-PJO7WJ4G.mjs +10 -0
- package/dist/chunk-PTXZWR7Y.mjs +76 -0
- package/dist/chunk-SG747CBC.mjs +34 -0
- package/dist/chunk-UDQDW22Y.mjs +71 -0
- package/dist/chunk-UGOA6M4S.mjs +120 -0
- package/dist/chunk-UXU54FBX.mjs +63 -0
- package/dist/chunk-WYBX5VJ4.mjs +49 -0
- package/dist/chunk-Y7DNVOKO.mjs +57 -0
- package/dist/chunk-YNOS3JA2.mjs +29 -0
- package/dist/chunk-YPTARV3T.mjs +57 -0
- package/dist/chunk-YYFQVSPV.mjs +17 -0
- package/dist/chunk-ZR3J34NX.mjs +85 -0
- package/dist/collapsible/index.d.mts +8 -0
- package/dist/collapsible/index.d.ts +8 -0
- package/dist/collapsible/index.js +64 -0
- package/dist/collapsible/index.mjs +12 -0
- package/dist/combobox/index.d.mts +18 -0
- package/dist/combobox/index.d.ts +18 -0
- package/dist/combobox/index.js +198 -0
- package/dist/combobox/index.mjs +32 -0
- package/dist/context-menu/index.d.mts +16 -0
- package/dist/context-menu/index.d.ts +16 -0
- package/dist/context-menu/index.js +177 -0
- package/dist/context-menu/index.mjs +28 -0
- package/dist/date-range-input/index.d.mts +17 -0
- package/dist/date-range-input/index.d.ts +17 -0
- package/dist/date-range-input/index.js +284 -0
- package/dist/date-range-input/index.mjs +11 -0
- package/dist/dialog/index.d.mts +19 -0
- package/dist/dialog/index.d.ts +19 -0
- package/dist/dialog/index.js +240 -0
- package/dist/dialog/index.mjs +27 -0
- package/dist/dropdown-menu/index.d.mts +16 -0
- package/dist/dropdown-menu/index.d.ts +16 -0
- package/dist/dropdown-menu/index.js +189 -0
- package/dist/dropdown-menu/index.mjs +28 -0
- package/dist/field/index.d.mts +24 -0
- package/dist/field/index.d.ts +24 -0
- package/dist/field/index.js +88 -0
- package/dist/field/index.mjs +16 -0
- package/dist/hover-card/index.d.mts +8 -0
- package/dist/hover-card/index.d.ts +8 -0
- package/dist/hover-card/index.js +79 -0
- package/dist/hover-card/index.mjs +12 -0
- package/dist/index.d.mts +73 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.js +3167 -0
- package/dist/index.mjs +452 -0
- package/dist/input/index.d.mts +5 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.js +54 -0
- package/dist/input/index.mjs +7 -0
- package/dist/kbd/index.d.mts +8 -0
- package/dist/kbd/index.d.ts +8 -0
- package/dist/kbd/index.js +64 -0
- package/dist/kbd/index.mjs +9 -0
- package/dist/lightbox/index.d.mts +17 -0
- package/dist/lightbox/index.d.ts +17 -0
- package/dist/lightbox/index.js +151 -0
- package/dist/lightbox/index.mjs +24 -0
- package/dist/pagination/index.d.mts +33 -0
- package/dist/pagination/index.d.ts +33 -0
- package/dist/pagination/index.js +212 -0
- package/dist/pagination/index.mjs +25 -0
- package/dist/popover/index.d.mts +11 -0
- package/dist/popover/index.d.ts +11 -0
- package/dist/popover/index.js +120 -0
- package/dist/popover/index.mjs +18 -0
- package/dist/progress/index.d.mts +6 -0
- package/dist/progress/index.d.ts +6 -0
- package/dist/progress/index.js +60 -0
- package/dist/progress/index.mjs +8 -0
- package/dist/radio-group/index.d.mts +8 -0
- package/dist/radio-group/index.d.ts +8 -0
- package/dist/radio-group/index.js +71 -0
- package/dist/radio-group/index.mjs +10 -0
- package/dist/resizable/index.d.mts +10 -0
- package/dist/resizable/index.d.ts +10 -0
- package/dist/resizable/index.js +80 -0
- package/dist/resizable/index.mjs +12 -0
- package/dist/scroll-area/index.d.mts +6 -0
- package/dist/scroll-area/index.d.ts +6 -0
- package/dist/scroll-area/index.js +74 -0
- package/dist/scroll-area/index.mjs +8 -0
- package/dist/select/index.d.mts +17 -0
- package/dist/select/index.d.ts +17 -0
- package/dist/select/index.js +238 -0
- package/dist/select/index.mjs +26 -0
- package/dist/separator/index.d.mts +6 -0
- package/dist/separator/index.d.ts +6 -0
- package/dist/separator/index.js +59 -0
- package/dist/separator/index.mjs +8 -0
- package/dist/sheet/index.d.mts +38 -0
- package/dist/sheet/index.d.ts +38 -0
- package/dist/sheet/index.js +212 -0
- package/dist/sheet/index.mjs +27 -0
- package/dist/skeleton/index.d.mts +17 -0
- package/dist/skeleton/index.d.ts +17 -0
- package/dist/skeleton/index.js +80 -0
- package/dist/skeleton/index.mjs +11 -0
- package/dist/slide-over/index.d.mts +92 -0
- package/dist/slide-over/index.d.ts +92 -0
- package/dist/slide-over/index.js +298 -0
- package/dist/slide-over/index.mjs +31 -0
- package/dist/slider/index.d.mts +6 -0
- package/dist/slider/index.d.ts +6 -0
- package/dist/slider/index.js +47 -0
- package/dist/slider/index.mjs +8 -0
- package/dist/switch/index.d.mts +8 -0
- package/dist/switch/index.d.ts +8 -0
- package/dist/switch/index.js +66 -0
- package/dist/switch/index.mjs +8 -0
- package/dist/tabs/index.d.mts +9 -0
- package/dist/tabs/index.d.ts +9 -0
- package/dist/tabs/index.js +96 -0
- package/dist/tabs/index.mjs +14 -0
- package/dist/toast/index.d.mts +19 -0
- package/dist/toast/index.d.ts +19 -0
- package/dist/toast/index.js +107 -0
- package/dist/toast/index.mjs +10 -0
- package/dist/toggle/index.d.mts +14 -0
- package/dist/toggle/index.d.ts +14 -0
- package/dist/toggle/index.js +89 -0
- package/dist/toggle/index.mjs +12 -0
- package/dist/tooltip/index.d.mts +9 -0
- package/dist/tooltip/index.d.ts +9 -0
- package/dist/tooltip/index.js +101 -0
- package/dist/tooltip/index.mjs +14 -0
- package/package.json +235 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Select,
|
|
4
|
+
SelectContent,
|
|
5
|
+
SelectGroup,
|
|
6
|
+
SelectItem,
|
|
7
|
+
SelectLabel,
|
|
8
|
+
SelectScrollDownButton,
|
|
9
|
+
SelectScrollUpButton,
|
|
10
|
+
SelectSeparator,
|
|
11
|
+
SelectTrigger,
|
|
12
|
+
SelectValue
|
|
13
|
+
} from "../chunk-K4UYYX45.mjs";
|
|
14
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
15
|
+
export {
|
|
16
|
+
Select,
|
|
17
|
+
SelectContent,
|
|
18
|
+
SelectGroup,
|
|
19
|
+
SelectItem,
|
|
20
|
+
SelectLabel,
|
|
21
|
+
SelectScrollDownButton,
|
|
22
|
+
SelectScrollUpButton,
|
|
23
|
+
SelectSeparator,
|
|
24
|
+
SelectTrigger,
|
|
25
|
+
SelectValue
|
|
26
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/separator/index.tsx
|
|
22
|
+
var separator_exports = {};
|
|
23
|
+
__export(separator_exports, {
|
|
24
|
+
Separator: () => Separator
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(separator_exports);
|
|
27
|
+
var import_separator = require("@base-ui/react/separator");
|
|
28
|
+
|
|
29
|
+
// src/utils.ts
|
|
30
|
+
var import_clsx = require("clsx");
|
|
31
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
32
|
+
function cn(...inputs) {
|
|
33
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/separator/index.tsx
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
function Separator({
|
|
39
|
+
className,
|
|
40
|
+
orientation = "horizontal",
|
|
41
|
+
...props
|
|
42
|
+
}) {
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
import_separator.Separator,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "separator",
|
|
47
|
+
orientation,
|
|
48
|
+
className: cn(
|
|
49
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
Separator
|
|
59
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Sheet — a panel that slides in from an edge of the screen. `side="bottom"`
|
|
6
|
+
* (default) is the mobile bottom-sheet pattern (rounded top corners, drag
|
|
7
|
+
* handle, safe-area-aware padding); `left`/`right`/`top` give a desktop side
|
|
8
|
+
* panel. Same Base UI Dialog foundation as <Dialog> — swap between them freely
|
|
9
|
+
* (e.g. Sheet on mobile, Dialog on desktop) via `useBreakpoint` from
|
|
10
|
+
* @web-my-money/tokens/react.
|
|
11
|
+
*
|
|
12
|
+
* <Sheet>
|
|
13
|
+
* <SheetTrigger render={<Button>Filters</Button>} />
|
|
14
|
+
* <SheetContent side="bottom">
|
|
15
|
+
* <SheetHeader><SheetTitle>Filters</SheetTitle></SheetHeader>
|
|
16
|
+
* ...
|
|
17
|
+
* </SheetContent>
|
|
18
|
+
* </Sheet>
|
|
19
|
+
*/
|
|
20
|
+
declare function Sheet({ ...props }: Dialog.Root.Props): React.JSX.Element;
|
|
21
|
+
declare function SheetTrigger({ ...props }: Dialog.Trigger.Props): React.JSX.Element;
|
|
22
|
+
declare function SheetPortal({ ...props }: Dialog.Portal.Props): React.JSX.Element;
|
|
23
|
+
declare function SheetClose({ ...props }: Dialog.Close.Props): React.JSX.Element;
|
|
24
|
+
declare function SheetOverlay({ className, ...props }: Dialog.Backdrop.Props): React.JSX.Element;
|
|
25
|
+
type SheetSide = "bottom" | "top" | "left" | "right";
|
|
26
|
+
interface SheetContentProps extends Dialog.Popup.Props {
|
|
27
|
+
side?: SheetSide;
|
|
28
|
+
showCloseButton?: boolean;
|
|
29
|
+
/** Show the drag-handle bar (bottom sheets only). Default true for side="bottom". */
|
|
30
|
+
showHandle?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare function SheetContent({ className, children, side, showCloseButton, showHandle, ...props }: SheetContentProps): React.JSX.Element;
|
|
33
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
34
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
35
|
+
declare function SheetTitle({ className, ...props }: Dialog.Title.Props): React.JSX.Element;
|
|
36
|
+
declare function SheetDescription({ className, ...props }: Dialog.Description.Props): React.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, type SheetSide, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Sheet — a panel that slides in from an edge of the screen. `side="bottom"`
|
|
6
|
+
* (default) is the mobile bottom-sheet pattern (rounded top corners, drag
|
|
7
|
+
* handle, safe-area-aware padding); `left`/`right`/`top` give a desktop side
|
|
8
|
+
* panel. Same Base UI Dialog foundation as <Dialog> — swap between them freely
|
|
9
|
+
* (e.g. Sheet on mobile, Dialog on desktop) via `useBreakpoint` from
|
|
10
|
+
* @web-my-money/tokens/react.
|
|
11
|
+
*
|
|
12
|
+
* <Sheet>
|
|
13
|
+
* <SheetTrigger render={<Button>Filters</Button>} />
|
|
14
|
+
* <SheetContent side="bottom">
|
|
15
|
+
* <SheetHeader><SheetTitle>Filters</SheetTitle></SheetHeader>
|
|
16
|
+
* ...
|
|
17
|
+
* </SheetContent>
|
|
18
|
+
* </Sheet>
|
|
19
|
+
*/
|
|
20
|
+
declare function Sheet({ ...props }: Dialog.Root.Props): React.JSX.Element;
|
|
21
|
+
declare function SheetTrigger({ ...props }: Dialog.Trigger.Props): React.JSX.Element;
|
|
22
|
+
declare function SheetPortal({ ...props }: Dialog.Portal.Props): React.JSX.Element;
|
|
23
|
+
declare function SheetClose({ ...props }: Dialog.Close.Props): React.JSX.Element;
|
|
24
|
+
declare function SheetOverlay({ className, ...props }: Dialog.Backdrop.Props): React.JSX.Element;
|
|
25
|
+
type SheetSide = "bottom" | "top" | "left" | "right";
|
|
26
|
+
interface SheetContentProps extends Dialog.Popup.Props {
|
|
27
|
+
side?: SheetSide;
|
|
28
|
+
showCloseButton?: boolean;
|
|
29
|
+
/** Show the drag-handle bar (bottom sheets only). Default true for side="bottom". */
|
|
30
|
+
showHandle?: boolean;
|
|
31
|
+
}
|
|
32
|
+
declare function SheetContent({ className, children, side, showCloseButton, showHandle, ...props }: SheetContentProps): React.JSX.Element;
|
|
33
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
34
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
35
|
+
declare function SheetTitle({ className, ...props }: Dialog.Title.Props): React.JSX.Element;
|
|
36
|
+
declare function SheetDescription({ className, ...props }: Dialog.Description.Props): React.JSX.Element;
|
|
37
|
+
|
|
38
|
+
export { Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, type SheetSide, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/sheet/index.tsx
|
|
22
|
+
var sheet_exports = {};
|
|
23
|
+
__export(sheet_exports, {
|
|
24
|
+
Sheet: () => Sheet,
|
|
25
|
+
SheetClose: () => SheetClose,
|
|
26
|
+
SheetContent: () => SheetContent,
|
|
27
|
+
SheetDescription: () => SheetDescription,
|
|
28
|
+
SheetFooter: () => SheetFooter,
|
|
29
|
+
SheetHeader: () => SheetHeader,
|
|
30
|
+
SheetOverlay: () => SheetOverlay,
|
|
31
|
+
SheetPortal: () => SheetPortal,
|
|
32
|
+
SheetTitle: () => SheetTitle,
|
|
33
|
+
SheetTrigger: () => SheetTrigger
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(sheet_exports);
|
|
36
|
+
var import_dialog = require("@base-ui/react/dialog");
|
|
37
|
+
|
|
38
|
+
// src/utils.ts
|
|
39
|
+
var import_clsx = require("clsx");
|
|
40
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
41
|
+
function cn(...inputs) {
|
|
42
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// src/button/index.tsx
|
|
46
|
+
var import_button = require("@base-ui/react/button");
|
|
47
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
+
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
50
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
51
|
+
{
|
|
52
|
+
variants: {
|
|
53
|
+
variant: {
|
|
54
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
55
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
56
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
57
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
58
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
59
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
60
|
+
},
|
|
61
|
+
size: {
|
|
62
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
63
|
+
xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
64
|
+
sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
65
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
66
|
+
icon: "size-8",
|
|
67
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
68
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
69
|
+
"icon-lg": "size-9"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
defaultVariants: {
|
|
73
|
+
variant: "default",
|
|
74
|
+
size: "default"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
function Button({
|
|
79
|
+
className,
|
|
80
|
+
variant = "default",
|
|
81
|
+
size = "default",
|
|
82
|
+
...props
|
|
83
|
+
}) {
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
import_button.Button,
|
|
86
|
+
{
|
|
87
|
+
"data-slot": "button",
|
|
88
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
89
|
+
...props
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// src/sheet/index.tsx
|
|
95
|
+
var import_lucide_react = require("lucide-react");
|
|
96
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
97
|
+
function Sheet({ ...props }) {
|
|
98
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Root, { "data-slot": "sheet", ...props });
|
|
99
|
+
}
|
|
100
|
+
function SheetTrigger({ ...props }) {
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
102
|
+
}
|
|
103
|
+
function SheetPortal({ ...props }) {
|
|
104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
105
|
+
}
|
|
106
|
+
function SheetClose({ ...props }) {
|
|
107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_dialog.Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
108
|
+
}
|
|
109
|
+
function SheetOverlay({ className, ...props }) {
|
|
110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
111
|
+
import_dialog.Dialog.Backdrop,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "sheet-overlay",
|
|
114
|
+
className: cn("fixed inset-0 z-50 bg-black/40", className),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
var SIDE_STYLES = {
|
|
120
|
+
bottom: "inset-x-0 bottom-0 max-h-[85vh] rounded-t-2xl border-t",
|
|
121
|
+
top: "inset-x-0 top-0 max-h-[85vh] rounded-b-2xl border-b",
|
|
122
|
+
right: "inset-y-0 right-0 h-full w-full max-w-sm border-l",
|
|
123
|
+
left: "inset-y-0 left-0 h-full w-full max-w-sm border-r"
|
|
124
|
+
};
|
|
125
|
+
function SheetContent({
|
|
126
|
+
className,
|
|
127
|
+
children,
|
|
128
|
+
side = "bottom",
|
|
129
|
+
showCloseButton = true,
|
|
130
|
+
showHandle,
|
|
131
|
+
...props
|
|
132
|
+
}) {
|
|
133
|
+
const handle = showHandle ?? side === "bottom";
|
|
134
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(SheetPortal, { children: [
|
|
135
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SheetOverlay, {}),
|
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
137
|
+
import_dialog.Dialog.Popup,
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "sheet-content",
|
|
140
|
+
"data-side": side,
|
|
141
|
+
className: cn(
|
|
142
|
+
"fixed z-50 flex flex-col gap-4 border-border bg-popover p-4 text-popover-foreground shadow-xl outline-none",
|
|
143
|
+
side === "bottom" && "pb-[calc(1rem+env(safe-area-inset-bottom))]",
|
|
144
|
+
SIDE_STYLES[side],
|
|
145
|
+
className
|
|
146
|
+
),
|
|
147
|
+
...props,
|
|
148
|
+
children: [
|
|
149
|
+
handle && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "aria-hidden": true, className: "mx-auto -mt-1 h-1.5 w-9 shrink-0 rounded-full bg-border" }),
|
|
150
|
+
children,
|
|
151
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
152
|
+
import_dialog.Dialog.Close,
|
|
153
|
+
{
|
|
154
|
+
"data-slot": "sheet-close",
|
|
155
|
+
render: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Button, { variant: "ghost", className: "absolute top-3 right-3", size: "icon-sm" }),
|
|
156
|
+
children: [
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.XIcon, {}),
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "sr-only", children: "Close" })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
)
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
] });
|
|
166
|
+
}
|
|
167
|
+
function SheetHeader({ className, ...props }) {
|
|
168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { "data-slot": "sheet-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
169
|
+
}
|
|
170
|
+
function SheetFooter({ className, ...props }) {
|
|
171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
"data-slot": "sheet-footer",
|
|
175
|
+
className: cn("mt-auto flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
176
|
+
...props
|
|
177
|
+
}
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
function SheetTitle({ className, ...props }) {
|
|
181
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
182
|
+
import_dialog.Dialog.Title,
|
|
183
|
+
{
|
|
184
|
+
"data-slot": "sheet-title",
|
|
185
|
+
className: cn("font-heading text-base leading-none font-semibold", className),
|
|
186
|
+
...props
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function SheetDescription({ className, ...props }) {
|
|
191
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
192
|
+
import_dialog.Dialog.Description,
|
|
193
|
+
{
|
|
194
|
+
"data-slot": "sheet-description",
|
|
195
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
196
|
+
...props
|
|
197
|
+
}
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
201
|
+
0 && (module.exports = {
|
|
202
|
+
Sheet,
|
|
203
|
+
SheetClose,
|
|
204
|
+
SheetContent,
|
|
205
|
+
SheetDescription,
|
|
206
|
+
SheetFooter,
|
|
207
|
+
SheetHeader,
|
|
208
|
+
SheetOverlay,
|
|
209
|
+
SheetPortal,
|
|
210
|
+
SheetTitle,
|
|
211
|
+
SheetTrigger
|
|
212
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
Sheet,
|
|
4
|
+
SheetClose,
|
|
5
|
+
SheetContent,
|
|
6
|
+
SheetDescription,
|
|
7
|
+
SheetFooter,
|
|
8
|
+
SheetHeader,
|
|
9
|
+
SheetOverlay,
|
|
10
|
+
SheetPortal,
|
|
11
|
+
SheetTitle,
|
|
12
|
+
SheetTrigger
|
|
13
|
+
} from "../chunk-5LYTCNI6.mjs";
|
|
14
|
+
import "../chunk-YPTARV3T.mjs";
|
|
15
|
+
import "../chunk-PJO7WJ4G.mjs";
|
|
16
|
+
export {
|
|
17
|
+
Sheet,
|
|
18
|
+
SheetClose,
|
|
19
|
+
SheetContent,
|
|
20
|
+
SheetDescription,
|
|
21
|
+
SheetFooter,
|
|
22
|
+
SheetHeader,
|
|
23
|
+
SheetOverlay,
|
|
24
|
+
SheetPortal,
|
|
25
|
+
SheetTitle,
|
|
26
|
+
SheetTrigger
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Convenience shape shorthand */
|
|
5
|
+
shape?: "line" | "circle" | "rect";
|
|
6
|
+
width?: string | number;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
}
|
|
9
|
+
declare function Skeleton({ className, shape, width, height, style, ...props }: SkeletonProps): React$1.JSX.Element;
|
|
10
|
+
declare function SkeletonCard({ className }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}): React$1.JSX.Element;
|
|
13
|
+
declare function SkeletonRow({ className }: {
|
|
14
|
+
className?: string;
|
|
15
|
+
}): React$1.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { Skeleton, SkeletonCard, type SkeletonProps, SkeletonRow };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
|
|
3
|
+
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/** Convenience shape shorthand */
|
|
5
|
+
shape?: "line" | "circle" | "rect";
|
|
6
|
+
width?: string | number;
|
|
7
|
+
height?: string | number;
|
|
8
|
+
}
|
|
9
|
+
declare function Skeleton({ className, shape, width, height, style, ...props }: SkeletonProps): React$1.JSX.Element;
|
|
10
|
+
declare function SkeletonCard({ className }: {
|
|
11
|
+
className?: string;
|
|
12
|
+
}): React$1.JSX.Element;
|
|
13
|
+
declare function SkeletonRow({ className }: {
|
|
14
|
+
className?: string;
|
|
15
|
+
}): React$1.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { Skeleton, SkeletonCard, type SkeletonProps, SkeletonRow };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/skeleton/index.tsx
|
|
21
|
+
var skeleton_exports = {};
|
|
22
|
+
__export(skeleton_exports, {
|
|
23
|
+
Skeleton: () => Skeleton,
|
|
24
|
+
SkeletonCard: () => SkeletonCard,
|
|
25
|
+
SkeletonRow: () => SkeletonRow
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(skeleton_exports);
|
|
28
|
+
|
|
29
|
+
// src/utils.ts
|
|
30
|
+
var import_clsx = require("clsx");
|
|
31
|
+
var import_tailwind_merge = require("tailwind-merge");
|
|
32
|
+
function cn(...inputs) {
|
|
33
|
+
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// src/skeleton/index.tsx
|
|
37
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
|
+
function Skeleton({ className, shape, width, height, style, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"aria-hidden": true,
|
|
43
|
+
className: cn(
|
|
44
|
+
"animate-pulse rounded-md bg-muted/60",
|
|
45
|
+
shape === "circle" && "rounded-full",
|
|
46
|
+
shape === "line" && "h-4",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
style: {
|
|
50
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
51
|
+
height: typeof height === "number" ? `${height}px` : height,
|
|
52
|
+
...style
|
|
53
|
+
},
|
|
54
|
+
...props
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function SkeletonCard({ className }) {
|
|
59
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("space-y-3 rounded-xl border border-border bg-card p-5", className), children: [
|
|
60
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-4 w-2/5" }),
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-8 w-3/5" }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-4/5" }),
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-1/2" })
|
|
64
|
+
] });
|
|
65
|
+
}
|
|
66
|
+
function SkeletonRow({ className }) {
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: cn("flex items-center gap-3", className), children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { shape: "circle", className: "size-9 shrink-0" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 space-y-2", children: [
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-2/3" }),
|
|
71
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Skeleton, { className: "h-3 w-1/3" })
|
|
72
|
+
] })
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
Skeleton,
|
|
78
|
+
SkeletonCard,
|
|
79
|
+
SkeletonRow
|
|
80
|
+
});
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
3
|
+
|
|
4
|
+
interface UseRecordNavOptions {
|
|
5
|
+
/** CSS selector matching navigable record elements, e.g. '[data-record-id]'. */
|
|
6
|
+
selector: string;
|
|
7
|
+
/** Attribute to read each record's id from. Default 'data-record-id'. */
|
|
8
|
+
idAttribute?: string;
|
|
9
|
+
/** Currently open record id — next/prev is computed relative to this. */
|
|
10
|
+
currentId?: string | null;
|
|
11
|
+
/** Called with the next/previous record's id. */
|
|
12
|
+
onNavigate: (id: string) => void;
|
|
13
|
+
/** Enable the listener (e.g. only while a SlideOver is open). Default true. */
|
|
14
|
+
enabled?: boolean;
|
|
15
|
+
/** Key bindings. Default { next: "j", prev: "k" }. */
|
|
16
|
+
keys?: {
|
|
17
|
+
next?: string;
|
|
18
|
+
prev?: string;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Keyboard record-to-record navigation over whatever's currently rendered in
|
|
23
|
+
* the DOM (generalizes wmm-tasks' j/k board navigation) — no separate fetched
|
|
24
|
+
* list, no ordering logic: it walks `document.querySelectorAll(selector)` in
|
|
25
|
+
* DOM order, so navigation always matches what the user sees on screen.
|
|
26
|
+
* Ignored while focus is in a form control, or with any modifier key held.
|
|
27
|
+
*
|
|
28
|
+
* useRecordNav({
|
|
29
|
+
* selector: "[data-task-id]",
|
|
30
|
+
* currentId: openTaskId,
|
|
31
|
+
* onNavigate: (id) => openTask(id),
|
|
32
|
+
* enabled: !!openTaskId,
|
|
33
|
+
* });
|
|
34
|
+
*/
|
|
35
|
+
declare function useRecordNav({ selector, idAttribute, currentId, onNavigate, enabled, keys, }: UseRecordNavOptions): void;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* SlideOver — a large detail/record view over the current screen (task detail,
|
|
39
|
+
* client profile, order detail): bigger than Dialog, not edge-anchored like
|
|
40
|
+
* Sheet. Modeled on the wmm-tasks task-detail panel, rebuilt on Base UI Dialog
|
|
41
|
+
* (real focus trap + a11y instead of a hand-rolled one) with size variants
|
|
42
|
+
* instead of one fixed width, and an optional multi-column body for
|
|
43
|
+
* properties-rail / main-content / discussion-rail layouts.
|
|
44
|
+
*
|
|
45
|
+
* Three complementary "show detail over the current view" options exist —
|
|
46
|
+
* pick by content, not habit:
|
|
47
|
+
* - Dialog — small, single decision (confirm, short form)
|
|
48
|
+
* - Sheet — edge-anchored panel (filters, mobile actions), side= any edge
|
|
49
|
+
* - SlideOver — large record/detail view, optionally multi-column, often
|
|
50
|
+
* paired with a URL param so the underlying list stays intact
|
|
51
|
+
* (see @web-my-money/blocks/next's useUrlPanelParam)
|
|
52
|
+
*/
|
|
53
|
+
declare function SlideOver({ ...props }: Dialog.Root.Props): React.JSX.Element;
|
|
54
|
+
declare function SlideOverTrigger({ ...props }: Dialog.Trigger.Props): React.JSX.Element;
|
|
55
|
+
declare function SlideOverPortal({ ...props }: Dialog.Portal.Props): React.JSX.Element;
|
|
56
|
+
declare function SlideOverClose({ ...props }: Dialog.Close.Props): React.JSX.Element;
|
|
57
|
+
declare function SlideOverOverlay({ className, ...props }: Dialog.Backdrop.Props): React.JSX.Element;
|
|
58
|
+
type SlideOverSize = "md" | "lg" | "xl" | "full";
|
|
59
|
+
interface SlideOverContentProps extends Dialog.Popup.Props {
|
|
60
|
+
size?: SlideOverSize;
|
|
61
|
+
showCloseButton?: boolean;
|
|
62
|
+
}
|
|
63
|
+
declare function SlideOverContent({ className, children, size, showCloseButton, ...props }: SlideOverContentProps): React.JSX.Element;
|
|
64
|
+
declare function SlideOverHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
65
|
+
/** Footer strip — pairs well with a keyboard-shortcut legend (see `shortcuts`). */
|
|
66
|
+
declare function SlideOverFooter({ className, shortcuts, children, ...props }: React.ComponentProps<"div"> & {
|
|
67
|
+
shortcuts?: React.ReactNode;
|
|
68
|
+
}): React.JSX.Element;
|
|
69
|
+
declare function SlideOverTitle({ className, ...props }: Dialog.Title.Props): React.JSX.Element;
|
|
70
|
+
declare function SlideOverDescription({ className, ...props }: Dialog.Description.Props): React.JSX.Element;
|
|
71
|
+
interface SlideOverColumn {
|
|
72
|
+
key: string;
|
|
73
|
+
content: React.ReactNode;
|
|
74
|
+
/** Tailwind width classes for the column at `lg:` and up. Default: flexes to fill. */
|
|
75
|
+
width?: string;
|
|
76
|
+
/** Order at `lg:` and up (mobile always stacks in array order). */
|
|
77
|
+
order?: number;
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The wmm-tasks 3-column body convention: named columns that stack vertically
|
|
82
|
+
* on mobile (one shared scroll context) and sit side-by-side with independent
|
|
83
|
+
* scroll on `lg:` and up. Pass 1-3 columns; a single column just fills the
|
|
84
|
+
* body. `order`/`width` let the visual arrangement differ from array order
|
|
85
|
+
* (e.g. render [rail, main, discussion] but display main first on mobile).
|
|
86
|
+
*/
|
|
87
|
+
declare function SlideOverColumns({ columns, className, }: {
|
|
88
|
+
columns: SlideOverColumn[];
|
|
89
|
+
className?: string;
|
|
90
|
+
}): React.JSX.Element;
|
|
91
|
+
|
|
92
|
+
export { SlideOver, SlideOverClose, type SlideOverColumn, SlideOverColumns, SlideOverContent, type SlideOverContentProps, SlideOverDescription, SlideOverFooter, SlideOverHeader, SlideOverOverlay, SlideOverPortal, type SlideOverSize, SlideOverTitle, SlideOverTrigger, type UseRecordNavOptions, useRecordNav };
|