@adea-ai/ui 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +6 -3
  2. package/dist/components/account-drawer.d.ts +3 -3
  3. package/dist/components/account-drawer.js +119 -19
  4. package/dist/components/on-screen-controls.d.ts +2 -1
  5. package/dist/components/on-screen-controls.js +158 -46
  6. package/dist/components/scene-settings.d.ts +3 -3
  7. package/dist/components/scene-settings.js +247 -28
  8. package/dist/components/theme-provider.d.ts +27 -5
  9. package/dist/components/theme-provider.js +96 -7
  10. package/dist/components/theme-toggle.d.ts +4 -4
  11. package/dist/components/theme-toggle.js +62 -18
  12. package/dist/components/ui/badge.d.ts +4 -3
  13. package/dist/components/ui/badge.js +31 -30
  14. package/dist/components/ui/button.d.ts +4 -3
  15. package/dist/components/ui/button.js +49 -32
  16. package/dist/components/ui/card.d.ts +3 -3
  17. package/dist/components/ui/card.js +25 -6
  18. package/dist/components/ui/dialog.d.ts +13 -13
  19. package/dist/components/ui/dialog.js +94 -26
  20. package/dist/components/ui/drawer.d.ts +23 -15
  21. package/dist/components/ui/drawer.js +109 -64
  22. package/dist/components/ui/dropdown-menu.d.ts +28 -22
  23. package/dist/components/ui/dropdown-menu.js +165 -36
  24. package/dist/components/ui/empty.d.ts +7 -6
  25. package/dist/components/ui/empty.js +78 -26
  26. package/dist/components/ui/field.d.ts +15 -14
  27. package/dist/components/ui/field.js +177 -55
  28. package/dist/components/ui/input.d.ts +2 -2
  29. package/dist/components/ui/input.js +20 -5
  30. package/dist/components/ui/label.d.ts +2 -2
  31. package/dist/components/ui/label.js +15 -5
  32. package/dist/components/ui/radio-group.d.ts +4 -4
  33. package/dist/components/ui/radio-group.js +36 -9
  34. package/dist/components/ui/separator.d.ts +6 -2
  35. package/dist/components/ui/separator.js +18 -6
  36. package/dist/components/ui/skeleton.d.ts +2 -1
  37. package/dist/components/ui/skeleton.js +15 -4
  38. package/dist/components/ui/spinner.d.ts +4 -3
  39. package/dist/components/ui/spinner.js +15 -5
  40. package/dist/components/ui/switch.d.ts +6 -3
  41. package/dist/components/ui/switch.js +57 -6
  42. package/dist/components/ui/tabs.d.ts +6 -5
  43. package/dist/components/ui/tabs.js +52 -24
  44. package/dist/components/ui/toggle-group.d.ts +10 -8
  45. package/dist/components/ui/toggle-group.js +91 -20
  46. package/dist/components/ui/toggle.d.ts +4 -2
  47. package/dist/components/ui/toggle.js +38 -23
  48. package/dist/components/ui/tooltip.d.ts +13 -6
  49. package/dist/components/ui/tooltip.js +51 -14
  50. package/dist/components/version-dialog.d.ts +2 -2
  51. package/dist/components/version-dialog.js +322 -129
  52. package/dist/components/workspace-brand.d.ts +1 -1
  53. package/dist/components/workspace-brand.js +12 -3
  54. package/dist/components/workspace-logo.d.ts +2 -2
  55. package/dist/components/workspace-logo.js +15 -3
  56. package/dist/index.d.ts +1 -1
  57. package/dist/index.js +20 -19
  58. package/dist/lib/utils.js +7 -4
  59. package/dist/lib/version-notes.js +14 -29
  60. package/package.json +18 -16
  61. package/src/components/account-drawer.tsx +48 -67
  62. package/src/components/on-screen-controls.tsx +55 -62
  63. package/src/components/scene-settings.tsx +97 -100
  64. package/src/components/theme-provider.tsx +122 -22
  65. package/src/components/theme-toggle.tsx +29 -54
  66. package/src/components/ui/badge.tsx +14 -23
  67. package/src/components/ui/button.tsx +9 -11
  68. package/src/components/ui/card.tsx +9 -6
  69. package/src/components/ui/dialog.tsx +58 -55
  70. package/src/components/ui/drawer.tsx +84 -125
  71. package/src/components/ui/dropdown-menu.tsx +130 -153
  72. package/src/components/ui/empty.tsx +29 -26
  73. package/src/components/ui/field.tsx +83 -87
  74. package/src/components/ui/input.tsx +8 -8
  75. package/src/components/ui/label.tsx +6 -7
  76. package/src/components/ui/radio-group.tsx +22 -19
  77. package/src/components/ui/separator.tsx +16 -9
  78. package/src/components/ui/skeleton.tsx +6 -3
  79. package/src/components/ui/spinner.tsx +9 -5
  80. package/src/components/ui/switch.tsx +47 -20
  81. package/src/components/ui/tabs.tsx +31 -30
  82. package/src/components/ui/toggle-group.tsx +65 -54
  83. package/src/components/ui/toggle.tsx +9 -12
  84. package/src/components/ui/tooltip.tsx +41 -36
  85. package/src/components/version-dialog.tsx +144 -144
  86. package/src/components/workspace-brand.tsx +5 -5
  87. package/src/components/workspace-logo.tsx +9 -8
  88. package/src/index.tsx +7 -1
  89. package/src/styles/base.css +637 -0
  90. package/src/styles/globals.css +1 -1
  91. package/tsconfig.json +2 -1
  92. package/components.json +0 -19
