@nexub/react 1.1.0 → 1.3.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.
@@ -1,92 +0,0 @@
1
- 'use client';
2
- import {
3
- glassSurfaceClass
4
- } from "./chunk-ROZVVWPV.js";
5
- import {
6
- cn
7
- } from "./chunk-AT6RPKU3.js";
8
-
9
- // src/components/Drawer/Drawer.tsx
10
- import * as React from "react";
11
- import { Drawer as VaulDrawer } from "vaul";
12
- import { jsx, jsxs } from "react/jsx-runtime";
13
- var Root = VaulDrawer.Root;
14
- var Trigger = VaulDrawer.Trigger;
15
- var Portal = VaulDrawer.Portal;
16
- var Close = VaulDrawer.Close;
17
- var Overlay = VaulDrawer.Overlay;
18
- var Content = React.forwardRef(({ className, children, side = "right", surface = "solid", ...props }, ref) => {
19
- const sideMap = {
20
- right: "inset-y-0 right-0 h-full w-3/4 max-w-sm border-l",
21
- left: "inset-y-0 left-0 h-full w-3/4 max-w-sm border-r",
22
- top: "inset-x-0 top-0 w-full border-b",
23
- bottom: "inset-x-0 bottom-0 w-full border-t rounded-t-2xl"
24
- };
25
- return /* @__PURE__ */ jsxs(
26
- VaulDrawer.Content,
27
- {
28
- ref,
29
- className: cn(
30
- "fixed z-[var(--z-modal)] flex flex-col bg-[var(--color-bg-default)] shadow-xl focus:outline-none",
31
- sideMap[side],
32
- surface === "glass" && glassSurfaceClass,
33
- className
34
- ),
35
- "data-material": surface === "glass" ? "glass" : void 0,
36
- ...props,
37
- children: [
38
- side === "bottom" && /* @__PURE__ */ jsx("div", { className: "mx-auto mt-4 h-2 w-20 rounded-full bg-[var(--color-border-default)]" }),
39
- children
40
- ]
41
- }
42
- );
43
- });
44
- Content.displayName = "Drawer.Content";
45
- var Title = React.forwardRef(
46
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
47
- VaulDrawer.Title,
48
- {
49
- ref,
50
- className: cn("text-lg font-semibold text-[var(--color-text-primary)]", className),
51
- ...props
52
- }
53
- )
54
- );
55
- Title.displayName = "Drawer.Title";
56
- var Description = React.forwardRef(
57
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx(
58
- VaulDrawer.Description,
59
- {
60
- ref,
61
- className: cn("text-sm text-[var(--color-text-muted)]", className),
62
- ...props
63
- }
64
- )
65
- );
66
- Description.displayName = "Drawer.Description";
67
- var Header = React.forwardRef(
68
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("flex flex-col gap-1.5 p-6", className), ...props })
69
- );
70
- Header.displayName = "Drawer.Header";
71
- var Footer = React.forwardRef(
72
- ({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mt-auto flex flex-col gap-2 p-6", className), ...props })
73
- );
74
- Footer.displayName = "Drawer.Footer";
75
- var Drawer = {
76
- Root,
77
- Trigger,
78
- Portal,
79
- Overlay,
80
- Content,
81
- Close,
82
- Title,
83
- Description,
84
- Header,
85
- Footer
86
- };
87
- var Sheet = Drawer;
88
-
89
- export {
90
- Drawer,
91
- Sheet
92
- };