@lglab/compose-ui 0.3.0 → 0.4.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.
@@ -0,0 +1,64 @@
1
+ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
2
+ import { ButtonSize, ButtonVariant } from '../lib/button-variants';
3
+ import * as React from 'react';
4
+ type AlertDialogRootProps = React.ComponentProps<typeof BaseAlertDialog.Root>;
5
+ declare const AlertDialogRoot: {
6
+ (props: AlertDialogRootProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ type AlertDialogTriggerProps = React.ComponentProps<typeof BaseAlertDialog.Trigger> & {
10
+ /** Visual style variant */
11
+ variant?: ButtonVariant;
12
+ /** Size of the trigger button */
13
+ size?: ButtonSize;
14
+ };
15
+ declare const AlertDialogTrigger: {
16
+ ({ className, variant, size, ...props }: AlertDialogTriggerProps): import("react/jsx-runtime").JSX.Element;
17
+ displayName: string;
18
+ };
19
+ type AlertDialogPortalProps = React.ComponentProps<typeof BaseAlertDialog.Portal>;
20
+ declare const AlertDialogPortal: {
21
+ (props: AlertDialogPortalProps): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ type AlertDialogBackdropProps = React.ComponentProps<typeof BaseAlertDialog.Backdrop>;
25
+ declare const AlertDialogBackdrop: {
26
+ ({ className, ...props }: AlertDialogBackdropProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ };
29
+ type AlertDialogViewportProps = React.ComponentProps<typeof BaseAlertDialog.Viewport>;
30
+ declare const AlertDialogViewport: {
31
+ ({ className, ...props }: AlertDialogViewportProps): import("react/jsx-runtime").JSX.Element;
32
+ displayName: string;
33
+ };
34
+ type AlertDialogPopupProps = React.ComponentProps<typeof BaseAlertDialog.Popup> & {
35
+ /** Size of the alert dialog popup */
36
+ size?: 'sm' | 'default' | 'lg' | 'xl' | 'full';
37
+ };
38
+ declare const AlertDialogPopup: {
39
+ ({ className, size, ...props }: AlertDialogPopupProps): import("react/jsx-runtime").JSX.Element;
40
+ displayName: string;
41
+ };
42
+ type AlertDialogTitleProps = React.ComponentProps<typeof BaseAlertDialog.Title>;
43
+ declare const AlertDialogTitle: {
44
+ ({ className, ...props }: AlertDialogTitleProps): import("react/jsx-runtime").JSX.Element;
45
+ displayName: string;
46
+ };
47
+ type AlertDialogDescriptionProps = React.ComponentProps<typeof BaseAlertDialog.Description>;
48
+ declare const AlertDialogDescription: {
49
+ ({ className, ...props }: AlertDialogDescriptionProps): import("react/jsx-runtime").JSX.Element;
50
+ displayName: string;
51
+ };
52
+ type AlertDialogCloseProps = React.ComponentProps<typeof BaseAlertDialog.Close> & {
53
+ /** Visual style variant */
54
+ variant?: ButtonVariant;
55
+ /** Size of the close button */
56
+ size?: ButtonSize;
57
+ };
58
+ declare const AlertDialogClose: {
59
+ ({ className, variant, size, ...props }: AlertDialogCloseProps): import("react/jsx-runtime").JSX.Element;
60
+ displayName: string;
61
+ };
62
+ export { AlertDialogRoot, AlertDialogTrigger, AlertDialogPortal, AlertDialogBackdrop, AlertDialogViewport, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription, AlertDialogClose, };
63
+ export type { AlertDialogRootProps, AlertDialogTriggerProps, AlertDialogPortalProps, AlertDialogBackdropProps, AlertDialogViewportProps, AlertDialogPopupProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogCloseProps, };
64
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EACL,KAAK,UAAU,EACf,KAAK,aAAa,EAEnB,MAAM,wBAAwB,CAAA;AAO/B,KAAK,oBAAoB,GAAG,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G,KAAK,CAAC,cAAc,CACrD,OAAO,eAAe,CAAC,WAAW,CACnC,CAAA;AAED,QAAA,MAAM,sBAAsB;8BAA6B,2BAA2B;;CAEnF,CAAA;AAQD,KAAK,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,GAAG;IAChF,2BAA2B;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,CAAA;AAED,QAAA,MAAM,gBAAgB;6CAKnB,qBAAqB;;CAOvB,CAAA;AAQD,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,CAAA;AAED,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,qBAAqB,GACtB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  export { Button } from './components/button';
2
+ export { AlertDialogRoot, AlertDialogTrigger, AlertDialogPortal, AlertDialogBackdrop, AlertDialogViewport, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription, AlertDialogClose, } from './components/alert-dialog';
3
+ export { AlertDialog } from '@base-ui/react/alert-dialog';
2
4
  export { ScrollAreaRoot, ScrollAreaViewport, ScrollAreaContent, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaCorner, } from './components/scroll-area';
3
5
  export { TabsRoot, TabsList, TabsTab, TabsIndicator, TabsPanel } from './components/tabs';
4
6
  export { DialogRoot, DialogTrigger, DialogPortal, DialogBackdrop, DialogPopup, DialogTitle, DialogDescription, DialogClose, DialogHeader, DialogFooter, } from './components/dialog';
5
7
  export { DrawerRoot, DrawerTrigger, DrawerPortal, DrawerBackdrop, DrawerPopup, DrawerTitle, DrawerDescription, DrawerClose, DrawerHeader, DrawerContent, DrawerFooter, } from './components/drawer';
6
8
  export { AccordionRoot, AccordionItem, AccordionHeader, AccordionTrigger, AccordionPanel, } from './components/accordion';
7
9
  export type { ButtonProps } from './components/button';
10
+ export type { AlertDialogRootProps, AlertDialogTriggerProps, AlertDialogPortalProps, AlertDialogBackdropProps, AlertDialogViewportProps, AlertDialogPopupProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogCloseProps, } from './components/alert-dialog';
8
11
  export type { ScrollAreaRootProps, ScrollAreaViewportProps, ScrollAreaContentProps, ScrollAreaScrollbarProps, ScrollAreaThumbProps, ScrollAreaCornerProps, } from './components/scroll-area';
9
12
  export type { TabsRootProps, TabsListProps, TabsTabProps, TabsIndicatorProps, TabsPanelProps, } from './components/tabs';
10
13
  export type { DialogRootProps, DialogTriggerProps, DialogPortalProps, DialogBackdropProps, DialogPopupProps, DialogTitleProps, DialogDescriptionProps, DialogCloseProps, DialogHeaderProps, DialogFooterProps, } from './components/dialog';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AACzF,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,YAAY,GACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,aAAa,EACb,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,cAAc,GACf,MAAM,wBAAwB,CAAA;AAE/B,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtD,YAAY,EACV,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EACV,aAAa,EACb,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,2BAA2B,CAAA;AAClC,OAA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B,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,wBAAwB,CAAA"}
package/dist/index.es.js CHANGED
@@ -1,14 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { Button as p } from "@base-ui/react/button";
3
+ import { Button as f } from "@base-ui/react/button";
4
4
  import { cva as n } from "class-variance-authority";
5
- import { clsx as f } from "clsx";
6
- import { twMerge as b } from "tailwind-merge";
7
- import { ScrollArea as i } from "@base-ui/react/scroll-area";
8
- import { Tabs as d } from "@base-ui/react/tabs";
9
- import { Dialog as s } from "@base-ui/react/dialog";
10
- import { Accordion as c } from "@base-ui/react/accordion";
11
- const u = n(
5
+ import { clsx as b } from "clsx";
6
+ import { twMerge as y } from "tailwind-merge";
7
+ import { AlertDialog as i } from "@base-ui/react/alert-dialog";
8
+ import { AlertDialog as Va } from "@base-ui/react/alert-dialog";
9
+ import { ScrollArea as c } from "@base-ui/react/scroll-area";
10
+ import { Tabs as g } from "@base-ui/react/tabs";
11
+ import { Dialog as l } from "@base-ui/react/dialog";
12
+ import { Accordion as u } from "@base-ui/react/accordion";
13
+ const d = n(
12
14
  [
13
15
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
14
16
  ],
@@ -37,74 +39,167 @@ const u = n(
37
39
  }
38
40
  }
39
41
  );
40
- function r(...e) {
41
- return b(f(e));
42
+ function r(...a) {
43
+ return y(b(a));
42
44
  }
43
- const y = ({
44
- className: e,
45
- variant: a,
45
+ const N = ({
46
+ className: a,
47
+ variant: e,
46
48
  size: o,
47
- disabled: l,
48
- children: m,
49
- ...g
49
+ disabled: s,
50
+ children: p,
51
+ ...m
50
52
  }) => /* @__PURE__ */ t(
51
- p,
53
+ f,
52
54
  {
53
- className: r(u({ variant: a, size: o }), e),
54
- disabled: l,
55
- ...g,
56
- children: m
55
+ className: r(d({ variant: e, size: o }), a),
56
+ disabled: s,
57
+ ...m,
58
+ children: p
57
59
  }
58
60
  );
59
- y.displayName = "Button";
60
- const v = ({ className: e, ...a }) => /* @__PURE__ */ t(i.Root, { className: r("relative", e), ...a });
61
- v.displayName = "ScrollAreaRoot";
62
- const N = ({ className: e, ...a }) => /* @__PURE__ */ t(
61
+ N.displayName = "Button";
62
+ const v = (a) => /* @__PURE__ */ t(i.Root, { ...a });
63
+ v.displayName = "AlertDialogRoot";
64
+ const x = ({
65
+ className: a,
66
+ variant: e,
67
+ size: o,
68
+ ...s
69
+ }) => /* @__PURE__ */ t(
70
+ i.Trigger,
71
+ {
72
+ className: r(d({ variant: e, size: o }), a),
73
+ ...s
74
+ }
75
+ );
76
+ x.displayName = "AlertDialogTrigger";
77
+ const D = (a) => /* @__PURE__ */ t(i.Portal, { ...a });
78
+ D.displayName = "AlertDialogPortal";
79
+ const h = ({ className: a, ...e }) => /* @__PURE__ */ t(
80
+ i.Backdrop,
81
+ {
82
+ className: r(
83
+ "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
84
+ "transition-opacity duration-200",
85
+ "data-starting-style:opacity-0 data-ending-style:opacity-0",
86
+ a
87
+ ),
88
+ ...e
89
+ }
90
+ );
91
+ h.displayName = "AlertDialogBackdrop";
92
+ const w = ({ className: a, ...e }) => /* @__PURE__ */ t(
63
93
  i.Viewport,
64
94
  {
65
- className: r("h-full overscroll-contain pr-3", e),
66
- ...a
95
+ className: r("fixed inset-0 z-50 flex items-center justify-center p-4", a),
96
+ ...e
97
+ }
98
+ );
99
+ w.displayName = "AlertDialogViewport";
100
+ const A = n(
101
+ [
102
+ "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
103
+ "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-6 shadow-lg",
104
+ "transition-all duration-200",
105
+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
106
+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
107
+ "top-[calc(50%+1.25rem*var(--nested-dialogs))] scale-[calc(1-0.1*var(--nested-dialogs))]",
108
+ "data-[nested-dialog-open]:after:absolute data-[nested-dialog-open]:after:inset-0 data-[nested-dialog-open]:after:rounded-[inherit] data-[nested-dialog-open]:after:bg-black/5"
109
+ ],
110
+ {
111
+ variants: {
112
+ size: {
113
+ sm: "w-sm",
114
+ default: "w-lg",
115
+ lg: "w-2xl",
116
+ xl: "w-4xl",
117
+ full: "h-[calc(100vh-2rem)]"
118
+ }
119
+ },
120
+ defaultVariants: {
121
+ size: "default"
122
+ }
123
+ }
124
+ ), T = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(
125
+ i.Popup,
126
+ {
127
+ className: r(A({ size: e }), a),
128
+ ...o
129
+ }
130
+ );
131
+ T.displayName = "AlertDialogPopup";
132
+ const k = ({ className: a, ...e }) => /* @__PURE__ */ t(
133
+ i.Title,
134
+ {
135
+ className: r("text-lg font-semibold leading-none tracking-tight", a),
136
+ ...e
137
+ }
138
+ );
139
+ k.displayName = "AlertDialogTitle";
140
+ const z = ({ className: a, ...e }) => /* @__PURE__ */ t(i.Description, { className: r("mt-2", a), ...e });
141
+ z.displayName = "AlertDialogDescription";
142
+ const P = ({
143
+ className: a,
144
+ variant: e,
145
+ size: o,
146
+ ...s
147
+ }) => /* @__PURE__ */ t(
148
+ i.Close,
149
+ {
150
+ className: r(d({ variant: e ?? "outline", size: o }), a),
151
+ ...s
152
+ }
153
+ );
154
+ P.displayName = "AlertDialogClose";
155
+ const V = ({ className: a, ...e }) => /* @__PURE__ */ t(c.Root, { className: r("relative", a), ...e });
156
+ V.displayName = "ScrollAreaRoot";
157
+ const R = ({ className: a, ...e }) => /* @__PURE__ */ t(
158
+ c.Viewport,
159
+ {
160
+ className: r("h-full overscroll-contain pr-3", a),
161
+ ...e
67
162
  }
68
163
  );
69
- N.displayName = "ScrollAreaViewport";
70
- const x = ({ className: e, ...a }) => /* @__PURE__ */ t(i.Content, { className: r("min-w-full", e), ...a });
71
- x.displayName = "ScrollAreaContent";
72
- const h = ({
73
- className: e,
74
- orientation: a = "vertical",
164
+ R.displayName = "ScrollAreaViewport";
165
+ const C = ({ className: a, ...e }) => /* @__PURE__ */ t(c.Content, { className: r("min-w-full", a), ...e });
166
+ C.displayName = "ScrollAreaContent";
167
+ const S = ({
168
+ className: a,
169
+ orientation: e = "vertical",
75
170
  ...o
76
171
  }) => /* @__PURE__ */ t(
77
- i.Scrollbar,
172
+ c.Scrollbar,
78
173
  {
79
174
  className: r(
80
175
  "flex touch-none select-none p-0.5 transition-colors duration-150 ease-out",
81
176
  "data-hovering:bg-muted/50",
82
- a === "vertical" && "h-full w-2.5",
83
- a === "horizontal" && "h-2.5 w-full flex-col",
84
- e
177
+ e === "vertical" && "h-full w-2.5",
178
+ e === "horizontal" && "h-2.5 w-full flex-col",
179
+ a
85
180
  ),
86
- orientation: a,
181
+ orientation: e,
87
182
  ...o
88
183
  }
89
184
  );
90
- h.displayName = "ScrollAreaScrollbar";
91
- const w = ({ className: e, ...a }) => /* @__PURE__ */ t(
92
- i.Thumb,
185
+ S.displayName = "ScrollAreaScrollbar";
186
+ const B = ({ className: a, ...e }) => /* @__PURE__ */ t(
187
+ c.Thumb,
93
188
  {
94
189
  className: r(
95
190
  "relative flex-1 rounded-full bg-border transition-colors",
96
191
  "hover:bg-muted-foreground/50",
97
- e
192
+ a
98
193
  ),
99
- ...a
194
+ ...e
100
195
  }
101
196
  );
102
- w.displayName = "ScrollAreaThumb";
103
- const D = ({ className: e, ...a }) => /* @__PURE__ */ t(i.Corner, { className: r("bg-muted/50", e), ...a });
104
- D.displayName = "ScrollAreaCorner";
105
- const T = ({ className: e, ...a }) => /* @__PURE__ */ t(d.Root, { className: r("flex flex-col", e), ...a });
106
- T.displayName = "TabsRoot";
107
- const k = n(
197
+ B.displayName = "ScrollAreaThumb";
198
+ const H = ({ className: a, ...e }) => /* @__PURE__ */ t(c.Corner, { className: r("bg-muted/50", a), ...e });
199
+ H.displayName = "ScrollAreaCorner";
200
+ const I = ({ className: a, ...e }) => /* @__PURE__ */ t(g.Root, { className: r("flex flex-col", a), ...e });
201
+ I.displayName = "TabsRoot";
202
+ const j = n(
108
203
  ["relative inline-flex w-fit items-center gap-1", "rounded-lg bg-muted p-1"],
109
204
  {
110
205
  variants: {
@@ -117,15 +212,15 @@ const k = n(
117
212
  orientation: "horizontal"
118
213
  }
119
214
  }
120
- ), A = ({ className: e, orientation: a = "horizontal", ...o }) => /* @__PURE__ */ t(
121
- d.List,
215
+ ), F = ({ className: a, orientation: e = "horizontal", ...o }) => /* @__PURE__ */ t(
216
+ g.List,
122
217
  {
123
- className: r(k({ orientation: a }), e),
218
+ className: r(j({ orientation: e }), a),
124
219
  ...o
125
220
  }
126
221
  );
127
- A.displayName = "TabsList";
128
- const z = n(
222
+ F.displayName = "TabsList";
223
+ const L = n(
129
224
  [
130
225
  "relative z-10 inline-flex items-center justify-center whitespace-nowrap",
131
226
  "rounded-md px-3 py-1.5 text-sm font-medium",
@@ -146,9 +241,9 @@ const z = n(
146
241
  size: "default"
147
242
  }
148
243
  }
149
- ), P = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(d.Tab, { className: r(z({ size: a }), e), ...o });
150
- P.displayName = "TabsTab";
151
- const S = n(
244
+ ), _ = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(g.Tab, { className: r(L({ size: e }), a), ...o });
245
+ _.displayName = "TabsTab";
246
+ const M = n(
152
247
  ["absolute rounded-md bg-background shadow-sm", "transition-all duration-200 ease-out"],
153
248
  {
154
249
  variants: {
@@ -161,46 +256,46 @@ const S = n(
161
256
  orientation: "horizontal"
162
257
  }
163
258
  }
164
- ), R = ({
165
- className: e,
166
- orientation: a = "horizontal",
259
+ ), $ = ({
260
+ className: a,
261
+ orientation: e = "horizontal",
167
262
  ...o
168
263
  }) => /* @__PURE__ */ t(
169
- d.Indicator,
264
+ g.Indicator,
170
265
  {
171
- className: r(S({ orientation: a }), e),
266
+ className: r(M({ orientation: e }), a),
172
267
  ...o
173
268
  }
174
269
  );
175
- R.displayName = "TabsIndicator";
176
- const V = ({ className: e, ...a }) => /* @__PURE__ */ t(d.Panel, { className: r("mt-2 ring-offset-background", e), ...a });
177
- V.displayName = "TabsPanel";
178
- const C = (e) => /* @__PURE__ */ t(s.Root, { ...e });
179
- C.displayName = "DialogRoot";
180
- const B = ({ className: e, variant: a, size: o, ...l }) => /* @__PURE__ */ t(
181
- s.Trigger,
270
+ $.displayName = "TabsIndicator";
271
+ const q = ({ className: a, ...e }) => /* @__PURE__ */ t(g.Panel, { className: r("mt-2 ring-offset-background", a), ...e });
272
+ q.displayName = "TabsPanel";
273
+ const E = (a) => /* @__PURE__ */ t(l.Root, { ...a });
274
+ E.displayName = "DialogRoot";
275
+ const G = ({ className: a, variant: e, size: o, ...s }) => /* @__PURE__ */ t(
276
+ l.Trigger,
182
277
  {
183
- className: r(u({ variant: a, size: o }), e),
184
- ...l
278
+ className: r(d({ variant: e, size: o }), a),
279
+ ...s
185
280
  }
186
281
  );
187
- B.displayName = "DialogTrigger";
188
- const H = (e) => /* @__PURE__ */ t(s.Portal, { ...e });
189
- H.displayName = "DialogPortal";
190
- const I = ({ className: e, ...a }) => /* @__PURE__ */ t(
191
- s.Backdrop,
282
+ G.displayName = "DialogTrigger";
283
+ const J = (a) => /* @__PURE__ */ t(l.Portal, { ...a });
284
+ J.displayName = "DialogPortal";
285
+ const K = ({ className: a, ...e }) => /* @__PURE__ */ t(
286
+ l.Backdrop,
192
287
  {
193
288
  className: r(
194
289
  "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
195
290
  "transition-opacity duration-200",
196
291
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
197
- e
292
+ a
198
293
  ),
199
- ...a
294
+ ...e
200
295
  }
201
296
  );
202
- I.displayName = "DialogBackdrop";
203
- const j = n(
297
+ K.displayName = "DialogBackdrop";
298
+ const O = n(
204
299
  [
205
300
  "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
206
301
  "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-6 shadow-lg",
@@ -224,71 +319,71 @@ const j = n(
224
319
  size: "default"
225
320
  }
226
321
  }
227
- ), F = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(
228
- s.Popup,
322
+ ), Q = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(
323
+ l.Popup,
229
324
  {
230
- className: r(j({ size: a }), e),
325
+ className: r(O({ size: e }), a),
231
326
  ...o
232
327
  }
233
328
  );
234
- F.displayName = "DialogPopup";
235
- const L = ({ className: e, ...a }) => /* @__PURE__ */ t(
236
- s.Title,
329
+ Q.displayName = "DialogPopup";
330
+ const U = ({ className: a, ...e }) => /* @__PURE__ */ t(
331
+ l.Title,
237
332
  {
238
- className: r("text-lg font-semibold leading-none tracking-tight", e),
239
- ...a
333
+ className: r("text-lg font-semibold leading-none tracking-tight", a),
334
+ ...e
240
335
  }
241
336
  );
242
- L.displayName = "DialogTitle";
243
- const _ = ({ className: e, ...a }) => /* @__PURE__ */ t(s.Description, { className: r("mt-2", e), ...a });
244
- _.displayName = "DialogDescription";
245
- const M = ({ className: e, variant: a, size: o, ...l }) => /* @__PURE__ */ t(
246
- s.Close,
337
+ U.displayName = "DialogTitle";
338
+ const W = ({ className: a, ...e }) => /* @__PURE__ */ t(l.Description, { className: r("mt-2", a), ...e });
339
+ W.displayName = "DialogDescription";
340
+ const X = ({ className: a, variant: e, size: o, ...s }) => /* @__PURE__ */ t(
341
+ l.Close,
247
342
  {
248
- className: r(u({ variant: a ?? "outline", size: o }), e),
249
- ...l
343
+ className: r(d({ variant: e ?? "outline", size: o }), a),
344
+ ...s
250
345
  }
251
346
  );
252
- M.displayName = "DialogClose";
253
- const $ = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1 mb-5", e), ...a });
254
- $.displayName = "DialogHeader";
255
- const q = ({ className: e, ...a }) => /* @__PURE__ */ t(
347
+ X.displayName = "DialogClose";
348
+ const Y = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1 mb-5", a), ...e });
349
+ Y.displayName = "DialogHeader";
350
+ const Z = ({ className: a, ...e }) => /* @__PURE__ */ t(
256
351
  "div",
257
352
  {
258
353
  className: r(
259
354
  "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
260
- e
355
+ a
261
356
  ),
262
- ...a
357
+ ...e
263
358
  }
264
359
  );
265
- q.displayName = "DialogFooter";
266
- const E = (e) => /* @__PURE__ */ t(s.Root, { ...e });
267
- E.displayName = "DrawerRoot";
268
- const G = ({ className: e, variant: a, size: o, ...l }) => /* @__PURE__ */ t(
269
- s.Trigger,
360
+ Z.displayName = "DialogFooter";
361
+ const aa = (a) => /* @__PURE__ */ t(l.Root, { ...a });
362
+ aa.displayName = "DrawerRoot";
363
+ const ea = ({ className: a, variant: e, size: o, ...s }) => /* @__PURE__ */ t(
364
+ l.Trigger,
270
365
  {
271
- className: r(u({ variant: a, size: o }), e),
272
- ...l
366
+ className: r(d({ variant: e, size: o }), a),
367
+ ...s
273
368
  }
274
369
  );
275
- G.displayName = "DrawerTrigger";
276
- const J = (e) => /* @__PURE__ */ t(s.Portal, { ...e });
277
- J.displayName = "DrawerPortal";
278
- const K = ({ className: e, ...a }) => /* @__PURE__ */ t(
279
- s.Backdrop,
370
+ ea.displayName = "DrawerTrigger";
371
+ const ta = (a) => /* @__PURE__ */ t(l.Portal, { ...a });
372
+ ta.displayName = "DrawerPortal";
373
+ const ra = ({ className: a, ...e }) => /* @__PURE__ */ t(
374
+ l.Backdrop,
280
375
  {
281
376
  className: r(
282
377
  "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
283
378
  "transition-opacity duration-300",
284
379
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
285
- e
380
+ a
286
381
  ),
287
- ...a
382
+ ...e
288
383
  }
289
384
  );
290
- K.displayName = "DrawerBackdrop";
291
- const O = n(
385
+ ra.displayName = "DrawerBackdrop";
386
+ const oa = n(
292
387
  [
293
388
  "fixed z-50 flex flex-col bg-background p-6 shadow-lg",
294
389
  "transition-transform duration-300 ease-out",
@@ -324,110 +419,120 @@ const O = n(
324
419
  side: "right"
325
420
  }
326
421
  }
327
- ), Q = ({ className: e, side: a, ...o }) => /* @__PURE__ */ t(
328
- s.Popup,
422
+ ), la = ({ className: a, side: e, ...o }) => /* @__PURE__ */ t(
423
+ l.Popup,
329
424
  {
330
- className: r(O({ side: a }), e),
425
+ className: r(oa({ side: e }), a),
331
426
  ...o
332
427
  }
333
428
  );
334
- Q.displayName = "DrawerPopup";
335
- const U = ({ className: e, ...a }) => /* @__PURE__ */ t(
336
- s.Title,
429
+ la.displayName = "DrawerPopup";
430
+ const sa = ({ className: a, ...e }) => /* @__PURE__ */ t(
431
+ l.Title,
337
432
  {
338
- className: r("text-lg font-semibold leading-none tracking-tight", e),
339
- ...a
433
+ className: r("text-lg font-semibold leading-none tracking-tight", a),
434
+ ...e
340
435
  }
341
436
  );
342
- U.displayName = "DrawerTitle";
343
- const W = ({ className: e, ...a }) => /* @__PURE__ */ t(s.Description, { className: r("", e), ...a });
344
- W.displayName = "DrawerDescription";
345
- const X = ({ className: e, variant: a, size: o, ...l }) => /* @__PURE__ */ t(
346
- s.Close,
437
+ sa.displayName = "DrawerTitle";
438
+ const ia = ({ className: a, ...e }) => /* @__PURE__ */ t(l.Description, { className: r("", a), ...e });
439
+ ia.displayName = "DrawerDescription";
440
+ const na = ({ className: a, variant: e, size: o, ...s }) => /* @__PURE__ */ t(
441
+ l.Close,
347
442
  {
348
- className: r(u({ variant: a ?? "outline", size: o }), e),
349
- ...l
443
+ className: r(d({ variant: e ?? "outline", size: o }), a),
444
+ ...s
350
445
  }
351
446
  );
352
- X.displayName = "DrawerClose";
353
- const Y = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1.5", e), ...a });
354
- Y.displayName = "DrawerHeader";
355
- const Z = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("py-5", e), ...a });
356
- Z.displayName = "DrawerContent";
357
- const ee = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("", e), ...a });
358
- ee.displayName = "DrawerFooter";
359
- const ae = ({ className: e, ...a }) => /* @__PURE__ */ t(c.Root, { className: r("w-full", e), ...a });
360
- ae.displayName = "AccordionRoot";
361
- const te = ({ className: e, ...a }) => /* @__PURE__ */ t(
362
- c.Item,
363
- {
364
- className: r("border-b border-border last:border-b-0", e),
365
- ...a
447
+ na.displayName = "DrawerClose";
448
+ const da = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1.5", a), ...e });
449
+ da.displayName = "DrawerHeader";
450
+ const ca = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: r("py-5", a), ...e });
451
+ ca.displayName = "DrawerContent";
452
+ const ga = ({ className: a, ...e }) => /* @__PURE__ */ t("div", { className: r("", a), ...e });
453
+ ga.displayName = "DrawerFooter";
454
+ const ua = ({ className: a, ...e }) => /* @__PURE__ */ t(u.Root, { className: r("w-full", a), ...e });
455
+ ua.displayName = "AccordionRoot";
456
+ const pa = ({ className: a, ...e }) => /* @__PURE__ */ t(
457
+ u.Item,
458
+ {
459
+ className: r("border-b border-border last:border-b-0", a),
460
+ ...e
366
461
  }
367
462
  );
368
- te.displayName = "AccordionItem";
369
- const re = ({ className: e, ...a }) => /* @__PURE__ */ t(c.Header, { className: r("flex", e), ...a });
370
- re.displayName = "AccordionHeader";
371
- const oe = ({ className: e, children: a, ...o }) => /* @__PURE__ */ t(
372
- c.Trigger,
463
+ pa.displayName = "AccordionItem";
464
+ const ma = ({ className: a, ...e }) => /* @__PURE__ */ t(u.Header, { className: r("flex", a), ...e });
465
+ ma.displayName = "AccordionHeader";
466
+ const fa = ({ className: a, children: e, ...o }) => /* @__PURE__ */ t(
467
+ u.Trigger,
373
468
  {
374
469
  className: r(
375
470
  "flex flex-1 items-center justify-between py-3 font-medium",
376
- e
471
+ a
377
472
  ),
378
473
  ...o,
379
- children: a
474
+ children: e
380
475
  }
381
476
  );
382
- oe.displayName = "AccordionTrigger";
383
- const se = ({ className: e, ...a }) => /* @__PURE__ */ t(
384
- c.Panel,
477
+ fa.displayName = "AccordionTrigger";
478
+ const ba = ({ className: a, ...e }) => /* @__PURE__ */ t(
479
+ u.Panel,
385
480
  {
386
481
  className: r(
387
482
  "overflow-hidden duration-200 h-(--accordion-panel-height) transition-height ease-out data-ending-style:h-0 data-starting-style:h-0",
388
- e
483
+ a
389
484
  ),
390
- ...a
485
+ ...e
391
486
  }
392
487
  );
393
- se.displayName = "AccordionPanel";
488
+ ba.displayName = "AccordionPanel";
394
489
  export {
395
- re as AccordionHeader,
396
- te as AccordionItem,
397
- se as AccordionPanel,
398
- ae as AccordionRoot,
399
- oe as AccordionTrigger,
400
- y as Button,
401
- I as DialogBackdrop,
402
- M as DialogClose,
403
- _ as DialogDescription,
404
- q as DialogFooter,
405
- $ as DialogHeader,
406
- F as DialogPopup,
407
- H as DialogPortal,
408
- C as DialogRoot,
409
- L as DialogTitle,
410
- B as DialogTrigger,
411
- K as DrawerBackdrop,
412
- X as DrawerClose,
413
- Z as DrawerContent,
414
- W as DrawerDescription,
415
- ee as DrawerFooter,
416
- Y as DrawerHeader,
417
- Q as DrawerPopup,
418
- J as DrawerPortal,
419
- E as DrawerRoot,
420
- U as DrawerTitle,
421
- G as DrawerTrigger,
422
- x as ScrollAreaContent,
423
- D as ScrollAreaCorner,
424
- v as ScrollAreaRoot,
425
- h as ScrollAreaScrollbar,
426
- w as ScrollAreaThumb,
427
- N as ScrollAreaViewport,
428
- R as TabsIndicator,
429
- A as TabsList,
430
- V as TabsPanel,
431
- T as TabsRoot,
432
- P as TabsTab
490
+ ma as AccordionHeader,
491
+ pa as AccordionItem,
492
+ ba as AccordionPanel,
493
+ ua as AccordionRoot,
494
+ fa as AccordionTrigger,
495
+ Va as AlertDialog,
496
+ h as AlertDialogBackdrop,
497
+ P as AlertDialogClose,
498
+ z as AlertDialogDescription,
499
+ T as AlertDialogPopup,
500
+ D as AlertDialogPortal,
501
+ v as AlertDialogRoot,
502
+ k as AlertDialogTitle,
503
+ x as AlertDialogTrigger,
504
+ w as AlertDialogViewport,
505
+ N as Button,
506
+ K as DialogBackdrop,
507
+ X as DialogClose,
508
+ W as DialogDescription,
509
+ Z as DialogFooter,
510
+ Y as DialogHeader,
511
+ Q as DialogPopup,
512
+ J as DialogPortal,
513
+ E as DialogRoot,
514
+ U as DialogTitle,
515
+ G as DialogTrigger,
516
+ ra as DrawerBackdrop,
517
+ na as DrawerClose,
518
+ ca as DrawerContent,
519
+ ia as DrawerDescription,
520
+ ga as DrawerFooter,
521
+ da as DrawerHeader,
522
+ la as DrawerPopup,
523
+ ta as DrawerPortal,
524
+ aa as DrawerRoot,
525
+ sa as DrawerTitle,
526
+ ea as DrawerTrigger,
527
+ C as ScrollAreaContent,
528
+ H as ScrollAreaCorner,
529
+ V as ScrollAreaRoot,
530
+ S as ScrollAreaScrollbar,
531
+ B as ScrollAreaThumb,
532
+ R as ScrollAreaViewport,
533
+ $ as TabsIndicator,
534
+ F as TabsList,
535
+ q as TabsPanel,
536
+ I as TabsRoot,
537
+ _ as TabsTab
433
538
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lglab/compose-ui",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "A collection of components built with Base UI & Tailwind CSS",
5
5
  "author": "LGLab",
6
6
  "license": "MIT",