@lglab/compose-ui 0.4.0 → 0.5.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,38 @@
1
+ import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
2
+ import * as React from 'react';
3
+ type AvatarSize = 'sm' | 'default' | 'lg';
4
+ type AvatarRootProps = React.ComponentProps<typeof BaseAvatar.Root> & {
5
+ /** Size of the avatar */
6
+ size?: AvatarSize;
7
+ };
8
+ declare const AvatarRoot: {
9
+ ({ className, size, ...props }: AvatarRootProps): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ type AvatarImageProps = React.ComponentProps<typeof BaseAvatar.Image>;
13
+ declare const AvatarImage: {
14
+ ({ className, ...props }: AvatarImageProps): import("react/jsx-runtime").JSX.Element;
15
+ displayName: string;
16
+ };
17
+ type AvatarFallbackProps = React.ComponentProps<typeof BaseAvatar.Fallback>;
18
+ declare const AvatarFallback: {
19
+ ({ className, ...props }: AvatarFallbackProps): import("react/jsx-runtime").JSX.Element;
20
+ displayName: string;
21
+ };
22
+ type AvatarStackProps = {
23
+ /** ARIA label for the avatar stack list */
24
+ 'aria-label': string;
25
+ /** Maximum number of avatars to display before showing overflow indicator */
26
+ maxVisible?: number;
27
+ /** Additional CSS classes */
28
+ className?: string;
29
+ /** Avatar components to display */
30
+ children: React.ReactNode;
31
+ };
32
+ declare const AvatarStack: {
33
+ ({ "aria-label": ariaLabel, maxVisible, className, children, }: AvatarStackProps): import("react/jsx-runtime").JSX.Element;
34
+ displayName: string;
35
+ };
36
+ export { AvatarRoot, AvatarImage, AvatarFallback, AvatarStack };
37
+ export type { AvatarRootProps, AvatarImageProps, AvatarFallbackProps, AvatarStackProps };
38
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA4B9B,KAAK,UAAU,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAA;AAMzC,KAAK,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG;IACpE,yBAAyB;IACzB,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,CAAA;AAED,QAAA,MAAM,UAAU;oCAAmC,eAAe;;CAIjE,CAAA;AAQD,KAAK,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAA;AAErE,QAAA,MAAM,WAAW;8BAA6B,gBAAgB;;CAO7D,CAAA;AAQD,KAAK,mBAAmB,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAA;AAE3E,QAAA,MAAM,cAAc;8BAA6B,mBAAmB;;CAUnE,CAAA;AAQD,KAAK,gBAAgB,GAAG;IACtB,2CAA2C;IAC3C,YAAY,EAAE,MAAM,CAAA;IACpB,6EAA6E;IAC7E,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mCAAmC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,WAAW;oEAKd,gBAAgB;;CAyClB,CAAA;AAQD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAA;AAE/D,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  export { Button } from './components/button';
2
2
  export { AlertDialogRoot, AlertDialogTrigger, AlertDialogPortal, AlertDialogBackdrop, AlertDialogViewport, AlertDialogPopup, AlertDialogTitle, AlertDialogDescription, AlertDialogClose, } from './components/alert-dialog';
3
3
  export { AlertDialog } from '@base-ui/react/alert-dialog';
4
+ export { AvatarRoot, AvatarImage, AvatarFallback, AvatarStack } from './components/avatar';
5
+ export { Avatar } from '@base-ui/react/avatar';
4
6
  export { ScrollAreaRoot, ScrollAreaViewport, ScrollAreaContent, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaCorner, } from './components/scroll-area';
5
7
  export { TabsRoot, TabsList, TabsTab, TabsIndicator, TabsPanel } from './components/tabs';
6
8
  export { DialogRoot, DialogTrigger, DialogPortal, DialogBackdrop, DialogPopup, DialogTitle, DialogDescription, DialogClose, DialogHeader, DialogFooter, } from './components/dialog';
@@ -8,6 +10,7 @@ export { DrawerRoot, DrawerTrigger, DrawerPortal, DrawerBackdrop, DrawerPopup, D
8
10
  export { AccordionRoot, AccordionItem, AccordionHeader, AccordionTrigger, AccordionPanel, } from './components/accordion';
9
11
  export type { ButtonProps } from './components/button';
10
12
  export type { AlertDialogRootProps, AlertDialogTriggerProps, AlertDialogPortalProps, AlertDialogBackdropProps, AlertDialogViewportProps, AlertDialogPopupProps, AlertDialogTitleProps, AlertDialogDescriptionProps, AlertDialogCloseProps, } from './components/alert-dialog';
13
+ export type { AvatarRootProps, AvatarImageProps, AvatarFallbackProps, AvatarStackProps, } from './components/avatar';
11
14
  export type { ScrollAreaRootProps, ScrollAreaViewportProps, ScrollAreaContentProps, ScrollAreaScrollbarProps, ScrollAreaThumbProps, ScrollAreaCornerProps, } from './components/scroll-area';
12
15
  export type { TabsRootProps, TabsListProps, TabsTabProps, TabsIndicatorProps, TabsPanelProps, } from './components/tabs';
13
16
  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/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,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,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC1F,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,QAAQ,EAAE,QAA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,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,15 +1,18 @@
1
1
  "use client";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { Button as f } from "@base-ui/react/button";
2
+ import { jsx as t, jsxs as x } from "react/jsx-runtime";
3
+ import { Button as T } from "@base-ui/react/button";
4
4
  import { cva as n } from "class-variance-authority";
5
- import { clsx as b } from "clsx";
6
- import { twMerge as y } from "tailwind-merge";
5
+ import { clsx as z } from "clsx";
6
+ import { twMerge as P } from "tailwind-merge";
7
7
  import { AlertDialog as i } from "@base-ui/react/alert-dialog";
8
- import { AlertDialog as Va } from "@base-ui/react/alert-dialog";
8
+ import { AlertDialog as Je } from "@base-ui/react/alert-dialog";
9
+ import { Avatar as b } from "@base-ui/react/avatar";
10
+ import { Avatar as Oe } from "@base-ui/react/avatar";
11
+ import * as h from "react";
9
12
  import { ScrollArea as c } from "@base-ui/react/scroll-area";
10
- import { Tabs as g } from "@base-ui/react/tabs";
13
+ import { Tabs as p } from "@base-ui/react/tabs";
11
14
  import { Dialog as l } from "@base-ui/react/dialog";
12
- import { Accordion as u } from "@base-ui/react/accordion";
15
+ import { Accordion as f } from "@base-ui/react/accordion";
13
16
  const d = n(
14
17
  [
15
18
  "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"
@@ -39,65 +42,65 @@ const d = n(
39
42
  }
40
43
  }
41
44
  );
42
- function r(...a) {
43
- return y(b(a));
45
+ function r(...e) {
46
+ return P(z(e));
44
47
  }
45
- const N = ({
46
- className: a,
47
- variant: e,
48
+ const C = ({
49
+ className: e,
50
+ variant: a,
48
51
  size: o,
49
52
  disabled: s,
50
- children: p,
53
+ children: u,
51
54
  ...m
52
55
  }) => /* @__PURE__ */ t(
53
- f,
56
+ T,
54
57
  {
55
- className: r(d({ variant: e, size: o }), a),
58
+ className: r(d({ variant: a, size: o }), e),
56
59
  disabled: s,
57
60
  ...m,
58
- children: p
61
+ children: u
59
62
  }
60
63
  );
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,
64
+ C.displayName = "Button";
65
+ const R = (e) => /* @__PURE__ */ t(i.Root, { ...e });
66
+ R.displayName = "AlertDialogRoot";
67
+ const V = ({
68
+ className: e,
69
+ variant: a,
67
70
  size: o,
68
71
  ...s
69
72
  }) => /* @__PURE__ */ t(
70
73
  i.Trigger,
71
74
  {
72
- className: r(d({ variant: e, size: o }), a),
75
+ className: r(d({ variant: a, size: o }), e),
73
76
  ...s
74
77
  }
75
78
  );
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(
79
+ V.displayName = "AlertDialogTrigger";
80
+ const S = (e) => /* @__PURE__ */ t(i.Portal, { ...e });
81
+ S.displayName = "AlertDialogPortal";
82
+ const B = ({ className: e, ...a }) => /* @__PURE__ */ t(
80
83
  i.Backdrop,
81
84
  {
82
85
  className: r(
83
86
  "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
84
87
  "transition-opacity duration-200",
85
88
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
86
- a
89
+ e
87
90
  ),
88
- ...e
91
+ ...a
89
92
  }
90
93
  );
91
- h.displayName = "AlertDialogBackdrop";
92
- const w = ({ className: a, ...e }) => /* @__PURE__ */ t(
94
+ B.displayName = "AlertDialogBackdrop";
95
+ const j = ({ className: e, ...a }) => /* @__PURE__ */ t(
93
96
  i.Viewport,
94
97
  {
95
- className: r("fixed inset-0 z-50 flex items-center justify-center p-4", a),
96
- ...e
98
+ className: r("fixed inset-0 z-50 flex items-center justify-center p-4", e),
99
+ ...a
97
100
  }
98
101
  );
99
- w.displayName = "AlertDialogViewport";
100
- const A = n(
102
+ j.displayName = "AlertDialogViewport";
103
+ const F = n(
101
104
  [
102
105
  "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
103
106
  "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-6 shadow-lg",
@@ -121,52 +124,121 @@ const A = n(
121
124
  size: "default"
122
125
  }
123
126
  }
124
- ), T = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(
127
+ ), I = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(
125
128
  i.Popup,
126
129
  {
127
- className: r(A({ size: e }), a),
130
+ className: r(F({ size: a }), e),
128
131
  ...o
129
132
  }
130
133
  );
131
- T.displayName = "AlertDialogPopup";
132
- const k = ({ className: a, ...e }) => /* @__PURE__ */ t(
134
+ I.displayName = "AlertDialogPopup";
135
+ const H = ({ className: e, ...a }) => /* @__PURE__ */ t(
133
136
  i.Title,
134
137
  {
135
- className: r("text-lg font-semibold leading-none tracking-tight", a),
136
- ...e
138
+ className: r("text-lg font-semibold leading-none tracking-tight", e),
139
+ ...a
137
140
  }
138
141
  );
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,
142
+ H.displayName = "AlertDialogTitle";
143
+ const L = ({ className: e, ...a }) => /* @__PURE__ */ t(i.Description, { className: r("mt-2", e), ...a });
144
+ L.displayName = "AlertDialogDescription";
145
+ const _ = ({
146
+ className: e,
147
+ variant: a,
145
148
  size: o,
146
149
  ...s
147
150
  }) => /* @__PURE__ */ t(
148
151
  i.Close,
149
152
  {
150
- className: r(d({ variant: e ?? "outline", size: o }), a),
153
+ className: r(d({ variant: a ?? "outline", size: o }), e),
151
154
  ...s
152
155
  }
153
156
  );
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(
157
+ _.displayName = "AlertDialogClose";
158
+ const w = n(
159
+ [
160
+ "relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",
161
+ "bg-muted text-foreground",
162
+ "border-2 border-background"
163
+ ],
164
+ {
165
+ variants: {
166
+ size: {
167
+ sm: "size-8 text-xs",
168
+ default: "size-10 text-sm",
169
+ lg: "size-12 text-base"
170
+ }
171
+ },
172
+ defaultVariants: {
173
+ size: "default"
174
+ }
175
+ }
176
+ ), D = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(b.Root, { className: r(w({ size: a }), e), ...o });
177
+ D.displayName = "AvatarRoot";
178
+ const M = ({ className: e, ...a }) => /* @__PURE__ */ t(
179
+ b.Image,
180
+ {
181
+ className: r("aspect-square h-full w-full object-cover", e),
182
+ ...a
183
+ }
184
+ );
185
+ M.displayName = "AvatarImage";
186
+ const q = ({ className: e, ...a }) => /* @__PURE__ */ t(
187
+ b.Fallback,
188
+ {
189
+ className: r(
190
+ "flex h-full w-full items-center justify-center font-medium",
191
+ e
192
+ ),
193
+ ...a
194
+ }
195
+ );
196
+ q.displayName = "AvatarFallback";
197
+ const E = ({
198
+ "aria-label": e,
199
+ maxVisible: a,
200
+ className: o,
201
+ children: s
202
+ }) => {
203
+ const u = h.Children.toArray(s), m = u.length, y = a !== void 0 ? Math.min(a, m) : m, v = m - y, A = u.slice(0, y), k = (() => {
204
+ const g = u[0];
205
+ return h.isValidElement(g) && g.type === D ? g.props.size ?? "default" : "default";
206
+ })();
207
+ return /* @__PURE__ */ x("ul", { "aria-label": e, className: r("flex -space-x-2", o), children: [
208
+ A.map((g, N) => /* @__PURE__ */ t("li", { children: g }, N)),
209
+ v > 0 && /* @__PURE__ */ t("li", { children: /* @__PURE__ */ x(
210
+ "span",
211
+ {
212
+ className: r(
213
+ "relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",
214
+ "bg-muted text-foreground border-2 border-background",
215
+ "font-medium",
216
+ w({ size: k })
217
+ ),
218
+ children: [
219
+ "+",
220
+ v
221
+ ]
222
+ }
223
+ ) })
224
+ ] });
225
+ };
226
+ E.displayName = "AvatarStack";
227
+ const $ = ({ className: e, ...a }) => /* @__PURE__ */ t(c.Root, { className: r("relative", e), ...a });
228
+ $.displayName = "ScrollAreaRoot";
229
+ const G = ({ className: e, ...a }) => /* @__PURE__ */ t(
158
230
  c.Viewport,
159
231
  {
160
- className: r("h-full overscroll-contain pr-3", a),
161
- ...e
232
+ className: r("h-full overscroll-contain pr-3", e),
233
+ ...a
162
234
  }
163
235
  );
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",
236
+ G.displayName = "ScrollAreaViewport";
237
+ const J = ({ className: e, ...a }) => /* @__PURE__ */ t(c.Content, { className: r("min-w-full", e), ...a });
238
+ J.displayName = "ScrollAreaContent";
239
+ const K = ({
240
+ className: e,
241
+ orientation: a = "vertical",
170
242
  ...o
171
243
  }) => /* @__PURE__ */ t(
172
244
  c.Scrollbar,
@@ -174,32 +246,32 @@ const S = ({
174
246
  className: r(
175
247
  "flex touch-none select-none p-0.5 transition-colors duration-150 ease-out",
176
248
  "data-hovering:bg-muted/50",
177
- e === "vertical" && "h-full w-2.5",
178
- e === "horizontal" && "h-2.5 w-full flex-col",
179
- a
249
+ a === "vertical" && "h-full w-2.5",
250
+ a === "horizontal" && "h-2.5 w-full flex-col",
251
+ e
180
252
  ),
181
- orientation: e,
253
+ orientation: a,
182
254
  ...o
183
255
  }
184
256
  );
185
- S.displayName = "ScrollAreaScrollbar";
186
- const B = ({ className: a, ...e }) => /* @__PURE__ */ t(
257
+ K.displayName = "ScrollAreaScrollbar";
258
+ const O = ({ className: e, ...a }) => /* @__PURE__ */ t(
187
259
  c.Thumb,
188
260
  {
189
261
  className: r(
190
262
  "relative flex-1 rounded-full bg-border transition-colors",
191
263
  "hover:bg-muted-foreground/50",
192
- a
264
+ e
193
265
  ),
194
- ...e
266
+ ...a
195
267
  }
196
268
  );
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(
269
+ O.displayName = "ScrollAreaThumb";
270
+ const Q = ({ className: e, ...a }) => /* @__PURE__ */ t(c.Corner, { className: r("bg-muted/50", e), ...a });
271
+ Q.displayName = "ScrollAreaCorner";
272
+ const U = ({ className: e, ...a }) => /* @__PURE__ */ t(p.Root, { className: r("flex flex-col", e), ...a });
273
+ U.displayName = "TabsRoot";
274
+ const W = n(
203
275
  ["relative inline-flex w-fit items-center gap-1", "rounded-lg bg-muted p-1"],
204
276
  {
205
277
  variants: {
@@ -212,15 +284,15 @@ const j = n(
212
284
  orientation: "horizontal"
213
285
  }
214
286
  }
215
- ), F = ({ className: a, orientation: e = "horizontal", ...o }) => /* @__PURE__ */ t(
216
- g.List,
287
+ ), X = ({ className: e, orientation: a = "horizontal", ...o }) => /* @__PURE__ */ t(
288
+ p.List,
217
289
  {
218
- className: r(j({ orientation: e }), a),
290
+ className: r(W({ orientation: a }), e),
219
291
  ...o
220
292
  }
221
293
  );
222
- F.displayName = "TabsList";
223
- const L = n(
294
+ X.displayName = "TabsList";
295
+ const Y = n(
224
296
  [
225
297
  "relative z-10 inline-flex items-center justify-center whitespace-nowrap",
226
298
  "rounded-md px-3 py-1.5 text-sm font-medium",
@@ -241,9 +313,9 @@ const L = n(
241
313
  size: "default"
242
314
  }
243
315
  }
244
- ), _ = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(g.Tab, { className: r(L({ size: e }), a), ...o });
245
- _.displayName = "TabsTab";
246
- const M = n(
316
+ ), Z = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(p.Tab, { className: r(Y({ size: a }), e), ...o });
317
+ Z.displayName = "TabsTab";
318
+ const ee = n(
247
319
  ["absolute rounded-md bg-background shadow-sm", "transition-all duration-200 ease-out"],
248
320
  {
249
321
  variants: {
@@ -256,46 +328,46 @@ const M = n(
256
328
  orientation: "horizontal"
257
329
  }
258
330
  }
259
- ), $ = ({
260
- className: a,
261
- orientation: e = "horizontal",
331
+ ), ae = ({
332
+ className: e,
333
+ orientation: a = "horizontal",
262
334
  ...o
263
335
  }) => /* @__PURE__ */ t(
264
- g.Indicator,
336
+ p.Indicator,
265
337
  {
266
- className: r(M({ orientation: e }), a),
338
+ className: r(ee({ orientation: a }), e),
267
339
  ...o
268
340
  }
269
341
  );
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(
342
+ ae.displayName = "TabsIndicator";
343
+ const te = ({ className: e, ...a }) => /* @__PURE__ */ t(p.Panel, { className: r("mt-2 ring-offset-background", e), ...a });
344
+ te.displayName = "TabsPanel";
345
+ const re = (e) => /* @__PURE__ */ t(l.Root, { ...e });
346
+ re.displayName = "DialogRoot";
347
+ const oe = ({ className: e, variant: a, size: o, ...s }) => /* @__PURE__ */ t(
276
348
  l.Trigger,
277
349
  {
278
- className: r(d({ variant: e, size: o }), a),
350
+ className: r(d({ variant: a, size: o }), e),
279
351
  ...s
280
352
  }
281
353
  );
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(
354
+ oe.displayName = "DialogTrigger";
355
+ const le = (e) => /* @__PURE__ */ t(l.Portal, { ...e });
356
+ le.displayName = "DialogPortal";
357
+ const se = ({ className: e, ...a }) => /* @__PURE__ */ t(
286
358
  l.Backdrop,
287
359
  {
288
360
  className: r(
289
361
  "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
290
362
  "transition-opacity duration-200",
291
363
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
292
- a
364
+ e
293
365
  ),
294
- ...e
366
+ ...a
295
367
  }
296
368
  );
297
- K.displayName = "DialogBackdrop";
298
- const O = n(
369
+ se.displayName = "DialogBackdrop";
370
+ const ie = n(
299
371
  [
300
372
  "fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
301
373
  "w-full max-w-[calc(100vw-2rem)] rounded-lg border border-border bg-background p-6 shadow-lg",
@@ -319,71 +391,71 @@ const O = n(
319
391
  size: "default"
320
392
  }
321
393
  }
322
- ), Q = ({ className: a, size: e, ...o }) => /* @__PURE__ */ t(
394
+ ), ne = ({ className: e, size: a, ...o }) => /* @__PURE__ */ t(
323
395
  l.Popup,
324
396
  {
325
- className: r(O({ size: e }), a),
397
+ className: r(ie({ size: a }), e),
326
398
  ...o
327
399
  }
328
400
  );
329
- Q.displayName = "DialogPopup";
330
- const U = ({ className: a, ...e }) => /* @__PURE__ */ t(
401
+ ne.displayName = "DialogPopup";
402
+ const de = ({ className: e, ...a }) => /* @__PURE__ */ t(
331
403
  l.Title,
332
404
  {
333
- className: r("text-lg font-semibold leading-none tracking-tight", a),
334
- ...e
405
+ className: r("text-lg font-semibold leading-none tracking-tight", e),
406
+ ...a
335
407
  }
336
408
  );
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(
409
+ de.displayName = "DialogTitle";
410
+ const ce = ({ className: e, ...a }) => /* @__PURE__ */ t(l.Description, { className: r("mt-2", e), ...a });
411
+ ce.displayName = "DialogDescription";
412
+ const ue = ({ className: e, variant: a, size: o, ...s }) => /* @__PURE__ */ t(
341
413
  l.Close,
342
414
  {
343
- className: r(d({ variant: e ?? "outline", size: o }), a),
415
+ className: r(d({ variant: a ?? "outline", size: o }), e),
344
416
  ...s
345
417
  }
346
418
  );
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(
419
+ ue.displayName = "DialogClose";
420
+ const me = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1 mb-5", e), ...a });
421
+ me.displayName = "DialogHeader";
422
+ const ge = ({ className: e, ...a }) => /* @__PURE__ */ t(
351
423
  "div",
352
424
  {
353
425
  className: r(
354
426
  "mt-6 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
355
- a
427
+ e
356
428
  ),
357
- ...e
429
+ ...a
358
430
  }
359
431
  );
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(
432
+ ge.displayName = "DialogFooter";
433
+ const pe = (e) => /* @__PURE__ */ t(l.Root, { ...e });
434
+ pe.displayName = "DrawerRoot";
435
+ const fe = ({ className: e, variant: a, size: o, ...s }) => /* @__PURE__ */ t(
364
436
  l.Trigger,
365
437
  {
366
- className: r(d({ variant: e, size: o }), a),
438
+ className: r(d({ variant: a, size: o }), e),
367
439
  ...s
368
440
  }
369
441
  );
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(
442
+ fe.displayName = "DrawerTrigger";
443
+ const be = (e) => /* @__PURE__ */ t(l.Portal, { ...e });
444
+ be.displayName = "DrawerPortal";
445
+ const ye = ({ className: e, ...a }) => /* @__PURE__ */ t(
374
446
  l.Backdrop,
375
447
  {
376
448
  className: r(
377
449
  "fixed inset-0 z-50 bg-black/50 backdrop-blur-sm",
378
450
  "transition-opacity duration-300",
379
451
  "data-starting-style:opacity-0 data-ending-style:opacity-0",
380
- a
452
+ e
381
453
  ),
382
- ...e
454
+ ...a
383
455
  }
384
456
  );
385
- ra.displayName = "DrawerBackdrop";
386
- const oa = n(
457
+ ye.displayName = "DrawerBackdrop";
458
+ const ve = n(
387
459
  [
388
460
  "fixed z-50 flex flex-col bg-background p-6 shadow-lg",
389
461
  "transition-transform duration-300 ease-out",
@@ -419,120 +491,125 @@ const oa = n(
419
491
  side: "right"
420
492
  }
421
493
  }
422
- ), la = ({ className: a, side: e, ...o }) => /* @__PURE__ */ t(
494
+ ), Ne = ({ className: e, side: a, ...o }) => /* @__PURE__ */ t(
423
495
  l.Popup,
424
496
  {
425
- className: r(oa({ side: e }), a),
497
+ className: r(ve({ side: a }), e),
426
498
  ...o
427
499
  }
428
500
  );
429
- la.displayName = "DrawerPopup";
430
- const sa = ({ className: a, ...e }) => /* @__PURE__ */ t(
501
+ Ne.displayName = "DrawerPopup";
502
+ const xe = ({ className: e, ...a }) => /* @__PURE__ */ t(
431
503
  l.Title,
432
504
  {
433
- className: r("text-lg font-semibold leading-none tracking-tight", a),
434
- ...e
505
+ className: r("text-lg font-semibold leading-none tracking-tight", e),
506
+ ...a
435
507
  }
436
508
  );
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(
509
+ xe.displayName = "DrawerTitle";
510
+ const he = ({ className: e, ...a }) => /* @__PURE__ */ t(l.Description, { className: r("", e), ...a });
511
+ he.displayName = "DrawerDescription";
512
+ const we = ({ className: e, variant: a, size: o, ...s }) => /* @__PURE__ */ t(
441
513
  l.Close,
442
514
  {
443
- className: r(d({ variant: e ?? "outline", size: o }), a),
515
+ className: r(d({ variant: a ?? "outline", size: o }), e),
444
516
  ...s
445
517
  }
446
518
  );
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
519
+ we.displayName = "DrawerClose";
520
+ const De = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("flex flex-col space-y-1.5", e), ...a });
521
+ De.displayName = "DrawerHeader";
522
+ const Ae = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("py-5", e), ...a });
523
+ Ae.displayName = "DrawerContent";
524
+ const ke = ({ className: e, ...a }) => /* @__PURE__ */ t("div", { className: r("", e), ...a });
525
+ ke.displayName = "DrawerFooter";
526
+ const Te = ({ className: e, ...a }) => /* @__PURE__ */ t(f.Root, { className: r("w-full", e), ...a });
527
+ Te.displayName = "AccordionRoot";
528
+ const ze = ({ className: e, ...a }) => /* @__PURE__ */ t(
529
+ f.Item,
530
+ {
531
+ className: r("border-b border-border last:border-b-0", e),
532
+ ...a
461
533
  }
462
534
  );
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,
535
+ ze.displayName = "AccordionItem";
536
+ const Pe = ({ className: e, ...a }) => /* @__PURE__ */ t(f.Header, { className: r("flex", e), ...a });
537
+ Pe.displayName = "AccordionHeader";
538
+ const Ce = ({ className: e, children: a, ...o }) => /* @__PURE__ */ t(
539
+ f.Trigger,
468
540
  {
469
541
  className: r(
470
542
  "flex flex-1 items-center justify-between py-3 font-medium",
471
- a
543
+ e
472
544
  ),
473
545
  ...o,
474
- children: e
546
+ children: a
475
547
  }
476
548
  );
477
- fa.displayName = "AccordionTrigger";
478
- const ba = ({ className: a, ...e }) => /* @__PURE__ */ t(
479
- u.Panel,
549
+ Ce.displayName = "AccordionTrigger";
550
+ const Re = ({ className: e, ...a }) => /* @__PURE__ */ t(
551
+ f.Panel,
480
552
  {
481
553
  className: r(
482
554
  "overflow-hidden duration-200 h-(--accordion-panel-height) transition-height ease-out data-ending-style:h-0 data-starting-style:h-0",
483
- a
555
+ e
484
556
  ),
485
- ...e
557
+ ...a
486
558
  }
487
559
  );
488
- ba.displayName = "AccordionPanel";
560
+ Re.displayName = "AccordionPanel";
489
561
  export {
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
562
+ Pe as AccordionHeader,
563
+ ze as AccordionItem,
564
+ Re as AccordionPanel,
565
+ Te as AccordionRoot,
566
+ Ce as AccordionTrigger,
567
+ Je as AlertDialog,
568
+ B as AlertDialogBackdrop,
569
+ _ as AlertDialogClose,
570
+ L as AlertDialogDescription,
571
+ I as AlertDialogPopup,
572
+ S as AlertDialogPortal,
573
+ R as AlertDialogRoot,
574
+ H as AlertDialogTitle,
575
+ V as AlertDialogTrigger,
576
+ j as AlertDialogViewport,
577
+ Oe as Avatar,
578
+ q as AvatarFallback,
579
+ M as AvatarImage,
580
+ D as AvatarRoot,
581
+ E as AvatarStack,
582
+ C as Button,
583
+ se as DialogBackdrop,
584
+ ue as DialogClose,
585
+ ce as DialogDescription,
586
+ ge as DialogFooter,
587
+ me as DialogHeader,
588
+ ne as DialogPopup,
589
+ le as DialogPortal,
590
+ re as DialogRoot,
591
+ de as DialogTitle,
592
+ oe as DialogTrigger,
593
+ ye as DrawerBackdrop,
594
+ we as DrawerClose,
595
+ Ae as DrawerContent,
596
+ he as DrawerDescription,
597
+ ke as DrawerFooter,
598
+ De as DrawerHeader,
599
+ Ne as DrawerPopup,
600
+ be as DrawerPortal,
601
+ pe as DrawerRoot,
602
+ xe as DrawerTitle,
603
+ fe as DrawerTrigger,
604
+ J as ScrollAreaContent,
605
+ Q as ScrollAreaCorner,
606
+ $ as ScrollAreaRoot,
607
+ K as ScrollAreaScrollbar,
608
+ O as ScrollAreaThumb,
609
+ G as ScrollAreaViewport,
610
+ ae as TabsIndicator,
611
+ X as TabsList,
612
+ te as TabsPanel,
613
+ U as TabsRoot,
614
+ Z as TabsTab
538
615
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lglab/compose-ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A collection of components built with Base UI & Tailwind CSS",
5
5
  "author": "LGLab",
6
6
  "license": "MIT",