@@ -1,35 +1,52 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Button as ButtonPrimitive } from '@base-ui/react/button';
3
- import { cva } from 'class-variance-authority';
4
- import { cn } from '#lib/utils';
5
- const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
6
- variants: {
7
- variant: {
8
- default: 'bg-primary text-primary-foreground hover:bg-primary/80',
9
- outline: 'border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50',
10
- secondary: 'bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground',
11
- ghost: 'hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50',
12
- destructive: 'bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40',
13
- success: 'bg-success/10 text-success hover:bg-success/20 focus-visible:border-success/40 focus-visible:ring-success/20 dark:bg-success/20 dark:hover:bg-success/30 dark:focus-visible:ring-success/40',
14
- link: 'text-primary underline-offset-4 hover:underline',
15
- },
16
- size: {
17
- default: 'h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
18
- xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
19
- sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
20
- lg: 'h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',
21
- icon: 'size-8',
22
- 'icon-xs': "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
23
- 'icon-sm': 'size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg',
24
- 'icon-lg': 'size-9',
25
- },
26
- },
27
- defaultVariants: {
28
- variant: 'default',
29
- size: 'default',
30
- },
1
+ import { cn } from "../../lib/utils.js";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ import { cva } from "class-variance-authority";
5
+ //#region src/components/ui/button.tsx
6
+ var _tmpl$ = /*#__PURE__*/ template(`<button data-slot=button>`);
7
+ var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-primary text-primary-foreground hover:bg-primary/80",
11
+ outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
12
+ secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
13
+ ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
14
+ destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
15
+ success: "bg-success/10 text-success hover:bg-success/20 focus-visible:border-success/40 focus-visible:ring-success/20 dark:bg-success/20 dark:hover:bg-success/30 dark:focus-visible:ring-success/40",
16
+ link: "text-primary underline-offset-4 hover:underline"
17
+ },
18
+ size: {
19
+ default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
20
+ xs: "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
21
+ sm: "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
22
+ lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
23
+ icon: "size-8",
24
+ "icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
25
+ "icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
26
+ "icon-lg": "size-9"
27
+ }
28
+ },
29
+ defaultVariants: {
30
+ variant: "default",
31
+ size: "default"
32
+ }
31
33
  });
