@glasshome/ui 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/solid/bottom-sheet/arbitration.d.ts +2 -0
- package/dist/solid/bottom-sheet/bottom-sheet.d.ts +30 -0
- package/dist/solid/bottom-sheet/constants.d.ts +9 -0
- package/dist/solid/bottom-sheet/drag-controller.d.ts +12 -0
- package/dist/solid/bottom-sheet/focus-trap.d.ts +6 -0
- package/dist/solid/bottom-sheet/index.d.ts +2 -0
- package/dist/solid/bottom-sheet/keyboard.d.ts +4 -0
- package/dist/solid/bottom-sheet/scroll-lock.d.ts +2 -0
- package/dist/solid/bottom-sheet/state-machine.d.ts +3 -0
- package/dist/solid/bottom-sheet/velocity.d.ts +7 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.js +8713 -9575
- package/dist/{utils-eGXXUFl7.js → utils-TrrhThB-.js} +360 -289
- package/package.json +1 -2
- package/src/styles/globals.css +32 -0
package/dist/index.js
CHANGED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type Component, type ComponentProps, type JSX, type ParentComponent } from "solid-js";
|
|
2
|
+
import { type InitialFocus } from "./focus-trap";
|
|
3
|
+
interface BottomSheetRootProps {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
onOpenChange?: (open: boolean) => void;
|
|
7
|
+
dismissible?: boolean;
|
|
8
|
+
children: JSX.Element;
|
|
9
|
+
}
|
|
10
|
+
declare const BottomSheet: ParentComponent<BottomSheetRootProps>;
|
|
11
|
+
declare const BottomSheetTrigger: ParentComponent<ComponentProps<"button">>;
|
|
12
|
+
interface BottomSheetPortalProps {
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
mount?: Node;
|
|
15
|
+
}
|
|
16
|
+
declare const BottomSheetPortal: Component<BottomSheetPortalProps>;
|
|
17
|
+
declare const BottomSheetOverlay: Component<ComponentProps<"div">>;
|
|
18
|
+
interface BottomSheetContentProps extends ComponentProps<"div"> {
|
|
19
|
+
initialFocus?: InitialFocus;
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const BottomSheetContent: ParentComponent<BottomSheetContentProps>;
|
|
23
|
+
declare const BottomSheetHandle: Component<ComponentProps<"div">>;
|
|
24
|
+
declare const BottomSheetHeader: Component<ComponentProps<"div">>;
|
|
25
|
+
declare const BottomSheetTitle: Component<ComponentProps<"h2">>;
|
|
26
|
+
declare const BottomSheetDescription: Component<ComponentProps<"p">>;
|
|
27
|
+
declare const BottomSheetBody: Component<ComponentProps<"div">>;
|
|
28
|
+
declare const BottomSheetFooter: Component<ComponentProps<"div">>;
|
|
29
|
+
declare const BottomSheetClose: ParentComponent<ComponentProps<"button">>;
|
|
30
|
+
export { BottomSheet, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const EASE = "cubic-bezier(0.32, 0.72, 0, 1)";
|
|
2
|
+
export declare const TRANSITION_MS = 500;
|
|
3
|
+
export declare const TRANSITION_CSS = "transform 500ms cubic-bezier(0.32, 0.72, 0, 1), opacity 500ms cubic-bezier(0.32, 0.72, 0, 1)";
|
|
4
|
+
export declare const DEAD_ZONE_PX = 6;
|
|
5
|
+
export declare const CLOSE_DISTANCE_RATIO = 0.4;
|
|
6
|
+
export declare const CLOSE_VELOCITY_PX_PER_MS = 0.5;
|
|
7
|
+
export declare const VELOCITY_WINDOW_MS = 100;
|
|
8
|
+
export declare const VELOCITY_PROJECTION_MS = 200;
|
|
9
|
+
export declare const Z_BASE = 40;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SheetState } from "./state-machine";
|
|
2
|
+
interface DragHandle {
|
|
3
|
+
destroy: () => void;
|
|
4
|
+
}
|
|
5
|
+
interface DragOptions {
|
|
6
|
+
el: HTMLDivElement;
|
|
7
|
+
getState: () => SheetState;
|
|
8
|
+
setState: (s: SheetState) => void;
|
|
9
|
+
requestClose: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function attachDrag(opts: DragOptions): DragHandle;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { BottomSheet, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, } from "./bottom-sheet";
|
|
2
|
+
export type { SheetState } from "./state-machine";
|
package/dist/solid/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent,
|
|
|
5
5
|
export { AspectRatio } from "./aspect-ratio";
|
|
6
6
|
export { Avatar, AvatarFallback, AvatarImage } from "./avatar";
|
|
7
7
|
export { Badge, badgeVariants } from "./badge";
|
|
8
|
+
export { BottomSheet, BottomSheetBody, BottomSheetClose, BottomSheetContent, BottomSheetDescription, BottomSheetFooter, BottomSheetHandle, BottomSheetHeader, BottomSheetOverlay, BottomSheetPortal, BottomSheetTitle, BottomSheetTrigger, } from "./bottom-sheet";
|
|
8
9
|
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, } from "./breadcrumb";
|
|
9
10
|
export { Button, buttonVariants } from "./button";
|
|
10
11
|
export { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants, } from "./button-group";
|