@ttt-productions/ui-core 0.11.40 → 0.11.41
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/react/components/actions-menu.d.ts +41 -0
- package/dist/react/components/actions-menu.d.ts.map +1 -0
- package/dist/react/components/actions-menu.js +98 -0
- package/dist/react/components/actions-menu.js.map +1 -0
- package/dist/react/components/button.d.ts +1 -1
- package/dist/react/components/button.d.ts.map +1 -1
- package/dist/react/components/button.js +9 -6
- package/dist/react/components/button.js.map +1 -1
- package/dist/react/components/card.d.ts +13 -4
- package/dist/react/components/card.d.ts.map +1 -1
- package/dist/react/components/card.js +44 -4
- package/dist/react/components/card.js.map +1 -1
- package/dist/react/components/dialog.d.ts +4 -1
- package/dist/react/components/dialog.d.ts.map +1 -1
- package/dist/react/components/dialog.js +13 -1
- package/dist/react/components/dialog.js.map +1 -1
- package/dist/react/components/dropdown-menu.d.ts +4 -1
- package/dist/react/components/dropdown-menu.d.ts.map +1 -1
- package/dist/react/components/dropdown-menu.js +13 -1
- package/dist/react/components/dropdown-menu.js.map +1 -1
- package/dist/react/components/label.d.ts +3 -1
- package/dist/react/components/label.d.ts.map +1 -1
- package/dist/react/components/label.js +14 -2
- package/dist/react/components/label.js.map +1 -1
- package/dist/react/components/select.d.ts +4 -1
- package/dist/react/components/select.d.ts.map +1 -1
- package/dist/react/components/select.js +13 -1
- package/dist/react/components/select.js.map +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -0
- package/dist/react/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type OverlayRender = (props: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
}) => React.ReactNode;
|
|
6
|
+
export interface ActionsMenuContextValue {
|
|
7
|
+
closeMenu: () => void;
|
|
8
|
+
showOverlay: (id: string, render: OverlayRender) => void;
|
|
9
|
+
holdOpen: () => () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useActionsMenu(): ActionsMenuContextValue;
|
|
12
|
+
export interface ActionsMenuProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
label?: string;
|
|
15
|
+
emptyLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function ActionsMenu({ children, label, emptyLabel, }: ActionsMenuProps): React.JSX.Element;
|
|
18
|
+
export interface ActionMenuItemProps {
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
label: string;
|
|
21
|
+
onSelect: () => void;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function ActionMenuItem({ icon, label, onSelect, disabled }: ActionMenuItemProps): React.JSX.Element;
|
|
25
|
+
export interface AsyncActionMenuItemProps {
|
|
26
|
+
icon?: React.ReactNode;
|
|
27
|
+
label: string;
|
|
28
|
+
onSelect: () => Promise<unknown>;
|
|
29
|
+
onError: (error: unknown) => void;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export declare function AsyncActionMenuItem({ icon, label, onSelect, onError, disabled, }: AsyncActionMenuItemProps): React.JSX.Element;
|
|
33
|
+
export interface OverlayActionItemProps {
|
|
34
|
+
icon?: React.ReactNode;
|
|
35
|
+
label: string;
|
|
36
|
+
render: OverlayRender;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
pending?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare function OverlayActionItem({ icon, label, render, disabled, pending, }: OverlayActionItemProps): React.JSX.Element;
|
|
41
|
+
//# sourceMappingURL=actions-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions-menu.d.ts","sourceRoot":"","sources":["../../../src/react/components/actions-menu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,MAAM,MAAM,aAAa,GAAG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AAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,GACT,EAAE,wBAAwB,qBA4B1B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,GACR,EAAE,sBAAsB,qBAqBxB"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
// Dialogs render in the overlay slot, a sibling of the menu: the default-modal Radix DropdownMenu sets
|
|
4
|
+
// `pointer-events: none` on the page, and closing it unmounts its content subtree.
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { MoreHorizontal } from 'lucide-react';
|
|
7
|
+
import { Button } from './button.js';
|
|
8
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from './dropdown-menu.js';
|
|
9
|
+
import { useAsyncAction } from '../hooks/use-async-action.js';
|
|
10
|
+
const ActionsMenuContext = React.createContext(null);
|
|
11
|
+
export function useActionsMenu() {
|
|
12
|
+
const ctx = React.useContext(ActionsMenuContext);
|
|
13
|
+
if (!ctx) {
|
|
14
|
+
throw new Error('An actions-menu item must be rendered inside <ActionsMenu>.');
|
|
15
|
+
}
|
|
16
|
+
return ctx;
|
|
17
|
+
}
|
|
18
|
+
/** Long enough for the dialog's close animation to finish before it unmounts. */
|
|
19
|
+
const OVERLAY_UNMOUNT_DELAY_MS = 200;
|
|
20
|
+
function OverlayEntry({ render, onDone }) {
|
|
21
|
+
const [open, setOpen] = React.useState(true);
|
|
22
|
+
const handleOpenChange = (next) => {
|
|
23
|
+
setOpen(next);
|
|
24
|
+
if (!next) {
|
|
25
|
+
setTimeout(onDone, OVERLAY_UNMOUNT_DELAY_MS);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return _jsx(_Fragment, { children: render({ open, onOpenChange: handleOpenChange }) });
|
|
29
|
+
}
|
|
30
|
+
export function ActionsMenu({ children, label = 'More actions', emptyLabel = 'No actions available', }) {
|
|
31
|
+
const [open, setOpen] = React.useState(false);
|
|
32
|
+
const [overlays, setOverlays] = React.useState([]);
|
|
33
|
+
const [holds, setHolds] = React.useState(0);
|
|
34
|
+
const closeMenu = React.useCallback(() => setOpen(false), []);
|
|
35
|
+
const showOverlay = React.useCallback((id, render) => {
|
|
36
|
+
setOverlays((prev) => [...prev.filter((o) => o.id !== id), { id, render }]);
|
|
37
|
+
}, []);
|
|
38
|
+
const removeOverlay = React.useCallback((id) => {
|
|
39
|
+
setOverlays((prev) => prev.filter((o) => o.id !== id));
|
|
40
|
+
}, []);
|
|
41
|
+
const holdOpen = React.useCallback(() => {
|
|
42
|
+
setHolds((count) => count + 1);
|
|
43
|
+
let released = false;
|
|
44
|
+
return () => {
|
|
45
|
+
if (released)
|
|
46
|
+
return;
|
|
47
|
+
released = true;
|
|
48
|
+
setHolds((count) => count - 1);
|
|
49
|
+
};
|
|
50
|
+
}, []);
|
|
51
|
+
const handleOpenChange = (next) => {
|
|
52
|
+
if (!next && holds > 0)
|
|
53
|
+
return;
|
|
54
|
+
setOpen(next);
|
|
55
|
+
};
|
|
56
|
+
const ctx = React.useMemo(() => ({ closeMenu, showOverlay, holdOpen }), [closeMenu, showOverlay, holdOpen]);
|
|
57
|
+
const actions = React.Children.toArray(children);
|
|
58
|
+
return (_jsxs(ActionsMenuContext.Provider, { value: ctx, children: [_jsxs(DropdownMenu, { open: open, onOpenChange: handleOpenChange, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "default", size: "icon", "aria-label": label, children: _jsx(MoreHorizontal, { className: "icon-xs" }) }) }), _jsx(DropdownMenuContent, { align: "end", variant: "actions", children: actions.length > 0 ? (children) : (_jsx(DropdownMenuItem, { disabled: true, children: emptyLabel })) })] }), overlays.map((o) => (_jsx(OverlayEntry, { render: o.render, onDone: () => removeOverlay(o.id) }, o.id)))] }));
|
|
59
|
+
}
|
|
60
|
+
export function ActionMenuItem({ icon, label, onSelect, disabled }) {
|
|
61
|
+
const { closeMenu } = useActionsMenu();
|
|
62
|
+
const handleSelect = (event) => {
|
|
63
|
+
// preventDefault keeps Radix from unmounting the item mid-handler.
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
closeMenu();
|
|
66
|
+
onSelect();
|
|
67
|
+
};
|
|
68
|
+
return (_jsx(DropdownMenuItem, { className: "cursor-pointer", disabled: disabled, icon: icon, onSelect: handleSelect, children: label }));
|
|
69
|
+
}
|
|
70
|
+
export function AsyncActionMenuItem({ icon, label, onSelect, onError, disabled, }) {
|
|
71
|
+
const { closeMenu, holdOpen } = useActionsMenu();
|
|
72
|
+
const { run, pending } = useAsyncAction(onSelect, { onError });
|
|
73
|
+
const runningRef = React.useRef(false);
|
|
74
|
+
const handleSelect = (event) => {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
if (runningRef.current)
|
|
77
|
+
return;
|
|
78
|
+
runningRef.current = true;
|
|
79
|
+
const release = holdOpen();
|
|
80
|
+
void run().then(() => {
|
|
81
|
+
runningRef.current = false;
|
|
82
|
+
release();
|
|
83
|
+
closeMenu();
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
return (_jsx(DropdownMenuItem, { className: "cursor-pointer", disabled: disabled, pending: pending, icon: icon, onSelect: handleSelect, children: label }));
|
|
87
|
+
}
|
|
88
|
+
export function OverlayActionItem({ icon, label, render, disabled, pending, }) {
|
|
89
|
+
const { closeMenu, showOverlay } = useActionsMenu();
|
|
90
|
+
const overlayId = React.useId();
|
|
91
|
+
const handleSelect = (event) => {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
closeMenu();
|
|
94
|
+
showOverlay(overlayId, render);
|
|
95
|
+
};
|
|
96
|
+
return (_jsx(DropdownMenuItem, { className: "cursor-pointer", disabled: disabled, pending: pending, icon: icon, onSelect: handleSelect, children: label }));
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=actions-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions-menu.js","sourceRoot":"","sources":["../../../src/react/components/actions-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,uGAAuG;AACvG,mFAAmF;AAEnF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAa9D,MAAM,kBAAkB,GAAG,KAAK,CAAC,aAAa,CAAiC,IAAI,CAAC,CAAC;AAErF,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;IACjD,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,iFAAiF;AACjF,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAErC,SAAS,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,EAAiD;IACrF,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7C,MAAM,gBAAgB,GAAG,CAAC,IAAa,EAAE,EAAE;QACzC,OAAO,CAAC,IAAI,CAAC,CAAC;QACd,I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AAC","sourcesContent":["'use client';\n\n// Dialogs render in the overlay slot, a sibling of the menu: the default-modal Radix DropdownMenu sets\n// `pointer-events: none` on the page, and closing it unmounts its content subtree.\n\nimport * as React from 'react';\nimport { MoreHorizontal } from 'lucide-react';\n\nimport { Button } from './button.js';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from './dropdown-menu.js';\nimport { useAsyncAction } from '../hooks/use-async-action.js';\n\nexport type OverlayRender = (props: {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n}) => React.ReactNode;\n\nexport interface ActionsMenuContextValue {\n closeMenu: () => void;\n showOverlay: (id: string, render: OverlayRender) => void;\n holdOpen: () => () => void;\n}\n\nconst ActionsMenuContext = React.createContext<ActionsMenuContextValue | null>(null);\n\nexport function useActionsMenu(): ActionsMenuContextValue {\n const ctx = React.useContext(ActionsMenuContext);\n if (!ctx) {\n throw new Error('An actions-menu item must be rendered inside <ActionsMenu>.');\n }\n return ctx;\n}\n\n/** Long enough for the dialog's close animation to finish before it unmounts. */\nconst OVERLAY_UNMOUNT_DELAY_MS = 200;\n\nfunction OverlayEntry({ render, onDone }: { render: OverlayRender; onDone: () => void }) {\n const [open, setOpen] = React.useState(true);\n const handleOpenChange = (next: boolean) => {\n setOpen(next);\n if (!next) {\n setTimeout(onDone, OVERLAY_UNMOUNT_DELAY_MS);\n }\n };\n return <>{render({ open, onOpenChange: handleOpenChange })}</>;\n}\n\nexport interface ActionsMenuProps {\n children?: React.ReactNode;\n label?: string;\n emptyLabel?: string;\n}\n\nexport function ActionsMenu({\n children,\n label = 'More actions',\n emptyLabel = 'No actions available',\n}: ActionsMenuProps) {\n const [open, setOpen] = React.useState(false);\n const [overlays, setOverlays] = React.useState<Array<{ id: string; render: OverlayRender }>>([]);\n const [holds, setHolds] = React.useState(0);\n\n const closeMenu = React.useCallback(() => setOpen(false), []);\n const showOverlay = React.useCallback((id: string, render: OverlayRender) => {\n setOverlays((prev) => [...prev.filter((o) => o.id !== id), { id, render }]);\n }, []);\n const removeOverlay = React.useCallback((id: string) => {\n setOverlays((prev) => prev.filter((o) => o.id !== id));\n }, []);\n const holdOpen = React.useCallback(() => {\n setHolds((count) => count + 1);\n let released = false;\n return () => {\n if (released) return;\n released = true;\n setHolds((count) => count - 1);\n };\n }, []);\n\n const handleOpenChange = (next: boolean) => {\n if (!next && holds > 0) return;\n setOpen(next);\n };\n\n const ctx = React.useMemo<ActionsMenuContextValue>(\n () => ({ closeMenu, showOverlay, holdOpen }),\n [closeMenu, showOverlay, holdOpen],\n );\n\n const actions = React.Children.toArray(children);\n return (\n <ActionsMenuContext.Provider value={ctx}>\n <DropdownMenu open={open} onOpenChange={handleOpenChange}>\n <DropdownMenuTrigger asChild>\n <Button variant=\"default\" size=\"icon\" aria-label={label}>\n <MoreHorizontal className=\"icon-xs\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" variant=\"actions\">\n {actions.length > 0 ? (\n children\n ) : (\n <DropdownMenuItem disabled>{emptyLabel}</DropdownMenuItem>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n {overlays.map((o) => (\n <OverlayEntry key={o.id} render={o.render} onDone={() => removeOverlay(o.id)} />\n ))}\n </ActionsMenuContext.Provider>\n );\n}\n\nexport interface ActionMenuItemProps {\n icon?: React.ReactNode;\n label: string;\n onSelect: () => void;\n disabled?: boolean;\n}\n\nexport function ActionMenuItem({ icon, label, onSelect, disabled }: ActionMenuItemProps) {\n const { closeMenu } = useActionsMenu();\n\n const handleSelect = (event: Event) => {\n // preventDefault keeps Radix from unmounting the item mid-handler.\n event.preventDefault();\n closeMenu();\n onSelect();\n };\n\n return (\n <DropdownMenuItem\n className=\"cursor-pointer\"\n disabled={disabled}\n icon={icon}\n onSelect={handleSelect}\n >\n {label}\n </DropdownMenuItem>\n );\n}\n\nexport interface AsyncActionMenuItemProps {\n icon?: React.ReactNode;\n label: string;\n onSelect: () => Promise<unknown>;\n onError: (error: unknown) => void;\n disabled?: boolean;\n}\n\nexport function AsyncActionMenuItem({\n icon,\n label,\n onSelect,\n onError,\n disabled,\n}: AsyncActionMenuItemProps) {\n const { closeMenu, holdOpen } = useActionsMenu();\n const { run, pending } = useAsyncAction(onSelect, { onError });\n const runningRef = React.useRef(false);\n\n const handleSelect = (event: Event) => {\n event.preventDefault();\n if (runningRef.current) return;\n runningRef.current = true;\n const release = holdOpen();\n void run().then(() => {\n runningRef.current = false;\n release();\n closeMenu();\n });\n };\n\n return (\n <DropdownMenuItem\n className=\"cursor-pointer\"\n disabled={disabled}\n pending={pending}\n icon={icon}\n onSelect={handleSelect}\n >\n {label}\n </DropdownMenuItem>\n );\n}\n\nexport interface OverlayActionItemProps {\n icon?: React.ReactNode;\n label: string;\n render: OverlayRender;\n disabled?: boolean;\n pending?: boolean;\n}\n\nexport function OverlayActionItem({\n icon,\n label,\n render,\n disabled,\n pending,\n}: OverlayActionItemProps) {\n const { closeMenu, showOverlay } = useActionsMenu();\n const overlayId = React.useId();\n\n const handleSelect = (event: Event) => {\n event.preventDefault();\n closeMenu();\n showOverlay(overlayId, render);\n };\n\n return (\n <DropdownMenuItem\n className=\"cursor-pointer\"\n disabled={disabled}\n pending={pending}\n icon={icon}\n onSelect={handleSelect}\n >\n {label}\n </DropdownMenuItem>\n );\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "success" | "outline" | "secondary" | "ghost" | "inverted" | null | undefined;
|
|
5
|
-
size?: "sm" | "lg" | "default" | "icon" | null | undefined;
|
|
5
|
+
size?: "sm" | "lg" | "default" | "icon" | "action" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,QAAA,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAOlE,QAAA,MAAM,cAAc;;;8EAmCnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,QAAA,MAAM,MAAM,uFAgEX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { cn } from '../../lib/utils.js';
|
|
|
7
7
|
import { Spinner } from './spinner.js';
|
|
8
8
|
import { blockActivationKey, blockEvent } from './pending-guard.js';
|
|
9
9
|
// `ui-button` is the stable class an app's stylesheet keys every button rule on.
|
|
10
|
-
const buttonVariants = cva('ui-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md
|
|
10
|
+
const buttonVariants = cva('ui-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-bold ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50', {
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
13
|
default: 'button-default bg-primary text-primary-foreground hover:bg-primary/90 border-2 border-[hsl(var(--brand-primary-deep))]',
|
|
@@ -19,11 +19,14 @@ const buttonVariants = cva('ui-button inline-flex items-center justify-center ga
|
|
|
19
19
|
link: 'ui-button-link text-primary underline-offset-4 hover:underline',
|
|
20
20
|
inverted: 'bg-[hsl(var(--inverted-background))] text-[hsl(var(--inverted-foreground))] hover:bg-[hsl(var(--inverted-background))]/90 border-2 border-[hsl(var(--inverted-border))]',
|
|
21
21
|
},
|
|
22
|
+
// The action size carries theme-core's primary-action-button recipe class (full width, large
|
|
23
|
+
// type, tall padding) in place of a built-in height and type size it would lose to.
|
|
22
24
|
size: {
|
|
23
|
-
default: 'h-10 px-4 py-2',
|
|
24
|
-
sm: 'h-9 rounded-md px-3',
|
|
25
|
-
lg: 'h-11 rounded-md px-8',
|
|
26
|
-
icon: 'h-9 w-9',
|
|
25
|
+
default: 'h-10 px-4 py-2 text-sm',
|
|
26
|
+
sm: 'h-9 rounded-md px-3 text-sm',
|
|
27
|
+
lg: 'h-11 rounded-md px-8 text-sm',
|
|
28
|
+
icon: 'h-9 w-9 text-sm',
|
|
29
|
+
action: 'px-4 primary-action-button',
|
|
27
30
|
},
|
|
28
31
|
},
|
|
29
32
|
defaultVariants: {
|
|
@@ -47,7 +50,7 @@ const Button = React.forwardRef(({ className, variant, size, asChild = false, pe
|
|
|
47
50
|
disabled: (disabled && !pending) || undefined,
|
|
48
51
|
className: cn(buttonVariants({ variant, size, className })),
|
|
49
52
|
};
|
|
50
|
-
const spinner = _jsx(Spinner, { size: size === 'lg' ? 'sm' : 'xs' });
|
|
53
|
+
const spinner = _jsx(Spinner, { size: size === 'lg' || size === 'action' ? 'sm' : 'xs' });
|
|
51
54
|
const leading = pending ? spinner : icon;
|
|
52
55
|
if (asChild) {
|
|
53
56
|
// Radix Slot finds the Slottable among its direct children, so these are siblings, never a fragment.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,iFAAiF;AACjF,MAAM,cAAc,GAAG,GAAG,CACxB,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/react/components/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,iFAAiF;AACjF,MAAM,cAAc,GAAG,GAAG,CACxB,2VAA2V,EAC3V;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,wHAAwH;YAC1H,WAAW,EACT,qHAAqH;YACvH,OAAO,EACL,sKAAsK;YACxK,OAAO,EACL,mGAAmG;YACrG,SAAS,EACP,qFAAqF;YACvF,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,gEAAgE;YACtE,QAAQ,EACN,yKAAyK;SAC5K;QACD,6FAA6F;QA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,CAAC,CAAC,CACf,MAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,aACvB,OAAO,EACR,KAAC,SAAS,cAAE,QAAQ,GAAa,IAC5B,CACR,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,IAAC,GAAG,EAAE,GAAG,KAAM,MAAM,YACvB,QAAQ,GACJ,CACR,CAAC;IACJ,CAAC;IAED,OAAO,CACL,iBAAQ,GAAG,EAAE,GAAG,KAAM,MAAM,YACzB,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,CACjB,OAAO,CAAC,CAAC,CAAC,CACR,OAAO,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CACF,CAAC,CAAC,CAAC,CACF,8BACG,OAAO,EACP,QAAQ,IACR,CACJ,GACM,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\nimport { Spinner } from './spinner.js';\nimport { blockActivationKey, blockEvent } from './pending-guard.js';\n\n// `ui-button` is the stable class an app's stylesheet keys every button rule on.\nconst buttonVariants = cva(\n 'ui-button inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-bold ring-offset-background transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'button-default bg-primary text-primary-foreground hover:bg-primary/90 border-2 border-[hsl(var(--brand-primary-deep))]',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 border-2 border-[hsl(var(--destructive-border))]',\n success:\n 'bg-[color:var(--button-success)] text-[hsl(var(--success-foreground))] hover:bg-[color:var(--button-success)]/90 border-2 border-[hsl(var(--status-success-border))]',\n outline:\n 'border-2 border-border bg-background hover:bg-accent hover:text-accent-foreground text-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:bg-secondary/80 border-2 border-border',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'ui-button-link text-primary underline-offset-4 hover:underline',\n inverted:\n 'bg-[hsl(var(--inverted-background))] text-[hsl(var(--inverted-foreground))] hover:bg-[hsl(var(--inverted-background))]/90 border-2 border-[hsl(var(--inverted-border))]',\n },\n // The action size carries theme-core's primary-action-button recipe class (full width, large\n // type, tall padding) in place of a built-in height and type size it would lose to.\n size: {\n default: 'h-10 px-4 py-2 text-sm',\n sm: 'h-9 rounded-md px-3 text-sm',\n lg: 'h-11 rounded-md px-8 text-sm',\n icon: 'h-9 w-9 text-sm',\n action: 'px-4 primary-action-button',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n pending?: boolean;\n icon?: React.ReactNode;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n pending = false,\n icon,\n disabled,\n children,\n ...props\n },\n ref,\n ) => {\n const shared = {\n ...props,\n ...(pending\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'data-pending': '',\n onClickCapture: blockEvent,\n onPointerDownCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {}),\n disabled: (disabled && !pending) || undefined,\n className: cn(buttonVariants({ variant, size, className })),\n };\n const spinner = <Spinner size={size === 'lg' || size === 'action' ? 'sm' : 'xs'} />;\n const leading = pending ? spinner : icon;\n\n if (asChild) {\n // Radix Slot finds the Slottable among its direct children, so these are siblings, never a fragment.\n return leading ? (\n <Slot ref={ref} {...shared}>\n {leading}\n <Slottable>{children}</Slottable>\n </Slot>\n ) : (\n <Slot ref={ref} {...shared}>\n {children}\n </Slot>\n );\n }\n\n return (\n <button ref={ref} {...shared}>\n {size === 'icon' ? (\n pending ? (\n spinner\n ) : (\n children\n )\n ) : (\n <>\n {leading}\n {children}\n </>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants };\n"]}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
declare const
|
|
4
|
-
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
+
variant?: "default" | "page" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
7
|
+
variant?: "default" | "page" | "pageLeft" | null | undefined;
|
|
8
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & VariantProps<(props?: ({
|
|
10
|
+
variant?: "default" | "page" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLParagraphElement>>;
|
|
5
12
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
6
|
-
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> &
|
|
13
|
+
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
14
|
+
variant?: "default" | "page" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
7
16
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
17
|
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
9
18
|
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/react/components/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/react/components/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AA+ClE,QAAA,MAAM,IAAI;;sHAKR,CAAC;AAGH,QAAA,MAAM,UAAU;;sHAKd,CAAC;AAGH,QAAA,MAAM,SAAS;;4HAKb,CAAC;AAGH,QAAA,MAAM,eAAe,yHAKnB,CAAC;AAGH,QAAA,MAAM,WAAW;;sHAKf,CAAC;AAGH,QAAA,MAAM,UAAU,6GAIf,CAAC;AAGF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,16 +1,56 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from 'react';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
4
5
|
import { cn } from '../../lib/utils.js';
|
|
5
|
-
|
|
6
|
+
// A page variant carries theme-core's page-card recipe class in place of the built-in utilities it
|
|
7
|
+
// would otherwise lose to: the utilities layer outranks every layered sheet.
|
|
8
|
+
const cardVariants = cva('', {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: 'rounded-lg border-2 card-border bg-card text-card-foreground',
|
|
12
|
+
page: 'page-card',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { variant: 'default' },
|
|
16
|
+
});
|
|
17
|
+
const cardHeaderVariants = cva('flex flex-col space-y-1.5', {
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: 'p-6',
|
|
21
|
+
page: 'page-card-header',
|
|
22
|
+
pageLeft: 'page-card-header-left',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: { variant: 'default' },
|
|
26
|
+
});
|
|
27
|
+
const cardTitleVariants = cva('break-words', {
|
|
28
|
+
variants: {
|
|
29
|
+
variant: {
|
|
30
|
+
default: 'text-2xl font-semibold leading-none tracking-tight card-title',
|
|
31
|
+
page: 'page-card-title',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: { variant: 'default' },
|
|
35
|
+
});
|
|
36
|
+
const cardContentVariants = cva('', {
|
|
37
|
+
variants: {
|
|
38
|
+
variant: {
|
|
39
|
+
default: 'p-6 pt-0',
|
|
40
|
+
page: 'page-card-content',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
defaultVariants: { variant: 'default' },
|
|
44
|
+
});
|
|
45
|
+
const Card = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(cardVariants({ variant }), className), ...props })));
|
|
6
46
|
Card.displayName = 'Card';
|
|
7
|
-
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(
|
|
47
|
+
const CardHeader = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(cardHeaderVariants({ variant }), className), ...props })));
|
|
8
48
|
CardHeader.displayName = 'CardHeader';
|
|
9
|
-
const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn(
|
|
49
|
+
const CardTitle = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("h3", { ref: ref, className: cn(cardTitleVariants({ variant }), className), ...props })));
|
|
10
50
|
CardTitle.displayName = 'CardTitle';
|
|
11
51
|
const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("p", { ref: ref, className: cn('break-words card-description', className), ...props })));
|
|
12
52
|
CardDescription.displayName = 'CardDescription';
|
|
13
|
-
const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(
|
|
53
|
+
const CardContent = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx("div", { ref: ref, className: cn(cardContentVariants({ variant }), className), ...props })));
|
|
14
54
|
CardContent.displayName = 'CardContent';
|
|
15
55
|
const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
|
|
16
56
|
CardFooter.displayName = 'CardFooter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/react/components/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,IAAI,GAAG,KAAK,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/react/components/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,mGAAmG;AACnG,6EAA6E;AAE7E,MAAM,YAAY,GAAG,GAAG,CAAC,EAAE,EAAE;IAC3B,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,8DAA8D;YACvE,IAAI,EAAE,WAAW;SA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AC,CAChC,cAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACrF,CACF,CAAC;AACF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils.js';\n\n// A page variant carries theme-core's page-card recipe class in place of the built-in utilities it\n// would otherwise lose to: the utilities layer outranks every layered sheet.\n\nconst cardVariants = cva('', {\n variants: {\n variant: {\n default: 'rounded-lg border-2 card-border bg-card text-card-foreground',\n page: 'page-card',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst cardHeaderVariants = cva('flex flex-col space-y-1.5', {\n variants: {\n variant: {\n default: 'p-6',\n page: 'page-card-header',\n pageLeft: 'page-card-header-left',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst cardTitleVariants = cva('break-words', {\n variants: {\n variant: {\n default: 'text-2xl font-semibold leading-none tracking-tight card-title',\n page: 'page-card-title',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst cardContentVariants = cva('', {\n variants: {\n variant: {\n default: 'p-6 pt-0',\n page: 'page-card-content',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst Card = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardVariants>\n>(({ className, variant, ...props }, ref) => (\n <div ref={ref} className={cn(cardVariants({ variant }), className)} {...props} />\n));\nCard.displayName = 'Card';\n\nconst CardHeader = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardHeaderVariants>\n>(({ className, variant, ...props }, ref) => (\n <div ref={ref} className={cn(cardHeaderVariants({ variant }), className)} {...props} />\n));\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLHeadingElement> & VariantProps<typeof cardTitleVariants>\n>(({ className, variant, ...props }, ref) => (\n <h3 ref={ref} className={cn(cardTitleVariants({ variant }), className)} {...props} />\n));\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn('break-words card-description', className)} {...props} />\n));\nCardDescription.displayName = 'CardDescription';\n\nconst CardContent = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof cardContentVariants>\n>(({ className, variant, ...props }, ref) => (\n <div ref={ref} className={cn(cardContentVariants({ variant }), className)} {...props} />\n));\nCardContent.displayName = 'CardContent';\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('flex items-center p-6 pt-0', className)} {...props} />\n ),\n);\nCardFooter.displayName = 'CardFooter';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
4
|
declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
|
|
4
5
|
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
6
|
declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
@@ -14,7 +15,9 @@ declare const DialogFooter: {
|
|
|
14
15
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
15
16
|
displayName: string;
|
|
16
17
|
};
|
|
17
|
-
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> &
|
|
18
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & VariantProps<(props?: ({
|
|
19
|
+
variant?: "default" | "page" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLHeadingElement>>;
|
|
18
21
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
19
22
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
|
20
23
|
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/react/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../src/react/components/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,MAAM,uCAAuB,CAAC;AACpC,QAAA,MAAM,aAAa,8GAA0B,CAAC;AAC9C,QAAA,MAAM,YAAY,6CAAyB,CAAC;AAC5C,QAAA,MAAM,WAAW,4GAAwB,CAAC;AAE1C,QAAA,MAAM,aAAa,8JAYjB,CAAC;AAGH,QAAA,MAAM,aAAa,8JA0BjB,CAAC;AAGH,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAElF,CAAC;AAGF,QAAA,MAAM,YAAY;8BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;;CAKlF,CAAC;AAeF,QAAA,MAAM,WAAW;;0HAUf,CAAC;AAGH,QAAA,MAAM,iBAAiB,8KASrB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
5
|
import { X } from 'lucide-react';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
6
7
|
import { cn } from '../../lib/utils.js';
|
|
7
8
|
import { useOpenerFocus } from './opener-focus.js';
|
|
8
9
|
const Dialog = DialogPrimitive.Root;
|
|
@@ -20,7 +21,18 @@ const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('
|
|
|
20
21
|
DialogHeader.displayName = 'DialogHeader';
|
|
21
22
|
const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
|
|
22
23
|
DialogFooter.displayName = 'DialogFooter';
|
|
23
|
-
|
|
24
|
+
// The page variant carries theme-core's page-card-title recipe class in place of the built-in
|
|
25
|
+
// size, weight and leading it would otherwise lose to.
|
|
26
|
+
const dialogTitleVariants = cva('break-words', {
|
|
27
|
+
variants: {
|
|
28
|
+
variant: {
|
|
29
|
+
default: 'text-lg font-semibold leading-none tracking-tight',
|
|
30
|
+
page: 'page-card-title',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: { variant: 'default' },
|
|
34
|
+
});
|
|
35
|
+
const DialogTitle = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn(dialogTitleVariants({ variant }), className), ...props })));
|
|
24
36
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
25
37
|
const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-sm text-muted-foreground break-words', className), ...props })));
|
|
26
38
|
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/react/components/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/react/components/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AACpC,MAAM,aAAa,GAAG,eAAe,CAAC,OAAO,CAAC;AAC9C,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,CAAC;AAC5C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAA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EACb,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { X } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\nimport { useOpenerFocus } from './opener-focus.js';\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-[color:var(--scrim)] duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, onOpenAutoFocus, onCloseAutoFocus, ...props }, ref) => {\n const openerFocus = useOpenerFocus({ onOpenAutoFocus, onCloseAutoFocus });\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-card p-6 elevation-raised duration-[var(--motion-base)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg',\n 'max-h-[90vh] overflow-y-auto [&>*]:min-w-0',\n className,\n )}\n {...props}\n {...openerFocus}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n});\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\n// The page variant carries theme-core's page-card-title recipe class in place of the built-in\n// size, weight and leading it would otherwise lose to.\nconst dialogTitleVariants = cva('break-words', {\n variants: {\n variant: {\n default: 'text-lg font-semibold leading-none tracking-tight',\n page: 'page-card-title',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title> &\n VariantProps<typeof dialogTitleVariants>\n>(({ className, variant, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(dialogTitleVariants({ variant }), className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-muted-foreground break-words', className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
4
|
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
5
|
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
6
|
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -10,7 +11,9 @@ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<Dropd
|
|
|
10
11
|
inset?: boolean;
|
|
11
12
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
13
|
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> &
|
|
14
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & VariantProps<(props?: ({
|
|
15
|
+
variant?: "default" | "actions" | null | undefined;
|
|
16
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
14
17
|
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
18
|
inset?: boolean;
|
|
16
19
|
pending?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AAGvE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,YAAY,mDAA6B,CAAC;AAChD,QAAA,MAAM,mBAAmB,0HAAgC,CAAC;AAC1D,QAAA,MAAM,iBAAiB,qHAA8B,CAAC;AACtD,QAAA,MAAM,kBAAkB,yDAA+B,CAAC;AACxD,QAAA,MAAM,eAAe,sDAA4B,CAAC;AAClD,QAAA,MAAM,sBAAsB,0HAAmC,CAAC;AAEhE,QAAA,MAAM,sBAAsB;YAGhB,OAAO;wCAejB,CAAC;AAGH,QAAA,MAAM,sBAAsB,6KAY1B,CAAC;AAkBH,QAAA,MAAM,mBAAmB;;sHAavB,CAAC;AASH,QAAA,MAAM,gBAAgB;YAGV,OAAO;cACL,OAAO;WACV,KAAK,CAAC,SAAS;wCAyBxB,CAAC;AAGH,QAAA,MAAM,wBAAwB,+KAoB5B,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KAmBzB,CAAC;AAGH,QAAA,MAAM,iBAAiB;YAGX,OAAO;wCAQjB,CAAC;AAGH,QAAA,MAAM,qBAAqB,4KASzB,CAAC;AAGH,QAAA,MAAM,oBAAoB;8BAA6B,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;;CAE3F,CAAC;AAGF,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC"}
|
|
@@ -4,6 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
5
5
|
import { Slottable } from '@radix-ui/react-slot';
|
|
6
6
|
import { Check, ChevronRight, Circle } from 'lucide-react';
|
|
7
|
+
import { cva } from 'class-variance-authority';
|
|
7
8
|
import { cn } from '../../lib/utils.js';
|
|
8
9
|
import { Spinner } from './spinner.js';
|
|
9
10
|
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
@@ -16,7 +17,18 @@ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, .
|
|
|
16
17
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
17
18
|
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-raised duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', className), ...props })));
|
|
18
19
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
19
|
-
|
|
20
|
+
// The actions variant carries theme-core's app-dropdown-menu recipe class (its width and heavier
|
|
21
|
+
// border) in place of the built-in border width it would otherwise lose to.
|
|
22
|
+
const dropdownMenuContentVariants = cva('z-50 min-w-[8rem] overflow-hidden rounded-md !bg-card p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', {
|
|
23
|
+
variants: {
|
|
24
|
+
variant: {
|
|
25
|
+
default: 'border',
|
|
26
|
+
actions: 'border-2 app-dropdown-menu',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: { variant: 'default' },
|
|
30
|
+
});
|
|
31
|
+
const DropdownMenuContent = React.forwardRef(({ className, variant, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn(dropdownMenuContentVariants({ variant }), className), ...props }) })));
|
|
20
32
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
21
33
|
// Every selection — a pointer, Enter, or Space — reaches the item as a click, so the capture-phase stop keeps its select from running.
|
|
22
34
|
function blockActivation(event) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM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BAAsB,GACvB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Slottable } from '@radix-ui/react-slot';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\nimport { Spinner } from './spinner.js';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-raised duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border !bg-card p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n// Every selection — a pointer, Enter, or Space — reaches the item as a click, so the capture-phase stop keeps its select from running.\nfunction blockActivation(event: React.MouseEvent<HTMLElement>) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n pending?: boolean;\n icon?: React.ReactNode;\n }\n>(({ className, inset, pending = false, icon, disabled, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 app-dropdown-item',\n inset && 'pl-8',\n className,\n )}\n {...props}\n {...(pending\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'data-pending': '',\n onClickCapture: blockActivation,\n }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {/* Radix Slot finds the Slottable among its direct children, so these are siblings, never a fragment. */}\n {pending ? <Spinner size=\"xs\" /> : icon}\n <Slottable>{children}</Slottable>\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n);\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sourceRoot":"","sources":["../../../src/react/components/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,YAAY,GAAG,qBAAqB,CAAC,IAAI,CAAC;AAChD,MAAM,mBAAmB,GAAG,qBAAqB,CAAC,OAAO,CAAC;AAC1D,MAAM,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAC;AACtD,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,MAAM,CAAC;AACxD,MAAM,eAAe,GAAG,qBAAqB,CAAC,GAAG,CAAC;AAClD,MAAM,sBAAsB,GAAG,qBAAqB,CAAC,UAAU,CAAC;AAEhE,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAK7C,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnD,MAAC,qBAAqB,CAAC,UAAU,IAC/B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,0MAA0M,EAC1M,KAAK,IAAI,MAAM,EACf,SAAS,CACV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CAAC,SAAS,IAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,qBAAqB,CAAC,WAAW,GAAG,qBAAqB,CAAC,SAAS,CAAC,WAAW,CAAC;AAEhF,MAAM,oBAAoB,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAyC,EAAE,EAAE,CAAC,CAC/F,eAAM,SAAS,EAAE,EAAE,CAAC,4CAA4C,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAC5F,CAAC;AACF,oBAAoB,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAE1D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,qBAAqB,EACrB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Slottable } from '@radix-ui/react-slot';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\nimport { Spinner } from './spinner.js';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default gap-2 select-none items-center rounded-xs px-2 py-1.5 text-sm outline-hidden focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground elevation-raised duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\n// The actions variant carries theme-core's app-dropdown-menu recipe class (its width and heavier\n// border) in place of the built-in border width it would otherwise lose to.\nconst dropdownMenuContentVariants = cva(\n 'z-50 min-w-[8rem] overflow-hidden rounded-md !bg-card p-1 text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n {\n variants: {\n variant: {\n default: 'border',\n actions: 'border-2 app-dropdown-menu',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n);\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> &\n VariantProps<typeof dropdownMenuContentVariants>\n>(({ className, variant, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(dropdownMenuContentVariants({ variant }), className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\n// Every selection — a pointer, Enter, or Space — reaches the item as a click, so the capture-phase stop keeps its select from running.\nfunction blockActivation(event: React.MouseEvent<HTMLElement>) {\n event.preventDefault();\n event.stopPropagation();\n}\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n pending?: boolean;\n icon?: React.ReactNode;\n }\n>(({ className, inset, pending = false, icon, disabled, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-2 rounded-xs px-2 py-1.5 text-sm outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 app-dropdown-item',\n inset && 'pl-8',\n className,\n )}\n {...props}\n {...(pending\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'data-pending': '',\n onClickCapture: blockActivation,\n }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {/* Radix Slot finds the Slottable among its direct children, so these are siblings, never a fragment. */}\n {pending ? <Spinner size=\"xs\" /> : icon}\n <Slottable>{children}</Slottable>\n </DropdownMenuPrimitive.Item>\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2 w-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n);\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
3
|
import { type VariantProps } from 'class-variance-authority';
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?:
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: ({
|
|
5
|
+
variant?: "label" | "small" | "default" | "caption" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
7
|
export { Label };
|
|
6
8
|
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/react/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../src/react/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAkBlE,QAAA,MAAM,KAAK;;wHAKT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -4,8 +4,20 @@ import * as React from 'react';
|
|
|
4
4
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { cn } from '../../lib/utils.js';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
// Each text look is theme-core's text class, in place of the built-in size, weight and leading it
|
|
8
|
+
// would otherwise lose to.
|
|
9
|
+
const labelVariants = cva('peer-disabled:cursor-not-allowed peer-disabled:opacity-70', {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: 'text-sm font-bold leading-none',
|
|
13
|
+
caption: 'text-caption',
|
|
14
|
+
small: 'text-small',
|
|
15
|
+
label: 'text-label',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { variant: 'default' },
|
|
19
|
+
});
|
|
20
|
+
const Label = React.forwardRef(({ className, variant, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants({ variant }), className), ...props })));
|
|
9
21
|
Label.displayName = LabelPrimitive.Root.displayName;
|
|
10
22
|
export { Label };
|
|
11
23
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/react/components/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,aAAa,GAAG,GAAG,
|
|
1
|
+
{"version":3,"file":"label.js","sourceRoot":"","sources":["../../../src/react/components/label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,kGAAkG;AAClG,2BAA2B;AAC3B,MAAM,aAAa,GAAG,GAAG,CAAC,2DAA2D,EAAE;IACrF,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,gCAAgC;YACzC,OAAO,EAAE,cAAc;YACvB,KAAK,EAAE,YAAY;YACnB,KAAK,EAAE,YAAY;SACpB;KACF;IACD,eAAe,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAG5B,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAC3C,KAAC,cAAc,CAAC,IAAI,IAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CACnG,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as LabelPrimitive from '@radix-ui/react-label';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\n\n// Each text look is theme-core's text class, in place of the built-in size, weight and leading it\n// would otherwise lose to.\nconst labelVariants = cva('peer-disabled:cursor-not-allowed peer-disabled:opacity-70', {\n variants: {\n variant: {\n default: 'text-sm font-bold leading-none',\n caption: 'text-caption',\n small: 'text-small',\n label: 'text-label',\n },\n },\n defaultVariants: { variant: 'default' },\n});\n\nconst Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & VariantProps<typeof labelVariants>\n>(({ className, variant, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants({ variant }), className)} {...props} />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n\nexport { Label };\n"]}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
4
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
4
5
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
-
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
7
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & VariantProps<(props?: ({
|
|
8
|
+
variant?: "filter" | "default" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
|
|
7
10
|
pending?: boolean;
|
|
8
11
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
9
12
|
declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAG1D,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMlE,QAAA,MAAM,MAAM,uCAAuB,CAAC;AACpC,QAAA,MAAM,WAAW,yGAAwB,CAAC;AAC1C,QAAA,MAAM,WAAW,0GAAwB,CAAC;AAiB1C,QAAA,MAAM,aAAa;;;cAIH,OAAO;2CA4BrB,CAAC;AAGH,QAAA,MAAM,oBAAoB,qKAWxB,CAAC;AAGH,QAAA,MAAM,sBAAsB,uKAW1B,CAAC;AAGH,QAAA,MAAM,aAAa,8JA6BjB,CAAC;AAGH,QAAA,MAAM,WAAW,4JASf,CAAC;AAGH,QAAA,MAAM,UAAU,2JAoBd,CAAC;AAGH,QAAA,MAAM,eAAe,gKASnB,CAAC;AAGH,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC"}
|
|
@@ -3,13 +3,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
5
|
import { Check, ChevronDown, ChevronUp } from 'lucide-react';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
6
7
|
import { cn } from '../../lib/utils.js';
|
|
7
8
|
import { Spinner } from './spinner.js';
|
|
8
9
|
import { blockActivationKey, blockEvent } from './pending-guard.js';
|
|
9
10
|
const Select = SelectPrimitive.Root;
|
|
10
11
|
const SelectGroup = SelectPrimitive.Group;
|
|
11
12
|
const SelectValue = SelectPrimitive.Value;
|
|
12
|
-
|
|
13
|
+
// The filter variant carries theme-core's filter-select-trigger recipe class in place of the
|
|
14
|
+
// built-in size, shape and paint utilities it would otherwise lose to; sort selects use it too.
|
|
15
|
+
const selectTriggerVariants = cva('flex items-center justify-between border-2 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 [&>span]:line-clamp-1', {
|
|
16
|
+
variants: {
|
|
17
|
+
variant: {
|
|
18
|
+
default: 'h-10 w-full rounded-md border-input bg-background px-3',
|
|
19
|
+
filter: 'filter-select-trigger',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: { variant: 'default' },
|
|
23
|
+
});
|
|
24
|
+
const SelectTrigger = React.forwardRef(({ className, children, variant, pending = false, disabled, ...props }, ref) => (_jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn(selectTriggerVariants({ variant }), className), ...props, ...(pending
|
|
13
25
|
? {
|
|
14
26
|
'aria-busy': true,
|
|
15
27
|
'aria-disabled': true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,MAAM,GAAG,eAAe,CAAC,IAAI,CAAC;AACpC,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAC1C,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC;AAE1C,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAKpC,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvE,MAAC,eAAe,CAAC,OAAO,IACtB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,+WAA+W,EAC/W,SAAS,CACV,KACG,KAAK,KACL,CAAC,OAAO;QACV,C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AE,EAAE,CAAC,CAC5C,MAAC,eAAe,CAAC,IAAI,IACnB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACX,6NAA6N,EAC7N,SAAS,CACV,KACG,KAAK,aAET,eAAM,SAAS,EAAC,8DAA8D,YAC5E,KAAC,eAAe,CAAC,aAAa,cAC5B,KAAC,KAAK,IAAC,SAAS,EAAC,SAAS,GAAG,GACC,GAC3B,EAEP,KAAC,eAAe,CAAC,QAAQ,cAAE,QAAQ,GAA4B,IAC1C,CACxB,CAAC,CAAC;AACH,UAAU,CAAC,WAAW,GAAG,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC;AAE1D,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,SAAS,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC;AAEpE,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cn } from '../../lib/utils.js';\nimport { Spinner } from './spinner.js';\nimport { blockActivationKey, blockEvent } from './pending-guard.js';\n\nconst Select = SelectPrimitive.Root;\nconst SelectGroup = SelectPrimitive.Group;\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & {\n pending?: boolean;\n }\n>(({ className, children, pending = false, disabled, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-10 w-full items-center justify-between rounded-md border-2 border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 [&>span]:line-clamp-1',\n className,\n )}\n {...props}\n {...(pending\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'data-pending': '',\n onPointerDownCapture: blockEvent,\n onClickCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {children}\n {pending ? (\n <Spinner size=\"xs\" />\n ) : (\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/react/components/select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC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Ae,GAAG,KAAK,CAAC,UAAU,CAGtC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,eAAe,CAAC,SAAS,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC,CAAC;AACH,eAAe,CAAC,WAAW,GAAG,eAAe,CAAC,SAAS,CAAC,WAAW,CAAC;AAEpE,OAAO,EACL,MAAM,EACN,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,sBAAsB,GACvB,CAAC","sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp } from 'lucide-react';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../../lib/utils.js';\nimport { Spinner } from './spinner.js';\nimport { blockActivationKey, blockEvent } from './pending-guard.js';\n\nconst Select = SelectPrimitive.Root;\nconst SelectGroup = SelectPrimitive.Group;\nconst SelectValue = SelectPrimitive.Value;\n\n// The filter variant carries theme-core's filter-select-trigger recipe class in place of the\n// built-in size, shape and paint utilities it would otherwise lose to; sort selects use it too.\nconst selectTriggerVariants = cva(\n 'flex items-center justify-between border-2 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 [&>span]:line-clamp-1',\n {\n variants: {\n variant: {\n default: 'h-10 w-full rounded-md border-input bg-background px-3',\n filter: 'filter-select-trigger',\n },\n },\n defaultVariants: { variant: 'default' },\n },\n);\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> &\n VariantProps<typeof selectTriggerVariants> & {\n pending?: boolean;\n }\n>(({ className, children, variant, pending = false, disabled, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(selectTriggerVariants({ variant }), className)}\n {...props}\n {...(pending\n ? {\n 'aria-busy': true,\n 'aria-disabled': true,\n 'data-pending': '',\n onPointerDownCapture: blockEvent,\n onClickCapture: blockEvent,\n onKeyDownCapture: blockActivationKey,\n }\n : {})}\n disabled={(disabled && !pending) || undefined}\n >\n {children}\n {pending ? (\n <Spinner size=\"xs\" />\n ) : (\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n )}\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground elevation-popover duration-[var(--motion-fast)] ease-[var(--motion-ease)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('py-1.5 pl-8 pr-2 text-sm font-semibold', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"]}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { Skeleton } from './components/skeleton.js';
|
|
|
10
10
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/dialog.js';
|
|
11
11
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/popover.js';
|
|
12
12
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './components/dropdown-menu.js';
|
|
13
|
+
export type { ActionsMenuProps, ActionsMenuContextValue, ActionMenuItemProps, AsyncActionMenuItemProps, OverlayActionItemProps, OverlayRender, } from './components/actions-menu.js';
|
|
14
|
+
export { ActionsMenu, ActionMenuItem, AsyncActionMenuItem, OverlayActionItem, useActionsMenu, } from './components/actions-menu.js';
|
|
13
15
|
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, } from './components/menubar.js';
|
|
14
16
|
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/alert-dialog.js';
|
|
15
17
|
export { Alert, AlertTitle, AlertDescription } from './components/alert.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,YAAY,EACV,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EACL,MAAM,EACN,YAAY,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B,EACjB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -8,6 +8,7 @@ export { Skeleton } from './components/skeleton.js';
|
|
|
8
8
|
export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, } from './components/dialog.js';
|
|
9
9
|
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/popover.js';
|
|
10
10
|
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './components/dropdown-menu.js';
|
|
11
|
+
export { ActionsMenu, ActionMenuItem, AsyncActionMenuItem, OverlayActionItem, useActionsMenu, } from './components/actions-menu.js';
|
|
11
12
|
export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, } from './components/menubar.js';
|
|
12
13
|
export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from './components/alert-dialog.js';
|
|
13
14
|
export { Alert, AlertTitle, AlertDescription } from './components/alert.js';
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY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,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAQvD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAG9E,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAOzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC","sourcesContent":["'use client';\n\nexport type { ButtonProps } from './components/button.js';\nexport { Button, buttonVariants } from './components/button.js';\nexport type { SpinnerProps, SpinnerSize } from './components/spinner.js';\nexport { Spinner } from './components/spinner.js';\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n} from './components/card.js';\nexport { Label } from './components/label.js';\nexport type {\n TextareaProps,\n FreeTextTextareaProps,\n NonFreeTextTextareaProps,\n NonFreeTextareaEntry,\n} from './components/textarea.js';\nexport { Textarea } from './components/textarea.js';\nexport { Skeleton } from './components/skeleton.js';\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './components/dialog.js';\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/popover.js';\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './components/dropdown-menu.js';\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n} from './components/menubar.js';\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n} from './components/alert-dialog.js';\nexport { Alert, AlertTitle, AlertDescription } from './components/alert.js';\nexport type { ToastProps, ToastActionElement } from './components/toast.js';\nexport {\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n} from './components/toast.js';\nexport { Toaster } from './components/toaster.js';\nexport type { ToastVariant, ToasterToast } from './hooks/use-toast.js';\nexport { toast, useToast } from './hooks/use-toast.js';\nexport type {\n InputProps,\n FreeTextInputProps,\n NonFreeTextInputProps,\n NonFreeTextEntry,\n BuiltInFormatInputProps,\n BuiltInFormatInputType,\n LengthBoundInputProps,\n LengthBoundInputType,\n NumberInputProps,\n} from './components/input.js';\nexport { Input } from './components/input.js';\nexport type { MoneyInputProps } from './components/money-input.js';\nexport { MoneyInput } from './components/money-input.js';\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n} from './components/select.js';\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './components/tabs.js';\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './components/tooltip.js';\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n} from './components/form.js';\nexport { Checkbox } from './components/checkbox.js';\nexport { Switch } from './components/switch.js';\nexport type { BadgeProps } from './components/badge.js';\nexport { Badge, badgeVariants } from './components/badge.js';\nexport { Avatar, AvatarImage, AvatarFallback } from './components/avatar.js';\nexport { Separator } from './components/separator.js';\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from './components/accordion.js';\nexport { RadioGroup, RadioGroupItem } from './components/radio-group.js';\nexport { Progress } from './components/progress.js';\nexport { Slider } from './components/slider.js';\nexport type { DatePickerProps } from './components/date-picker.js';\nexport { DatePicker } from './components/date-picker.js';\nexport type { DateTimePickerProps, DateTimePickerTime } from './components/date-time-picker.js';\nexport { DateTimePicker } from './components/date-time-picker.js';\nexport { ScrollArea, ScrollBar } from './components/scroll-area.js';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n SortableTableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/table.js';\nexport type { SortableTableHeadProps, SortDirection } from './components/table.js';\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n} from './components/sheet.js';\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from './components/collapsible.js';\nexport type { SearchDropdownProps } from './components/search-dropdown.js';\nexport { SearchDropdown } from './components/search-dropdown.js';\n\nexport type {\n ConsequenceDialogProps,\n ConsequenceDialogReason,\n ConsequenceDialogTypedConfirmation,\n} from './components/consequence-dialog.js';\nexport { ConsequenceDialog } from './components/consequence-dialog.js';\n\nexport type {\n MaxWidthOption,\n ScreenAdaptiveViewProps,\n} from './components/layout/screen-adaptive-view.js';\nexport { ScreenAdaptiveView } from './components/layout/screen-adaptive-view.js';\n\nexport { useMediaQuery } from './hooks/use-media-query.js';\n\nexport { useAsyncAction } from './hooks/use-async-action.js';\nexport type { AsyncAction, UseAsyncActionOptions } from './hooks/use-async-action.js';\n\nexport { RelativeTime } from './components/relative-time.js';\nexport type { RelativeTimeProps } from './components/relative-time.js';\n\nexport { EndOfListIndicator } from './components/end-of-list-indicator.js';\nexport type { EndOfListIndicatorProps } from './components/end-of-list-indicator.js';\n\nexport { ScrollToTopButton } from './components/scroll-to-top-button.js';\nexport type { ScrollToTopButtonProps } from './components/scroll-to-top-button.js';\n\nexport { ActionRow } from './components/action-row.js';\nexport type {\n ActionRowProps,\n ActionRowButtonProps,\n ActionRowLinkProps,\n ActionRowLinkTargetProps,\n} from './components/action-row.js';\n\nexport { ShowMoreToggle } from './components/show-more-toggle.js';\nexport type { ShowMoreToggleProps } from './components/show-more-toggle.js';\n\nexport { ReloadRecoveryNotice } from './components/reload-recovery-notice.js';\nexport type { ReloadRecoveryNoticeProps } from './components/reload-recovery-notice.js';\n\nexport { ListPagination } from './components/list-pagination.js';\nexport type { ListPaginationProps } from './components/list-pagination.js';\n\nexport { usePagedList } from './hooks/use-paged-list.js';\nexport type {\n ListPaginationState,\n PagedList,\n UsePagedListOptions,\n} from './hooks/use-paged-list.js';\n\nexport { useCursorPage } from './hooks/use-cursor-page.js';\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from './hooks/use-cursor-page.js';\n\nexport {\n useReturnScroll,\n saveReturnScroll,\n clearReturnScroll,\n readReturnScroll,\n} from './hooks/use-return-scroll.js';\nexport type {\n ReturnScrollEntry,\n UseReturnScrollOptions,\n UseReturnScrollResult,\n} from './hooks/use-return-scroll.js';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,eAAe,EACf,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAO9C,OA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C;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAOzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,8BAA8B,CAAC","sourcesContent":["'use client';\n\nexport type { ButtonProps } from './components/button.js';\nexport { Button, buttonVariants } from './components/button.js';\nexport type { SpinnerProps, SpinnerSize } from './components/spinner.js';\nexport { Spinner } from './components/spinner.js';\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardDescription,\n CardContent,\n} from './components/card.js';\nexport { Label } from './components/label.js';\nexport type {\n TextareaProps,\n FreeTextTextareaProps,\n NonFreeTextTextareaProps,\n NonFreeTextareaEntry,\n} from './components/textarea.js';\nexport { Textarea } from './components/textarea.js';\nexport { Skeleton } from './components/skeleton.js';\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './components/dialog.js';\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor } from './components/popover.js';\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './components/dropdown-menu.js';\nexport type {\n ActionsMenuProps,\n ActionsMenuContextValue,\n ActionMenuItemProps,\n AsyncActionMenuItemProps,\n OverlayActionItemProps,\n OverlayRender,\n} from './components/actions-menu.js';\nexport {\n ActionsMenu,\n ActionMenuItem,\n AsyncActionMenuItem,\n OverlayActionItem,\n useActionsMenu,\n} from './components/actions-menu.js';\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n} from './components/menubar.js';\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n} from './components/alert-dialog.js';\nexport { Alert, AlertTitle, AlertDescription } from './components/alert.js';\nexport type { ToastProps, ToastActionElement } from './components/toast.js';\nexport {\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction,\n} from './components/toast.js';\nexport { Toaster } from './components/toaster.js';\nexport type { ToastVariant, ToasterToast } from './hooks/use-toast.js';\nexport { toast, useToast } from './hooks/use-toast.js';\nexport type {\n InputProps,\n FreeTextInputProps,\n NonFreeTextInputProps,\n NonFreeTextEntry,\n BuiltInFormatInputProps,\n BuiltInFormatInputType,\n LengthBoundInputProps,\n LengthBoundInputType,\n NumberInputProps,\n} from './components/input.js';\nexport { Input } from './components/input.js';\nexport type { MoneyInputProps } from './components/money-input.js';\nexport { MoneyInput } from './components/money-input.js';\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n} from './components/select.js';\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './components/tabs.js';\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './components/tooltip.js';\nexport {\n useFormField,\n Form,\n FormItem,\n FormLabel,\n FormControl,\n FormDescription,\n FormMessage,\n FormField,\n} from './components/form.js';\nexport { Checkbox } from './components/checkbox.js';\nexport { Switch } from './components/switch.js';\nexport type { BadgeProps } from './components/badge.js';\nexport { Badge, badgeVariants } from './components/badge.js';\nexport { Avatar, AvatarImage, AvatarFallback } from './components/avatar.js';\nexport { Separator } from './components/separator.js';\nexport {\n Accordion,\n AccordionItem,\n AccordionTrigger,\n AccordionContent,\n} from './components/accordion.js';\nexport { RadioGroup, RadioGroupItem } from './components/radio-group.js';\nexport { Progress } from './components/progress.js';\nexport { Slider } from './components/slider.js';\nexport type { DatePickerProps } from './components/date-picker.js';\nexport { DatePicker } from './components/date-picker.js';\nexport type { DateTimePickerProps, DateTimePickerTime } from './components/date-time-picker.js';\nexport { DateTimePicker } from './components/date-time-picker.js';\nexport { ScrollArea, ScrollBar } from './components/scroll-area.js';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n SortableTableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/table.js';\nexport type { SortableTableHeadProps, SortDirection } from './components/table.js';\nexport {\n Sheet,\n SheetPortal,\n SheetOverlay,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n} from './components/sheet.js';\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent } from './components/collapsible.js';\nexport type { SearchDropdownProps } from './components/search-dropdown.js';\nexport { SearchDropdown } from './components/search-dropdown.js';\n\nexport type {\n ConsequenceDialogProps,\n ConsequenceDialogReason,\n ConsequenceDialogTypedConfirmation,\n} from './components/consequence-dialog.js';\nexport { ConsequenceDialog } from './components/consequence-dialog.js';\n\nexport type {\n MaxWidthOption,\n ScreenAdaptiveViewProps,\n} from './components/layout/screen-adaptive-view.js';\nexport { ScreenAdaptiveView } from './components/layout/screen-adaptive-view.js';\n\nexport { useMediaQuery } from './hooks/use-media-query.js';\n\nexport { useAsyncAction } from './hooks/use-async-action.js';\nexport type { AsyncAction, UseAsyncActionOptions } from './hooks/use-async-action.js';\n\nexport { RelativeTime } from './components/relative-time.js';\nexport type { RelativeTimeProps } from './components/relative-time.js';\n\nexport { EndOfListIndicator } from './components/end-of-list-indicator.js';\nexport type { EndOfListIndicatorProps } from './components/end-of-list-indicator.js';\n\nexport { ScrollToTopButton } from './components/scroll-to-top-button.js';\nexport type { ScrollToTopButtonProps } from './components/scroll-to-top-button.js';\n\nexport { ActionRow } from './components/action-row.js';\nexport type {\n ActionRowProps,\n ActionRowButtonProps,\n ActionRowLinkProps,\n ActionRowLinkTargetProps,\n} from './components/action-row.js';\n\nexport { ShowMoreToggle } from './components/show-more-toggle.js';\nexport type { ShowMoreToggleProps } from './components/show-more-toggle.js';\n\nexport { ReloadRecoveryNotice } from './components/reload-recovery-notice.js';\nexport type { ReloadRecoveryNoticeProps } from './components/reload-recovery-notice.js';\n\nexport { ListPagination } from './components/list-pagination.js';\nexport type { ListPaginationProps } from './components/list-pagination.js';\n\nexport { usePagedList } from './hooks/use-paged-list.js';\nexport type {\n ListPaginationState,\n PagedList,\n UsePagedListOptions,\n} from './hooks/use-paged-list.js';\n\nexport { useCursorPage } from './hooks/use-cursor-page.js';\nexport type { CursorPage, CursorPager, UseCursorPageOptions } from './hooks/use-cursor-page.js';\n\nexport {\n useReturnScroll,\n saveReturnScroll,\n clearReturnScroll,\n readReturnScroll,\n} from './hooks/use-return-scroll.js';\nexport type {\n ReturnScrollEntry,\n UseReturnScrollOptions,\n UseReturnScrollResult,\n} from './hooks/use-return-scroll.js';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttt-productions/ui-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.41",
|
|
4
4
|
"description": "Shared UI components for TTT Productions projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"react-dom": ">=19.0.0",
|
|
54
54
|
"react-hook-form": ">=7.0.0",
|
|
55
55
|
"@hookform/resolvers": ">=3.0.0",
|
|
56
|
-
"@ttt-productions/firebase-helpers": "^0.12.
|
|
56
|
+
"@ttt-productions/firebase-helpers": "^0.12.26",
|
|
57
57
|
"lucide-react": "^1.30.0",
|
|
58
58
|
"date-fns": ">=3.0.0"
|
|
59
59
|
},
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"react-dom": "^19.2.0",
|
|
108
108
|
"react-hook-form": "^7.69.0",
|
|
109
109
|
"@hookform/resolvers": "^5.2.2",
|
|
110
|
-
"@ttt-productions/firebase-helpers": "^0.12.
|
|
110
|
+
"@ttt-productions/firebase-helpers": "^0.12.26",
|
|
111
111
|
"lucide-react": "^1.30.0",
|
|
112
112
|
"date-fns": "^4.1.0"
|
|
113
113
|
},
|