32
- function Button({ className, variant = 'default', size = 'default', ...props }) {
33
- return (_jsx(ButtonPrimitive, { "data-slot": "button", className: cn(buttonVariants({ variant, size, className })), ...props }));
34
+ function Button(props) {
35
+ const [local, rest] = splitProps(props, [
36
+ "class",
37
+ "variant",
38
+ "size"
39
+ ]);
40
+ return (() => {
41
+ var _el$ = _tmpl$();
42
+ spread(_el$, mergeProps({ get ["class"]() {
43
+ return cn(buttonVariants({
44
+ variant: local.variant,
45
+ size: local.size
46
+ }), local.class);
47
+ } }, rest), false, false);
48
+ return _el$;
49
+ })();
34
50
  }
51
+ //#endregion
35
52
  export { Button, buttonVariants };
@@ -1,4 +1,4 @@
1
- import type { HTMLAttributes } from 'react';
2
- declare function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
3
- declare function CardContent({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
1
+ import { type ComponentProps } from 'solid-js';
2
+ declare function Card(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
3
+ declare function CardContent(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
4
4
  export { Card, CardContent };
@@ -1,9 +1,28 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '#lib/utils';
3
- function Card({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "card", className: cn('rounded-xl border bg-card text-card-foreground shadow-sm', className), ...props }));
1
+ import { cn } from "../../lib/utils.js";
2
+ import { mergeProps, spread, template } from "solid-js/web";
3
+ import { splitProps } from "solid-js";
4
+ //#region src/components/ui/card.tsx
5
+ var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=card>`);
6
+ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=card-content>`);
7
+ function Card(props) {
8
+ const [local, rest] = splitProps(props, ["class"]);
9
+ return (() => {
10
+ var _el$ = _tmpl$();
11
+ spread(_el$, mergeProps({ get ["class"]() {
12
+ return cn("rounded-xl border bg-card text-card-foreground shadow-sm", local.class);
13
+ } }, rest), false, false);
14
+ return _el$;
15
+ })();
5
16
  }
6
- function CardContent({ className, ...props }) {
7
- return _jsx("div", { "data-slot": "card-content", className: cn('p-4', className), ...props });
17
+ function CardContent(props) {
18
+ const [local, rest] = splitProps(props, ["class"]);
19
+ return (() => {
20
+ var _el$2 = _tmpl$2();
21
+ spread(_el$2, mergeProps({ get ["class"]() {
22
+ return cn("p-4", local.class);
23
+ } }, rest), false, false);
24
+ return _el$2;
25
+ })();
8
26
  }
27
+ //#endregion
9
28
  export { Card, CardContent };
@@ -1,15 +1,15 @@
1
- import * as React from 'react';
2
- import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
3
- declare function Dialog({ ...props }: DialogPrimitive.Root.Props): React.JSX.Element;
4
- declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): React.JSX.Element;
5
- declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): React.JSX.Element;
6
- declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): React.JSX.Element;
7
- declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): React.JSX.Element;
8
- declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
1
+ import { Dialog as DialogPrimitive } from '@kobalte/core/dialog';
2
+ import { type ComponentProps } from 'solid-js';
3
+ declare function Dialog(props: ComponentProps<typeof DialogPrimitive>): import("solid-js").JSX.Element;
4
+ declare function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>): import("solid-js").JSX.Element;
5
+ declare function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>): import("solid-js").JSX.Element;
6
+ declare function DialogClose(props: ComponentProps<typeof DialogPrimitive.CloseButton>): import("solid-js").JSX.Element;
7
+ declare function DialogOverlay(props: ComponentProps<typeof DialogPrimitive.Overlay>): import("solid-js").JSX.Element;
8
+ declare function DialogContent(props: ComponentProps<typeof DialogPrimitive.Content> & {
9
9
  showCloseButton?: boolean;
10
- }): React.JSX.Element;
11
- declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
12
- declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
13
- declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
14
- declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
10
+ }): import("solid-js").JSX.Element;
11
+ declare function DialogHeader(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
12
+ declare function DialogFooter(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
13
+ declare function DialogTitle(props: ComponentProps<typeof DialogPrimitive.Title>): import("solid-js").JSX.Element;
14
+ declare function DialogDescription(props: ComponentProps<typeof DialogPrimitive.Description>): import("solid-js").JSX.Element;
15
15
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -1,36 +1,104 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
4
- import { X } from 'lucide-react';
5
- import { cn } from '#lib/utils';
6
- function Dialog({ ...props }) {
7
- return _jsx(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
1
+ import { cn } from "../../lib/utils.js";
2
+ import { createComponent, insert, memo, mergeProps, spread, template } from "solid-js/web";
3
+ import { X } from "lucide-solid";
4
+ import { splitProps } from "solid-js";
5
+ import { Dialog as Dialog$1 } from "@kobalte/core/dialog";
6
+ //#region src/components/ui/dialog.tsx
7
+ var _tmpl$ = /*#__PURE__*/ template(`<div class="fixed inset-0 z-[120] flex items-center justify-center p-4">`);
8
+ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=dialog-header>`);
9
+ var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=dialog-footer>`);
10
+ function Dialog(props) {
11
+ return createComponent(Dialog$1, mergeProps({
12
+ "data-slot": "dialog",
13
+ modal: false
14
+ }, props));
8
15
  }
9
- function DialogTrigger({ ...props }) {
10
- return _jsx(DialogPrimitive.Trigger, { "data-slot": "dialog-trigger", ...props });
16
+ function DialogTrigger(props) {
17
+ return createComponent(Dialog$1.Trigger, mergeProps({ "data-slot": "dialog-trigger" }, props));
11
18
  }
12
- function DialogPortal({ ...props }) {
13
- return _jsx(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
19
+ function DialogPortal(props) {
20
+ return createComponent(Dialog$1.Portal, mergeProps({ "data-slot": "dialog-portal" }, props));
14
21
  }
15
- function DialogClose({ ...props }) {
16
- return _jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", ...props });
22
+ function DialogClose(props) {
23
+ return createComponent(Dialog$1.CloseButton, mergeProps({ "data-slot": "dialog-close" }, props));
17
24
  }
18
- function DialogOverlay({ className, ...props }) {
19
- return (_jsx(DialogPrimitive.Backdrop, { "data-slot": "dialog-overlay", className: cn('fixed inset-0 z-[120] bg-slate-950/55 backdrop-blur-[2px] transition-opacity duration-200 data-ending-style:opacity-0 data-starting-style:opacity-0', className), ...props }));
25
+ function DialogOverlay(props) {
26
+ const [local, rest] = splitProps(props, ["class"]);
27
+ return createComponent(Dialog$1.Overlay, mergeProps({
28
+ "data-slot": "dialog-overlay",
29
+ get ["class"]() {
30
+ return cn("fixed inset-0 z-[120] bg-slate-950/55 backdrop-blur-[2px]", local.class);
31
+ }
32
+ }, rest));
20
33
  }
21
- function DialogContent({ className, children, showCloseButton = true, ...props }) {
22
- return (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsx(DialogPrimitive.Viewport, { "data-slot": "dialog-viewport", className: "fixed inset-0 z-[120] flex items-center justify-center p-4", children: _jsxs(DialogPrimitive.Popup, { "data-slot": "dialog-content", className: cn('relative grid max-h-[min(44rem,calc(100dvh-2rem))] w-full max-w-2xl gap-0 overflow-hidden rounded-2xl border bg-card text-card-foreground shadow-2xl outline-none transition-[opacity,transform] duration-200 data-ending-style:scale-[0.98] data-ending-style:opacity-0 data-starting-style:scale-[0.98] data-starting-style:opacity-0', className), ...props, children: [children, showCloseButton && (_jsx(DialogPrimitive.Close, { "data-slot": "dialog-close", className: "absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50", "aria-label": "Close dialog", children: _jsx(X, { className: "size-4", "aria-hidden": "true" }) }))] }) })] }));
34
+ function DialogContent(props) {
35
+ const [local, rest] = splitProps(props, [
36
+ "class",
37
+ "children",
38
+ "showCloseButton"
39
+ ]);
40
+ return createComponent(DialogPortal, { get children() {
41
+ return [createComponent(DialogOverlay, {}), (() => {
42
+ var _el$ = _tmpl$();
43
+ insert(_el$, createComponent(Dialog$1.Content, mergeProps({
44
+ "data-slot": "dialog-content",
45
+ get ["class"]() {
46
+ return cn("relative grid max-h-[min(44rem,calc(100dvh-2rem))] w-full max-w-2xl gap-0 overflow-hidden rounded-2xl border bg-card text-card-foreground shadow-2xl outline-none", local.class);
47
+ }
48
+ }, rest, { get children() {
49
+ return [memo(() => local.children), memo(() => memo(() => !!(local.showCloseButton ?? true))() ? createComponent(Dialog$1.CloseButton, {
50
+ "data-slot": "dialog-close",
51
+ "class": "absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",
52
+ "aria-label": "Close dialog",
53
+ get children() {
54
+ return createComponent(X, {
55
+ "class": "size-4",
56
+ "aria-hidden": "true"
57
+ });
58
+ }
59
+ }) : null)];
60
+ } })));
61
+ return _el$;
62
+ })()];
63
+ } });
23
64
  }
24
- function DialogHeader({ className, ...props }) {
25
- return (_jsx("div", { "data-slot": "dialog-header", className: cn('flex flex-col gap-1.5 border-b px-6 py-5 pr-14', className), ...props }));
65
+ function DialogHeader(props) {
66
+ const [local, rest] = splitProps(props, ["class"]);
67
+ return (() => {
68
+ var _el$2 = _tmpl$2();
69
+ spread(_el$2, mergeProps({ get ["class"]() {
70
+ return cn("flex flex-col gap-1.5 border-b px-6 py-5 pr-14", local.class);
71
+ } }, rest), false, false);
72
+ return _el$2;
73
+ })();
26
74
  }
27
- function DialogFooter({ className, ...props }) {
28
- return (_jsx("div", { "data-slot": "dialog-footer", className: cn('flex flex-col-reverse gap-2 border-t px-6 py-4 sm:flex-row sm:justify-end', className), ...props }));
75
+ function DialogFooter(props) {
76
+ const [local, rest] = splitProps(props, ["class"]);
77
+ return (() => {
78
+ var _el$3 = _tmpl$3();
79
+ spread(_el$3, mergeProps({ get ["class"]() {
80
+ return cn("flex flex-col-reverse gap-2 border-t px-6 py-4 sm:flex-row sm:justify-end", local.class);
81
+ } }, rest), false, false);
82
+ return _el$3;
83
+ })();
29
84
  }
30
- function DialogTitle({ className, ...props }) {
31
- return (_jsx(DialogPrimitive.Title, { "data-slot": "dialog-title", className: cn('text-base font-semibold tracking-tight', className), ...props }));
85
+ function DialogTitle(props) {
86
+ const [local, rest] = splitProps(props, ["class"]);
87
+ return createComponent(Dialog$1.Title, mergeProps({
88
+ "data-slot": "dialog-title",
89
+ get ["class"]() {
90
+ return cn("text-base font-semibold tracking-tight", local.class);
91
+ }
92
+ }, rest));
32
93
  }
33
- function DialogDescription({ className, ...props }) {
34
- return (_jsx(DialogPrimitive.Description, { "data-slot": "dialog-description", className: cn('text-sm leading-5 text-muted-foreground', className), ...props }));
94
+ function DialogDescription(props) {
95
+ const [local, rest] = splitProps(props, ["class"]);
96
+ return createComponent(Dialog$1.Description, mergeProps({
97
+ "data-slot": "dialog-description",
98
+ get ["class"]() {
99
+ return cn("text-sm leading-5 text-muted-foreground", local.class);
100
+ }
101
+ }, rest));
35
102
  }
36
- export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
103
+ //#endregion
104
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
@@ -1,16 +1,24 @@
1
- import * as React from 'react';
2
- import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
3
- declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, ...props }: DrawerPrimitive.Root.Props & {
1
+ import DrawerPrimitive from '@corvu/drawer';
2
+ import type { Side } from '@corvu/drawer';
3
+ import { type ComponentProps } from 'solid-js';
4
+ type DrawerSide = Side;
5
+ type DrawerProps = ComponentProps<typeof DrawerPrimitive> & {
6
+ /** Base UI spoke of swipe directions; corvu speaks of the side the drawer attaches to. */
7
+ swipeDirection?: DrawerSide;
4
8
  showSwipeHandle?: boolean;
5
- }): React.JSX.Element;
6
- declare function DrawerTrigger({ ...props }: DrawerPrimitive.Trigger.Props): React.JSX.Element;
7
- declare function DrawerPortal({ ...props }: DrawerPrimitive.Portal.Props): React.JSX.Element;
8
- declare function DrawerClose({ ...props }: DrawerPrimitive.Close.Props): React.JSX.Element;
9
- declare function DrawerOverlay({ className, ...props }: DrawerPrimitive.Backdrop.Props): React.JSX.Element;
10
- declare function DrawerSwipeHandle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
11
- declare function DrawerContent({ className, children, ...props }: DrawerPrimitive.Popup.Props): React.JSX.Element;
12
- declare function DrawerHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
13
- declare function DrawerFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
14
- declare function DrawerTitle({ className, ...props }: DrawerPrimitive.Title.Props): React.JSX.Element;
15
- declare function DrawerDescription({ className, ...props }: DrawerPrimitive.Description.Props): React.JSX.Element;
16
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
9
+ };
10
+ declare function Drawer(props: DrawerProps): import("solid-js").JSX.Element;
11
+ declare function DrawerTrigger(props: ComponentProps<typeof DrawerPrimitive.Trigger>): import("solid-js").JSX.Element;
12
+ declare function DrawerPortal(props: ComponentProps<typeof DrawerPrimitive.Portal>): import("solid-js").JSX.Element;
13
+ declare function DrawerClose(props: ComponentProps<typeof DrawerPrimitive.Close>): import("solid-js").JSX.Element;
14
+ declare function DrawerOverlay(props: ComponentProps<typeof DrawerPrimitive.Overlay>): import("solid-js").JSX.Element;
15
+ declare function DrawerSwipeHandle(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
16
+ type DrawerContentProps = ComponentProps<typeof DrawerPrimitive.Content> & {
17
+ showSwipeHandle?: boolean;
18
+ };
19
+ declare function DrawerContent(props: DrawerContentProps): import("solid-js").JSX.Element;
20
+ declare function DrawerHeader(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
21
+ declare function DrawerFooter(props: ComponentProps<'div'>): import("solid-js").JSX.Element;
22
+ declare function DrawerTitle(props: ComponentProps<typeof DrawerPrimitive.Label>): import("solid-js").JSX.Element;
23
+ declare function DrawerDescription(props: ComponentProps<typeof DrawerPrimitive.Description>): import("solid-js").JSX.Element;
24
+ export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, type DrawerProps, };
@@ -1,75 +1,120 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
4
- import { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';
5
- import { cn } from '#lib/utils';
6
- const DrawerContext = React.createContext(null);
7
- function useDrawer() {
8
- const context = React.useContext(DrawerContext);
9
- if (!context) {
10
- throw new Error('useDrawer must be used within a Drawer.');
11
- }
12
- return context;
1
+ import { cn } from "../../lib/utils.js";
2
+ import { createComponent, memo, mergeProps, spread, template } from "solid-js/web";
3
+ import { Show, splitProps } from "solid-js";
4
+ import DrawerPrimitive from "@corvu/drawer";
5
+ //#region src/components/ui/drawer.tsx
6
+ var _tmpl$ = /*#__PURE__*/ template(`<div data-slot=drawer-swipe-handle aria-hidden=true>`);
7
+ var _tmpl$2 = /*#__PURE__*/ template(`<div data-slot=drawer-header>`);
8
+ var _tmpl$3 = /*#__PURE__*/ template(`<div data-slot=drawer-footer>`);
9
+ var SIDE_DRAWER_WIDTH = "w-[var(--drawer-content-width,min(24rem,90vw))]";
10
+ var SIDE_CLASSES = {
11
+ bottom: "inset-x-0 bottom-0 max-h-[calc(100dvh-2rem)] rounded-t-xl border-t",
12
+ top: "inset-x-0 top-0 max-h-[calc(100dvh-2rem)] rounded-b-xl border-b",
13
+ left: `inset-y-0 left-0 h-full ${SIDE_DRAWER_WIDTH} rounded-r-xl border-r`,
14
+ right: `inset-y-0 right-0 h-full ${SIDE_DRAWER_WIDTH} rounded-l-xl border-l`
15
+ };
16
+ function Drawer(props) {
17
+ const [local, rest] = splitProps(props, ["swipeDirection", "side"]);
18
+ return createComponent(DrawerPrimitive, mergeProps({
19
+ "data-slot": "drawer",
20
+ get side() {
21
+ return local.side ?? local.swipeDirection ?? "bottom";
22
+ }
23
+ }, rest));
13
24
  }
14
- function Drawer({ modal = true, showSwipeHandle = false, snapPoints, swipeDirection = 'down', ...props }) {
15
- const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
16
- const contextValue = React.useMemo(() => ({ hasSnapPoints, modal, showSwipeHandle, swipeDirection }), [hasSnapPoints, modal, showSwipeHandle, swipeDirection]);
17
- return (_jsx(DrawerContext.Provider, { value: contextValue, children: _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", modal: modal, snapPoints: snapPoints, swipeDirection: swipeDirection, ...props }) }));
25
+ function DrawerTrigger(props) {
26
+ return createComponent(DrawerPrimitive.Trigger, mergeProps({ "data-slot": "drawer-trigger" }, props));
18
27
  }
19
- function DrawerTrigger({ ...props }) {
20
- return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
28
+ function DrawerPortal(props) {
29
+ return createComponent(DrawerPrimitive.Portal, mergeProps({ "data-slot": "drawer-portal" }, props));
21
30
  }
22
- function DrawerPortal({ ...props }) {
23
- return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
31
+ function DrawerClose(props) {
32
+ return createComponent(DrawerPrimitive.Close, mergeProps({ "data-slot": "drawer-close" }, props));
24
33
  }
25
- function DrawerClose({ ...props }) {
26
- return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
34
+ function DrawerOverlay(props) {
35
+ const [local, rest] = splitProps(props, ["class"]);
36
+ return createComponent(DrawerPrimitive.Overlay, mergeProps({
37
+ "data-slot": "drawer-overlay",
38
+ get ["class"]() {
39
+ return cn("fixed inset-0 z-[110] bg-black/10 backdrop-blur-xs transition-opacity duration-300 data-closed:opacity-0", local.class);
40
+ }
41
+ }, rest));
27
42
  }
28
- function DrawerOverlay({ className, ...props }) {
29
- return (_jsx(DrawerPrimitive.Backdrop, { "data-slot": "drawer-overlay", className: cn('fixed inset-0 z-[110] min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute', className), ...props }));
43
+ function DrawerSwipeHandle(props) {
44
+ const [local, rest] = splitProps(props, ["class"]);
45
+ return (() => {
46
+ var _el$ = _tmpl$();
47
+ spread(_el$, mergeProps({ get ["class"]() {
48
+ return cn("relative z-10 flex shrink-0 cursor-grab items-center justify-center py-2 active:cursor-grabbing after:block after:h-1 after:w-24 after:shrink-0 after:rounded-full after:bg-muted", local.class);
49
+ } }, rest), false, false);
50
+ return _el$;
51
+ })();
30
52
  }
31
- function DrawerSwipeHandle({ className, ...props }) {
32
- return (_jsx("div", { "data-slot": "drawer-swipe-handle", "aria-hidden": "true", className: cn('relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing', className), ...props }));
53
+ function DrawerContent(props) {
54
+ const [local, rest] = splitProps(props, [
55
+ "class",
56
+ "children",
57
+ "showSwipeHandle"
58
+ ]);
59
+ const side = DrawerPrimitive.useContext().side;
60
+ return createComponent(DrawerPortal, {
61
+ "data-slot": "drawer-portal",
62
+ get children() {
63
+ return [createComponent(DrawerOverlay, {}), createComponent(DrawerPrimitive.Content, mergeProps({
64
+ "data-slot": "drawer-content",
65
+ get ["class"]() {
66
+ return cn("group/drawer-content fixed z-[110] flex flex-col overflow-hidden bg-popover text-sm text-popover-foreground shadow-lg outline-none transition-transform duration-300 ease-out will-change-transform", SIDE_CLASSES[side()], local.class);
67
+ }
68
+ }, rest, { get children() {
69
+ return [createComponent(Show, {
70
+ get when() {
71
+ return local.showSwipeHandle;
72
+ },
73
+ get children() {
74
+ return createComponent(DrawerSwipeHandle, {});
75
+ }
76
+ }), memo(() => local.children)];
77
+ } }))];
78
+ }
79
+ });
33
80
  }
34
- function DrawerContent({ className, children, ...props }) {
35
- const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useDrawer();
36
- const swipeAxis = swipeDirection === 'down' || swipeDirection === 'up' ? 'y' : 'x';
37
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [modal === true && _jsx(DrawerOverlay, { "data-snap-points": hasSnapPoints ? '' : undefined }), _jsx(DrawerPrimitive.Viewport, { "data-slot": "drawer-viewport", "data-modal": modal, className: "pointer-events-none fixed inset-0 z-[110] select-none data-[modal=true]:pointer-events-auto", children: _jsxs(DrawerPrimitive.Popup, { "data-slot": "drawer-popup", "data-swipe-axis": swipeAxis, "data-snap-points": hasSnapPoints ? '' : undefined, className: cn(
38
- // Base.
39
- 'group/drawer-popup pointer-events-auto fixed z-[110] m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b',
40
- // Nested.
41
- 'data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95',
42
- // Bleed.
43
- 'after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full',
44
- // Sizing.
45
- '[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]',
46
- // Stack.
47
- '[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]',
48
- // Transitions.
49
- 'data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]',
50
- // Axis: y.
51
- 'data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)',
52
- // Axis: x.
53
- 'data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row',
54
- // Direction: down.
55
- 'data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]',
56
- // Direction: up.
57
- 'data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]',
58
- // Direction: left.
59
- 'data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]',
60
- // Direction: right.
61
- 'data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]', className), ...props, children: [showSwipeHandle && _jsx(DrawerSwipeHandle, {}), _jsx(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn('flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none'), children: children })] }) })] }));
81
+ function DrawerHeader(props) {
82
+ const [local, rest] = splitProps(props, ["class"]);
83
+ return (() => {
84
+ var _el$2 = _tmpl$2();
85
+ spread(_el$2, mergeProps({ get ["class"]() {
86
+ return cn("flex shrink-0 flex-col gap-0.5 p-4 pb-0 text-center md:text-left", local.class);
87
+ } }, rest), false, false);
88
+ return _el$2;
89
+ })();
62
90
  }
63
- function DrawerHeader({ className, ...props }) {
64
- return (_jsx("div", { "data-slot": "drawer-header", className: cn('flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left', className), ...props }));
91
+ function DrawerFooter(props) {
92
+ const [local, rest] = splitProps(props, ["class"]);
93
+ return (() => {
94
+ var _el$3 = _tmpl$3();
95
+ spread(_el$3, mergeProps({ get ["class"]() {
96
+ return cn("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", local.class);
97
+ } }, rest), false, false);
98
+ return _el$3;
99
+ })();
65
100
  }
66
- function DrawerFooter({ className, ...props }) {
67
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn('mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0', className), ...props }));
101
+ function DrawerTitle(props) {
102
+ const [local, rest] = splitProps(props, ["class"]);
103
+ return createComponent(DrawerPrimitive.Label, mergeProps({
104
+ "data-slot": "drawer-title",
105
+ get ["class"]() {
106
+ return cn("text-base font-medium text-foreground", local.class);
107
+ }
108
+ }, rest));
68
109
  }
69
- function DrawerTitle({ className, ...props }) {
70
- return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn('text-base font-medium text-foreground', className), ...props }));
110
+ function DrawerDescription(props) {
111
+ const [local, rest] = splitProps(props, ["class"]);
112
+ return createComponent(DrawerPrimitive.Description, mergeProps({
113
+ "data-slot": "drawer-description",
114
+ get ["class"]() {
115
+ return cn("text-sm text-balance text-muted-foreground", local.class);
116
+ }
117
+ }, rest));
71
118
  }
72
- function DrawerDescription({ className, ...props }) {
73
- return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn('text-sm text-balance text-muted-foreground', className), ...props }));
74
- }
75
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerSwipeHandle, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
119
+ //#endregion
120
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger };
@@ -1,29 +1,35 @@
1
- import * as React from 'react';
2
- import { Menu as MenuPrimitive } from '@base-ui/react/menu';
3
- declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): React.JSX.Element;
4
- declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): React.JSX.Element;
5
- declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): React.JSX.Element;
6
- declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): React.JSX.Element;
7
- declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): React.JSX.Element;
8
- declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
1
+ import { DropdownMenu as DropdownMenuPrimitive } from '@kobalte/core/dropdown-menu';
2
+ import { type ComponentProps } from 'solid-js';
3
+ type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content> & {
4
+ side?: 'top' | 'right' | 'bottom' | 'left';
5
+ align?: 'start' | 'center' | 'end';
6
+ sideOffset?: number;
7
+ alignOffset?: number;
8
+ };
9
+ declare function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive>): import("solid-js").JSX.Element;
10
+ declare function DropdownMenuPortal(props: ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("solid-js").JSX.Element;
11
+ declare function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("solid-js").JSX.Element;
12
+ declare function DropdownMenuContent(props: DropdownMenuContentProps): import("solid-js").JSX.Element;
13
+ declare function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>): import("solid-js").JSX.Element;
14
+ declare function DropdownMenuLabel(props: ComponentProps<typeof DropdownMenuPrimitive.GroupLabel> & {
9
15
  inset?: boolean;
10
- }): React.JSX.Element;
11
- declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
16
+ }): import("solid-js").JSX.Element;
17
+ declare function DropdownMenuItem(props: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
12
18
  inset?: boolean;
13
19
  variant?: 'default' | 'destructive';
14
- }): React.JSX.Element;
15
- declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): React.JSX.Element;
16
- declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
20
+ }): import("solid-js").JSX.Element;
21
+ declare function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("solid-js").JSX.Element;
22
+ declare function DropdownMenuSubTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
17
23
  inset?: boolean;
18
- }): React.JSX.Element;
19
- declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): React.JSX.Element;
20
- declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
24
+ }): import("solid-js").JSX.Element;
25
+ declare function DropdownMenuSubContent(props: ComponentProps<typeof DropdownMenuContent>): import("solid-js").JSX.Element;
26
+ declare function DropdownMenuCheckboxItem(props: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
21
27
  inset?: boolean;
22
- }): React.JSX.Element;
23
- declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): React.JSX.Element;
24
- declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
28
+ }): import("solid-js").JSX.Element;
29
+ declare function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): import("solid-js").JSX.Element;
30
+ declare function DropdownMenuRadioItem(props: ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
25
31
  inset?: boolean;
26
- }): React.JSX.Element;
27
- declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): React.JSX.Element;
28
- declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
32
+ }): import("solid-js").JSX.Element;
33
+ declare function DropdownMenuSeparator(props: ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("solid-js").JSX.Element;
34
+ declare function DropdownMenuShortcut(props: ComponentProps<'span'>): import("solid-js").JSX.Element;
29
35
  export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };